|
|
(self.webpackChunk=self.webpackChunk||[]).push([[7460],{89489:function(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Se}});var Le=Ee(92413),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},78780:function(){"use strict"},19136:function(){"use strict"},11570:function(bn,qt){"use strict";qt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},95910:function(bn,qt){"use strict";qt.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},58323:function(){"use strict"},54318:function(bn,qt,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"})));qt.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZmlsbD0iI0ZGRiIgZD0iTTAgMGgzMHYzMEgweiIvPjxwYXRoIGQ9Ik02Ljg2NiAyNi45MjhoLTEuMjhhMi41NjEgMi41NjEgMCAwIDEtMi41NjItMi41NjFWNS41ODVhMi41NjEgMi41NjEgMCAwIDEgMi41NjEtMi41NmgxLjI4djQuMjY4YTIuNTYxIDIuNTYxIDAgMCAwIDIuNTYyIDIuNTZoMy44NDJhMi41NjEgMi41NjEgMCAwIDAgMi41Ni0yLjU2VjMuMDI0aDIuOTE1bDguMTg0IDguMTg0djEzLjE1OWEyLjU2MSAyLjU2MSAwIDAgMS0yLjU2MSAyLjU2MWgtMS4yOHYtNS45NzZjMC0uOTQzLS43NjUtMS43MDctMS43MDgtMS43MDdIOC41NzNjLS45NDMgMC0xLjcwNy43NjQtMS43MDcgMS43MDd2NS45NzZaIiBmaWxsPSIjQjZEMEZDIi8+PHBhdGggZD0iTTguNTczIDMuMDI0aDUuNTV2NC4yNjlhLjg1NC44NTQgMCAwIDEtLjg1NC44NTNIOS40MjdhLjg1NC44NTQgMCAwIDEtLjg1NC0uODUzVjMuMDI0Wk04LjU3MyAyNi45Mjh2LTUuOTc2SDIxLjM4djUuOTc2eiIgZmlsbD0iIzE4OTBGRiIvPjwvZz48L3N2Zz4="},71302:function(bn,qt,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"})));qt.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMzAgMTVjMCA4LjI4NC02LjcxNiAxNS0xNSAxNS04LjI4NCAwLTE1LTYuNzE2LTE1LTE1QzAgNi43MTYgNi43MTYgMCAxNSAwYzguMjg0IDAgMTUgNi43MTYgMTUgMTVaIiBmaWxsPSIjQkFGRkYwIi8+PHBhdGggZD0iTTI1LjUgMTVjMCA1LjgtNC43IDEwLjUtMTAuNSAxMC41UzQuNSAyMC44IDQuNSAxNSA5LjIgNC41IDE1IDQuNSAyNS41IDkuMiAyNS41IDE1WiIgZmlsbD0iIzQ0RDdCNiIvPjxwYXRoIGQ9Ik0xMy41IDlhMS41IDEuNSAwIDAgMSAxLjUgMS41djQuMzc5bDMuNTYgMy41NmExLjUgMS41IDAgMCAxLTIuMTIgMi4xMjJsLTQtNEExLjUgMS41IDAgMCAxIDEyIDE1LjV2LTVBMS41IDEuNSAwIDAgMSAxMy41IDlaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg=="},29277:function(){"use strict";function bn(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(bn.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(bn.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(bn.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(bn.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 bn))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 qt=[];function Ee(ue,z){var ee=qt.pop();return ee===void 0?new go.Point(ue,z):(ee.x=ue,ee.y=z,ee)}function Le(){var ue=qt.pop();return ue===void 0?new go.Point:ue}function me(ue){qt.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 We=(z-oe)/Ce,gt=z-We*ue;Ne=ie,je=We*Ne+gt}else{var We=(z-oe)/Ce,Ve=(se-ye)/ke,gt=z-We*ue,Qe=se-Ve*ie;Ne=(Qe-gt)/(We-Ve),je=We*Ne+gt}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,We=we,gt=ue*Qe+ee*We,ct=z*Qe+oe*We,Ct=ee*Qe+ie*We,it=oe*Qe+se*We,yt=ie*Qe+le*We,ut=se*Qe+ye*We,Ft=gt*Qe+Ct*We,ht=ct*Qe+it*We,rt=Ct*Qe+yt*We,dt=it*Qe+ut*We,St=Ft*Qe+rt*We,Et=ht*Qe+dt*We;Ce.x=gt,Ce.y=ct,ke.x=Ft,ke.y=ht,Ne.x=St,Ne.y=Et,je.x=rt,je.y=dt,Ve.x=yt,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 bn("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 bn("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 bn("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 bn("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 bn("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 bn("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 bn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new bn("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 bn("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 bn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new bn("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 bn("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 bn("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 bn("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 bn("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 bn("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 bn("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(),We=Le();Te(le,ye-se,le+ie,ye-se,le+se,ye-ie,le+se,ye,.58,je,je,We,Ve,Qe);var gt=Le(),ct=Le(),Ct=Le();Te(le,ye+se,le-ie,ye+se,le-se,ye+ie,le-se,ye,.42,gt,ct,Ct,je,je);var it=Le(),yt=Le(),ut=Le();return Te(le,ye+se,le-ie,ye+se,le-se,ye+ie,le-se,ye,.58,je,je,ut,it,yt),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,yt.x*z,yt.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,We.x*z,We.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,gt.x*z,gt.y*ee,ct.x*z,ct.y*ee).close()),me(Ce),me(ke),me(Ne),me(je),me(Ve),me(Qe),me(We),me(gt),me(ct),me(Ct),me(it),me(yt),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 bn("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 We=new go.PathFigure(le*z,(ye-se)*ee,!1);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));var gt=new go.PathFigure((le-se)*z,ye*ee,!1);return oe.add(gt),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 bn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new bn("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 bn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new bn("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 bn("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 bn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new bn("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 bn("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 bn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new bn("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 bn("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 bn("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 bn("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 bn("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 bn("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 bn("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 We=new go.PathFigure(we*z+ke,(Ce-ye)*ee+Ne,!0);oe.add(We),We.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)),We.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)),We.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)),We.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 gt=new go.PathFigure(we*z+ke,(Ce-ye)*ee+Ne,!0);return oe.add(gt),gt.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)),gt.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)),gt.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)),gt.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,We=ke*Ve;se.add(new go.PathSegment(go.PathSegment.Bezier,(ye-je)*z,we*ee,(ye-(Qe+je)/2)*z,(we+(Ve+We)/2)*ee,(ye-je)*z,(we+We)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,ye*z,(we-Ve)*ee,(ye-je)*z,(we-We)*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-We)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*ee,(ye+je)*z,(we+We)*ee,(ye+(Qe+je)/2)*z,(we+(Ve+We)/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 gt=new go.PathFigure(.2*z,ee,!1);oe.add(gt),gt.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 We=new go.PathFigure(0,ee,!1);return oe.add(We),We.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")},5559: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 bn={},qt="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":qt=xe.toFixed(1);break;case"string":xe.match(new RegExp("^[0-9]\\.[0-9]+$"))?qt=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};bn.setHTML5Codebase=function(vt,Bt){he=vt,dt(vt,Bt)},bn.setJavaCodebase=bn.setJavaCodebaseVersion=bn.isCompiledInstalled=bn.setPreCompiledScriptPath=bn.setPreCompiledResourcePath=function(){},bn.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)},bn.getHTML5CodebaseVersion=function(){return ue},bn.getParameters=function(){return Ee},bn.setFontsCSSURL=function(vt){le=vt},bn.setGiacJSURL=function(vt){},bn.setJNLPFile=function(vt){ge=vt},bn.setJNLPBaseDir=function(vt){},bn.inject=function(){function vt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Bt="auto",jt=Ee.id,ln,$t=!1,yn=0;yn<arguments.length;yn++){var Ut=arguments[yn];typeof Ut=="string"?(Ut=Ut.toLowerCase(),Ut.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Bt=Ut:jt=arguments[yn]):typeof Ut=="boolean"?$t=Ut:Ut instanceof HTMLElement&&(ln=Ut)}Wt();function Wt(){if(!be){setTimeout(Wt,200);return}Bt=Ft(Bt);var Xt=ln||document.getElementById(jt);if(!Xt){console.log("possibly bug on ajax loading? ");return}if(bn.removeExistingApplet(Xt,!1),Ee.width===void 0&&Xt.clientWidth&&(Ee.width=Xt.clientWidth),Ee.height===void 0&&Xt.clientHeight&&(Ee.height=Xt.clientHeight),!(Ee.width&&Ee.height)&&Bt==="html5"&&(delete Ee.width,delete Ee.height),de=Bt,Bt==="screenshot")ct(Xt,Ee);else{var mt=!1;Ee.hasOwnProperty("playButton")&&Ee.playButton||Ee.hasOwnProperty("clickToLoad")&&Ee.clickToLoad?mt=!0:Ee.hasOwnProperty("playButtonAutoDecide")&&Ee.playButtonAutoDecide&&(mt=(!Ce()||vt())&&ke()),mt?(de="screenshot",it(Xt,Ee,$t,Bt)):gt(Xt,Ee,$t)}}};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}bn.getViews=function(){return Le},bn.isJavaInstalled=function(){return!1};var Ne=function(vt){var Bt=function(yn){var Ut=JSON.parse(yn),Wt=function(ze){return ze.type=="G"||ze.type=="E"},Xt=Ut.elements?Ut.elements.filter(Wt)[0]:Ut;if(!Xt||!Xt.url){jt();return}Ee.fileName=Xt.url,je(Xt.settings||{}),Le.is3D=!0;var mt="https://www.geogebra.org/images/";bn.setPreviewImage(oe||Xt.previewUrl,mt+"GeoGebra_loading.png",mt+"applet_play.png"),vt()},jt=function(){Ee.onError&&Ee.onError(),St("Error: Fetching material (id "+Ee.material_id+") failed.",Ee)},ln=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",$t="/materials/"+Ee.material_id+"?scope=basic";Ve("https://"+ln+"/api/proxy.php?path="+encodeURIComponent($t),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 ln=new XMLHttpRequest;ln.open("GET",vt),ln.onload=function(){Bt(ln.responseText)},ln.onerror=jt,ln.send()}bn.isHTML5Installed=function(){return!0},bn.getLoadedAppletType=function(){return de},bn.setPreviewImage=function(vt,Bt,jt){oe=vt,ie=Bt,se=jt},bn.removeExistingApplet=function(vt,Bt){var jt;typeof vt=="string"&&(vt=document.getElementById(vt)),de=null;var ln=null;for(jt=0;jt<vt.childNodes.length;jt++){var $t=vt.childNodes[jt],yn=$t.className;yn==="applet_screenshot"?Bt?($t.style.display="block",de="screenshot"):$t.style.display="none":yn!=="applet_scaler prerender"&&(vt.removeChild($t),ln=yn&&yn.indexOf("appletParameters")!=-1?$t.id:null,jt--)}var Ut=Ee.id!==void 0?Ee.id:ln,Wt=window[Ut];Wt&&typeof Wt.getBase64=="function"&&(Wt.remove(),window[Ut]=null)},bn.refreshHitPoints=function(){if(we(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var vt=bn.getAppletObject();return vt&&typeof vt.recalculateEnvironments=="function"?(vt.recalculateEnvironments(),!0):!1},bn.startAnimation=function(){var vt=bn.getAppletObject();return vt&&typeof vt.startAnimation=="function"?(vt.startAnimation(),!0):!1},bn.stopAnimation=function(){var vt=bn.getAppletObject();return vt&&typeof vt.stopAnimation=="function"?(vt.stopAnimation(),!0):!1},bn.getAppletObject=function(){var vt=Ee.id!==void 0?Ee.id:"ggbApplet";return window[vt]},bn.resize=function(){};var Qe=function(vt,Bt,jt){var ln=document.createElement("param");ln.setAttribute("name",Bt),ln.setAttribute("value",jt),vt.appendChild(ln)},We=function(vt){return vt&&vt!=="false"},gt=function(vt,Bt,jt){we(ue)<=4.2&&(jt=!0);var ln=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ue||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(ln=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var $t=document.createElement("div");$t.classList.add("appletParameters","notranslate");var yn=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)We(Bt.showToolBar)&&(Bt.height-=7),We(Bt.showAlgebraInput)&&(Bt.height-=37),Bt.width<605&&We(Bt.showToolBar)&&(Bt.width=605,yn=605);else{var Wt=100;(We(Bt.showToolBar)||We(Bt.showMenuBar))&&(Bt.hasOwnProperty("customToolBar")&&(Bt.customToolbar=Bt.customToolBar),Wt=We(Bt.showMenuBar)?245:155),yn<Wt&&(Bt.width=Wt,yn=Wt)}$t.style.border="none",$t.style.display="inline-block";for(var Xt in Bt)Bt.hasOwnProperty(Xt)&&Xt!=="appletOnLoad"&&$t.setAttribute("data-param-"+Xt,Bt[Xt]);le&&$t.setAttribute("data-param-fontscssurl",le),bn.resize=function(){GGBAppletUtils.responsiveResize(vt,Bt)},window.addEventListener("resize",function(at){bn.resize()});var mt=typeof Bt.appletOnLoad=="function"?Bt.appletOnLoad:function(){};if(!jt&&Bt.width!==void 0){Bt.hasOwnProperty("showSplash")||$t.setAttribute("data-param-showSplash","false");var ze=vt.querySelector(".applet_scaler.prerender"),Be=ze!==null;if(Be)var et=ze.querySelector(".ggb_preview");else{var et=ut(yn,Ut,Bt.borderColor,!1);ze=document.createElement("div"),ze.className="applet_scaler",ze.style.position="relative",ze.style.display="block",ze.style.width=yn+"px",ze.style.height=Ut+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ze,"66%"),we(ue)>=5?(Bt.appletOnLoad=function(at){var xt=vt.querySelector(".ggb_preview");xt&&xt.parentNode.removeChild(xt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ze),window.GGBT_wsf_view&&$(window).trigger("resize"),mt(at)},Be||ze.appendChild(et)):$t.appendChild(et),ze.appendChild($t),Be||vt.appendChild(ze),setTimeout(function(){bn.resize()},1)}else{var qe=document.createElement("div");qe.className="applet_scaler",qe.style.position="relative",qe.style.display="block",qe.appendChild($t),vt.appendChild(qe),Bt.appletOnLoad=function(at){bn.resize(),mt(at)}}function Ue(at,xt){xt&&typeof xt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(at,xt.appletOnLoad):renderGGBElement(at),St("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",xt)}function Xe(at,xt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:at,params:xt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(tn){Ue(tn.article,tn.params)}),html5AppletsToProcess=null)},we(ue)<5&&(at.className+=" geogebraweb")):Ue(at,xt)}if(ln){scriptLoadStarted=!0;for(var Re=0;Re<$t.childNodes.length;Re++){var Ae=$t.childNodes[Re].tagName;Ae==="TABLE"&&($t.removeChild($t.childNodes[Re]),Re--)}if(ggbHTML5LoadedScript!==null){var Ge=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Ge!=null&&Ge.parentNode.removeChild(Ge)}var Ke=document.createElement("script"),Ze=function(){Xe($t,Bt)};Ke.src=ce+z,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=ue,ggbHTML5LoadedScript=Ke.src,St("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(777).then(function(){var at=[__webpack_require__(70777)];Ze.apply(null,at)}.bind(this)).catch(__webpack_require__.oe):(Ke.onload=Ze,vt.appendChild(Ke))}else Xe($t,Bt);Bt.height=Ut,Bt.width=yn},ct=function(vt,Bt,jt){var ln=ut(Bt.width,Bt.height,Bt.borderColor,jt),$t=document.createElement("div");$t.style.position="relative",$t.style.display="block",$t.style.width=Bt.width+"px",$t.style.height=Bt.height+"px",$t.className="applet_screenshot applet_scaler"+(jt?" applet_screenshot_play":""),$t.appendChild(ln);var yn=GGBAppletUtils.getScale(Bt,vt,jt);jt?(vt.appendChild(yt()),window.GGBT_wsf_view||(vt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner($t,"66%"),vt.appendChild($t),yn!==1&&!isNaN(yn)&&(GGBAppletUtils.scaleElement($t,yn),$t.style.width=Bt.width+"px",$t.style.height=Bt.height+"px",$t.parentNode.style.width=Bt.width*yn+"px",$t.parentNode.style.height=Bt.height*yn+"px"),bn.resize=function(){Ct(vt,ln,$t,jt)},window.addEventListener("resize",function(Ut){bn.resize()}),bn.resize()};function Ct(vt,Bt,jt,ln){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 $t=GGBAppletUtils.getScale(Ee,vt,ln);jt.parentNode!==null&&(!isNaN($t)&&$t!==1?(GGBAppletUtils.scaleElement(jt,$t),jt.parentNode.style.width=Ee.width*$t+"px",jt.parentNode.style.height=Ee.height*$t+"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()}}bn.onExitFullscreen=function(vt,Bt){Bt.appendChild(vt)};var it=function(vt,Bt,jt,ln){ct(vt,Bt,!0);for(var $t=function(){var Wt=[];for(Ut=0;Ut<vt.childNodes.length;Ut++)Wt.push(vt.childNodes[Ut]);if(window.GGBT_wsf_view){var Xt=window.GGBT_wsf_view.renderFullScreen(vt,Bt.id),mt=document.getElementById("fullscreencontainer"),ze=jQuery(vt).find(".fullscreencontent");ze.length>0?(Xt.remove(),ze.attr("id","fullscreencontent").show(),jQuery(mt).append(ze),window.dispatchEvent(new Event("resize"))):gt(Xt,Bt,!1),window.GGBT_wsf_view.launchFullScreen(mt)}else de=ln,gt(vt,Bt,!1);if(!window.GGBT_wsf_view)for(Ut=0;Ut<Wt.length;Ut++)vt.removeChild(Wt[Ut])},yn=vt.getElementsByClassName("ggb_preview_play"),Ut=0;Ut<yn.length;Ut++)yn[Ut].addEventListener("click",$t,!1),yn[Ut].addEventListener("ontouchstart",$t,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(vt),ke()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},yt=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,ln){var $t=document.createElement("div");$t.className="ggb_preview",$t.style.position="absolute",$t.style.zIndex="90",$t.style.width=vt-2+"px",$t.style.height=Bt-2+"px",$t.style.top="0px",$t.style.left="0px",$t.style.overflow="hidden",$t.style.backgroundColor="white";var yn="lightgrey";jt!==void 0&&(jt==="none"?yn="transparent":yn=jt),$t.style.border="1px solid "+yn;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,Xt,mt;if(!ln){Wt=document.createElement("img"),Wt.style.position="absolute",Wt.style.zIndex="1001",Wt.style.opacity=1,Ut.style.opacity=.3,Xt=360,Xt>vt/4*3&&(Xt=vt/4*3),mt=Xt/5.8,Wt.setAttribute("src",ie),Wt.setAttribute("width",Xt),Wt.setAttribute("height",mt);var ze=(vt-Xt)/2,Be=(Bt-mt)/2;Wt.style.left=ze+"px",Wt.style.top=Be+"px",$t.appendChild(Wt)}}return $t.appendChild(Ut),$t},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 ln=we(ue);!isNaN(ln)&&ln<4.4&&(jt=!1)}var $t,yn;window.location.protocol.substr(0,4)==="http"?$t=window.location.protocol:$t="http:";var Ut=ue.indexOf("//");Ut>0?yn=ue:Ut===0?yn=$t+ue:yn="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(yn,!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&&!We(Ee.showToolBar)&&!We(Ee.showMenuBar)&&!We(Ee.showAlgebraInput)&&!We(Ee.enableRightClick)&&(!Ee.appName||Ee.appName=="classic")?yn+="webSimple/":yn+="web3d/",dt(yn,!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 ln=parseFloat(ue);ln!==NaN&&ln<5&&vt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+ln+" is deprecated. Using version latest instead."),rt("5.0",Bt))},St=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(Et):Et();function Et(){var vt=qt;Pe!==null?vt=Pe:parseFloat(vt)<5&&(vt="5.0"),rt(vt,!1),he!==null&&dt(he,ve),be=!0}return bn},GGBAppletUtils=function(){"use strict";function bn(){return window.GGBT_wsf_edit!==void 0}function qt(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);bn()&&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",qt(xe,Se)):(qt(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:bn,positionCenter:Ie,getScale:me,scaleElement:qt}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var bn=n.location.search;return bn.indexOf(J)!=-1||bn.indexOf(K)!=-1}function q(bn,qt){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(bn){var qt=s[L].bindings;s[L].bindings=function(){for(var Ee=qt?qt():{},Le=bn[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 bn=o.createElement(Q);if(bn.id=L,bn.style.cssText=R+S,bn.tabIndex=-1,o.body.appendChild(bn),t=bn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var qt=document.compatMode==U?V:W;t.write(qt+X),t.close()}}}function w(bn){function qt(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)}qt(function(){Ee(bn)})}webModule.__startLoadingFragment=function(bn){return C(bn)},webModule.__installRunAsyncCode=function(bn){var qt=u(),Ee=qt.body,Le=qt.createElement(_);Le.language=ab,Le.text=bn,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(bn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(bn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(bn){var qt=c[bn];return qt==null?null:qt},r=d,webModule.__errFn=e}function B(){function bn(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 qt(be){if(!be.match(/^\w+:\/\//)){var Pe=o.createElement(ub);Pe.src=be+vb,be=bn(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 bn(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=bn(o.location.href)),Te=qt(Te),Te}function C(bn){return bn.match(/^\//)||bn.match(/^[a-zA-Z]+:\/\//)?bn:webModule.__moduleBase+bn}function D(){var bn=[],qt=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&&(qt=parseInt(Ie.substring(Te+P),$),Ie=Ie.substring(O,Te))}catch(be){}return webModule.__softPermutationId=qt,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})()},49291:function(bn,qt,Ee){"use strict";Ee.d(qt,{Ax:function(){return Te},Ds:function(){return be},KI:function(){return he},SI:function(){return Ie},f1:function(){return me}});var Le=Ee(38446);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},14573:function(bn,qt,Ee){"use strict";Ee.d(qt,{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(7660),Se=Ee(88230),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))},[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("")}),We=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("")}),gt=()=>{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(yt=>{const ut=document.querySelector(yt.name);ut&&ut.setAttribute("title",yt.title)})},ct=()=>{ye.current=new Pe.hP(le.current),ye.current.targetRoot=Ce.current,ye.current.addEventListener("render",We),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),gt()},300)};return Le.createElement(Le.Fragment,null,(ve==null?void 0:ve.visible)&&Le.createElement(be.Z,{spinning:ke,tip:je,style:{position:"absolute"}},Le.createElement("div",{ref:Ce,className:Te()(me.imageDimensions,de,ue?me.fullWidth:""),style:z},Le.createElement("img",{className:me.img,ref:le}))))}},46531:function(bn,qt,Ee){"use strict";var Le=Ee(59301),me=Ee(95237),Ie=Ee(43604),Te=Ee(99313),be=Ee(3113),Pe=Ee(99325),he=Ee(11570),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")))});qt.Z=ge},57816:function(bn,qt,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})=>Le.createElement("section",{className:"tc animated fadeIn",style:ce(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);qt.Z=de},90853:function(bn,qt,Ee){"use strict";Ee.d(qt,{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(57800),Pe=Ee(6848),he=Ee(88230),Se=Ee(30897),xe=Ee(57816),ge=Ee(38446),ce=Ee(89282),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=We=>{try{Qe(Ce.next(We))}catch(gt){Ne(gt)}},Ve=We=>{try{Qe(Ce.throw(We))}catch(gt){Ne(gt)}},Qe=We=>We.done?ke(We.value):Promise.resolve(We.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:We,onClose:gt,hasMask:ct,disabledDownload:Ct,onImgDimensions:it,showNodata:yt,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)(""),[St,Et]=(0,Le.useState)(),vt=window.ENV==="build"?"/react/build":"",Bt=location.host.startsWith("localhost")?ge.Z.PROXY_SERVER:ge.Z.API_SERVER,ln=10*(1024*1024),$t=(0,Le.useRef)();we!=null&&we.startsWith("/api")&&ke!=="txt"&&(we=ge.Z.API_SERVER+we);const yn=mt=>mt.substring(mt.lastIndexOf("/")+1).split(".").pop();Ne&&je&&(je.filename=Ne),(0,Le.useEffect)(()=>{var mt,ze;const Be=(ze=(mt=document.cookie)==null?void 0:mt.replace(/\s/g,""))==null?void 0:ze.split(";");Be==null||Be.map(et=>{let qe=et.split("=");qe[0]==="_educoder_session"&&dt(qe[1])})},[]),(0,Le.useEffect)(()=>{ke==="office"&&(we.indexOf("bigfilescdn.")>-1||we.indexOf("bigfiles1")>-1?Et({url:we,fileType:yn(we),model:we.indexOf("model=edit")?"edit":"view"}):Ut())},[ke,we]);const Ut=()=>se(void 0,null,function*(){console.log("data:",we);let mt=we;we.startsWith("http")||(mt=location.origin+mt);let ze=new URL(mt).pathname.split("/").pop();const Be=yield(0,Se.gJ)({attachment_id:ze});Be.url=Bt+Be.url,Et(Be)}),Wt=()=>{if(we.startsWith("http")||we.startsWith("blob:")){Xt();return}(0,he.Sv)(Ne||"educoder",we,Ne)},Xt=()=>{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"}`},We&&ve.createElement("div",{className:me.close,ref:$t},!!it&&ve.createElement(Pe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>$t.current},ve.createElement("span",{onClick:()=>{gt(),it()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!Ct&&ve.createElement(Pe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>$t.current},ve.createElement("span",{onClick:Xt},ve.createElement("i",{className:"icon-quxiaozhiding"}))),ve.createElement(Pe.Z,{title:"\u5173\u95ED",getPopupContainer:()=>$t.current},ve.createElement("span",{className:"",onClick:gt},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"&&St&&ve.createElement("iframe",{src:`${vt}/office.html?key=${St.key}&url=${btoa(St.url)}&callbackUrl=${Bt+(St.callbackUrl||"")}&fileType=${St.fileType}&title=${St.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,yt?ve.createElement(xe.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ve.createElement(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")))}},99325:function(bn,qt,Ee){"use strict";Ee.d(qt,{z:function(){return ke},Z:function(){return Ne}});var Le=Ee(59301),me=Ee(2878),Ie=Ee(85187),Te=Ee(64018),be=Ee(40846),Pe=Ee(38446),he=Ee(88230),Se=Ee(15342),xe=Ee(1012),ge=Ee(90853),ce=Ee(59301),de=({html:je})=>{const Ve=(0,Le.useRef)(null),Qe=(0,Le.useRef)(null),We=`.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 gt=Ve.current.attachShadow({mode:"open"});Qe.current=document.createElement("div"),Qe.current.className="markdown-body",Qe.current.innerHTML=je,gt.appendChild(Qe.current);const ct=document.createElement("style");return ct.textContent=We,gt.appendChild(ct),()=>{gt.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,We=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,gt=/\(\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,yt,ut,Ft,ht,rt)=>{const dt=it||ut||ht,St=yt||Ft||rt||"?";return Pe.Z.API_SERVER+"/api/attachments/"+dt+St+"&t="+(0,he.Jn)(dt,Date.now())+(Ct.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(je=je.replace(ct,(Ct,it,yt,ut,Ft,ht,rt)=>{const dt=it||ut||ht,St=yt||Ft||rt||"?";return Pe.Z.API_SERVER+"/attachments/download/"+dt+St+"&t="+(0,he.Jn)(dt,Date.now())+(Ct.indexOf(")")>-1?")":"&")}).replace(Qe,(Ct,it,yt,ut,Ft,ht,rt)=>{const dt=it||ut||ht,St=yt||Ft||rt||"?";return Pe.Z.API_SERVER+"/api/attachments/"+dt+St+"&t="+(0,he.Jn)(dt,Date.now())+(Ct.indexOf(")")>-1?")":"&")}).replace(We,(Ct,it,yt,ut,Ft)=>{const ht=it||ut,rt=yt||Ft||"";return'"'+Pe.Z.API_SERVER+"/api/attachments/"+ht+rt+ht+rt+"&t="+(0,he.Jn)(ht,Date.now())}).replace(gt,(Ct,it,yt,ut,Ft)=>{const ht=it||ut,rt=yt||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:We,style:gt={},stylesPrev:ct={},highlightKeywords:Ct,showProgramFill:it,isProgramFill:yt,disabledFill:ut=!1,programFillValue:Ft,onFillChange:ht=St=>{},onFillBlur:rt=()=>{},onFillFocus:dt=()=>{}})=>{let St=String(je);const[Et,vt]=(0,Le.useState)(""),[Bt,jt]=(0,Le.useState)("office"),[ln,$t]=(0,Le.useState)([]),yn=(0,Le.useRef)("a"+(0,xe.Z)()),Ut={},Wt=(Ke,Ze,at)=>{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=${at||""}><span>${xt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Xt(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 mt=Ke=>Ke.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Ze,at){let xt=at.replace(/(\n|\r)/g,"").split("}"),tn=[];return xt.map(nn=>{nn!=""&&tn.push(`.${yn.current} ${nn}`)}),`<style>${tn.join("}")}</style>`}),ze=(0,Le.useMemo)(()=>{try{const xt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,tn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,nn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Jt=/\(\/attachments\/download\//g;St=St.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(nn,'"'+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 St=St.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(tn,nn,Jt){var pn;return++xt,Wt(tn,xt,(pn=Ft==null?void 0:Ft[xt])==null?void 0:pn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${mt(St||"")}</pre>`}let Ke=mt(St);Ke=(0,Ie.ZP)(Ke);const Ze=(0,Ie.ez)();St.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:nn,expression:Jt}=Ze[tn];return(0,Se.renderToString)(Ce(Jt)||"",{displayMode:nn==="block",throwOnError:!1,output:"html"})}),Ke=Ke.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ie.AL)();const at=document.createElement("div");if(at.innerHTML=Ke,Qe)return at.innerText;if(Ct){const xt=Ct.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ue(at,xt),at.innerHTML}return setTimeout(()=>Ae(),500),at.innerHTML},[St,Ct]);(0,Le.useEffect)(()=>{Xe.current&&Xe.current.querySelectorAll(["input","textarea"]).forEach(Ze=>{Ze.oninput=Be,Ze.onblur=et,Ze.onfocus=qe})},[ln]),(0,Le.useEffect)(()=>{var Ke,Ze,at,xt,tn;if(Ft!=null&&Ft.length)try{const nn=Xe.current.querySelectorAll(".edu-program-fill-score"),Jt=Xe.current.querySelectorAll('[name="edu-program-fill"]');for(const[pn,Mn]of Jt.entries())Mn.value=((Ke=Ft==null?void 0:Ft[pn])==null?void 0:Ke.value)||"",((Ze=Ft==null?void 0:Ft[pn])==null?void 0:Ze.type)==="warning"?Mn.className="program-fill-warning":((at=Ft==null?void 0:Ft[pn])==null?void 0:at.type)==="success"?Mn.className="program-fill-success":Mn.className="";for(const[pn,Mn]of nn.entries())Mn.innerHTML=(xt=Ft==null?void 0:Ft[pn])!=null&&xt.score?`${(tn=Ft==null?void 0:Ft[pn])==null?void 0:tn.score}\u5206`:"";$t(Ft)}catch(nn){console.log(nn,"error")}},[Ft]);const Be=Ke=>{ln[Ke.target.dataset.id]=ln[Ke.target.dataset.id]||{},ln[Ke.target.dataset.id].value=Ke.target.value,$t([...ln]),ht(ln,Ke.target.dataset.id)},et=Ke=>{ln[Ke.target.dataset.id]=ln[Ke.target.dataset.id]||{},ln[Ke.target.dataset.id].value=Ke.target.value,$t([...ln]),rt(ln,Ke.target.dataset.id)},qe=Ke=>{ln[Ke.target.dataset.id]=ln[Ke.target.dataset.id]||{},ln[Ke.target.dataset.id].value=Ke.target.value,$t([...ln]),dt(ln,Ke.target.dataset.id)};function Ue(Ke,Ze){return Ke.childNodes.forEach(at=>{var xt;if(at.childNodes.length>0)Ue(at,Ze);else if(at.nodeName!=="IMG")if(at.innerHTML)at.innerHTML=(xt=at.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=at.textContent.replace(new RegExp(Ze,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),at.replaceWith(tn)}})}const Xe=(0,Le.useRef)();Ie.jb.WebkitLineClamp=We,We&&(gt=se(se({},gt),Ie.jb));function Re(Ke){let Ze=Ke.target;if(Ze.tagName.toUpperCase()==="A"){let at=Ze.getAttribute("href");if(at.indexOf("office")>-1)Ke.preventDefault(),vt(at),jt("office");else if(at.indexOf("application/pdf")>-1)Ke.preventDefault(),vt(at),jt("pdf");else if(at.indexOf("text/html")>-1)Ke.preventDefault(),vt(at),jt("html");else if(at.startsWith("#")){Ke.preventDefault();let xt=document.getElementById(at.replace("#",""));xt&&xt.scrollIntoView(!0)}}}const Ae=()=>{var Ke;const Ze=(Ke=Xe.current)==null?void 0:Ke.querySelectorAll("video");Ze==null||Ze.forEach(at=>{if(at.oncontextmenu=()=>!1,at.src.indexOf(".m3u8")>-1&&!at.canPlayType("application/vnd.apple.mpegurl")){if(be.ZP.isSupported()){var xt=new be.ZP;xt.loadSource(at.src),xt.attachMedia(at)}}})};(0,Le.useEffect)(()=>{if(Xe.current&&ze&&ze.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)()}},[ze,Xe.current,Re]),(0,Le.useEffect)(()=>{var Ke;const Ze=at=>{at.preventDefault(),at.clipboardData.setData("text",window.getSelection().toString())};return(Ke=Xe.current)==null||Ke.addEventListener("copy",Ze),()=>{var at;(at=Xe.current)==null||at.removeEventListener("copy",Ze)}},[Xe.current]);const Ge=Ke=>/<style[\s\S]*?>/i.test(Ke||"");return Le.createElement(Le.Fragment,null,Qe&&Le.createElement("div",{ref:Xe},ze),!Qe&&!Ge(ze)&&Le.createElement("div",{ref:Xe,style:se({},gt),className:`${Ve||""} ${ut?"disabled-fill":""} markdown-body ${yn.current}`,dangerouslySetInnerHTML:{__html:ze}}),!Qe&&Ge(ze)&&Le.createElement(de,{html:ze}),Le.createElement(ge.Z,{close:!0,data:Et,type:Et!=null&&Et.length?Bt:"",style:se({},ct),onClose:()=>vt("")}))}},7651:function(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Te}});var Le=Ee(24459),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))},31582:function(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Te}});var Le=Ee(59301),me=Ee(50484),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))}},75618:function(bn,qt,Ee){"use strict";Ee.d(qt,{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)))},46942:function(bn,qt,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))};qt.Z=Ie},71628:function(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return z}});var Le=Ee(59301),me=Ee(8591),Ie=Ee(38854),Te=Ee(44860),be=Ee(40846),Pe=Ee(73898),he=Ee(56102),Se=Ee(20736),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},We)=>{var gt;oe=oe==null?void 0:oe.replace("http://","https://");const Ct=((gt=oe==null?void 0:oe.split("."))==null?void 0:gt.pop())==="flv",it=(0,Le.useRef)(),yt=(0,Le.useRef)(),ut=(0,Le.useRef)(),Ft=(0,Le.useRef)(),ht=(0,Le.useRef)(),rt=(0,Le.useRef)(),dt=(0,Le.useRef)(),St=(0,Le.useRef)(),Et=(0,Le.useRef)(),vt=(0,Le.useRef)(),Bt=(0,Le.useRef)(),jt=(0,Le.useRef)(),ln=(0,Le.useRef)(),$t=(0,Le.useRef)(),yn=navigator.userAgent.toLowerCase().match(ue),Ut=yn?yn[0]:"pc",Wt=(0,Le.useRef)(!1),Xt=(0,Pe.eY)();let mt=0,ze=0,Be=0,et=null,qe=!1,Ue=20,Xe=1,Re=!1,Ae=!1,Ge=[];(0,Le.useImperativeHandle)(We,()=>({getLastUpdatedTime:()=>it.current.currentTime,getDuration:()=>it.current.duration})),me.ZP.config({maxCount:1,getContainer:()=>ut.current});const Ke=(0,Le.useCallback)((pn,Mn=!1)=>{let hn={point:it.current.currentTime};et?(hn.log_id=et,hn.watch_duration=de(Ge),hn.total_duration=ze):(ye?(hn.video_id=parseInt(se,10),hn.course_id=ye):hn.video_id=se,hn.duration=mt,hn.device=Ut),Mn&&(hn.ed="1");function En(){return ge(this,null,function*(){Re=!0,et=yield le==null?void 0:le(hn),Re=!1,pn&&pn()})}En()},[se,ye]);(0,Le.useEffect)(()=>{it.current&&(Ft.current.style.display="none",ht.current.style.display="block"),me.ZP.destroy();let pn=null;return Te.Z.isSupported&&Ct&&oe&&(oe==null?void 0:oe.indexOf(".m3u8"))<0?(pn=Te.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:oe,muted:!1}),it.current&&(pn.attachMediaElement(it.current),pn.load())):it.current.setAttribute("src",oe),at(),()=>{pn&&(pn.unload(),pn.pause(),pn.destroy(),pn=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 at(){Bt.current.style.display="none",ln.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?ln.current.style.display="block":jt.current.style.display="block"}(0,Le.useEffect)(()=>{const pn=document.getElementById("play"),Mn=document.querySelectorAll(".playback-icons use");function hn(){ke(),we&&!Wt.current&&(it.current.currentTime=we),Wt.current=!0,Ge.push(it.current.currentTime),qe||(qe=!0,ie&&Ke())}function En(){return ge(this,null,function*(){Ze(),Ge.push(it.current.currentTime),ie&&Ke(()=>{et=null,Be=0,qe=!1,Re=!1,Ae=!1,Ge=[],ze=0,Xe=1},!0),Ve()})}function Wn(){rt.current.value=Math.round(it.current.currentTime),dt.current.value=Math.round(it.current.currentTime)}function Tn(){const hi=ce(Math.round(it.current.currentTime));Et.current.innerText=`${hi.hour>0?hi.hour+":":""}${hi.minutes}:${hi.seconds}`,Et.current.setAttribute("datetime",`${hi.hour>0?" "+hi.hour+" ":""}${hi.minutes}m ${hi.seconds}s`)}function ci(){var hi,Pr,Hi,st,Rr,Er,yo;const Zr=Math.round((hi=it.current)==null?void 0:hi.duration);(Hi=(Pr=rt.current)==null?void 0:Pr.setAttribute)==null||Hi.call(Pr,"max",Zr),(Rr=(st=dt.current)==null?void 0:st.setAttribute)==null||Rr.call(st,"max",Zr);const ao=ce(Zr);St.current&&(St.current.innerText=`${ao.hour>0?ao.hour+":":""}${ao.minutes}:${ao.seconds}`,(yo=(Er=St.current).setAttribute)==null||yo.call(Er,"datetime",`${ao.hour>0?" "+ao.hour+" ":""}${ao.minutes}m ${ao.seconds}s`))}function ri(){try{const hi=Math.round(it.current.duration);rt.current.setAttribute("max",hi),dt.current.setAttribute("max",hi);const Pr=ce(hi);St.current.innerText=`${Pr.hour>0?Pr.hour+":":""}${Pr.minutes}:${Pr.seconds}`,St.current.setAttribute("datetime",`${Pr.hour>0?" "+Pr.hour+" ":""}${Pr.minutes}m ${Pr.seconds}s`),Wn(),Tn();const{width:Hi,height:st,x:Rr,y:Er}=yt.current.getBoundingClientRect();if(Rr<0||Er<0||!Hi)return;if(!Ae){let yo=it.current.currentTime,Zr=yo-Be;Math.abs(Zr)<10?(ze+=Math.abs(Zr),Be=yo,Re||ze-Xe*Ue>=0&&(Xe++,Ge.push(Be),ie&&Ke())):(Be=yo,ie&&Ke())}}catch(hi){console.log(hi)}}function Ii(){Ae=!0}function bi(){it.current.playing&&Ge.push(it.current.currentTime,Be),Be=it.current.currentTime,Ae=!1}function nr(){mt=it.current.duration,mt<=20&&(Ue=mt/3),it.current.addEventListener("play",hn)}function Ji(hi){hi.preventDefault(),(0,Se.vp)()?(it.current.style.width="100%",it.current.style.height="100%"):it.current.style.cssText=""}function gr(){Ce()}function cr(hi){if(!ee){me.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");return}const Pr=hi.target.dataset.seek?hi.target.dataset.seek:hi.target.value;it.current.currentTime=Pr,dt.current.value=Pr,rt.current.value=Pr}function eo(hi){const Pr=Math.round(hi.offsetX/hi.target.clientWidth*parseInt(hi.target.getAttribute("max"),10));rt.current.setAttribute("data-seek",Pr);const Hi=ce(Pr);vt.current.textContent=`${Hi.hour>0?Hi.hour+":":""}${Hi.minutes}:${Hi.seconds}`;const st=it.current.getBoundingClientRect();vt.current.style.left=`${hi.pageX-st.left}px`}function ro(hi){switch(hi.code){case"Space":hi.preventDefault(),nn();break;case"ArrowRight":if(hi.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,Wn();break;case"ArrowLeft":if(hi.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,Wn();break;case"ArrowUp":hi.preventDefault(),it.current.volume<1&&(it.current.volume=(parseInt(it.current.volume*10)+1)/10);break;case"ArrowDown":hi.preventDefault(),it.current.volume>0&&(it.current.volume=(parseInt(it.current.volume*10)-1)/10);break}}return ut.current.addEventListener((0,Se.gH)(),Ji),it.current.addEventListener("canplay",nr),it.current.addEventListener("ended",En),it.current.addEventListener("seeking",Ii),it.current.addEventListener("seeked",bi),it.current.addEventListener("loadedmetadata",ci),rt.current.addEventListener("mousemove",eo),rt.current.addEventListener("input",cr),it.current.addEventListener("timeupdate",ri),it.current.addEventListener("pause",gr),it.current.addEventListener("volumechange",at),document.addEventListener("keydown",ro),()=>{var hi,Pr,Hi,st,Rr,Er,yo,Zr,ao,Jr,lo,oi;(hi=it.current)==null||hi.removeEventListener("canplay",nr),(Pr=it.current)==null||Pr.removeEventListener("play",hn),(Hi=it.current)==null||Hi.removeEventListener("ended",En),(st=it.current)==null||st.removeEventListener("seeking",Ii),(Rr=it.current)==null||Rr.removeEventListener("seeked",bi),(Er=rt.current)==null||Er.removeEventListener("mousemove",eo),(yo=rt.current)==null||yo.removeEventListener("input",cr),(Zr=it.current)==null||Zr.removeEventListener("timeupdate",ri),(ao=it.current)==null||ao.removeEventListener("pause",gr),(Jr=it.current)==null||Jr.removeEventListener("loadedmetadata",ci),(lo=it.current)==null||lo.removeEventListener("volumechange",at),document.removeEventListener("keydown",ro),(oi=it.current)!=null&&oi.playing&&(Ge.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 pn=new be.ZP;pn.loadSource(oe),pn.attachMedia(it.current)}}},[oe]);const[xt,tn]=(0,Le.useState)(1),nn=()=>{it.current.paused||it.current.ended?it.current.play():it.current.pause(),Ze()};function Jt(){it.current.muted=!it.current.muted,it.current.muted?($t.current.setAttribute("data-volume",volume.value),$t.current.value=0):$t.current.value=$t.current.dataset.volume}return Le.createElement("div",{style:{position:"relative"},ref:ut},Le.createElement("div",{ref:yt,className:`${xe.watermark} animated_alternate animate__animated_10s animate__infinite animate__stepstart ${xe.animate__loop}`},Qe&&Xt?Xt.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:nn},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:Et},"00:00"),Le.createElement("span",null," / "),Le.createElement("time",{id:"duration",ref:St},"00:00"))),Le.createElement("div",{className:xe["right-controls"]},ee&&Le.createElement(Ie.Z,{placement:"top",overlayClassName:xe.rateOverlay,getPopupContainer:pn=>pn.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:ln,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:$t,style:{display:"none"},onClick:at})),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"})))))})},85469:function(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return zn}});var Le=Ee(59301),me=Ee(50484),Ie=Ee(15277),Te=Ee(92310),be=Ee.n(Te),Pe=Ee(92413),he=Ee(33708),Se=Ee(400),xe=Ee(33606),ge=Ee(39559),ce=Ee(37061),ve=Ee(55468),de=Ee(18929),ue=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"],z=Le.createContext(null),ee=0;function oe(At,Kt){var Sn=Le.useState(function(){return ee+=1,String(ee)}),kn=(0,xe.Z)(Sn,1),Zt=kn[0],rn=Le.useContext(z),Rn={data:Kt,canPreview:At};return Le.useEffect(function(){if(rn)return rn.register(Zt,Rn)},[]),Le.useEffect(function(){rn&&rn.register(Zt,Rn)},[At,Kt]),Zt}function ie(At){return new Promise(function(Kt){var Sn=document.createElement("img");Sn.onerror=function(){return Kt(!1)},Sn.onload=function(){return Kt(!0)},Sn.src=At})}function se(At){var Kt=At.src,Sn=At.isCustomPlaceholder,kn=At.fallback,Zt=(0,Le.useState)(Sn?"loading":"normal"),rn=(0,xe.Z)(Zt,2),Rn=rn[0],An=rn[1],Qn=(0,Le.useRef)(!1),Un=Rn==="error";(0,Le.useEffect)(function(){ie(Kt).then(function(Li){Li||An("error")})},[Kt]),(0,Le.useEffect)(function(){Sn&&!Qn.current?An("loading"):Un&&An("normal")},[Kt]);var qn=function(){An("normal")},Nn=function(Bi){Qn.current=!1,Rn==="loading"&&Bi!=null&&Bi.complete&&(Bi.naturalWidth||Bi.naturalHeight)&&(Qn.current=!0,qn())},si=Un&&kn?{src:kn}:{onLoad:qn,src:Kt};return[Nn,si,Rn]}var le=Ee(86923),ye=Ee(8224),we=Ee(10228),Ce=Ee(48736);function ke(At,Kt,Sn,kn){var Zt=Kt+Sn,rn=(Sn-kn)/2;if(Sn>kn){if(Kt>0)return(0,Se.Z)({},At,rn);if(Kt<0&&Zt<kn)return(0,Se.Z)({},At,-rn)}else if(Kt<0||Zt>kn)return(0,Se.Z)({},At,Kt<0?rn:-rn);return{}}function Ne(At,Kt,Sn,kn){var Zt=(0,ve.g1)(),rn=Zt.width,Rn=Zt.height,An=null;return At<=rn&&Kt<=Rn?An={x:0,y:0}:(At>rn||Kt>Rn)&&(An=(0,he.Z)((0,he.Z)({},ke("x",Sn,At,rn)),ke("y",kn,Kt,Rn))),An}var je=Ee(13697),Ve=Ee(16089),Qe={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function We(At,Kt,Sn,kn){var Zt=(0,Le.useRef)(null),rn=(0,Le.useRef)([]),Rn=(0,Le.useState)(Qe),An=(0,xe.Z)(Rn,2),Qn=An[0],Un=An[1],qn=function(Bi){Un(Qe),kn&&!(0,je.Z)(Qe,Qn)&&kn({transform:Qe,action:Bi})},Nn=function(Bi,Ln){Zt.current===null&&(rn.current=[],Zt.current=(0,Ve.Z)(function(){Un(function(Ui){var lr=Ui;return rn.current.forEach(function(Di){lr=(0,he.Z)((0,he.Z)({},lr),Di)}),Zt.current=null,kn==null||kn({transform:lr,action:Ln}),lr})})),rn.current.push((0,he.Z)((0,he.Z)({},Qn),Bi))},si=function(Bi,Ln,Ui,lr){var Di=At.current,Pn=Di.width,Yn=Di.height,ui=Di.offsetWidth,Ti=Di.offsetHeight,pi=Di.offsetLeft,Mi=Di.offsetTop,ir=Bi,Fi=Qn.scale*Bi;Fi>Sn?(ir=Sn/Qn.scale,Fi=Sn):Fi<Kt&&(ir=Kt/Qn.scale,Fi=Kt);var Wi=Ui!=null?Ui:innerWidth/2,hr=lr!=null?lr:innerHeight/2,In=ir-1,zr=In*Pn*.5,On=In*Yn*.5,wr=In*(Wi-Qn.x-pi),po=In*(hr-Qn.y-Mi),Ar=Qn.x-(wr-zr),To=Qn.y-(po-On);if(Bi<1&&Fi===1){var oo=ui*Fi,$i=Ti*Fi,Qi=(0,ve.g1)(),fr=Qi.width,Mr=Qi.height;oo<=fr&&$i<=Mr&&(Ar=0,To=0)}Nn({x:Ar,y:To,scale:Fi},Ln)};return{transform:Qn,resetTransform:qn,updateTransform:Nn,dispatchZoomChange:si}}var gt=Ee(43403),ct=Ee(77900),Ct=function(Kt){var Sn=Kt.visible,kn=Kt.maskTransitionName,Zt=Kt.getContainer,rn=Kt.prefixCls,Rn=Kt.rootClassName,An=Kt.icons,Qn=Kt.countRender,Un=Kt.showSwitch,qn=Kt.showProgress,Nn=Kt.current,si=Kt.transform,Li=Kt.count,Bi=Kt.scale,Ln=Kt.minScale,Ui=Kt.maxScale,lr=Kt.closeIcon,Di=Kt.onSwitchLeft,Pn=Kt.onSwitchRight,Yn=Kt.onClose,ui=Kt.onZoomIn,Ti=Kt.onZoomOut,pi=Kt.onRotateRight,Mi=Kt.onRotateLeft,ir=Kt.onFlipX,Fi=Kt.onFlipY,Wi=Kt.toolbarRender,hr=(0,Le.useContext)(z),In=An.rotateLeft,zr=An.rotateRight,On=An.zoomIn,wr=An.zoomOut,po=An.close,Ar=An.left,To=An.right,oo=An.flipX,$i=An.flipY,Qi="".concat(rn,"-operations-operation");Le.useEffect(function(){var Tt=function(ho){ho.keyCode===we.Z.ESC&&Yn()};return Sn&&window.addEventListener("keydown",Tt),function(){window.removeEventListener("keydown",Tt)}},[Sn]);var fr=[{icon:$i,onClick:Fi,type:"flipY"},{icon:oo,onClick:ir,type:"flipX"},{icon:In,onClick:Mi,type:"rotateLeft"},{icon:zr,onClick:pi,type:"rotateRight"},{icon:wr,onClick:Ti,type:"zoomOut",disabled:Bi===Ln},{icon:On,onClick:ui,type:"zoomIn",disabled:Bi===Ui}],Mr=fr.map(function(Tt){var Ir,ho=Tt.icon,Zo=Tt.onClick,Po=Tt.type,$o=Tt.disabled;return Le.createElement("div",{className:be()(Qi,(Ir={},(0,Se.Z)(Ir,"".concat(rn,"-operations-operation-").concat(Po),!0),(0,Se.Z)(Ir,"".concat(rn,"-operations-operation-disabled"),!!$o),Ir)),onClick:Zo,key:Po},ho)}),fi=Le.createElement("div",{className:"".concat(rn,"-operations")},Mr);return Le.createElement(ct.default,{visible:Sn,motionName:kn},function(Tt){var Ir=Tt.className,ho=Tt.style;return Le.createElement(gt.Z,{open:!0,getContainer:Zt!=null?Zt:document.body},Le.createElement("div",{className:be()("".concat(rn,"-operations-wrapper"),Ir,Rn),style:ho},lr===null?null:Le.createElement("button",{className:"".concat(rn,"-close"),onClick:Yn},lr||po),Un&&Le.createElement(Le.Fragment,null,Le.createElement("div",{className:be()("".concat(rn,"-switch-left"),(0,Se.Z)({},"".concat(rn,"-switch-left-disabled"),Nn===0)),onClick:Di},Ar),Le.createElement("div",{className:be()("".concat(rn,"-switch-right"),(0,Se.Z)({},"".concat(rn,"-switch-right-disabled"),Nn===Li-1)),onClick:Pn},To)),Le.createElement("div",{className:"".concat(rn,"-footer")},qn&&Le.createElement("div",{className:"".concat(rn,"-progress")},Qn?Qn(Nn+1,Li):"".concat(Nn+1," / ").concat(Li)),Wi?Wi(fi,(0,he.Z)({icons:{flipYIcon:Mr[0],flipXIcon:Mr[1],rotateLeftIcon:Mr[2],rotateRightIcon:Mr[3],zoomOutIcon:Mr[4],zoomInIcon:Mr[5]},actions:{onFlipY:Fi,onFlipX:ir,onRotateLeft:Mi,onRotateRight:pi,onZoomOut:Ti,onZoomIn:ui},transform:si},hr?{current:Nn,total:Li}:{})):fi)))})},it=Ct,yt=1,ut=1,Ft=["fallback","src","imgRef"],ht=["prefixCls","src","alt","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],rt=function(Kt){var Sn=Kt.fallback,kn=Kt.src,Zt=Kt.imgRef,rn=(0,ce.Z)(Kt,Ft),Rn=se({src:kn,fallback:Sn}),An=(0,xe.Z)(Rn,2),Qn=An[0],Un=An[1];return Le.createElement("img",(0,Pe.Z)({ref:function(Nn){Zt.current=Nn,Qn(Nn)}},rn,Un))},dt=function(Kt){var Sn=Kt.prefixCls,kn=Kt.src,Zt=Kt.alt,rn=Kt.fallback,Rn=Kt.movable,An=Rn===void 0?!0:Rn,Qn=Kt.onClose,Un=Kt.visible,qn=Kt.icons,Nn=qn===void 0?{}:qn,si=Kt.rootClassName,Li=Kt.closeIcon,Bi=Kt.getContainer,Ln=Kt.current,Ui=Ln===void 0?0:Ln,lr=Kt.count,Di=lr===void 0?1:lr,Pn=Kt.countRender,Yn=Kt.scaleStep,ui=Yn===void 0?.5:Yn,Ti=Kt.minScale,pi=Ti===void 0?1:Ti,Mi=Kt.maxScale,ir=Mi===void 0?50:Mi,Fi=Kt.transitionName,Wi=Fi===void 0?"zoom":Fi,hr=Kt.maskTransitionName,In=hr===void 0?"fade":hr,zr=Kt.imageRender,On=Kt.imgCommonProps,wr=Kt.toolbarRender,po=Kt.onTransform,Ar=Kt.onChange,To=(0,ce.Z)(Kt,ht),oo=(0,Le.useRef)(),$i=(0,Le.useRef)({deltaX:0,deltaY:0,transformX:0,transformY:0}),Qi=(0,Le.useState)(!1),fr=(0,xe.Z)(Qi,2),Mr=fr[0],fi=fr[1],Tt=(0,Le.useContext)(z),Ir=Tt&&Di>1,ho=Tt&&Di>=1,Zo=We(oo,pi,ir,po),Po=Zo.transform,$o=Zo.resetTransform,Yo=Zo.updateTransform,Sr=Zo.dispatchZoomChange,yr=(0,Le.useState)(!0),qi=(0,xe.Z)(yr,2),Qr=qi[0],_o=qi[1],rr=Po.rotate,ji=Po.scale,Xn=Po.x,er=Po.y,no=be()((0,Se.Z)({},"".concat(Sn,"-moving"),Mr));(0,Le.useEffect)(function(){Qr||_o(!0)},[Qr]);var Lo=function(){$o("close")},ko=function(){Sr(yt+ui,"zoomIn")},Xo=function(){Sr(yt/(yt+ui),"zoomOut")},Ss=function(){Yo({rotate:rr+90},"rotateRight")},os=function(){Yo({rotate:rr-90},"rotateLeft")},Is=function(){Yo({flipX:!Po.flipX},"flipX")},ps=function(){Yo({flipY:!Po.flipY},"flipY")},sa=function(Lr){Lr==null||Lr.preventDefault(),Lr==null||Lr.stopPropagation(),Ui>0&&(_o(!1),$o("prev"),Ar==null||Ar(Ui-1,Ui))},_n=function(Lr){Lr==null||Lr.preventDefault(),Lr==null||Lr.stopPropagation(),Ui<Di-1&&(_o(!1),$o("next"),Ar==null||Ar(Ui+1,Ui))},Cs=function(){if(Un&&Mr){fi(!1);var Lr=$i.current,La=Lr.transformX,Cr=Lr.transformY,to=Xn!==La&&er!==Cr;if(!to)return;var Kr=oo.current.offsetWidth*ji,Ci=oo.current.offsetHeight*ji,us=oo.current.getBoundingClientRect(),Ts=us.left,ba=us.top,Ha=rr%180!==0,Qa=Ne(Ha?Ci:Kr,Ha?Kr:Ci,Ts,ba);Qa&&Yo((0,he.Z)({},Qa),"dragRebound")}},Pu=function(Lr){!An||Lr.button!==0||(Lr.preventDefault(),Lr.stopPropagation(),$i.current={deltaX:Lr.pageX-Po.x,deltaY:Lr.pageY-Po.y,transformX:Po.x,transformY:Po.y},fi(!0))},Na=function(Lr){Un&&Mr&&Yo({x:Lr.pageX-$i.current.deltaX,y:Lr.pageY-$i.current.deltaY},"move")},ma=function(Lr){if(!(!Un||Lr.deltaY==0)){var La=Math.abs(Lr.deltaY/100),Cr=Math.min(La,ut),to=yt+Cr*ui;Lr.deltaY>0&&(to=yt/to),Sr(to,"wheel",Lr.clientX,Lr.clientY)}},gs=function(Lr){!Un||!Ir||(Lr.keyCode===we.Z.LEFT?sa():Lr.keyCode===we.Z.RIGHT&&_n())},su=function(Lr){Un&&(ji!==1?Yo({x:0,y:0,scale:1},"doubleClick"):Sr(yt+ui,"doubleClick",Lr.clientX,Lr.clientY))};(0,Le.useEffect)(function(){var fo,Lr,La,Cr;if(An){La=(0,ye.Z)(window,"mouseup",Cs,!1),Cr=(0,ye.Z)(window,"mousemove",Na,!1);try{window.top!==window.self&&(fo=(0,ye.Z)(window.top,"mouseup",Cs,!1),Lr=(0,ye.Z)(window.top,"mousemove",Na,!1))}catch(to){(0,Ce.Kp)(!1,"[rc-image] ".concat(to))}}return function(){var to,Kr,Ci,us;(to=La)===null||to===void 0||to.remove(),(Kr=Cr)===null||Kr===void 0||Kr.remove(),(Ci=fo)===null||Ci===void 0||Ci.remove(),(us=Lr)===null||us===void 0||us.remove()}},[Un,Mr,Xn,er,rr,An]),(0,Le.useEffect)(function(){var fo=(0,ye.Z)(window,"keydown",gs,!1);return function(){fo.remove()}},[Un,Ir,Ui]);var au=Le.createElement(rt,(0,Pe.Z)({},On,{width:Kt.width,height:Kt.height,imgRef:oo,className:"".concat(Sn,"-img"),alt:Zt,style:{transform:"translate3d(".concat(Po.x,"px, ").concat(Po.y,"px, 0) scale3d(").concat(Po.flipX?"-":"").concat(ji,", ").concat(Po.flipY?"-":"").concat(ji,", 1) rotate(").concat(rr,"deg)"),transitionDuration:!Qr&&"0s"},fallback:rn,src:kn,onWheel:ma,onMouseDown:Pu,onDoubleClick:su}));return Le.createElement(Le.Fragment,null,Le.createElement(le.Z,(0,Pe.Z)({transitionName:Wi,maskTransitionName:In,closable:!1,keyboard:!0,prefixCls:Sn,onClose:Qn,visible:Un,wrapClassName:no,rootClassName:si,getContainer:Bi},To,{afterClose:Lo}),Le.createElement("div",{className:"".concat(Sn,"-img-wrapper")},zr?zr(au,(0,he.Z)({transform:Po},Tt?{current:Ui}:{})):au)),Le.createElement(it,{visible:Un,transform:Po,maskTransitionName:In,closeIcon:Li,getContainer:Bi,prefixCls:Sn,rootClassName:si,icons:Nn,countRender:Pn,showSwitch:Ir,showProgress:ho,current:Ui,count:Di,scale:ji,minScale:pi,maxScale:ir,toolbarRender:wr,onSwitchLeft:sa,onSwitchRight:_n,onZoomIn:ko,onZoomOut:Xo,onRotateRight:Ss,onRotateLeft:os,onFlipX:Is,onFlipY:ps,onClose:Qn}))},St=dt,Et=Ee(26407);function vt(At){var Kt=Le.useState({}),Sn=(0,xe.Z)(Kt,2),kn=Sn[0],Zt=Sn[1],rn=Le.useCallback(function(An,Qn){return Zt(function(Un){return(0,he.Z)((0,he.Z)({},Un),{},(0,Se.Z)({},An,Qn))}),function(){Zt(function(Un){var qn=(0,he.Z)({},Un);return delete qn[An],qn})}},[]),Rn=Le.useMemo(function(){return At?At.map(function(An){if(typeof An=="string")return{data:{src:An}};var Qn={};return Object.keys(An).forEach(function(Un){["src"].concat((0,Et.Z)(ue)).includes(Un)&&(Qn[Un]=An[Un])}),{data:Qn}}):Object.keys(kn).reduce(function(An,Qn){var Un=kn[Qn],qn=Un.canPreview,Nn=Un.data;return qn&&An.push({data:Nn,id:Qn}),An},[])},[At,kn]);return[Rn,rn]}var Bt=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],jt=["src"],ln=function(Kt){var Sn,kn=Kt.previewPrefixCls,Zt=kn===void 0?"rc-image-preview":kn,rn=Kt.children,Rn=Kt.icons,An=Rn===void 0?{}:Rn,Qn=Kt.items,Un=Kt.preview,qn=Kt.fallback,Nn=(0,ge.Z)(Un)==="object"?Un:{},si=Nn.visible,Li=Nn.onVisibleChange,Bi=Nn.getContainer,Ln=Nn.current,Ui=Nn.movable,lr=Nn.minScale,Di=Nn.maxScale,Pn=Nn.countRender,Yn=Nn.closeIcon,ui=Nn.onChange,Ti=Nn.onTransform,pi=Nn.toolbarRender,Mi=Nn.imageRender,ir=(0,ce.Z)(Nn,Bt),Fi=vt(Qn),Wi=(0,xe.Z)(Fi,2),hr=Wi[0],In=Wi[1],zr=(0,de.Z)(0,{value:Ln}),On=(0,xe.Z)(zr,2),wr=On[0],po=On[1],Ar=(0,Le.useState)(!1),To=(0,xe.Z)(Ar,2),oo=To[0],$i=To[1],Qi=((Sn=hr[wr])===null||Sn===void 0?void 0:Sn.data)||{},fr=Qi.src,Mr=(0,ce.Z)(Qi,jt),fi=(0,de.Z)(!!si,{value:si,onChange:function(rr,ji){Li==null||Li(rr,ji,wr)}}),Tt=(0,xe.Z)(fi,2),Ir=Tt[0],ho=Tt[1],Zo=(0,Le.useState)(null),Po=(0,xe.Z)(Zo,2),$o=Po[0],Yo=Po[1],Sr=Le.useCallback(function(_o,rr,ji){var Xn=hr.findIndex(function(er){return er.id===_o});ho(!0),Yo({x:rr,y:ji}),po(Xn<0?0:Xn),$i(!0)},[hr]);Le.useEffect(function(){Ir?oo||po(0):$i(!1)},[Ir]);var yr=function(rr,ji){po(rr),ui==null||ui(rr,ji)},qi=function(){ho(!1),Yo(null)},Qr=Le.useMemo(function(){return{register:In,onPreview:Sr}},[In,Sr]);return Le.createElement(z.Provider,{value:Qr},rn,Le.createElement(St,(0,Pe.Z)({"aria-hidden":!Ir,movable:Ui,visible:Ir,prefixCls:Zt,closeIcon:Yn,onClose:qi,mousePosition:$o,imgCommonProps:Mr,src:fr,fallback:qn,icons:An,minScale:lr,maxScale:Di,getContainer:Bi,current:wr,count:hr.length,countRender:Pn,onTransform:Ti,toolbarRender:pi,imageRender:Mi,onChange:yr},ir)))},$t=ln,yn=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],Ut=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],Wt=function(Kt){var Sn=Kt.src,kn=Kt.alt,Zt=Kt.onPreviewClose,rn=Kt.prefixCls,Rn=rn===void 0?"rc-image":rn,An=Kt.previewPrefixCls,Qn=An===void 0?"".concat(Rn,"-preview"):An,Un=Kt.placeholder,qn=Kt.fallback,Nn=Kt.width,si=Kt.height,Li=Kt.style,Bi=Kt.preview,Ln=Bi===void 0?!0:Bi,Ui=Kt.className,lr=Kt.onClick,Di=Kt.onError,Pn=Kt.wrapperClassName,Yn=Kt.wrapperStyle,ui=Kt.rootClassName,Ti=(0,ce.Z)(Kt,yn),pi=Un&&Un!==!0,Mi=(0,ge.Z)(Ln)==="object"?Ln:{},ir=Mi.src,Fi=Mi.visible,Wi=Fi===void 0?void 0:Fi,hr=Mi.onVisibleChange,In=hr===void 0?Zt:hr,zr=Mi.getContainer,On=zr===void 0?void 0:zr,wr=Mi.mask,po=Mi.maskClassName,Ar=Mi.movable,To=Mi.icons,oo=Mi.scaleStep,$i=Mi.minScale,Qi=Mi.maxScale,fr=Mi.imageRender,Mr=Mi.toolbarRender,fi=(0,ce.Z)(Mi,Ut),Tt=ir!=null?ir:Sn,Ir=(0,de.Z)(!!Wi,{value:Wi,onChange:In}),ho=(0,xe.Z)(Ir,2),Zo=ho[0],Po=ho[1],$o=se({src:Sn,isCustomPlaceholder:pi,fallback:qn}),Yo=(0,xe.Z)($o,3),Sr=Yo[0],yr=Yo[1],qi=Yo[2],Qr=(0,Le.useState)(null),_o=(0,xe.Z)(Qr,2),rr=_o[0],ji=_o[1],Xn=(0,Le.useContext)(z),er=!!Ln,no=function(){Po(!1),ji(null)},Lo=be()(Rn,Pn,ui,(0,Se.Z)({},"".concat(Rn,"-error"),qi==="error")),ko=(0,Le.useMemo)(function(){var Is={};return ue.forEach(function(ps){Kt[ps]!==void 0&&(Is[ps]=Kt[ps])}),Is},ue.map(function(Is){return Kt[Is]})),Xo=(0,Le.useMemo)(function(){return(0,he.Z)((0,he.Z)({},ko),{},{src:Tt})},[Tt,ko]),Ss=oe(er,Xo),os=function(ps){var sa=(0,ve.os)(ps.target),_n=sa.left,Cs=sa.top;Xn?Xn.onPreview(Ss,_n,Cs):(ji({x:_n,y:Cs}),Po(!0)),lr==null||lr(ps)};return Le.createElement(Le.Fragment,null,Le.createElement("div",(0,Pe.Z)({},Ti,{className:Lo,onClick:er?os:lr,style:(0,he.Z)({width:Nn,height:si},Yn)}),Le.createElement("img",(0,Pe.Z)({},ko,{className:be()("".concat(Rn,"-img"),(0,Se.Z)({},"".concat(Rn,"-img-placeholder"),Un===!0),Ui),style:(0,he.Z)({height:si},Li),ref:Sr},yr,{width:Nn,height:si,onError:Di})),qi==="loading"&&Le.createElement("div",{"aria-hidden":"true",className:"".concat(Rn,"-placeholder")},Un),wr&&er&&Le.createElement("div",{className:be()("".concat(Rn,"-mask"),po),style:{display:(Li==null?void 0:Li.display)==="none"?"none":void 0}},wr)),!Xn&&er&&Le.createElement(St,(0,Pe.Z)({"aria-hidden":!Zo,visible:Zo,prefixCls:Qn,onClose:no,mousePosition:rr,src:Tt,alt:kn,fallback:qn,getContainer:On,icons:To,movable:Ar,scaleStep:oo,minScale:$i,maxScale:Qi,rootClassName:ui,imageRender:fr,imgCommonProps:ko,toolbarRender:Mr},fi)))};Wt.PreviewGroup=$t,Wt.displayName="Image";var Xt=Wt,mt=Xt,ze=Ee(62892),Be=Ee(36355),et=Ee(31724),qe=Ee(99267),Ue=Ee(33853),Xe=Ee(38819),Re={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"},Ae=Re,Ge=Ee(7657),Ke=function(Kt,Sn){return Le.createElement(Ge.Z,(0,Pe.Z)({},Kt,{ref:Sn,icon:Ae}))},Ze=Le.forwardRef(Ke),at=Ze,xt={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"},tn=xt,nn=function(Kt,Sn){return Le.createElement(Ge.Z,(0,Pe.Z)({},Kt,{ref:Sn,icon:tn}))},Jt=Le.forwardRef(nn),pn=Jt,Mn={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"},hn=Mn,En=function(Kt,Sn){return Le.createElement(Ge.Z,(0,Pe.Z)({},Kt,{ref:Sn,icon:hn}))},Wn=Le.forwardRef(En),Tn=Wn,ci={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"},ri=ci,Ii=function(Kt,Sn){return Le.createElement(Ge.Z,(0,Pe.Z)({},Kt,{ref:Sn,icon:ri}))},bi=Le.forwardRef(Ii),nr=bi,Ji={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"},gr=Ji,cr=function(Kt,Sn){return Le.createElement(Ge.Z,(0,Pe.Z)({},Kt,{ref:Sn,icon:gr}))},eo=Le.forwardRef(cr),ro=eo,hi=Ee(64993),Pr=Ee(73819),Hi=Ee(17313),st=Ee(29878),Rr=Ee(1950),Er=Ee(83116),yo=Ee(37613);const Zr=At=>({position:At||"absolute",inset:0}),ao=At=>{const{iconCls:Kt,motionDurationSlow:Sn,paddingXXS:kn,marginXXS:Zt,prefixCls:rn,colorTextLightSolid:Rn}=At;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:Rn,background:new hi.C("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${Sn}`,[`.${rn}-mask-info`]:Object.assign(Object.assign({},Hi.vS),{padding:`0 ${kn}px`,[Kt]:{marginInlineEnd:Zt,svg:{verticalAlign:"baseline"}}})}},Jr=At=>{const{previewCls:Kt,modalMaskBg:Sn,paddingSM:kn,marginXL:Zt,margin:rn,paddingLG:Rn,previewOperationColorDisabled:An,previewOperationHoverColor:Qn,motionDurationSlow:Un,iconCls:qn,colorTextLightSolid:Nn}=At,si=new hi.C(Sn).setAlpha(.1),Li=si.clone().setAlpha(.2);return{[`${Kt}-footer`]:{position:"fixed",bottom:Zt,left:{_skip_check_:!0,value:0},width:"100%",display:"flex",flexDirection:"column",alignItems:"center",color:At.previewOperationColor},[`${Kt}-progress`]:{marginBottom:rn},[`${Kt}-close`]:{position:"fixed",top:Zt,right:{_skip_check_:!0,value:Zt},display:"flex",color:Nn,backgroundColor:si.toRgbString(),borderRadius:"50%",padding:kn,outline:0,border:0,cursor:"pointer",transition:`all ${Un}`,"&:hover":{backgroundColor:Li.toRgbString()},[`& > ${qn}`]:{fontSize:At.previewOperationSize}},[`${Kt}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${Rn}px`,backgroundColor:si.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:kn,padding:kn,cursor:"pointer",transition:`all ${Un}`,userSelect:"none",[`&:not(${Kt}-operations-operation-disabled):hover > ${qn}`]:{color:Qn},"&-disabled":{color:An,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${qn}`]:{fontSize:At.previewOperationSize}}}}},lo=At=>{const{modalMaskBg:Kt,iconCls:Sn,previewOperationColorDisabled:kn,previewCls:Zt,zIndexPopup:rn,motionDurationSlow:Rn}=At,An=new hi.C(Kt).setAlpha(.1),Qn=An.clone().setAlpha(.2);return{[`${Zt}-switch-left, ${Zt}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:rn+1,display:"flex",alignItems:"center",justifyContent:"center",width:At.imagePreviewSwitchSize,height:At.imagePreviewSwitchSize,marginTop:-At.imagePreviewSwitchSize/2,color:At.previewOperationColor,background:An.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${Rn}`,userSelect:"none","&:hover":{background:Qn.toRgbString()},"&-disabled":{"&, &:hover":{color:kn,background:"transparent",cursor:"not-allowed",[`> ${Sn}`]:{cursor:"not-allowed"}}},[`> ${Sn}`]:{fontSize:At.previewOperationSize}},[`${Zt}-switch-left`]:{insetInlineStart:At.marginSM},[`${Zt}-switch-right`]:{insetInlineEnd:At.marginSM}}},oi=At=>{const{motionEaseOut:Kt,previewCls:Sn,motionDurationSlow:kn,componentCls:Zt}=At;return[{[`${Zt}-preview-root`]:{[Sn]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${Sn}-body`]:Object.assign(Object.assign({},Zr()),{overflow:"hidden"}),[`${Sn}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${kn} ${Kt} 0s`,userSelect:"none","&-wrapper":Object.assign(Object.assign({},Zr()),{transition:`transform ${kn} ${Kt} 0s`,display:"flex",justifyContent:"center",alignItems:"center","& > *":{pointerEvents:"auto"},"&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${Sn}-moving`]:{[`${Sn}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${Zt}-preview-root`]:{[`${Sn}-wrap`]:{zIndex:At.zIndexPopup}}},{[`${Zt}-preview-operations-wrapper`]:{position:"fixed",zIndex:At.zIndexPopup+1},"&":[Jr(At),lo(At)]}]},$e=At=>{const{componentCls:Kt}=At;return{[Kt]:{position:"relative",display:"inline-block",[`${Kt}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${Kt}-img-placeholder`]:{backgroundColor:At.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${Kt}-mask`]:Object.assign({},ao(At)),[`${Kt}-mask:hover`]:{opacity:1},[`${Kt}-placeholder`]:Object.assign({},Zr())}}},nt=At=>{const{previewCls:Kt}=At;return{[`${Kt}-root`]:(0,st._y)(At,"zoom"),"&":(0,Rr.J$)(At,!0)}};var Je=(0,Er.Z)("Image",At=>{const Kt=`${At.componentCls}-preview`,Sn=(0,yo.TS)(At,{previewCls:Kt,modalMaskBg:new hi.C("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:At.controlHeightLG});return[$e(Sn),oi(Sn),(0,Pr.QA)((0,yo.TS)(Sn,{componentCls:Kt})),nt(Sn)]},At=>({zIndexPopup:At.zIndexPopupBase+80,previewOperationColor:new hi.C(At.colorTextLightSolid).setAlpha(.65).toRgbString(),previewOperationHoverColor:new hi.C(At.colorTextLightSolid).setAlpha(.85).toRgbString(),previewOperationColorDisabled:new hi.C(At.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:At.fontSizeIcon*1.5})),wt=function(At,Kt){var Sn={};for(var kn in At)Object.prototype.hasOwnProperty.call(At,kn)&&Kt.indexOf(kn)<0&&(Sn[kn]=At[kn]);if(At!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Zt=0,kn=Object.getOwnPropertySymbols(At);Zt<kn.length;Zt++)Kt.indexOf(kn[Zt])<0&&Object.prototype.propertyIsEnumerable.call(At,kn[Zt])&&(Sn[kn[Zt]]=At[kn[Zt]]);return Sn};const Nt={rotateLeft:Le.createElement(at,null),rotateRight:Le.createElement(pn,null),zoomIn:Le.createElement(nr,null),zoomOut:Le.createElement(ro,null),close:Le.createElement(qe.Z,null),left:Le.createElement(Ue.Z,null),right:Le.createElement(Xe.Z,null),flipX:Le.createElement(Tn,null),flipY:Le.createElement(Tn,{rotate:90})};var _t=At=>{var{previewPrefixCls:Kt,preview:Sn}=At,kn=wt(At,["previewPrefixCls","preview"]);const{getPrefixCls:Zt}=Le.useContext(Be.E_),rn=Zt("image",Kt),Rn=`${rn}-preview`,An=Zt(),[Qn,Un]=Je(rn),qn=Le.useMemo(()=>{var Nn;if(Sn===!1)return Sn;const si=typeof Sn=="object"?Sn:{},Li=be()(Un,(Nn=si.rootClassName)!==null&&Nn!==void 0?Nn:"");return Object.assign(Object.assign({},si),{transitionName:(0,ze.m)(An,"zoom",si.transitionName),maskTransitionName:(0,ze.m)(An,"fade",si.maskTransitionName),rootClassName:Li})},[Sn]);return Qn(Le.createElement(mt.PreviewGroup,Object.assign({preview:qn,previewPrefixCls:Rn,icons:Nt},kn)))},un=function(At,Kt){var Sn={};for(var kn in At)Object.prototype.hasOwnProperty.call(At,kn)&&Kt.indexOf(kn)<0&&(Sn[kn]=At[kn]);if(At!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Zt=0,kn=Object.getOwnPropertySymbols(At);Zt<kn.length;Zt++)Kt.indexOf(kn[Zt])<0&&Object.prototype.propertyIsEnumerable.call(At,kn[Zt])&&(Sn[kn[Zt]]=At[kn[Zt]]);return Sn};const wn=At=>{const{prefixCls:Kt,preview:Sn,className:kn,rootClassName:Zt,style:rn}=At,Rn=un(At,["prefixCls","preview","className","rootClassName","style"]),{getPrefixCls:An,locale:Qn=et.Z,getPopupContainer:Un,image:qn}=Le.useContext(Be.E_),Nn=An("image",Kt),si=An(),Li=Qn.Image||et.Z.Image,[Bi,Ln]=Je(Nn),Ui=be()(Zt,Ln),lr=be()(kn,Ln,qn==null?void 0:qn.className),Di=Le.useMemo(()=>{if(Sn===!1)return Sn;const Yn=typeof Sn=="object"?Sn:{},{getContainer:ui}=Yn,Ti=un(Yn,["getContainer"]);return Object.assign(Object.assign({mask:Le.createElement("div",{className:`${Nn}-mask-info`},Le.createElement(Ie.Z,null),Li==null?void 0:Li.preview),icons:Nt},Ti),{getContainer:ui||Un,transitionName:(0,ze.m)(si,"zoom",Yn.transitionName),maskTransitionName:(0,ze.m)(si,"fade",Yn.maskTransitionName)})},[Sn,Li]),Pn=Object.assign(Object.assign({},qn==null?void 0:qn.style),rn);return Bi(Le.createElement(mt,Object.assign({prefixCls:Nn,preview:Di,rootClassName:Ui,className:lr,style:Pn},Rn)))};wn.PreviewGroup=_t;var Bn=wn,zn=()=>{const[At,Kt]=(0,Le.useState)(""),[Sn,kn]=(0,Le.useState)(0);let[Zt,rn]=(0,Le.useState)(),[Rn,An]=(0,Le.useState)();const[Qn,Un]=(0,Le.useState)(!1),qn=(0,Le.useRef)("");(0,Le.useEffect)(()=>me.Z.subscribe("preview-image",ui=>{Kt(ui),console.log(Di.current),document.body.style.overflow="hidden"}),[]),(0,Le.useEffect)(()=>(document.addEventListener("keydown",Nn),()=>{document.removeEventListener("keydown",Nn)}),[]),(0,Le.useEffect)(()=>{qn.current=At},[At]);function Nn(Yn){Yn.keyCode==27&&qn.current&&si()}function si(){document.body.style.overflow="auto",rn(void 0),An(void 0),kn(0),Kt("")}function Li(){kn(Sn+90)}function Bi(){Zt=Di.current.width*1.1,Rn=Di.current.height*1.1,An(Rn),rn(Zt)}function Ln(){Zt=Di.current.width/1.1,Rn=Di.current.height/1.1,An(Rn),rn(Zt)}const Ui=(0,Le.useRef)(),lr=(0,Le.useRef)(),Di=(0,Le.useRef)(),Pn=Yn=>{(Yn.nativeEvent.target===Ui.current||Yn.nativeEvent.target===lr.current)&&si()};return Le.createElement(Le.Fragment,null,At?Le.createElement("div",null,Le.createElement("div",{className:"preview-wrp-group",ref:lr},Le.createElement(Bn,{className:"image-preview",src:At,style:{display:"none"},preview:{visible:!0,src:At,movable:!1,onVisibleChange:Yn=>{Kt("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},73278:function(bn,qt,Ee){"use strict";Ee.d(qt,{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(78780),Se=Ee(19136),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"]};qt.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 We=function(gt){const ct=gt.getValue();Ce&&Ce(ct)};return Ve.on("change",We),()=>{Ve.off("change",We)}}},[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 We=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(We)}},[je.current,Ve]),Le.createElement("div",{className:"my-codemirror-container"},Le.createElement("textarea",{ref:je}))}},64726:function(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return oi}});var Le=Ee(59301),me=Ee(89780),Ie=Ee.n(me),Te=Ee(76374),be=Ee(78780),Pe=Ee(6313),he=Ee(25717),Se=Ee(99498),xe=Ee(25419),ge=Ee(67549),ce=Ee(99325),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 _t(){$e(wt)}return de.createElement("a",{title:nt,className:Nt,onClick:_t},de.createElement("i",{className:`${Je}`}),kt)}var Ne=({watch:$e,showNullButton:nt,showNullProgramButton:Je,onActionCallback:wt,fullScreen:Nt,insertTemp:kt,hidetoolBar:_t,extraUse:un})=>{const wn=[...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"},!_t&&wn.map((Bn,zn)=>de.createElement("li",{key:zn},Bn.actionName?de.createElement(ke,we(ye({},Bn),{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"))),un&&de.createElement("li",null,un),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(19647),Ve=Ee(78241),Qe=Ee(92832),We=Ee(3113),gt=Object.defineProperty,ct=Object.defineProperties,Ct=Object.getOwnPropertyDescriptors,it=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,Ft=($e,nt,Je)=>nt in $e?gt($e,nt,{enumerable:!0,configurable:!0,writable:!0,value:Je}):$e[nt]=Je,ht=($e,nt)=>{for(var Je in nt||(nt={}))yt.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 St=({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(We.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Le.createElement(We.ZP,{type:"ghost",onClick:nt},"\u53D6\u6D88")))},Et=Ee(73278),vt=Ee(56030),Bt=Ee(43418),jt=Ee(95237),ln=Ee(14573),$t=Ee(59301),yn=({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 $t.createElement(Bt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},$t.createElement(jt.Z,{style:{height:"100vh"}},$t.createElement(ln.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(un){un instanceof go.Link||Je.push(un)});for(var wt=0;wt<Je.length-1;wt++){var Nt=Je[wt],kt=Nt.actualBounds.y+Nt.actualBounds.height+$e,_t=Je[wt+1];_t.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(un){un instanceof go.Link||Je.push(un)});for(var wt=0;wt<Je.length-1;wt++){var Nt=Je[wt],kt=Nt.actualBounds.x+Nt.actualBounds.width+$e,_t=Je[wt+1];_t.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,_t=0;_t<wt.length;_t++){var un=wt[_t];if(un!==nt&&un.canSelect()){var wn=un.actualBounds.center,Bn=Je.directionPoint(wn),zn=this._angleCloseness(Bn,$e);if(zn<=45){var At=Je.distanceSquaredPoint(wn);At*=1+Math.sin(zn*Math.PI/180),At<Nt&&(Nt=At,kt=un)}}}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),_t=kt.indexOf(nt);if(_t>0){for(var un=kt.elt(_t-1);un!==null&&un.isTreeExpanded&&!un.isTreeLeaf;){var wn=this._sortTreeChildrenByY(un);un=wn.last()}un!==null&&$e.select(un)}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),_t=kt.indexOf(nt);if(_t<kt.length-1){$e.select(kt.elt(_t+1));break}else nt=Nt}var Bn=$e.selection.first();Bn!==null&&$e.scrollToRect(Bn.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 Xt=Wt,mt=Ee(29277),ze=Ee(43604),Be=Ee(7660),et={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},qe=Ee(73898),Ue=Ee(59301),Xe=($e,nt,Je)=>new Promise((wt,Nt)=>{var kt=wn=>{try{un(Je.next(wn))}catch(Bn){Nt(Bn)}},_t=wn=>{try{un(Je.throw(wn))}catch(Bn){Nt(Bn)}},un=wn=>wn.done?wt(wn.value):Promise.resolve(wn.value).then(kt,_t);un((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 _t=(0,Le.useRef)(!1),[un,wn]=(0,Le.useState)(0);function Bn(){const At=Ut.bx.make,Kt={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:Yn=>{var ui=Yn.diagram.commandHandler.addTopLevelParts(Yn.diagram.selection,!0);ui||Yn.diagram.currentTool.doCancel()},commandHandler:At(Xt),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Yn=>{var ui=Yn.subject;ui.location=ui.location.copy().snapToGridPoint(Yn.diagram.grid.gridOrigin,Yn.diagram.grid.gridCellSize),setTimeout(()=>{Yn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Yn=>{var ui=Yn.subject;setTimeout(()=>{Yn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Yn=>{var ui=Yn.parameter.part;ui.invalidateConnectedLinks();var Ti=Yn.subject;Yn.diagram.toolManager.linkingTool.isForwards?Ti.toNode.invalidateConnectedLinks():Ti.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:Kt.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 Sn(Yn,ui){var Ti=(pi,Mi)=>{pi.handled=!0,pi.diagram.model.commit(ir=>{var Fi=Mi.part.adornedPart,Wi=new Ut.E9().setRectSpot(Fi.actualBounds,Yn);Wi.subtract(Fi.location),Wi.scale(2,2),Wi.x+=Math.sign(Wi.x)*130,Wi.y+=Math.sign(Wi.y)*130,Wi.add(Fi.location),Wi.snapToGridPoint(pi.diagram.grid.gridOrigin,pi.diagram.grid.gridCellSize);var hr=ir.copyNodeData(Fi.data);ir.setGroupKeyForNodeData(hr,ir.getGroupKeyForNodeData(Fi.data)),ir.addNodeData(hr);var In={from:Fi.key,to:ir.getKeyForNodeData(hr)};ir.addLinkData(In);var zr=pi.diagram.findNodeForData(hr);zr.location=Wi,pi.diagram.select(zr),setTimeout(()=>{pi.diagram.commandHandler.editTextBlock()},20)})};return At(Ut.bn,{figure:ui,alignment:Yn,alignmentFocus:Yn.opposite(),width:Yn.equals(Ut.z6.Top)||Yn.equals(Ut.z6.Bottom)?25:18,height:Yn.equals(Ut.z6.Top)||Yn.equals(Ut.z6.Bottom)?18:25,fill:"orange",stroke:Kt.white,strokeWidth:4,mouseEnter:(pi,Mi)=>Mi.fill="dodgerblue",mouseLeave:(pi,Mi)=>Mi.fill="orange",isActionable:!0,click:Ti,contextClick:Ti})}function kn(Yn){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,Ti)=>Ti.fill="dodgerblue",mouseLeave:(ui,Ti)=>Ti.fill="orange",click:(ui,Ti)=>{ui.diagram.commandHandler.showContextMenu(Ti.part.adornedPart)}},Yn||{})}Je.current.nodeTemplate.selectionAdornmentTemplate=At(Ut.uz,"Spot",At(Ut.Vm,{padding:10}),Sn(Ut.z6.Top,"TriangleUp"),Sn(Ut.z6.Left,"TriangleLeft"),Sn(Ut.z6.Right,"TriangleRight"),Sn(Ut.z6.Bottom,"TriangleDown"),kn({alignment:new Ut.z6(.75,0)}));function Zt(Yn,ui){return(Ti,pi)=>{Ti.handled=!0,Ti.diagram.model.commit(Mi=>{Mi.set(pi.part.adornedPart.data,Yn,ui)})}}function rn(Yn,ui){return ui||(ui="color"),At(Ut.bn,{width:16,height:16,stroke:"lightgray",fill:Yn,margin:1,background:"transparent",mouseEnter:(Ti,pi)=>pi.stroke="dodgerblue",mouseLeave:(Ti,pi)=>pi.stroke="lightgray",click:Zt(ui,Yn),contextClick:Zt(ui,Yn)})}function Rn(){return[At("ContextMenuButton",At(Ut.s_,"Horizontal",rn(Kt.white,"fill"),rn(Kt.beige,"fill"),rn(Kt.extralightblue,"fill"),rn(Kt.extralightred,"fill"))),At("ContextMenuButton",At(Ut.s_,"Horizontal",rn(Kt.lightgray,"fill"),rn(Kt.lightgreen,"fill"),rn(Kt.lightblue,"fill"),rn(Kt.lightred,"fill")))]}function An(){return[At("ContextMenuButton",At(Ut.s_,"Horizontal",rn(Kt.black),rn(Kt.green),rn(Kt.blue),rn(Kt.red))),At("ContextMenuButton",At(Ut.s_,"Horizontal",rn(Kt.white),rn(Kt.magenta),rn(Kt.purple),rn(Kt.orange)))]}function Qn(Yn,ui){return ui||(ui="thickness"),At(Ut.bn,"LineH",{width:16,height:16,strokeWidth:Yn,margin:1,background:"transparent",mouseEnter:(Ti,pi)=>pi.background="dodgerblue",mouseLeave:(Ti,pi)=>pi.background="transparent",click:Zt(ui,Yn),contextClick:Zt(ui,Yn)})}function Un(Yn,ui){return ui||(ui="dash"),At(Ut.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Yn,margin:1,background:"transparent",mouseEnter:(Ti,pi)=>pi.background="dodgerblue",mouseLeave:(Ti,pi)=>pi.background="transparent",click:Zt(ui,Yn),contextClick:Zt(ui,Yn)})}function qn(){return[At("ContextMenuButton",At(Ut.s_,"Horizontal",Qn(1),Qn(2),Qn(3),Qn(4))),At("ContextMenuButton",At(Ut.s_,"Horizontal",Un(null),Un([2,4]),Un([4,4])))]}function Nn(Yn,ui){return ui||(ui="figure"),At(Ut.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Yn,margin:1,background:"transparent",mouseEnter:(Ti,pi)=>pi.fill="dodgerblue",mouseLeave:(Ti,pi)=>pi.fill="lightgray",click:Zt(ui,Yn),contextClick:Zt(ui,Yn)})}Je.current.nodeTemplate.contextMenu=At("ContextMenu",At("ContextMenuButton",At(Ut.s_,"Horizontal",Nn("Rectangle"),Nn("RoundedRectangle"),Nn("Ellipse"),Nn("Diamond"))),At("ContextMenuButton",At(Ut.s_,"Horizontal",Nn("Parallelogram2"),Nn("ManualOperation"),Nn("Procedure"),Nn("Cylinder1"))),At("ContextMenuButton",At(Ut.s_,"Horizontal",Nn("Terminator"),Nn("CreateRequest"),Nn("Document"),Nn("TriangleDown"))),Rn(),An(),qn()),Je.current.groupTemplate=At(Ut.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Ut.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Yn,ui)=>{var Ti=ui.addMembers(ui.diagram.selection,!0);Ti||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:Kt.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})),kn({alignment:Ut.z6.TopRight,alignmentFocus:Ut.z6.BottomRight})),Je.current.groupTemplate.contextMenu=At("ContextMenu",Rn(),An(),qn()),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",Yn=>Yn>=1?10:0),new Ut.KX("toShortLength","dir",Yn=>Yn>=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",Yn=>Yn===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",Yn=>Yn>=1),new Ut.KX("width","thickness",Yn=>7+3*Yn),new Ut.KX("height","thickness",Yn=>7+3*Yn),new Ut.KX("segmentOffset","thickness",Yn=>new Ut.E9(-15,4+1.5*Yn))),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",Yn=>Yn===2),new Ut.KX("width","thickness",Yn=>7+3*Yn),new Ut.KX("height","thickness",Yn=>7+3*Yn),new Ut.KX("segmentOffset","thickness",Yn=>new Ut.E9(-15,4+1.5*Yn))),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:si(2)},new Ut.KX("pathPattern","thickness",si)),kn({alignmentFocus:new Ut.z6(0,0,-6,-4)}));function si(Yn){return At(Ut.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Yn+4).toString()+" H3"})}function Li(Yn){var ui="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Yn===0?ui="M0 0 M16 16 M0 8 L16 8":Yn===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:(Ti,pi)=>pi.background="dodgerblue",mouseLeave:(Ti,pi)=>pi.background="transparent",click:Zt("dir",Yn),contextClick:Zt("dir",Yn)})}function Bi(Yn){var ui=(Ti,pi)=>{Ti.handled=!0,Ti.diagram.model.commit(Mi=>{var ir=pi.part.adornedPart;Mi.set(ir.data,Yn?"toSpot":"fromSpot",Ut.z6.stringify(Ut.z6.AllSides)),(Yn?ir.toNode:ir.fromNode).invalidateConnectedLinks()})};return At(Ut.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Ti,pi)=>pi.background="dodgerblue",mouseLeave:(Ti,pi)=>pi.background="transparent",click:ui,contextClick:ui})}function Ln(Yn,ui){var Ti=0,pi=Ut.z6.RightSide;Yn.equals(Ut.z6.Top)?(Ti=270,pi=Ut.z6.TopSide):Yn.equals(Ut.z6.Left)?(Ti=180,pi=Ut.z6.LeftSide):Yn.equals(Ut.z6.Bottom)&&(Ti=90,pi=Ut.z6.BottomSide),ui||(Ti-=180);var Mi=(ir,Fi)=>{ir.handled=!0,ir.diagram.model.commit(Wi=>{var hr=Fi.part.adornedPart;Wi.set(hr.data,ui?"toSpot":"fromSpot",Ut.z6.stringify(pi)),(ui?hr.toNode:hr.fromNode).invalidateConnectedLinks()})};return At(Ut.bn,{alignment:Yn,alignmentFocus:Yn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Ti,background:"transparent",mouseEnter:(ir,Fi)=>Fi.background="dodgerblue",mouseLeave:(ir,Fi)=>Fi.background="transparent",click:Mi,contextClick:Mi})}Je.current.linkTemplate.contextMenu=At("ContextMenu",An(),qn(),At("ContextMenuButton",At(Ut.s_,"Horizontal",Li(0),Li(1),Li(2))),At("ContextMenuButton",At(Ut.s_,"Horizontal",At(Ut.s_,"Spot",Bi(!1),Ln(Ut.z6.Top,!1),Ln(Ut.z6.Left,!1),Ln(Ut.z6.Right,!1),Ln(Ut.z6.Bottom,!1)),At(Ut.s_,"Spot",{margin:new Ut.Zt(0,0,0,2)},Bi(!0),Ln(Ut.z6.Top,!0),Ln(Ut.z6.Left,!0),Ln(Ut.z6.Right,!0),Ln(Ut.z6.Bottom,!0)))));const Ui=`{ "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 lr=["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 Di(Yn){return console.log("shapeName:",Yn),lr.indexOf(Yn)>=0}var Pn=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(Yn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Yn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Je.current.addDiagramListener("TextEdited",function(Yn){var ui;const Ti=Yn.subject.part;var pi=(ui=document.activeElement)==null?void 0:ui.value;typeof pi=="string"&&pi.trim()===""&&Je.current.model.commit(function(Mi){Mi.set(Ti.data,"text","\u672A\u547D\u540D"),Je.current.commandHandler.stopCommand()},"increment")}),Pn.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 zn=()=>Xe(this,null,function*(){var At,Kt=Je.current.makeImage();const Sn=yield(0,Be.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Kt.src,file_data:JSON.stringify({login:(At=(0,qe.eY)())==null?void 0:At.login,data:JSON.parse(Je.current.model.toJson())})}});nt({src:Sn.url})});return(0,Le.useEffect)(()=>(setTimeout(()=>{Bn()},500),wn(un+1),()=>{Je.current=null}),[]),Ue.createElement("div",{ref:_t,className:kt.current?`${et.maxH60} body-overflow-initial`:"body-overflow-initial"},Ue.createElement(Bt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!un,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Ue.createElement(jt.Z,null,Ue.createElement(ze.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Ue.createElement(ze.Z,{onClick:()=>{var At,Kt,Sn=Je.current.selection.first();if(kt.current=!kt.current,document.activeElement&&Sn){let kn=(Kt=(At=document.activeElement)==null?void 0:At.value)==null?void 0:Kt.trim();typeof kn=="string"&&Je.current.model.commit(function(Zt){Zt.set(Sn.data,"text",kn||"\u672A\u547D\u540D"),Je.current.commandHandler.stopCommand()},"increment")}wn(un+1)}},Ue.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:$e},Ue.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:et.flowChartWrp},Ue.createElement("div",{style:{display:"flex",height:"100%"}},Ue.createElement("div",{style:{width:"300px",height:"100%"}},Ue.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Ue.createElement("div",{style:{height:"calc(100% - 50px)"},className:et.myPaletteDiv,ref:Nt})),Ue.createElement("div",{style:{flex:1,position:"relative"}},Ue.createElement("div",{ref:wt,style:{height:"80vh"}}))),Ue.createElement("div",{className:"tr"},Ue.createElement(We.ZP,{size:"large",onClick:zn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Ae=Re,Ge=Ee(5112),Ke=Ee(5871);const Ze=Ge.ZP.Group,at={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:at},"\u5355\u5143\u683C\u6570\uFF1A"),Le.createElement("span",{style:at},"\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:at},"\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:at},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Le.createElement(Ve.default.Item,{name:"align"},Le.createElement(Ze,null,Le.createElement(Ge.ZP,{value:"default"},Le.createElement("i",{className:"fa fa-align-justify"})),Le.createElement(Ge.ZP,{value:"left"},Le.createElement("i",{className:"fa fa-align-left"})),Le.createElement(Ge.ZP,{value:"center"},Le.createElement("i",{className:"fa fa-align-center"})),Le.createElement(Ge.ZP,{value:"right"},Le.createElement("i",{className:"fa fa-align-right"}))))),Le.createElement("div",{className:"flex-container flex-end"},Le.createElement(We.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Le.createElement(We.ZP,{type:"ghost",onClick:nt},"\u53D6\u6D88")))},tn=Ee(78673),nn=Ee(5559),Jt=Ee.n(nn),Mn=(0,Le.forwardRef)(({use3d:$e,width:nt,height:Je,callback:wt,showSaveButton:Nt},kt)=>{const _t=(0,Le.useRef)(),un=(0,Le.useRef)(),[wn,Bn]=(0,Le.useState)(!1),zn=(0,Le.useRef)({id:_t,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)(()=>{un.current=new(Jt())(zn.current,!0),window.onload=function(){un.current.inject("applet_container")}},[]);const At=()=>{var Kt=window.ggbApplet.getPNGBase64(1,!0,72);return wt&&wt(Kt),Kt};return(0,Le.useEffect)(()=>{zn.current.appName=wn?"3D":"graphing",un.current.inject("applet_container")},[wn]),(0,Le.useEffect)(()=>{Bn($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:_t}),Le.createElement(jt.Z,{align:"middle"},Le.createElement(ze.Z,{flex:1},Le.createElement(tn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:wn,onChange:Kt=>Bn(Kt)})),Le.createElement(ze.Z,null,Le.createElement(We.ZP,{size:"large",onClick:At,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),hn=Ee(46531),En=Ee(8591);const Wn="link",Tn="upload-image",ci="add-flowchart",ri="draw-image",Ii="add-flowchart",bi="code-block",nr="add-table",Ji="------------",gr={default:Ji,left:`:${Ji}`,center:`:${Ji}:`,right:`${Ji}:`};var cr=Ee(50505);function eo(){}let ro=0;const hi=1e4,Pr="\u2581",Hi="@\u2581\u2581@",st="@\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`,Er=["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 yo($e){return/^\d+$/.test($e)?`${$e}px`:$e}const ao=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Jr={[ao+"-B"]:"bold",[ao+"-I"]:"italic"},lo={[Wn]:"\u6DFB\u52A0\u94FE\u63A5",[bi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Tn]:"\u6DFB\u52A0\u56FE\u7247",[ri]:"\u6DFB\u52A0\u753B\u56FE",[ci]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[nr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var oi=({defaultValue:$e="",onChange:nt,width:Je="100%",height:wt=400,miniToolbar:Nt=!1,isFocus:kt=!1,watch:_t,insertTemp:un,mode:wn="markdown",id:Bn="markdown-editor-id",showResizeBar:zn=!1,noStorage:At=!1,showNullButton:Kt=!1,showNullProgramButton:Sn=!1,hidetoolBar:kn=!1,fullScreen:Zt=!1,onBlur:rn,onCMBeforeChange:Rn,onFullScreen:An,className:Qn="",disablePaste:Un=!1,disabled:qn=!1,disabledFill:Nn=!1,placeholder:si="",values:Li="",extraUse:Bi})=>{const[Ln,Ui]=(0,Le.useState)(null),[lr,Di]=(0,Le.useState)($e),[Pn,Yn]=(0,Le.useState)(_t),[ui,Ti]=(0,Le.useState)(Zt),[pi,Mi]=(0,Le.useState)(""),[ir,Fi]=(0,Le.useState)(0),[Wi,hr]=(0,Le.useState)(wt),[In,zr]=(0,Le.useState)(!1),[On,wr]=(0,Le.useState)(0),[po,Ar]=(0,Le.useState)(0),To=(0,Le.useRef)(),oo=(0,Le.useRef)(),$i=(0,Le.useRef)(),Qi=(0,Le.useRef)();(0,Le.useEffect)(()=>{const rr=window.scrollY||window.pageYOffset;Di(Li),Ln==null||Ln.setValue(Li),window.scrollTo(0,rr)},[Li]),(0,Le.useEffect)(()=>{An==null||An(ui)},[ui]),(0,Le.useEffect)(()=>{if(To.current){let rr=function(Xn,er){var no;if(Un){er.preventDefault();return}const Lo=er.clipboardData;if(Lo){const ko=Lo.types.toString(),Xo=Lo.items;if(ko==="Files"||Lo.types.indexOf("Files")>-1){if(er.preventDefault(),wn=="stex")return;try{let Ss=Xo[1];((no=Xo[0])==null?void 0:no.kind)==="file"&&(Ss=Xo[0]);const os=Ss.getAsFile(),Is=os.name.split(".").pop();(0,vt.I)(os,ps=>{var sa,_n,Cs;ps.id?((sa=os==null?void 0:os.type)==null?void 0:sa.indexOf("image"))>-1?ji.replaceSelection(`<img width="100%" src="/api/attachments/${ps.id}?type=${ps.content_type})" alt="" />`):((_n=os==null?void 0:os.type)==null?void 0:_n.indexOf("video"))>-1?ji.replaceSelection(`<video width="100%" controls src="/api/attachments/${ps.id}"></video>`):((Cs=os==null?void 0:os.type)==null?void 0:Cs.indexOf("pdf"))>-1?ji.replaceSelection(`<a href="/api/attachments/${ps.id}?type=${os.type}&disposition=inline" target="_blank">${os.name}</a>`):Er.includes(Is)?ji.replaceSelection(`<a href="/api/attachments/${ps.id}?type=office&disposition=inline" target="_blank">${os.name}</a>`):ji.replaceSelection(`[${os.name}](/api/attachments/${ps.id}?type=${ps.content_type})`):(ps==null?void 0:ps.status)===401&&(document.location.href="/user/login")})}catch(Ss){En.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const ji=Ie().fromTextArea(To.current,{mode:wn,lineNumbers:!Nt,lineWrapping:!0,value:$e,autoCloseTags:!0,autoCloseBrackets:!0});return ji.on("keyup",function(Xn,er){er.keyCode===8&&(Xn.getValue()==""?ji.setOption("placeholder",si):ji.setOption("placeholder",null))}),ji.on("keydown",function(Xn,er){if(er.keyCode===8){var no=Mr(Xn);no&&er.preventDefault()}}),kt&&ji.focus(),ji.on("paste",rr),qn&&ji.on("beforeChange",function(Xn,er){(er.origin==="paste"||er.origin==="+input")&&er.cancel()}),Ui(ji),()=>{ji.off("paste",rr)}}},[]);const fr=(0,Le.useCallback)(()=>{if(oo.current)try{}catch(rr){console.log(rr,"---- to set md editor body height")}},[Wi,oo,ui]);(0,Le.useEffect)(()=>{function rr(){let ji=new Te.Z(Xn=>{for(let er of Xn)(er.target.offsetHeight>0||er.target.offsetWidth>0)&&(fr(),Ln.setSize("100%","100%"),Ln.refresh())});return ji.observe(To.current.parentElement),ji}if(Ln){const ji=rr();return()=>{var Xn,er;(Xn=To.current)!=null&&Xn.parentElement&&ji.unobserve((er=To.current)==null?void 0:er.parentElement)}}},[Ln,fr]),(0,Le.useEffect)(()=>{if(Ln){let rr=[];for(const[ji,Xn]of Object.entries(Jr)){let er={[ji]:()=>{fi(Xn)}};rr.push(er),Ln.addKeyMap(er)}return()=>{for(let ji of rr)Ln.removeKeyMap(ji)}}},[Ln]),(0,Le.useEffect)(()=>{Zt!==ui&&Ti(Zt)},[Zt]),(0,cr.Z)(()=>{if(!At&&ir>0){let rr=new Date().getTime(),ji=window.sessionStorage.getItem(Bn);rr>=ir+hi&&(!ji||ji!==lr)&&(window.sessionStorage.setItem(Bn,lr),zr(!0))}},hi),(0,Le.useEffect)(()=>{Yn(_t)},[Ln,_t]),(0,Le.useEffect)(()=>{Ln&&kt&&Ln.focus()},[Ln,kt]),(0,Le.useEffect)(()=>{if(Pn&&Ln){let rr=function(Xn){let er=Xn.target;if(Qi.current){let no=er.scrollTop/er.scrollHeight;Qi.current.scrollTop=Qi.current.scrollHeight*no}};const ji=Ln.getScrollerElement();return ji.addEventListener("scroll",rr),()=>{ji.removeEventListener("scroll",rr)}}},[Ln,Pn]),(0,Le.useEffect)(()=>{if(Ln&&Rn){let rr=function(ji,Xn){Rn(ji,Xn)};return Ln.on("beforeChange",rr),()=>{Ln.off("beforeChange",rr)}}},[Ln,Rn]),(0,Le.useEffect)(()=>{if(Ln&&rn){let rr=function(){rn(Ln.getValue())};return Ln.on("blur",rr),()=>{Ln.off("blur",rr)}}},[Ln,rn]);function Mr(rr,ji){var Xn=rr.getDoc(),er=Xn.getCursor(),no=Xn.getLine(er.line),Lo=no.charAt(er.ch-1),ko=no.lastIndexOf("@\u2581@",er.ch),Xo=no.lastIndexOf("@\u2581\u2581@",er.ch),Ss=ko>Xo?ko:Xo,os=ko>Xo?3:4;if(Hi.indexOf(Lo)===-1)return null;if(console.log("change1:",ji,rr,no,er,Ss,ko,Xo,Lo),Ss>=0&&er.ch-Ss<5){var Is=Ss+os;return Xn.replaceRange("",{line:er.line,ch:Ss},{line:er.line,ch:Is}),{line:er.line,ch:Is}}return null}(0,Le.useEffect)(()=>{if(Ln){let rr=function(ji,Xn){const er=ji.getValue();Di(er),Fi(new Date().getTime()),ji.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),nt&&(Sn?nt(er,Sr(er)):nt(er))};return Ln.on("change",rr),()=>{Ln.off("change",rr)}}},[Ln,nt]),(0,Le.useEffect)(()=>{if(Ln)if($e==null)Ln.setValue(""),Di("");else{const rr=window.scrollY||window.pageYOffset;$e!==Ln.getValue()&&(Ln.setValue($e),Di($e),Ln.setCursor(qn?1:Ln.lineCount(),0),window.scrollTo(0,rr))}},[Ln,$e]);const fi=(0,Le.useCallback)(rr=>{const ji=Ln.getCursor(),Xn=Ln.getSelection();let er=Xn.split(`
|
|
|
`);switch(rr){case"bold":return Ln.replaceSelection("**"+Xn+"**"),Xn===""&&Ln.setCursor(ji.line,ji.ch+2),Ln.focus();case"italic":return Ln.replaceSelection("*"+Xn+"*"),Xn===""&&Ln.setCursor(ji.line,ji.ch+1),Ln.focus();case"code":return Ln.replaceSelection("`"+Xn+"`"),Xn===""&&Ln.setCursor(ji.line,ji.ch+1),Ln.focus();case"inline-latex":return Mi("inline-latex"),Ln.focus();case"latex":return Ln.replaceSelection("```latex\n"+Xn+"\n```"),Ln.setCursor(ji.line+1,Xn.length+1),Ln.focus();case"line-break":return Ln.replaceSelection(`<br/>
|
|
|
`),Ln.focus();case"list-ul":return Xn===""?Ln.replaceSelection("- "+Xn):Ln.replaceSelection(er.map(no=>no===""?"":`- ${no}`).join(`
|
|
|
`)),Ln.focus();case"list-ol":return Xn===""?Ln.replaceSelection("1. "+Xn):Ln.replaceSelection(er.map((no,Lo)=>no===""?"":`${Lo+1}. ${no}`).join(`
|
|
|
`)),Ln.focus();case"add-null-ch":return Xn===""&&Ln.setCursor(ji.line,ji.ch),Ln.replaceSelection(Pr),Ln.focus();case"add-signal":return Xn===""&&Ln.setCursor(ji.line,ji.ch),Ln.replaceSelection(st),Ln.focus();case"add-multiple":return Xn===""&&Ln.setCursor(ji.line,ji.ch),Ln.replaceSelection(Hi),Ln.focus();case"inster-template-1":return Xn===""&&Ln.setCursor(ji.line,ji.ch),Ln.replaceSelection(Rr),Ln.focus();case"eraser":return Ln.setValue(""),Ln.focus();case"trigger-watch":return Yn(!Pn),Ln.focus();case"trigger-full-screen":return Ti(!ui),Ln.focus();case Wn:Mi(Wn);return;case bi:Mi(bi);return;case Tn:Mi(Tn);return;case ri:Mi(ri);return;case"maths-latex":Mi("maths-latex");return;case ci:Mi(ci);return;case nr:Mi(nr);return;default:throw new Error}},[Ln,Pn,ui]),Tt=(0,Le.useCallback)((rr,ji)=>{var Xn,er,no,Lo,ko,Xo;switch(Mi(""),pi){case Wn:const{title:sa,link:_n}=rr;return Ln.replaceSelection(`[${sa}](${_n})`),Ln.focus();case bi:const{language:Cs,content:Pu}=rr;return Ln.replaceSelection(["```"+Cs,Pu,"```"].join(`
|
|
|
`)),Ln.focus();case"maths-latex":for(var Ss=atob(rr),os=new Uint8Array(Ss.length),Is=0;Is<Ss.length;Is++)os[Is]=Ss.charCodeAt(Is);var ps=new Blob([os],{type:"image/png"});(0,vt.I)(ps,Cr=>{Cr.id?Ln.replaceSelection(``):(Cr==null?void 0:Cr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Ln.replaceSelection("`$$"+rr+"$$`");break;case Tn:case ri:case Ii:const{src:Na,alt:ma}=rr,gs=ji,su=(no=(er=(Xn=gs==null?void 0:gs.name)==null?void 0:Xn.split("."))==null?void 0:er.pop)==null?void 0:no.call(er);return((Lo=gs==null?void 0:gs.type)==null?void 0:Lo.indexOf("image"))>-1||!(gs!=null&&gs.type)?gs.align||gs.width?Ln.replaceSelection(`<p style="text-align:${gs.align||"initial"}"><img width="${gs.width?gs.width+"%":"initial"}" src="${Na}" alt="${ma||""}" /></p>`):Ln.replaceSelection(`<img width="100%" src="${Na}" alt="${ma||""}" />`):((ko=gs==null?void 0:gs.type)==null?void 0:ko.indexOf("video"))>-1?Ln.replaceSelection(`<video width="100%" controls src="${Na}"></video>`):((Xo=gs==null?void 0:gs.type)==null?void 0:Xo.indexOf("pdf"))>-1?Ln.replaceSelection(`<a href="${Na}?type=${gs.type}&disposition=inline" target="_blank">${gs.name}</a>`):Er.includes(su)?Ln.replaceSelection(`<a href="${Na}?type=office&disposition=inline" target="_blank">${gs.name}</a>`):Ln.replaceSelection(`[${gs.name}](${Na})`),Ln.focus();case nr:const{row:au,col:fo,align:Lr}=rr;let La=`
|
|
|
`;for(let Cr=0;Cr<au;Cr++){let to=[],Kr=[];for(let Ci=0;Ci<fo;Ci++)Cr===1&&Kr.push(gr[Lr]),to.push(" ");Cr===1&&(La+=`| ${Kr.join(" | ")} |
|
|
|
`),La+=`| ${to.join(fo===1?"":" | ")} |
|
|
|
`}return Ln.replaceSelection(La+`
|
|
|
`),Ln.focus();default:throw new Error}},[Ln,pi]),Ir=(0,Le.useMemo)(()=>{switch(pi){case Wn:return Le.createElement(St,{callback:Tt,onCancel:ho});case bi:return Le.createElement(Et.Z,{callback:Tt,onCancel:ho});case Tn:return Le.createElement(vt.Z,{callback:Tt,onCancel:ho});case ci:return Le.createElement(Ae,{callback:Tt,onCancel:ho});case nr:return Le.createElement(xt,{callback:Tt,onCancel:ho});case"maths-latex":return Le.createElement(Mn,{showSaveButton:!0,callback:Tt});case"inline-latex":return Le.createElement(hn.Z,{showSaveButton:!0,callback:Tt});default:return null}},[pi]);function ho(){Mi("")}(0,Le.useEffect)(()=>{if($i.current){let rr=function(ko){no=!0,Lo=ko.pageY},ji=function(){no=!1},Xn=function(ko){if(no){let Xo=ko.pageY-Lo;Xo<0&&(Xo=0),Xo>300&&(Xo=300);let Ss=wt+Xo+"px";hr(Ss)}},er=$i.current,no=!1,Lo=0;return er.addEventListener("mousedown",rr),document.addEventListener("mousemove",Xn),document.addEventListener("mouseup",ji),()=>{er.removeEventListener("mousedown",rr),document.removeEventListener("mousemove",Xn),document.removeEventListener("mouseup",ji)}}},[Ln,$i]),(0,Le.useEffect)(()=>{hr(wt)},[wt]);const Zo=yo(Je),Po=yo(Wi),$o={width:Zo,height:Po},Yo=(0,Le.useMemo)(()=>{if(ir){let rr=new Date(ir),ji=rr.getHours(),Xn=rr.getMinutes(),er=rr.getSeconds();return ji=ji<10?"0"+ji:ji,Xn=Xn<10?"0"+Xn:Xn,er=er<10?"0"+er:er,`${ji}:${Xn}:${er}`}return 0},[ir]),Sr=rr=>{const ji=[];if(Sn){let Xn=-1;rr=rr.replace(/(@▁▁@|@▁@)/g,function(er,no,Lo){ji.push({multiLine:er!==st})})}return ji};function yr(){window.sessionStorage.removeItem(Bn),zr(!1),Fi(0)}function qi(){zr(!1),Fi(0),Ln.setValue(window.sessionStorage.getItem(Bn))}(0,Le.useEffect)(()=>{lo[pi]&&pi!==ri&&pi!==ci&&setTimeout(()=>{const rr=document.getElementsByClassName("markdown-popup-form")[0],ji=window.innerWidth/2-rr.offsetWidth/2,Xn=window.innerHeight/2-rr.offsetHeight/2;wr(ji),Ar(Xn)},0)},[pi]);const Qr=rr=>{rr.preventDefault();const ji=rr.clientX-On,Xn=rr.clientY-po;document.body.onmousemove=er=>{let no=er.clientX-ji,Lo=er.clientY-Xn;const ko=document.getElementsByClassName("markdown-popup-form")[0],Xo=window.innerWidth-ko.offsetWidth,Ss=window.innerHeight-ko.offsetHeight;no=Math.max(0,Math.min(no,Xo)),Lo=Math.max(0,Math.min(Lo,Ss)),_o(er.clientX,er.clientY,ji,Xn)&&(wr(no),Ar(Lo))},document.body.onmouseup=function(){document.body.onmousemove=null}},_o=(rr,ji,Xn,er)=>{const no=document.body.clientHeight,Lo=document.body.clientWidth;return rr<20&&Xn>rr||rr>Lo-20&&Xn<rr||ji<20&&er>ji||ji>no-20&&er<ji?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return Le.createElement(Le.Fragment,null,Le.createElement("div",{className:"markdown-editor-wrapper",ref:oo},Le.createElement("div",{className:`markdown-editor-container ${Qn} ${Pn?"on-preview":""} ${Nt?"mini":""} ${ui?"full-screen":""}`,style:$o},Le.createElement(Ne,{insertTemp:un,watch:Pn,fullScreen:ui,showNullButton:Kt,showNullProgramButton:Sn,onActionCallback:fi,hidetoolBar:kn,extraUse:Bi}),Le.createElement("div",{className:"markdown-editor-body"},Le.createElement("div",{className:"codemirror-container"},Le.createElement("textarea",{ref:To,placeholder:si})),Pn?Le.createElement("div",{ref:Qi,className:"preview-container"},wn==="stex"&&Le.createElement(ve,{value:lr}),wn!=="stex"&&Le.createElement(ce.Z,{disabledFill:Nn,showProgramFill:Sn,value:lr})):null))),zn?Le.createElement("a",{ref:$i,className:"editor-resize"}):null,pi===ri&&Le.createElement(yn,{callback:Tt,onCancel:ho}),pi===ci&&Le.createElement(Ae,{callback:Tt,onCancel:ho}),Le.createElement(je.Z,null,lo[pi]&&pi!==ri&&pi!==ci?Le.createElement(Bt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:On,top:po},title:Le.createElement("div",{style:{cursor:"move"},onMouseDown:Qr},lo[pi]),open:!0,onCancel:ho,footer:null,destroyOnClose:!0,width:pi===ci?"1200px":null,height:pi===ci?"80vh":null,className:"markdown-popup-form"},Ir):null))}},56030:function(bn,qt,Ee){"use strict";Ee.d(qt,{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(49291),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 We=(0,xe.useRef)();function gt(it){We.current.width=Qe.getFieldValue("width"),We.current.align=Qe.getFieldValue("align"),je(it,We.current)}function ct(it,yt){if(it.status===-1){me.ZP.error(it.message);return}Qe.setFieldsValue({src:`/api/attachments/${it.id}`,type:yt.type})}function Ct(it){let yt=it.target.files[0];We.current=yt,Ne(yt,ct)}return ge.createElement(Le.default,se(ie({form:Qe},we),{className:"upload-image-panel",onFinish:gt,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 We=new window.XMLHttpRequest;We.withCredentials=!0,We.addEventListener("load",function(gt){Ve(JSON.parse(gt.target.responseText),je)},!1),We.addEventListener("error",function(gt){console.error(gt)},!1),We.open("POST",`${Se.KI}/api/attachments.json`),We.send(Qe)}},19647:function(bn,qt,Ee){"use strict";Ee.d(qt,{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)}}},57800:function(bn,qt,Ee){"use strict";Ee.d(qt,{SV:function(){return Xe},ZP:function(){return Ue}});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(7947),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,Ge)=>Ae in Re?ge(Re,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Re[Ae]=Ge,oe=(Re,Ae)=>{for(var Ge in Ae||(Ae={}))ue.call(Ae,Ge)&&ee(Re,Ge,Ae[Ge]);if(de)for(var Ge of de(Ae))z.call(Ae,Ge)&&ee(Re,Ge,Ae[Ge]);return Re},ie=(Re,Ae)=>ce(Re,ve(Ae)),se=(Re,Ae,Ge)=>new Promise((Ke,Ze)=>{var at=nn=>{try{tn(Ge.next(nn))}catch(Jt){Ze(Jt)}},xt=nn=>{try{tn(Ge.throw(nn))}catch(Jt){Ze(Jt)}},tn=nn=>nn.done?Ke(nn.value):Promise.resolve(nn.value).then(at,xt);tn((Ge=Ge.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(Ge=>({label:Ge,kind:Re.languages.CompletionItemKind.Keyword,insertText:Ge})),we=Re=>Object.keys(le.tables).map(Ae=>({label:Ae,kind:Re.languages.CompletionItemKind.Variable,insertText:Ae})),Ce=(Re,Ae)=>{const Ge=le.tables[Re];return Ge?Ge.map(Ke=>({label:Ke,kind:Ae.languages.CompletionItemKind.Field,insertText:Ke})):[]};function ke(Re,Ae,Ge,Ke,Ze){let at=Ae.getWordUntilPosition(Ge),xt={startLineNumber:Ge.lineNumber,endLineNumber:Ge.lineNumber,startColumn:at.startColumn,endColumn:at.endColumn},tn=Ke.map(nn=>({label:nn,kind:Re.languages.CompletionItemKind.Keyword,insertText:nn,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:xt}));return Ze.map(nn=>{tn.push(ie(oe({},nn),{range:xt}))}),tn}var Ne=Re=>{le.languages.map(Ze=>(Re.languages.registerDocumentFormattingEditProvider(Ze,{provideDocumentFormattingEdits(at,xt,tn){return se(this,null,function*(){const nn=xe()(at.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:at.getFullModelRange(),text:nn}]})}}),Ze));const Ae=be.quickKey.map(Ze=>({label:Ze.label,kind:Re.languages.CompletionItemKind.Method,insertText:Ze.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Ge=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,at){var xt=Ze.getWordUntilPosition(at),tn={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:xt.startColumn,endColumn:xt.endColumn},nn=Ze.getLineContent(at.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:nn.startsWith("#")?Jt.content.replace(/#/,""):Jt.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}}),Re.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ze,at){var xt=Ze.getWordUntilPosition(at),tn={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:xt.startColumn,endColumn:xt.endColumn};return{suggestions:[...Ie.keywords.map(nn=>({label:nn,kind:Re.languages.CompletionItemKind.Function,documentation:nn,insertText:nn,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}}),Re.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Ze,at){var xt=Ze.getWordUntilPosition(at),tn={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:xt.startColumn,endColumn:xt.endColumn},nn=Ze.getLineContent(at.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:nn.startsWith("#")?Jt.content.replace(/#/,""):Jt.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}}),Re.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Ze,at){var xt=Ze.getWordUntilPosition(at),tn={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:xt.startColumn,endColumn:xt.endColumn},nn=Ze.getLineContent(at.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:nn.startsWith("#")?Jt.content.replace(/#/,""):Jt.content,insertTextRules:Re.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:tn}))]}}}),Re.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ze,at){var xt=Ze.getWordUntilPosition(at),tn={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:xt.startColumn,endColumn:xt.endColumn},nn=Ze.getLineContent(at.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:nn.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,Ge)=>Ae in Re?Ve(Re,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Re[Ae]=Ge,We=(Re,Ae,Ge)=>Qe(Re,typeof Ae!="symbol"?Ae+"":Ae,Ge);const gt=class mx{constructor(Ae,Ge,Ke){this.placeholder=Ae,this.editor=Ge,this.monaco=Ke,Ge.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)}};We(gt,"ID","editor.widget.placeholderHint");var Ct=gt,it=Ee(96236),yt=Ee(8591),ut=Ee(6848),Ft=Ee(89392),ht=Ee(50484),rt=Ee(56102),dt=Object.defineProperty,St=Object.defineProperties,Et=Object.getOwnPropertyDescriptors,vt=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,ln=(Re,Ae,Ge)=>Ae in Re?dt(Re,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Re[Ae]=Ge,$t=(Re,Ae)=>{for(var Ge in Ae||(Ae={}))Bt.call(Ae,Ge)&&ln(Re,Ge,Ae[Ge]);if(vt)for(var Ge of vt(Ae))jt.call(Ae,Ge)&&ln(Re,Ge,Ae[Ge]);return Re},yn=(Re,Ae)=>St(Re,Et(Ae)),Ut=(Re,Ae)=>{var Ge={};for(var Ke in Re)Bt.call(Re,Ke)&&Ae.indexOf(Ke)<0&&(Ge[Ke]=Re[Ke]);if(Re!=null&&vt)for(var Ke of vt(Re))Ae.indexOf(Ke)<0&&jt.call(Re,Ke)&&(Ge[Ke]=Re[Ke]);return Ge},Wt=(Re,Ae,Ge)=>new Promise((Ke,Ze)=>{var at=nn=>{try{tn(Ge.next(nn))}catch(Jt){Ze(Jt)}},xt=nn=>{try{tn(Ge.throw(nn))}catch(Jt){Ze(Jt)}},tn=nn=>nn.done?Ke(nn.value):Promise.resolve(nn.value).then(at,xt);tn((Ge=Ge.apply(Re,Ae)).next())});function Xt(Re){return/^\d+$/.test(Re)?`${Re}px`:Re}function mt(){}let ze=!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 et(Re=[]){let Ae=Re;if(Array.isArray(Re)){for(let Ge=0;Ge<Re.length;Ge++){let Ke=Be[Re[Ge]];if(Ke)return Ke}return Ae[0]}return Be[Ae]||Ae}let qe=null;var Ue=Re=>{var Ae=Re,{width:Ge="100%",height:Ke="100%",value:Ze,language:at="javascript",style:xt={},options:tn={},overrideServices:nn={},theme:Jt="vs-dark",onEditBlur:pn,isCopy:Mn=!1,onSave:hn,autoHeight:En=!1,forbidCopy:Wn=!1,onChange:Tn=mt,editorDidMount:ci=mt,onFocus:ri=mt,onBreakPoint:Ii=mt,breakPointValue:bi=[],filename:nr="educoder.txt",errorLine:Ji,errorContent:gr="",highlightLine:cr,openBreakPoint:eo=!1,placeholder:ro=""}=Ae,hi=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"]);const Pr=(0,Le.useRef)(),Hi=(0,Le.useRef)({}),st=(0,Le.useRef)(),Rr=(0,Le.useRef)(),Er=(0,Le.useRef)([]),yo=(0,Le.useRef)(!1),Zr=(0,Le.useRef)(),ao=(0,Le.useRef)(),Jr=(0,Le.useRef)(!1),[lo,oi]=(0,Le.useState)(!1);function $e(){let Zt;return Pr.current&&(Zt=new me.Z(rn=>{for(let Rn of rn)(Rn.target.offsetHeight>0||Rn.target.offsetWidth>0)&&Hi.current.instance.layout()}),Zt.observe(Pr.current)),Zt}function nt(){yt.ZP.warning({content:decodeURIComponent(je),key:"monaco-editor-tip"})}const Je=()=>{let Zt=Hi.current.instance;if(Ze!=null&&Zt&&lo){const rn=Zt.getModel();rn&&Ze!==rn.getValue()&&(ze=!0,rn.setValue(Ze),Zt.layout(),ze=!1)}};(0,Le.useEffect)(()=>{const Zt=ht.Z.subscribe("formatDocument",rn=>{var Rn;let An=Hi.current.instance;(Rn=An==null?void 0:An.getAction)==null||Rn.call(An,"editor.action.formatDocument").run()});return window.updateMonacoValue=rn=>{Tn(rn)},Zt},[]),(0,Le.useEffect)(()=>{var Zt;let rn=Hi.current.instance;Rr.current&&clearTimeout(Rr.current),Rr.current=setTimeout(()=>{Je()},500),Ze&&(Ze!=null&&Ze.length)&&((Zt=rn==null?void 0:rn.updateOptions)==null||Zt.call(rn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ze.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ze,lo,Hi.current]),(0,Le.useEffect)(()=>{if(Ji&&Hi.current&&Hi.current.instance){let rn=Hi.current.instance;rn.changeViewZones(function(Rn){var An=document.createElement("div");An.style.padding="10px 20px",An.style.width="calc(100% - 20px)",An.className="my-error-line-wrp",An.innerHTML=gr,Rn.addZone({afterLineNumber:Ji||11,heightInLines:3,domNode:An})});var Zt={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}};rn.addOverlayWidget(Zt),rn.revealPositionInCenter({lineNumber:20,column:1})}},[Ji,Hi.current,lo]);const wt=(Zt="",rn)=>{if(!Zt||Zt.trim()==="")return!0;const An=Hi.current.instance.getModel().getLineTokens(rn);let Qn=!1;for(let Un=0;Un<2;Un++)An.getStandardTokenType(Un)===1&&(Qn=!0);return Qn};(0,Le.useEffect)(()=>{var Zt;const rn=(Zt=Hi.current)==null?void 0:Zt.instance;if(rn&&lo&&Wn){const Rn=rn.onDidBlurEditorWidget(()=>{Jr.current=!1}),An=rn.onDidFocusEditorText(()=>{Jr.current=!0});return()=>{Rn.dispose(),An.dispose()}}},[Hi.current,lo,Wn]),(0,Le.useEffect)(()=>{var Zt;if((Zt=Hi.current)!=null&&Zt.instance&&lo&&eo){let rn=Hi.current.instance,Rn=rn.getModel();if(!Rn)return;(()=>{var Di;let Pn=[],Yn=[];const ui=Rn.getAllDecorations();for(let pi of ui)pi.options.className==="highlighted-line"&&(Pn.push((Di=pi==null?void 0:pi.range)==null?void 0:Di.startLineNumber),Yn.push(pi==null?void 0:pi.id));if(cr===Pn[0])return;Rn.deltaDecorations(Yn,[]);const Ti=Rn.getLineCount();cr&&cr<=Ti&&(rn.deltaDecorations([],[{range:new qe.Range(cr,1,cr,Rn.getLineMaxColumn(cr)),options:{isWholeLine:!0,className:"highlighted-line"}}]),rn.revealLineInCenter(cr))})();const Qn=(Di=!1)=>{var Pn;let Yn=[],ui=[];const Ti=Rn.getAllDecorations();for(let pi of Ti)pi.options.linesDecorationsClassName==="breakpoints-select"&&(Yn.push((Pn=pi==null?void 0:pi.range)==null?void 0:Pn.startLineNumber),ui.push(pi==null?void 0:pi.id));if(Di)return{lines:Yn,ids:ui};Ii(Yn)},Un=Di=>Wt(void 0,null,function*(){let Pn={range:new qe.Range(Di,1,Di,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Rn.deltaDecorations([],[Pn]),Qn()}),qn=Di=>Wt(void 0,null,function*(){let Pn=[];const Yn=rn.getLineDecorations(Di);for(let ui of Yn)ui.options.linesDecorationsClassName==="breakpoints-select"&&Pn.push(ui.id);yield Rn.deltaDecorations(Pn,[]),Qn()}),Nn=Di=>{let Pn=rn.getLineDecorations(Di);for(let Yn of Pn)if(Yn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Ft.isEqual)(bi,Qn(!0).lines)){Rn.deltaDecorations(Qn(!0).ids,[]);const Di=bi.map(Pn=>({range:new qe.Range(Pn,1,Pn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Rn.deltaDecorations([],Di)}const si=rn.onDidChangeModelContent(Di=>{let Pn=rn.getPosition();if(Pn){let Yn=Pn.lineNumber;clearTimeout(ao.current),ao.current=setTimeout(()=>{wt(Rn.getLineContent(Yn),Yn)?qn(Yn):Nn(Yn)?(qn(Yn),Un(Yn)):Qn()},100)}}),Li=rn.onMouseDown(Di=>{var Pn,Yn,ui;if(Di.target.detail&&((ui=(Yn=(Pn=Di.target)==null?void 0:Pn.element)==null?void 0:Yn.className)!=null&&ui.includes("line-numbers"))){let Ti=Di.target.position.lineNumber;if(wt(Rn.getLineContent(Ti),Ti))return;Nn(Ti)?qn(Ti):Un(Ti)}}),Bi=Di=>{let Pn={range:new qe.Range(Di,1,Di,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Er.current=rn.deltaDecorations(Er.current,[Pn])},Ln=()=>{Er.current=rn.deltaDecorations(Er.current,[])},Ui=rn.onMouseMove(Di=>{var Pn,Yn,ui;if(Ln(),Di.target.detail&&((ui=(Yn=(Pn=Di.target)==null?void 0:Pn.element)==null?void 0:Yn.className)!=null&&ui.includes("line-numbers"))){let Ti=Di.target.position.lineNumber;if(wt(Rn.getLineContent(Ti),Ti))return;Bi(Ti)}}),lr=rn.onMouseLeave(()=>{Ln()});return()=>{si.dispose(),Li.dispose(),Ui.dispose(),lr.dispose()}}},[Hi.current,lo,bi,cr,eo,at]),(0,Le.useEffect)(()=>{var Zt;(Zt=Hi.current)!=null&&Zt.instance&&eo&&Hi.current.instance.setPosition({lineNumber:0,column:0})},[cr]);function Nt(){let Zt=Hi.current.instance;if(Zt){const rn=Zt.getSelection(),Rn=Hi.current.pastePos||{},An=new qe.Range(Rn.startLineNumber||rn.endLineNumber,Rn.startColumn||rn.endColumn,Rn.endLineNumber||rn.endLineNumber,Rn.endColumn||rn.endColumn);setTimeout(()=>{Zt.executeEdits("",[{range:An,text:""}])},300)}}function kt(Zt){(window.navigator.platform.match("Mac")?Zt.metaKey:Zt.ctrlKey)&&Zt.keyCode==83&&(Zt.preventDefault(),hn())}const _t=()=>{if(En&&Hi.current.instance){const Zt=Hi.current.instance.getContentHeight();Sn(Zt<Ke?Ke:Zt)}else Sn(Ke)};function un(Zt){var rn=document.createEvent("MouseEvents");rn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Zt.dispatchEvent(rn)}const wn=Zt=>{if(!Jr.current)return;const{keyCode:rn,ctrlKey:Rn,metaKey:An,target:Qn,type:Un}=Zt;return(Un==="paste"||(rn===67||rn===86)&&(An||Rn))&&Qn.nodeName==="TEXTAREA"&&(nt(),Zt.preventDefault()),!1};function Bn(Zt,rn){var Rn=window.URL||window.webkitURL||window,An=new Blob([rn]),Qn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Qn.href=Rn.createObjectURL(An),Qn.download=Zt,un(Qn)}(0,Le.useEffect)(()=>{_t()},[_t]),(0,Le.useEffect)(()=>{Pr.current&&!lo&&Promise.all([Ee.e(8909),Ee.e(6894)]).then(Ee.bind(Ee,71448)).then(Zt=>{try{qe=Zt,Hi.current.instance=qe.editor.create(Pr.current,{value:Ze,language:et(at),theme:Jt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},nn);const rn=Hi.current.instance;let Qn=[...it.BH._menuItems].find(si=>si[0]._debugName=="EditorContext")[1],Un=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],qn=(si,Li)=>{var Bi,Ln;let Ui=si._first;do Li.includes((Ln=(Bi=Ui.element)==null?void 0:Bi.command)==null?void 0:Ln.id)&&si._remove(Ui);while(Ui=Ui.next)};if(ci(rn,qe),setTimeout(()=>{_t(),Hi.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Bn(nr||"educoder.txt",rn.getValue())}})},500),Hi.current.subscription=rn.onDidChangeModelContent(si=>{yo.current?clearTimeout(Zr.current):(_t(),Tn(rn.getValue(),si)),Zr.current=setTimeout(()=>{yo.current=!1},500)}),window.Monaco||Ne(qe,et(at)),Wn&&(qn(Qn,Un),Pr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",wn),window.removeEventListener("paste",wn),window.addEventListener("keydown",wn),window.addEventListener("paste",wn)),window.Monaco=qe,pn&&rn.onDidBlurEditorWidget(()=>{pn(rn.getValue())}),ri&&rn.onDidFocusEditorText(()=>{ri(rn.getValue())}),Wn)try{rn.onDidPaste(si=>{const Li=rn.getSelection(),Bi=Hi.current.pastePos||{},Ln=new qe.Range(Bi.startLineNumber||Li.endLineNumber,Bi.startColumn||Li.endColumn,Bi.endLineNumber||Li.endLineNumber,Bi.endColumn||Li.endColumn);rn.executeEdits("",[{range:si.range,text:""}])})}catch(si){}let Nn=$e();return ro&&typeof ro=="string"&&new Ct(ro,rn,qe),oi(!0),()=>{const si=Hi.current.instance;si.dispose();const Li=si.getModel();Li&&Li.dispose(),Hi.current.subscription&&Hi.current.subscription.dispose(),Nn.unobserve(Pr.current)}}catch(rn){}})},[]),(0,Le.useEffect)(()=>{if(Hi.current.instance&&lo)return document.addEventListener("keydown",kt,!1),()=>{document.removeEventListener("keydown",kt)}},[hn,lo]),(0,Le.useEffect)(()=>{let Zt=Hi.current.instance;if(Zt&&lo){let rn=et(at);qe.editor.setModelLanguage(Zt.getModel(),rn)}},[at,lo]),(0,Le.useEffect)(()=>{Hi.current.instance&&lo&&qe.editor.setTheme(Jt)},[Jt,lo]),(0,Le.useEffect)(()=>{let Zt=Hi.current.instance;st.current=tn,Zt&&lo&&(Zt.updateOptions($t({},tn)),setTimeout(()=>{Zt.getModel().updateOptions($t({},tn))},200))},[JSON.stringify(tn),lo]),(0,Le.useEffect)(()=>{let Zt=Hi.current.instance;Zt&&lo&&Zt.layout()},[Ge,Ke,lo]);const[zn,At]=(0,Le.useState)(Xt(Ge)),[Kt,Sn]=(0,Le.useState)(Xt(Ke)),kn=yn($t({},xt),{width:zn,height:Kt,position:"relative"});return Le.createElement("div",{className:"my-monaco-editor",ref:Pr,style:kn},Mn&&Le.createElement(rt.CopyToClipboard,{text:Ze,onCopy:()=>yt.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:Ge,modified:Ke,language:Ze,options:at={}}){const xt=(0,Le.useRef)(),[tn,nn]=(0,Le.useState)(null);function Jt(En){let Wn;return xt.current&&(Wn=new me.Z(Tn=>{for(let ci of Tn)(ci.target.offsetHeight>0||ci.target.offsetWidth>0)&&En.layout()}),Wn.observe(xt.current)),Wn}(0,Le.useEffect)(()=>(xt.current&&Promise.all([Ee.e(8909),Ee.e(9404)]).then(Ee.bind(Ee,2550)).then(En=>{qe=En;const Wn=qe.editor.createDiffEditor(xt.current,yn($t({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},at),{wordWrap:!0}));nn(Wn);let Tn=Jt(Wn);return()=>{Wn.dispose();const ci=Wn.getModel();ci&&ci.dispose(),Tn.unobserve(xt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Le.useEffect)(()=>{tn&&tn.setModel({original:qe.editor.createModel(Ge,Ze),modified:qe.editor.createModel(Ke,Ze)})},[Ge,Ke,Ze,tn]);const pn=Xt(Re),Mn=Xt(Ae),hn={width:pn,height:Mn};return Le.createElement("div",{className:"my-diff-editor",ref:xt,style:hn})}},34043:function(bn,qt,Ee){"use strict";var Le=Ee(58323),me=Ee(57809),Ie=Ee(78673),Te=Ee(59301);const be=me.default.Option;qt.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")))))}},50505:function(bn,qt,Ee){"use strict";Ee.d(qt,{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])}},70037:function(bn,qt,Ee){"use strict";Ee.d(qt,{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(86723),he=Ee(24334),Se=Ee(7651),xe=Ee(99325),ge=Ee(88230),ce=Ee(75618),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=(yt,ut,Ft)=>ut in yt?ee(yt,ut,{enumerable:!0,configurable:!0,writable:!0,value:Ft}):yt[ut]=Ft,Ce=(yt,ut)=>{for(var Ft in ut||(ut={}))le.call(ut,Ft)&&we(yt,Ft,ut[Ft]);if(se)for(var Ft of se(ut))ye.call(ut,Ft)&&we(yt,Ft,ut[Ft]);return yt},ke=(yt,ut)=>oe(yt,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=(yt=>(yt[yt.SET_VISIBLE=0]="SET_VISIBLE",yt[yt.SET_TABINDEX=1]="SET_TABINDEX",yt))(Qe||{});function We(yt,ut){switch(ut.type){case 0:return ke(Ce({},yt),{visible:ut.payload});case 1:return ke(Ce({},yt),{tabIndex:ut.payload});default:throw new Error}}function gt({value:yt,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)(yt||"")))},[yt,Ft]),(0,Le.useEffect)(()=>{var St,Et,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,ln=((Bt=(vt=(Et=(St=dt.current)==null?void 0:St._core)==null?void 0:Et._renderService)==null?void 0:vt.dimensions)==null?void 0:Bt.actualCellWidth)||9.5,$t=Math.ceil(jt/ln);dt.current.resize($t,8),ht(!0)}},[]),z.createElement("div",{ref:rt,className:ue()("XtermText-valueRef",ut)})}function ct(yt){const{status:ut,error_msg:Ft,output:ht,input:rt,expected_output:dt,is_file:St,input_file_url:Et,output_file_url:vt,expected_output_file_url:Bt}=yt;let jt=null;const ln={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"),!St&&z.createElement(gt,{className:"mb10",value:rt}),St&&z.createElement("div",{style:ln},z.createElement("a",{onClick:()=>(0,ge.LR)(Et,rt)},rt)),z.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!St&&z.createElement(gt,{className:"mb10",value:ht&&he.Base64.decode(ht)||""}),St&&z.createElement("div",{style:ln},z.createElement("a",{onClick:()=>(0,ge.LR)(vt,ht)},ht)),z.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!St&&z.createElement(gt,{className:"mb10",value:dt&&he.Base64.decode(dt)||""}),St&&z.createElement("div",{style:ln},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"),!St&&z.createElement(xe.Z,{value:rt,style:ln}),St&&z.createElement("div",{style:ln},z.createElement("a",{onClick:()=>(0,ge.LR)(Et,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"),!St&&z.createElement(xe.Z,{value:rt,style:ln}),St&&z.createElement("div",{style:ln},z.createElement("a",{onClick:()=>(0,ge.LR)(Et,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(yt){const{status:ut,error_msg:Ft,execute_time:ht,output:rt,input:dt,expected_output:St,is_file:Et,input_file_url:vt,output_file_url:Bt,expected_output_file_url:jt}=yt;let ln=null;switch(ut){case Pe.h.OK:ln=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:ln=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",St&&he.Base64.decode(St)));break;case Pe.h.EXECUTEFAILURE:ln=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:ln=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:ln=z.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Pe.h.TIMEOUT:ln=z.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return z.createElement(z.Fragment,null," ",ln," ")}var it=({id:yt,is_file:ut,input:Ft,debuging:ht,submitting:rt,executingMessage:dt,debugResult:St,onChangeInput:Et,onDebugCode:vt,onSubmitCode:Bt})=>{const[jt,ln]=(0,Le.useReducer)(We,je),{visible:$t,tabIndex:yn}=jt;(0,Le.useEffect)(()=>{ln({type:0,payload:!1})},[yt]);function Ut(ze){let Be=ze.target.id;ln({type:1,payload:Be})}function Wt(){ln({type:0,payload:!$t})}const Xt=(0,Le.useMemo)(()=>{if(St){const{status:ze}=St;return z.createElement(z.Fragment,null,Ct(St))}return null},[St]);function mt(){ln({type:0,payload:!0}),ln({type:1,payload:"1"}),vt()}return z.createElement("div",{className:"test-case-panel"},z.createElement("div",{className:`test-case-panel-body ${$t?"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:Et}),rightNode:ht?z.createElement(Se.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):St?Xt:z.createElement("p",{style:{color:"#536879"}},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D")})),z.createElement("a",{className:`btn-collapse ${$t?"up":""}`,onClick:Wt},$t?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:mt},"\u8C03\u8BD5\u4EE3\u7801"),z.createElement(Ie.ZP,{type:"primary",className:"custom-ant-disabled",loading:rt,disabled:rt,onClick:()=>{ln({type:0,payload:!1}),Bt()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},68115:function(bn,qt,Ee){"use strict";Ee.r(qt),Ee.d(qt,{default:function(){return Rt}});var Le=Ee(59301),me=Ee(10906),Ie=Ee(76618),Te=Ee(24459),be=Ee(31797),Pe=Ee(8591),he=Ee(43418),Se=Ee(71418),xe=Ee(57809),ge=Ee(53576),ce=Ee(31582),ve=Ee(38446),de=Ee(87169),ue=Ee(43428),z=Ee(57800),ee=Ee(19647),oe=Ee(90691),ie=Ee(34043),se=Ee(59301),le=Object.defineProperty,ye=Object.defineProperties,we=Object.getOwnPropertyDescriptors,Ce=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,je=(pt,Pt,Lt)=>Pt in pt?le(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,Ve=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))ke.call(Pt,Lt)&&je(pt,Lt,Pt[Lt]);if(Ce)for(var Lt of Ce(Pt))Ne.call(Pt,Lt)&&je(pt,Lt,Pt[Lt]);return pt},Qe=(pt,Pt)=>ye(pt,we(Pt));const We={theme:(0,oe.G)("cmCodeMode","vs-dark"),fontSize:(0,oe.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,oe.G)("cmTabToSpace",!0)};var gt=(pt=>(pt[pt.set_font_size=0]="set_font_size",pt[pt.set_theme=1]="set_theme",pt[pt.on_tab_to_space=2]="on_tab_to_space",pt[pt.set_show_editor_setting=3]="set_show_editor_setting",pt))(gt||{});function ct(pt,Pt){switch(Pt.type){case 3:return Qe(Ve({},pt),{showEditorSetting:Pt.payload});case 1:return Qe(Ve({},pt),{theme:Pt.payload});case 0:return Qe(Ve({},pt),{fontSize:Pt.payload});case 2:return Qe(Ve({},pt),{tabToSpace:Pt.payload});default:throw new Error}}var Ct=({isLoading:pt,value:Pt,onChange:Lt,language:vn,onUpdateCode:cn,ActionBarRender:sn=gn=>se.createElement(it,{onShowCodeSetting:gn})})=>{const[gn,mn]=(0,Le.useReducer)(ct,We),{theme:xn,fontSize:jn,showEditorSetting:ti,tabToSpace:Zn}=gn,xi=(0,Le.useRef)(),Kn=(0,Le.useRef)(),mi={onFontSizeChange:Zi=>{mn({type:0,payload:Zi}),(0,oe.t)("cmFontSize",Zi)},tabToSpace:Zn,cmFontSize:jn,className:"oj",cmCodeMode:xn,onTabToSpace:Zi=>{mn({type:2,payload:Zi}),(0,oe.t)("cmTabToSpace",Zi)},onCodeModeChange:Zi=>{mn({type:1,payload:Zi}),(0,oe.t)("cmCodeMode",Zi)}};function ai(){mn({type:3,payload:!1})}function Ri(){mn({type:3,payload:!0})}const Oi={value:Pt,language:vn,theme:xn,height:"calc(100% - 56px)",options:{fontSize:jn,insertSpaces:Zn},onChange:Zi=>{Lt(Zi),Kn.current=Zi,clearTimeout(xi.current),xi.current=setTimeout(()=>{cn(Kn.current)},1e4)},onEditBlur:Zi=>{Kn.current&&cn(Kn.current)}};return se.createElement(Le.Fragment,null,se.createElement("div",{className:"code-panel-container"},sn(Ri),!pt&&se.createElement(z.ZP,Ve({},Oi))),se.createElement(ee.Z,null,se.createElement(ue.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:ti,onClose:ai},se.createElement(ie.Z,Ve({},mi)))))};function it({onShowCodeSetting:pt}){return se.createElement("div",{className:"action-bar"},se.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),se.createElement("a",{onClick:pt},se.createElement("i",{className:"iconfont icon-shezhi"})))}var yt=Ee(24334),ut=Ee(95910),Ft=Ee(70037),ht=Ee(92832),rt=Ee(78241),dt=Ee(3113);const{TextArea:St}=ht.default,Et=5e3;var vt=({callback:pt,onCancel:Pt,notes:Lt})=>{function vn(cn){pt(cn)}return Le.createElement(rt.default,{className:"note-form-panel",onFinish:vn,initialValues:{notes:Lt}},Le.createElement(rt.default.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:Et,message:`\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A${Et}`}]},Le.createElement(St,{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"},ln=Ee(1710),$t=Ee(58421),yn=Ee(58617),Ut=Ee(81953),Wt=Ee(86723),Xt=Ee(88230),mt=Ee(61186),ze=Ee.n(mt);const{Column:Be}=ln.default;var et=({submitResult:pt,submitting:Pt,submitRecords:Lt,page:vn,onPageChange:cn,topicId:sn})=>{const{status:gn,id:mn,input:xn,output:jn,expected_output:ti,is_file:Zn,input_file_url:xi,output_file_url:Kn,expected_output_file_url:mi,error_msg:ai}=pt||{},{records:Ri,records_count:Oi}=Lt||{},Zi=(0,Te.useParams)();function Ai(){Zn?navigator.clipboard.writeText(yt.Base64.decode(ai)).then(()=>{Pe.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(yt.Base64.decode(jn)).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(yn.Z,{style:{fontSize:24},spin:!0})},mn?Le.createElement(Le.Fragment,null,Le.createElement("ul",{className:jt.info},Le.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",Le.createElement("span",{className:gn===Wt.h.OK?"c-green":"c-red"},Ft.Im[gn])),Le.createElement("li",{className:jt.error},Le.createElement("a",{onClick:Ai},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",Le.createElement(Ut.Z,null)," ")),Le.createElement("li",null,Le.createElement(Te.Link,{to:`/problems/${sn}/record-detail/${mn}?backId=${Zi==null?void 0:Zi.save_identifier}`},"\u663E\u793A\u8BE6\u60C5 > "))),gn!==Wt.h.OK?Le.createElement(Le.Fragment,null,Le.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),Le.createElement("pre",null,!Zn&&xn,Zn&&Le.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,Xt.LR)(xi,xn)},xn)),Le.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),Le.createElement("pre",null,(gn===4||gn===5)&&yt.Base64.decode(ai),gn!=4&&gn!=5&&(Zn?Le.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,Xt.LR)(Kn,jn)},jn):yt.Base64.decode(jn))),Le.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),Le.createElement("pre",null,!Zn&&yt.Base64.decode(ti),Zn&&Le.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,Xt.LR)(mi,ti)},ti))):null):null,(Ri==null?void 0:Ri.length)>0?Le.createElement(ln.default,{dataSource:Ri,rowKey:"id",pagination:!1},Le.createElement(Be,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(Ni,ur)=>Le.createElement("span",null," ",ze()(Ni).format("YYYY-MM-DD HH:mm:ss"))}),Le.createElement(Be,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:(Ni,ur)=>{var ei;return Le.createElement(Te.Link,{className:Ni===0?"c-green":"c-red",to:`/problems/${sn}/record-detail/${ur.id}?backId=${Zi==null?void 0:Zi.save_identifier}`},(ei=Ft.Im[Ni])==null?void 0:ei.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,Oi>15?Le.createElement($t.Z,{className:jt.pagination,current:vn,pageSize:15,total:Oi,onChange:cn}):null)},qe=Ee(57816),Ue=Ee(12563),Xe=Ee(81327),Re={desc:"desc___X8_hx",info:"info___C1DPv","commit-info":"commit-info____9yQm"},Ae=Ee(99325),Ge=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:pt,onTriggerPraise:Pt,toDiscuss:Lt})=>{const{language:vn,difficulty:cn,time_limit:sn,username:gn,user_path:mn,user_praise:xn,comments_count:jn,praises_count:ti,description:Zn,pass_count:xi,submit_count:Kn}=pt,mi=(0,Te.useLocation)();console.log(pt.language,"language");const ai=Ke[cn];return Ge.createElement(Ge.Fragment,null,Ge.createElement("ul",{className:Re.info},Ge.createElement("li",null,"\u96BE\u5EA6\uFF1A",Ge.createElement(Ue.default,{color:ai==null?void 0:ai.color},ai==null?void 0:ai.name)),Ge.createElement("li",null,"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",Ge.createElement("b",null,sn,"\u79D2"))),Ge.createElement(Ae.Z,{value:Zn,className:Re.desc}),Ge.createElement("ul",{className:Re["commit-info"]},Ge.createElement("li",null,Ge.createElement(Xe.Z,{size:4},Ge.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",Ge.createElement("b",null,xi))),Ge.createElement("li",null,Ge.createElement(Xe.Z,{size:4},Ge.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",Ge.createElement("b",null,Kn))," "),Ge.createElement("li",{style:{flex:"1 0 0"}}),Ge.createElement("li",null,Ge.createElement(Xe.Z,{size:4},Ge.createElement("i",{className:"iconfont icon-huifu1",onClick:Lt})," ",Ge.createElement("b",null,jn))," ")))},at=Ee(50484),xt=Object.defineProperty,tn=Object.getOwnPropertySymbols,nn=Object.prototype.hasOwnProperty,Jt=Object.prototype.propertyIsEnumerable,pn=(pt,Pt,Lt)=>Pt in pt?xt(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,Mn=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))nn.call(Pt,Lt)&&pn(pt,Lt,Pt[Lt]);if(tn)for(var Lt of tn(Pt))Jt.call(Pt,Lt)&&pn(pt,Lt,Pt[Lt]);return pt};const hn=pt=>React.createElement("svg",Mn({width:40,height:40,xmlns:"http://www.w3.org/2000/svg"},pt),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 En="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjRUVGN0ZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0MxRTJGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSJ1cmwoI2EpIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSI4Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTYuMDU3IDIwLjc4NEg4LjIzOEExLjIyIDEuMjIgMCAwIDAgNyAyMS45NzR2Ni44MTFhMS4yMiAxLjIyIDAgMCAwIDEuMjM4IDEuMTloNy44MTlhMS4yMTMgMS4yMTMgMCAwIDAgMS4yMzgtMS4xOXYtNi44MTFhMS4yMTMgMS4yMTMgMCAwIDAtLjM3Ni0uODQ3IDEuMjAzIDEuMjAzIDAgMCAwLS44NjItLjMzMnYtLjAxWm0tMS4yNSA2Ljc2OUg5LjQyM1YyMy4xMmg1LjM4NHY0LjQzM1oiIGZpbGw9IiM0Q0FDRkYiLz48cGF0aCBkPSJNMTYuMDU3IDEwLjAwNWExLjIyIDEuMjIgMCAwIDEgMS4yMzggMS4xODl2Ni44MTJhMS4yMTMgMS4yMTMgMCAwIDEtLjM3Ni44NDZjLS4yMzIuMjIyLS41NDIuMzQtLjg2Mi4zMzJIOC4yMzhBMS4yMTMgMS4yMTMgMCAwIDEgNyAxOC4wMDV2LTYuODExYTEuMjIgMS4yMiAwIDAgMSAxLjIzOC0xLjE5Wm0tMS4yMzkgMi40MUg5LjQzNHY0LjQwMWg1LjM4NHYtNC40WiIgZmlsbD0iIzk0Q0RGRiIvPjxwYXRoIGQ9Ik0yMC40MTggMTIuNjMyaDExLjE4OWExLjIxMyAxLjIxMyAwIDAgMCAxLjIzOC0xLjE3OSAxLjIyNCAxLjIyNCAwIDAgMC0uMzcxLS44NTcgMS4yMTQgMS4yMTQgMCAwIDAtLjg2Ny0uMzQzSDIwLjQxOGExLjIwMyAxLjIwMyAwIDAgMC0uODY2LjMzNmMtLjIzMy4yMjMtLjM2Ny41My0uMzcyLjg1NC4wMDUuMzIzLjE0LjYzLjM3Mi44NTQuMjMyLjIyMy41NDQuMzQ0Ljg2Ni4zMzVaTTMxLjU3NSAxNi4wMjdoLTExLjE5YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTE5LjU1N2MtLjIzNy4zODQtLjIzNy44NyAwIDEuMjU0LjIzOC4zODQuNjcyLjYgMS4xMi41NTdoMTEuMTg5Yy40NDguMDQzLjg4Mi0uMTczIDEuMTE5LS41NTcuMjM3LS4zODQuMjM3LS44NyAwLTEuMjU0YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTItLjU1N1pNMzEuNTc1IDIxLjU5NWgtMTEuMTlhMS4xODMgMS4xODMgMCAwIDAtMS4xMTkuNTU3Yy0uMjM3LjM4NC0uMjM3Ljg3IDAgMS4yNTQuMjM4LjM4NC42NzIuNiAxLjEyLjU1N2gxMS4xODljLjQ0OC4wNDMuODgyLS4xNzMgMS4xMTktLjU1Ny4yMzctLjM4NC4yMzctLjg3IDAtMS4yNTRhMS4xODMgMS4xODMgMCAwIDAtMS4xMi0uNTU3Wk0zMS41NzUgMjcuMTYzaC0xMS4xOWExLjE4MyAxLjE4MyAwIDAgMC0xLjExOS41NTdjLS4yMzcuMzg0LS4yMzcuODcgMCAxLjI1NC4yMzguMzg0LjY3Mi42IDEuMTIuNTU3aDExLjE4OWMuNDQ4LjA0My44ODItLjE3MyAxLjExOS0uNTU3LjIzNy0uMzg0LjIzNy0uODcgMC0xLjI1NGExLjE4MyAxLjE4MyAwIDAgMC0xLjEyLS41NTdaIiBmaWxsPSIjMTg5MEZGIi8+PC9nPjwvZz48L3N2Zz4=",Wn=Ee(7660);function Tn(pt){return(0,Wn.U2)("comments.json",pt)}function ci(pt){return(0,Wn.v_)(`/discusses/${pt}/plus.json`,{container_type:"Discuss",type:1})}function ri(pt){return(0,Wn.v_)("comments/reply.json",pt)}function Ii(pt){return(0,Wn.v_)("comments.json",pt)}function bi(pt){return(0,Wn.v_)(`comments/${pt==null?void 0:pt.id}/hidden.json`,pt)}function nr(pt){return(0,Wn.IV)(`comments/${pt==null?void 0:pt.id}.json`)}var Ji=Ee(52649),gr=Ee(73898);function cr({author:pt}){return Le.createElement("a",{href:`/users/${pt.login}`,target:"_blank"},Le.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:`${ve.Z.IMG_SERVER}/images/${pt.image_url}`,width:"50"}))}function eo({data:pt,index:Pt,parentDiscussIndex:Lt,user:vn,onSetActionType:cn}){const{author:sn,can_delete:gn,content:mn,id:xn,time:jn}=pt;function ti(){cn({id:xn,index:Pt,type:"delete-discuss",parentDiscussIndex:Lt,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const Zn=vn.admin||gn||sn.user_id===vn.user_id;return Le.createElement("div",{className:"discuss-item-container second-discuss "},Le.createElement(cr,{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"},jn),Le.createElement("div",{className:"btn-group",style:{marginBottom:0}},Zn?Le.createElement("a",{onClick:ti,title:"\u5220\u9664"},Le.createElement("i",{className:"iconfont icon-shanchu"})):null)),Le.createElement(Ae.Z,{className:"discuss-content",value:mn})))}var ro=({user:pt,data:Pt,index:Lt,onPlusDiscuss:vn,onSetActionType:cn,activeDiscussIndex:sn,onReplyDiscuss:gn,onSetActiveDiscussIndex:mn})=>{const{content:xn,children:jn,hidden:ti,id:Zn,praise_count:xi,time:Kn,user_praise:mi,can_delete:ai,author:Ri}=Pt;console.log(ai&&(!jn||jn.length==0),"children22");function Oi(){mn(Zn)}function Zi(){vn(Zn,!mi,Lt)}function Ai(){cn({id:Zn,index:Lt,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Ni(){cn({id:Zn,index:Lt,params:{hidden:ti?"0":"1"},type:"hidden-discuss",message:ti?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}const ur=pt.admin||pt.user_id===Ri.user_id;return Le.createElement("div",{className:"discuss-item-container",key:Zn},Le.createElement(cr,{author:Ri}),Le.createElement("section",null,Le.createElement("div",{className:"discuss-info"},Le.createElement("a",{href:`/users/${Ri.login}`,target:"_blank"}," ",Ri.name," "),Le.createElement("span",{className:"grey"},Kn)),Le.createElement(Ae.Z,{className:"discuss-content",value:xn}),jn&&jn.length>0?Le.createElement("div",{className:"reply-discuss-container"},jn.map((ei,Gi)=>Le.createElement(eo,{key:ei.id,data:ei,index:Gi,user:pt,onSetActionType:cn,parentDiscussIndex:Lt}))):null,Le.createElement("div",{className:"btn-group"},(0,gr.Ny)()?Le.createElement("a",{onClick:Ni,title:ti?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},Le.createElement("i",{className:ti?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,ai&&(!jn||jn.length==0)?Le.createElement("a",{onClick:Ai,title:"\u5220\u9664"},Le.createElement("i",{className:"iconfont icon-shanchu"})):null,Le.createElement("a",{onClick:Oi,title:"\u56DE\u590D"}," ",Le.createElement("i",{className:"iconfont icon-huifu1"})," "),Le.createElement("a",{onClick:Zi,className:mi?"c-orange":""},Le.createElement("i",{className:mi?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),Le.createElement("span",null,xi||""))),Le.createElement(Ji.Z,{id:Zn,activeDiscussIndex:sn,onReplyDiscuss:gn})))},hi=Ee(85469),Pr=Ee(64726),Hi=(pt,Pt,Lt)=>new Promise((vn,cn)=>{var sn=xn=>{try{mn(Lt.next(xn))}catch(jn){cn(jn)}},gn=xn=>{try{mn(Lt.throw(xn))}catch(jn){cn(jn)}},mn=xn=>xn.done?vn(xn.value):Promise.resolve(xn.value).then(sn,gn);mn((Lt=Lt.apply(pt,Pt)).next())}),st=({user_praise:pt,praise_count:Pt,praisePlus:Lt,onCreateDiscuss:vn,discuss_count:cn})=>{const[sn,gn]=(0,Le.useState)(!1),[mn,xn]=(0,Le.useState)("");function jn(Kn){xn(Kn)}function ti(){gn(!0)}function Zn(){gn(!1)}function xi(){return Hi(this,null,function*(){vn(mn),xn(""),gn(!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:ti}),Le.createElement("a",{style:{alignItems:"center"}}," ",Le.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",cn," "),Le.createElement("a",{className:"c-light-black",onClick:Lt,style:{alignItems:"center"},title:pt?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},Le.createElement("i",{className:`mr3 ${pt?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"} `}),Pt?Le.createElement("span",null,Pt):"")),sn?Le.createElement("div",{className:"input-mask",onClick:Zn}):null,Le.createElement("div",{className:sn?"md-container":"md-container hide"},Le.createElement(Pr.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:mn,height:240,onChange:jn}),Le.createElement("div",{className:"tip-container",onClick:Zn},Le.createElement("a",{className:"btn-send",onClick:xi}," \u53D1\u9001 "))))},Rr=Object.defineProperty,Er=Object.defineProperties,yo=Object.getOwnPropertyDescriptors,Zr=Object.getOwnPropertySymbols,ao=Object.prototype.hasOwnProperty,Jr=Object.prototype.propertyIsEnumerable,lo=(pt,Pt,Lt)=>Pt in pt?Rr(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,oi=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))ao.call(Pt,Lt)&&lo(pt,Lt,Pt[Lt]);if(Zr)for(var Lt of Zr(Pt))Jr.call(Pt,Lt)&&lo(pt,Lt,Pt[Lt]);return pt},$e=(pt,Pt)=>Er(pt,yo(Pt)),nt=(pt,Pt,Lt)=>new Promise((vn,cn)=>{var sn=xn=>{try{mn(Lt.next(xn))}catch(jn){cn(jn)}},gn=xn=>{try{mn(Lt.throw(xn))}catch(jn){cn(jn)}},mn=xn=>xn.done?vn(xn.value):Promise.resolve(xn.value).then(sn,gn);mn((Lt=Lt.apply(pt,Pt)).next())});const Je={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var wt=(pt=>(pt[pt.GET_DISCUSSES=0]="GET_DISCUSSES",pt[pt.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",pt[pt.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",pt[pt.PLUS_DISCUSS=3]="PLUS_DISCUSS",pt[pt.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",pt[pt.SET_PAGE=5]="SET_PAGE",pt[pt.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",pt))(wt||{});function Nt(pt,Pt){switch(Pt.type){case 6:return $e(oi({},pt),{loading:!0});case 0:return oi(oi({},pt),Pt.payload);case 1:return oi(oi({},pt),Pt.payload);case 4:return oi(oi({},pt),Pt.payload);case 3:return oi(oi({},pt),Pt.payload);case 5:return oi(oi({},pt),Pt.payload);case 2:return oi(oi({},pt),Pt.payload);default:throw new Error}}var kt=({user:pt,identifier:Pt,hack:Lt,onTriggerPraise:vn,setDiscussTotal:cn})=>{const[sn,gn]=(0,Le.useReducer)(Nt,Je),{loading:mn,page:xn,data:jn,count:ti,actionType:Zn,activeDiscussIndex:xi}=sn;console.log("---",sn);const Kn=(0,Le.useCallback)(()=>nt(void 0,null,function*(){gn({type:6});const ei=yield Tn({container_type:"Practice",container_identifier:Pt,limit:10,page:xn}),{comments:Gi,disscuss_count:Ei}=ei;gn({type:0,payload:{data:Gi,count:Ei,loading:!1}}),cn(Ei)}),[xn,Pt]);(0,Le.useEffect)(()=>{Kn()},[Pt,xn]);function mi(ei){gn({type:5,payload:{page:ei}})}function ai(ei){gn({type:4,payload:{actionType:ei}})}function Ri(ei){gn(xi===ei?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:ei}})}function Oi(ei,Gi,Ei){return nt(this,null,function*(){try{const wi=yield ci(ei);jn[Ei].user_praise=Gi,jn[Ei].praise_count=wi.praise_count,gn({type:3,payload:{data:[...jn]}})}catch(wi){console.log(wi)}})}function Zi(){return nt(this,null,function*(){const{id:ei,params:Gi,type:Ei,index:wi,parentDiscussIndex:Yi}=Zn;Ei==="hidden-discuss"&&(console.log(Gi,"params"),yield bi(oi({id:ei,container_type:"Practice",container_identifier:Pt},Gi)),Yi?jn[Yi].children[wi].hidden=Gi.hidden==1:jn[wi].hidden=Gi.hidden==1,gn({type:4,payload:{actionType:null,data:[...jn]}})),Ei==="delete-discuss"&&(yield nr({id:ei,container_type:"Practice",container_identifier:Pt}),gn({type:4,payload:{actionType:null}}),yield Kn())})}function Ai(){gn({type:4,payload:{actionType:null}})}function Ni(ei,Gi){return nt(this,null,function*(){try{yield ri({container_type:"Practice",container_identifier:Pt,comments:{content:Gi,parent_id:ei}}),Kn()}catch(Ei){console.log(Ei)}})}function ur(ei){return nt(this,null,function*(){gn({type:6}),yield Ii({comments:{content:ei},container_type:"Practice",container_identifier:Pt}),Kn()})}return Le.createElement(Le.Fragment,null,Le.createElement("div",{className:"discuss-panel"},jn.length===0?Le.createElement(qe.Z,null):Le.createElement(Se.Z,{spinning:mn},jn.map((ei,Gi)=>Le.createElement(ro,{onReplyDiscuss:Ni,onPlusDiscuss:Oi,onSetActiveDiscussIndex:Ri,onSetActionType:ai,data:ei,index:Gi,user:pt,activeDiscussIndex:xi}))),ti>10?Le.createElement("div",{className:"pagination-container mt10 mb10"},Le.createElement($t.Z,{showQuickJumper:!0,onChange:mi,current:xn,total:ti,showTotal:ei=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},ei),"\u6761\u6570\u636E")})):null),Le.createElement(st,{user_praise:Lt.user_praise,praise_count:Lt.praises_count,praisePlus:vn,discuss_count:Lt.comments_count,onCreateDiscuss:ur}),Le.createElement(ee.Z,null,Le.createElement(he.default,{centered:!0,title:"\u63D0\u793A",open:!!Zn,onOk:Zi,onCancel:Ai},Le.createElement("p",null,Zn?Zn.message:"")),Le.createElement(hi.Z,null)))},_t={flex_box_center:"flex_box_center___tosr6",flex_space_between:"flex_space_between___cQaTP",flex_box_vertical_center:"flex_box_vertical_center___uovxL",flex_box_center_end:"flex_box_center_end___b4gLY",flex_box_column:"flex_box_column___Umjm_",wrap:"wrap___sgoJE",head:"head___b9a9v",sort:"sort___L2Zw8",btn:"btn___khuE4",listWarp:"listWarp___zZj6C",pagination:"pagination___XlROP",fixedRight:"fixedRight___MuAXo","oj-width-input":"oj-width-input___RsZb6"},un={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"},wn=Object.defineProperty,Bn=Object.getOwnPropertySymbols,zn=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,Kt=(pt,Pt,Lt)=>Pt in pt?wn(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,Sn=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))zn.call(Pt,Lt)&&Kt(pt,Lt,Pt[Lt]);if(Bn)for(var Lt of Bn(Pt))At.call(Pt,Lt)&&Kt(pt,Lt,Pt[Lt]);return pt};const kn=pt=>React.createElement("svg",Sn({width:12,height:10,xmlns:"http://www.w3.org/2000/svg"},pt),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 Zt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDBhMSAxIDAgMCAxIDEgMXY4YTEgMSAwIDAgMS0xIDFIMWExIDEgMCAwIDEtMS0xVjFhMSAxIDAgMCAxIDEtMWgxMFpNNC40IDIuNGEuNC40IDAgMCAwLS40LjR2NC40YS40LjQgMCAwIDAgLjY0LjMybDIuNzItMi4wNGEuNi42IDAgMCAwIDAtLjk2TDQuNjQgMi40OGEuNC40IDAgMCAwLS4yNC0uMDhaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",rn=Object.defineProperty,Rn=Object.getOwnPropertySymbols,An=Object.prototype.hasOwnProperty,Qn=Object.prototype.propertyIsEnumerable,Un=(pt,Pt,Lt)=>Pt in pt?rn(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,qn=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))An.call(Pt,Lt)&&Un(pt,Lt,Pt[Lt]);if(Rn)for(var Lt of Rn(Pt))Qn.call(Pt,Lt)&&Un(pt,Lt,Pt[Lt]);return pt};const Nn=pt=>React.createElement("svg",qn({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},pt),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 si="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQ0NDIi8+PC9nPjwvc3ZnPg==",Li=Object.defineProperty,Bi=Object.getOwnPropertySymbols,Ln=Object.prototype.hasOwnProperty,Ui=Object.prototype.propertyIsEnumerable,lr=(pt,Pt,Lt)=>Pt in pt?Li(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,Di=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))Ln.call(Pt,Lt)&&lr(pt,Lt,Pt[Lt]);if(Bi)for(var Lt of Bi(Pt))Ui.call(Pt,Lt)&&lr(pt,Lt,Pt[Lt]);return pt};const Pn=pt=>React.createElement("svg",Di({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},pt),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 Yn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjMDE1MmQ5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",ui=Object.defineProperty,Ti=Object.getOwnPropertySymbols,pi=Object.prototype.hasOwnProperty,Mi=Object.prototype.propertyIsEnumerable,ir=(pt,Pt,Lt)=>Pt in pt?ui(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,Fi=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))pi.call(Pt,Lt)&&ir(pt,Lt,Pt[Lt]);if(Ti)for(var Lt of Ti(Pt))Mi.call(Pt,Lt)&&ir(pt,Lt,Pt[Lt]);return pt};const Wi=pt=>React.createElement("svg",Fi({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},pt),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 hr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNC43MTcuMDFoOC44NGMxLjU3MSAwIDIuMzU3Ljc3NyAyLjM1NyAyLjMzMnY1LjI1YzAgMS41NTYtLjc4NiAyLjMzNC0yLjM1NyAyLjMzNGgtOC44NGMtMS41NzIgMC0yLjM1Ny0uNzc4LTIuMzU3LTIuMzM0di01LjI1QzIuMzYuNzg3IDMuMTQ1LjAxIDQuNzE3LjAxWiIgZmlsbD0iIzk5OSIvPjxwYXRoIGQ9Ik0yLjM2IDIuMzQyaDguODRhMi4zNyAyLjM3IDAgMCAxIDEuNjY2LjY4NGMuNDQyLjQzNy42OSAxLjAzLjY5IDEuNjV2NS4yNWMwIDEuMjg4LTEuMDU1IDIuMzMzLTIuMzU3IDIuMzMzSDcuOTRsLTEuMTYgMS4xNTMtMS4xNjctMS4xNTNIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NXYtNS4yNWMwLS42Mi4yNDgtMS4yMTMuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4NFoiIGZpbGw9IiNCNkQwRkMiLz48cGF0aCBkPSJNMi4zNiAyLjkyNmg4Ljg0YzEuMzAxIDAgMi4zNTcgMS4wNDQgMi4zNTcgMi4zMzN2NS4yNWMwIC42MTktLjI0OSAxLjIxMi0uNjkgMS42NWEyLjM3IDIuMzcgMCAwIDEtMS42NjguNjgzSDcuOTRsLTEuMTYgMS4xNTQtMS4xNjctMS4xNTRIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NVY1LjI2YzAtLjYxOS4yNDgtMS4yMTIuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4M1oiIGZpbGw9IiNDQ0MiLz48cGF0aCBkPSJNMy41MzggNS44NDJoNi40ODNjLjM5MyAwIC41ODkuMTk1LjU4OS41ODQgMCAuMzg5LS4xOTYuNTgzLS41OS41ODNIMy41MzljLS4zOTMgMC0uNTktLjE5NC0uNTktLjU4MyAwLS4zOS4xOTctLjU4NC41OS0uNTg0Wk0zLjUzOCA4Ljc2aDQuNzE1Yy4zOTMgMCAuNTkuMTk0LjU5LjU4MiAwIC4zOS0uMTk3LjU4NC0uNTkuNTg0SDMuNTM4Yy0uMzkzIDAtLjU5LS4xOTUtLjU5LS41ODQgMC0uMzg4LjE5Ny0uNTgzLjU5LS41ODNaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==",In=Object.defineProperty,zr=Object.getOwnPropertySymbols,On=Object.prototype.hasOwnProperty,wr=Object.prototype.propertyIsEnumerable,po=(pt,Pt,Lt)=>Pt in pt?In(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,Ar=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))On.call(Pt,Lt)&&po(pt,Lt,Pt[Lt]);if(zr)for(var Lt of zr(Pt))wr.call(Pt,Lt)&&po(pt,Lt,Pt[Lt]);return pt};const To=pt=>React.createElement("svg",Ar({width:16,height:12,xmlns:"http://www.w3.org/2000/svg"},pt),React.createElement("title",null,"\u67E5\u770B1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M7.965 11.961C2.593 11.961 0 6.926 0 5.981 0 5.035 2.623 0 7.965 0s7.965 4.984 7.965 5.98c0 .997-2.593 5.981-7.965 5.981Zm0-2.208c1.296 0 2.494-.72 3.142-1.886a3.902 3.902 0 0 0 0-3.773c-.648-1.167-1.846-1.886-3.142-1.886-2.004 0-3.629 1.69-3.629 3.773s1.625 3.772 3.629 3.772Z",fill:"#CCC"}),React.createElement("path",{d:"M7.965 8.28c-1.222 0-2.213-1.029-2.213-2.3 0-1.27.991-2.3 2.213-2.3s2.212 1.03 2.212 2.3c0 1.271-.99 2.3-2.212 2.3Z",fill:"#999"})));var oo="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNy45NjUgMTEuOTYxQzIuNTkzIDExLjk2MSAwIDYuOTI2IDAgNS45ODEgMCA1LjAzNSAyLjYyMyAwIDcuOTY1IDBzNy45NjUgNC45ODQgNy45NjUgNS45OGMwIC45OTctMi41OTMgNS45ODEtNy45NjUgNS45ODFabTAtMi4yMDhjMS4yOTYgMCAyLjQ5NC0uNzIgMy4xNDItMS44ODZhMy45MDIgMy45MDIgMCAwIDAgMC0zLjc3M2MtLjY0OC0xLjE2Ny0xLjg0Ni0xLjg4Ni0zLjE0Mi0xLjg4Ni0yLjAwNCAwLTMuNjI5IDEuNjktMy42MjkgMy43NzNzMS42MjUgMy43NzIgMy42MjkgMy43NzJaIiBmaWxsPSIjQ0NDIi8+PHBhdGggZD0iTTcuOTY1IDguMjhjLTEuMjIyIDAtMi4yMTMtMS4wMjktMi4yMTMtMi4zIDAtMS4yNy45OTEtMi4zIDIuMjEzLTIuM3MyLjIxMiAxLjAzIDIuMjEyIDIuM2MwIDEuMjcxLS45OSAyLjMtMi4yMTIgMi4zWiIgZmlsbD0iIzk5OSIvPjwvZz48L3N2Zz4=",Qi=({style:pt={},onClick:Pt,onAssist:Lt,onHide:vn,data:cn,active:sn,showLine:gn})=>Le.createElement(Le.Fragment,null,Le.createElement("div",{className:sn===(cn==null?void 0:cn.id)?`${un.list} ${un.active}`:un.list,style:pt,onClick:()=>Pt(cn)},(cn==null?void 0:cn.video)&&Le.createElement("div",{className:un.left},Le.createElement("img",{src:cn==null?void 0:cn.video_cover}),Le.createElement("div",null,Le.createElement("img",{src:Zt}),Le.createElement("span",null,cn==null?void 0:cn.video_duration)),Le.createElement("div",{className:un.mask})),Le.createElement("div",{className:un.right},Le.createElement("div",{className:un.name},Le.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+(cn==null?void 0:cn.image_url),width:30,height:30}),Le.createElement("div",{title:cn==null?void 0:cn.name,className:un.title},cn==null?void 0:cn.name),(cn==null?void 0:cn.is_authority)&&Le.createElement("div",{className:un.b},"\u5B98\u65B9"),(cn==null?void 0:cn.is_excellent)&&Le.createElement("div",{className:un.a},"\u7CBE\u9009")),Le.createElement("div",{className:un.des},Le.createElement(Ae.Z,{showLines:2,showTextOnly:!0,value:(cn==null?void 0:cn.content)||"\u6682\u65E0\u5185\u5BB9"})),Le.createElement("div",{className:un.tag},Le.createElement("span",{className:"current",onClick:mn=>{mn.stopPropagation(),Lt(cn)}},Le.createElement("img",{src:cn!=null&&cn.user_liker?Yn:si}),Le.createElement("span",{style:{color:cn!=null&&cn.user_liker?"#0152d9":"#656f87"}},cn==null?void 0:cn.praises_count)),Le.createElement("span",null,Le.createElement("img",{src:hr}),Le.createElement("span",null,cn==null?void 0:cn.discusses_count)),Le.createElement("span",null,Le.createElement("img",{src:oo}),Le.createElement("span",null,cn==null?void 0:cn.viewed_count)),(0,gr.Ny)()&&Le.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:mn=>{mn.stopPropagation(),vn(cn)}},cn!=null&&cn.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),gn&&Le.createElement("div",{className:un.line})),fr={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"},Mr=Ee(6848),fi=Ee(60918),Tt=Object.defineProperty,Ir=Object.getOwnPropertySymbols,ho=Object.prototype.hasOwnProperty,Zo=Object.prototype.propertyIsEnumerable,Po=(pt,Pt,Lt)=>Pt in pt?Tt(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,$o=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))ho.call(Pt,Lt)&&Po(pt,Lt,Pt[Lt]);if(Ir)for(var Lt of Ir(Pt))Zo.call(Pt,Lt)&&Po(pt,Lt,Pt[Lt]);return pt};const Yo=pt=>React.createElement("svg",$o({width:32,height:30,xmlns:"http://www.w3.org/2000/svg"},pt),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 Sr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNiAwQzEuMTc1IDAgLjc2OC4xNy40NjguNDc0QTEuNjMgMS42MyAwIDAgMCAwIDEuNjIydjMuMjQzaDMuMjM3TDcuMzc4IDBIMS42Wm03Ljg3NiAwTDUuMzM4IDQuODY1aDUuOUwxNS4zNzEgMEg5LjQ3NlptNy45OTggMC00LjEzNyA0Ljg2NWg1Ljg5NkwyMy4zNzIgMGgtNS44OThabTggMC00LjEzOCA0Ljg2NWg2LjY2VjEuNjIyYTEuNjI5IDEuNjI5IDAgMCAwLS40NjctMS4xNDhBMS41ODUgMS41ODUgMCAwIDAgMjYuMzk3IDBoLS45MjRaTTAgNi40ODd2MTcuODM3YzAgLjQzLjE2Ny44NDQuNDY4IDEuMTQ4LjMuMzA1LjcwNy40NzUgMS4xMzIuNDc0aDE4LjYxYTYuNTE1IDYuNTE1IDAgMCAxIDEuNjUyLTYuMjE4IDYuMzEgNi4zMSAwIDAgMSA2LjEzNC0xLjY3NVY2LjQ4N0gwWm0xMS45OTggNS42NzUgNi40IDQuMDU2LTYuNCA0LjA1NXYtOC4xMVptMTQuMzk5IDYuNDg3Yy0zLjA5Mi4wMDItNS41OTcgMi41NDQtNS41OTUgNS42NzguMDAxIDMuMTM0IDIuNTA4IDUuNjc0IDUuNiA1LjY3M0MyOS40OTQgMzAgMzIgMjcuNDU4IDMyIDI0LjMyNGMwLTEuNTA2LS41OS0yLjk1LTEuNjQxLTQuMDE0YTUuNTYxIDUuNTYxIDAgMCAwLTMuOTYyLTEuNjYxWm0wIDIuMDI3Yy4yMi4wMDMuNDI4LjEuNTc0LjI2Ni42NjMuNiAxLjMyNyAxLjM1MiAxLjk5IDIuMDAyYS44LjggMCAwIDEgMCAxLjE0Ljc4OC43ODggMCAwIDEtMS4xMjUgMGwtLjYzOC0uNjQ2djMuNzI0YS44MTQuODE0IDAgMCAxLS4zOTIuNzI0Ljc5Ljc5IDAgMCAxLS44MTUgMCAuODE0LjgxNCAwIDAgMS0uMzkyLS43MjR2LTMuNzI0bC0uNjM3LjY0NmEuNzkuNzkgMCAwIDEtLjc3My4yMTUuODAzLjgwMyAwIDAgMS0uNTY3LS41NzUuODE2LjgxNiAwIDAgMSAuMjEyLS43ODNjLjY1MS0uNjY0IDEuMzMzLTEuMzg4IDEuOTktMi4wMDJhLjc3OC43NzggMCAwIDEgLjU3NS0uMjY2bC0uMDAyLjAwM1oiIGZpbGw9IiMwMTUyZDkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",yr=Object.defineProperty,qi=Object.getOwnPropertySymbols,Qr=Object.prototype.hasOwnProperty,_o=Object.prototype.propertyIsEnumerable,rr=(pt,Pt,Lt)=>Pt in pt?yr(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,ji=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))Qr.call(Pt,Lt)&&rr(pt,Lt,Pt[Lt]);if(qi)for(var Lt of qi(Pt))_o.call(Pt,Lt)&&rr(pt,Lt,Pt[Lt]);return pt};const Xn=pt=>React.createElement("svg",ji({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},pt),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 er="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1IDBjOC4yODUgMCAxNSA2LjcxNyAxNSAxNSAwIDguMjg1LTYuNzE1IDE1LTE1IDE1LTguMjgzIDAtMTUtNi43MTUtMTUtMTVDMCA2LjcxNyA2LjcxNyAwIDE1IDBabTEwLjA0MSA3LjV2LjAxYTQ3LjkzNCA0Ny45MzQgMCAwIDAtMTEuMjMyIDkuMzg2bC00LjM3Mi0zLjN2LS4wMDJMNy41IDE1LjA4bDcuNTUzIDcuNDJBNDQuNjI1IDQ0LjYyNSAwIDAgMSAyNS41IDguNTVsLS40NTktMS4wNVoiIGZpbGw9IiM0NEQ3QjYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",no=Object.defineProperty,Lo=Object.getOwnPropertySymbols,ko=Object.prototype.hasOwnProperty,Xo=Object.prototype.propertyIsEnumerable,Ss=(pt,Pt,Lt)=>Pt in pt?no(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,os=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))ko.call(Pt,Lt)&&Ss(pt,Lt,Pt[Lt]);if(Lo)for(var Lt of Lo(Pt))Xo.call(Pt,Lt)&&Ss(pt,Lt,Pt[Lt]);return pt};const Is=pt=>React.createElement("svg",os({xmlns:"http://www.w3.org/2000/svg",width:20,height:20},pt),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 ps="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0FGQkFDQiIgZD0iTTkuOTkuMDJDNC40ODIuMDIuMDIgNC40ODIuMDIgOS45OWMwIDUuNTA2IDQuNDYzIDkuOTcgOS45NyA5Ljk3IDUuNTA2IDAgOS45Ny00LjQ2NCA5Ljk3LTkuOTcgMC01LjUwNy00LjQ2NC05Ljk3LTkuOTctOS45N1ptMS42MzYgMTMuNjljLS43NDQgMS4xOS0xLjQ4OCAyLjA4My0yLjgyNyAyLjA4My0uODkzLS4xNDktMS4xOS0uNzQ0LTEuMDQyLTEuNDg4bDEuNjM3LTUuNTA2YzAtLjE0OSAwLS4yOTgtLjE0OS0uMjk4LS4xNDggMC0uNDQ2IDAtLjU5NS4yOThsLTEuMDQyIDEuMTl2LS43NDRjLjc0NS0xLjE5IDEuOTM1LTIuMDgzIDIuODI4LTIuMDgzLjc0NC4xNDkgMS4xOS43NDQgMS4wNDIgMS40ODhMOS44NCAxNC4zMDVjMCAuMTQ5IDAgLjI5OC4xNDguMjk4LjE1IDAgLjQ0Ny0uMTUuNTk2LS4yOThsMS4wNDEtMS4zNHYuNzQ1Wm0tLjI5Ny03LjI5MmMtLjU5NiAwLTEuMTktLjQ0Ni0xLjE5LTEuMTkgMC0uNzQ1LjQ0Ni0xLjE5MSAxLjE5LTEuMTkxLjU5NSAwIDEuMTkuNDQ2IDEuMTkgMS4xOSAwIC43NDUtLjU5NSAxLjE5MS0xLjE5IDEuMTkxWiIvPjwvc3ZnPg==",sa=Object.defineProperty,_n=Object.getOwnPropertySymbols,Cs=Object.prototype.hasOwnProperty,Pu=Object.prototype.propertyIsEnumerable,Na=(pt,Pt,Lt)=>Pt in pt?sa(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,ma=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))Cs.call(Pt,Lt)&&Na(pt,Lt,Pt[Lt]);if(_n)for(var Lt of _n(Pt))Pu.call(Pt,Lt)&&Na(pt,Lt,Pt[Lt]);return pt},gs=(pt,Pt,Lt)=>new Promise((vn,cn)=>{var sn=xn=>{try{mn(Lt.next(xn))}catch(jn){cn(jn)}},gn=xn=>{try{mn(Lt.throw(xn))}catch(jn){cn(jn)}},mn=xn=>xn.done?vn(xn.value):Promise.resolve(xn.value).then(sn,gn);mn((Lt=Lt.apply(pt,Pt)).next())});const su=(pt,Pt)=>{var Lt,vn,cn;const{uploadInfo:sn={}}=Pt.payload;switch(Pt.type){case"addVideo":return{videoList:[...pt.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:pt.videoList.filter(gn=>gn.name!==Pt.payload.name)};case"replaceVideo":return{videoList:Pt.payload};case"removeAll":return[];case"updateProgress":return{videoList:pt.videoList.map(gn=>gn.name===Pt.payload.uploadInfo.file.name?ma(ma({},gn),{loaded:Pt.payload.progressPercent,video_id:sn.videoId,fileHash:sn.fileHash}):gn)};case"updateTitle":return{videoList:(Lt=pt.videoList)==null?void 0:Lt.map(gn=>gn.name===Pt.payload.item.name?ma(ma({},gn),{title:Pt.payload.title}):gn)};case"updateImg":return{videoList:(vn=pt.videoList)==null?void 0:vn.map(gn=>gn.name===Pt.payload.item.name?ma(ma({},gn),{attachment_id:Pt.payload.attachment_id}):gn)};case"updateImg":return{videoList:(cn=pt.videoList)==null?void 0:cn.map(gn=>gn.name===Pt.payload.item.name?ma(ma({},gn),{attachment_id:Pt.payload.attachment_id}):gn)};default:return[]}};var fo=({onClose:pt,onOk:Pt,identifier:Lt,active:vn})=>{var cn,sn;const[gn]=rt.default.useForm(),[mn,xn]=(0,Le.useState)({}),[jn,ti]=(0,Le.useState)(!1),[Zn,xi]=(0,Le.useState)(!1),[Kn,mi]=(0,Le.useReducer)(su,{videoList:[]}),ai=(0,gr.eY)(),Ri=(0,Te.useParams)(),Oi=(0,Le.useRef)();(0,Le.useEffect)(()=>{vn&&Zi()},[vn]);const Zi=()=>gs(void 0,null,function*(){var Ki,vr,or,wo,Eo,ns,uo,Nr,Io,Dr;const Vr=yield(0,ge.M3)(Lt,{active:vn});if((Vr==null?void 0:Vr.status)===0){const is={name:(Ki=Vr==null?void 0:Vr.data)==null?void 0:Ki.name,content:(vr=Vr==null?void 0:Vr.data)==null?void 0:vr.content};gn.setFieldsValue(is),xn(is),(wo=(or=Vr==null?void 0:Vr.data)==null?void 0:or.videos)!=null&&wo[0]&&mi({type:"replaceVideo",payload:[{video_id:(uo=(ns=(Eo=Vr==null?void 0:Vr.data)==null?void 0:Eo.videos)==null?void 0:ns[0])==null?void 0:uo.video_id,name:(Dr=(Io=(Nr=Vr==null?void 0:Vr.data)==null?void 0:Nr.videos)==null?void 0:Io[0])==null?void 0:Dr.title,loaded:100}]})}}),Ai=(Ki,vr)=>{xn(ma({},vr))},Ni=Ki=>gs(void 0,null,function*(){const vr={videos:Kn.videoList,articles:Ki};xi(!0);let or;vn?(vr.active=vn,or=yield(0,ge.gu)(Lt,vr)):or=yield(0,ge.bx)(Lt,vr),(or==null?void 0:or.status)===0&&(console.log(vn||(or==null?void 0:or.id),44),Pt(vn||(or==null?void 0:or.id))),xi(!1)}),ur=()=>{const Ki=document.getElementById("fileUpload");Ki.value=""},ei=Ki=>{var vr='{"Vod":{}}';if(ti(!0),Oi.current){Oi.current.addFile(Ki,null,null,null,vr);return}(0,fi.o)(ai==null?void 0:ai.login,"",{create:!Oi,addFileSuccess:or=>{mi({type:"addVideo",payload:{uploadInfo:or}})},onUploadProgress:(or,wo,Eo)=>{const ns=Math.ceil(Eo*100);mi({type:"updateProgress",payload:{uploadInfo:or,progressPercent:ns}}),ur()},onUploadFailed:or=>{Pe.ZP.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:or=>{ti(!1)},onUploadSucceed:or=>{ti(!1)},onUploadError:or=>{ti(!1)},gotUploader:or=>{or.addFile(Ki,null,null,null,vr),Oi.current=or}})},Gi=Ki=>{var vr;const wo=Ki.target.files[0];if(!wo){ur();return}let Eo=wo.name.toLowerCase();if(Eo&&Eo.indexOf(".avi")==-1&&Eo.indexOf(".flv")==-1&&Eo.indexOf(".f4v")==-1&&Eo.indexOf(".m4v")==-1&&Eo.indexOf(".mov")==-1&&Eo.indexOf(".mp4")==-1&&Eo.indexOf(".rmvb")==-1&&Eo.indexOf(".swf")==-1&&Eo.indexOf(".webm")==-1&&Eo.indexOf(".wmv")==-1){Pe.ZP.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),ur();return}if(wo.size>1024*1024*1024){Pe.ZP.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71024M"),ur();return}if((vr=Kn.videoList)!=null&&vr.find(ns=>ns.name===wo.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"),ur();return}ei(wo)},Ei=(Ki,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:()=>{ur(),mi({type:"removeVideo",payload:{name:Ki}})}})},wi=()=>Le.createElement("label",{htmlFor:"fileUpload",className:fr.main},Le.createElement("img",{src:Sr,alt:""}),Le.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891")),Yi=Ki=>Le.createElement("div",{className:fr.mainLoading},Le.createElement("div",{className:fr.proWarp},Le.createElement("div",{className:fr.pro},Le.createElement("div",{style:{width:Ki}})),Le.createElement("span",null,Ki||0,"%")),Le.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),Le.createElement("div",{className:fr.tip},Le.createElement(Mr.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:ps,alt:""})))),gi=Ki=>Le.createElement("div",{className:fr.mainSucceed},Le.createElement("img",{src:er,alt:""}),Le.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),Le.createElement("div",{className:fr.tip},Le.createElement(Mr.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:ps,alt:""}))),Le.createElement("div",{className:fr.del,onClick:()=>Ei(Ki.name,Ki.loaded==100)},Le.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891")),dr=()=>{var Ki;return Le.createElement(Le.Fragment,null,(Ki=Kn.videoList)==null?void 0:Ki.map((vr,or)=>Le.createElement(Le.Fragment,{key:or},vr.loaded==100?gi(vr):Yi(vr.loaded))))},Xi=()=>{he.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:pt})},Pi=(cn=Kn.videoList)==null?void 0:cn.length;return Le.createElement("div",{className:fr.listForm},Le.createElement("header",null,vn?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),Le.createElement("section",{className:fr.scroll,id:"sss"},Le.createElement("div",{className:fr.formWrap}," ",Le.createElement(rt.default,{form:gn,scrollToFirstError:!0,layout:"vertical",onValuesChange:Ai,onFinish:Ni},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=mn.name)==null?void 0:sn.length)||0}/60`})),Le.createElement(rt.default.Item,{name:"content",label:"\u5185\u5BB9:"},Le.createElement(Pr.Z,{defaultValue:mn.content||"",watch:!0})))),Le.createElement("div",{className:fr.upload},Pi?dr():wi(),Le.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:Gi,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}))),Le.createElement("div",{className:fr.btns},Le.createElement(dt.ZP,{onClick:Xi,type:"primary",ghost:!0},"\u5173\u95ED"),Le.createElement(dt.ZP,{loading:Zn,disabled:jn,onClick:()=>gn.submit(),type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},Lr={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"},La=Ee(61621),Cr=Object.defineProperty,to=Object.getOwnPropertySymbols,Kr=Object.prototype.hasOwnProperty,Ci=Object.prototype.propertyIsEnumerable,us=(pt,Pt,Lt)=>Pt in pt?Cr(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,Ts=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))Kr.call(Pt,Lt)&&us(pt,Lt,Pt[Lt]);if(to)for(var Lt of to(Pt))Ci.call(Pt,Lt)&&us(pt,Lt,Pt[Lt]);return pt};const ba=pt=>React.createElement("svg",Ts({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:15,height:16},pt),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 Ha="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNi4zODUuMjU3Yy42MTYtLjM0MyAxLjYxNi0uMzQyIDIuMjMgMGw1LjI3IDIuOTRDMTQuNTAxIDMuNTM4IDE1IDQuMzggMTUgNS4wNzF2NS44NTZjMCAuNjkyLS41MDEgMS41MzMtMS4xMTUgMS44NzZsLTUuMjcgMi45MzljLS42MTYuMzQzLTEuNjE2LjM0Mi0yLjIzIDBsLTUuMjctMi45NEMuNDk5IDEyLjQ2MiAwIDExLjYyMiAwIDEwLjkyOVY1LjA3MkMwIDQuMzguNTAxIDMuNTQgMS4xMTUgMy4xOTZabTEuNDIzIDMuODE3Yy0uMTY5LS4zNDEtLjQ0Ni0uMzQxLS42MTUgMEw2LjM4IDUuNzE3Yy0uMTY5LjM0MS0uNjE2LjY2NS0uOTk0LjcybC0xLjgyLjI2NGMtLjM3OC4wNTUtLjQ2NC4zMTctLjE5LjU4M2wxLjMxNyAxLjI3OGMuMjczLjI2Ni40NDQuNzkuMzggMS4xNjVsLS4zMSAxLjgwNmMtLjA2Ni4zNzYuMTU4LjUzOC40OTYuMzZsMS42MjgtLjg1M2MuMzM4LS4xNzcuODktLjE3NyAxLjIzIDBsMS42MjcuODUzYy4zMzcuMTc3LjU2MS4wMTUuNDk3LS4zNmwtLjMxLTEuODA2Yy0uMDY1LS4zNzUuMTA1LS44OTkuMzc5LTEuMTY1bDEuMzE2LTEuMjc4Yy4yNzQtLjI2Ni4xODgtLjUyOS0uMTktLjU4M2wtMS44MTktLjI2NGMtLjM3Ny0uMDU0LS44MjUtLjM3OC0uOTk0LS43MloiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48dXNlIGZpbGw9IiM4REM5RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz48Y2lyY2xlIGN4PSItMS41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLTIuNSIgY3k9Ii00LjUiIHI9IjEyLjUiIGZpbGw9IiNFRUY3RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4=",Qa=Object.defineProperty,yi=Object.getOwnPropertySymbols,ms=Object.prototype.hasOwnProperty,Ys=Object.prototype.propertyIsEnumerable,qa=(pt,Pt,Lt)=>Pt in pt?Qa(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,xl=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))ms.call(Pt,Lt)&&qa(pt,Lt,Pt[Lt]);if(yi)for(var Lt of yi(Pt))Ys.call(Pt,Lt)&&qa(pt,Lt,Pt[Lt]);return pt};const Ol=pt=>React.createElement("svg",xl({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},pt),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,Oa=Object.getOwnPropertySymbols,Ua=Object.prototype.hasOwnProperty,ka=Object.prototype.propertyIsEnumerable,Kl=(pt,Pt,Lt)=>Pt in pt?nc(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,_u=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))Ua.call(Pt,Lt)&&Kl(pt,Lt,Pt[Lt]);if(Oa)for(var Lt of Oa(Pt))ka.call(Pt,Lt)&&Kl(pt,Lt,Pt[Lt]);return pt};const Ga=pt=>React.createElement("svg",_u({width:22,height:20,xmlns:"http://www.w3.org/2000/svg"},pt),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 Wa="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),Il={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=(pt,Pt,Lt)=>new Promise((vn,cn)=>{var sn=xn=>{try{mn(Lt.next(xn))}catch(jn){cn(jn)}},gn=xn=>{try{mn(Lt.throw(xn))}catch(jn){cn(jn)}},mn=xn=>xn.done?vn(xn.value):Promise.resolve(xn.value).then(sn,gn);mn((Lt=Lt.apply(pt,Pt)).next())});const Gu=({id:pt,cb:Pt})=>{const[Lt,vn]=(0,Le.useState)("");return Le.createElement("aside",{className:"mt10"},Le.createElement(Pr.Z,{defaultValue:Lt,id:"writeForumsReviewId",onChange:cn=>{vn(cn)},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(pt,Lt)})},"\u53D1\u9001"))))},Lu=({data:pt})=>{var Pt;return Le.createElement("div",{className:Il.thirdlyLevelDiscuss},Le.createElement("span",{className:"c-grey-333"},Le.createElement("span",{className:"font 14 c-light-primary"},(Pt=pt==null?void 0:pt.author)==null?void 0:Pt.name),"@",Le.createElement("span",{className:"font 14 c-light-primary"},pt==null?void 0:pt.parent_name),":"),Le.createElement(Ae.Z,{value:pt==null?void 0:pt.content}))},wl=({data:pt,onReplyDiscuss:Pt,thirdlyReply:Lt,setThirdlyReply:vn})=>{var cn,sn,gn,mn;const xn=(0,gr.eY)();return console.log(xn,"user"),Le.createElement("div",{className:Il.list},Le.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+((cn=pt==null?void 0:pt.author)==null?void 0:cn.image_url)}),Le.createElement("div",{className:Il.wrap},Le.createElement("div",{className:"font14",style:{marginBottom:6}},Le.createElement("span",{className:"c-grey-333"},(sn=pt==null?void 0:pt.author)==null?void 0:sn.name),(xn==null?void 0:xn.login)!==((gn=pt==null?void 0:pt.author)==null?void 0:gn.login)&&Le.createElement("span",{onClick:()=>vn(pt==null?void 0:pt.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:pt==null?void 0:pt.content}),(mn=pt==null?void 0:pt.children)==null?void 0:mn.map(jn=>Le.createElement(Lu,{key:jn.id,data:jn})),Lt===(pt==null?void 0:pt.id)&&Le.createElement("div",null,Le.createElement(Gu,{id:pt==null?void 0:pt.id,cb:Pt}),Le.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:()=>vn(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:Il.line})))};var xc=({data:pt,onReplyDiscuss:Pt,secondReply:Lt,setSecondReply:vn,thirdlyReply:cn,setThirdlyReply:sn,onPlusDiscuss:gn})=>{var mn,xn,jn,ti;const[Zn,xi]=(0,Le.useState)(!1);return console.log(pt,"data"),Le.createElement("div",{className:Il.discussItem},Le.createElement("div",{className:Il.list},Le.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+((mn=pt==null?void 0:pt.author)==null?void 0:mn.image_url)}),Le.createElement("div",{className:Il.wrap},Le.createElement("div",{className:"font14",style:{marginBottom:6}},Le.createElement("span",{className:"c-grey-333 mr30"},(xn=pt==null?void 0:pt.author)==null?void 0:xn.name),Le.createElement("span",{className:"c-grey-999"},pt==null?void 0:pt.time)),Le.createElement(Ae.Z,{value:pt==null?void 0:pt.content}),Le.createElement("div",{className:Il.btns},Le.createElement("div",{onClick:()=>gn(pt==null?void 0:pt.id),className:pt!=null&&pt.user_praise?"c-light-primary":"c-grey-999"},Le.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),Le.createElement("span",null,pt==null?void 0:pt.praise_count)),Le.createElement("div",{onClick:()=>{var Kn;((Kn=pt==null?void 0:pt.children)==null?void 0:Kn.length)!==0&&(vn(null),xi(!Zn))},style:{color:Zn?"#0152d9":"#999999"}},Le.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),Le.createElement("span",null,Zn?"\u6536\u8D77\u8BC4\u8BBA":(jn=pt==null?void 0:pt.children)==null?void 0:jn.length)),Le.createElement("div",{onClick:()=>{xi(!1),vn(Lt===(pt==null?void 0:pt.id)?null:pt==null?void 0:pt.id)},style:{color:Lt===(pt==null?void 0:pt.id)?"#0152d9":"#999999"}},Le.createElement("i",{className:"iconfont icon-huifu3 mr3"}),Le.createElement("span",null,Lt===(pt==null?void 0:pt.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),Lt===(pt==null?void 0:pt.id)&&Le.createElement(Gu,{id:pt==null?void 0:pt.id,cb:(Kn,mi)=>{Pt(Kn,mi),xi(!0)}}),Zn&&Le.createElement("div",{className:Il.secondLevelDiscuss},(ti=pt==null?void 0:pt.children)==null?void 0:ti.map(Kn=>Le.createElement(wl,{thirdlyReply:cn,setThirdlyReply:sn,key:Kn.id,data:Kn,onReplyDiscuss:Pt}))))))},lu=(pt,Pt,Lt)=>new Promise((vn,cn)=>{var sn=xn=>{try{mn(Lt.next(xn))}catch(jn){cn(jn)}},gn=xn=>{try{mn(Lt.throw(xn))}catch(jn){cn(jn)}},mn=xn=>xn.done?vn(xn.value):Promise.resolve(xn.value).then(sn,gn);mn((Lt=Lt.apply(pt,Pt)).next())}),zo=({identifier:pt,active:Pt,onOk:Lt})=>{const[vn,cn]=(0,Le.useState)(""),[sn,gn]=(0,Le.useState)(1),[mn,xn]=(0,Le.useState)([]),[jn,ti]=(0,Le.useState)(0),[Zn,xi]=(0,Le.useState)(null),[Kn,mi]=(0,Le.useState)(null);(0,Le.useEffect)(()=>{ai(1),gn(1)},[Pt]);const ai=Ni=>lu(void 0,null,function*(){const ur=yield Tn({container_type:"QuestionSolutionArticle",container_identifier:Pt,limit:5,page:Ni});ur!=null&&ur.comments&&(xn((ur==null?void 0:ur.comments)||[]),gn(Ni),ti(ur==null?void 0:ur.disscuss_count))}),Ri=()=>lu(void 0,null,function*(){if(vn===""){Pe.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");return}const Ni=yield Ii({comments:{content:vn},container_type:"QuestionSolutionArticle",container_identifier:Pt});Ni!=null&&Ni.discuss&&(cn(""),ai(sn),Lt())}),Oi=(Ni,ur,ei)=>lu(void 0,null,function*(){const Gi=yield ri({container_type:"QuestionSolutionArticle",container_identifier:Pt,comments:{content:ur,parent_id:Ni}});xi(null),mi(null),ai(sn)}),Zi=Ni=>lu(void 0,null,function*(){const ur=yield ci(Ni);ai(sn)}),Ai=Ni=>{gn(Ni),ai(Ni)};return Le.createElement("div",{className:Uu.discuss},Le.createElement("aside",{className:Uu.reply,style:{borderWidth:jn?1:0}},Le.createElement(Pr.Z,{defaultValue:vn,id:"writeForumsReviewId",onChange:Ni=>{cn(Ni)},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:()=>Ri()},"\u53D1\u9001")))),mn==null?void 0:mn.map(Ni=>Le.createElement(xc,{secondReply:Zn,setSecondReply:xi,thirdlyReply:Kn,setThirdlyReply:mi,key:Ni.id,data:Ni,onReplyDiscuss:Oi,onPlusDiscuss:Zi})),Le.createElement($t.Z,{className:Uu.pagination,showTotal:Ni=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},Ni),"\u6761\u6570\u636E"),current:sn,onChange:Ai,total:jn,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},Ma=Ee(71628),na=Object.defineProperty,Ds=Object.getOwnPropertySymbols,Ps=Object.prototype.hasOwnProperty,ks=Object.prototype.propertyIsEnumerable,Ws=(pt,Pt,Lt)=>Pt in pt?na(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,Zs=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))Ps.call(Pt,Lt)&&Ws(pt,Lt,Pt[Lt]);if(Ds)for(var Lt of Ds(Pt))ks.call(Pt,Lt)&&Ws(pt,Lt,Pt[Lt]);return pt},Vl=(pt,Pt,Lt)=>new Promise((vn,cn)=>{var sn=xn=>{try{mn(Lt.next(xn))}catch(jn){cn(jn)}},gn=xn=>{try{mn(Lt.throw(xn))}catch(jn){cn(jn)}},mn=xn=>xn.done?vn(xn.value):Promise.resolve(xn.value).then(sn,gn);mn((Lt=Lt.apply(pt,Pt)).next())}),Rs=({active:pt,identifier:Pt,onAssist:Lt,onEdit:vn,onArticlesSkip:cn,onClose:sn,onOk:gn,onDelete:mn,detailsIndex:xn,btnShowStatus:jn})=>{var ti,Zn,xi,Kn,mi,ai,Ri,Oi,Zi,Ai;const[Ni,ur]=(0,Le.useState)(!0),[ei,Gi]=(0,Le.useState)({});(0,Le.useEffect)(()=>{pt&&Ei()},[pt,xn]);const Ei=(Xi=!0)=>Vl(void 0,null,function*(){Xi&&ur(!0);const Pi=yield(0,ge.wO)(Pt,{active:pt});(Pi==null?void 0:Pi.status)===0&&Gi((Pi==null?void 0:Pi.data)||{}),ur(!1)}),wi=Xi=>Vl(void 0,null,function*(){const Pi=yield(0,ge.qe)(Pt,Zs({active:pt},Xi));(Pi==null?void 0:Pi.status)===0&&(Ei(!1),gn())}),Yi=Xi=>Vl(void 0,null,function*(){(yield(0,ge.Rg)(Pt,{active:Xi==null?void 0:Xi.id})).status===0&&(Ei(!1),gn())}),gi=Xi=>{he.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:null,className:"custom-modal-divider",content:"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u9898\u89E3\u5417?",onOk:()=>mn(Xi)})},dr=()=>{Ei(!1),gn()};return Le.createElement("div",{className:Lr.listDetails},Le.createElement(La.Z,{className:"pt20 pl20 pr20",loading:Ni,active:!0,paragraph:{rows:5}},Le.createElement("div",{className:Lr.head},Le.createElement("div",{className:Lr.name},Le.createElement("div",{title:ei==null?void 0:ei.name,className:Lr.title},ei==null?void 0:ei.name),(ei==null?void 0:ei.is_authority)&&Le.createElement("div",{className:Lr.b},"\u5B98\u65B9"),(ei==null?void 0:ei.is_excellent)&&Le.createElement("div",{className:Lr.a},"\u7CBE\u9009")),Le.createElement("div",{className:Lr.tag},Le.createElement("img",{src:ve.Z.IMG_SERVER+"/images/"+(ei==null?void 0:ei.image_url)}),Le.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},ei==null?void 0:ei.username),Le.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",ze()(ei==null?void 0:ei.created_at).format("YYYY-MM-DD")),Le.createElement("span",null,Le.createElement("img",{src:si}),Le.createElement("span",null,ei==null?void 0:ei.praises_count)),Le.createElement("span",null,Le.createElement("img",{src:hr}),Le.createElement("span",null,ei==null?void 0:ei.discusses_count)),Le.createElement("span",null,Le.createElement("img",{src:oo}),Le.createElement("span",null,ei==null?void 0:ei.viewed_count)),Le.createElement("div",{className:Lr.btn},((0,gr.Ny)()||(ei==null?void 0:ei.is_self))&&Le.createElement(Le.Fragment,null,Le.createElement(dt.ZP,{onClick:()=>gi(ei),type:"primary",ghost:!0},"\u5220\u9664"),Le.createElement(dt.ZP,{onClick:()=>vn(ei),type:"primary",ghost:!0},"\u7F16\u8F91")),(0,gr.Ny)()&&Le.createElement(dt.ZP,{onClick:()=>wi({is_authority:!(ei!=null&&ei.is_authority)}),type:"primary"},Le.createElement("img",{src:Fr}),ei!=null&&ei.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),(0,gr.Ny)()&&Le.createElement(dt.ZP,{onClick:()=>wi({is_excellent:!(ei!=null&&ei.is_excellent)}),type:"primary"},Le.createElement("img",{src:Ha}),ei!=null&&ei.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),Le.createElement("div",{className:Lr.scroll},((Zn=(ti=ei==null?void 0:ei.videos)==null?void 0:ti[0])==null?void 0:Zn.id)&&Le.createElement("div",{className:Lr.video},Le.createElement(Se.Z,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!((Kn=(xi=ei==null?void 0:ei.videos)==null?void 0:xi[0])!=null&&Kn.transcoded)},Le.createElement(Ma.Z,{poster:(ai=(mi=ei==null?void 0:ei.videos)==null?void 0:mi[0])==null?void 0:ai.cover_url,src:((Oi=(Ri=ei==null?void 0:ei.videos)==null?void 0:Ri[0])==null?void 0:Oi.play_url)||"",videoId:(Ai=(Zi=ei==null?void 0:ei.videos)==null?void 0:Zi[0])==null?void 0:Ai.id,logWatchHistory:()=>{}}))),Le.createElement(Ae.Z,{className:Lr.html,value:(ei==null?void 0:ei.content)||""}),Le.createElement("div",{onClick:()=>Yi(ei),className:Lr.g},Le.createElement("img",{className:"mr10",src:(ei!=null&&ei.user_liker,Wa)}),Le.createElement("span",null,ei==null?void 0:ei.praises_count)),Le.createElement(zo,{onOk:dr,active:pt,identifier:Pt})),Le.createElement("div",{className:Lr.btns},Le.createElement(dt.ZP,{onClick:()=>sn(),type:"primary",ghost:!0},"\u5173\u95ED"),jn[0]&&Le.createElement(dt.ZP,{onClick:Xi=>cn(Xi,"prev"),style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),jn[1]&&Le.createElement(dt.ZP,{onClick:Xi=>cn(Xi,"next"),style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},xh=Object.defineProperty,nh=Object.getOwnPropertySymbols,wc=Object.prototype.hasOwnProperty,mr=Object.prototype.propertyIsEnumerable,bc=(pt,Pt,Lt)=>Pt in pt?xh(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,on=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))wc.call(Pt,Lt)&&bc(pt,Lt,Pt[Lt]);if(nh)for(var Lt of nh(Pt))mr.call(Pt,Lt)&&bc(pt,Lt,Pt[Lt]);return pt};const Jn=pt=>React.createElement("svg",on({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},pt),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,Ks=Object.prototype.hasOwnProperty,Wr=Object.prototype.propertyIsEnumerable,Ia=(pt,Pt,Lt)=>Pt in pt?Tu(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,Vs=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))Ks.call(Pt,Lt)&&Ia(pt,Lt,Pt[Lt]);if(Cc)for(var Lt of Cc(Pt))Wr.call(Pt,Lt)&&Ia(pt,Lt,Pt[Lt]);return pt},Ls=(pt,Pt)=>Wu(pt,bh(Pt)),bo=(pt,Pt,Lt)=>new Promise((vn,cn)=>{var sn=xn=>{try{mn(Lt.next(xn))}catch(jn){cn(jn)}},gn=xn=>{try{mn(Lt.throw(xn))}catch(jn){cn(jn)}},mn=xn=>xn.done?vn(xn.value):Promise.resolve(xn.value).then(sn,gn);mn((Lt=Lt.apply(pt,Pt)).next())}),dl=({identifier:pt,tabStatus:Pt,setFilterListTotal:Lt,setListStatus:vn})=>{const cn={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null};let[sn,gn]=(0,Le.useState)(Vs({},cn));const[mn,xn]=(0,Le.useState)(!1),[jn,ti]=(0,Le.useState)(0),[Zn,xi]=(0,Le.useState)(1),[Kn,mi]=(0,Le.useState)(null),[ai,Ri]=(0,Le.useState)([]),[Oi,Zi]=(0,Le.useState)([!0,!0]),[Ai,Ni]=(0,Le.useState)(0),ur=(0,Le.useRef)(null);(0,Le.useEffect)(()=>{Ki()},[Pt]),(0,Le.useEffect)(()=>{ei()},[Kn]),(0,Le.useEffect)(()=>{Ei(Vs({},cn)),Ki()},[pt]),(0,Le.useEffect)(()=>(window.addEventListener("resize",Gi),vn(Ai),()=>{window.removeEventListener("resize",Gi)}),[Ai]);const ei=()=>bo(void 0,null,function*(){if(!Kn){Zi([!0,!0]);return}const Dr=[!0,!0],Vr=ai==null?void 0:ai.findIndex(is=>is.id===Kn);Vr===0&&sn.page===1&&(Dr[0]=!1),(sn.page-1)*sn.limit+(Vr+1)===sn.total&&(Dr[1]=!1),Zi(Dr)}),Gi=()=>{var Dr;if(Ai){const Vr=window.innerWidth-((Dr=ur.current)==null?void 0:Dr.clientWidth);ti(Vr)}},Ei=Dr=>bo(void 0,null,function*(){var Vr,is,Ur;xn(!0);const Tr=yield(0,ge.WH)(pt,Dr);return(Tr==null?void 0:Tr.status)===0&&(Ri(((Vr=Tr==null?void 0:Tr.data)==null?void 0:Vr.articles)||[]),gn(Ls(Vs({},Dr),{total:(is=Tr==null?void 0:Tr.data)==null?void 0:is.articles_count})),Lt((Ur=Tr==null?void 0:Tr.data)==null?void 0:Ur.articles_count)),xn(!1),Tr}),wi=()=>{(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,Ki(),gn(Vs({},sn)),Ei(sn)},Yi=()=>{sn.page=1,sn.search=sn==null?void 0:sn.save_search,Ki(),gn(Vs({},sn)),Ei(sn)},gi=()=>{var Dr;const Vr=document.getElementsByClassName("btn-resize");Vr[0].style.visibility="hidden";const is=window.innerWidth-((Dr=ur.current)==null?void 0:Dr.clientWidth);ti(is)},dr=()=>{gi(),Ni(1)},Xi=Dr=>{gi(),mi(Dr==null?void 0:Dr.id),Ni(3)},Pi=Dr=>{gi(),mi(Dr==null?void 0:Dr.id),Ni(2)},Ki=()=>{const Dr=document.getElementsByClassName("btn-resize");Dr[0].style.visibility="visible",ti(0),Ni(0),mi(null)},vr=Dr=>{Ni(3),mi(Dr),sn.page=1,gn(Vs({},sn)),Ei(sn)},or=Dr=>{Ni(3),mi(Dr),gn(Vs({},sn)),Ei(sn)},wo=Dr=>{gn(Vs({},sn)),Ei(sn)},Eo=Dr=>bo(void 0,null,function*(){(yield(0,ge.Rg)(pt,{active:Dr==null?void 0:Dr.id})).status===0&&(Ei(sn),xi(Zn+1))}),ns=Dr=>bo(void 0,null,function*(){(yield(0,ge.rL)(pt,{active:Dr==null?void 0:Dr.id})).status===0&&(Ei(sn),xi(Zn+1))}),uo=Dr=>bo(void 0,null,function*(){(yield(0,ge.de)(pt,{active:Dr==null?void 0:Dr.id})).status===0&&(Ki(),Ei(sn))}),Nr=Dr=>{sn.page=Dr,gn(Vs({},sn)),Ei(sn)},Io=(Dr,Vr)=>bo(void 0,null,function*(){var is,Ur,Tr,$r;const _r=ai==null?void 0:ai.findIndex(co=>co.id===Kn);if(console.log(_r,Vr,22),Vr==="prev"){if(_r===void 0){Pe.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(_r===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,gn(Vs({},sn));const co=yield Ei(sn);if((co==null?void 0:co.status)===0){const kr=(Tr=co==null?void 0:co.data)==null?void 0:Tr.articles[((Ur=(is=co==null?void 0:co.data)==null?void 0:is.articles)==null?void 0:Ur.length)-1];mi(kr==null?void 0:kr.id),console.log(Dr.target,555)}}}else{const co=ai[_r-1];mi(co==null?void 0:co.id)}}if(Vr==="next"){if(_r===void 0){Pe.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if((sn.page-1)*sn.limit+(_r+1)===sn.total){Pe.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(_r+1===sn.limit){sn.page=sn.page+1,gn(Vs({},sn));const co=yield Ei(sn);if((co==null?void 0:co.status)===0){const kr=($r=co==null?void 0:co.data)==null?void 0:$r.articles[0];mi(kr==null?void 0:kr.id)}}else{const co=ai[_r+1];mi(co==null?void 0:co.id)}}});return Le.createElement("div",{className:_t.wrap,ref:ur},Le.createElement("div",{className:_t.head},Le.createElement("div",{className:_t.sort,onClick:wi},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:_t["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:Dr=>{sn.save_search=Dr.target.value,gn(Vs({},sn))},onSearch:Yi}),Le.createElement("div",{onClick:dr,className:_t.btn},Le.createElement("img",{src:wh}),"\u5199\u9898\u89E3")),Le.createElement("div",{className:_t.listWarp},Le.createElement(Se.Z,{spinning:mn,className:"mt20"},ai==null?void 0:ai.map((Dr,Vr)=>{let is=!0;return Vr+1===ai.length&&Vr!==0&&(is=!1),Le.createElement(Qi,{active:Kn,key:Dr.id,data:Dr,showLine:is,onClick:Xi,onAssist:Eo,onHide:ns})}),(ai==null?void 0:ai.length)===0&&Le.createElement(qe.Z,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),Le.createElement($t.Z,{className:_t.pagination,showTotal:Dr=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},Dr),"\u6761\u6570\u636E"),total:sn.total,showSizeChanger:!1,current:sn==null?void 0:sn.page,onChange:Nr,hideOnSinglePage:!0,showQuickJumper:!0}),Ai>0&&Le.createElement("div",{className:_t.fixedRight,style:{width:jn}},Ai===1&&Le.createElement(fo,{identifier:pt,onClose:Ki,onOk:vr}),Ai===2&&Le.createElement(fo,{active:Kn,identifier:pt,onClose:Ki,onOk:or}),Ai===3&&Le.createElement(Rs,{btnShowStatus:Oi,onArticlesSkip:Io,detailsIndex:Zn,active:Kn,identifier:pt,onClose:Ki,onOk:wo,onEdit:Pi,onAssist:Eo,onDelete:uo})))},as={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"},bl=Object.defineProperty,Ca=Object.defineProperties,Pc=Object.getOwnPropertyDescriptors,Ho=Object.getOwnPropertySymbols,Za=Object.prototype.hasOwnProperty,Ko=Object.prototype.propertyIsEnumerable,vs=(pt,Pt,Lt)=>Pt in pt?bl(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,cs=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))Za.call(Pt,Lt)&&vs(pt,Lt,Pt[Lt]);if(Ho)for(var Lt of Ho(Pt))Ko.call(Pt,Lt)&&vs(pt,Lt,Pt[Lt]);return pt},Bs=(pt,Pt)=>Ca(pt,Pc(Pt)),Bo=(pt,Pt,Lt)=>new Promise((vn,cn)=>{var sn=xn=>{try{mn(Lt.next(xn))}catch(jn){cn(jn)}},gn=xn=>{try{mn(Lt.throw(xn))}catch(jn){cn(jn)}},mn=xn=>xn.done?vn(xn.value):Promise.resolve(xn.value).then(sn,gn);mn((Lt=Lt.apply(pt,Pt)).next())}),Hr=({visible:pt,onVisible:Pt,value:Lt,onChange:vn,setIndex:cn})=>{var sn;const gn={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null};let[mn,xn]=(0,Le.useState)(gn);const[jn,ti]=(0,Le.useState)([]),[Zn,xi]=(0,Le.useState)([]),[Kn,mi]=(0,Le.useState)(!1),ai=(0,Le.useRef)([]),Ri=(0,Le.useRef)(null),Oi=(0,Te.useParams)();(0,Le.useEffect)(()=>(Oi!=null&&Oi.id&&(Ri.current=setInterval(()=>{Zi(30)},3e4)),()=>{clearInterval(Ri.current)}),[]);const Zi=gi=>Bo(void 0,null,function*(){const dr=yield(0,ge.uc)(Oi==null?void 0:Oi.id,{practice_time:gi})});(0,Le.useEffect)(()=>{Ei(mn),ei()},[]),(0,Le.useEffect)(()=>(window.addEventListener("click",Ni),()=>{window.removeEventListener("click",Ni)}),[Oi==null?void 0:Oi.save_identifier,pt]),(0,Le.useEffect)(()=>{const gi=ai.current.findIndex(vr=>vr.identifier===(Oi==null?void 0:Oi.save_identifier)),dr=ai.current[gi-1],Xi=ai.current[gi+1],Pi=document.getElementById("oj-prev"),Ki=document.getElementById("oj-next");dr?Pi.style.display="block":Pi.style.display="none",Xi?Ki.style.display="block":Ki.style.display="none"},[Oi==null?void 0:Oi.save_identifier,ai.current]);const Ai=(gi,dr)=>{if(gi.id===dr)return gi;for(let Xi=0,Pi=gi;Pi=Pi.parentNode;Xi++){if(Pi.id===dr)return Pi;if(Pi==document.documentElement)return!1}},Ni=gi=>Bo(void 0,null,function*(){!Ai(gi.target,"oj-drawer")&&pt&&Pt(!1);const dr=ai.current.findIndex(Ki=>Ki.identifier===(Oi==null?void 0:Oi.save_identifier)),Xi=ai.current[dr-1],Pi=ai.current[dr+1];if(gi.target.id==="oj-prev"){if(!Xi||dr===-1){Pe.ZP.warning("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728");return}gi.target.style.pointerEvents="none",gi.target.style.cursor="not-allowed",yield wi(Xi==null?void 0:Xi.identifier),cn("0"),setTimeout(()=>{gi.target.style.pointerEvents="auto",gi.target.style.cursor="pointer"},400)}if(gi.target.id==="oj-next"||gi.target.id==="oj-modal-next"){if(!Pi||dr===-1){Pe.ZP.warning("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728");return}gi.target.style.pointerEvents="none",gi.target.style.cursor="not-allowed",yield wi(Pi==null?void 0:Pi.identifier),cn("0"),setTimeout(()=>{gi.target.style.pointerEvents="auto",gi.target.style.cursor="pointer"},400)}});(0,Le.useEffect)(()=>{vn(Oi==null?void 0:Oi.save_identifier);const gi=Zn.findIndex(dr=>dr.some(Xi=>Xi.identifier===(Oi==null?void 0:Oi.save_identifier)));xn(gi===-1?Bs(cs({},mn),{page:1}):Bs(cs({},mn),{page:gi+1}))},[Oi==null?void 0:Oi.save_identifier,Zn]);const ur=gi=>{mn.page=1,mn.tag_discipline_id=gi,xn(cs({},mn)),Ei(mn)},ei=()=>Bo(void 0,null,function*(){const gi=yield(0,Wn.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});ti(gi.tag_disciplines||[])}),Gi=gi=>{mn.page=1,mn.difficulty=typeof gi=="number"?gi:null,xn(cs({},mn)),Ei(mn)},Ei=gi=>Bo(void 0,null,function*(){var dr,Xi;mi(!0);const Pi=yield(0,ge.KC)(gi);if(Pi!=null&&Pi.practices_list){for(var Ki=(dr=Pi==null?void 0:Pi.practices_list)==null?void 0:dr.length,vr=[],or=0;or<Ki;or+=mn==null?void 0:mn.per_page)vr.push((Xi=Pi==null?void 0:Pi.practices_list)==null?void 0:Xi.slice(or,or+(mn==null?void 0:mn.per_page)));xn(Bs(cs({},mn),{total:Pi==null?void 0:Pi.practices_count})),ai.current=(Pi==null?void 0:Pi.practices_list)||[],xi(vr)}mi(!1)}),wi=(gi,dr)=>Bo(void 0,null,function*(){const Xi=yield(0,Wn.ZP)(`/api/practices/${gi}/start`,{method:"get"});(Xi==null?void 0:Xi.status)===0&&Te.history.push(`/problems/${Xi==null?void 0:Xi.identifier}/oj/${gi}`)}),Yi=gi=>{mn.page=gi,xn(cs({},mn))};return Le.createElement("div",{className:as.wrap,id:"oj-drawer",style:{left:pt?0:-700}},Le.createElement("div",{className:as.head},Le.createElement("div",{className:as.title},"\u9898\u76EE\u5217\u8868"),Le.createElement(ht.default.Search,{value:mn==null?void 0:mn.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:180,marginLeft:"auto",marginRight:10},onChange:gi=>{mn.save_search=gi.target.value,xn(cs({},mn))},onSearch:()=>{mn.page=1,mn.search=mn.save_search,xn(cs({},mn)),Ei(mn)}}),Le.createElement(xe.default,{value:mn==null?void 0:mn.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:gi=>gi.parentNode,maxTagTextLength:2,maxTagCount:2,onChange:ur},jn.map(gi=>Le.createElement(xe.default.Option,{key:gi.id,value:gi.id},gi.name))),Le.createElement(xe.default,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:gi=>gi.parentNode,value:mn==null?void 0:mn.difficulty,onChange:Gi},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:as.content},Le.createElement(Se.Z,{spinning:Kn},(sn=Zn==null?void 0:Zn[mn.page-1])==null?void 0:sn.map(gi=>Le.createElement("div",{key:gi.identifier,className:as.list,onClick:dr=>wi(gi.identifier,dr)},Le.createElement("i",{style:{visibility:Lt===gi.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),Le.createElement("span",{style:{fontWeight:Lt===gi.identifier?"bold":400,color:Lt===gi.identifier?"#ffffff":"#bac4cd"},title:gi==null?void 0:gi.name},gi.name),(gi==null?void 0:gi.difficulty)===1&&Le.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(gi==null?void 0:gi.difficulty)===2&&Le.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(gi==null?void 0:gi.difficulty)===3&&Le.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))))),Le.createElement("div",{className:as.footer},Le.createElement($t.Z,{showTotal:gi=>Le.createElement("span",{style:{color:"#656F87"}},"\u5171",Le.createElement("span",{className:"c-light-primary"},gi),"\u6761\u6570\u636E"),total:mn.total,pageSize:mn==null?void 0:mn.per_page,current:mn==null?void 0:mn.page,showSizeChanger:!1,onChange:Yi,showQuickJumper:!0,hideOnSinglePage:!0})))},Ad=({hack:pt,onTriggerPraise:Pt,topicId:Lt,page:vn,onPageChange:cn,user:sn,submitRecords:gn,submitting:mn,submitResult:xn})=>{const[jn]=(0,Te.useSearchParams)(),ti=(0,Te.useLocation)(),[Zn,xi]=(0,Le.useState)(jn.get("tab")||"0"),[Kn,mi]=(0,Le.useState)(0),[ai,Ri]=(0,Le.useState)(0),[Oi,Zi]=(0,Le.useState)(0),[Ai,Ni]=(0,Le.useState)(),[ur,ei]=(0,Le.useState)(!1);function Gi(wi){const Yi=wi.target.id;if(Zn==="3"&&Yi!==Zn&&(ai===1||ai===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:()=>{xi(Yi)}});return}xi(Yi)}(0,Le.useEffect)(()=>at.Z.subscribe("to-commit-info",()=>{xi("1")}),[]);function Ei(){xi("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:()=>ei(!0),src:En})),Le.createElement("li",{className:Bt["oj-mr"]},Le.createElement("a",{className:Zn==="0"?Bt.active:"",id:"0",onClick:Gi},"\u4EFB\u52A1\u63CF\u8FF0")),Le.createElement("li",{className:Bt["oj-mr"]},Le.createElement("a",{className:Zn==="3"?Bt.active:"",id:"3",onClick:Gi},"\u9898\u89E3",Oi?`(${Oi})`:"")),Le.createElement("li",{className:Bt["oj-mr"]},Le.createElement("a",{className:Zn==="2"?Bt.active:"",id:"2",onClick:Gi},"\u8BC4\u8BBA",Kn?`(${Kn})`:"")),Le.createElement("li",null,Le.createElement("a",{className:Zn==="1"?Bt.active:"",id:"1",onClick:Gi},"\u63D0\u4EA4\u8BB0\u5F55"))),Le.createElement("div",{className:`${Bt["tab-panel-body"]} ${Zn==="0"?"":"hide"}`,style:{padding:"0 0 0 16px"}},Le.createElement(Ze,{hack:pt,onTriggerPraise:Pt,toDiscuss:Ei})),Le.createElement("div",{className:`${Bt["tab-panel-body"]} ${Zn==="1"?"":"hide"}`},gn!=null&&gn.records_count?Le.createElement(et,{page:vn,onPageChange:cn,topicId:Lt,submitting:mn,submitRecords:gn,submitResult:xn}):Le.createElement(qe.Z,null)),Le.createElement("div",{className:`${Bt["tab-panel-body"]} ${Zn==="2"?"":"hide"}`,style:{padding:0}},Le.createElement(kt,{setDiscussTotal:mi,user:sn,identifier:pt.identifier,hack:pt,onTriggerPraise:Pt})),Le.createElement("div",{className:`${Bt["tab-panel-body"]} ${Zn==="3"?"":"hide"}`,style:{padding:0}},Le.createElement(dl,{setListStatus:Ri,setFilterListTotal:Zi,tabStatus:Zn,identifier:pt.identifier})),Le.createElement(Hr,{visible:ur,setIndex:xi,onVisible:wi=>ei(wi),value:Ai,onChange:wi=>Ni(wi)}))},Uo=Ee(46942),Nd=Ee(62522),ih=Ee(54318),rh=Ee(71302),Od=Ee(89392),Ch=Ee.n(Od),ic=Ee(56102),io=Ee(59301),ts=Object.defineProperty,ku=Object.defineProperties,qh=Object.getOwnPropertyDescriptors,Au=Object.getOwnPropertySymbols,ed=Object.prototype.hasOwnProperty,uu=Object.prototype.propertyIsEnumerable,Rl=(pt,Pt,Lt)=>Pt in pt?ts(pt,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):pt[Pt]=Lt,ds=(pt,Pt)=>{for(var Lt in Pt||(Pt={}))ed.call(Pt,Lt)&&Rl(pt,Lt,Pt[Lt]);if(Au)for(var Lt of Au(Pt))uu.call(Pt,Lt)&&Rl(pt,Lt,Pt[Lt]);return pt},Fs=(pt,Pt)=>ku(pt,qh(Pt)),rc=(pt,Pt)=>{var Lt={};for(var vn in pt)ed.call(pt,vn)&&Pt.indexOf(vn)<0&&(Lt[vn]=pt[vn]);if(pt!=null&&Au)for(var vn of Au(pt))Pt.indexOf(vn)<0&&uu.call(pt,vn)&&(Lt[vn]=pt[vn]);return Lt},el=(pt,Pt,Lt)=>new Promise((vn,cn)=>{var sn=xn=>{try{mn(Lt.next(xn))}catch(jn){cn(jn)}},gn=xn=>{try{mn(Lt.throw(xn))}catch(jn){cn(jn)}},mn=xn=>xn.done?vn(xn.value):Promise.resolve(xn.value).then(sn,gn);mn((Lt=Lt.apply(pt,Pt)).next())});const{Countdown:Id}=be.default,td={Java:"java",C:"c",Python:"py","C++":"c"};var Dd=(pt=>(pt[pt.SET_LOADING=0]="SET_LOADING",pt[pt.GET_DATA=1]="GET_DATA",pt[pt.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",pt[pt.SET_DATA=3]="SET_DATA",pt[pt.SET_DEBUGING=4]="SET_DEBUGING",pt[pt.SET_SUBMITING=5]="SET_SUBMITING",pt[pt.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",pt[pt.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",pt[pt.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",pt[pt.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",pt[pt.SET_PAGE=10]="SET_PAGE",pt[pt.GET_LANGUAGE=11]="GET_LANGUAGE",pt[pt.GET_DRAWER=12]="GET_DRAWER",pt))(Dd||{});function Aa(){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(pt,Pt){switch(Pt.type){case 1:return ds(ds({},pt),Pt.payload);case 3:return Fs(ds({},pt),{data:Pt.payload});case 0:return Fs(ds({},pt),{loading:Pt.payload});case 11:return Fs(ds({},pt),{languageList:Pt.payload});case 12:return Fs(ds({},pt),{drawerData:Pt.payload});case 9:return Fs(ds({},pt),{showNote:Pt.payload});case 4:return Fs(ds({},pt),{debuging:Pt.payload});case 5:return Fs(ds({},pt),{submitting:Pt.payload});case 2:return Fs(ds({},pt),{submitRecords:Pt.payload});case 10:return Fs(ds({},pt),{submitRecordPage:Pt.payload});case 6:return Fs(ds({},pt),{executingMessage:Pt.payload});case 7:return ds(ds({},pt),Pt.payload);case 8:return ds(ds({},pt),Pt.payload);default:throw new Error}}var Rt=({children:pt})=>{var Pt,Lt,vn,cn;const[sn,gn]=(0,Le.useReducer)(gf,oc),{id:mn}=(0,Te.useParams)(),xn=(0,Te.useLocation)(),[jn]=(0,Te.useSearchParams)(),{languageValue:ti,languageList:Zn,loading:xi,data:Kn,debugResult:mi,submitResult:ai,submitRecords:Ri,submitRecordPage:Oi,showNote:Zi,debuging:Ai,submitting:Ni,executingMessage:ur}=sn,[ei,Gi]=(0,Le.useState)("#FFF"),[Ei,wi]=(0,Le.useState)(null),[Yi,gi]=(0,Le.useState)({}),[dr,Xi]=(0,Le.useState)(!1),Pi=(0,Le.useRef)(null),Ki=(0,Le.useRef)(null),vr=Kn==null?void 0:Kn.user,or=Kn==null?void 0:Kn.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 Yr;if(dr){const Ro=document.getElementById("oj-next"),_s=document.getElementById("oj-modal-next");((Yr=Ro==null?void 0:Ro.style)==null?void 0:Yr.display)==="none"?_s.style.display="none":_s.style.display="block"}},[dr]),(0,Le.useEffect)(()=>{function Yr(){return el(this,null,function*(){var Ro,_s,Ao;const Jo=yield(0,ge.fu)(mn);if(Jo.status===401)document.location.href="/user/login";else{Jo.hack=Jo.practice,Jo.hack.code=yt.Base64.decode((Ro=Jo==null?void 0:Jo.hack)==null?void 0:Ro.code);const xs=`${vr==null?void 0:vr.login}-language`;localStorage.getItem(xs)&&(Jo.hack.language=localStorage.getItem(xs)),Ki.current=Ch().cloneDeep(Jo),Ki.current.language=(_s=Jo==null?void 0:Jo.hack)==null?void 0:_s.language,gn({type:1,payload:{loading:!1,data:Jo}}),gn({type:8,payload:{languageValue:(Ao=Jo==null?void 0:Jo.hack)==null?void 0:Ao.language}})}})}mn&&Yr()},[mn]),(0,Le.useEffect)(()=>{gn({type:8,payload:{debugResult:void 0}}),ns(),Xi(!1)},[mn]),(0,Le.useEffect)(()=>{clearTimeout(Pi.current)},[mn]),(0,Le.useEffect)(()=>{Eo()},[mn,Oi]);const wo=()=>{window.parent.postMessage("backExercise","*")};function Eo(){return el(this,null,function*(){try{const Yr=yield(0,ge.zO)(mn,{limit:15,page:Oi});gn({type:2,payload:Yr})}catch(Yr){console.log(Yr)}})}function ns(){return el(this,null,function*(){try{const Yr=yield(0,ge.dd)(mn);gn({type:11,payload:Yr==null?void 0:Yr.data})}catch(Yr){console.log(Yr)}})}function uo(Yr){gn({type:10,payload:Yr})}function Nr(Yr){return el(this,null,function*(){var Ro,_s,Ao;const Jo=((Ao=(_s=(Ro=window==null?void 0:window.location)==null?void 0:Ro.pathname)==null?void 0:_s.split("/"))==null?void 0:Ao[2])||mn;return yield(0,ge.n4)(Jo,Yr||{code:yt.Base64.encode(or.code),language:ti})})}function Io(){return el(this,null,function*(){var Yr;if(!or.code||((Yr=or.code)==null?void 0:Yr.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(!Ni){gn({type:5,payload:!0});try{if(at.Z.publish("to-commit-info"),(yield Nr()).status===0){let Cl=function(){return el(this,null,function*(){const{status:Qo,data:qo}=yield(0,ge.rX)(mn,"submit"),Ms=Aa()-Xs>(Jo*xs+3)*1e3;if(Qo!==0&&!Ms&&setTimeout(Cl,1e3),Ms){he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),gn({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 fa=yield(0,ge.zO)(mn,{limit:15,page:Oi});gn({type:8,payload:Fs(ds({},sn),{submitResult:qo,submitting:!1,submitRecords:fa})}),(qo==null?void 0:qo.status)===0&&Xi(!0)}})},_s={};if((yield(0,ge.bM)(mn,_s)).status===-1&&jn.get("exercisesId")){window.parent.location.href=`/classrooms/${jn.get("coursesId")}/exercise/${jn.get("exercisesId")}/detail`;return}const{time_limit:Jo,test_case_size:xs}=or,Xs=Aa();Cl()}}catch(Ro){gn({type:5,payload:!1})}}})}function Dr(){return el(this,null,function*(){var Yr;if(!or.code||((Yr=or.code)==null?void 0:Yr.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,gn({type:4,payload:!0});try{if((yield Nr()).status===0){let Xs=function(){return el(this,null,function*(){const{status:Cl,message:Qo,data:qo}=yield(0,ge.rX)(mn,"debug"),Ms=Aa()-xs>(_s+3)*1e3;if(Cl!==0&&!Ms&&(gn({type:6,payload:Qo}),setTimeout(Xs,1e3)),Ms){he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),gn({type:4,payload:!1});return}Cl===0&&(gn({type:4,payload:!1}),qo.status===2&&he.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),gn({type:7,payload:Fs(ds({},sn),{debugResult:qo,debuging:!1})}))})};const{time_limit:_s}=or;let Ao={input:encodeURIComponent(Kn.test_case.input)};if((yield(0,ge.MU)(mn,Ao)).status===-1&&jn.get("exercisesId")){window.parent.location.href=`/classrooms/${jn.get("coursesId")}/exercise/${jn.get("exercisesId")}/detail`;return}const xs=Aa();Xs()}else gn({type:4,payload:!1})}catch(Ro){console.log(Ro)}finally{}})}function Vr(Yr){var Ro;clearTimeout(Pi.current),Pi.current=setTimeout(()=>{var _s;Nr({code:yt.Base64.encode(Yr),language:(_s=Ki==null?void 0:Ki.current)==null?void 0:_s.language})},2e3),gn({type:3,payload:Fs(ds({},Ki==null?void 0:Ki.current),{hack:Fs(ds({},(Ro=Ki==null?void 0:Ki.current)==null?void 0:Ro.hack),{code:Yr})})})}function is(Yr){let Ro=Yr.target.value;gn({type:3,payload:Fs(ds({},Kn),{test_case:{input:Ro}})})}const Ur=Yr=>el(void 0,null,function*(){var Ro;if(gn({type:0,payload:!0}),(yield Nr()).status===0){gn({type:8,payload:{languageValue:Yr}}),Ki.current.language=Yr;const Ao=`${vr==null?void 0:vr.login}-language`;localStorage.setItem(Ao,Yr);const Jo=yield(0,ge.dd)(mn);if(Jo.status===0){const xs=(Ro=Jo==null?void 0:Jo.data)==null?void 0:Ro.find(Xs=>Xs.language===Yr);Vr(yt.Base64.decode(xs.code))}setTimeout(()=>{gn({type:0,payload:!1})},300)}});function Tr(){return el(this,null,function*(){try{const Yr=yield(0,ge.H7)(mn,{language:ti});Yr.status===401?Te.history.replace("/login",{from:xn.pathname}):(Vr(yt.Base64.decode(Yr.code)),ns())}catch(Yr){console.log(Yr)}})}function $r(){he.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:io.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",io.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk(){return el(this,null,function*(){const Yr=yield(0,ge.fi)(mn,{language:ti});Yr.status===401?Te.history.replace("/login",{from:xn.pathname}):Vr(yt.Base64.decode(Yr.code))})}})}function _r(){gn({type:9,payload:!0})}function co(){gn({type:9,payload:!1})}function kr(Yr){return el(this,null,function*(){yield(0,ge.MK)(mn,Yr),gn({type:1,payload:{showNote:!1,data:Fs(ds({},Kn),{hack:Fs(ds({},or),{notes:Yr.notes})})}})})}const mo={input:(Pt=Kn==null?void 0:Kn.test_case)==null?void 0:Pt.input,is_file:(Lt=Kn==null?void 0:Kn.test_case)==null?void 0:Lt.is_file,language:((vn=Ki.current)==null?void 0:vn.language)||(or==null?void 0:or.language),code:or==null?void 0:or.code,title:"main."+td[or==null?void 0:or.language],modify_code:or==null?void 0:or.modify_code,notes:or==null?void 0:or.notes,debugResult:mi,debuging:Ai,submitting:Ni,executingMessage:ur,id:mn,languageValue:ti,languageList:Zn,onChangeLanguage:Ur,onCancelNote:co,onAddNote:kr,showNote:Zi,onShowNote:_r,onSubmitCode:Io,onChangeCode:Vr,onChangeInput:is,onDebugCode:Dr,onResetCode:Tr,onSyncCode:$r,onUpdateCode:Nr};function Go(){return el(this,null,function*(){const{praise_count:Yr}=yield(0,ge.vl)(or.id,{container_type:"Hack",type:1});let Ro=Fs(ds({},Kn),{hack:Fs(ds({},or),{praises_count:Yr,user_praise:!or.user_praise})});gn({type:3,payload:Ro})})}const Wo={topicId:mn,submitResult:ai,submitRecords:Ri,submitting:Ni,page:Oi,onPageChange:uo,hack:or,user:Kn==null?void 0:Kn.user,onTriggerPraise:Go};return console.log(Kn,Ki==null?void 0:Ki.current,"data--------"),io.createElement(io.Fragment,null,io.createElement(Se.Z,{className:"oj-custom-large-spin",size:"large",spinning:xi},Kn?io.createElement("div",{className:"oj-custom-warp"},io.createElement("header",{className:ut.Z.header,style:{minWidth:1200}},io.createElement("div",null,io.createElement("img",{src:`${ve.Z.IMG_SERVER}/images/${vr.image_url}`,alt:"user",width:30}),io.createElement("span",null,vr.name)),io.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},io.createElement("div",null,or.name),io.createElement(Uo.Z,{onChange:Yr=>{},className:"font12 c-grey-999"})),io.createElement(ic.CopyToClipboard,{text:`${(cn=window.location)==null?void 0:cn.origin}/problems/${or.identifier}/share`,onCopy:()=>Pe.ZP.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")},io.createElement("span",{className:ut.Z.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",io.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),or.edit_privilege?io.createElement(Te.Link,{className:ut.Z.btn_back,to:`/problems/${or.identifier}/ojedit`,style:{marginRight:10}}," ",io.createElement(me.Z,null)," \u7F16\u8F91"):null,io.createElement(Te.Link,{className:ut.Z.btn_back,onClick:()=>{},to:"/problems"}," ",io.createElement(Ie.Z,null),"\u9000\u51FA")),io.createElement(ce.Z,{hideResize:!0,className:"my-problems oj-problems",leftChild:io.createElement(Ad,ds({},Wo)),rightChild:io.createElement(an,ds({},mo))})):null),io.createElement(he.default,{centered:!0,closable:!1,width:680,footer:null,open:dr,className:"oj-modal"},io.createElement("section",{className:"oj-modal-content"},io.createElement("div",{className:"oj-modal-head"},io.createElement("img",{src:Nd,alt:""}),io.createElement("i",{onClick:()=>Xi(!1),className:"iconfont icon-guanbi1"})),io.createElement("aside",null,io.createElement("img",{className:"mr30",src:rh.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",io.createElement("span",{style:{color:"#75d6ba",marginRight:100}},ai==null?void 0:ai.execute_time,"s"),"\u4F18\u4E8E",io.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(ai==null?void 0:ai.time_better_than)||100,"%"),"\u7684\u7528\u6237"),io.createElement("aside",{className:"mb50"},io.createElement("img",{src:ih.Z,className:"mr30"}),io.createElement("span",{className:"oj-modal-tt"},io.createElement("span",null,io.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),io.createElement("span",{className:"c-light-primary"},ai==null?void 0:ai.execute_memory,"mb")),io.createElement("span",null,io.createElement("span",null))),"\u4F18\u4E8E",io.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(ai==null?void 0:ai.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),io.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function zt({languageValue:pt,languageList:Pt,onChangeLanguage:Lt,title:vn,modify_code:cn,onSyncCode:sn,onShowCodeSetting:gn,onResetCode:mn}){const xn=(0,Te.useLocation)(),jn=()=>{he.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:io.createElement(de.Z,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:mn})};return io.createElement("div",{className:"action-bar"},io.createElement(xe.default,{className:"oj-select",value:pt,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:Lt},Pt==null?void 0:Pt.map(ti=>io.createElement(xe.default.Option,{key:ti.language,value:ti.language},ti.language))),io.createElement("span",null),io.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:jn},io.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),io.createElement("a",{onClick:gn},io.createElement("i",{className:"iconfont icon-shezhi"})))}function an(pt){var Pt=pt,{id:Lt,input:vn,is_file:cn,showNote:sn,onShowNote:gn,notes:mn,onCancelNote:xn,onAddNote:jn,debugResult:ti,language:Zn,debuging:xi,submitting:Kn,executingMessage:mi,code:ai,onSubmitCode:Ri,onDebugCode:Oi,onChangeCode:Zi,onChangeInput:Ai,onUpdateCode:Ni}=Pt,ur=rc(Pt,["id","input","is_file","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function ei(Ei){return io.createElement(zt,Fs(ds({},ur),{onShowCodeSetting:Ei}))}const Gi={id:Lt,input:vn,debugResult:ti,debuging:xi,is_file:cn,submitting:Kn,executingMessage:mi,onDebugCode:Oi,onChangeCode:Zi,onSubmitCode:Ri,onChangeInput:Ai};return io.createElement("div",{className:"right-panel"},io.createElement(Ct,{onUpdateCode:()=>{},language:Zn,value:ai,onChange:Zi,ActionBarRender:ei}),io.createElement("div",{className:`note-form-area ${sn?"active":""}`},io.createElement(vt,{onCancel:xn,notes:mn,callback:jn})),io.createElement(Ft.ZP,ds({},Gi)))}},86723:function(bn,qt,Ee){"use strict";Ee.d(qt,{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||{})},53576:function(bn,qt,Ee){"use strict";Ee.d(qt,{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(7660);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)}},52649:function(bn,qt,Ee){"use strict";Ee.d(qt,{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(64726),ge=Ee(7660),ce=Ee(99325),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")))))}},60918:function(bn,qt,Ee){"use strict";Ee.d(qt,{o:function(){return xe}});var Le=Ee(7660),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)}},20736:function(bn,qt,Ee){"use strict";Ee.d(qt,{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}},85187:function(bn,qt,Ee){"use strict";Ee.d(qt,{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 We=Qe[1];return Ve.split(`
|
|
|
`).map(gt=>{const ct=gt.match(/^\s+/);if(ct===null)return gt;const[Ct]=ct;return Ct.length>=We.length?gt.slice(We.length):gt}).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,We){if(Ve>=je.length||je[Ve].level<=Qe)return Ve;var gt=je[Ve];We.push("<li><a href='#"+be+gt.anchor+"'>"+gt.text+"</a>"),Ve++;var ct=[];return Ve=de(je,Ve,gt.level,ct),ct.length>0&&(We.push("<ul>"),ct.forEach(function(Ct){We.push(Ct)}),We.push("</ul>")),We.push("</li>"),Ve=de(je,Ve,Qe,We),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 We=Pe(Qe,Ve[3]||"");const gt=Ve[2]?Ve[2].trim():Ve[2];if(["latex","katex","math"].indexOf(gt)>=0){const ct=ie(),Ct=We;We=ct,se[ct]={type:"block",expression:Ct}}return{type:"code",raw:Qe,lang:gt,text:We}}}},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 We=ie();return se[We]={type:"inline",expression:Qe},We}),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 We=(Ve||"").match(/\S*/)[0];return We?["latex","katex","math"].indexOf(We)>=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 We=this.options.headerPrefix+Qe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return he.push({anchor:We,level:Ve,text:je}),"<h"+Ve+' id="'+be+We+'">'+je+"</h"+Ve+">"},me().setOptions({silent:!0,gfm:!0,pedantic:!1}),me().use({tokenizer:z,renderer:xe}),qt.ZP=me()},90691:function(bn,qt,Ee){"use strict";Ee.d(qt,{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}},44860:function(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return lo}});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 oi=self.navigator.userAgent.toLowerCase(),$e=/(edge)\/([\w.]+)/.exec(oi)||/(opr)[\/]([\w.]+)/.exec(oi)||/(chrome)[ \/]([\w.]+)/.exec(oi)||/(iemobile)[\/]([\w.]+)/.exec(oi)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(oi)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(oi)||/(webkit)[ \/]([\w.]+)/.exec(oi)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(oi)||/(msie) ([\w.]+)/.exec(oi)||oi.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(oi)||oi.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(oi)||[],nt=/(ipad)/.exec(oi)||/(ipod)/.exec(oi)||/(windows phone)/.exec(oi)||/(iphone)/.exec(oi)||/(kindle)/.exec(oi)||/(android)/.exec(oi)||/(windows)/.exec(oi)||/(mac)/.exec(oi)||/(linux)/.exec(oi)||/(cros)/.exec(oi)||[],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 _t=wt.headers;for(let un in _t)_t.hasOwnProperty(un)&&Nt.append(un,_t[un])}let kt={method:"GET",headers:Nt,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(let _t in this._config.headers)Nt.append(_t,this._config.headers[_t]);$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(_t=>{if(this._requestAbort){this._requestAbort=!1,this._status=de.kIdle;return}if(_t.ok&&_t.status>=200&&_t.status<=299){if(_t.url!==wt.url&&this._onURLRedirect){let wn=this._seekHandler.removeURLParameters(_t.url);this._onURLRedirect(wn)}let un=_t.headers.get("Content-Length");return un!=null&&(this._contentLength=parseInt(un),this._contentLength!==0&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,_t.body.getReader())}else if(this._status=de.kError,this._onError)this._onError(ue.HTTP_STATUS_CODE_INVALID,{code:_t.status,msg:_t.statusText});else throw new xe("FetchStreamLoader: Http code invalid, "+_t.status+" "+_t.statusText)}).catch(_t=>{if(this._status=de.kError,this._onError)this._onError(ue.EXCEPTION,{code:-1,msg:_t.message});else throw _t})}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 _t in kt)kt.hasOwnProperty(_t)&&Nt.setRequestHeader(_t,kt[_t])}if(typeof this._config.headers=="object"){let kt=this._config.headers;for(let _t in kt)kt.hasOwnProperty(_t)&&Nt.setRequestHeader(_t,kt[_t])}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 _t=this._xhr=new XMLHttpRequest;if(_t.open("GET",Nt.url,!0),_t.responseType="ms-stream",_t.onreadystatechange=this._xhrOnReadyStateChange.bind(this),_t.onerror=this._xhrOnError.bind(this),$e.withCredentials&&(_t.withCredentials=!0),typeof Nt.headers=="object"){let un=Nt.headers;for(let wn in un)un.hasOwnProperty(wn)&&_t.setRequestHeader(wn,un[wn])}if(typeof this._config.headers=="object"){let un=this._config.headers;for(let wn in un)un.hasOwnProperty(wn)&&_t.setRequestHeader(wn,un[wn])}this._isReconnecting?this._isReconnecting=!1:this._status=LoaderStatus.kConnecting,_t.send()}abort(){this._internalAbort(),this._status=LoaderStatus.kComplete}_internalAbort(){this._reader&&(this._reader.readyState===1&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}_xhrOnReadyStateChange($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 _t in kt)kt.hasOwnProperty(_t)&&Nt.setRequestHeader(_t,kt[_t])}if(typeof this._config.headers=="object"){let kt=this._config.headers;for(let _t in kt)kt.hasOwnProperty(_t)&&Nt.setRequestHeader(_t,kt[_t])}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 We{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 gt=We;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 _t=0;_t<kt.length;_t++){let un=kt[_t].split("="),wn=_t>0;un[0]!==this._startName&&un[0]!==this._endName&&(wn&&(Nt+="&"),Nt+=kt[_t])}}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 gt(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),_t=this._dispatchChunks(kt,this._stashByteStart);if(_t<kt.byteLength){if(_t>0){let un=new Uint8Array(kt,_t);Nt.set(un,0),this._stashUsed=un.byteLength,this._stashByteStart+=_t}}else this._stashUsed=0,this._stashByteStart+=_t;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 _t=$e.byteLength-kt;_t>this._bufferSize&&(this._expandBuffer(_t),Nt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Nt.set(new Uint8Array($e,kt),0),this._stashUsed+=_t,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 _t=new Uint8Array(this._stashBuffer,kt);Nt.set(_t,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 yt=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 yt({},Ft()),nt=$e.loaderType;return $e.destroy(),nt=="fetch-stream-loader"||nt=="xhr-moz-chunked-loader"}static getNetworkLoaderTypeName(){let $e=new yt({},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,St={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 Et{static get forceGlobalTag(){return Pe.FORCE_GLOBAL_TAG}static set forceGlobalTag($e){Pe.FORCE_GLOBAL_TAG=$e,Et._notifyChange()}static get globalTag(){return Pe.GLOBAL_TAG}static set globalTag($e){Pe.GLOBAL_TAG=$e,Et._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,Et._notifyChange()}static get enableDebug(){return Pe.ENABLE_DEBUG}static set enableDebug($e){Pe.ENABLE_DEBUG=$e,Et._notifyChange()}static get enableVerbose(){return Pe.ENABLE_VERBOSE}static set enableVerbose($e){Pe.ENABLE_VERBOSE=$e,Et._notifyChange()}static get enableInfo(){return Pe.ENABLE_INFO}static set enableInfo($e){Pe.ENABLE_INFO=$e,Et._notifyChange()}static get enableWarn(){return Pe.ENABLE_WARN}static set enableWarn($e){Pe.ENABLE_WARN=$e,Et._notifyChange()}static get enableError(){return Pe.ENABLE_ERROR}static set enableError($e){Pe.ENABLE_ERROR=$e,Et._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=Et.emitter;if($e.listenerCount("change")>0){let nt=Et.getConfig();$e.emit("change",nt)}}static registerListener($e){Et.emitter.addListener("change",$e)}static removeListener($e){Et.emitter.removeListener("change",$e)}static addLogListener($e){Pe.emitter.addListener("log",$e),Pe.emitter.listenerCount("log")>0&&(Pe.ENABLE_CALLBACK=!0,Et._notifyChange())}static removeLogListener($e){Pe.emitter.removeListener("log",$e),Pe.emitter.listenerCount("log")===0&&(Pe.ENABLE_CALLBACK=!1,Et._notifyChange())}}Et.emitter=new(Te());var vt=Et;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,_t=wt;for(nt<$e[0]&&(Je=0,kt=_t+1);kt<=_t;)if(Nt=kt+Math.floor((_t-kt)/2),Nt===wt||nt>=$e[Nt]&&nt<$e[Nt+1]){Je=Nt;break}else $e[Nt]<nt?kt=Nt+1:_t=Nt-1;return Je}}var jt=Bt;function ln(oi,$e,nt){let Je=oi;if($e+nt<Je.length){for(;nt--;)if((Je[++$e]&192)!==128)return!1;return!0}else return!1}function $t(oi){let $e=[],nt=oi,Je=0,wt=oi.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(ln(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(ln(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&&ln(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 yn=$t;let Ut=function(){let oi=new ArrayBuffer(2);return new DataView(oi).setInt16(0,256,!0),new Int16Array(oi)[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=yn(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=yn(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),_t,un=!1;try{switch(kt){case 0:_t=wt.getFloat64(1,!Ut),Nt+=8;break;case 1:{_t=!!wt.getUint8(1),Nt+=1;break}case 2:{let wn=Wt.parseString($e,nt+1,Je-1);_t=wn.data,Nt+=wn.size;break}case 3:{_t={};let wn=0;for((wt.getUint32(Je-4,!Ut)&16777215)===9&&(wn=3);Nt<Je-4;){let Bn=Wt.parseObject($e,nt+Nt,Je-Nt-wn);if(Bn.objectEnd)break;_t[Bn.data.name]=Bn.data.value,Nt+=Bn.size}Nt<=Je-3&&(wt.getUint32(Nt-1,!Ut)&16777215)===9&&(Nt+=3);break}case 8:{_t={},Nt+=4;let wn=0;for((wt.getUint32(Je-4,!Ut)&16777215)===9&&(wn=3);Nt<Je-8;){let Bn=Wt.parseVariable($e,nt+Nt,Je-Nt-wn);if(Bn.objectEnd)break;_t[Bn.data.name]=Bn.data.value,Nt+=Bn.size}Nt<=Je-3&&(wt.getUint32(Nt-1,!Ut)&16777215)===9&&(Nt+=3);break}case 9:_t=void 0,Nt=1,un=!0;break;case 10:{_t=[];let wn=wt.getUint32(1,!Ut);Nt+=4;for(let Bn=0;Bn<wn;Bn++){let zn=Wt.parseValue($e,nt+Nt,Je-Nt);_t.push(zn.data),Nt+=zn.size}break}case 11:{let wn=Wt.parseDate($e,nt+1,Je-1);_t=wn.data,Nt+=wn.size;break}case 12:{let wn=Wt.parseString($e,nt+1,Je-1);_t=wn.data,Nt+=wn.size;break}default:Nt=Je,Pe.w("AMF","Unsupported AMF value type "+kt)}}catch(wn){Pe.e("AMF",wn.toString())}return{data:_t,size:Nt,objectEnd:un}}}var Xt=Wt;class mt{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 ze=mt;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 ze(nt);Je.readByte();let wt=Je.readByte();Je.readByte();let Nt=Je.readByte();Je.readUEG();let kt=Be.getProfileString(wt),_t=Be.getLevelString(Nt),un=1,wn=420,Bn=[0,420,422,444],zn=8;if((wt===100||wt===110||wt===122||wt===244||wt===44||wt===83||wt===86||wt===118||wt===128||wt===138||wt===144)&&(un=Je.readUEG(),un===3&&Je.readBits(1),un<=3&&(wn=Bn[un]),zn=Je.readUEG()+8,Je.readUEG(),Je.readBits(1),Je.readBool())){let pi=un!==3?8:12;for(let Mi=0;Mi<pi;Mi++)Je.readBool()&&(Mi<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 pi=Je.readUEG();for(let Mi=0;Mi<pi;Mi++)Je.readSEG()}let Kt=Je.readUEG();Je.readBits(1);let Sn=Je.readUEG(),kn=Je.readUEG(),Zt=Je.readBits(1);Zt===0&&Je.readBits(1),Je.readBits(1);let rn=0,Rn=0,An=0,Qn=0;Je.readBool()&&(rn=Je.readUEG(),Rn=Je.readUEG(),An=Je.readUEG(),Qn=Je.readUEG());let qn=1,Nn=1,si=0,Li=!0,Bi=0,Ln=0;if(Je.readBool()){if(Je.readBool()){let pi=Je.readByte(),Mi=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],ir=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];pi>0&&pi<16?(qn=Mi[pi-1],Nn=ir[pi-1]):pi===255&&(qn=Je.readByte()<<8|Je.readByte(),Nn=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 pi=Je.readBits(32),Mi=Je.readBits(32);Li=Je.readBool(),Bi=Mi,Ln=pi*2,si=Bi/Ln}}let lr=1;(qn!==1||Nn!==1)&&(lr=qn/Nn);let Di=0,Pn=0;if(un===0)Di=1,Pn=2-Zt;else{let pi=un===3?1:2,Mi=un===1?2:1;Di=pi,Pn=Mi*(2-Zt)}let Yn=(Sn+1)*16,ui=(2-Zt)*((kn+1)*16);Yn-=(rn+Rn)*Di,ui-=(An+Qn)*Pn;let Ti=Math.ceil(Yn*lr);return Je.destroy(),Je=null,{profile_string:kt,level_string:_t,bit_depth:zn,ref_frames:Kt,chroma_format:wn,chroma_format_string:Be.getChromaFormatString(wn),frame_rate:{fixed:Li,fps:si,fps_den:Ln,fps_num:Bi},sar_ratio:{width:qn,height:Nn},codec_size:{width:Yn,height:ui},present_size:{width:Ti,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 et=Be,Ue={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};function Xe(oi){return oi>>>8&255|(oi&255)<<8}function Re(oi){return(oi&4278190080)>>>24|(oi&16711680)>>>8|(oi&65280)<<8|(oi&255)<<24}function Ae(oi,$e){return oi[$e]<<24|oi[$e+1]<<16|oi[$e+2]<<8|oi[$e+3]}class Ge{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=Ge.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),_t=Nt.getUint32(0,!wt)&16777215;if(Je+11+_t+4>$e.byteLength)break;if(kt!==8&&kt!==9&&kt!==18){Pe.w(this.TAG,`Unsupported tag type ${kt}, skipped`),Je+=11+_t+4;continue}let un=Nt.getUint8(4),wn=Nt.getUint8(5),Bn=Nt.getUint8(6),zn=Nt.getUint8(7),At=Bn|wn<<8|un<<16|zn<<24;(Nt.getUint32(7,!wt)&16777215)!==0&&Pe.w(this.TAG,"Meet tag which has StreamID != 0!");let Sn=Je+11;switch(kt){case 8:this._parseAudioData($e,Sn,_t,At);break;case 9:this._parseVideoData($e,Sn,_t,At,nt+Je);break;case 18:this._parseScriptData($e,Sn,_t);break}let kn=Nt.getUint32(11+_t,!wt);kn!==11+_t&&Pe.w(this.TAG,`Invalid PrevTagSize ${kn}`),Je+=11+_t+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=Xt.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 _t=kt/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=_t,this._referenceFrameRate.fps_num=kt,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=_t}}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,_t=new DataView($e,nt,Je).getUint8(0),un=_t>>>4;if(un!==2&&un!==10){this._onError(Ue.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+un);return}let wn=0,Bn=(_t&12)>>>2;if(Bn>=0&&Bn<=4)wn=this._flvSoundRateTable[Bn];else{this._onError(Ue.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+Bn);return}let zn=(_t&2)>>>1,At=_t&1,Kt=this._audioMetadata,Sn=this._audioTrack;if(Kt||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),Kt=this._audioMetadata={},Kt.type="audio",Kt.id=Sn.id,Kt.timescale=this._timescale,Kt.duration=this._duration,Kt.audioSampleRate=wn,Kt.channelCount=At===0?1:2),un===10){let kn=this._parseAACAudioData($e,nt+1,Je-1);if(kn==null)return;if(kn.packetType===0){Kt.config&&Pe.w(this.TAG,"Found another AudioSpecificConfig!");let Zt=kn.data;Kt.audioSampleRate=Zt.samplingRate,Kt.channelCount=Zt.channelCount,Kt.codec=Zt.codec,Kt.originalCodec=Zt.originalCodec,Kt.config=Zt.config,Kt.refSampleDuration=1024/Kt.audioSampleRate*Kt.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",Kt);let rn=this._mediaInfo;rn.audioCodec=Kt.originalCodec,rn.audioSampleRate=Kt.audioSampleRate,rn.audioChannelCount=Kt.channelCount,rn.hasVideo?rn.videoCodec!=null&&(rn.mimeType='video/x-flv; codecs="'+rn.videoCodec+","+rn.audioCodec+'"'):rn.mimeType='video/x-flv; codecs="'+rn.audioCodec+'"',rn.isComplete()&&this._onMediaInfo(rn)}else if(kn.packetType===1){let Zt=this._timestampBase+wt,rn={unit:kn.data,length:kn.data.byteLength,dts:Zt,pts:Zt};Sn.samples.push(rn),Sn.length+=kn.data.length}else Pe.e(this.TAG,`Flv: Unsupported AAC data type ${kn.packetType}`)}else if(un===2){if(!Kt.codec){let Rn=this._parseMP3AudioData($e,nt+1,Je-1,!0);if(Rn==null)return;Kt.audioSampleRate=Rn.samplingRate,Kt.channelCount=Rn.channelCount,Kt.codec=Rn.codec,Kt.originalCodec=Rn.originalCodec,Kt.refSampleDuration=1152/Kt.audioSampleRate*Kt.timescale,Pe.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",Kt);let An=this._mediaInfo;An.audioCodec=Kt.codec,An.audioSampleRate=Kt.audioSampleRate,An.audioChannelCount=Kt.channelCount,An.audioDataRate=Rn.bitRate,An.hasVideo?An.videoCodec!=null&&(An.mimeType='video/x-flv; codecs="'+An.videoCodec+","+An.audioCodec+'"'):An.mimeType='video/x-flv; codecs="'+An.audioCodec+'"',An.isComplete()&&this._onMediaInfo(An)}let kn=this._parseMP3AudioData($e,nt+1,Je-1,!1);if(kn==null)return;let Zt=this._timestampBase+wt,rn={unit:kn,length:kn.byteLength,dts:Zt,pts:Zt};Sn.samples.push(rn),Sn.length+=kn.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,_t=0,un=null,wn=0,Bn=null;if(kt=_t=wt[0]>>>3,wn=(wt[0]&7)<<1|wt[1]>>>7,wn<0||wn>=this._mpegSamplingRates.length){this._onError(Ue.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}let zn=this._mpegSamplingRates[wn],At=(wt[1]&120)>>>3;if(At<0||At>=8){this._onError(Ue.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}kt===5&&(Bn=(wt[1]&7)<<1|wt[2]>>>7,un=(wt[2]&124)>>>2);let Kt=self.navigator.userAgent.toLowerCase();return Kt.indexOf("firefox")!==-1?wn>=6?(kt=5,Nt=new Array(4),Bn=wn-3):(kt=2,Nt=new Array(2),Bn=wn):Kt.indexOf("android")!==-1?(kt=2,Nt=new Array(2),Bn=wn):(kt=5,Bn=wn,Nt=new Array(4),wn>=6?Bn=wn-3:At===1&&(kt=2,Nt=new Array(2),Bn=wn)),Nt[0]=kt<<3,Nt[0]|=(wn&15)>>>1,Nt[1]=(wn&15)<<7,Nt[1]|=(At&15)<<3,kt===5&&(Nt[1]|=(Bn&15)>>>1,Nt[2]=(Bn&1)<<7,Nt[2]|=8,Nt[3]=0),{config:Nt,samplingRate:zn,channelCount:At,codec:"mp4a.40."+kt,originalCodec:"mp4a.40."+_t}}_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),_t=null;if(wt){if(kt[0]!==255)return;let un=kt[1]>>>3&3,wn=(kt[1]&6)>>1,Bn=(kt[2]&240)>>>4,zn=(kt[2]&12)>>>2,Kt=(kt[3]>>>6&3)!==3?2:1,Sn=0,kn=0,Zt=34,rn="mp3";switch(un){case 0:Sn=this._mpegAudioV25SampleRateTable[zn];break;case 2:Sn=this._mpegAudioV20SampleRateTable[zn];break;case 3:Sn=this._mpegAudioV10SampleRateTable[zn];break}switch(wn){case 1:Zt=34,Bn<this._mpegAudioL3BitRateTable.length&&(kn=this._mpegAudioL3BitRateTable[Bn]);break;case 2:Zt=33,Bn<this._mpegAudioL2BitRateTable.length&&(kn=this._mpegAudioL2BitRateTable[Bn]);break;case 3:Zt=32,Bn<this._mpegAudioL1BitRateTable.length&&(kn=this._mpegAudioL1BitRateTable[Bn]);break}_t={bitRate:kn,samplingRate:Sn,channelCount:Kt,codec:rn,originalCodec:rn}}else _t=kt;return _t}_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],_t=(kt&240)>>>4,un=kt&15;if(un!==7){this._onError(Ue.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${un}`);return}this._parseAVCVideoPacket($e,nt+1,Je-1,wt,Nt,_t)}_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 _t=this._littleEndian,un=new DataView($e,nt,Je),wn=un.getUint8(0),zn=(un.getUint32(0,!_t)&16777215)<<8>>8;if(wn===0)this._parseAVCDecoderConfigurationRecord($e,nt+4,Je-4);else if(wn===1)this._parseAVCVideoData($e,nt+4,Je-4,wt,Nt,kt,zn);else if(wn!==2){this._onError(Ue.FORMAT_ERROR,`Flv: Invalid video packet type ${wn}`);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,_t=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 un=_t.getUint8(0),wn=_t.getUint8(1),Bn=_t.getUint8(2),zn=_t.getUint8(3);if(un!==1||wn===0){this._onError(Ue.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(_t.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(Ue.FORMAT_ERROR,`Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize-1}`);return}let At=_t.getUint8(5)&31;if(At===0){this._onError(Ue.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else At>1&&Pe.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${At}`);let Kt=6;for(let kn=0;kn<At;kn++){let Zt=_t.getUint16(Kt,!kt);if(Kt+=2,Zt===0)continue;let rn=new Uint8Array($e,nt+Kt,Zt);Kt+=Zt;let Rn=et.parseSPS(rn);if(kn!==0)continue;wt.codecWidth=Rn.codec_size.width,wt.codecHeight=Rn.codec_size.height,wt.presentWidth=Rn.present_size.width,wt.presentHeight=Rn.present_size.height,wt.profile=Rn.profile_string,wt.level=Rn.level_string,wt.bitDepth=Rn.bit_depth,wt.chromaFormat=Rn.chroma_format,wt.sarRatio=Rn.sar_ratio,wt.frameRate=Rn.frame_rate,(Rn.frame_rate.fixed===!1||Rn.frame_rate.fps_num===0||Rn.frame_rate.fps_den===0)&&(wt.frameRate=this._referenceFrameRate);let An=wt.frameRate.fps_den,Qn=wt.frameRate.fps_num;wt.refSampleDuration=wt.timescale*(An/Qn);let Un=rn.subarray(1,4),qn="avc1.";for(let si=0;si<3;si++){let Li=Un[si].toString(16);Li.length<2&&(Li="0"+Li),qn+=Li}wt.codec=qn;let Nn=this._mediaInfo;Nn.width=wt.codecWidth,Nn.height=wt.codecHeight,Nn.fps=wt.frameRate.fps,Nn.profile=wt.profile,Nn.level=wt.level,Nn.refFrames=Rn.ref_frames,Nn.chromaFormat=Rn.chroma_format_string,Nn.sarNum=wt.sarRatio.width,Nn.sarDen=wt.sarRatio.height,Nn.videoCodec=qn,Nn.hasAudio?Nn.audioCodec!=null&&(Nn.mimeType='video/x-flv; codecs="'+Nn.videoCodec+","+Nn.audioCodec+'"'):Nn.mimeType='video/x-flv; codecs="'+Nn.videoCodec+'"',Nn.isComplete()&&this._onMediaInfo(Nn)}let Sn=_t.getUint8(Kt);if(Sn===0){this._onError(Ue.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else Sn>1&&Pe.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${Sn}`);Kt++;for(let kn=0;kn<Sn;kn++){let Zt=_t.getUint16(Kt,!kt);Kt+=2,Zt!==0&&(Kt+=Zt)}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,_t){let un=this._littleEndian,wn=new DataView($e,nt,Je),Bn=[],zn=0,At=0;const Kt=this._naluLengthSize;let Sn=this._timestampBase+wt,kn=kt===1;for(;At<Je;){if(At+4>=Je){Pe.w(this.TAG,`Malformed Nalu near timestamp ${Sn}, offset = ${At}, dataSize = ${Je}`);break}let Zt=wn.getUint32(At,!un);if(Kt===3&&(Zt>>>=8),Zt>Je-Kt){Pe.w(this.TAG,`Malformed Nalus near timestamp ${Sn}, NaluSize > DataSize!`);return}let rn=wn.getUint8(At+Kt)&31;rn===5&&(kn=!0);let Rn=new Uint8Array($e,nt+At,Kt+Zt),An={type:rn,data:Rn};Bn.push(An),zn+=Rn.byteLength,At+=Kt+Zt}if(Bn.length){let Zt=this._videoTrack,rn={units:Bn,length:zn,isKeyframe:kn,dts:Sn,cts:_t,pts:Sn+_t};kn&&(rn.fileposition=Nt),Zt.samples.push(rn),Zt.length+=zn}}}var Ke=Ge;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 _t=0;_t<Nt;_t++)nt+=wt[_t].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 _t=0;_t<Nt;_t++)Je.set(wt[_t],kt),kt+=wt[_t].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),_t=Ze.trun($e,kt.byteLength+16+16+8+16+8+8);return Ze.box(Ze.types.traf,wt,Nt,_t,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 _t=0;_t<wt;_t++){let un=Je[_t].duration,wn=Je[_t].size,Bn=Je[_t].flags,zn=Je[_t].cts;kt.set([un>>>24&255,un>>>16&255,un>>>8&255,un&255,wn>>>24&255,wn>>>16&255,wn>>>8&255,wn&255,Bn.isLeading<<2|Bn.dependsOn,Bn.isDependedOn<<6|Bn.hasRedundancy<<4|Bn.isNonSync,0,0,zn>>>24&255,zn>>>16&255,zn>>>8&255,zn&255],12+16*_t)}return Ze.box(Ze.types.trun,kt)}static mdat($e){return Ze.box(Ze.types.mdat,$e)}}Ze.init();var at=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 nn{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 pn{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,_t=wt;for($e<nt[0].dts&&(Je=0,kt=_t+1);kt<=_t;)if(Nt=kt+Math.floor((_t-kt)/2),Nt===wt||$e>=nt[Nt].dts&&$e<nt[Nt+1].dts){Je=Nt;break}else nt[Nt].dts<$e?kt=Nt+1:_t=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,_t=0;if($e<nt[0].originalBeginDts)return _t=-1,_t;for(;Nt<=kt;)if(wt=Nt+Math.floor((kt-Nt)/2),wt===Je||$e>nt[wt].lastSample.originalDts&&$e<nt[wt+1].originalBeginDts){_t=wt;break}else nt[wt].originalBeginDts<$e?Nt=wt+1:kt=wt-1;return _t}_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 hn{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=at.generateInitSegment(nt);else if($e==="video")this._videoMeta=nt,Je=at.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,_t=-1,un=-1,wn=this._audioMeta.refSampleDuration,Bn=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,zn=this._dtsBaseInited&&this._audioNextDts===void 0,At=!1;if(!wt||wt.length===0||wt.length===1&&!nt)return;let Kt=0,Sn=null,kn=0;Bn?(Kt=0,kn=Je.length):(Kt=8,kn=8+Je.length);let Zt=null;if(wt.length>1&&(Zt=wt.pop(),kn-=Zt.length),this._audioStashedLastSample!=null){let Nn=this._audioStashedLastSample;this._audioStashedLastSample=null,wt.unshift(Nn),kn+=Nn.length}Zt!=null&&(this._audioStashedLastSample=Zt);let rn=wt[0].dts-this._dtsBase;if(this._audioNextDts)Nt=rn-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())Nt=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(At=!0);else{let Nn=this._audioSegmentInfoList.getLastSampleBefore(rn);if(Nn!=null){let si=rn-(Nn.originalDts+Nn.duration);si<=3&&(si=0);let Li=Nn.dts+Nn.duration+si;Nt=rn-Li}else Nt=0}if(At){let Nn=rn-Nt,si=this._videoSegmentInfoList.getLastSegmentBefore(rn);if(si!=null&&si.beginDts<Nn){let Li=tn.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(Li){let Bi=si.beginDts,Ln=Nn-si.beginDts;Pe.v(this.TAG,`InsertPrefixSilentAudio: dts: ${Bi}, duration: ${Ln}`),wt.unshift({unit:Li,dts:Bi,pts:Bi}),kn+=Li.byteLength}}else At=!1}let Rn=[];for(let Nn=0;Nn<wt.length;Nn++){let si=wt[Nn],Li=si.unit,Bi=si.dts-this._dtsBase,Ln=Bi-Nt;kt===-1&&(kt=Ln);let Ui=0;Nn!==wt.length-1?Ui=wt[Nn+1].dts-this._dtsBase-Nt-Ln:Zt!=null?Ui=Zt.dts-this._dtsBase-Nt-Ln:Rn.length>=1?Ui=Rn[Rn.length-1].duration:Ui=Math.floor(wn);let lr=!1,Di=null;if(Ui>wn*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!ie.safari){lr=!0;let Pn=Math.abs(Ui-wn),Yn=Math.ceil(Pn/wn),ui=Ln+wn;Pe.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
|
dts: ${Ln+Ui} ms, expected: ${Ln+Math.round(wn)} ms, delta: ${Math.round(Pn)} ms, generate: ${Yn} frames`);let Ti=tn.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);Ti==null&&(Pe.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),Ti=Li),Di=[];for(let Mi=0;Mi<Yn;Mi++){let ir=Math.round(ui);if(Di.length>0){let Wi=Di[Di.length-1];Wi.duration=ir-Wi.dts}let Fi={dts:ir,pts:ir,cts:0,unit:Ti,size:Ti.byteLength,duration:0,originalDts:Bi,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Di.push(Fi),kn+=Fi.size,ui+=wn}let pi=Di[Di.length-1];pi.duration=Ln+Ui-pi.dts,Ui=Math.round(wn)}Rn.push({dts:Ln,pts:Ln,cts:0,unit:si.unit,size:si.unit.byteLength,duration:Ui,originalDts:Bi,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),lr&&Rn.push.apply(Rn,Di)}Bn?Sn=new Uint8Array(kn):(Sn=new Uint8Array(kn),Sn[0]=kn>>>24&255,Sn[1]=kn>>>16&255,Sn[2]=kn>>>8&255,Sn[3]=kn&255,Sn.set(at.types.mdat,4));for(let Nn=0;Nn<Rn.length;Nn++){let si=Rn[Nn].unit;Sn.set(si,Kt),Kt+=si.byteLength}let An=Rn[Rn.length-1];_t=An.dts+An.duration,this._audioNextDts=_t;let Qn=new Jt;Qn.beginDts=kt,Qn.endDts=_t,Qn.beginPts=kt,Qn.endPts=_t,Qn.originalBeginDts=Rn[0].originalDts,Qn.originalEndDts=An.originalDts+An.duration,Qn.firstSample=new nn(Rn[0].dts,Rn[0].pts,Rn[0].duration,Rn[0].originalDts,!1),Qn.lastSample=new nn(An.dts,An.pts,An.duration,An.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(Qn),Je.samples=Rn,Je.sequenceNumber++;let Un=null;Bn?Un=new Uint8Array:Un=at.moof(Je,kt),Je.samples=[],Je.length=0;let qn={type:"audio",data:this._mergeBoxes(Un,Sn).buffer,sampleCount:Rn.length,info:Qn};Bn&&zn&&(qn.timestampOffset=kt),this._onMediaSegment("audio",qn)}_remuxVideo($e,nt){if(this._videoMeta==null)return;let Je=$e,wt=Je.samples,Nt,kt=-1,_t=-1,un=-1,wn=-1;if(!wt||wt.length===0||wt.length===1&&!nt)return;let Bn=8,zn=null,At=8+$e.length,Kt=null;if(wt.length>1&&(Kt=wt.pop(),At-=Kt.length),this._videoStashedLastSample!=null){let An=this._videoStashedLastSample;this._videoStashedLastSample=null,wt.unshift(An),At+=An.length}Kt!=null&&(this._videoStashedLastSample=Kt);let Sn=wt[0].dts-this._dtsBase;if(this._videoNextDts)Nt=Sn-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())Nt=0;else{let An=this._videoSegmentInfoList.getLastSampleBefore(Sn);if(An!=null){let Qn=Sn-(An.originalDts+An.duration);Qn<=3&&(Qn=0);let Un=An.dts+An.duration+Qn;Nt=Sn-Un}else Nt=0}let kn=new Jt,Zt=[];for(let An=0;An<wt.length;An++){let Qn=wt[An],Un=Qn.dts-this._dtsBase,qn=Qn.isKeyframe,Nn=Un-Nt,si=Qn.cts,Li=Nn+si;kt===-1&&(kt=Nn,un=Li);let Bi=0;if(An!==wt.length-1?Bi=wt[An+1].dts-this._dtsBase-Nt-Nn:Kt!=null?Bi=Kt.dts-this._dtsBase-Nt-Nn:Zt.length>=1?Bi=Zt[Zt.length-1].duration:Bi=Math.floor(this._videoMeta.refSampleDuration),qn){let Ln=new nn(Nn,Li,Bi,Qn.dts,!0);Ln.fileposition=Qn.fileposition,kn.appendSyncPoint(Ln)}Zt.push({dts:Nn,pts:Li,cts:si,units:Qn.units,size:Qn.length,isKeyframe:qn,duration:Bi,originalDts:Un,flags:{isLeading:0,dependsOn:qn?2:1,isDependedOn:qn?1:0,hasRedundancy:0,isNonSync:qn?0:1}})}zn=new Uint8Array(At),zn[0]=At>>>24&255,zn[1]=At>>>16&255,zn[2]=At>>>8&255,zn[3]=At&255,zn.set(at.types.mdat,4);for(let An=0;An<Zt.length;An++){let Qn=Zt[An].units;for(;Qn.length;){let qn=Qn.shift().data;zn.set(qn,Bn),Bn+=qn.byteLength}}let rn=Zt[Zt.length-1];if(_t=rn.dts+rn.duration,wn=rn.pts+rn.duration,this._videoNextDts=_t,kn.beginDts=kt,kn.endDts=_t,kn.beginPts=un,kn.endPts=wn,kn.originalBeginDts=Zt[0].originalDts,kn.originalEndDts=rn.originalDts+rn.duration,kn.firstSample=new nn(Zt[0].dts,Zt[0].pts,Zt[0].duration,Zt[0].originalDts,Zt[0].isKeyframe),kn.lastSample=new nn(rn.dts,rn.pts,rn.duration,rn.originalDts,rn.isKeyframe),this._isLive||this._videoSegmentInfoList.append(kn),Je.samples=Zt,Je.sequenceNumber++,this._forceFirstIDR){let An=Zt[0].flags;An.dependsOn=2,An.isNonSync=0}let Rn=at.moof(Je,kt);Je.samples=[],Je.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Rn,zn).buffer,sampleCount:Zt.length,info:kn})}_mergeBoxes($e,nt){let Je=new Uint8Array($e.byteLength+nt.byteLength);return Je.set($e,0),Je.set(nt,$e.byteLength),Je}}var En=hn,Tn={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 ci{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 yt(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 En(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(Tn.DEMUX_ERROR,Ue.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(Tn.METADATA_ARRIVED,$e)}_onScriptDataArrived($e){this._emitter.emit(Tn.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(Tn.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect($e){let nt=this._ioctl.extraData;this._mediaDataSource.segments[nt].redirectedURL=$e}_onIORecoveredEarlyEof(){this._emitter.emit(Tn.RECOVERED_EARLY_EOF)}_onIOException($e,nt){Pe.e(this.TAG,`IOException: type = ${$e}, code = ${nt.code}, msg = ${nt.msg}`),this._emitter.emit(Tn.IO_ERROR,$e,nt),this._disableStatisticsReporter()}_onDemuxException($e,nt){Pe.e(this.TAG,`DemuxException: type = ${$e}, info = ${nt}`),this._emitter.emit(Tn.DEMUX_ERROR,$e,nt)}_onRemuxerInitSegmentArrival($e,nt){this._emitter.emit(Tn.INIT_SEGMENT,$e,nt)}_onRemuxerMediaSegmentArrival($e,nt){if(this._pendingSeekTime==null&&(this._emitter.emit(Tn.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(Tn.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(Tn.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(Tn.STATISTICS_INFO,$e)}}var ri=ci,bi=function(oi){let $e="TransmuxingWorker",nt=null,Je=kn.bind(this);me.install(),oi.addEventListener("message",function(Zt){switch(Zt.data.cmd){case"init":nt=new ri(Zt.data.param[0],Zt.data.param[1]),nt.on(Tn.IO_ERROR,At.bind(this)),nt.on(Tn.DEMUX_ERROR,Kt.bind(this)),nt.on(Tn.INIT_SEGMENT,wt.bind(this)),nt.on(Tn.MEDIA_SEGMENT,Nt.bind(this)),nt.on(Tn.LOADING_COMPLETE,kt.bind(this)),nt.on(Tn.RECOVERED_EARLY_EOF,_t.bind(this)),nt.on(Tn.MEDIA_INFO,un.bind(this)),nt.on(Tn.METADATA_ARRIVED,wn.bind(this)),nt.on(Tn.SCRIPTDATA_ARRIVED,Bn.bind(this)),nt.on(Tn.STATISTICS_INFO,zn.bind(this)),nt.on(Tn.RECOMMEND_SEEKPOINT,Sn.bind(this));break;case"destroy":nt&&(nt.destroy(),nt=null),oi.postMessage({msg:"destroyed"});break;case"start":nt.start();break;case"stop":nt.stop();break;case"seek":nt.seek(Zt.data.param);break;case"pause":nt.pause();break;case"resume":nt.resume();break;case"logging_config":{let rn=Zt.data.param;vt.applyConfig(rn),rn.enableCallback===!0?vt.addLogListener(Je):vt.removeLogListener(Je);break}}});function wt(Zt,rn){let Rn={msg:Tn.INIT_SEGMENT,data:{type:Zt,data:rn}};oi.postMessage(Rn,[rn.data])}function Nt(Zt,rn){let Rn={msg:Tn.MEDIA_SEGMENT,data:{type:Zt,data:rn}};oi.postMessage(Rn,[rn.data])}function kt(){let Zt={msg:Tn.LOADING_COMPLETE};oi.postMessage(Zt)}function _t(){let Zt={msg:Tn.RECOVERED_EARLY_EOF};oi.postMessage(Zt)}function un(Zt){let rn={msg:Tn.MEDIA_INFO,data:Zt};oi.postMessage(rn)}function wn(Zt){let rn={msg:Tn.METADATA_ARRIVED,data:Zt};oi.postMessage(rn)}function Bn(Zt){let rn={msg:Tn.SCRIPTDATA_ARRIVED,data:Zt};oi.postMessage(rn)}function zn(Zt){let rn={msg:Tn.STATISTICS_INFO,data:Zt};oi.postMessage(rn)}function At(Zt,rn){oi.postMessage({msg:Tn.IO_ERROR,data:{type:Zt,info:rn}})}function Kt(Zt,rn){oi.postMessage({msg:Tn.DEMUX_ERROR,data:{type:Zt,info:rn}})}function Sn(Zt){oi.postMessage({msg:Tn.RECOMMEND_SEEKPOINT,data:Zt})}function kn(Zt,rn){oi.postMessage({msg:"logcat_callback",data:{type:Zt,logcat:rn}})}};class nr{constructor($e,nt){if(this.TAG="Transmuxer",this._emitter=new(Te()),nt.enableWorker&&typeof Worker!="undefined")try{let Je=Ee(82059);this._worker=Je(bi),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 ri($e,nt)}else this._controller=new ri($e,nt);if(this._controller){let Je=this._controller;Je.on(Tn.IO_ERROR,this._onIOError.bind(this)),Je.on(Tn.DEMUX_ERROR,this._onDemuxError.bind(this)),Je.on(Tn.INIT_SEGMENT,this._onInitSegment.bind(this)),Je.on(Tn.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),Je.on(Tn.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),Je.on(Tn.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),Je.on(Tn.MEDIA_INFO,this._onMediaInfo.bind(this)),Je.on(Tn.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),Je.on(Tn.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),Je.on(Tn.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),Je.on(Tn.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(Tn.INIT_SEGMENT,$e,nt)})}_onMediaSegment($e,nt){Promise.resolve().then(()=>{this._emitter.emit(Tn.MEDIA_SEGMENT,$e,nt)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(Tn.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(Tn.RECOVERED_EARLY_EOF)})}_onMediaInfo($e){Promise.resolve().then(()=>{this._emitter.emit(Tn.MEDIA_INFO,$e)})}_onMetaDataArrived($e){Promise.resolve().then(()=>{this._emitter.emit(Tn.METADATA_ARRIVED,$e)})}_onScriptDataArrived($e){Promise.resolve().then(()=>{this._emitter.emit(Tn.SCRIPTDATA_ARRIVED,$e)})}_onStatisticsInfo($e){Promise.resolve().then(()=>{this._emitter.emit(Tn.STATISTICS_INFO,$e)})}_onIOError($e,nt){Promise.resolve().then(()=>{this._emitter.emit(Tn.IO_ERROR,$e,nt)})}_onDemuxError($e,nt){Promise.resolve().then(()=>{this._emitter.emit(Tn.DEMUX_ERROR,$e,nt)})}_onRecommendSeekpoint($e){Promise.resolve().then(()=>{this._emitter.emit(Tn.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 Tn.INIT_SEGMENT:case Tn.MEDIA_SEGMENT:this._emitter.emit(nt.msg,Je.type,Je.data);break;case Tn.LOADING_COMPLETE:case Tn.RECOVERED_EARLY_EOF:this._emitter.emit(nt.msg);break;case Tn.MEDIA_INFO:Object.setPrototypeOf(Je,jt.prototype),this._emitter.emit(nt.msg,Je);break;case Tn.METADATA_ARRIVED:case Tn.SCRIPTDATA_ARRIVED:case Tn.STATISTICS_INFO:this._emitter.emit(nt.msg,Je);break;case Tn.IO_ERROR:case Tn.DEMUX_ERROR:this._emitter.emit(nt.msg,Je.type,Je.info);break;case Tn.RECOMMEND_SEEKPOINT:this._emitter.emit(nt.msg,Je);break;case"logcat_callback":Pe.emitter.emit("log",Je.type,Je.logcat);break;default:break}}}var Ji=nr,cr={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};class eo{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 pn}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(cr.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),_t=Je.buffered.end(Nt);this._pendingRemoveRanges[nt].push({start:kt,end:_t})}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 _t=wt.start(kt),un=wt.end(kt);if(_t<=$e&&$e<un+3){if($e-_t>=this._config.autoCleanupMaxBackwardDuration){Nt=!0;let wn=$e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[nt].push({start:_t,end:wn})}}else un<$e&&(Nt=!0,this._pendingRemoveRanges[nt].push({start:_t,end:un}))}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(cr.BUFFER_FULL),this._isBufferFull=!0):(Pe.e(this.TAG,wt.message),this._emitter.emit(cr.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(cr.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(cr.UPDATE_END)}_onSourceBufferError($e){Pe.e(this.TAG,`SourceBuffer Error: ${$e}`)}}var ro=eo;const hi={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},Pr={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:Ue.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:Ue.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:Ue.CODEC_UNSUPPORTED};class Hi{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===St.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(St.MEDIA_INFO,this.mediaInfo)}):$e===St.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(St.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 ro(this._config),this._msectl.on(cr.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(cr.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(cr.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(cr.ERROR,nt=>{this._emitter.emit(St.ERROR,hi.MEDIA_ERROR,Pr.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 Ji(this._mediaDataSource,this._config),this._transmuxer.on(Tn.INIT_SEGMENT,($e,nt)=>{this._msectl.appendInitSegment(nt)}),this._transmuxer.on(Tn.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(Tn.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(St.LOADING_COMPLETE)}),this._transmuxer.on(Tn.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(St.RECOVERED_EARLY_EOF)}),this._transmuxer.on(Tn.IO_ERROR,($e,nt)=>{this._emitter.emit(St.ERROR,hi.NETWORK_ERROR,$e,nt)}),this._transmuxer.on(Tn.DEMUX_ERROR,($e,nt)=>{this._emitter.emit(St.ERROR,hi.MEDIA_ERROR,$e,{code:-1,msg:nt})}),this._transmuxer.on(Tn.MEDIA_INFO,$e=>{this._mediaInfo=$e,this._emitter.emit(St.MEDIA_INFO,Object.assign({},$e))}),this._transmuxer.on(Tn.METADATA_ARRIVED,$e=>{this._emitter.emit(St.METADATA_ARRIVED,$e)}),this._transmuxer.on(Tn.SCRIPTDATA_ARRIVED,$e=>{this._emitter.emit(St.SCRIPTDATA_ARRIVED,$e)}),this._transmuxer.on(Tn.STATISTICS_INFO,$e=>{this._statisticsInfo=this._fillStatisticsInfo($e),this._emitter.emit(St.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(Tn.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),_t=$e.end(Nt);if(kt<=nt&&nt<_t){Je=kt,wt=_t;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 st=Hi;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===St.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(St.MEDIA_INFO,this.mediaInfo)}):$e===St.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(St.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(St.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit(St.STATISTICS_INFO,this.statisticsInfo)}}var Er=Rr;me.install();function yo(oi,$e){let nt=oi;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 st(nt,$e);default:return new Er(nt,$e)}}function Zr(){return rt.supportMSEH264Playback()}function ao(){return rt.getFeatureList()}let Jr={};Jr.createPlayer=yo,Jr.isSupported=Zr,Jr.getFeatureList=ao,Jr.BaseLoader=z,Jr.LoaderStatus=de,Jr.LoaderErrors=ue,Jr.Events=St,Jr.ErrorTypes=hi,Jr.ErrorDetails=Pr,Jr.FlvPlayer=st,Jr.NativePlayer=Er,Jr.LoggingControl=vt,Object.defineProperty(Jr,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var lo=Jr},93125:function(bn,qt,Ee){(function(Le){if(1)window.OSS=Le(),bn.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 St=je.parse(rt);if(!St.protocol){var Et=dt?"https://":"http://";St=je.parse(Et+rt)}if(St.protocol!=="http:"&&St.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return St}function ge(rt,dt,St){var Et=St?"https://":"http://",vt=dt?"-internal.aliyuncs.com":".aliyuncs.com";return rt.substr(0,14)==="vpc100-oss-cn-"&&(vt=".aliyuncs.com"),je.parse(Et+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=gt,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"),We=me("utility"),gt=me("urllib"),ct=me("./version"),Ct=me("dateformat"),it=me("bowser"),yt=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(),St={region:"oss-cn-hangzhou",internal:!1,secure:dt,bucket:null,endpoint:null,cname:!1};if((0,ee.default)(rt).forEach(function(Et){rt[Et]!==void 0&&(St[Et]=rt[Et])}),St.accessKeyId=St.accessKeyId.trim(),St.accessKeySecret=St.accessKeySecret.trim(),St.timeout&&(St.timeout=Ce(St.timeout)),St.endpoint)St.endpoint=xe(St.endpoint,St.secure);else{if(!St.region)throw new Error("require options.endpoint or options.region");St.endpoint=ge(St.region,St.internal,St.secure)}return St.inited=!0,St};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),yt.computeSignature(this.options.accessKeySecret,rt)},ht.authorization=function(rt,dt,St,Et){var vt=yt.buildCanonicalString(rt.toUpperCase(),dt,{headers:Et,parameters:St});return yt.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 St=this._getResource(rt);dt.authorization=this.authorization(rt.method,St,rt.subres,dt);var Et=this._getReqUrl(rt);oe("request %s %s, with headers %j, !!stream: %s",rt.method,Et,dt,!!rt.stream);var vt=rt.timeout||this.options.timeout;return{url:Et,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 St,Et,vt,Bt;return ue.default.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:return St=this.createRequest(dt),Et=void 0,vt=void 0,jt.prev=3,jt.next=6,this.urllib.request(St.url,St.params);case 6:Et=jt.sent,oe("response %s %s, got %s, headers: %j",dt.method,St.url,Et.status,Et.headers),jt.next=13;break;case 10:jt.prev=10,jt.t0=jt.catch(3),vt=jt.t0;case 13:if(Bt=void 0,!Et||!dt.successStatuses||dt.successStatuses.indexOf(Et.status)!==-1){jt.next=26;break}return jt.next=17,this.requestError(Et);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(Et.data);case 35:Et.data=jt.sent;case 36:return jt.abrupt("return",Et);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 We.encodeURIComponent(rt).replace(/%2F/g,"/")},ht._getReqUrl=function(rt){var dt={};le(this.options.endpoint).to(dt);var St=this._isIP(dt.hostname),Et=this.options.cname;!rt.bucket||Et||St||(dt.host=rt.bucket+"."+dt.host);var vt="/";rt.bucket&&St&&(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(ln){jt[ln]=""}):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,St=Qe.description;return!St&&be&&(St="Node.js "+be.version.slice(1)+" on "+be.platform+" "+be.arch),this._checkUserAgent(dt+" "+St)},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 St,Et,vt,Bt;return ue.default.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:if(St=null,dt.data&&dt.data.length){jt.next=5;break}dt.status===-1||dt.status===-2?(St=new Error(dt.message),St.name=dt.name,St.status=dt.status,St.code=dt.name):(dt.status===404?(St=new Error("Object not exists"),St.name="NoSuchKeyError",St.status=404,St.code="NoSuchKey"):dt.status===412?(St=new Error("Pre condition failed"),St.name="PreconditionFailedError",St.status=412,St.code="PreconditionFailed"):(St=new Error("Unknow error, status: "+dt.status),St.name="UnknowError",St.status=dt.status),St.requestId=dt.headers["x-oss-request-id"],St.host=""),jt.next=30;break;case 5:return Et=String(dt.data),oe("request response error data: %s",Et),vt=void 0,jt.prev=8,jt.next=11,this.parseXML(Et)||{};case 11:vt=jt.sent,jt.next=21;break;case 14:return jt.prev=14,jt.t0=jt.catch(8),oe(Et),jt.t0.message+=`
|
|
|
raw xml: `+Et,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+")"),St=new Error(Bt),St.name=vt.Code?vt.Code+"Error":"UnknowError",St.status=dt.status,St.code=vt.Code,St.requestId=vt.RequestId,St.hostId=vt.HostId,St.serverTime=vt.ServerTime;case 30:return oe("generate error %j",St),jt.abrupt("return",St);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,We,gt,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(We=it.sent,gt=We.uploadId,ct=this._getPartSize(Ne,Ce.partSize),Ct={file:we,name:ye,fileSize:Ne,partSize:ct,uploadId:gt,doneParts:[]},!Ce||!Ce.progress){it.next=36;break}return it.next=36,Ce.progress(0,Ct,We.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,We,gt,ct,Ct,it,yt,ut,Ft,ht,rt,dt,St,Et,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,We=[],Ve.length>0&&ee(Ve).to(We),gt=this._divideParts(ke,Ne),ct=gt.length,Ct=!1,it=ce.default.mark(function ln($t,yn){var Ut,Wt,Xt;return ce.default.wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:if($t.isCancel()){mt.next=21;break}return mt.prev=1,Ut=gt[yn-1],Wt={stream:$t._createStream(Ce,Ut.start,Ut.end),size:Ut.end-Ut.start},mt.next=6,$t._uploadPart(Qe,je,yn,Wt);case 6:if(Xt=mt.sent,$t.isCancel()||Ct){mt.next=13;break}if(ye.doneParts.push({number:yn,etag:Xt.res.headers.etag}),We.push({number:yn,etag:Xt.res.headers.etag}),!we||!we.progress){mt.next=13;break}return mt.next=13,we.progress(Ve.length/ct,ye,Xt.res);case 13:mt.next=21;break;case 15:if(mt.prev=15,mt.t0=mt.catch(1),$t.isCancel()){mt.next=21;break}throw $t.cancel(),mt.t0.partNum=yn,mt.t0;case 21:case"end":return mt.stop()}},ln,this,[[1,15]])}),yt=(0,xe.default)(new Array(ct),function(ln,$t){return $t+1}),ut=We.map(function(ln){return ln.number}),Ft=yt.filter(function(ln){return ut.indexOf(ln)<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(St=[],Et=0;Et<Ft.length;Et++)St.push(it(this,Ft[Et]));return jt.next=30,this._thunkPool(St,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 St=null,this._makeCancelEvent();case 40:return jt.next=42,this.completeMultipartUpload(Qe,je,We,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,We,gt;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 We=ct.sent,gt={name:we,url:this._objectUrl(we),res:We.res},Qe.headers&&Qe.headers["x-oss-callback"]&&(gt.data=JSON.parse(We.data.toString())),ct.abrupt("return",gt);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(We){for(;;)switch(We.prev=We.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],We.next=12,this.request(je);case 12:return Ve=We.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())),We.abrupt("return",Qe);case 16:case"end":return We.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(We){for(;;)switch(We.prev=We.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,We.prev=6,Qe=this._objectRequestParams("GET",we,ke),Qe.writeStream=Ne,Qe.successStatuses=[200,206,304],We.next=12,this.request(Qe);case 12:Ve=We.sent,je&&Ne.destroy(),We.next=24;break;case 16:if(We.prev=16,We.t0=We.catch(6),!je){We.next=23;break}return Ne.destroy(),ge("get error: %s, delete the exists file %s",We.t0,Ce),We.next=23,this._deleteFileSafe(Ce);case 23:throw We.t0;case 24:return We.abrupt("return",{res:Ve.res,content:Ve.data});case 25:case"end":return We.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,We;return xe.default.wrap(function(gt){for(;;)switch(gt.prev=gt.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],gt.next=14,this.request(je);case 14:return Ve=gt.sent,Qe=Ve.data,We=Qe&&Qe.Deleted||null,We&&(Array.isArray(We)||(We=[We]),We=We.map(function(ct){return ct.Key})),gt.abrupt("return",{res:Ve.res,deleted:We});case 19:case"end":return gt.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(We){ke.headers["x-oss-copy-source-"+We.toLowerCase()]=ke.headers[We]}),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(We){for(;;)switch(We.prev=We.next){case 0:return ke=this._objectRequestParams("GET","",Ce),ke.query=we,ke.xmlResponse=!0,ke.successStatuses=[200],We.next=6,this.request(ke);case 6:return Ne=We.sent,je=Ne.data.Contents,Ve=this,je&&(Array.isArray(je)||(je=[je]),je=je.map(function(gt){return{name:gt.Key,url:Ve._objectUrl(gt.Key),lastModified:gt.LastModified,etag:gt.ETag,type:gt.Type,size:Number(gt.Size),storageClass:gt.StorageClass,owner:{id:gt.Owner.ID,displayName:gt.Owner.DisplayName}}})),Qe=Ne.data.CommonPrefixes||null,Qe&&(Array.isArray(Qe)||(Qe=[Qe]),Qe=Qe.map(function(gt){return gt.Prefix})),We.abrupt("return",{res:Ne.res,objects:je,prefixes:Qe,nextMarker:Ne.data.NextMarker||null,isTruncated:Ne.data.IsTruncated==="true"});case 13:case"end":return We.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 We(){return Pe.default.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return gt.prev=0,gt.t0=Qe,gt.next=4,je;case 4:gt.t1=gt.sent,(0,gt.t0)(null,gt.t1),gt.next=11;break;case 8:gt.prev=8,gt.t2=gt.catch(0),Qe(gt.t2);case 11:case"end":return gt.stop()}},We,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)),We=!oe&&!Ce&&/macintosh/i.test(de),gt=!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),yt=!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"):We?(ee.mac=ce,ee.osname="macOS"):ut?(ee.xbox=ce,ee.osname="Xbox"):Qe?(ee.windows=ce,ee.osname="Windows"):gt&&(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&&!yt)||ee.silk?ee.tablet=ce:(yt||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,Ge){if(!(Se.TYPED_ARRAY_SUPPORT||this instanceof Se))return new Se(Re,Ae,Ge);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,Ge)}function xe(Re,Ae,Ge,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,Ge,Ke):typeof Ae=="string"?de(Re,Ae,Ge):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,Ge,Ke){return ge(Ae),Ae<=0?he(Re,Ae):Ge!==void 0?typeof Ke=="string"?he(Re,Ae).fill(Ge,Ke):he(Re,Ae).fill(Ge):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 Ge=0;Ge<Ae;++Ge)Re[Ge]=0;return Re}function de(Re,Ae,Ge){if(typeof Ge=="string"&&Ge!==""||(Ge="utf8"),!Se.isEncoding(Ge))throw new TypeError('"encoding" must be a valid string encoding');var Ke=0|se(Ae,Ge);Re=he(Re,Ke);var Ze=Re.write(Ae,Ge);return Ze!==Ke&&(Re=Re.slice(0,Ze)),Re}function ue(Re,Ae){var Ge=Ae.length<0?0:0|oe(Ae.length);Re=he(Re,Ge);for(var Ke=0;Ke<Ge;Ke+=1)Re[Ke]=255&Ae[Ke];return Re}function z(Re,Ae,Ge,Ke){if(Ae.byteLength,Ge<0||Ae.byteLength<Ge)throw new RangeError("'offset' is out of bounds");if(Ae.byteLength<Ge+(Ke||0))throw new RangeError("'length' is out of bounds");return Ae=Ge===void 0&&Ke===void 0?new Uint8Array(Ae):Ke===void 0?new Uint8Array(Ae,Ge):new Uint8Array(Ae,Ge,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 Ge=0|oe(Ae.length);return Re=he(Re,Ge),Re.length===0||Ae.copy(Re,0,0,Ge),Re}if(Ae){if(typeof ArrayBuffer!="undefined"&&Ae.buffer instanceof ArrayBuffer||"length"in Ae)return typeof Ae.length!="number"||ze(Ae.length)?he(Re,0):ue(Re,Ae);if(Ae.type==="Buffer"&&qe(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 Ge=Re.length;if(Ge===0)return 0;for(var Ke=!1;;)switch(Ae){case"ascii":case"latin1":case"binary":return Ge;case"utf8":case"utf-8":case void 0:return yn(Re).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Ge;case"hex":return Ge>>>1;case"base64":return Xt(Re).length;default:if(Ke)return yn(Re).length;Ae=(""+Ae).toLowerCase(),Ke=!0}}function le(Re,Ae,Ge){var Ke=!1;if((Ae===void 0||Ae<0)&&(Ae=0),Ae>this.length||((Ge===void 0||Ge>this.length)&&(Ge=this.length),Ge<=0)||(Ge>>>=0,Ae>>>=0,Ge<=Ae))return"";for(Re||(Re="utf8");;)switch(Re){case"hex":return ut(this,Ae,Ge);case"utf8":case"utf-8":return ct(this,Ae,Ge);case"ascii":return it(this,Ae,Ge);case"latin1":case"binary":return yt(this,Ae,Ge);case"base64":return gt(this,Ae,Ge);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ft(this,Ae,Ge);default:if(Ke)throw new TypeError("Unknown encoding: "+Re);Re=(Re+"").toLowerCase(),Ke=!0}}function ye(Re,Ae,Ge){var Ke=Re[Ae];Re[Ae]=Re[Ge],Re[Ge]=Ke}function we(Re,Ae,Ge,Ke,Ze){if(Re.length===0)return-1;if(typeof Ge=="string"?(Ke=Ge,Ge=0):Ge>2147483647?Ge=2147483647:Ge<-2147483648&&(Ge=-2147483648),Ge=+Ge,isNaN(Ge)&&(Ge=Ze?0:Re.length-1),Ge<0&&(Ge=Re.length+Ge),Ge>=Re.length){if(Ze)return-1;Ge=Re.length-1}else if(Ge<0){if(!Ze)return-1;Ge=0}if(typeof Ae=="string"&&(Ae=Se.from(Ae,Ke)),Se.isBuffer(Ae))return Ae.length===0?-1:Ce(Re,Ae,Ge,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,Ge):Uint8Array.prototype.lastIndexOf.call(Re,Ae,Ge):Ce(Re,[Ae],Ge,Ke,Ze);throw new TypeError("val must be string, number or Buffer")}function Ce(Re,Ae,Ge,Ke,Ze){function at(En,Wn){return xt===1?En[Wn]:En.readUInt16BE(Wn*xt)}var xt=1,tn=Re.length,nn=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,nn/=2,Ge/=2}var Jt;if(Ze){var pn=-1;for(Jt=Ge;Jt<tn;Jt++)if(at(Re,Jt)===at(Ae,pn===-1?0:Jt-pn)){if(pn===-1&&(pn=Jt),Jt-pn+1===nn)return pn*xt}else pn!==-1&&(Jt-=Jt-pn),pn=-1}else for(Ge+nn>tn&&(Ge=tn-nn),Jt=Ge;Jt>=0;Jt--){for(var Mn=!0,hn=0;hn<nn;hn++)if(at(Re,Jt+hn)!==at(Ae,hn)){Mn=!1;break}if(Mn)return Jt}return-1}function ke(Re,Ae,Ge,Ke){Ge=Number(Ge)||0;var Ze=Re.length-Ge;Ke?(Ke=Number(Ke))>Ze&&(Ke=Ze):Ke=Ze;var at=Ae.length;if(at%2!=0)throw new TypeError("Invalid hex string");Ke>at/2&&(Ke=at/2);for(var xt=0;xt<Ke;++xt){var tn=parseInt(Ae.substr(2*xt,2),16);if(isNaN(tn))return xt;Re[Ge+xt]=tn}return xt}function Ne(Re,Ae,Ge,Ke){return mt(yn(Ae,Re.length-Ge),Re,Ge,Ke)}function je(Re,Ae,Ge,Ke){return mt(Ut(Ae),Re,Ge,Ke)}function Ve(Re,Ae,Ge,Ke){return je(Re,Ae,Ge,Ke)}function Qe(Re,Ae,Ge,Ke){return mt(Xt(Ae),Re,Ge,Ke)}function We(Re,Ae,Ge,Ke){return mt(Wt(Ae,Re.length-Ge),Re,Ge,Ke)}function gt(Re,Ae,Ge){return Ae===0&&Ge===Re.length?Be.fromByteArray(Re):Be.fromByteArray(Re.slice(Ae,Ge))}function ct(Re,Ae,Ge){Ge=Math.min(Re.length,Ge);for(var Ke=[],Ze=Ae;Ze<Ge;){var at=Re[Ze],xt=null,tn=at>239?4:at>223?3:at>191?2:1;if(Ze+tn<=Ge){var nn,Jt,pn,Mn;switch(tn){case 1:at<128&&(xt=at);break;case 2:nn=Re[Ze+1],(192&nn)==128&&(Mn=(31&at)<<6|63&nn)>127&&(xt=Mn);break;case 3:nn=Re[Ze+1],Jt=Re[Ze+2],(192&nn)==128&&(192&Jt)==128&&(Mn=(15&at)<<12|(63&nn)<<6|63&Jt)>2047&&(Mn<55296||Mn>57343)&&(xt=Mn);break;case 4:nn=Re[Ze+1],Jt=Re[Ze+2],pn=Re[Ze+3],(192&nn)==128&&(192&Jt)==128&&(192&pn)==128&&(Mn=(15&at)<<18|(63&nn)<<12|(63&Jt)<<6|63&pn)>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<=Ue)return String.fromCharCode.apply(String,Re);for(var Ge="",Ke=0;Ke<Ae;)Ge+=String.fromCharCode.apply(String,Re.slice(Ke,Ke+=Ue));return Ge}function it(Re,Ae,Ge){var Ke="";Ge=Math.min(Re.length,Ge);for(var Ze=Ae;Ze<Ge;++Ze)Ke+=String.fromCharCode(127&Re[Ze]);return Ke}function yt(Re,Ae,Ge){var Ke="";Ge=Math.min(Re.length,Ge);for(var Ze=Ae;Ze<Ge;++Ze)Ke+=String.fromCharCode(Re[Ze]);return Ke}function ut(Re,Ae,Ge){var Ke=Re.length;(!Ae||Ae<0)&&(Ae=0),(!Ge||Ge<0||Ge>Ke)&&(Ge=Ke);for(var Ze="",at=Ae;at<Ge;++at)Ze+=$t(Re[at]);return Ze}function Ft(Re,Ae,Ge){for(var Ke=Re.slice(Ae,Ge),Ze="",at=0;at<Ke.length;at+=2)Ze+=String.fromCharCode(Ke[at]+256*Ke[at+1]);return Ze}function ht(Re,Ae,Ge){if(Re%1!=0||Re<0)throw new RangeError("offset is not uint");if(Re+Ae>Ge)throw new RangeError("Trying to access beyond buffer length")}function rt(Re,Ae,Ge,Ke,Ze,at){if(!Se.isBuffer(Re))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ae>Ze||Ae<at)throw new RangeError('"value" argument is out of bounds');if(Ge+Ke>Re.length)throw new RangeError("Index out of range")}function dt(Re,Ae,Ge,Ke){Ae<0&&(Ae=65535+Ae+1);for(var Ze=0,at=Math.min(Re.length-Ge,2);Ze<at;++Ze)Re[Ge+Ze]=(Ae&255<<8*(Ke?Ze:1-Ze))>>>8*(Ke?Ze:1-Ze)}function St(Re,Ae,Ge,Ke){Ae<0&&(Ae=4294967295+Ae+1);for(var Ze=0,at=Math.min(Re.length-Ge,4);Ze<at;++Ze)Re[Ge+Ze]=Ae>>>8*(Ke?Ze:3-Ze)&255}function Et(Re,Ae,Ge,Ke,Ze,at){if(Ge+Ke>Re.length)throw new RangeError("Index out of range");if(Ge<0)throw new RangeError("Index out of range")}function vt(Re,Ae,Ge,Ke,Ze){return Ze||Et(Re,Ae,Ge,4,34028234663852886e22,-34028234663852886e22),et.write(Re,Ae,Ge,Ke,23,4),Ge+4}function Bt(Re,Ae,Ge,Ke,Ze){return Ze||Et(Re,Ae,Ge,8,17976931348623157e292,-17976931348623157e292),et.write(Re,Ae,Ge,Ke,52,8),Ge+8}function jt(Re){if(Re=ln(Re).replace(Xe,""),Re.length<2)return"";for(;Re.length%4!=0;)Re+="=";return Re}function ln(Re){return Re.trim?Re.trim():Re.replace(/^\s+|\s+$/g,"")}function $t(Re){return Re<16?"0"+Re.toString(16):Re.toString(16)}function yn(Re,Ae){Ae=Ae||1/0;for(var Ge,Ke=Re.length,Ze=null,at=[],xt=0;xt<Ke;++xt){if((Ge=Re.charCodeAt(xt))>55295&&Ge<57344){if(!Ze){if(Ge>56319){(Ae-=3)>-1&&at.push(239,191,189);continue}if(xt+1===Ke){(Ae-=3)>-1&&at.push(239,191,189);continue}Ze=Ge;continue}if(Ge<56320){(Ae-=3)>-1&&at.push(239,191,189),Ze=Ge;continue}Ge=65536+(Ze-55296<<10|Ge-56320)}else Ze&&(Ae-=3)>-1&&at.push(239,191,189);if(Ze=null,Ge<128){if((Ae-=1)<0)break;at.push(Ge)}else if(Ge<2048){if((Ae-=2)<0)break;at.push(Ge>>6|192,63&Ge|128)}else if(Ge<65536){if((Ae-=3)<0)break;at.push(Ge>>12|224,Ge>>6&63|128,63&Ge|128)}else{if(!(Ge<1114112))throw new Error("Invalid code point");if((Ae-=4)<0)break;at.push(Ge>>18|240,Ge>>12&63|128,Ge>>6&63|128,63&Ge|128)}}return at}function Ut(Re){for(var Ae=[],Ge=0;Ge<Re.length;++Ge)Ae.push(255&Re.charCodeAt(Ge));return Ae}function Wt(Re,Ae){for(var Ge,Ke,Ze,at=[],xt=0;xt<Re.length&&!((Ae-=2)<0);++xt)Ge=Re.charCodeAt(xt),Ke=Ge>>8,Ze=Ge%256,at.push(Ze),at.push(Ke);return at}function Xt(Re){return Be.toByteArray(jt(Re))}function mt(Re,Ae,Ge,Ke){for(var Ze=0;Ze<Ke&&!(Ze+Ge>=Ae.length||Ze>=Re.length);++Ze)Ae[Ze+Ge]=Re[Ze];return Ze}function ze(Re){return Re!==Re}var Be=me("base64-js"),et=me("ieee754"),qe=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,Ge){return xe(null,Re,Ae,Ge)},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,Ge){return ce(null,Re,Ae,Ge)},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 Ge=Re.length,Ke=Ae.length,Ze=0,at=Math.min(Ge,Ke);Ze<at;++Ze)if(Re[Ze]!==Ae[Ze]){Ge=Re[Ze],Ke=Ae[Ze];break}return Ge<Ke?-1:Ke<Ge?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(!qe(Re))throw new TypeError('"list" argument must be an Array of Buffers');if(Re.length===0)return Se.alloc(0);var Ge;if(Ae===void 0)for(Ae=0,Ge=0;Ge<Re.length;++Ge)Ae+=Re[Ge].length;var Ke=Se.allocUnsafe(Ae),Ze=0;for(Ge=0;Ge<Re.length;++Ge){var at=Re[Ge];if(!Se.isBuffer(at))throw new TypeError('"list" argument must be an Array of Buffers');at.copy(Ke,Ze),Ze+=at.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,Ge,Ke,Ze){if(!Se.isBuffer(Re))throw new TypeError("Argument must be a Buffer");if(Ae===void 0&&(Ae=0),Ge===void 0&&(Ge=Re?Re.length:0),Ke===void 0&&(Ke=0),Ze===void 0&&(Ze=this.length),Ae<0||Ge>Re.length||Ke<0||Ze>this.length)throw new RangeError("out of range index");if(Ke>=Ze&&Ae>=Ge)return 0;if(Ke>=Ze)return-1;if(Ae>=Ge)return 1;if(Ae>>>=0,Ge>>>=0,Ke>>>=0,Ze>>>=0,this===Re)return 0;for(var at=Ze-Ke,xt=Ge-Ae,tn=Math.min(at,xt),nn=this.slice(Ke,Ze),Jt=Re.slice(Ae,Ge),pn=0;pn<tn;++pn)if(nn[pn]!==Jt[pn]){at=nn[pn],xt=Jt[pn];break}return at<xt?-1:xt<at?1:0},Se.prototype.includes=function(Re,Ae,Ge){return this.indexOf(Re,Ae,Ge)!==-1},Se.prototype.indexOf=function(Re,Ae,Ge){return we(this,Re,Ae,Ge,!0)},Se.prototype.lastIndexOf=function(Re,Ae,Ge){return we(this,Re,Ae,Ge,!1)},Se.prototype.write=function(Re,Ae,Ge,Ke){if(Ae===void 0)Ke="utf8",Ge=this.length,Ae=0;else if(Ge===void 0&&typeof Ae=="string")Ke=Ae,Ge=this.length,Ae=0;else{if(!isFinite(Ae))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");Ae|=0,isFinite(Ge)?(Ge|=0,Ke===void 0&&(Ke="utf8")):(Ke=Ge,Ge=void 0)}var Ze=this.length-Ae;if((Ge===void 0||Ge>Ze)&&(Ge=Ze),Re.length>0&&(Ge<0||Ae<0)||Ae>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ke||(Ke="utf8");for(var at=!1;;)switch(Ke){case"hex":return ke(this,Re,Ae,Ge);case"utf8":case"utf-8":return Ne(this,Re,Ae,Ge);case"ascii":return je(this,Re,Ae,Ge);case"latin1":case"binary":return Ve(this,Re,Ae,Ge);case"base64":return Qe(this,Re,Ae,Ge);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return We(this,Re,Ae,Ge);default:if(at)throw new TypeError("Unknown encoding: "+Ke);Ke=(""+Ke).toLowerCase(),at=!0}},Se.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ue=4096;Se.prototype.slice=function(Re,Ae){var Ge=this.length;Re=~~Re,Ae=Ae===void 0?Ge:~~Ae,Re<0?(Re+=Ge)<0&&(Re=0):Re>Ge&&(Re=Ge),Ae<0?(Ae+=Ge)<0&&(Ae=0):Ae>Ge&&(Ae=Ge),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 at=0;at<Ze;++at)Ke[at]=this[at+Re]}return Ke},Se.prototype.readUIntLE=function(Re,Ae,Ge){Re|=0,Ae|=0,Ge||ht(Re,Ae,this.length);for(var Ke=this[Re],Ze=1,at=0;++at<Ae&&(Ze*=256);)Ke+=this[Re+at]*Ze;return Ke},Se.prototype.readUIntBE=function(Re,Ae,Ge){Re|=0,Ae|=0,Ge||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,Ge){Re|=0,Ae|=0,Ge||ht(Re,Ae,this.length);for(var Ke=this[Re],Ze=1,at=0;++at<Ae&&(Ze*=256);)Ke+=this[Re+at]*Ze;return Ze*=128,Ke>=Ze&&(Ke-=Math.pow(2,8*Ae)),Ke},Se.prototype.readIntBE=function(Re,Ae,Ge){Re|=0,Ae|=0,Ge||ht(Re,Ae,this.length);for(var Ke=Ae,Ze=1,at=this[Re+--Ke];Ke>0&&(Ze*=256);)at+=this[Re+--Ke]*Ze;return Ze*=128,at>=Ze&&(at-=Math.pow(2,8*Ae)),at},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 Ge=this[Re]|this[Re+1]<<8;return 32768&Ge?4294901760|Ge:Ge},Se.prototype.readInt16BE=function(Re,Ae){Ae||ht(Re,2,this.length);var Ge=this[Re+1]|this[Re]<<8;return 32768&Ge?4294901760|Ge:Ge},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),et.read(this,Re,!0,23,4)},Se.prototype.readFloatBE=function(Re,Ae){return Ae||ht(Re,4,this.length),et.read(this,Re,!1,23,4)},Se.prototype.readDoubleLE=function(Re,Ae){return Ae||ht(Re,8,this.length),et.read(this,Re,!0,52,8)},Se.prototype.readDoubleBE=function(Re,Ae){return Ae||ht(Re,8,this.length),et.read(this,Re,!1,52,8)},Se.prototype.writeUIntLE=function(Re,Ae,Ge,Ke){Re=+Re,Ae|=0,Ge|=0,!Ke&&rt(this,Re,Ae,Ge,Math.pow(2,8*Ge)-1,0);var Ze=1,at=0;for(this[Ae]=255ℜ++at<Ge&&(Ze*=256);)this[Ae+at]=Re/Ze&255;return Ae+Ge},Se.prototype.writeUIntBE=function(Re,Ae,Ge,Ke){Re=+Re,Ae|=0,Ge|=0,!Ke&&rt(this,Re,Ae,Ge,Math.pow(2,8*Ge)-1,0);var Ze=Ge-1,at=1;for(this[Ae+Ze]=255ℜ--Ze>=0&&(at*=256);)this[Ae+Ze]=Re/at&255;return Ae+Ge},Se.prototype.writeUInt8=function(Re,Ae,Ge){return Re=+Re,Ae|=0,Ge||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,Ge){return Re=+Re,Ae|=0,Ge||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,Ge){return Re=+Re,Ae|=0,Ge||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,Ge){return Re=+Re,Ae|=0,Ge||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):St(this,Re,Ae,!0),Ae+4},Se.prototype.writeUInt32BE=function(Re,Ae,Ge){return Re=+Re,Ae|=0,Ge||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):St(this,Re,Ae,!1),Ae+4},Se.prototype.writeIntLE=function(Re,Ae,Ge,Ke){if(Re=+Re,Ae|=0,!Ke){var Ze=Math.pow(2,8*Ge-1);rt(this,Re,Ae,Ge,Ze-1,-Ze)}var at=0,xt=1,tn=0;for(this[Ae]=255ℜ++at<Ge&&(xt*=256);)Re<0&&tn===0&&this[Ae+at-1]!==0&&(tn=1),this[Ae+at]=(Re/xt>>0)-tn&255;return Ae+Ge},Se.prototype.writeIntBE=function(Re,Ae,Ge,Ke){if(Re=+Re,Ae|=0,!Ke){var Ze=Math.pow(2,8*Ge-1);rt(this,Re,Ae,Ge,Ze-1,-Ze)}var at=Ge-1,xt=1,tn=0;for(this[Ae+at]=255ℜ--at>=0&&(xt*=256);)Re<0&&tn===0&&this[Ae+at+1]!==0&&(tn=1),this[Ae+at]=(Re/xt>>0)-tn&255;return Ae+Ge},Se.prototype.writeInt8=function(Re,Ae,Ge){return Re=+Re,Ae|=0,Ge||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,Ge){return Re=+Re,Ae|=0,Ge||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,Ge){return Re=+Re,Ae|=0,Ge||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,Ge){return Re=+Re,Ae|=0,Ge||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):St(this,Re,Ae,!0),Ae+4},Se.prototype.writeInt32BE=function(Re,Ae,Ge){return Re=+Re,Ae|=0,Ge||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):St(this,Re,Ae,!1),Ae+4},Se.prototype.writeFloatLE=function(Re,Ae,Ge){return vt(this,Re,Ae,!0,Ge)},Se.prototype.writeFloatBE=function(Re,Ae,Ge){return vt(this,Re,Ae,!1,Ge)},Se.prototype.writeDoubleLE=function(Re,Ae,Ge){return Bt(this,Re,Ae,!0,Ge)},Se.prototype.writeDoubleBE=function(Re,Ae,Ge){return Bt(this,Re,Ae,!1,Ge)},Se.prototype.copy=function(Re,Ae,Ge,Ke){if(Ge||(Ge=0),Ke||Ke===0||(Ke=this.length),Ae>=Re.length&&(Ae=Re.length),Ae||(Ae=0),Ke>0&&Ke<Ge&&(Ke=Ge),Ke===Ge||Re.length===0||this.length===0)return 0;if(Ae<0)throw new RangeError("targetStart out of bounds");if(Ge<0||Ge>=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-Ge&&(Ke=Re.length-Ae+Ge);var Ze,at=Ke-Ge;if(this===Re&&Ge<Ae&&Ae<Ke)for(Ze=at-1;Ze>=0;--Ze)Re[Ze+Ae]=this[Ze+Ge];else if(at<1e3||!Se.TYPED_ARRAY_SUPPORT)for(Ze=0;Ze<at;++Ze)Re[Ze+Ae]=this[Ze+Ge];else Uint8Array.prototype.set.call(Re,this.subarray(Ge,Ge+at),Ae);return at},Se.prototype.fill=function(Re,Ae,Ge,Ke){if(typeof Re=="string"){if(typeof Ae=="string"?(Ke=Ae,Ae=0,Ge=this.length):typeof Ge=="string"&&(Ke=Ge,Ge=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<Ge)throw new RangeError("Out of range index");if(Ge<=Ae)return this;Ae>>>=0,Ge=Ge===void 0?this.length:Ge>>>0,Re||(Re=0);var at;if(typeof Re=="number")for(at=Ae;at<Ge;++at)this[at]=Re;else{var xt=Se.isBuffer(Re)?Re:yn(new Se(Re,Ke).toString()),tn=xt.length;for(at=0;at<Ge-Ae;++at)this[at+Ae]=xt[at%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,We,gt){if(this instanceof je){switch(arguments.length){case 0:return new je;case 1:return new je(Qe);case 2:return new je(Qe,We)}return new je(Qe,We,gt)}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 gt)return gt[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",We=!1,gt=ee.prototype,ct=gt[de]||gt["@@iterator"]||le&>[le],Ct=ct||je(le),it=le?Qe?je("entries"):Ct:void 0,yt=oe=="Array"&>.entries||ct;if(yt&&(Ne=ve(yt.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"&&(We=!0,Ct=function(){return ct.call(this)}),be&&!we||!ue&&!We&>[de]||Se(gt,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 gt||he(gt,ke,Ce[ke]);else Pe(Pe.P+Pe.F*(ue||We),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||"",We=ge.Promise,gt=ve(je)=="process",ct=function(){},Ct=Pe=ye.f,it=!!function(){try{var Et=We.resolve(1),vt=(Et.constructor={})[me("./_wks")("species")]=function(Bt){Bt(ct,ct)};return(gt||typeof PromiseRejectionEvent=="function")&&Et.then(ct)instanceof vt&&Qe.indexOf("6.6")!==0&&Ce.indexOf("Chrome/66")===-1}catch(Bt){}}(),yt=function(Et){var vt;return!(!ue(Et)||typeof(vt=Et.then)!="function")&&vt},ut=function(Et,vt){if(!Et._n){Et._n=!0;var Bt=Et._c;le(function(){for(var jt=Et._v,ln=Et._s==1,$t=0;Bt.length>$t;)(function(yn){var Ut,Wt,Xt,mt=ln?yn.ok:yn.fail,ze=yn.resolve,Be=yn.reject,et=yn.domain;try{mt?(ln||(Et._h==2&&rt(Et),Et._h=1),mt===!0?Ut=jt:(et&&et.enter(),Ut=mt(jt),et&&(et.exit(),Xt=!0)),Ut===yn.promise?Be(Ne("Promise-chain cycle")):(Wt=yt(Ut))?Wt.call(Ut,ze,Be):ze(Ut)):Be(jt)}catch(qe){et&&!Xt&&et.exit(),Be(qe)}})(Bt[$t++]);Et._c=[],Et._n=!1,vt&&!Et._h&&Ft(Et)})}},Ft=function(Et){se.call(ge,function(){var vt,Bt,jt,ln=Et._v,$t=ht(Et);if($t&&(vt=we(function(){gt?je.emit("unhandledRejection",ln,Et):(Bt=ge.onunhandledrejection)?Bt({promise:Et,reason:ln}):(jt=ge.console)&&jt.error&&jt.error("Unhandled promise rejection",ln)}),Et._h=gt||ht(Et)?2:1),Et._a=void 0,$t&&vt.e)throw vt.v})},ht=function(Et){return Et._h!==1&&(Et._a||Et._c).length===0},rt=function(Et){se.call(ge,function(){var vt;gt?je.emit("rejectionHandled",Et):(vt=ge.onrejectionhandled)&&vt({promise:Et,reason:Et._v})})},dt=function(Et){var vt=this;vt._d||(vt._d=!0,vt=vt._w||vt,vt._v=Et,vt._s=2,vt._a||(vt._a=vt._c.slice()),ut(vt,!0))},St=function(Et){var vt,Bt=this;if(!Bt._d){Bt._d=!0,Bt=Bt._w||Bt;try{if(Bt===Et)throw Ne("Promise can't be resolved itself");(vt=yt(Et))?le(function(){var jt={_w:Bt,_d:!1};try{vt.call(Et,ce(St,jt,1),ce(dt,jt,1))}catch(ln){dt.call(jt,ln)}}):(Bt._v=Et,Bt._s=1,ut(Bt,!1))}catch(jt){dt.call({_w:Bt,_d:!1},jt)}}};it||(We=function(Et){ee(this,We,"Promise","_h"),z(Et),be.call(this);try{Et(ce(St,this,1),ce(dt,this,1))}catch(vt){dt.call(this,vt)}},be=function(Et){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")(We.prototype,{then:function(Et,vt){var Bt=Ct(ie(this,We));return Bt.ok=typeof Et!="function"||Et,Bt.fail=typeof vt=="function"&&vt,Bt.domain=gt?je.domain:void 0,this._c.push(Bt),this._a&&this._a.push(Bt),this._s&&ut(this,!1),Bt.promise},catch:function(Et){return this.then(void 0,Et)}}),he=function(){var Et=new be;this.promise=Et,this.resolve=ce(St,Et,1),this.reject=ce(dt,Et,1)},ye.f=Ct=function(Et){return Et===We||Et===Se?new he(Et):Pe(Et)}),de(de.G+de.W+de.F*!it,{Promise:We}),me("./_set-to-string-tag")(We,"Promise"),me("./_set-species")("Promise"),Se=me("./_core").Promise,de(de.S+de.F*!it,"Promise",{reject:function(Et){var vt=Ct(this);return(0,vt.reject)(Et),vt.promise}}),de(de.S+de.F*(xe||!it),"Promise",{resolve:function(Et){return ke(xe&&this===Se?We:this,Et)}}),de(de.S+de.F*!(it&&me("./_iter-detect")(function(Et){We.all(Et).catch(ct)})),"Promise",{all:function(Et){var vt=this,Bt=Ct(vt),jt=Bt.resolve,ln=Bt.reject,$t=we(function(){var yn=[],Ut=0,Wt=1;oe(Et,!1,function(Xt){var mt=Ut++,ze=!1;yn.push(void 0),Wt++,vt.resolve(Xt).then(function(Be){ze||(ze=!0,yn[mt]=Be,--Wt||jt(yn))},ln)}),--Wt||jt(yn)});return $t.e&&ln($t.v),Bt.promise},race:function(Et){var vt=this,Bt=Ct(vt),jt=Bt.reject,ln=we(function(){oe(Et,!1,function($t){vt.resolve($t).then(Bt.resolve,jt)})});return ln.e&&jt(ln.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"),We=me("./_object-keys"),gt=Ve.f,ct=Qe.f,Ct=je.f,it=be.Symbol,yt=be.JSON,ut=yt&&yt.stringify,Ft=z("_hidden"),ht=z("toPrimitive"),rt={}.propertyIsEnumerable,dt=ve("symbol-registry"),St=ve("symbols"),Et=ve("op-symbols"),vt=Object.prototype,Bt=typeof it=="function",jt=be.QObject,ln=!jt||!jt.prototype||!jt.prototype.findChild,$t=he&&ce(function(){return Ne(ct({},"a",{get:function(){return ct(this,"a",{value:7}).a}})).a!=7})?function(Ge,Ke,Ze){var at=gt(vt,Ke);at&&delete vt[Ke],ct(Ge,Ke,Ze),at&&Ge!==vt&&ct(vt,Ke,at)}:ct,yn=function(Ge){var Ke=St[Ge]=Ne(it.prototype);return Ke._k=Ge,Ke},Ut=Bt&&typeof it.iterator=="symbol"?function(Ge){return typeof Ge=="symbol"}:function(Ge){return Ge instanceof it},Wt=function(Ge,Ke,Ze){return Ge===vt&&Wt(Et,Ke,Ze),le(Ge),Ke=Ce(Ke,!0),le(Ze),Pe(St,Ke)?(Ze.enumerable?(Pe(Ge,Ft)&&Ge[Ft][Ke]&&(Ge[Ft][Ke]=!1),Ze=Ne(Ze,{enumerable:ke(0,!1)})):(Pe(Ge,Ft)||ct(Ge,Ft,ke(1,{})),Ge[Ft][Ke]=!0),$t(Ge,Ke,Ze)):ct(Ge,Ke,Ze)},Xt=function(Ge,Ke){le(Ge);for(var Ze,at=ie(Ke=we(Ke)),xt=0,tn=at.length;tn>xt;)Wt(Ge,Ze=at[xt++],Ke[Ze]);return Ge},mt=function(Ge,Ke){return Ke===void 0?Ne(Ge):Xt(Ne(Ge),Ke)},ze=function(Ge){var Ke=rt.call(this,Ge=Ce(Ge,!0));return!(this===vt&&Pe(St,Ge)&&!Pe(Et,Ge))&&(!(Ke||!Pe(this,Ge)||!Pe(St,Ge)||Pe(this,Ft)&&this[Ft][Ge])||Ke)},Be=function(Ge,Ke){if(Ge=we(Ge),Ke=Ce(Ke,!0),Ge!==vt||!Pe(St,Ke)||Pe(Et,Ke)){var Ze=gt(Ge,Ke);return!Ze||!Pe(St,Ke)||Pe(Ge,Ft)&&Ge[Ft][Ke]||(Ze.enumerable=!0),Ze}},et=function(Ge){for(var Ke,Ze=Ct(we(Ge)),at=[],xt=0;Ze.length>xt;)Pe(St,Ke=Ze[xt++])||Ke==Ft||Ke==ge||at.push(Ke);return at},qe=function(Ge){for(var Ke,Ze=Ge===vt,at=Ct(Ze?Et:we(Ge)),xt=[],tn=0;at.length>tn;)!Pe(St,Ke=at[tn++])||Ze&&!Pe(vt,Ke)||xt.push(St[Ke]);return xt};Bt||(it=function(){if(this instanceof it)throw TypeError("Symbol is not a constructor!");var Ge=ue(arguments.length>0?arguments[0]:void 0),Ke=function(Ze){this===vt&&Ke.call(Et,Ze),Pe(this,Ft)&&Pe(this[Ft],Ge)&&(this[Ft][Ge]=!1),$t(this,Ge,ke(1,Ze))};return he&&ln&&$t(vt,Ge,{configurable:!0,set:Ke}),yn(Ge)},xe(it.prototype,"toString",function(){return this._k}),Ve.f=Be,Qe.f=Wt,me("./_object-gopn").f=je.f=et,me("./_object-pie").f=ze,me("./_object-gops").f=qe,he&&!me("./_library")&&xe(vt,"propertyIsEnumerable",ze,!0),ee.f=function(Ge){return yn(z(Ge))}),Se(Se.G+Se.W+Se.F*!Bt,{Symbol:it});for(var Ue="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Xe=0;Ue.length>Xe;)z(Ue[Xe++]);for(var Re=We(z.store),Ae=0;Re.length>Ae;)oe(Re[Ae++]);Se(Se.S+Se.F*!Bt,"Symbol",{for:function(Ge){return Pe(dt,Ge+="")?dt[Ge]:dt[Ge]=it(Ge)},keyFor:function(Ge){if(!Ut(Ge))throw TypeError(Ge+" is not a symbol!");for(var Ke in dt)if(dt[Ke]===Ge)return Ke},useSetter:function(){ln=!0},useSimple:function(){ln=!1}}),Se(Se.S+Se.F*!Bt,"Object",{create:mt,defineProperty:Wt,defineProperties:Xt,getOwnPropertyDescriptor:Be,getOwnPropertyNames:et,getOwnPropertySymbols:qe}),yt&&Se(Se.S+Se.F*(!Bt||ce(function(){var Ge=it();return ut([Ge])!="[null]"||ut({a:Ge})!="{}"||ut(Object(Ge))!="{}"})),"JSON",{stringify:function(Ge){for(var Ke,Ze,at=[Ge],xt=1;arguments.length>xt;)at.push(arguments[xt++]);if(Ze=Ke=at[1],(ye(Ke)||Ge!==void 0)&&!Ut(Ge))return se(Ke)||(Ke=function(tn,nn){if(typeof Ze=="function"&&(nn=Ze.call(this,tn,nn)),!Ut(nn))return nn}),at[1]=Ke,ut.apply(yt,at)}}),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"](),We=ee[ye+"Milliseconds"](),gt=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(We,3),L:Se(Math.round(We/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:(gt>0?"-":"+")+Se(100*Math.floor(Math.abs(gt)/60)+Math.abs(gt)%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(yt){return yt in it?it[yt]:yt.slice(1,yt.length-1)})}}();ve.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},ve.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},typeof 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,We,gt){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 We&>&&/^Win/i.test(Qe)&&!/^Windows Phone /i.test(Qe)&&(ct=ct[/[\d.]+$/.exec(Qe)])&&(Qe="Windows "+ct),Qe=String(Qe),We&>&&(Qe=Qe.replace(RegExp(We,"i"),gt)),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,We){var gt=-1,ct=Qe?Qe.length:0;if(typeof ct=="number"&&ct>-1&&ct<=we)for(;++gt<ct;)We(Qe[gt],gt,Qe);else ge(Qe,We)}function xe(Qe){return Qe=z(Qe),/^(?:webOS|i(?:OS|P))/.test(Qe)?Qe:Pe(Qe)}function ge(Qe,We){for(var gt in Qe)Ne.call(Qe,gt)&&We(Qe[gt],gt,Qe)}function ce(Qe){return Qe==null?Pe(Qe):je.call(Qe).slice(8,-1)}function ve(Qe,We){var gt=Qe!=null?typeof Qe[We]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(gt)||gt=="object"&&!Qe[We])}function de(Qe){return String(Qe).replace(/([ -])(?!$)/g,"$1?")}function ue(Qe,We){var gt=null;return Se(Qe,function(ct,Ct){gt=We(gt,ct,Ct,Qe)}),gt}function z(Qe){return String(Qe).replace(/^ +| +$/g,"")}function ee(Qe){function We(Ge){return ue(Ge,function(Ke,Ze){var at=Ze.pattern||de(Ze);return!Ke&&(Ke=RegExp("\\b"+at+" *\\d+[.\\w_]*","i").exec(Qe)||RegExp("\\b"+at+" *\\w+-[\\w]*","i").exec(Qe)||RegExp("\\b"+at+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Qe))&&((Ke=String(Ze.label&&!RegExp(at,"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(at,"i"),Ze).replace(RegExp("; *(?:"+Ze+"[_-])?","i")," ").replace(RegExp("("+Ze+")[-_.]?(\\w)","i"),"$1 $2"))),Ke})}function gt(){return this.description||""}var ct=ie,Ct=Qe&&typeof Qe=="object"&&ce(Qe)!="String";Ct&&(ct=Qe,Qe=null);var it=ct.navigator||{},yt=it.userAgent||"";Qe||(Qe=yt);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",St=Ct&&ct.java?"JavaPackage":ce(ct.java),Et=Ct?"Object":"RuntimeObject",vt=/\bJava/.test(St)&&ct.java,Bt=vt&&ce(ct.environment)==dt,jt=vt?"a":"\u4F2A",ln=vt?"b":"\u5C3E",$t=ct.document||{},yn=ct.operamini||ct.opera,Ut=Ce.test(Ut=Ct&&yn?yn["[[Class]]"]:ce(yn))?Ut:yn=null,Wt=Qe,Xt=[],mt=null,ze=Qe==yt,Be=ze&&yn&&typeof yn.version=="function"&&yn.version(),et=function(Ge){return ue(Ge,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"]),qe=function(Ge){return ue(Ge,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"]),Ue=We([{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(Ge){return ue(Ge,function(Ke,Ze,at){return Ke||(Ze[Ue]||Ze[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Ue)]||RegExp("\\b"+de(at)+"(?:\\b|\\w*\\d)","i").exec(Qe))&&at})}({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(Ge){return ue(Ge,function(Ke,Ze){var at=Ze.pattern||de(Ze);return!Ke&&(Ke=RegExp("\\b"+at+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Qe))&&(Ke=he(Ke,at,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(et&&(et=[et]),Xe&&!Ue&&(Ue=We([Xe])),(ut=/\bGoogle TV\b/.exec(Ue))&&(Ue=ut[0]),/\bSimulator\b/i.test(Qe)&&(Ue=(Ue?Ue+" ":"")+"Simulator"),qe=="Opera Mini"&&/\bOPiOS\b/.test(Qe)&&Xt.push("running in Turbo/Uncompressed mode"),qe=="IE"&&/\blike iPhone OS\b/.test(Qe)?(ut=ee(Qe.replace(/like iPhone OS/,"")),Xe=ut.manufacturer,Ue=ut.product):/^iP/.test(Ue)?(qe||(qe="Safari"),Re="iOS"+((ut=/ OS ([\d_]+)/i.exec(Qe))?" "+ut[1].replace(/_/g,"."):"")):qe!="Konqueror"||/buntu/i.test(Re)?Xe&&Xe!="Google"&&(/Chrome/.test(qe)&&!/\bMobile Safari\b/i.test(Qe)||/\bVita\b/.test(Ue))||/\bAndroid\b/.test(Re)&&/^Chrome/.test(qe)&&/\bVersion\//i.test(Qe)?(qe="Android Browser",Re=/\bAndroid\b/.test(Re)?Re:"Android"):qe=="Silk"?(/\bMobi/i.test(Qe)||(Re="Android",Xt.unshift("desktop mode")),/Accelerated *= *true/i.test(Qe)&&Xt.unshift("accelerated")):qe=="PaleMoon"&&(ut=/\bFirefox\/([\d.]+)\b/.exec(Qe))?Xt.push("identifying as Firefox "+ut[1]):qe=="Firefox"&&(ut=/\b(Mobile|Tablet|TV)\b/i.exec(Qe))?(Re||(Re="Firefox OS"),Ue||(Ue=ut[1])):!qe||(ut=!/\bMinefield\b/i.test(Qe)&&/\b(?:Firefox|Safari)\b/.exec(qe))?(qe&&!Ue&&/[\/,]|^[^(]+?\)/.test(Qe.slice(Qe.indexOf(ut+"/")+8))&&(qe=null),(ut=Ue||Xe||Re)&&(Ue||Xe||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Re))&&(qe=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Re)?Re:ut)+" Browser")):qe=="Electron"&&(ut=(/\bChrome\/([\d.]+)\b/.exec(Qe)||0)[1])&&Xt.push("Chromium "+ut):Re="Kubuntu",Be||(Be=function(Ge){return ue(Ge,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(qe),"(?:Firefox|Minefield|NetFront)"])),(ut=et=="iCab"&&parseFloat(Be)>3&&"WebKit"||/\bOpera\b/.test(qe)&&(/\bOPR\b/.test(Qe)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(Qe)&&!/^(?:Trident|EdgeHTML)$/.test(et)&&"WebKit"||!et&&/\bMSIE\b/i.test(Qe)&&(Re=="Mac OS"?"Tasman":"Trident")||et=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(qe)&&"NetFront")&&(et=[ut]),qe=="IE"&&(ut=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(Qe)||0)[1])?(qe+=" Mobile",Re="Windows Phone "+(/\+$/.test(ut)?ut:ut+".x"),Xt.unshift("desktop mode")):/\bWPDesktop\b/i.test(Qe)?(qe="IE Mobile",Re="Windows Phone 8.x",Xt.unshift("desktop mode"),Be||(Be=(/\brv:([\d.]+)/.exec(Qe)||0)[1])):qe!="IE"&&et=="Trident"&&(ut=/\brv:([\d.]+)/.exec(Qe))&&(qe&&Xt.push("identifying as "+qe+(Be?" "+Be:"")),qe="IE",Be=ut[1]),ze){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("."),qe="RingoJS"}catch(Ge){(ut=ct.system)&&ut.global.system==ct.system&&(qe="Narwhal",Re||(Re=ut[0].os||null))}qe||(qe="Rhino")}else typeof ct.process=="object"&&!ct.process.browser&&(ut=ct.process)&&(typeof ut.versions=="object"&&(typeof ut.versions.electron=="string"?(Xt.push("Node "+ut.versions.node),qe="Electron",Be=ut.versions.electron):typeof ut.versions.nw=="string"&&(Xt.push("Chromium "+Be,"Node "+ut.versions.node),qe="NW.js",Be=ut.versions.nw)),qe||(qe="Node.js",Wt=ut.arch,Re=ut.platform,Be=/[\d.]+/.exec(ut.version),Be=Be?Be[0]:null));else ce(ut=ct.runtime)==rt?(qe="Adobe AIR",Re=ut.flash.system.Capabilities.os):ce(ut=ct.phantom)==Et?(qe="PhantomJS",Be=(ut=ut.version||null)&&ut.major+"."+ut.minor+"."+ut.patch):typeof $t.documentMode=="number"&&(ut=/\bTrident\/(\d+)/i.exec(Qe))?(Be=[Be,$t.documentMode],(ut=+ut[1]+4)!=Be[1]&&(Xt.push("IE "+Be[1]+" mode"),et&&(et[1]=""),Be[1]=ut),Be=qe=="IE"?String(Be[1].toFixed(1)):Be[0]):typeof $t.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(qe)&&(Xt.push("masking as "+qe+" "+Be),qe="IE",Be="11.0",et=["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+";"+(ze&&it.appMinorVersion))||/\bMinefield\b/i.test(Qe)&&"a")&&(mt=/b/i.test(ut)?"beta":"alpha",Be=Be.replace(RegExp(ut+"\\+?$"),"")+(mt=="beta"?ln:jt)+(/\d+\+?/.exec(ut)||"")),qe=="Fennec"||qe=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Re))qe="Firefox Mobile";else if(qe=="Maxthon"&&Be)Be=Be.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ue))Ue=="Xbox 360"&&(Re=null),Ue=="Xbox 360"&&/\bIEMobile\b/.test(Qe)&&Xt.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(qe)&&(!qe||Ue||/Browser|Mobi/.test(qe))||Re!="Windows CE"&&!/Mobi/i.test(Qe))if(qe=="IE"&&ze)try{ct.external===null&&Xt.unshift("platform preview")}catch(Ge){Xt.unshift("embedded")}else(/\bBlackBerry\b/.test(Ue)||/\bBB10\b/.test(Qe))&&(ut=(RegExp(Ue.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Qe)||0)[1]||Be)?(ut=[ut,/BB10/.test(Qe)],Re=(ut[1]?(Ue=null,Xe="BlackBerry"):"Device Software")+" "+ut[0],Be=null):this!=ge&&Ue!="Wii"&&(ze&&yn||/Opera/.test(qe)&&/\b(?:MSIE|Firefox)\b/i.test(Qe)||qe=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Re)||qe=="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(qe)?(/\bIE\b/.test(ut)&&Re=="Mac OS"&&(Re=null),ut="identify"+ut):(ut="mask"+ut,qe=Ut?xe(Ut.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(ut)&&(Re=null),ze||(Be=null)),et=["Presto"],Xt.push(ut));else qe+=" Mobile";(ut=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(Qe)||0)[1])&&(ut=[parseFloat(ut.replace(/\.(\d)$/,".0$1")),ut],qe=="Safari"&&ut[1].slice(-1)=="+"?(qe="WebKit Nightly",mt="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&&et=="WebKit"&&(et=["Blink"]),ze&&(ht||ut[1])?(et&&(et[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:et!="Blink"?"27":"28")):(et&&(et[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"),et&&(et[1]+=" "+(ut+=typeof ut=="number"?".x":/[.+]/.test(ut)?"":"+")),qe=="Safari"&&(!Be||parseInt(Be)>45)&&(Be=ut)),qe=="Opera"&&(ut=/\bzbov|zvav$/.exec(Re))?(qe+=" ",Xt.unshift("desktop mode"),ut=="zvav"?(qe+="Mini",Be=null):qe+="Mobile",Re=Re.replace(RegExp(" *"+ut+"$"),"")):qe=="Safari"&&/\bChrome\b/.exec(et&&et[1])&&(Xt.unshift("desktop mode"),qe="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,""))),et&&!/\b(?:Avant|Nook)\b/.test(qe)&&(/Browser|Lunascape|Maxthon/.test(qe)||qe!="Safari"&&/^iOS/.test(Re)&&/\bSafari\b/.test(et[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(qe)&&et[1])&&(ut=et[et.length-1])&&Xt.push(ut),Xt.length&&(Xt=["("+Xt.join("; ")+")"]),Xe&&Ue&&Ue.indexOf(Xe)<0&&Xt.push("on "+Xe),Ue&&Xt.push((/^on /.test(Xt[Xt.length-1])?"":"on ")+Ue),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 Ge=this.version;return this.family+(Ge&&!Ft?" "+Ge:"")+(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),"")),qe&&(/\bWOW64\b/i.test(Qe)||ze&&/\w(?:86|32)$/.test(it.cpuClass||it.platform)&&!/\bWin64; x64\b/i.test(Qe))&&Xt.unshift("32-bit")):Re&&/^OS X/.test(Re.family)&&qe=="Chrome"&&parseFloat(Be)>=39&&(Re.architecture=64),Qe||(Qe=null);var Ae={};return Ae.description=Qe,Ae.layout=et&&et[0],Ae.manufacturer=Xe,Ae.name=qe,Ae.prerelease=mt,Ae.product=Ue,Ae.ua=Qe,Ae.version=qe&&Be,Ae.os=Re||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ae.parse=ee,Ae.toString=gt,Ae.version&&Xt.unshift(Be),Ae.name&&Xt.unshift(qe),Re&&qe&&(Re!=String(Re).split(" ")[0]||Re!=qe.split(" ")[0]&&!Ue)&&Xt.push(Ue?"("+Re+")":"on "+Re),Xt.length&&(Ae.description=Xt.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,We){se[We]=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(St){throw new RangeError(Ft[St])}function Se(St,Et){for(var vt=St.length,Bt=[];vt--;)Bt[vt]=Et(St[vt]);return Bt}function xe(St,Et){var vt=St.split("@"),Bt="";return vt.length>1&&(Bt=vt[0]+"@",St=vt[1]),St=St.replace(ut,"."),Bt+Se(St.split("."),Et).join(".")}function ge(St){for(var Et,vt,Bt=[],jt=0,ln=St.length;jt<ln;)Et=St.charCodeAt(jt++),Et>=55296&&Et<=56319&&jt<ln?(vt=St.charCodeAt(jt++),(64512&vt)==56320?Bt.push(((1023&Et)<<10)+(1023&vt)+65536):(Bt.push(Et),jt--)):Bt.push(Et);return Bt}function ce(St){return Se(St,function(Et){var vt="";return Et>65535&&(Et-=65536,vt+=dt(Et>>>10&1023|55296),Et=56320|1023&Et),vt+=dt(Et)}).join("")}function ve(St){return St-48<10?St-22:St-65<26?St-65:St-97<26?St-97:Ne}function de(St,Et){return St+22+75*(St<26)-((Et!=0)<<5)}function ue(St,Et,vt){var Bt=0;for(St=vt?rt(St/We):St>>1,St+=rt(St/Et);St>ht*Ve>>1;Bt+=Ne)St=rt(St/ht);return rt(Bt+(ht+1)*St/(St+Qe))}function z(St){var Et,vt,Bt,jt,ln,$t,yn,Ut,Wt,Xt,mt=[],ze=St.length,Be=0,et=ct,qe=gt;for(vt=St.lastIndexOf(Ct),vt<0&&(vt=0),Bt=0;Bt<vt;++Bt)St.charCodeAt(Bt)>=128&&he("not-basic"),mt.push(St.charCodeAt(Bt));for(jt=vt>0?vt+1:0;jt<ze;){for(ln=Be,$t=1,yn=Ne;jt>=ze&&he("invalid-input"),Ut=ve(St.charCodeAt(jt++)),(Ut>=Ne||Ut>rt((ke-Be)/$t))&&he("overflow"),Be+=Ut*$t,Wt=yn<=qe?je:yn>=qe+Ve?Ve:yn-qe,!(Ut<Wt);yn+=Ne)Xt=Ne-Wt,$t>rt(ke/Xt)&&he("overflow"),$t*=Xt;Et=mt.length+1,qe=ue(Be-ln,Et,ln==0),rt(Be/Et)>ke-et&&he("overflow"),et+=rt(Be/Et),Be%=Et,mt.splice(Be++,0,et)}return ce(mt)}function ee(St){var Et,vt,Bt,jt,ln,$t,yn,Ut,Wt,Xt,mt,ze,Be,et,qe,Ue=[];for(St=ge(St),ze=St.length,Et=ct,vt=0,ln=gt,$t=0;$t<ze;++$t)(mt=St[$t])<128&&Ue.push(dt(mt));for(Bt=jt=Ue.length,jt&&Ue.push(Ct);Bt<ze;){for(yn=ke,$t=0;$t<ze;++$t)(mt=St[$t])>=Et&&mt<yn&&(yn=mt);for(Be=Bt+1,yn-Et>rt((ke-vt)/Be)&&he("overflow"),vt+=(yn-Et)*Be,Et=yn,$t=0;$t<ze;++$t)if(mt=St[$t],mt<Et&&++vt>ke&&he("overflow"),mt==Et){for(Ut=vt,Wt=Ne;Xt=Wt<=ln?je:Wt>=ln+Ve?Ve:Wt-ln,!(Ut<Xt);Wt+=Ne)qe=Ut-Xt,et=Ne-Xt,Ue.push(dt(de(Xt+qe%et,0))),Ut=rt(qe/et);Ue.push(dt(de(Ut,0))),ln=ue(vt,Be,Bt==jt),vt=0,++Bt}++vt,++Et}return Ue.join("")}function oe(St){return xe(St,function(Et){return it.test(Et)?z(Et.slice(4).toLowerCase()):Et})}function ie(St){return xe(St,function(Et){return yt.test(Et)?"xn--"+ee(Et):Et})}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,We=700,gt=72,ct=128,Ct="-",it=/^xn--/,yt=/[^\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(ze){return vt.from(ze)}function Se(ze){return vt.isBuffer(ze)||ze instanceof Bt}function xe(ze,Be,et){if(typeof ze.prependListener=="function")return ze.prependListener(Be,et);ze._events&&ze._events[Be]?dt(ze._events[Be])?ze._events[Be].unshift(et):ze._events[Be]=[et,ze._events[Be]]:ze.on(Be,et)}function ge(ze,Be){rt=rt||me("./_stream_duplex"),ze=ze||{};var et=Be instanceof rt;this.objectMode=!!ze.objectMode,et&&(this.objectMode=this.objectMode||!!ze.readableObjectMode);var qe=ze.highWaterMark,Ue=ze.readableHighWaterMark,Xe=this.objectMode?16:16384;this.highWaterMark=qe||qe===0?qe:et&&(Ue||Ue===0)?Ue: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=ze.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ze.encoding&&(yn||(yn=me("string_decoder/").StringDecoder),this.decoder=new yn(ze.encoding),this.encoding=ze.encoding)}function ce(ze){if(rt=rt||me("./_stream_duplex"),!(this instanceof ce))return new ce(ze);this._readableState=new ge(ze,this),this.readable=!0,ze&&(typeof ze.read=="function"&&(this._read=ze.read),typeof ze.destroy=="function"&&(this._destroy=ze.destroy)),Et.call(this)}function ve(ze,Be,et,qe,Ue){var Xe=ze._readableState;if(Be===null)Xe.reading=!1,ie(ze,Xe);else{var Re;Ue||(Re=ue(Xe,Be)),Re?ze.emit("error",Re):Xe.objectMode||Be&&Be.length>0?(typeof Be=="string"||Xe.objectMode||(0,Ft.default)(Be)===vt.prototype||(Be=he(Be)),qe?Xe.endEmitted?ze.emit("error",new Error("stream.unshift() after end event")):de(ze,Xe,Be,!0):Xe.ended?ze.emit("error",new Error("stream.push() after EOF")):(Xe.reading=!1,Xe.decoder&&!et?(Be=Xe.decoder.write(Be),Xe.objectMode||Be.length!==0?de(ze,Xe,Be,!1):ye(ze,Xe)):de(ze,Xe,Be,!1))):qe||(Xe.reading=!1)}return z(Xe)}function de(ze,Be,et,qe){Be.flowing&&Be.length===0&&!Be.sync?(ze.emit("data",et),ze.read(0)):(Be.length+=Be.objectMode?1:et.length,qe?Be.buffer.unshift(et):Be.buffer.push(et),Be.needReadable&&se(ze)),ye(ze,Be)}function ue(ze,Be){var et;return Se(Be)||typeof Be=="string"||Be===void 0||ze.objectMode||(et=new TypeError("Invalid non-string/buffer chunk")),et}function z(ze){return!ze.ended&&(ze.needReadable||ze.length<ze.highWaterMark||ze.length===0)}function ee(ze){return ze>=mt?ze=mt:(ze--,ze|=ze>>>1,ze|=ze>>>2,ze|=ze>>>4,ze|=ze>>>8,ze|=ze>>>16,ze++),ze}function oe(ze,Be){return ze<=0||Be.length===0&&Be.ended?0:Be.objectMode?1:ze!==ze?Be.flowing&&Be.length?Be.buffer.head.data.length:Be.length:(ze>Be.highWaterMark&&(Be.highWaterMark=ee(ze)),ze<=Be.length?ze:Be.ended?Be.length:(Be.needReadable=!0,0))}function ie(ze,Be){if(!Be.ended){if(Be.decoder){var et=Be.decoder.end();et&&et.length&&(Be.buffer.push(et),Be.length+=Be.objectMode?1:et.length)}Be.ended=!0,se(ze)}}function se(ze){var Be=ze._readableState;Be.needReadable=!1,Be.emittedReadable||($t("emitReadable",Be.flowing),Be.emittedReadable=!0,Be.sync?ht.nextTick(le,ze):le(ze))}function le(ze){$t("emit readable"),ze.emit("readable"),Ve(ze)}function ye(ze,Be){Be.readingMore||(Be.readingMore=!0,ht.nextTick(we,ze,Be))}function we(ze,Be){for(var et=Be.length;!Be.reading&&!Be.flowing&&!Be.ended&&Be.length<Be.highWaterMark&&($t("maybeReadMore read 0"),ze.read(0),et!==Be.length);)et=Be.length;Be.readingMore=!1}function Ce(ze){return function(){var Be=ze._readableState;$t("pipeOnDrain",Be.awaitDrain),Be.awaitDrain&&Be.awaitDrain--,Be.awaitDrain===0&&St(ze,"data")&&(Be.flowing=!0,Ve(ze))}}function ke(ze){$t("readable nexttick read 0"),ze.read(0)}function Ne(ze,Be){Be.resumeScheduled||(Be.resumeScheduled=!0,ht.nextTick(je,ze,Be))}function je(ze,Be){Be.reading||($t("resume read 0"),ze.read(0)),Be.resumeScheduled=!1,Be.awaitDrain=0,ze.emit("resume"),Ve(ze),Be.flowing&&!Be.reading&&ze.read(0)}function Ve(ze){var Be=ze._readableState;for($t("flow",Be.flowing);Be.flowing&&ze.read()!==null;);}function Qe(ze,Be){if(Be.length===0)return null;var et;return Be.objectMode?et=Be.buffer.shift():!ze||ze>=Be.length?(et=Be.decoder?Be.buffer.join(""):Be.buffer.length===1?Be.buffer.head.data:Be.buffer.concat(Be.length),Be.buffer.clear()):et=We(ze,Be.buffer,Be.decoder),et}function We(ze,Be,et){var qe;return ze<Be.head.data.length?(qe=Be.head.data.slice(0,ze),Be.head.data=Be.head.data.slice(ze)):qe=ze===Be.head.data.length?Be.shift():et?gt(ze,Be):ct(ze,Be),qe}function gt(ze,Be){var et=Be.head,qe=1,Ue=et.data;for(ze-=Ue.length;et=et.next;){var Xe=et.data,Re=ze>Xe.length?Xe.length:ze;if(Re===Xe.length?Ue+=Xe:Ue+=Xe.slice(0,ze),(ze-=Re)===0){Re===Xe.length?(++qe,et.next?Be.head=et.next:Be.head=Be.tail=null):(Be.head=et,et.data=Xe.slice(Re));break}++qe}return Be.length-=qe,Ue}function ct(ze,Be){var et=vt.allocUnsafe(ze),qe=Be.head,Ue=1;for(qe.data.copy(et),ze-=qe.data.length;qe=qe.next;){var Xe=qe.data,Re=ze>Xe.length?Xe.length:ze;if(Xe.copy(et,et.length-ze,0,Re),(ze-=Re)===0){Re===Xe.length?(++Ue,qe.next?Be.head=qe.next:Be.head=Be.tail=null):(Be.head=qe,qe.data=Xe.slice(Re));break}++Ue}return Be.length-=Ue,et}function Ct(ze){var Be=ze._readableState;if(Be.length>0)throw new Error('"endReadable()" called on non-empty stream');Be.endEmitted||(Be.ended=!0,ht.nextTick(it,Be,ze))}function it(ze,Be){ze.endEmitted||ze.length!==0||(ze.endEmitted=!0,Be.readable=!1,Be.emit("end"))}function yt(ze,Be){for(var et=0,qe=ze.length;et<qe;et++)if(ze[et]===Be)return et;return-1}var ut=me("babel-runtime/core-js/object/get-prototype-of"),Ft=function(ze){return ze&&ze.__esModule?ze:{default:ze}}(ut),ht=me("process-nextick-args");Ie.exports=ce;var rt,dt=me("isarray");ce.ReadableState=ge;var St=(me("events").EventEmitter,function(ze,Be){return ze.listeners(Be).length}),Et=me("./internal/streams/stream"),vt=me("safe-buffer").Buffer,Bt=Pe.Uint8Array||function(){},jt=me("core-util-is");jt.inherits=me("inherits");var ln=me("util"),$t=void 0;$t=ln&&ln.debuglog?ln.debuglog("stream"):function(){};var yn,Ut=me("./internal/streams/BufferList"),Wt=me("./internal/streams/destroy");jt.inherits(ce,Et);var Xt=["error","close","destroy","pause","resume"];Object.defineProperty(ce.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(ze){this._readableState&&(this._readableState.destroyed=ze)}}),ce.prototype.destroy=Wt.destroy,ce.prototype._undestroy=Wt.undestroy,ce.prototype._destroy=function(ze,Be){this.push(null),Be(ze)},ce.prototype.push=function(ze,Be){var et,qe=this._readableState;return qe.objectMode?et=!0:typeof ze=="string"&&(Be=Be||qe.defaultEncoding,Be!==qe.encoding&&(ze=vt.from(ze,Be),Be=""),et=!0),ve(this,ze,Be,!1,et)},ce.prototype.unshift=function(ze){return ve(this,ze,null,!0,!1)},ce.prototype.isPaused=function(){return this._readableState.flowing===!1},ce.prototype.setEncoding=function(ze){return yn||(yn=me("string_decoder/").StringDecoder),this._readableState.decoder=new yn(ze),this._readableState.encoding=ze,this};var mt=8388608;ce.prototype.read=function(ze){$t("read",ze),ze=parseInt(ze,10);var Be=this._readableState,et=ze;if(ze!==0&&(Be.emittedReadable=!1),ze===0&&Be.needReadable&&(Be.length>=Be.highWaterMark||Be.ended))return $t("read: emitReadable",Be.length,Be.ended),Be.length===0&&Be.ended?Ct(this):se(this),null;if((ze=oe(ze,Be))===0&&Be.ended)return Be.length===0&&Ct(this),null;var qe=Be.needReadable;$t("need readable",qe),(Be.length===0||Be.length-ze<Be.highWaterMark)&&(qe=!0,$t("length less than watermark",qe)),Be.ended||Be.reading?(qe=!1,$t("reading or ended",qe)):qe&&($t("do read"),Be.reading=!0,Be.sync=!0,Be.length===0&&(Be.needReadable=!0),this._read(Be.highWaterMark),Be.sync=!1,Be.reading||(ze=oe(et,Be)));var Ue;return Ue=ze>0?Qe(ze,Be):null,Ue===null?(Be.needReadable=!0,ze=0):Be.length-=ze,Be.length===0&&(Be.ended||(Be.needReadable=!0),et!==ze&&Be.ended&&Ct(this)),Ue!==null&&this.emit("data",Ue),Ue},ce.prototype._read=function(ze){this.emit("error",new Error("_read() is not implemented"))},ce.prototype.pipe=function(ze,Be){function et(Mn,hn){$t("onunpipe"),Mn===Ze&&hn&&hn.hasUnpiped===!1&&(hn.hasUnpiped=!0,Ue())}function qe(){$t("onend"),ze.end()}function Ue(){$t("cleanup"),ze.removeListener("close",Ae),ze.removeListener("finish",Ge),ze.removeListener("drain",nn),ze.removeListener("error",Re),ze.removeListener("unpipe",et),Ze.removeListener("end",qe),Ze.removeListener("end",Ke),Ze.removeListener("data",Xe),Jt=!0,!at.awaitDrain||ze._writableState&&!ze._writableState.needDrain||nn()}function Xe(Mn){$t("ondata"),pn=!1,ze.write(Mn)!==!1||pn||((at.pipesCount===1&&at.pipes===ze||at.pipesCount>1&&yt(at.pipes,ze)!==-1)&&!Jt&&($t("false write response, pause",Ze._readableState.awaitDrain),Ze._readableState.awaitDrain++,pn=!0),Ze.pause())}function Re(Mn){$t("onerror",Mn),Ke(),ze.removeListener("error",Re),St(ze,"error")===0&&ze.emit("error",Mn)}function Ae(){ze.removeListener("finish",Ge),Ke()}function Ge(){$t("onfinish"),ze.removeListener("close",Ae),Ke()}function Ke(){$t("unpipe"),Ze.unpipe(ze)}var Ze=this,at=this._readableState;switch(at.pipesCount){case 0:at.pipes=ze;break;case 1:at.pipes=[at.pipes,ze];break;default:at.pipes.push(ze)}at.pipesCount+=1,$t("pipe count=%d opts=%j",at.pipesCount,Be);var xt=(!Be||Be.end!==!1)&&ze!==be.stdout&&ze!==be.stderr,tn=xt?qe:Ke;at.endEmitted?ht.nextTick(tn):Ze.once("end",tn),ze.on("unpipe",et);var nn=Ce(Ze);ze.on("drain",nn);var Jt=!1,pn=!1;return Ze.on("data",Xe),xe(ze,"error",Re),ze.once("close",Ae),ze.once("finish",Ge),ze.emit("pipe",Ze),at.flowing||($t("pipe resume"),Ze.resume()),ze},ce.prototype.unpipe=function(ze){var Be=this._readableState,et={hasUnpiped:!1};if(Be.pipesCount===0)return this;if(Be.pipesCount===1)return ze&&ze!==Be.pipes?this:(ze||(ze=Be.pipes),Be.pipes=null,Be.pipesCount=0,Be.flowing=!1,ze&&ze.emit("unpipe",this,et),this);if(!ze){var qe=Be.pipes,Ue=Be.pipesCount;Be.pipes=null,Be.pipesCount=0,Be.flowing=!1;for(var Xe=0;Xe<Ue;Xe++)qe[Xe].emit("unpipe",this,et);return this}var Re=yt(Be.pipes,ze);return Re===-1?this:(Be.pipes.splice(Re,1),Be.pipesCount-=1,Be.pipesCount===1&&(Be.pipes=Be.pipes[0]),ze.emit("unpipe",this,et),this)},ce.prototype.on=function(ze,Be){var et=Et.prototype.on.call(this,ze,Be);if(ze==="data")this._readableState.flowing!==!1&&this.resume();else if(ze==="readable"){var qe=this._readableState;qe.endEmitted||qe.readableListening||(qe.readableListening=qe.needReadable=!0,qe.emittedReadable=!1,qe.reading?qe.length&&se(this):ht.nextTick(ke,this))}return et},ce.prototype.addListener=ce.prototype.on,ce.prototype.resume=function(){var ze=this._readableState;return ze.flowing||($t("resume"),ze.flowing=!0,Ne(this,ze)),this},ce.prototype.pause=function(){return $t("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&($t("pause"),this._readableState.flowing=!1,this.emit("pause")),this},ce.prototype.wrap=function(ze){var Be=this,et=this._readableState,qe=!1;ze.on("end",function(){if($t("wrapped end"),et.decoder&&!et.ended){var Re=et.decoder.end();Re&&Re.length&&Be.push(Re)}Be.push(null)}),ze.on("data",function(Re){$t("wrapped data"),et.decoder&&(Re=et.decoder.write(Re)),(!et.objectMode||Re!=null)&&(et.objectMode||Re&&Re.length)&&(Be.push(Re)||(qe=!0,ze.pause()))});for(var Ue in ze)this[Ue]===void 0&&typeof ze[Ue]=="function"&&(this[Ue]=function(Re){return function(){return ze[Re].apply(ze,arguments)}}(Ue));for(var Xe=0;Xe<Xt.length;Xe++)ze.on(Xt[Xe],this.emit.bind(this,Xt[Xe]));return this._read=function(Re){$t("wrapped _read",Re),qe&&(qe=!1,ze.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 Xt=this;this.next=null,this.entry=null,this.finish=function(){gt(Xt,Wt)}}function xe(Wt){return ln.from(Wt)}function ge(Wt){return ln.isBuffer(Wt)||Wt instanceof $t}function ce(){}function ve(Wt,Xt){St=St||me("./_stream_duplex"),Wt=Wt||{};var mt=Xt instanceof St;this.objectMode=!!Wt.objectMode,mt&&(this.objectMode=this.objectMode||!!Wt.writableObjectMode);var ze=Wt.highWaterMark,Be=Wt.writableHighWaterMark,et=this.objectMode?16:16384;this.highWaterMark=ze||ze===0?ze:mt&&(Be||Be===0)?Be:et,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 qe=Wt.decodeStrings===!1;this.decodeStrings=!qe,this.defaultEncoding=Wt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ue){ye(Xt,Ue)},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(St=St||me("./_stream_duplex"),!(Ut.call(de,this)||this instanceof St))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,Xt){var mt=new Error("write after end");Wt.emit("error",mt),dt.nextTick(Xt,mt)}function z(Wt,Xt,mt,ze){var Be=!0,et=!1;return mt===null?et=new TypeError("May not write null values to stream"):typeof mt=="string"||mt===void 0||Xt.objectMode||(et=new TypeError("Invalid non-string/buffer chunk")),et&&(Wt.emit("error",et),dt.nextTick(ze,et),Be=!1),Be}function ee(Wt,Xt,mt){return Wt.objectMode||Wt.decodeStrings===!1||typeof Xt!="string"||(Xt=ln.from(Xt,mt)),Xt}function oe(Wt,Xt,mt,ze,Be,et){if(!mt){var qe=ee(Xt,ze,Be);ze!==qe&&(mt=!0,Be="buffer",ze=qe)}var Ue=Xt.objectMode?1:ze.length;Xt.length+=Ue;var Xe=Xt.length<Xt.highWaterMark;if(Xe||(Xt.needDrain=!0),Xt.writing||Xt.corked){var Re=Xt.lastBufferedRequest;Xt.lastBufferedRequest={chunk:ze,encoding:Be,isBuf:mt,callback:et,next:null},Re?Re.next=Xt.lastBufferedRequest:Xt.bufferedRequest=Xt.lastBufferedRequest,Xt.bufferedRequestCount+=1}else ie(Wt,Xt,!1,Ue,ze,Be,et);return Xe}function ie(Wt,Xt,mt,ze,Be,et,qe){Xt.writelen=ze,Xt.writecb=qe,Xt.writing=!0,Xt.sync=!0,mt?Wt._writev(Be,Xt.onwrite):Wt._write(Be,et,Xt.onwrite),Xt.sync=!1}function se(Wt,Xt,mt,ze,Be){--Xt.pendingcb,mt?(dt.nextTick(Be,ze),dt.nextTick(Qe,Wt,Xt),Wt._writableState.errorEmitted=!0,Wt.emit("error",ze)):(Be(ze),Wt._writableState.errorEmitted=!0,Wt.emit("error",ze),Qe(Wt,Xt))}function le(Wt){Wt.writing=!1,Wt.writecb=null,Wt.length-=Wt.writelen,Wt.writelen=0}function ye(Wt,Xt){var mt=Wt._writableState,ze=mt.sync,Be=mt.writecb;if(le(mt),Xt)se(Wt,mt,ze,Xt,Be);else{var et=Ne(mt);et||mt.corked||mt.bufferProcessing||!mt.bufferedRequest||ke(Wt,mt),ze?Et(we,Wt,mt,et,Be):we(Wt,mt,et,Be)}}function we(Wt,Xt,mt,ze){mt||Ce(Wt,Xt),Xt.pendingcb--,ze(),Qe(Wt,Xt)}function Ce(Wt,Xt){Xt.length===0&&Xt.needDrain&&(Xt.needDrain=!1,Wt.emit("drain"))}function ke(Wt,Xt){Xt.bufferProcessing=!0;var mt=Xt.bufferedRequest;if(Wt._writev&&mt&&mt.next){var ze=Xt.bufferedRequestCount,Be=new Array(ze),et=Xt.corkedRequestsFree;et.entry=mt;for(var qe=0,Ue=!0;mt;)Be[qe]=mt,mt.isBuf||(Ue=!1),mt=mt.next,qe+=1;Be.allBuffers=Ue,ie(Wt,Xt,!0,Xt.length,Be,"",et.finish),Xt.pendingcb++,Xt.lastBufferedRequest=null,et.next?(Xt.corkedRequestsFree=et.next,et.next=null):Xt.corkedRequestsFree=new Se(Xt),Xt.bufferedRequestCount=0}else{for(;mt;){var Xe=mt.chunk,Re=mt.encoding,Ae=mt.callback;if(ie(Wt,Xt,!1,Xt.objectMode?1:Xe.length,Xe,Re,Ae),mt=mt.next,Xt.bufferedRequestCount--,Xt.writing)break}mt===null&&(Xt.lastBufferedRequest=null)}Xt.bufferedRequest=mt,Xt.bufferProcessing=!1}function Ne(Wt){return Wt.ending&&Wt.length===0&&Wt.bufferedRequest===null&&!Wt.finished&&!Wt.writing}function je(Wt,Xt){Wt._final(function(mt){Xt.pendingcb--,mt&&Wt.emit("error",mt),Xt.prefinished=!0,Wt.emit("prefinish"),Qe(Wt,Xt)})}function Ve(Wt,Xt){Xt.prefinished||Xt.finalCalled||(typeof Wt._final=="function"?(Xt.pendingcb++,Xt.finalCalled=!0,dt.nextTick(je,Wt,Xt)):(Xt.prefinished=!0,Wt.emit("prefinish")))}function Qe(Wt,Xt){var mt=Ne(Xt);return mt&&(Ve(Wt,Xt),Xt.pendingcb===0&&(Xt.finished=!0,Wt.emit("finish"))),mt}function We(Wt,Xt,mt){Xt.ending=!0,Qe(Wt,Xt),mt&&(Xt.finished?dt.nextTick(mt):Wt.once("finish",mt)),Xt.ended=!0,Wt.writable=!1}function gt(Wt,Xt,mt){var ze=Wt.entry;for(Wt.entry=null;ze;){var Be=ze.callback;Xt.pendingcb--,Be(mt),ze=ze.next}Xt.corkedRequestsFree?Xt.corkedRequestsFree.next=Wt:Xt.corkedRequestsFree=Wt}var ct=me("babel-runtime/core-js/object/define-property"),Ct=he(ct),it=me("babel-runtime/core-js/symbol/has-instance"),yt=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 St,Et=!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"),ln=me("safe-buffer").Buffer,$t=Pe.Uint8Array||function(){},yn=me("./internal/streams/destroy");vt.inherits(de,jt),ve.prototype.getBuffer=function(){for(var Wt=this.bufferedRequest,Xt=[];Wt;)Xt.push(Wt),Wt=Wt.next;return Xt},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"&&yt.default&&typeof Function.prototype[yt.default]=="function"?(Ut=Function.prototype[yt.default],(0,Ct.default)(de,yt.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,Xt,mt){var ze=this._writableState,Be=!1,et=!ze.objectMode&&ge(Wt);return et&&!ln.isBuffer(Wt)&&(Wt=xe(Wt)),typeof Xt=="function"&&(mt=Xt,Xt=null),et?Xt="buffer":Xt||(Xt=ze.defaultEncoding),typeof mt!="function"&&(mt=ce),ze.ended?ue(this,mt):(et||z(this,ze,Wt,mt))&&(ze.pendingcb++,Be=oe(this,ze,et,Wt,Xt,mt)),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,Xt,mt){mt(new Error("_write() is not implemented"))},de.prototype._writev=null,de.prototype.end=function(Wt,Xt,mt){var ze=this._writableState;typeof Wt=="function"?(mt=Wt,Wt=null,Xt=null):typeof Xt=="function"&&(mt=Xt,Xt=null),Wt!=null&&this.write(Wt,Xt),ze.corked&&(ze.corked=1,this.uncork()),ze.ending||ze.finished||We(this,ze,mt)},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=yn.destroy,de.prototype._undestroy=yn.undestroy,de.prototype._destroy=function(Wt,Xt){this.end(),Xt(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,St,Et){var vt=dt&&dt.prototype instanceof Se?dt:Se,Bt=Object.create(vt.prototype),jt=new oe(Et||[]);return Bt._invoke=de(rt,St,jt),Bt}function he(rt,dt,St){try{return{type:"normal",arg:rt.call(dt,St)}}catch(Et){return{type:"throw",arg:Et}}}function Se(){}function xe(){}function ge(){}function ce(rt){["next","throw","return"].forEach(function(dt){rt[dt]=function(St){return this._invoke(dt,St)}})}function ve(rt){function dt(vt,Bt,jt,ln){var $t=he(rt[vt],rt,Bt);if($t.type!=="throw"){var yn=$t.arg,Ut=yn.value;return Ut&&typeof Ut=="object"&&we.call(Ut,"__await")?Promise.resolve(Ut.__await).then(function(Wt){dt("next",Wt,jt,ln)},function(Wt){dt("throw",Wt,jt,ln)}):Promise.resolve(Ut).then(function(Wt){yn.value=Wt,jt(yn)},ln)}ln($t.arg)}function St(vt,Bt){function jt(){return new Promise(function(ln,$t){dt(vt,Bt,ln,$t)})}return Et=Et?Et.then(jt,jt):jt()}var Et;this._invoke=St}function de(rt,dt,St){var Et=We;return function(vt,Bt){if(Et===ct)throw new Error("Generator is already running");if(Et===Ct){if(vt==="throw")throw Bt;return se()}for(St.method=vt,St.arg=Bt;;){var jt=St.delegate;if(jt){var ln=ue(jt,St);if(ln){if(ln===it)continue;return ln}}if(St.method==="next")St.sent=St._sent=St.arg;else if(St.method==="throw"){if(Et===We)throw Et=Ct,St.arg;St.dispatchException(St.arg)}else St.method==="return"&&St.abrupt("return",St.arg);Et=ct;var $t=he(rt,dt,St);if($t.type==="normal"){if(Et=St.done?Ct:gt,$t.arg===it)continue;return{value:$t.arg,done:St.done}}$t.type==="throw"&&(Et=Ct,St.method="throw",St.arg=$t.arg)}}}function ue(rt,dt){var St=rt.iterator[dt.method];if(St===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 Et=he(St,rt.iterator,dt.arg);if(Et.type==="throw")return dt.method="throw",dt.arg=Et.arg,dt.delegate=null,it;var vt=Et.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 St=-1,Et=function vt(){for(;++St<rt.length;)if(we.call(rt,St))return vt.value=rt[St],vt.done=!1,vt;return vt.value=le,vt.done=!0,vt};return Et.next=Et}}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 We="suspendedStart",gt="suspendedYield",ct="executing",Ct="completed",it={},yt={};yt[ke]=function(){return this};var ut=Object.getPrototypeOf,Ft=ut&&ut(ut(ie([])));Ft&&Ft!==ye&&we.call(Ft,ke)&&(yt=Ft);var ht=ge.prototype=Se.prototype=Object.create(yt);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,St,Et){var vt=new ve(Pe(rt,dt,St,Et));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 St in rt)dt.push(St);return dt.reverse(),function Et(){for(;dt.length;){var vt=dt.pop();if(vt in rt)return Et.value=vt,Et.done=!1,Et}return Et.done=!0,Et}},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($t,yn){return Bt.type="throw",Bt.arg=rt,St.next=$t,yn&&(St.method="next",St.arg=le),!!yn}if(this.done)throw rt;for(var St=this,Et=this.tryEntries.length-1;Et>=0;--Et){var vt=this.tryEntries[Et],Bt=vt.completion;if(vt.tryLoc==="root")return dt("end");if(vt.tryLoc<=this.prev){var jt=we.call(vt,"catchLoc"),ln=we.call(vt,"finallyLoc");if(jt&&ln){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(!ln)throw new Error("try statement without catch or finally");if(this.prev<vt.finallyLoc)return dt(vt.finallyLoc)}}}},abrupt:function(rt,dt){for(var St=this.tryEntries.length-1;St>=0;--St){var Et=this.tryEntries[St];if(Et.tryLoc<=this.prev&&we.call(Et,"finallyLoc")&&this.prev<Et.finallyLoc){var vt=Et;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 St=this.tryEntries[dt];if(St.finallyLoc===rt)return this.complete(St.completion,St.afterLoc),ee(St),it}},catch:function(rt){for(var dt=this.tryEntries.length-1;dt>=0;--dt){var St=this.tryEntries[dt];if(St.tryLoc===rt){var Et=St.completion;if(Et.type==="throw"){var vt=Et.arg;ee(St)}return vt}}throw new Error("illegal catch attempt")},delegateYield:function(rt,dt,St){return this.delegate={iterator:ie(rt),resultName:dt,nextLoc:St},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 at=this;we(at),at.q=at.c="",at.bufferCheckPosition=se.MAX_BUFFER_LENGTH,at.opt=Ze||{},at.opt.lowercase=at.opt.lowercase||at.opt.lowercasetags,at.looseCase=at.opt.lowercase?"toLowerCase":"toUpperCase",at.tags=[],at.closed=at.closedRoot=at.sawRoot=!1,at.tag=at.error=null,at.strict=!!Ke,at.noscript=!(!Ke&&!at.opt.noscript),at.state=Ae.BEGIN,at.strictEntities=at.opt.strictEntities,at.ENTITIES=at.strictEntities?(0,ie.default)(se.XML_ENTITIES):(0,ie.default)(se.ENTITIES),at.attribList=[],at.opt.xmlns&&(at.ns=(0,ie.default)(et)),at.trackPosition=at.opt.position!==!1,at.trackPosition&&(at.position=at.line=at.column=0),ct(at,"onready")}function ye(Ke){for(var Ze=Math.max(se.MAX_BUFFER_LENGTH,10),at=0,xt=0,tn=yn.length;xt<tn;xt++){var nn=Ke[yn[xt]].length;if(nn>Ze)switch(yn[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: "+yn[xt])}at=Math.max(at,nn)}var Jt=se.MAX_BUFFER_LENGTH-at;Ke.bufferCheckPosition=Jt+Ke.position}function we(Ke){for(var Ze=0,at=yn.length;Ze<at;Ze++)Ke[yn[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 at=this;this._parser.onend=function(){at.emit("end")},this._parser.onerror=function(xt){at.emit("error",xt),at._parser.error=null},this._decoder=null,Wt.forEach(function(xt){(0,ue.default)(at,"on"+xt,{get:function(){return at._parser["on"+xt]},set:function(tn){if(!tn)return at.removeAllListeners(xt),at._parser["on"+xt]=tn,tn;at.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 We(Ke,Ze){return Ke.test(Ze)}function gt(Ke,Ze){return!We(Ke,Ze)}function ct(Ke,Ze,at){Ke[Ze]&&Ke[Ze](at)}function Ct(Ke,Ze,at){Ke.textNode&&it(Ke),ct(Ke,Ze,at)}function it(Ke){Ke.textNode=yt(Ke.opt,Ke.textNode),Ke.textNode&&ct(Ke,"ontext",Ke.textNode),Ke.textNode=""}function yt(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,at=Ke.tag={name:Ke.tagName,attributes:{}};Ke.opt.xmlns&&(at.ns=Ze.ns),Ke.attribList.length=0,Ct(Ke,"onopentagstart",at)}function dt(Ke,Ze){var at=Ke.indexOf(":"),xt=at<0?["",Ke]:Ke.split(":"),tn=xt[0],nn=xt[1];return Ze&&Ke==="xmlns"&&(tn="xmlns",nn=""),{prefix:tn,local:nn}}function St(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),at=Ze.prefix,xt=Ze.local;if(at==="xmlns")if(xt==="xml"&&Ke.attribValue!==ze)ht(Ke,"xml: prefix must be bound to "+ze+`
|
|
|
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,nn=Ke.tags[Ke.tags.length-1]||Ke;tn.ns===nn.ns&&(tn.ns=(0,ie.default)(nn.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 Et(Ke,Ze){if(Ke.opt.xmlns){var at=Ke.tag,xt=dt(Ke.tagName);at.prefix=xt.prefix,at.local=xt.local,at.uri=at.ns[xt.prefix]||"",at.prefix&&!at.uri&&(ht(Ke,"Unbound namespace prefix: "+(0,ge.default)(Ke.tagName)),at.uri=xt.prefix);var tn=Ke.tags[Ke.tags.length-1]||Ke;at.ns&&tn.ns!==at.ns&&(0,ee.default)(at.ns).forEach(function(Ii){Ct(Ke,"onopennamespace",{prefix:Ii,uri:at.ns[Ii]})});for(var nn=0,Jt=Ke.attribList.length;nn<Jt;nn++){var pn=Ke.attribList[nn],Mn=pn[0],hn=pn[1],En=dt(Mn,!0),Wn=En.prefix,Tn=En.local,ci=Wn===""?"":at.ns[Wn]||"",ri={name:Mn,value:hn,prefix:Wn,local:Tn,uri:ci};Wn&&Wn!=="xmlns"&&!ci&&(ht(Ke,"Unbound namespace prefix: "+(0,ge.default)(Wn)),ri.uri=Wn),Ke.tag.attributes[Mn]=ri,Ct(Ke,"onattribute",ri)}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,at=Ke.tagName;Ke.strict||(at=at[Ke.looseCase]());for(var xt=at;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=at;for(var tn=Ke.tags.length;tn-- >Ze;){var nn=Ke.tag=Ke.tags.pop();Ke.tagName=Ke.tag.name,Ct(Ke,"onclosetag",Ke.tagName);var Jt={};for(var pn in nn.ns)Jt[pn]=nn.ns[pn];var Mn=Ke.tags[Ke.tags.length-1]||Ke;Ke.opt.xmlns&&nn.ns!==Mn.ns&&(0,ee.default)(nn.ns).forEach(function(hn){var En=nn.ns[hn];Ct(Ke,"onclosenamespace",{prefix:hn,uri:En})})}Ze===0&&(Ke.closedRoot=!0),Ke.tagName=Ke.attribValue=Ke.attribName="",Ke.attribList.length=0,Ke.state=Ae.TEXT}function Bt(Ke){var Ze,at=Ke.entity,xt=at.toLowerCase(),tn="";return Ke.ENTITIES[at]?Ke.ENTITIES[at]:Ke.ENTITIES[xt]?Ke.ENTITIES[xt]:(at=xt,at.charAt(0)==="#"&&(at.charAt(1)==="x"?(at=at.slice(2),Ze=parseInt(at,16),tn=Ze.toString(16)):(at=at.slice(1),Ze=parseInt(at,10),tn=Ze.toString(10))),at=at.replace(/^0+/,""),isNaN(Ze)||tn.toLowerCase()!==at?(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 ln(Ke,Ze){var at="";return Ze<Ke.length&&(at=Ke.charAt(Ze)),at}function $t(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 at=0,xt="";xt=ln(Ke,at++),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=at-1;xt&&xt!=="<"&&xt!=="&";)(xt=ln(Ke,at++))&&Ze.trackPosition&&(Ze.position++,xt===`
|
|
|
`?(Ze.line++,Ze.column=0):Ze.column++);Ze.textNode+=Ke.substring(tn,at-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(We(qe,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 nn=Ze.position-Ze.startTagPosition;xt=new Array(nn).join(" ")+xt}Ze.textNode+="<"+xt,Ze.state=Ae.TEXT}continue;case Ae.SGML_DECL:(Ze.sgmlDecl+xt).toUpperCase()===Xt?(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()===mt?(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=yt(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:We(Ue,xt)?Ze.tagName+=xt:(rt(Ze),xt===">"?Et(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===">"?(Et(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===">"?Et(Ze):xt==="/"?Ze.state=Ae.OPEN_TAG_SLASH:We(qe,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,St(Ze),Et(Ze)):je(xt)?Ze.state=Ae.ATTRIB_NAME_SAW_WHITE:We(Ue,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===">"?Et(Ze):We(qe,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}St(Ze),Ze.q="",Ze.state=Ae.ATTRIB_VALUE_CLOSED;continue;case Ae.ATTRIB_VALUE_CLOSED:je(xt)?Ze.state=Ae.ATTRIB:xt===">"?Et(Ze):xt==="/"?Ze.state=Ae.OPEN_TAG_SLASH:We(qe,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}St(Ze),xt===">"?Et(Ze):Ze.state=Ae.ATTRIB;continue;case Ae.CLOSE_TAG:if(Ze.tagName)xt===">"?vt(Ze):We(Ue,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;gt(qe,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,pn;switch(Ze.state){case Ae.TEXT_ENTITY:Jt=Ae.TEXT,pn="textNode";break;case Ae.ATTRIB_VALUE_ENTITY_Q:Jt=Ae.ATTRIB_VALUE_QUOTED,pn="attribValue";break;case Ae.ATTRIB_VALUE_ENTITY_U:Jt=Ae.ATTRIB_VALUE_UNQUOTED,pn="attribValue"}xt===";"?(Ze[pn]+=Bt(Ze),Ze.entity="",Ze.state=Jt):We(Ze.entity.length?Re:Xe,xt)?Ze.entity+=xt:(ht(Ze,"Invalid character in entity name"),Ze[pn]+="&"+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 yn=["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 at in Ke)Ke.hasOwnProperty(at)&&Ze.push(at);return Ze}),le.prototype={end:function(){Ft(this)},write:$t,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 at=this;return at._parser["on"+Ke]||Wt.indexOf(Ke)===-1||(at._parser["on"+Ke]=function(){var xt=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);xt.splice(0,0,Ke),at.emit.apply(at,xt)}),Ut.prototype.on.call(at,Ke,Ze)};var Xt="[CDATA[",mt="DOCTYPE",ze="http://www.w3.org/XML/1998/namespace",Be="http://www.w3.org/2000/xmlns/",et={xml:ze,xmlns:Be},qe=/[:_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]/,Ue=/[:_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],at=typeof Ze=="number"?String.fromCharCode(Ze):Ze;se.ENTITIES[Ke]=at});for(var Ge in se.STATE)se.STATE[se.STATE[Ge]]=Ge;Ae=se.STATE,Se.default||function(){var Ke=String.fromCharCode,Ze=Math.floor,at=function(){var xt,tn,nn=[],Jt=-1,pn=arguments.length;if(!pn)return"";for(var Mn="";++Jt<pn;){var hn=Number(arguments[Jt]);if(!isFinite(hn)||hn<0||hn>1114111||Ze(hn)!==hn)throw RangeError("Invalid code point: "+hn);hn<=65535?nn.push(hn):(hn-=65536,xt=55296+(hn>>10),tn=hn%1024+56320,nn.push(xt,tn)),(Jt+1===pn||nn.length>16384)&&(Mn+=Ke.apply(null,nn),nn.length=0)}return Mn};ue.default?Object.defineProperty(String,"fromCodePoint",{value:at,configurable:!0,writable:!0}):String.fromCodePoint=at}()})(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(We){return ee(We)}),{type:(Ce["content-type"]||{}).value||""}):he.concat(ye._body).toString());var Ne=[];if((0,ce.default)(Ce).forEach(function(We){var gt=Ce[We].name,ct=Ce[We].value;Array.isArray(ct)?ct.forEach(function(Ct){Ne.push([gt,Ct])}):Ne.push([gt,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(We){ye._fetchResponse=We,ye._connect()},function(We){Pe.clearTimeout(ye._fetchTimer),ye._destroyed||ye.emit("error",We)})}else{var Qe=ye._xhr=new Pe.XMLHttpRequest;try{Qe.open(ye._opts.method,ye._opts.url,!0)}catch(We){return void be.nextTick(function(){ye.emit("error",We)})}"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(We){Qe.setRequestHeader(We[0],We[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(We){return void be.nextTick(function(){ye.emit("error",We)})}}}},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 We=new be;return We.parse(je,Ve,Qe),We}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 We=je.indexOf("?"),gt=We!==-1&&We<je.indexOf("#")?"?":"#",ct=je.split(gt),Ct=/\\/g;ct[0]=ct[0].replace(Ct,"/"),je=ct.join(gt);var it=je;if(it=it.trim(),!Qe&&je.split("#").length===1){var yt=ue.exec(it);if(yt)return this.path=it,this.href=it,this.pathname=yt[1],yt[2]?(this.search=yt[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 St=it.indexOf(se[dt]);St!==-1&&(rt===-1||St<rt)&&(rt=St)}var Et,vt;vt=rt===-1?it.lastIndexOf("@"):it.lastIndexOf("@",rt),vt!==-1&&(Et=it.slice(0,vt),it=it.slice(vt+1),this.auth=decodeURIComponent(Et)),rt=-1;for(var dt=0;dt<ie.length;dt++){var St=it.indexOf(ie[dt]);St!==-1&&(rt===-1||St<rt)&&(rt=St)}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,ln=jt.length;dt<ln;dt++){var $t=jt[dt];if($t&&!$t.match(le)){for(var yn="",Ut=0,Wt=$t.length;Ut<Wt;Ut++)$t.charCodeAt(Ut)>127?yn+="x":yn+=$t[Ut];if(!yn.match(le)){var Xt=jt.slice(0,dt),mt=jt.slice(dt+1),ze=$t.match(ye);ze&&(Xt.push(ze[1]),mt.unshift(ze[2])),mt.length&&(it="/"+mt.join(".")+it),this.hostname=Xt.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:"",et=this.hostname||"";this.host=et+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,ln=oe.length;dt<ln;dt++){var qe=oe[dt];if(it.indexOf(qe)!==-1){var Ue=encodeURIComponent(qe);Ue===qe&&(Ue=escape(qe)),it=it.split(qe).join(Ue)}}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||"",We=this.hash||"",gt=!1,ct="";this.host?gt=je+this.host:this.hostname&&(gt=je+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(gt+=":"+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])&>!==!1?(gt="//"+(gt||""),Qe&&Qe.charAt(0)!=="/"&&(Qe="/"+Qe)):gt||(gt=""),We&&We.charAt(0)!=="#"&&(We="#"+We),Ct&&Ct.charAt(0)!=="?"&&(Ct="?"+Ct),Qe=Qe.replace(/[?#]/g,function(it){return encodeURIComponent(it)}),Ct=Ct.replace("#","%23"),Ve+gt+Qe+Ct+We},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,We=Object.keys(this),gt=0;gt<We.length;gt++){var ct=We[gt];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 yt=Ct[it];yt!=="protocol"&&(Qe[yt]=je[yt])}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 ln=(je.pathname||"").split("/");ln.length&&!(je.host=ln.shift()););je.host||(je.host=""),je.hostname||(je.hostname=""),ln[0]!==""&&ln.unshift(""),ln.length<2&&ln.unshift(""),Qe.pathname=ln.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 St=Qe.pathname&&Qe.pathname.charAt(0)==="/",Et=je.host||je.pathname&&je.pathname.charAt(0)==="/",vt=Et||St||Qe.host&&je.pathname,Bt=vt,jt=Qe.pathname&&Qe.pathname.split("/")||[],ln=je.pathname&&je.pathname.split("/")||[],$t=Qe.protocol&&!ke[Qe.protocol];if($t&&(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&&(ln[0]===""?ln[0]=je.host:ln.unshift(je.host)),je.host=null),vt=vt&&(ln[0]===""||jt[0]==="")),Et)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=ln;else if(ln.length)jt||(jt=[]),jt.pop(),jt=jt.concat(ln),Qe.search=je.search,Qe.query=je.query;else if(!ce.isNullOrUndefined(je.search)){if($t){Qe.hostname=Qe.host=jt.shift();var yn=!!(Qe.host&&Qe.host.indexOf("@")>0)&&Qe.host.split("@");yn&&(Qe.auth=yn.shift(),Qe.host=Qe.hostname=yn.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==="",Xt=0,mt=jt.length;mt>=0;mt--)Ut=jt[mt],Ut==="."?jt.splice(mt,1):Ut===".."?(jt.splice(mt,1),Xt++):Xt&&(jt.splice(mt,1),Xt--);if(!vt&&!Bt)for(;Xt--;Xt)jt.unshift("..");!vt||jt[0]===""||jt[0]&&jt[0].charAt(0)==="/"||jt.unshift(""),Wt&&jt.join("/").substr(-1)!=="/"&&jt.push("");var ze=jt[0]===""||jt[0]&&jt[0].charAt(0)==="/";if($t){Qe.hostname=Qe.host=ze?"":jt.length?jt.shift():"";var yn=!!(Qe.host&&Qe.host.indexOf("@")>0)&&Qe.host.split("@");yn&&(Qe.auth=yn.shift(),Qe.host=Qe.hostname=yn.shift())}return vt=vt||Qe.host&&jt.length,vt&&!ze&&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,St){var Et={seen:[],stylize:xe};return arguments.length>=3&&(Et.depth=arguments[2]),arguments.length>=4&&(Et.colors=arguments[3]),ie(St)?Et.showHidden=St:St&&Te._extend(Et,St),ke(Et.showHidden)&&(Et.showHidden=!1),ke(Et.depth)&&(Et.depth=2),ke(Et.colors)&&(Et.colors=!1),ke(Et.customInspect)&&(Et.customInspect=!0),Et.colors&&(Et.stylize=Se),ce(Et,dt,Et.depth)}function Se(dt,St){var Et=he.styles[St];return Et?"\x1B["+he.colors[Et][0]+"m"+dt+"\x1B["+he.colors[Et][1]+"m":dt}function xe(dt,St){return dt}function ge(dt){var St={};return dt.forEach(function(Et,vt){St[Et]=!0}),St}function ce(dt,St,Et){if(dt.customInspect&&St&&We(St.inspect)&&St.inspect!==Te.inspect&&(!St.constructor||St.constructor.prototype!==St)){var vt=St.inspect(Et,dt);return we(vt)||(vt=ce(dt,vt,Et)),vt}var Bt=ve(dt,St);if(Bt)return Bt;var jt=Object.keys(St),ln=ge(jt);if(dt.showHidden&&(jt=Object.getOwnPropertyNames(St)),Qe(St)&&(jt.indexOf("message")>=0||jt.indexOf("description")>=0))return de(St);if(jt.length===0){if(We(St)){var $t=St.name?": "+St.name:"";return dt.stylize("[Function"+$t+"]","special")}if(Ne(St))return dt.stylize(RegExp.prototype.toString.call(St),"regexp");if(Ve(St))return dt.stylize(Date.prototype.toString.call(St),"date");if(Qe(St))return de(St)}var yn="",Ut=!1,Wt=["{","}"];if(oe(St)&&(Ut=!0,Wt=["[","]"]),We(St)&&(yn=" [Function"+(St.name?": "+St.name:"")+"]"),Ne(St)&&(yn=" "+RegExp.prototype.toString.call(St)),Ve(St)&&(yn=" "+Date.prototype.toUTCString.call(St)),Qe(St)&&(yn=" "+de(St)),jt.length===0&&(!Ut||St.length==0))return Wt[0]+yn+Wt[1];if(Et<0)return Ne(St)?dt.stylize(RegExp.prototype.toString.call(St),"regexp"):dt.stylize("[Object]","special");dt.seen.push(St);var Xt;return Xt=Ut?ue(dt,St,Et,ln,jt):jt.map(function(mt){return z(dt,St,Et,ln,mt,Ut)}),dt.seen.pop(),ee(Xt,yn,Wt)}function ve(dt,St){if(ke(St))return dt.stylize("undefined","undefined");if(we(St)){var Et="'"+JSON.stringify(St).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return dt.stylize(Et,"string")}return ye(St)?dt.stylize(""+St,"number"):ie(St)?dt.stylize(""+St,"boolean"):se(St)?dt.stylize("null","null"):void 0}function de(dt){return"["+Error.prototype.toString.call(dt)+"]"}function ue(dt,St,Et,vt,Bt){for(var jt=[],ln=0,$t=St.length;ln<$t;++ln)yt(St,String(ln))?jt.push(z(dt,St,Et,vt,String(ln),!0)):jt.push("");return Bt.forEach(function(yn){yn.match(/^\d+$/)||jt.push(z(dt,St,Et,vt,yn,!0))}),jt}function z(dt,St,Et,vt,Bt,jt){var ln,$t,yn;if(yn=Object.getOwnPropertyDescriptor(St,Bt)||{value:St[Bt]},yn.get?$t=yn.set?dt.stylize("[Getter/Setter]","special"):dt.stylize("[Getter]","special"):yn.set&&($t=dt.stylize("[Setter]","special")),yt(vt,Bt)||(ln="["+Bt+"]"),$t||(dt.seen.indexOf(yn.value)<0?($t=se(Et)?ce(dt,yn.value,null):ce(dt,yn.value,Et-1),$t.indexOf(`
|
|
|
`)>-1&&($t=jt?$t.split(`
|
|
|
`).map(function(Ut){return" "+Ut}).join(`
|
|
|
`).substr(2):`
|
|
|
`+$t.split(`
|
|
|
`).map(function(Ut){return" "+Ut}).join(`
|
|
|
`))):$t=dt.stylize("[Circular]","special")),ke(ln)){if(jt&&Bt.match(/^\d+$/))return $t;ln=JSON.stringify(""+Bt),ln.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ln=ln.substr(1,ln.length-2),ln=dt.stylize(ln,"name")):(ln=ln.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ln=dt.stylize(ln,"string"))}return ln+": "+$t}function ee(dt,St,Et){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?Et[0]+(St===""?"":St+`
|
|
|
`)+" "+dt.join(`,
|
|
|
`)+" "+Et[1]:Et[0]+St+" "+dt.join(", ")+" "+Et[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 We(dt){return typeof dt=="function"}function gt(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,St=[Ct(dt.getHours()),Ct(dt.getMinutes()),Ct(dt.getSeconds())].join(":");return[dt.getDate(),rt[dt.getMonth()],St].join(" ")}function yt(dt,St){return Object.prototype.hasOwnProperty.call(dt,St)}var ut=/%[sdj%]/g;Te.format=function(dt){if(!we(dt)){for(var St=[],Et=0;Et<arguments.length;Et++)St.push(he(arguments[Et]));return St.join(" ")}for(var Et=1,vt=arguments,Bt=vt.length,jt=String(dt).replace(ut,function(yn){if(yn==="%%")return"%";if(Et>=Bt)return yn;switch(yn){case"%s":return String(vt[Et++]);case"%d":return Number(vt[Et++]);case"%j":try{return JSON.stringify(vt[Et++])}catch(Ut){return"[Circular]"}default:return yn}}),ln=vt[Et];Et<Bt;ln=vt[++Et])se(ln)||!je(ln)?jt+=" "+ln:jt+=" "+he(ln);return jt},Te.deprecate=function(dt,St){function Et(){if(!vt){if(be.throwDeprecation)throw new Error(St);be.traceDeprecation?console.trace(St):console.error(St),vt=!0}return dt.apply(this,arguments)}if(ke(Pe.process))return function(){return Te.deprecate(dt,St).apply(this,arguments)};if(be.noDeprecation===!0)return dt;var vt=!1;return Et};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 St=be.pid;ht[dt]=function(){var Et=Te.format.apply(Te,arguments);console.error("%s %d: %s",dt,St,Et)}}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=We,Te.isPrimitive=gt,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,St){if(!St||!je(St))return dt;for(var Et=Object.keys(St),vt=Et.length;vt--;)dt[Et[vt]]=St[Et[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,We,gt,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(We in Ne)if(z.call(Ne,We)){Ve=Ne[We];for(gt in Ve)Qe=Ve[gt],ke=le(ke.ele(gt),Qe).up()}}else for(gt in Ne)if(z.call(Ne,gt))if(Ve=Ne[gt],gt===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(gt===se)ke=Ce.options.cdata&&de(Ve)?ke.raw(ue(Ve)):ke.txt(Ve);else if(Array.isArray(Ve))for(We in Ve)z.call(Ve,We)&&(Qe=Ve[We],ke=typeof Qe=="string"?Ce.options.cdata&&de(Qe)?ke.ele(gt).raw(ue(Qe)).up():ke.ele(gt,Qe).up():le(ke.ele(gt),Qe).up());else(Ve===void 0?"undefined":(0,he.default)(Ve))==="object"?ke=le(ke.ele(gt),Ve).up():typeof Ve=="string"&&Ce.options.cdata&&de(Ve)?ke=ke.ele(gt).raw(ue(Ve)).up():(Ve==null&&(Ve=""),ke=ke.ele(gt,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(We){return function(gt){if(We.saxParser.resume(),!We.saxParser.errThrown)return We.saxParser.errThrown=!0,We.emit("error",gt)}}(this),this.saxParser.onend=function(We){return function(){if(!We.saxParser.ended)return We.saxParser.ended=!0,We.emit("end",We.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(We){return function(gt){var ct,Ct,it,yt,ut;if(it={},it[je]="",!We.options.ignoreAttrs){ut=gt.attributes;for(ct in ut)we.call(ut,ct)&&(Ne in it||We.options.mergeAttrs||(it[Ne]={}),Ct=We.options.attrValueProcessors?ee(We.options.attrValueProcessors,gt.attributes[ct],ct):gt.attributes[ct],yt=We.options.attrNameProcessors?ee(We.options.attrNameProcessors,ct):ct,We.options.mergeAttrs?We.assignOrPush(it,yt,Ct):it[Ne][yt]=Ct)}return it["#name"]=We.options.tagNameProcessors?ee(We.options.tagNameProcessors,gt.name):gt.name,We.options.xmlns&&(it[We.options.xmlnskey]={uri:gt.uri,local:gt.local}),Qe.push(it)}}(this),this.saxParser.onclosetag=function(We){return function(){var gt,ct,Ct,it,yt,ut,Ft,ht,rt,dt;if(ut=Qe.pop(),yt=ut["#name"],We.options.explicitChildren&&We.options.preserveChildrenOrder||delete ut["#name"],ut.cdata===!0&&(gt=ut.cdata,delete ut.cdata),rt=Qe[Qe.length-1],ut[je].match(/^\s*$/)&&!gt?(ct=ut[je],delete ut[je]):(We.options.trim&&(ut[je]=ut[je].trim()),We.options.normalize&&(ut[je]=ut[je].replace(/\s{2,}/g," ").trim()),ut[je]=We.options.valueProcessors?ee(We.options.valueProcessors,ut[je],yt):ut[je],(0,xe.default)(ut).length===1&&je in ut&&!We.EXPLICIT_CHARKEY&&(ut=ut[je])),z(ut)&&(ut=We.options.emptyTag!==""?We.options.emptyTag:ct),We.options.validator!=null&&(dt="/"+function(){var St,Et,vt;for(vt=[],St=0,Et=Qe.length;St<Et;St++)it=Qe[St],vt.push(it["#name"]);return vt}().concat(yt).join("/"),function(){var St;try{ut=We.options.validator(dt,rt&&rt[yt],ut)}catch(Et){return St=Et,We.emit("error",St)}}()),We.options.explicitChildren&&!We.options.mergeAttrs&&(ut===void 0?"undefined":(0,ce.default)(ut))==="object")if(We.options.preserveChildrenOrder){if(rt){rt[We.options.childkey]=rt[We.options.childkey]||[],Ft={};for(Ct in ut)we.call(ut,Ct)&&(Ft[Ct]=ut[Ct]);rt[We.options.childkey].push(Ft),delete ut["#name"],(0,xe.default)(ut).length===1&&je in ut&&!We.EXPLICIT_CHARKEY&&(ut=ut[je])}}else it={},We.options.attrkey in ut&&(it[We.options.attrkey]=ut[We.options.attrkey],delete ut[We.options.attrkey]),!We.options.charsAsChildren&&We.options.charkey in ut&&(it[We.options.charkey]=ut[We.options.charkey],delete ut[We.options.charkey]),(0,he.default)(ut).length>0&&(it[We.options.childkey]=ut),ut=it;return Qe.length>0?We.assignOrPush(rt,yt,ut):(We.options.explicitRoot&&(ht=ut,ut={},ut[yt]=ht),We.resultObject=ut,We.saxParser.ended=!0,We.emit("end",We.resultObject))}}(this),Ve=function(We){return function(gt){var ct,Ct;if(Ct=Qe[Qe.length-1])return Ct[je]+=gt,We.options.explicitChildren&&We.options.preserveChildrenOrder&&We.options.charsAsChildren&&(We.options.includeWhiteChars||gt.replace(/\\n/g,"").trim()!=="")&&(Ct[We.options.childkey]=Ct[We.options.childkey]||[],ct={"#name":"__text__"},ct[je]=gt,We.options.normalize&&(ct[je]=ct[je].replace(/\s{2,}/g," ").trim()),Ct[We.options.childkey].push(ct)),Ct}}(this),this.saxParser.ontext=Ve,this.saxParser.oncdata=function(We){return function(gt){var ct;if(ct=Ve(gt))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 We;je||(je={}),je.writer?we(je.writer)&&(We=je.writer,je.writer=new oe(We)):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 We;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)||(We=[Ve,Qe],Qe=We[0],Ve=We[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,We;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)&&(We=je[Qe],this.attribute(Qe,We));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,We,gt,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++)We=je[Qe],this.instruction(We);else if(ye(je))for(We in je)ke.call(je,We)&&(gt=je[We],this.instruction(We,gt));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 We;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return We=new ve(this,je,Ve,Qe),this.onData(this.writer.declaration(We,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,We,gt){var ct;return this.openCurrent(),ct=new Se(this,je,Ve,Qe,We,gt),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,We,gt,ct;if(Ve=null,le==null&&(le={}),le=le.valueOf(),z(le)||(gt=[le,ye],ye=gt[0],le=gt[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,We=ct.length;Ne<We;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,We,gt;for(we=this.document(),Ce=new Se(we,se,le),We=we.children,ke=Ne=0,Ve=We.length;Ne<Ve;ke=++Ne)if((ye=We[ke])instanceof Se)return we.children[ke]=Ce,Ce;for(gt=we.children,ke=je=0,Qe=gt.length;je<Qe;ke=++je)if(ye=gt[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,We,gt;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,We=we.children,gt=[],Ne=0,Ve=We.length;Ne<Ve;Ne++)switch(Ce=We[Ne],!1){case!(Ce instanceof ce):gt.push(this.declaration(Ce));break;case!(Ce instanceof ve):gt.push(this.docType(Ce));break;case!(Ce instanceof Pe):gt.push(this.comment(Ce));break;case!(Ce instanceof ue):gt.push(this.processingInstruction(Ce));break;default:gt.push(this.element(Ce))}return gt},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,We,gt,ct;Ce||(Ce=0),ct=this.space(Ce),this.stream.write(ct+"<"+we.name),We=we.attributes;for(Qe in We)se.call(We,Qe)&&(ke=We[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),gt=we.children,je=0,Ve=gt.length;je<Ve;je++)switch(Ne=gt[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,We,gt,ct,Ct,it,yt,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(gt in Ct)se.call(Ct,gt)&&(ke=Ct[gt],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,yt=we.children,Ve=0,We=yt.length;Ve<We;Ve++)Ne=yt[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,We,gt=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)),gt[Ve]),Ct[Ve]),We=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,We);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,We){if(Ve)return je(Ve);Ne({data:Qe,status:We.statusCode,headers:We.headers,res:We})}}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,We){Te.requestWithCallback(Ne,je,xe(Qe,We))}))},Te.requestWithCallback=function(Ne,je,Ve){function Qe(){Ue&&(clearTimeout(Ue),Ue=null)}function We(){Xe&&(clearTimeout(Xe),Xe=null)}function gt(En,Wn,Tn){if(We(),!Ve)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),ht,be.pid,$t.method,Ne),void(En&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),ht,be.pid,En.name,En.message,En.stack));var ci=Ve;Ve=null;var ri={};if(Tn&&(Ze=Tn.statusCode,ri=Tn.headers),Ze===401&&ri["www-authenticate"]&&(!je.headers||!je.headers.Authorization)&&je.digestAuth){var Ii=ri["www-authenticate"];if(Ii.indexOf("Digest ")>=0)return se("Request#%d %s: got digest auth header WWW-Authenticate: %s",ht,Ne,Ii),je.headers=je.headers||{},je.headers.Authorization=digestAuthHeader($t.method,$t.path,Ii,je.digestAuth),se("Request#%d %s: auth with digest header: %s",ht,Ne,je.headers.Authorization),Tn.headers["set-cookie"]&&(je.headers.Cookie=Tn.headers["set-cookie"].join(";")),Te.requestWithCallback(Ne,je,ci)}var bi=Date.now()-St;nn&&(nn.contentDownload=bi),se("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",bi,Ke,Ze,$t.method,$t.host,$t.path,Ge,nn);var nr={status:Ze,statusCode:Ze,headers:ri,size:Ke,aborted:at,rt:bi,keepAliveSocket:Ge,data:Wn,requestUrls:je.requestUrls,timing:nn,remoteAddress:xt,remotePort:tn};if(En){var Ji="";jt&&typeof jt.getCurrentStatus=="function"&&(Ji=", agent status: "+(0,ve.default)(jt.getCurrentStatus())),En.message+=", "+$t.method+" "+Ne+" "+Ze+" (connected: "+Ae+", keepalive socket: "+Ge+Ji+`)
|
|
|
headers: `+(0,ve.default)(ri),En.data=Wn,En.path=$t.path,En.status=Ze,En.headers=ri,En.res=nr}ci(En,Wn,je.streaming?Tn:nr),je.emitter&&(rt.url=Ne,rt.socket=hn&&hn.connection,rt.options=$t,rt.size=et,je.emitter.emit("response",{requestId:ht,error:En,ctx:je.ctx,req:rt,res:nr}))}function ct(En){var Wn=null;if(je.followRedirect&&statuses.redirect[En.statusCode]){je._followRedirectCount=(je._followRedirectCount||0)+1;var Tn=En.headers.location;if(Tn){if(!(je._followRedirectCount>je.maxRedirects)){var ci=je.formatRedirectUrl?je.formatRedirectUrl(Ne,Tn):ee.resolve(Ne,Tn);se("Request#%d %s: `redirected` from %s to %s",ht,$t.path,Ne,ci),We(),je.headers&&je.headers.Host&&Ce.test(Tn)&&(je.headers.Host=null);var ri=Ve;return Ve=null,Te.requestWithCallback(ci,je,ri),{redirect:!0,error:null}}Wn=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+Ne),Wn.name="MaxRedirectError"}else Wn=new Error("Got statusCode "+En.statusCode+" but cannot resolve next location from headers"),Wn.name="FollowRedirectError"}return{redirect:!1,error:Wn}}function Ct(En,Wn,Tn){return Tn(null,Wn,En.headers["content-encoding"])}function it(En){if(nn&&(nn.waiting=Date.now()-St),se("Request#%d %s `req response` event emit: status %d, headers: %j",ht,Ne,En.statusCode,En.headers),je.streaming){var Wn=ct(En);return Wn.redirect?void En.resume():Wn.error?(En.resume(),gt(Wn.error,null,En)):gt(null,null,En)}if(En.on("close",function(){se("Request#%d %s: `res close` event emit, total size %d",ht,Ne,Ke)}),En.on("error",function(){se("Request#%d %s: `res error` event emit, total size %d",ht,Ne,Ke)}),En.on("aborted",function(){at=!0,se("Request#%d %s: `res aborted` event emit, total size %d",ht,Ne,Ke)}),Jt){var Wn=ct(En);return Wn.redirect?void En.resume():Wn.error?(En.resume(),Jt.end(),gt(Wn.error,null,En)):(je.consumeWriteStream===!1?En.on("end",gt.bind(null,null,null,En)):isNode010||isNode012?first([[Jt,"close"],[En,"aborted"]],function(ri,Ii,bi){se("Request#%d %s: writeStream or res %s event emitted",ht,Ne,bi),gt(Re||null,null,En)}):Jt.on("close",function(){se("Request#%d %s: writeStream close event emitted",ht,Ne),gt(Re||null,null,En)}),En.pipe(Jt))}var Tn=[];En.on("data",function(ci){se("Request#%d %s: `res data` event emit, size %d",ht,Ne,ci.length),Ke+=ci.length,Tn.push(ci)}),En.on("end",function(){var ci=Pe.concat(Tn,Ke);if(se("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",ht,Ne,Ke,En._dumped),Re)return gt(Re,ci,En);var ri=ct(En);if(ri.error)return gt(ri.error,ci,En);ri.redirect||Ct(En,ci,function(Ii,bi,nr){if(Ii)return gt(Ii,ci,En);if(!nr&&ke.indexOf(je.dataType)>=0){try{bi=decodeBodyByCharset(bi,En)}catch(gr){return se("decodeBodyByCharset error: %s",gr),gt(null,bi,En)}if(je.dataType==="json")if(Ke===0)bi=null;else{var Ji=parseJSON(bi,ln);Ji.error?Ii=Ji.error:bi=Ji.data}}at&&se("Request#%d %s: Remote socket was terminated before `response.end()` was called",ht,Ne),gt(Ii,bi,En)})})}function yt(){se("Response timer ticking, timeout: %d",Mn),Xe=setTimeout(function(){Xe=null;var En="Response timeout for "+Mn+"ms";Re=new Error(En),Re.name="ResponseTimeoutError",Re.requestId=ht,se("ResponseTimeout: Request#%d %s %s: %s, connected: %s",ht,Ne,Re.name,En,Ae),ut()},Mn)}function ut(){se("Request#%d %s abort, connected: %s",ht,Ne,Ae),hn.socket||(Re.noSocket=!0,gt(Re)),hn.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,St=Date.now();typeof Ne=="string"?(Ce.test(Ne)||(Ne="http://"+Ne),dt=ee.parse(Ne)):dt=Ne;var Et=(je.type||je.method||dt.method||"GET").toUpperCase(),vt=dt.port||80,Bt=oe,jt=Se(je.agent,Te.agent),ln=je.fixJSONCtlChars;dt.protocol==="https:"&&(Bt=ie,jt=Se(je.httpsAgent,Te.httpsAgent),dt.port||(vt=443));var $t={host:dt.hostname||dt.host||"localhost",path:dt.path||"/",method:Et,port:vt,agent:jt,headers:je.headers||{},lookup:je.lookup};Array.isArray(je.timeout)?$t.requestTimeout=je.timeout[je.timeout.length-1]:je.timeout!==void 0&&($t.requestTimeout=je.timeout);for(var yn=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],Ut=0;Ut<yn.length;Ut++){var Wt=yn[Ut];je.hasOwnProperty(Wt)&&($t[Wt]=je[Wt])}$t.rejectUnauthorized!==!1||$t.hasOwnProperty("secureOptions")||($t.secureOptions=me("constants").SSL_OP_NO_TLSv1_2);var Xt=je.auth||dt.auth;Xt&&($t.auth=Xt);var mt=je.content||je.data,ze=Et==="GET"||Et==="HEAD"||je.dataAsQueryString;if(!je.content&&mt&&typeof mt!="string"&&!Pe.isBuffer(mt))if(ze)mt=je.nestedQuerystring?qs.stringify(mt):querystring.stringify(mt);else{var Be=$t.headers["Content-Type"]||$t.headers["content-type"];Be||(Be=je.contentType==="json"?"application/json":"application/x-www-form-urlencoded",$t.headers["Content-Type"]=Be),mt=parseContentType(Be).type==="application/json"?(0,ve.default)(mt):je.nestedQuerystring?qs.stringify(mt):querystring.stringify(mt)}ze&&mt&&($t.path+=(dt.query?"&":"?")+mt,mt=null);var et=0;if(mt){var qe=mt.length;Pe.isBuffer(mt)||(qe=Pe.byteLength(mt)),et=$t.headers["Content-Length"]=qe}je.dataType==="json"&&($t.headers.Accept="application/json"),typeof je.beforeRequest=="function"&&je.beforeRequest($t);var Ue=null,Xe=null,Re=null,Ae=!1,Ge=!1,Ke=0,Ze=-1,at=!1,xt="",tn="",nn=null;je.timing&&(nn={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),$t.headers["User-Agent"]||$t.headers["user-agent"]||($t.headers["User-Agent"]=navigator.userAgent),je.gzip&&($t.headers["Accept-Encoding"]||$t.headers["accept-encoding"]||($t.headers["Accept-Encoding"]="gzip"));var Jt=je.writeStream;se("Request#%d %s %s with headers %j, options.path: %s",ht,Et,Ne,$t.headers,$t.path),je.requestUrls.push(Ne);var pn,Mn;Array.isArray(je.timeout)?(pn=le(je.timeout[0]),Mn=le(je.timeout[1])):pn=Mn=le(je.timeout),se("ConnectTimeout: %d, ResponseTimeout: %d",pn,Mn);var hn;try{hn=Bt.request($t,it)}catch(En){return gt(En)}return typeof window=="undefined"?function(){se("Connect timer ticking, timeout: %d",pn),Ue=setTimeout(function(){Ue=null,Ze===-1&&(Ze=-2);var En="Connect timeout for "+pn+"ms",Wn="ConnectionTimeoutError";hn.socket||(Wn="SocketAssignTimeoutError",En+=", working sockets is full"),Re=new Error(En),Re.name=Wn,Re.requestId=ht,se("ConnectTimeout: Request#%d %s %s: %s, connected: %s",ht,Ne,Re.name,En,Ae),ut()},pn)}():hn.on("requestTimeout",function(){Ze===-1&&(Ze=-2);var En="Connect timeout for "+pn+"ms";Re=new Error(En),Re.name="ConnectionTimeoutError",Re.requestId=ht,ut()}),nn&&hn.on("finish",function(){nn.requestSent=Date.now()-St}),hn.once("socket",function(En){nn&&(nn.queuing=Date.now()-St),isNode010&&En.socket&&(En=En.socket);var Wn=En.readyState;if(Wn==="opening")return En.once("lookup",function(Tn,ci,ri){se("Request#%d %s lookup: %s, %s, %s",ht,Ne,Tn,ci,ri),nn&&(nn.dnslookup=Date.now()-St),ci&&(xt=ci)}),void En.once("connect",function(){nn&&(nn.connected=Date.now()-St),Qe(),yt(),se("Request#%d %s new socket connected",ht,Ne),Ae=!0,xt||(xt=En.remoteAddress),tn=En.remotePort});se("Request#%d %s reuse socket connected, readyState: %s",ht,Ne,Wn),Ae=!0,Ge=!0,xt||(xt=En.remoteAddress),tn=En.remotePort,Qe(),yt()}),hn.on("error",function(En){En.name!=="Error"&&En.name!=="TypeError"||(En.name=Ae?"ResponseError":"RequestError"),En.message+=' (req "error")',se("Request#%d %s `req error` event emit, %s: %s",ht,Ne,En.name,En.message),gt(Re||En)}),Jt&&Jt.once("error",function(En){En.message+=' (writeStream "error")',Re=En,se("Request#%d %s `writeStream error` event emit, %s: %s",ht,Ne,En.name,En.message),ut()}),je.stream?(je.stream.pipe(hn),je.stream.once("error",function(En){En.message+=' (stream "error")',Re=En,se("Request#%d %s `readStream error` event emit, %s: %s",ht,Ne,En.name,En.message),ut()})):hn.end(mt),hn.requestId=ht,hn}}).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],We=oe[ie+6],gt=oe[ie+7],ct=oe[ie+8],Ct=oe[ie+9],it=oe[ie+10],yt=oe[ie+11],ut=oe[ie+12],Ft=oe[ie+13],ht=oe[ie+14],rt=oe[ie+15],dt=we[0],St=we[1],Et=we[2],vt=we[3];dt=Pe(dt,St,Et,vt,Ce,7,z[0]),vt=Pe(vt,dt,St,Et,ke,12,z[1]),Et=Pe(Et,vt,dt,St,Ne,17,z[2]),St=Pe(St,Et,vt,dt,je,22,z[3]),dt=Pe(dt,St,Et,vt,Ve,7,z[4]),vt=Pe(vt,dt,St,Et,Qe,12,z[5]),Et=Pe(Et,vt,dt,St,We,17,z[6]),St=Pe(St,Et,vt,dt,gt,22,z[7]),dt=Pe(dt,St,Et,vt,ct,7,z[8]),vt=Pe(vt,dt,St,Et,Ct,12,z[9]),Et=Pe(Et,vt,dt,St,it,17,z[10]),St=Pe(St,Et,vt,dt,yt,22,z[11]),dt=Pe(dt,St,Et,vt,ut,7,z[12]),vt=Pe(vt,dt,St,Et,Ft,12,z[13]),Et=Pe(Et,vt,dt,St,ht,17,z[14]),St=Pe(St,Et,vt,dt,rt,22,z[15]),dt=he(dt,St,Et,vt,ke,5,z[16]),vt=he(vt,dt,St,Et,We,9,z[17]),Et=he(Et,vt,dt,St,yt,14,z[18]),St=he(St,Et,vt,dt,Ce,20,z[19]),dt=he(dt,St,Et,vt,Qe,5,z[20]),vt=he(vt,dt,St,Et,it,9,z[21]),Et=he(Et,vt,dt,St,rt,14,z[22]),St=he(St,Et,vt,dt,Ve,20,z[23]),dt=he(dt,St,Et,vt,Ct,5,z[24]),vt=he(vt,dt,St,Et,ht,9,z[25]),Et=he(Et,vt,dt,St,je,14,z[26]),St=he(St,Et,vt,dt,ct,20,z[27]),dt=he(dt,St,Et,vt,Ft,5,z[28]),vt=he(vt,dt,St,Et,Ne,9,z[29]),Et=he(Et,vt,dt,St,gt,14,z[30]),St=he(St,Et,vt,dt,ut,20,z[31]),dt=Se(dt,St,Et,vt,Qe,4,z[32]),vt=Se(vt,dt,St,Et,ct,11,z[33]),Et=Se(Et,vt,dt,St,yt,16,z[34]),St=Se(St,Et,vt,dt,ht,23,z[35]),dt=Se(dt,St,Et,vt,ke,4,z[36]),vt=Se(vt,dt,St,Et,Ve,11,z[37]),Et=Se(Et,vt,dt,St,gt,16,z[38]),St=Se(St,Et,vt,dt,it,23,z[39]),dt=Se(dt,St,Et,vt,Ft,4,z[40]),vt=Se(vt,dt,St,Et,Ce,11,z[41]),Et=Se(Et,vt,dt,St,je,16,z[42]),St=Se(St,Et,vt,dt,We,23,z[43]),dt=Se(dt,St,Et,vt,Ct,4,z[44]),vt=Se(vt,dt,St,Et,ut,11,z[45]),Et=Se(Et,vt,dt,St,rt,16,z[46]),St=Se(St,Et,vt,dt,Ne,23,z[47]),dt=xe(dt,St,Et,vt,Ce,6,z[48]),vt=xe(vt,dt,St,Et,gt,10,z[49]),Et=xe(Et,vt,dt,St,ht,15,z[50]),St=xe(St,Et,vt,dt,Qe,21,z[51]),dt=xe(dt,St,Et,vt,ut,6,z[52]),vt=xe(vt,dt,St,Et,je,10,z[53]),Et=xe(Et,vt,dt,St,it,15,z[54]),St=xe(St,Et,vt,dt,ke,21,z[55]),dt=xe(dt,St,Et,vt,ct,6,z[56]),vt=xe(vt,dt,St,Et,rt,10,z[57]),Et=xe(Et,vt,dt,St,We,15,z[58]),St=xe(St,Et,vt,dt,Ft,21,z[59]),dt=xe(dt,St,Et,vt,Ve,6,z[60]),vt=xe(vt,dt,St,Et,yt,10,z[61]),Et=xe(Et,vt,dt,St,Ne,15,z[62]),St=xe(St,Et,vt,dt,Ct,21,z[63]),we[0]=we[0]+dt|0,we[1]=we[1]+St|0,we[2]=we[2]+Et|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.]+)/),We=de.match(/(RIM\sTablet\sOS)\s([\d.]+)/),gt=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.]+/),yt=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]),We&&(ce.rimtabletos=!0,ce.version=We[2]),gt&&(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]),yt&&(ve.ie=!0,ve.version=yt[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||gt||ee&&!de.match(/Mobile/)||Ct&&de.match(/Tablet/)||yt&&!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/)||yt&&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,bn.exports=AliyunUpload},function(Le,me,Ie){"use strict";function Te(Qe){return Qe&&Qe.__esModule?Qe:{default:Qe}}function be(Qe,We){if(!(Qe instanceof We))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(me,"__esModule",{value:!0});var Pe=function(){function Qe(We,gt){for(var ct=0;ct<gt.length;ct++){var Ct=gt[ct];Ct.enumerable=Ct.enumerable||!1,Ct.configurable=!0,"value"in Ct&&(Ct.writable=!0),Object.defineProperty(We,Ct.key,Ct)}}return function(We,gt,ct){return gt&&Qe(We.prototype,gt),ct&&Qe(We,ct),We}}(),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(We){be(this,Qe),this.options=We,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(We,gt,ct,Ct){return this._retryCount=0,!(ct&&!Ct||!ct&&Ct)&&!(We&&!gt||!We&>)&&(this._ossCreditor.accessKeyId=We,this._ossCreditor.accessKeySecret=gt,this._ossCreditor.securityToken=ct,this._ossCreditor.expireTime=Ct,!0)}},{key:"addFile",value:function(We,gt,ct,Ct,it,yt){if(!We)return!1;if(We.size==0)try{this.options.onUploadFailed({file:We},"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==We)return!1;var Ft=new Object;if(Ft.file=We,Ft._endpoint=gt,Ft._bucket=ct,Ft._object=Ct,Ft.state=he.UPLOADSTATE.INIT,Ft.isImage=ie.default.isImage(We.name),!Ft.isImage&&this.options.enableUploadProgress){var ht=this;je.default.getMd5(We,function(rt){Ft.fileHash=rt;var dt=ht._getCheckoutpoint(Ft);ht.options.localCheckpoint||dt||ht._getCheckoutpointFromCloud(Ft,function(St){if(St.UploadPoint){var Et=JSON.parse(St.UploadPoint);Et.loaded!=1&&(Ft.checkpoint=Et.checkpoint,Ft.loaded=Et.loaded,Ft.videoId=St.VideoId,ht._saveCheckoutpoint(Ft,Et.checkpoint))}},function(St){try{if((St=JSON.parse(St))&&St.Code=="InvalidParameter"&&St.Message.indexOf("UserId")>0){ht._invalidUserId=!0;var Et=St.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(Et)}}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(We){return!!this.cancelFile(We)&&(this._uploadList.splice(We,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(We){if(this.options,We<0||We>=this._uploadList.length)return!1;var gt=this._uploadList[We];if(We==this._curIndex&>.state==he.UPLOADSTATE.UPLOADING){gt.state=he.UPLOADSTATE.CANCELED;var ct=this._getCheckoutpoint(gt);ct&&ct.checkpoint&&(ct=ct.checkpoint),ct&&this._ossUpload.abort(gt),this._removeCheckoutpoint(gt),this.nextUpload()}else gt.state!=he.UPLOADSTATE.SUCCESS&&(gt.state=he.UPLOADSTATE.CANCELED);return this._reportLog("20008",gt),!0}},{key:"resumeFile",value:function(We){if(this.options,We<0||We>=this._uploadList.length)return!1;var gt=this._uploadList[We];return gt.state==he.UPLOADSTATE.CANCELED&&(gt.state=he.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(We){return this._getCheckoutpoint({file:We})}},{key:"startUpload",value:function(We){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 gt=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(gt),this._state=he.VODSTATE.START}},{key:"nextUpload",value:function(){var We=this.options;if(this._state==he.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),this._curIndex!=-1){var gt=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(gt)}else{this._state=he.VODSTATE.END;try{We.onUploadEnd&&We.onUploadEnd(gt)}catch(ct){console.log(ct)}}}},{key:"clear",value:function(We){for(var gt=this.options,ct=0,Ct=0;Ct<this._uploadList.length;Ct++)gt.uploadList[Ct].state==he.UPLOADSTATE.SUCCESS&&ct++,this._uploadList[Ct].state==We&&(gt.uploadList.splice(Ct,1),Ct--);gt.onClear&>.onClear(gt.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 We=this._uploadList[this._curIndex];this._state=he.VODSTATE.STOP,We.state=he.UPLOADSTATE.STOPED,this._changeState(We,he.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(We){var gt=this;if(!We)return!1;var ct=JSON.parse(ve.default.decode(We));return!!(ct.AccessKeyId&&ct.AccessKeySecret&&ct.SecurityToken&&ct.Expiration)&>.resumeUploadWithToken(ct.AccessKeyId,ct.AccessKeySecret,ct.SecurityToken,ct.Expiration)}},{key:"resumeUploadWithToken",value:function(We,gt,ct,Ct){if(this.options,!(We&>&&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(We,gt,ct,Ct),this._state=he.VODSTATE.START,this._ossUpload=null,this._uploadCore(it,it.retry),it.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(We,gt,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,We,gt,ct):this.setSTSToken(Ct,We,gt,ct)}}},{key:"setSTSTokenDirectlyUpload",value:function(We,gt,ct,Ct,it){if(!(gt&&ct&&Ct&&it))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var yt=We;this.init(gt,ct,Ct,it),yt.endpoint=yt._endpoint,yt.bucket=yt._bucket,yt.object=yt._object,this._ossUpload=null,this._uploadCore(yt,We.retry),We.retry=!1}},{key:"setSTSToken",value:function(We,gt,ct,Ct){if(!gt||!ct||!Ct)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var it=We.videoInfo,yt={accessKeyId:gt,securityToken:Ct,accessKeySecret:ct,fileName:We.file.name,title:it.Title,requestId:We.ri,region:this.options.region};it.ImageType&&(yt.imageType=it.ImageType),it.ImageExt&&(yt.imageExt=it.ImageExt),it.FileSize&&(yt.fileSize=it.FileSize),it.Description&&(yt.description=it.Description),it.CateId&&(yt.cateId=it.CateId),it.Tags&&(yt.tags=it.Tags),it.TemplateGroupId&&(yt.templateGroupId=it.TemplateGroupId),it.StorageLocation&&(yt.storageLocation=it.StorageLocation),it.CoverURL&&(yt.coverUrl=it.CoverURL),it.TransCodeMode&&(yt.transCodeMode=it.TransCodeMode),it.UserData&&(yt.userData=it.UserData);var ut=this,Ft="getUploadAuth";We.videoId?(yt.videoId=We.videoId,Ft="refreshUploadAuth"):We.isImage&&(Ft="getImageUploadAuth"),we.default[Ft](yt,function(ht){We.videoId=ht.VideoId?ht.VideoId:We.videoId,ut.setUploadAuthAndAddress(We,ht.UploadAuth,ht.UploadAddress),ut._state=he.VODSTATE.START},function(ht){ut._error(We,{name:ht.Code,code:ht.Code,message:ht.Message,requestId:ht.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(We,gt,ct,Ct){if(!We||!gt||!ct)return!1;var it=JSON.parse(ve.default.decode(gt));if(!(it.AccessKeyId&&it.AccessKeySecret&&it.SecurityToken&&it.Expiration))return console.error("uploadauth is invalid"),!1;var yt={},ut=We;if(ct){if(yt=JSON.parse(ve.default.decode(ct)),!yt.Endpoint||!yt.Bucket||!yt.FileName)return console.error("uploadAddress is invalid"),!1}else yt.Endpoint=ut.endpoint,yt.Bucket=ut.bucket,yt.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:yt.Endpoint,ut.bucket=ut._bucket?ut._bucket:yt.Bucket,ut.object=ut._object?ut._object:yt.FileName,ut.region=this.options.region,Ct&&(ut.videoId=Ct),this._ossUpload=null,this._uploadCore(ut,We.retry),We.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(We,gt,ct,Ct){if(!gt||!ct||!Ct)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var it={accessKeyId:gt,securityToken:Ct,accessKeySecret:ct,videoId:We.object,requestId:We.ri,region:this.options.region},yt=this,ut="refreshUploadAuth";We.isImage&&(ut="getImageUploadAuth"),we.default[ut](it,function(Ft){yt.setUploadAuthAndAddress(We,Ft.UploadAuth,UploadAddress),yt._state=he.VODSTATE.START},function(Ft){yt._error(We,{name:Ft.Code,code:Ft.Code,message:Ft.Message,requestId:Ft.RequestId})})}},{key:"_upload",value:function(We){var gt=arguments.length>1&&arguments[1]!==void 0&&arguments[1],ct=this.options;if(We.retry=gt,ct.onUploadstarted&&!gt)try{var Ct=this._getCheckoutpoint(We);Ct&&Ct.state!=he.UPLOADSTATE.UPLOADING&&(We.checkpoint=Ct,We.videoId=Ct.videoId),ct.onUploadstarted(We)}catch(it){console.log(it)}}},{key:"_uploadCore",value:function(We){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(We.state=he.UPLOADSTATE.UPLOADING,!this._ossUpload){We.endpoint=We.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var gt=this;this._ossUpload=new ge.default({bucket:We.bucket,endpoint:We.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){gt._error.call(gt,ht,rt)},oncomplete:function(ht,rt){gt._complete.call(gt,ht,rt)},onprogress:function(ht,rt,dt){gt._progress.call(gt,ht,rt,dt)}})}var ct=ie.default.getFileType(We.file.name),Ct=this._getCheckoutpoint(We),it="",yt="";Ct&&Ct.checkpoint&&(yt=Ct.state,it=Ct.videoId,Ct=Ct.checkpoint),Ct&&it==We.videoId&&yt!=he.UPLOADSTATE.UPLOADING&&(Ct.file=We.file,We.checkpoint=Ct,Ct.uploadId);var ut=this._adjustPartSize(We);this._reportLog("20002",We,{ft:ct,fs:We.file.size,bu:We.bucket,ok:We.object,vid:We.videoId||"",fn:We.file.name,fw:null,fh:null,ps:ut});var Ft={headers:{"x-oss-notification":We.userData?We.userData:""},partSize:ut,parallel:this.options.parallel};this._ossUpload.upload(We,Ft)}},{key:"_findUploadIndex",value:function(){for(var We=-1,gt=0;gt<this._uploadList.length;gt++)if(this._uploadList[gt].state==he.UPLOADSTATE.INIT){We=gt;break}return We}},{key:"_error",value:function(We,gt){if(gt.name=="cancel")try{this.options.onUploadCanceled(We,gt)}catch(Ct){console.log(Ct)}else{if(gt.message.indexOf("InvalidAccessKeyIdError")>0||gt.name=="SignatureDoesNotMatchError"||gt.code=="SecurityTokenExpired"||gt.code=="InvalidSecurityToken.Expired"||gt.code=="InvalidAccessKeyId"&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=he.VODSTATE.EXPIRE,We.state=he.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(We,gt)}catch(Ct){console.log(Ct)}}return}if((gt.name=="RequestTimeoutError"||gt.name=="ConnectionTimeout"||gt.name=="ConnectionTimeoutError")&&this._retryTotal>this._retryCount){var ct=this;return setTimeout(function(){ct._uploadCore(We,!0)},1e3*ct._retryDuration),void this._retryCount++}gt.name=="NoSuchUploadError"&&this._removeCheckoutpoint(We),this._handleError(We,gt)}}},{key:"_handleError",value:function(We,gt){var ct=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],Ct=he.UPLOADSTATE.FAIlURE;if(We.state!=he.UPLOADSTATE.CANCELED&&(We.state=he.UPLOADSTATE.FAIlURE,this._state=he.VODSTATE.FAILURE,this.options.onUploadFailed&>&>.code&>.message))try{this.options.onUploadFailed(We,gt.code,gt.message)}catch(yt){console.log(yt)}if(ct&&this._changeState(We,Ct),this._reportLog("20006",We,{code:gt.name,message:gt.message,requestId:gt.requestId,fs:We.file.size,bu:We.bucket,ok:We.object,fn:We.file.name}),this._reportLog("20004",We,{requestId:gt.requestId,fs:We.file.size,bu:We.bucket,ok:We.object,fn:We.file.name}),We.ri=le.default.create(),this._findUploadIndex()!=-1){var it=this;this._state=he.VODSTATE.START,setTimeout(function(){it.nextUpload()},100)}}},{key:"_complete",value:function(We,gt){if(We.state=he.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(We)}catch(it){console.log(it)}var ct=0;gt&>.res&>.res.headers&&(ct=gt.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(We);var Ct=this;setTimeout(function(){Ct.nextUpload()},100),this._retryCount=0,this._reportLog("20003",We,{requestId:ct})}},{key:"_progress",value:function(We,gt,ct){if(this.options.onUploadProgress)try{We.loaded=gt.loaded,this.options.onUploadProgress(We,gt.total,gt.loaded)}catch(rt){console.log(rt)}var Ct=gt.checkpoint,it=0;Ct&&(We.checkpoint=Ct,this._saveCheckoutpoint(We,Ct,he.UPLOADSTATE.UPLOADING),it=Ct.uploadId),this._retryCount=0;var yt=this._getPortNumber(Ct),ut=0;if(ct&&ct.headers&&(ut=ct.headers["x-oss-request-id"]),gt.loaded!=0&&this._reportLog("20007",We,{pn:yt,requestId:ut}),gt.loaded!=1&&this._reportLog("20005",We,{UploadId:it,pn:yt+1,pr:We.retry?1:0,fs:We.file.size,bu:We.bucket,ok:We.object,fn:We.file.name}),!this._invalidUserId&&!We.isImage&&this._ut=="vod"&&this.options.enableUploadProgress){var Ft={file:We.file,checkpoint:gt,userId:this.options.userId,videoId:We.videoId,region:this.options.region,fileHash:We.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(We){if(We){var gt=We.doneParts;if(gt&>.length>0)return gt[gt.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(We){var gt=this._getCheckoutpointKey(We);ue.default.remove(gt)}},{key:"_getCheckoutpoint",value:function(We){var gt=this._getCheckoutpointKey(We),ct=ue.default.get(gt);if(ct)try{return JSON.parse(ct)}catch(Ct){}return""}},{key:"_saveCheckoutpoint",value:function(We,gt,ct){if(gt){var Ct=this._getCheckoutpointKey(We),it=We.file,yt={fileName:it.name,lastModified:it.lastModified,size:it.size,object:We.object,videoId:We.videoId,bucket:We.bucket,endpoint:We.endpoint,checkpoint:gt,loaded:We.loaded,state:ct};ue.default.set(Ct,JSON.stringify(yt))}}},{key:"_changeState",value:function(We,gt){var ct=this._getCheckoutpoint(We);ct&&((this._onbeforeunload=!0)&&(gt=he.UPLOADSTATE.STOPED),this._saveCheckoutpoint(We,ct.checkpoint,gt))}},{key:"_getCheckoutpointKey",value:function(We){return"upload_"+We.file.lastModified+"_"+We.file.name+"_"+We.file.size}},{key:"_getCheckoutpointFromCloud",value:function(We,gt,ct){var Ct={userId:this.options.userId,uploadInfoList:[{FileName:We.file.name,FileSize:We.file.size,FileCreateTime:We.file.lastModified,FileHash:We.fileHash}],region:this.options.region};ke.default.get(Ct,function(it){gt(it)},ct)}},{key:"_reportLog",value:function(We,gt,ct){ct||(ct={}),ct.ri=gt.ri,this._ut&&(ct.ut=this._ut),this._log.log(We,ct)}},{key:"_initEvent",value:function(){var We=this;window&&(window.onbeforeunload=function(gt){if(We._onbeforeunload=!0,We._curIndex!=-1&&We._uploadList.length>We._curIndex){var ct=We._uploadList[We._curIndex];We._changeState(ct,he.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var We=0;We<this._uploadList.length;We++){var gt=this._uploadList[We];gt.state!=he.UPLOADSTATE.FAIlURE&>.state!=he.UPLOADSTATE.STOPED||(gt.state=he.UPLOADSTATE.INIT)}this._state=he.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(We){return We.file.size/this.options.partSize>1e4?We.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,Ge){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,Ge):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,Ge){return xe(Re),Re<=0?Pe(Xe,Re):Ae!==void 0?typeof Ge=="string"?Pe(Xe,Re).fill(Ae,Ge):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 Ge=0|ie(Re,Ae);Xe=Pe(Xe,Ge);var Ke=Xe.write(Re,Ae);return Ke!==Ge&&(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 Ge=0;Ge<Ae;Ge+=1)Xe[Ge]=255&Re[Ge];return Xe}function ue(Xe,Re,Ae,Ge){if(Re.byteLength,Ae<0||Re.byteLength<Ae)throw new RangeError("'offset' is out of bounds");if(Re.byteLength<Ae+(Ge||0))throw new RangeError("'length' is out of bounds");return Re=Ae===void 0&&Ge===void 0?new Uint8Array(Re):Ge===void 0?new Uint8Array(Re,Ae):new Uint8Array(Re,Ae,Ge),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"||mt(Re.length)?Pe(Xe,0):de(Xe,Re);if(Re.type==="Buffer"&&et(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 Ge=!1;;)switch(Re){case"ascii":case"latin1":case"binary":return Ae;case"utf8":case"utf-8":case void 0:return $t(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(Ge)return $t(Xe).length;Re=(""+Re).toLowerCase(),Ge=!0}}function se(Xe,Re,Ae){var Ge=!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 yt(this,Re,Ae);case"utf8":case"utf-8":return gt(this,Re,Ae);case"ascii":return Ct(this,Re,Ae);case"latin1":case"binary":return it(this,Re,Ae);case"base64":return We(this,Re,Ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ut(this,Re,Ae);default:if(Ge)throw new TypeError("Unknown encoding: "+Xe);Xe=(Xe+"").toLowerCase(),Ge=!0}}function le(Xe,Re,Ae){var Ge=Xe[Re];Xe[Re]=Xe[Ae],Xe[Ae]=Ge}function ye(Xe,Re,Ae,Ge,Ke){if(Xe.length===0)return-1;if(typeof Ae=="string"?(Ge=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,Ge)),he.isBuffer(Re))return Re.length===0?-1:we(Xe,Re,Ae,Ge,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,Ge,Ke);throw new TypeError("val must be string, number or Buffer")}function we(Xe,Re,Ae,Ge,Ke){function Ze(hn,En){return at===1?hn[En]:hn.readUInt16BE(En*at)}var at=1,xt=Xe.length,tn=Re.length;if(Ge!==void 0&&((Ge=String(Ge).toLowerCase())==="ucs2"||Ge==="ucs-2"||Ge==="utf16le"||Ge==="utf-16le")){if(Xe.length<2||Re.length<2)return-1;at=2,xt/=2,tn/=2,Ae/=2}var nn;if(Ke){var Jt=-1;for(nn=Ae;nn<xt;nn++)if(Ze(Xe,nn)===Ze(Re,Jt===-1?0:nn-Jt)){if(Jt===-1&&(Jt=nn),nn-Jt+1===tn)return Jt*at}else Jt!==-1&&(nn-=nn-Jt),Jt=-1}else for(Ae+tn>xt&&(Ae=xt-tn),nn=Ae;nn>=0;nn--){for(var pn=!0,Mn=0;Mn<tn;Mn++)if(Ze(Xe,nn+Mn)!==Ze(Re,Mn)){pn=!1;break}if(pn)return nn}return-1}function Ce(Xe,Re,Ae,Ge){Ae=Number(Ae)||0;var Ke=Xe.length-Ae;Ge?(Ge=Number(Ge))>Ke&&(Ge=Ke):Ge=Ke;var Ze=Re.length;if(Ze%2!=0)throw new TypeError("Invalid hex string");Ge>Ze/2&&(Ge=Ze/2);for(var at=0;at<Ge;++at){var xt=parseInt(Re.substr(2*at,2),16);if(isNaN(xt))return at;Xe[Ae+at]=xt}return at}function ke(Xe,Re,Ae,Ge){return Xt($t(Re,Xe.length-Ae),Xe,Ae,Ge)}function Ne(Xe,Re,Ae,Ge){return Xt(yn(Re),Xe,Ae,Ge)}function je(Xe,Re,Ae,Ge){return Ne(Xe,Re,Ae,Ge)}function Ve(Xe,Re,Ae,Ge){return Xt(Wt(Re),Xe,Ae,Ge)}function Qe(Xe,Re,Ae,Ge){return Xt(Ut(Re,Xe.length-Ae),Xe,Ae,Ge)}function We(Xe,Re,Ae){return Re===0&&Ae===Xe.length?ze.fromByteArray(Xe):ze.fromByteArray(Xe.slice(Re,Ae))}function gt(Xe,Re,Ae){Ae=Math.min(Xe.length,Ae);for(var Ge=[],Ke=Re;Ke<Ae;){var Ze=Xe[Ke],at=null,xt=Ze>239?4:Ze>223?3:Ze>191?2:1;if(Ke+xt<=Ae){var tn,nn,Jt,pn;switch(xt){case 1:Ze<128&&(at=Ze);break;case 2:tn=Xe[Ke+1],(192&tn)==128&&(pn=(31&Ze)<<6|63&tn)>127&&(at=pn);break;case 3:tn=Xe[Ke+1],nn=Xe[Ke+2],(192&tn)==128&&(192&nn)==128&&(pn=(15&Ze)<<12|(63&tn)<<6|63&nn)>2047&&(pn<55296||pn>57343)&&(at=pn);break;case 4:tn=Xe[Ke+1],nn=Xe[Ke+2],Jt=Xe[Ke+3],(192&tn)==128&&(192&nn)==128&&(192&Jt)==128&&(pn=(15&Ze)<<18|(63&tn)<<12|(63&nn)<<6|63&Jt)>65535&&pn<1114112&&(at=pn)}}at===null?(at=65533,xt=1):at>65535&&(at-=65536,Ge.push(at>>>10&1023|55296),at=56320|1023&at),Ge.push(at),Ke+=xt}return ct(Ge)}function ct(Xe){var Re=Xe.length;if(Re<=qe)return String.fromCharCode.apply(String,Xe);for(var Ae="",Ge=0;Ge<Re;)Ae+=String.fromCharCode.apply(String,Xe.slice(Ge,Ge+=qe));return Ae}function Ct(Xe,Re,Ae){var Ge="";Ae=Math.min(Xe.length,Ae);for(var Ke=Re;Ke<Ae;++Ke)Ge+=String.fromCharCode(127&Xe[Ke]);return Ge}function it(Xe,Re,Ae){var Ge="";Ae=Math.min(Xe.length,Ae);for(var Ke=Re;Ke<Ae;++Ke)Ge+=String.fromCharCode(Xe[Ke]);return Ge}function yt(Xe,Re,Ae){var Ge=Xe.length;(!Re||Re<0)&&(Re=0),(!Ae||Ae<0||Ae>Ge)&&(Ae=Ge);for(var Ke="",Ze=Re;Ze<Ae;++Ze)Ke+=ln(Xe[Ze]);return Ke}function ut(Xe,Re,Ae){for(var Ge=Xe.slice(Re,Ae),Ke="",Ze=0;Ze<Ge.length;Ze+=2)Ke+=String.fromCharCode(Ge[Ze]+256*Ge[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,Ge,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+Ge>Xe.length)throw new RangeError("Index out of range")}function rt(Xe,Re,Ae,Ge){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*(Ge?Ke:1-Ke))>>>8*(Ge?Ke:1-Ke)}function dt(Xe,Re,Ae,Ge){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*(Ge?Ke:3-Ke)&255}function St(Xe,Re,Ae,Ge,Ke,Ze){if(Ae+Ge>Xe.length)throw new RangeError("Index out of range");if(Ae<0)throw new RangeError("Index out of range")}function Et(Xe,Re,Ae,Ge,Ke){return Ke||St(Xe,Re,Ae,4,34028234663852886e22,-34028234663852886e22),Be.write(Xe,Re,Ae,Ge,23,4),Ae+4}function vt(Xe,Re,Ae,Ge,Ke){return Ke||St(Xe,Re,Ae,8,17976931348623157e292,-17976931348623157e292),Be.write(Xe,Re,Ae,Ge,52,8),Ae+8}function Bt(Xe){if(Xe=jt(Xe).replace(Ue,""),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 ln(Xe){return Xe<16?"0"+Xe.toString(16):Xe.toString(16)}function $t(Xe,Re){Re=Re||1/0;for(var Ae,Ge=Xe.length,Ke=null,Ze=[],at=0;at<Ge;++at){if((Ae=Xe.charCodeAt(at))>55295&&Ae<57344){if(!Ke){if(Ae>56319){(Re-=3)>-1&&Ze.push(239,191,189);continue}if(at+1===Ge){(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 yn(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,Ge,Ke,Ze=[],at=0;at<Xe.length&&!((Re-=2)<0);++at)Ae=Xe.charCodeAt(at),Ge=Ae>>8,Ke=Ae%256,Ze.push(Ke),Ze.push(Ge);return Ze}function Wt(Xe){return ze.toByteArray(Bt(Xe))}function Xt(Xe,Re,Ae,Ge){for(var Ke=0;Ke<Ge&&!(Ke+Ae>=Re.length||Ke>=Xe.length);++Ke)Re[Ke+Ae]=Xe[Ke];return Ke}function mt(Xe){return Xe!==Xe}var ze=Ie(21),Be=Ie(22),et=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,Ge=Re.length,Ke=0,Ze=Math.min(Ae,Ge);Ke<Ze;++Ke)if(Xe[Ke]!==Re[Ke]){Ae=Xe[Ke],Ge=Re[Ke];break}return Ae<Ge?-1:Ge<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(!et(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 Ge=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(Ge,Ke),Ke+=Ze.length}return Ge},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?gt(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,Ge,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),Ge===void 0&&(Ge=0),Ke===void 0&&(Ke=this.length),Re<0||Ae>Xe.length||Ge<0||Ke>this.length)throw new RangeError("out of range index");if(Ge>=Ke&&Re>=Ae)return 0;if(Ge>=Ke)return-1;if(Re>=Ae)return 1;if(Re>>>=0,Ae>>>=0,Ge>>>=0,Ke>>>=0,this===Xe)return 0;for(var Ze=Ke-Ge,at=Ae-Re,xt=Math.min(Ze,at),tn=this.slice(Ge,Ke),nn=Xe.slice(Re,Ae),Jt=0;Jt<xt;++Jt)if(tn[Jt]!==nn[Jt]){Ze=tn[Jt],at=nn[Jt];break}return Ze<at?-1:at<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,Ge){if(Re===void 0)Ge="utf8",Ae=this.length,Re=0;else if(Ae===void 0&&typeof Re=="string")Ge=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,Ge===void 0&&(Ge="utf8")):(Ge=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");Ge||(Ge="utf8");for(var Ze=!1;;)switch(Ge){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: "+Ge);Ge=(""+Ge).toLowerCase(),Ze=!0}},he.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var qe=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 Ge;if(he.TYPED_ARRAY_SUPPORT)Ge=this.subarray(Xe,Re),Ge.__proto__=he.prototype;else{var Ke=Re-Xe;Ge=new he(Ke,void 0);for(var Ze=0;Ze<Ke;++Ze)Ge[Ze]=this[Ze+Xe]}return Ge},he.prototype.readUIntLE=function(Xe,Re,Ae){Xe|=0,Re|=0,Ae||Ft(Xe,Re,this.length);for(var Ge=this[Xe],Ke=1,Ze=0;++Ze<Re&&(Ke*=256);)Ge+=this[Xe+Ze]*Ke;return Ge},he.prototype.readUIntBE=function(Xe,Re,Ae){Xe|=0,Re|=0,Ae||Ft(Xe,Re,this.length);for(var Ge=this[Xe+--Re],Ke=1;Re>0&&(Ke*=256);)Ge+=this[Xe+--Re]*Ke;return Ge},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 Ge=this[Xe],Ke=1,Ze=0;++Ze<Re&&(Ke*=256);)Ge+=this[Xe+Ze]*Ke;return Ke*=128,Ge>=Ke&&(Ge-=Math.pow(2,8*Re)),Ge},he.prototype.readIntBE=function(Xe,Re,Ae){Xe|=0,Re|=0,Ae||Ft(Xe,Re,this.length);for(var Ge=Re,Ke=1,Ze=this[Xe+--Ge];Ge>0&&(Ke*=256);)Ze+=this[Xe+--Ge]*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,Ge){Xe=+Xe,Re|=0,Ae|=0,!Ge&&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,Ge){Xe=+Xe,Re|=0,Ae|=0,!Ge&&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,Ge){if(Xe=+Xe,Re|=0,!Ge){var Ke=Math.pow(2,8*Ae-1);ht(this,Xe,Re,Ae,Ke-1,-Ke)}var Ze=0,at=1,xt=0;for(this[Re]=255&Xe;++Ze<Ae&&(at*=256);)Xe<0&&xt===0&&this[Re+Ze-1]!==0&&(xt=1),this[Re+Ze]=(Xe/at>>0)-xt&255;return Re+Ae},he.prototype.writeIntBE=function(Xe,Re,Ae,Ge){if(Xe=+Xe,Re|=0,!Ge){var Ke=Math.pow(2,8*Ae-1);ht(this,Xe,Re,Ae,Ke-1,-Ke)}var Ze=Ae-1,at=1,xt=0;for(this[Re+Ze]=255&Xe;--Ze>=0&&(at*=256);)Xe<0&&xt===0&&this[Re+Ze+1]!==0&&(xt=1),this[Re+Ze]=(Xe/at>>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 Et(this,Xe,Re,!0,Ae)},he.prototype.writeFloatBE=function(Xe,Re,Ae){return Et(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,Ge){if(Ae||(Ae=0),Ge||Ge===0||(Ge=this.length),Re>=Xe.length&&(Re=Xe.length),Re||(Re=0),Ge>0&&Ge<Ae&&(Ge=Ae),Ge===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(Ge<0)throw new RangeError("sourceEnd out of bounds");Ge>this.length&&(Ge=this.length),Xe.length-Re<Ge-Ae&&(Ge=Xe.length-Re+Ae);var Ke,Ze=Ge-Ae;if(this===Xe&&Ae<Re&&Re<Ge)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,Ge){if(typeof Xe=="string"){if(typeof Re=="string"?(Ge=Re,Re=0,Ae=this.length):typeof Ae=="string"&&(Ge=Ae,Ae=this.length),Xe.length===1){var Ke=Xe.charCodeAt(0);Ke<256&&(Xe=Ke)}if(Ge!==void 0&&typeof Ge!="string")throw new TypeError("encoding must be a string");if(typeof Ge=="string"&&!he.isEncoding(Ge))throw new TypeError("Unknown encoding: "+Ge)}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 at=he.isBuffer(Xe)?Xe:$t(new he(Xe,Ge).toString()),xt=at.length;for(Ze=0;Ze<Ae-Re;++Ze)this[Ze+Re]=at[Ze%xt]}return this};var Ue=/[^+\/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),We=ve.default.getClientId();We=ve.default.setClientId(We);var gt=Ce.getAuthInfo(ke.userId,We,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:gt,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};We&&(Ct.ClientId=We);var it=ie.default.makeUTF8sort(Ct,"=","&")+"&Signature="+ie.default.aliyunEncodeURI(ie.default.makeChangeSiga(Ct,ke.accessKeySecret)),yt="https://vod."+ke.region+".aliyuncs.com/?"+it;Se.default.get(yt,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),We=ve.default.getClientId(),gt=Ce.getAuthInfo(ke.userId,We,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:gt,UserId:ke.userId,UploadInfoList:JSON.stringify(ke.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:ct};We&&(Ct.ClientId=We);var it=ie.default.makeUTF8sort(Ct,"=","&")+"&Signature="+ie.default.aliyunEncodeURI(ie.default.makeChangeSiga(Ct,ke.accessKeySecret)),yt="https://vod."+ke.region+".aliyuncs.com/?"+it;Se.default.get(yt,function(ut){var Ft={},ht=We;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(bn,qt){"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}qt.Z=Ee},13845:function(bn,qt,Ee){"use strict";Ee.d(qt,{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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return me}});var Le=Ee(59301);function me(){const[,Ie]=Le.useReducer(Te=>Te+1,0);return Ie}},68031:function(bn,qt,Ee){"use strict";Ee.d(qt,{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(bn,qt,Ee){"use strict";Ee.d(qt,{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 We=0,Qe=Object.getOwnPropertySymbols(Ne);We<Qe.length;We++)je.indexOf(Qe[We])<0&&Object.prototype.propertyIsEnumerable.call(Ne,Qe[We])&&(Ve[Qe[We]]=Ne[Qe[We]]);return Ve};const ue=(Ne,je)=>{var Ve;const{prefixCls:Qe,className:We,rootClassName:gt,children:ct,indeterminate:Ct=!1,style:it,onMouseEnter:yt,onMouseLeave:ut,skipGroup:Ft=!1,disabled:ht}=Ne,rt=de(Ne,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:dt,direction:St,checkbox:Et}=Te.useContext(be.E_),vt=Te.useContext(xe),{isFormItemInput:Bt}=Te.useContext(he.aM),jt=Te.useContext(Pe.Z),ln=(Ve=(vt==null?void 0:vt.disabled)||ht)!==null&&Ve!==void 0?Ve:jt,$t=Te.useRef(rt.value);Te.useEffect(()=>{vt==null||vt.registerValue(rt.value)},[]),Te.useEffect(()=>{if(!Ft)return rt.value!==$t.current&&(vt==null||vt.cancelValue($t.current),vt==null||vt.registerValue(rt.value),$t.current=rt.value),()=>vt==null?void 0:vt.cancelValue(rt.value)},[rt.value]);const yn=dt("checkbox",Qe),[Ut,Wt]=(0,ge.ZP)(yn),Xt=Object.assign({},rt);vt&&!Ft&&(Xt.onChange=function(){rt.onChange&&rt.onChange.apply(rt,arguments),vt.toggleOption&&vt.toggleOption({label:ct,value:rt.value})},Xt.name=vt.name,Xt.checked=vt.value.includes(rt.value));const mt=me()(`${yn}-wrapper`,{[`${yn}-rtl`]:St==="rtl",[`${yn}-wrapper-checked`]:Xt.checked,[`${yn}-wrapper-disabled`]:ln,[`${yn}-wrapper-in-form-item`]:Bt},Et==null?void 0:Et.className,We,gt,Wt),ze=me()({[`${yn}-indeterminate`]:Ct},ve.A,Wt),Be=Ct?"mixed":void 0;return Ut(Te.createElement(ce.Z,{component:"Checkbox",disabled:ln},Te.createElement("label",{className:mt,style:Object.assign(Object.assign({},Et==null?void 0:Et.style),it),onMouseEnter:yt,onMouseLeave:ut},Te.createElement(Ie.Z,Object.assign({"aria-checked":Be},Xt,{prefixCls:yn,className:ze,disabled:ln,ref:je})),ct!==void 0&&Te.createElement("span",null,ct))))};var ee=Te.forwardRef(ue),oe=Ee(26407),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 We=0,Qe=Object.getOwnPropertySymbols(Ne);We<Qe.length;We++)je.indexOf(Qe[We])<0&&Object.prototype.propertyIsEnumerable.call(Ne,Qe[We])&&(Ve[Qe[We]]=Ne[Qe[We]]);return Ve};const le=(Ne,je)=>{const{defaultValue:Ve,children:Qe,options:We=[],prefixCls:gt,className:ct,rootClassName:Ct,style:it,onChange:yt}=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||[]),[St,Et]=Te.useState([]);Te.useEffect(()=>{"value"in ut&&dt(ut.value||[])},[ut.value]);const vt=Te.useMemo(()=>We.map(et=>typeof et=="string"||typeof et=="number"?{label:et,value:et}:et),[We]),Bt=et=>{Et(qe=>qe.filter(Ue=>Ue!==et))},jt=et=>{Et(qe=>[].concat((0,oe.Z)(qe),[et]))},ln=et=>{const qe=rt.indexOf(et.value),Ue=(0,oe.Z)(rt);qe===-1?Ue.push(et.value):Ue.splice(qe,1),"value"in ut||dt(Ue),yt==null||yt(Ue.filter(Xe=>St.includes(Xe)).sort((Xe,Re)=>{const Ae=vt.findIndex(Ke=>Ke.value===Xe),Ge=vt.findIndex(Ke=>Ke.value===Re);return Ae-Ge}))},$t=Ft("checkbox",gt),yn=`${$t}-group`,[Ut,Wt]=(0,ge.ZP)($t),Xt=(0,ie.Z)(ut,["value","disabled"]),mt=We.length?vt.map(et=>Te.createElement(ee,{prefixCls:$t,key:et.value.toString(),disabled:"disabled"in et?et.disabled:ut.disabled,value:et.value,checked:rt.includes(et.value),onChange:et.onChange,className:`${yn}-item`,style:et.style,title:et.title},et.label)):Qe,ze={toggleOption:ln,value:rt,disabled:ut.disabled,name:ut.name,registerValue:jt,cancelValue:Bt},Be=me()(yn,{[`${yn}-rtl`]:ht==="rtl"},ct,Ct,Wt);return Ut(Te.createElement("div",Object.assign({className:Be,style:it},Xt,{ref:je}),Te.createElement(xe.Provider,{value:ze},mt)))},ye=Te.forwardRef(le);var we=Te.memo(ye);const Ce=ee;Ce.Group=we,Ce.__ANT_CHECKBOX=!0;var ke=Ce},98447:function(bn,qt,Ee){"use strict";Ee.d(qt,{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)]}qt.ZP=(0,Ie.Z)("Checkbox",(Pe,he)=>{let{prefixCls:Se}=he;return[be(Se,Pe)]})},93891:function(bn,qt,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)}};qt.Z=Te},43428:function(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Ut}});var Le=Ee(92310),me=Ee.n(Le),Ie=Ee(33708),Te=Ee(33606),be=Ee(43403),Pe=Ee(34280),he=Ee(59301),Se=he.createContext(null),xe=he.createContext({}),ge=Se,ce=Ee(400),ve=Ee(92413),de=Ee(77900),ue=Ee(10228),z=Ee(26112),ee=Ee(70425),oe=function(Xt){var mt=Xt.prefixCls,ze=Xt.className,Be=Xt.style,et=Xt.children,qe=Xt.containerRef,Ue=Xt.id,Xe=Xt.onMouseEnter,Re=Xt.onMouseOver,Ae=Xt.onMouseLeave,Ge=Xt.onClick,Ke=Xt.onKeyDown,Ze=Xt.onKeyUp,at={onMouseEnter:Xe,onMouseOver:Re,onMouseLeave:Ae,onClick:Ge,onKeyDown:Ke,onKeyUp:Ze},xt=he.useContext(xe),tn=xt.panel,nn=(0,ee.useComposeRef)(tn,qe);return he.createElement(he.Fragment,null,he.createElement("div",(0,ve.Z)({id:Ue,className:me()("".concat(mt,"-content"),ze),style:(0,Ie.Z)({},Be),"aria-modal":"true",role:"dialog",ref:nn},at),et))},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,Xt){var mt,ze,Be,et,qe=Wt.prefixCls,Ue=Wt.open,Xe=Wt.placement,Re=Wt.inline,Ae=Wt.push,Ge=Wt.forceRender,Ke=Wt.autoFocus,Ze=Wt.keyboard,at=Wt.rootClassName,xt=Wt.rootStyle,tn=Wt.zIndex,nn=Wt.className,Jt=Wt.id,pn=Wt.style,Mn=Wt.motion,hn=Wt.width,En=Wt.height,Wn=Wt.children,Tn=Wt.contentWrapperStyle,ci=Wt.mask,ri=Wt.maskClosable,Ii=Wt.maskMotion,bi=Wt.maskClassName,nr=Wt.maskStyle,Ji=Wt.afterOpenChange,gr=Wt.onClose,cr=Wt.onMouseEnter,eo=Wt.onMouseOver,ro=Wt.onMouseLeave,hi=Wt.onClick,Pr=Wt.onKeyDown,Hi=Wt.onKeyUp,st=he.useRef(),Rr=he.useRef(),Er=he.useRef();he.useImperativeHandle(Xt,function(){return st.current});var yo=function(zn){var At=zn.keyCode,Kt=zn.shiftKey;switch(At){case ue.Z.TAB:{if(At===ue.Z.TAB){if(!Kt&&document.activeElement===Er.current){var Sn;(Sn=Rr.current)===null||Sn===void 0||Sn.focus({preventScroll:!0})}else if(Kt&&document.activeElement===Rr.current){var kn;(kn=Er.current)===null||kn===void 0||kn.focus({preventScroll:!0})}}break}case ue.Z.ESC:{gr&&Ze&&(zn.stopPropagation(),gr(zn));break}}};he.useEffect(function(){if(Ue&&Ke){var Bn;(Bn=st.current)===null||Bn===void 0||Bn.focus({preventScroll:!0})}},[Ue]);var Zr=he.useState(!1),ao=(0,Te.Z)(Zr,2),Jr=ao[0],lo=ao[1],oi=he.useContext(ge),$e;Ae===!1?$e={distance:0}:Ae===!0?$e={}:$e=Ae||{};var nt=(mt=(ze=(Be=$e)===null||Be===void 0?void 0:Be.distance)!==null&&ze!==void 0?ze:oi==null?void 0:oi.pushDistance)!==null&&mt!==void 0?mt:180,Je=he.useMemo(function(){return{pushDistance:nt,push:function(){lo(!0)},pull:function(){lo(!1)}}},[nt]);he.useEffect(function(){if(Ue){var Bn;oi==null||(Bn=oi.push)===null||Bn===void 0||Bn.call(oi)}else{var zn;oi==null||(zn=oi.pull)===null||zn===void 0||zn.call(oi)}},[Ue]),he.useEffect(function(){return function(){var Bn;oi==null||(Bn=oi.pull)===null||Bn===void 0||Bn.call(oi)}},[]);var wt=ci&&he.createElement(de.default,(0,ve.Z)({key:"mask"},Ii,{visible:Ue}),function(Bn,zn){var At=Bn.className,Kt=Bn.style;return he.createElement("div",{className:me()("".concat(qe,"-mask"),At,bi),style:(0,Ie.Z)((0,Ie.Z)({},Kt),nr),onClick:ri&&Ue?gr:void 0,ref:zn})}),Nt=typeof Mn=="function"?Mn(Xe):Mn,kt={};if(Jr&&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(hn):kt.height=le(En);var _t={onMouseEnter:cr,onMouseOver:eo,onMouseLeave:ro,onClick:hi,onKeyDown:Pr,onKeyUp:Hi},un=he.createElement(de.default,(0,ve.Z)({key:"panel"},Nt,{visible:Ue,forceRender:Ge,onVisibleChanged:function(zn){Ji==null||Ji(zn)},removeOnLeave:!1,leavedClassName:"".concat(qe,"-content-wrapper-hidden")}),function(Bn,zn){var At=Bn.className,Kt=Bn.style;return he.createElement("div",(0,ve.Z)({className:me()("".concat(qe,"-content-wrapper"),At),style:(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({},kt),Kt),Tn)},(0,z.Z)(Wt,{data:!0})),he.createElement(ie,(0,ve.Z)({id:Jt,containerRef:zn,prefixCls:qe,className:nn,style:pn},_t),Wn))}),wn=(0,Ie.Z)({},xt);return tn&&(wn.zIndex=tn),he.createElement(ge.Provider,{value:Je},he.createElement("div",{className:me()(qe,"".concat(qe,"-").concat(Xe),at,(et={},(0,ce.Z)(et,"".concat(qe,"-open"),Ue),(0,ce.Z)(et,"".concat(qe,"-inline"),Re),et)),style:wn,tabIndex:-1,ref:st,onKeyDown:yo},wt,he.createElement("div",{tabIndex:0,ref:Rr,style:we,"aria-hidden":"true","data-sentinel":"start"}),un,he.createElement("div",{tabIndex:0,ref:Er,style:we,"aria-hidden":"true","data-sentinel":"end"})))}var ke=he.forwardRef(Ce),Ne=ke,je=function(Xt){var mt=Xt.open,ze=mt===void 0?!1:mt,Be=Xt.prefixCls,et=Be===void 0?"rc-drawer":Be,qe=Xt.placement,Ue=qe===void 0?"right":qe,Xe=Xt.autoFocus,Re=Xe===void 0?!0:Xe,Ae=Xt.keyboard,Ge=Ae===void 0?!0:Ae,Ke=Xt.width,Ze=Ke===void 0?378:Ke,at=Xt.mask,xt=at===void 0?!0:at,tn=Xt.maskClosable,nn=tn===void 0?!0:tn,Jt=Xt.getContainer,pn=Xt.forceRender,Mn=Xt.afterOpenChange,hn=Xt.destroyOnClose,En=Xt.onMouseEnter,Wn=Xt.onMouseOver,Tn=Xt.onMouseLeave,ci=Xt.onClick,ri=Xt.onKeyDown,Ii=Xt.onKeyUp,bi=Xt.panelRef,nr=he.useState(!1),Ji=(0,Te.Z)(nr,2),gr=Ji[0],cr=Ji[1],eo=he.useState(!1),ro=(0,Te.Z)(eo,2),hi=ro[0],Pr=ro[1];(0,Pe.Z)(function(){Pr(!0)},[]);var Hi=hi?ze:!1,st=he.useRef(),Rr=he.useRef();(0,Pe.Z)(function(){Hi&&(Rr.current=document.activeElement)},[Hi]);var Er=function(lo){var oi;if(cr(lo),Mn==null||Mn(lo),!lo&&Rr.current&&!((oi=st.current)!==null&&oi!==void 0&&oi.contains(Rr.current))){var $e;($e=Rr.current)===null||$e===void 0||$e.focus({preventScroll:!0})}},yo=he.useMemo(function(){return{panel:bi}},[bi]);if(!pn&&!gr&&!Hi&&hn)return null;var Zr={onMouseEnter:En,onMouseOver:Wn,onMouseLeave:Tn,onClick:ci,onKeyDown:ri,onKeyUp:Ii},ao=(0,Ie.Z)((0,Ie.Z)({},Xt),{},{open:Hi,prefixCls:et,placement:Ue,autoFocus:Re,keyboard:Ge,width:Ze,mask:xt,maskClosable:nn,inline:Jt===!1,afterOpenChange:Er,ref:st},Zr);return he.createElement(xe.Provider,{value:yo},he.createElement(be.Z,{open:Hi||pn||gr,autoDestroy:!1,getContainer:Jt,autoLock:xt&&(Hi||gr)},he.createElement(Ne,ao)))},Ve=je,Qe=Ve,We=Ee(62892),gt=Ee(36355),ct=Ee(32441),Ct=Ee(47729),yt=Wt=>{const{prefixCls:Xt,title:mt,footer:ze,extra:Be,closeIcon:et,closable:qe,onClose:Ue,headerStyle:Xe,drawerStyle:Re,bodyStyle:Ae,footerStyle:Ge,children:Ke}=Wt,Ze=he.useCallback(Jt=>he.createElement("button",{type:"button",onClick:Ue,"aria-label":"Close",className:`${Xt}-close`},Jt),[Ue]),[at,xt]=(0,Ct.Z)(qe,et,Ze,void 0,!0),tn=he.useMemo(()=>!mt&&!at?null:he.createElement("div",{style:Xe,className:me()(`${Xt}-header`,{[`${Xt}-header-close-only`]:at&&!mt&&!Be})},he.createElement("div",{className:`${Xt}-header-title`},xt,mt&&he.createElement("div",{className:`${Xt}-title`},mt)),Be&&he.createElement("div",{className:`${Xt}-extra`},Be)),[at,xt,Be,Xe,Xt,mt]),nn=he.useMemo(()=>{if(!ze)return null;const Jt=`${Xt}-footer`;return he.createElement("div",{className:Jt,style:Ge},ze)},[ze,Ge,Xt]);return he.createElement("div",{className:`${Xt}-wrapper-body`,style:Re},tn,he.createElement("div",{className:`${Xt}-body`,style:Ae},Ke),nn)},ut=Ee(33234),Ft=Ee(83116),ht=Ee(37613),dt=Wt=>{const{componentCls:Xt,motionDurationSlow:mt}=Wt,ze={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${mt}`}}};return{[Xt]:{[`${Xt}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${mt}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${Xt}-panel-motion`]:{"&-left":[ze,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[ze,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[ze,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[ze,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const St=Wt=>{const{componentCls:Xt,zIndexPopup:mt,colorBgMask:ze,colorBgElevated:Be,motionDurationSlow:et,motionDurationMid:qe,padding:Ue,paddingLG:Xe,fontSizeLG:Re,lineHeightLG:Ae,lineWidth:Ge,lineType:Ke,colorSplit:Ze,marginSM:at,colorIcon:xt,colorIconHover:tn,colorText:nn,fontWeightStrong:Jt,footerPaddingBlock:pn,footerPaddingInline:Mn}=Wt,hn=`${Xt}-content-wrapper`;return{[Xt]:{position:"fixed",inset:0,zIndex:mt,pointerEvents:"none","&-pure":{position:"relative",background:Be,[`&${Xt}-left`]:{boxShadow:Wt.boxShadowDrawerLeft},[`&${Xt}-right`]:{boxShadow:Wt.boxShadowDrawerRight},[`&${Xt}-top`]:{boxShadow:Wt.boxShadowDrawerUp},[`&${Xt}-bottom`]:{boxShadow:Wt.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${Xt}-mask`]:{position:"absolute",inset:0,zIndex:mt,background:ze,pointerEvents:"auto"},[hn]:{position:"absolute",zIndex:mt,maxWidth:"100vw",transition:`all ${et}`,"&-hidden":{display:"none"}},[`&-left > ${hn}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:Wt.boxShadowDrawerLeft},[`&-right > ${hn}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:Wt.boxShadowDrawerRight},[`&-top > ${hn}`]:{top:0,insetInline:0,boxShadow:Wt.boxShadowDrawerUp},[`&-bottom > ${hn}`]:{bottom:0,insetInline:0,boxShadow:Wt.boxShadowDrawerDown},[`${Xt}-content`]:{width:"100%",height:"100%",overflow:"auto",background:Be,pointerEvents:"auto"},[`${Xt}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${Xt}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${Ue}px ${Xe}px`,fontSize:Re,lineHeight:Ae,borderBottom:`${Ge}px ${Ke} ${Ze}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${Xt}-extra`]:{flex:"none"},[`${Xt}-close`]:{display:"inline-block",marginInlineEnd:at,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 ${qe}`,textRendering:"auto","&:focus, &:hover":{color:tn,textDecoration:"none"}},[`${Xt}-title`]:{flex:1,margin:0,color:nn,fontWeight:Wt.fontWeightStrong,fontSize:Re,lineHeight:Ae},[`${Xt}-body`]:{flex:1,minWidth:0,minHeight:0,padding:Xe,overflow:"auto"},[`${Xt}-footer`]:{flexShrink:0,padding:`${pn}px ${Mn}px`,borderTop:`${Ge}px ${Ke} ${Ze}`},"&-rtl":{direction:"rtl"}}}};var Et=(0,Ft.Z)("Drawer",Wt=>{const Xt=(0,ht.TS)(Wt,{});return[St(Xt),dt(Xt)]},Wt=>({zIndexPopup:Wt.zIndexPopupBase,footerPaddingBlock:Wt.paddingXS,footerPaddingInline:Wt.padding})),vt=Ee(11575),Bt=function(Wt,Xt){var mt={};for(var ze in Wt)Object.prototype.hasOwnProperty.call(Wt,ze)&&Xt.indexOf(ze)<0&&(mt[ze]=Wt[ze]);if(Wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,ze=Object.getOwnPropertySymbols(Wt);Be<ze.length;Be++)Xt.indexOf(ze[Be])<0&&Object.prototype.propertyIsEnumerable.call(Wt,ze[Be])&&(mt[ze[Be]]=Wt[ze[Be]]);return mt};const jt=null,ln={distance:180},$t=Wt=>{var Xt;const{rootClassName:mt,width:ze,height:Be,size:et="default",mask:qe=!0,push:Ue=ln,open:Xe,afterOpenChange:Re,onClose:Ae,prefixCls:Ge,getContainer:Ke,style:Ze,className:at,visible:xt,afterVisibleChange:tn}=Wt,nn=Bt(Wt,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:Jt,getPrefixCls:pn,direction:Mn,drawer:hn}=he.useContext(gt.E_),En=pn("drawer",Ge),[Wn,Tn]=Et(En),ci=Ke===void 0&&Jt?()=>Jt(document.body):Ke,ri=me()({"no-mask":!qe,[`${En}-rtl`]:Mn==="rtl"},mt,Tn),Ii=he.useMemo(()=>ze!=null?ze:et==="large"?736:378,[ze,et]),bi=he.useMemo(()=>Be!=null?Be:et==="large"?736:378,[Be,et]),nr={motionName:(0,We.m)(En,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},Ji=cr=>({motionName:(0,We.m)(En,`panel-motion-${cr}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),gr=(0,vt.H)();return Wn(he.createElement(ut.BR,null,he.createElement(ct.Ux,{status:!0,override:!0},he.createElement(Qe,Object.assign({prefixCls:En,onClose:Ae,maskMotion:nr,motion:Ji},nn,{open:Xe!=null?Xe:xt,mask:qe,push:Ue,width:Ii,height:bi,style:Object.assign(Object.assign({},hn==null?void 0:hn.style),Ze),className:me()(hn==null?void 0:hn.className,at),rootClassName:ri,getContainer:ci,afterOpenChange:Re!=null?Re:tn,panelRef:gr}),he.createElement(yt,Object.assign({prefixCls:En},nn,{onClose:Ae}))))))},yn=Wt=>{const{prefixCls:Xt,style:mt,className:ze,placement:Be="right"}=Wt,et=Bt(Wt,["prefixCls","style","className","placement"]),{getPrefixCls:qe}=he.useContext(gt.E_),Ue=qe("drawer",Xt),[Xe,Re]=Et(Ue),Ae=me()(Ue,`${Ue}-pure`,`${Ue}-${Be}`,Re,ze);return Xe(he.createElement("div",{className:Ae,style:mt},he.createElement(yt,Object.assign({prefixCls:Ue},et))))};$t._InternalPanelDoNotUseOrYouWillBeFired=yn;var Ut=$t},91857:function(bn,qt,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:We,getPopupContainer:gt,overlayClassName:ct,rootClassName:Ct,open:it,onOpenChange:yt,visible:ut,onVisibleChange:Ft,mouseEnterDelay:ht=.15,mouseLeaveDelay:rt=.1,autoAdjustOverflow:dt=!0,placement:St="",overlay:Et,transitionName:vt}=we,{getPopupContainer:Bt,getPrefixCls:jt,direction:ln}=Le.useContext(ve.E_),$t=Le.useMemo(()=>{const at=jt();return vt!==void 0?vt:St.includes("top")?`${at}-slide-down`:`${at}-slide-up`},[jt,St,vt]),yn=Le.useMemo(()=>St?St.includes("Center")?St.slice(0,St.indexOf("Center")):St:ln==="rtl"?"bottomRight":"bottomLeft",[St,ln]),Ut=jt("dropdown",Ne),[Wt,Xt]=(0,ee.Z)(Ut),[,mt]=(0,z.Z)(),ze=Le.Children.only(je),Be=(0,ce.Tm)(ze,{className:Te()(`${Ut}-trigger`,{[`${Ut}-rtl`]:ln==="rtl"},ze.props.className),disabled:Qe}),et=Qe?[]:Ve;let qe;et&&et.includes("contextMenu")&&(qe=!0);const[Ue,Xe]=(0,he.Z)(!1,{value:it!=null?it:ut}),Re=(0,Pe.useEvent)(at=>{yt==null||yt(at),Ft==null||Ft(at),Xe(at)}),Ae=Te()(ct,Ct,Xt,{[`${Ut}-rtl`]:ln==="rtl"}),Ge=(0,xe.Z)({arrowPointAtCenter:typeof ke=="object"&&ke.pointAtCenter,autoAdjustOverflow:dt,offset:mt.marginXXS,arrowWidth:ke?mt.sizePopupArrow:0,borderRadius:mt.borderRadius}),Ke=Le.useCallback(()=>{Xe(!1)},[]),Ze=()=>{let at;return Ce!=null&&Ce.items?at=Le.createElement(de.default,Object.assign({},Ce)):typeof Et=="function"?at=Et():at=Et,We&&(at=We(at)),at=Le.Children.only(typeof at=="string"?Le.createElement("span",null,at):at),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}},at)};return Wt(Le.createElement(be.Z,Object.assign({alignPoint:qe},(0,Se.Z)(we,["rootClassName"]),{mouseEnterDelay:ht,mouseLeaveDelay:rt,visible:Ue,builtinPlacements:Ge,arrow:!!ke,overlayClassName:Ae,prefixCls:Ut,getPopupContainer:gt||Bt,transitionName:$t,trigger:et,overlay:Ze,placement:yn,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,qt.Z=ie},38854:function(bn,qt,Ee){"use strict";Ee.d(qt,{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:We,arrow:gt,autoFocus:ct,overlay:Ct,trigger:it,align:yt,open:ut,onOpenChange:Ft,placement:ht,getPopupContainer:rt,href:dt,icon:St=Te.createElement(be.Z,null),title:Et,buttonsRender:vt=Ze=>Ze,mouseEnterDelay:Bt,mouseLeaveDelay:jt,overlayClassName:ln,overlayStyle:$t,destroyPopupOnHide:yn,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"]),Xt=ie("dropdown",le),mt=`${Xt}-button`,[ze,Be]=(0,ge.Z)(Xt),et={menu:We,arrow:gt,autoFocus:ct,align:yt,disabled:Ce,trigger:Ce?[]:it,onOpenChange:Ft,getPopupContainer:rt||oe,mouseEnterDelay:Bt,mouseLeaveDelay:jt,overlayClassName:ln,overlayStyle:$t,destroyPopupOnHide:yn,dropdownRender:Ut},{compactSize:qe,compactItemClassnames:Ue}=(0,xe.ri)(Xt,se),Xe=Ie()(mt,Ue,Qe,Be);"overlay"in ee&&(et.overlay=Ct),"open"in ee&&(et.open=ut),"placement"in ee?et.placement=ht:et.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:Et},Ve),Ae=Te.createElement(Pe.ZP,{type:ye,danger:we,icon:St}),[Ge,Ke]=vt([Re,Ae]);return ze(Te.createElement(Se.Z.Compact,Object.assign({className:Xe,size:qe,block:!0},Wt),Ge,Te.createElement(Le.Z,Object.assign({},et),Ke)))};ve.__ANT_BUTTON=!0;var de=ve;const ue=Le.Z;ue.Button=de;var z=ue},47211:function(bn,qt,Ee){"use strict";Ee.d(qt,{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(bn,qt,Ee){"use strict";Ee.d(qt,{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:We}=ye,gt=ee(ye,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:ct,direction:Ct,empty:it}=Ie.useContext(Te.E_),yt=ct("empty",ke),[ut,Ft]=z(yt),[ht]=(0,be.Z)("Empty"),rt=typeof je!="undefined"?je:ht==null?void 0:ht.description,dt=typeof rt=="string"?rt:"empty";let St=null;return typeof Ne=="string"?St=Ie.createElement("img",{alt:dt,src:Ne}):St=Ne,ut(Ie.createElement("div",Object.assign({className:me()(Ft,yt,it==null?void 0:it.className,{[`${yt}-normal`]:Ne===ie,[`${yt}-rtl`]:Ct==="rtl"},we,Ce),style:Object.assign(Object.assign({},it==null?void 0:it.style),We)},gt),Ie.createElement("div",{className:`${yt}-image`,style:Qe},St),rt&&Ie.createElement("div",{className:`${yt}-description`},rt),Ve&&Ie.createElement("div",{className:`${yt}-footer`},Ve)))};se.PRESENTED_IMAGE_DEFAULT=oe,se.PRESENTED_IMAGE_SIMPLE=ie;var le=se},78241:function(bn,qt,Ee){"use strict";Ee.d(qt,{default:function(){return nt}});var Le=Ee(26407),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:_t,labelRequiredMarkColor:un,labelColor:wn,labelFontSize:Bn,labelHeight:zn,labelColonMarginInlineStart:At,labelColonMarginInlineEnd:Kt,itemMarginBottom:Sn}=Je;return{[wt]:Object.assign(Object.assign({},(0,xe.Wf)(Je)),{marginBottom:Sn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${_t}-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:zn,color:wn,fontSize:Bn,[`> ${Nt}`]:{fontSize:Je.fontSize,verticalAlign:"top"},[`&${wt}-required:not(${wt}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Je.marginXXS,color:un,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:Kt},[`&${wt}-no-colon::after`]:{content:'"\\a0"'}}},[`${wt}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${_t}-col-'"]):not([class*="' ${_t}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight: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 gt=Je=>{let{help:wt,helpStatus:Nt,errors:kt=Ve,warnings:_t=Ve,className:un,fieldId:wn,onVisibleChanged:Bn}=Je;const{prefixCls:zn}=be.useContext(he.Rk),At=`${zn}-item-explain`,[,Kt]=je(zn),Sn=(0,be.useMemo)(()=>(0,Pe.Z)(zn),[zn]),kn=Se(kt),Zt=Se(_t),rn=be.useMemo(()=>wt!=null?[Qe(wt,"help",Nt)]:[].concat((0,Le.Z)(kn.map((An,Qn)=>Qe(An,"error","error",Qn))),(0,Le.Z)(Zt.map((An,Qn)=>Qe(An,"warning","warning",Qn)))),[wt,Nt,kn,Zt]),Rn={};return wn&&(Rn.id=`${wn}_help`),be.createElement(Te.default,{motionDeadline:Sn.motionDeadline,motionName:`${zn}-show-help`,visible:!!rn.length,onVisibleChanged:Bn},An=>{const{className:Qn,style:Un}=An;return be.createElement("div",Object.assign({},Rn,{className:Ie()(At,Qn,un,Kt),style:Un,role:"alert"}),be.createElement(Te.CSSMotionList,Object.assign({keys:rn},(0,Pe.Z)(zn),{motionName:`${zn}-show-help-item`,component:!1}),qn=>{const{key:Nn,error:si,errorStatus:Li,className:Bi,style:Ln}=qn;return be.createElement("div",{key:Nn,className:Ie()(Bi,{[`${At}-${Li}`]:Li}),style:Ln},si)}))})},ct=Ee(95013),Ct=Ee(36355),it=Ee(1684),yt=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 St(Je,wt){if(!Je.length)return;const Nt=Je.join("_");return wt?`${wt}_${Nt}`:ht.includes(Nt)?`${rt}_${Nt}`:Nt}function Et(Je,wt,Nt,kt,_t,un){let wn=kt;return un!==void 0?wn=un:Nt.validating?wn="validating":Je.length?wn="error":wt.length?wn="warning":(Nt.touched||_t&&Nt.validated)&&(wn="success"),wn}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:_t=>un=>{const wn=vt(_t);un?Nt.current[wn]=un:delete Nt.current[wn]}},scrollToField:function(_t){let un=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const wn=dt(_t),Bn=St(wn,kt.__INTERNAL__.name),zn=Bn?document.getElementById(Bn):null;zn&&(0,Ft.Z)(zn,Object.assign({scrollMode:"if-needed",block:"nearest"},un))},getFieldInstance:_t=>{const un=vt(_t);return Nt.current[un]}}),[Je,wt]);return[kt]}var jt=Ee(28726),ln=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 _t=0,kt=Object.getOwnPropertySymbols(Je);_t<kt.length;_t++)wt.indexOf(kt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Je,kt[_t])&&(Nt[kt[_t]]=Je[kt[_t]]);return Nt};const $t=(Je,wt)=>{const Nt=be.useContext(it.Z),{getPrefixCls:kt,direction:_t,form:un}=be.useContext(Ct.E_),{prefixCls:wn,className:Bn,rootClassName:zn,size:At,disabled:Kt=Nt,form:Sn,colon:kn,labelAlign:Zt,labelWrap:rn,labelCol:Rn,wrapperCol:An,hideRequiredMark:Qn,layout:Un="horizontal",scrollToFirstError:qn,requiredMark:Nn,onFinishFailed:si,name:Li,style:Bi,feedbackIcons:Ln}=Je,Ui=ln(Je,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),lr=(0,ut.Z)(At),Di=be.useContext(jt.Z),Pn=(0,be.useMemo)(()=>Nn!==void 0?Nn:un&&un.requiredMark!==void 0?un.requiredMark:!Qn,[Qn,Nn,un]),Yn=kn!=null?kn:un==null?void 0:un.colon,ui=kt("form",wn),[Ti,pi]=je(ui),Mi=Ie()(ui,`${ui}-${Un}`,{[`${ui}-hide-required-mark`]:Pn===!1,[`${ui}-rtl`]:_t==="rtl",[`${ui}-${lr}`]:lr},pi,un==null?void 0:un.className,Bn,zn),[ir]=Bt(Sn),{__INTERNAL__:Fi}=ir;Fi.name=Li;const Wi=(0,be.useMemo)(()=>({name:Li,labelAlign:Zt,labelCol:Rn,labelWrap:rn,wrapperCol:An,vertical:Un==="vertical",colon:Yn,requiredMark:Pn,itemRef:Fi.itemRef,form:ir,feedbackIcons:Ln}),[Li,Zt,Rn,An,Un,Yn,Pn,ir,Ln]);be.useImperativeHandle(wt,()=>ir);const hr=(zr,On)=>{if(zr){let wr={block:"nearest"};typeof zr=="object"&&(wr=zr),ir.scrollToField(On,wr)}},In=zr=>{if(si==null||si(zr),zr.errorFields.length){const On=zr.errorFields[0].name;if(qn!==void 0){hr(qn,On);return}un&&un.scrollToFirstError!==void 0&&hr(un.scrollToFirstError,On)}};return Ti(be.createElement(it.n,{disabled:Kt},be.createElement(yt.q,{size:lr},be.createElement(he.RV,Object.assign({},{validateMessages:Di}),be.createElement(he.q3.Provider,{value:Wi},be.createElement(ct.default,Object.assign({id:Li},Ui,{name:Li,onFinishFailed:In,form:ir,style:Object.assign(Object.assign({},un==null?void 0:un.style),Bi),className:Mi})))))))};var Ut=be.forwardRef($t),Wt=Ee(41799),Xt=Ee(8654),mt=Ee(92343),ze=Ee(11592);function Be(Je){if(typeof Je=="function")return Je;const wt=(0,ze.Z)(Je);return wt.length<=1?wt[0]:wt}const et=()=>{const{status:Je,errors:wt=[],warnings:Nt=[]}=(0,be.useContext)(he.aM);return{status:Je,errors:wt,warnings:Nt}};et.Context=he.aM;var qe=et,Ue=Ee(16089);function Xe(Je){const[wt,Nt]=be.useState(Je),kt=(0,be.useRef)(null),_t=(0,be.useRef)([]),un=(0,be.useRef)(!1);be.useEffect(()=>(un.current=!1,()=>{un.current=!0,Ue.Z.cancel(kt.current),kt.current=null}),[]);function wn(Bn){un.current||(kt.current===null&&(_t.current=[],kt.current=(0,Ue.Z)(()=>{kt.current=null,Nt(zn=>{let At=zn;return _t.current.forEach(Kt=>{At=Kt(At)}),At})})),_t.current.push(Bn))}return[wt,wn]}function Re(){const{itemRef:Je}=be.useContext(he.q3),wt=be.useRef({});function Nt(kt,_t){const un=_t&&typeof _t=="object"&&_t.ref,wn=kt.join("_");return(wt.current.name!==wn||wt.current.originRef!==un)&&(wt.current.name=wn,wt.current.originRef=un,wt.current.ref=(0,Xt.sQ)(Je(kt),un)),wt.current.ref}return Nt}var Ae=Ee(29194),Ge=Ee(34280),Ke=Ee(2738),Ze=Ee(27382),at=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:_t,errors:un,warnings:wn,_internalItemRender:Bn,extra:zn,help:At,fieldId:Kt,marginBottom:Sn,onErrorVisibleChanged:kn}=Je,Zt=`${wt}-item`,rn=be.useContext(he.q3),Rn=kt||rn.wrapperCol||{},An=Ie()(`${Zt}-control`,Rn.className),Qn=be.useMemo(()=>Object.assign({},rn),[rn]);delete Qn.labelCol,delete Qn.wrapperCol;const Un=be.createElement("div",{className:`${Zt}-control-input`},be.createElement("div",{className:`${Zt}-control-input-content`},_t)),qn=be.useMemo(()=>({prefixCls:wt,status:Nt}),[wt,Nt]),Nn=Sn!==null||un.length||wn.length?be.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},be.createElement(he.Rk.Provider,{value:qn},be.createElement(gt,{fieldId:Kt,errors:un,warnings:wn,help:At,helpStatus:Nt,className:`${Zt}-explain-connected`,onVisibleChanged:kn})),!!Sn&&be.createElement("div",{style:{width:0,height:Sn}})):null,si={};Kt&&(si.id=`${Kt}_extra`);const Li=zn?be.createElement("div",Object.assign({},si,{className:`${Zt}-extra`}),zn):null,Bi=Bn&&Bn.mark==="pro_table_render"&&Bn.render?Bn.render(Je,{input:Un,errorList:Nn,extra:Li}):be.createElement(be.Fragment,null,Un,Nn,Li);return be.createElement(he.q3.Provider,{value:Qn},be.createElement(at.Z,Object.assign({},Rn,{className:An}),Bi),be.createElement(tn,{prefixCls:wt}))},pn=Ee(61485),Mn=Ee(31724),hn=Ee(9763),En=Ee(6848),Wn=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 _t=0,kt=Object.getOwnPropertySymbols(Je);_t<kt.length;_t++)wt.indexOf(kt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Je,kt[_t])&&(Nt[kt[_t]]=Je[kt[_t]]);return Nt};function Tn(Je){return Je?typeof Je=="object"&&!be.isValidElement(Je)?Je:{title:Je}:null}var ri=Je=>{let{prefixCls:wt,label:Nt,htmlFor:kt,labelCol:_t,labelAlign:un,colon:wn,required:Bn,requiredMark:zn,tooltip:At}=Je;var Kt;const[Sn]=(0,hn.Z)("Form"),{vertical:kn,labelAlign:Zt,labelCol:rn,labelWrap:Rn,colon:An}=be.useContext(he.q3);if(!Nt)return null;const Qn=_t||rn||{},Un=un||Zt,qn=`${wt}-item-label`,Nn=Ie()(qn,Un==="left"&&`${qn}-left`,Qn.className,{[`${qn}-wrap`]:!!Rn});let si=Nt;const Li=wn===!0||An!==!1&&wn!==!1;Li&&!kn&&typeof Nt=="string"&&Nt.trim()!==""&&(si=Nt.replace(/[:|:]\s*$/,""));const Ln=Tn(At);if(Ln){const{icon:Pn=be.createElement(pn.Z,null)}=Ln,Yn=Wn(Ln,["icon"]),ui=be.createElement(En.Z,Object.assign({},Yn),be.cloneElement(Pn,{className:`${wt}-item-tooltip`,title:""}));si=be.createElement(be.Fragment,null,si,ui)}const Ui=zn==="optional",lr=typeof zn=="function";lr?si=zn(si,{required:!!Bn}):Ui&&!Bn&&(si=be.createElement(be.Fragment,null,si,be.createElement("span",{className:`${wt}-item-optional`,title:""},(Sn==null?void 0:Sn.optional)||((Kt=Mn.Z.Form)===null||Kt===void 0?void 0:Kt.optional))));const Di=Ie()({[`${wt}-item-required`]:Bn,[`${wt}-item-required-mark-optional`]:Ui||lr,[`${wt}-item-no-colon`]:!Li});return be.createElement(at.Z,Object.assign({},Qn,{className:Nn}),be.createElement("label",{htmlFor:kt,className:Di,title:typeof Nt=="string"?Nt:""},si))},Ii=Ee(29679),bi=Ee(19248),nr=Ee(96512),Ji=Ee(58617);const gr={success:Ii.Z,warning:nr.Z,error:bi.Z,validating:Ji.Z};function cr(Je){let{children:wt,errors:Nt,warnings:kt,hasFeedback:_t,validateStatus:un,prefixCls:wn,meta:Bn,noStyle:zn}=Je;const At=`${wn}-item`,{feedbackIcons:Kt}=be.useContext(he.q3),Sn=Et(Nt,kt,Bn,null,!!_t,un),{isFormItemInput:kn,status:Zt}=be.useContext(he.aM),rn=be.useMemo(()=>{var Rn;let An;if(_t){const qn=_t!==!0&&_t.icons||Kt,Nn=Sn&&((Rn=qn==null?void 0:qn({status:Sn,errors:Nt,warnings:kt}))===null||Rn===void 0?void 0:Rn[Sn]),si=Sn&&gr[Sn];An=Nn!==!1&&si?be.createElement("span",{className:Ie()(`${At}-feedback-icon`,`${At}-feedback-icon-${Sn}`)},Nn||be.createElement(si,null)):null}let Qn=!0,Un=Sn||"";return zn&&(Qn=kn,Un=(Sn!=null?Sn:Zt)||""),{status:Un,errors:Nt,warnings:kt,hasFeedback:!!_t,feedbackIcon:An,isFormItemInput:Qn}},[Sn,_t,zn,kn,Zt]);return be.createElement(he.aM.Provider,{value:rn},wt)}var eo=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 _t=0,kt=Object.getOwnPropertySymbols(Je);_t<kt.length;_t++)wt.indexOf(kt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Je,kt[_t])&&(Nt[kt[_t]]=Je[kt[_t]]);return Nt};function ro(Je){const{prefixCls:wt,className:Nt,rootClassName:kt,style:_t,help:un,errors:wn,warnings:Bn,validateStatus:zn,meta:At,hasFeedback:Kt,hidden:Sn,children:kn,fieldId:Zt,required:rn,isRequired:Rn,onSubItemMetaChange:An}=Je,Qn=eo(Je,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Un=`${wt}-item`,{requiredMark:qn}=be.useContext(he.q3),Nn=be.useRef(null),si=Se(wn),Li=Se(Bn),Bi=un!=null,Ln=!!(Bi||wn.length||Bn.length),Ui=!!Nn.current&&(0,Ae.Z)(Nn.current),[lr,Di]=be.useState(null);(0,Ge.Z)(()=>{if(Ln&&Nn.current){const pi=getComputedStyle(Nn.current);Di(parseInt(pi.marginBottom,10))}},[Ln,Ui]);const Pn=pi=>{pi||Di(null)},ui=function(){let pi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Mi=pi?si:At.errors,ir=pi?Li:At.warnings;return Et(Mi,ir,At,"",!!Kt,zn)}(),Ti=Ie()(Un,Nt,kt,{[`${Un}-with-help`]:Bi||si.length||Li.length,[`${Un}-has-feedback`]:ui&&Kt,[`${Un}-has-success`]:ui==="success",[`${Un}-has-warning`]:ui==="warning",[`${Un}-has-error`]:ui==="error",[`${Un}-is-validating`]:ui==="validating",[`${Un}-hidden`]:Sn});return be.createElement("div",{className:Ti,style:_t,ref:Nn},be.createElement(Ze.Z,Object.assign({className:`${Un}-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(ri,Object.assign({htmlFor:Zt},Je,{requiredMark:qn,required:rn!=null?rn:Rn,prefixCls:wt})),be.createElement(Jt,Object.assign({},Je,At,{errors:si,warnings:Li,prefixCls:wt,status:ui,help:un,marginBottom:lr,onErrorVisibleChanged:Pn}),be.createElement(he.qI.Provider,{value:An},be.createElement(cr,{prefixCls:wt,meta:At,errors:At.errors,warnings:At.warnings,hasFeedback:Kt,validateStatus:ui},kn)))),!!lr&&be.createElement("div",{className:`${Un}-margin-offset`,style:{marginBottom:-lr}}))}const hi="__SPLIT__",Pr=null,Hi=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 st(Je){return Je!=null}function Rr(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Er(Je){const{name:wt,noStyle:Nt,className:kt,dependencies:_t,prefixCls:un,shouldUpdate:wn,rules:Bn,children:zn,required:At,label:Kt,messageVariables:Sn,trigger:kn="onChange",validateTrigger:Zt,hidden:rn,help:Rn}=Je,{getPrefixCls:An}=be.useContext(Ct.E_),{name:Qn}=be.useContext(he.q3),Un=Be(zn),qn=typeof Un=="function",Nn=be.useContext(he.qI),{validateTrigger:si}=be.useContext(ct.FieldContext),Li=Zt!==void 0?Zt:si,Bi=st(wt),Ln=An("form",un),[Ui,lr]=je(Ln),Di=be.useContext(ct.ListContext),Pn=be.useRef(),[Yn,ui]=Xe({}),[Ti,pi]=(0,Wt.Z)(()=>Rr()),Mi=On=>{const wr=Di==null?void 0:Di.getKey(On.name);if(pi(On.destroy?Rr():On,!0),Nt&&Rn!==!1&&Nn){let po=On.name;if(On.destroy)po=Pn.current||po;else if(wr!==void 0){const[Ar,To]=wr;po=[Ar].concat((0,Le.Z)(To)),Pn.current=po}Nn(On,po)}},ir=(On,wr)=>{ui(po=>{const Ar=Object.assign({},po),oo=[].concat((0,Le.Z)(On.name.slice(0,-1)),(0,Le.Z)(wr)).join(hi);return On.destroy?delete Ar[oo]:Ar[oo]=On,Ar})},[Fi,Wi]=be.useMemo(()=>{const On=(0,Le.Z)(Ti.errors),wr=(0,Le.Z)(Ti.warnings);return Object.values(Yn).forEach(po=>{On.push.apply(On,(0,Le.Z)(po.errors||[])),wr.push.apply(wr,(0,Le.Z)(po.warnings||[]))}),[On,wr]},[Yn,Ti.errors,Ti.warnings]),hr=Re();function In(On,wr,po){return Nt&&!rn?be.createElement(cr,{prefixCls:Ln,hasFeedback:Je.hasFeedback,validateStatus:Je.validateStatus,meta:Ti,errors:Fi,warnings:Wi,noStyle:!0},On):be.createElement(ro,Object.assign({key:"row"},Je,{className:Ie()(kt,lr),prefixCls:Ln,fieldId:wr,isRequired:po,errors:Fi,warnings:Wi,meta:Ti,onSubItemMetaChange:ir}),On)}if(!Bi&&!qn&&!_t)return Ui(In(Un));let zr={};return typeof Kt=="string"?zr.label=Kt:wt&&(zr.label=String(wt)),Sn&&(zr=Object.assign(Object.assign({},zr),Sn)),Ui(be.createElement(ct.Field,Object.assign({},Je,{messageVariables:zr,trigger:kn,validateTrigger:Li,onMetaChange:Mi}),(On,wr,po)=>{const Ar=dt(wt).length&&wr?wr.name:[],To=St(Ar,Qn),oo=At!==void 0?At:!!(Bn&&Bn.some(fr=>{if(fr&&typeof fr=="object"&&fr.required&&!fr.warningOnly)return!0;if(typeof fr=="function"){const Mr=fr(po);return Mr&&Mr.required&&!Mr.warningOnly}return!1})),$i=Object.assign({},On);let Qi=null;if(Array.isArray(Un)&&Bi)Qi=Un;else if(!(qn&&(!(wn||_t)||Bi))){if(!(_t&&!qn&&!Bi))if((0,mt.l$)(Un)){const fr=Object.assign(Object.assign({},Un.props),$i);if(fr.id||(fr.id=To),Rn||Fi.length>0||Wi.length>0||Je.extra){const Tt=[];(Rn||Fi.length>0)&&Tt.push(`${To}_help`),Je.extra&&Tt.push(`${To}_extra`),fr["aria-describedby"]=Tt.join(" ")}Fi.length>0&&(fr["aria-invalid"]="true"),oo&&(fr["aria-required"]="true"),(0,Xt.Yr)(Un)&&(fr.ref=hr(Ar,Un)),new Set([].concat((0,Le.Z)(dt(kn)),(0,Le.Z)(dt(Li)))).forEach(Tt=>{fr[Tt]=function(){for(var Ir,ho,Zo,Po,$o,Yo=arguments.length,Sr=new Array(Yo),yr=0;yr<Yo;yr++)Sr[yr]=arguments[yr];(Zo=$i[Tt])===null||Zo===void 0||(Ir=Zo).call.apply(Ir,[$i].concat(Sr)),($o=(Po=Un.props)[Tt])===null||$o===void 0||(ho=$o).call.apply(ho,[Po].concat(Sr))}});const fi=[fr["aria-required"],fr["aria-invalid"],fr["aria-describedby"]];Qi=be.createElement(Hi,{value:$i[Je.valuePropName||"value"],update:Un,childProps:fi},(0,mt.Tm)(Un,fr))}else qn&&(wn||_t)&&!Bi?Qi=Un(po):Qi=Un}return In(Qi,To,oo)}))}const yo=Er;yo.useStatus=qe;var Zr=yo,ao=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 _t=0,kt=Object.getOwnPropertySymbols(Je);_t<kt.length;_t++)wt.indexOf(kt[_t])<0&&Object.prototype.propertyIsEnumerable.call(Je,kt[_t])&&(Nt[kt[_t]]=Je[kt[_t]]);return Nt},lo=Je=>{var{prefixCls:wt,children:Nt}=Je,kt=ao(Je,["prefixCls","children"]);const{getPrefixCls:_t}=be.useContext(Ct.E_),un=_t("form",wt),wn=be.useMemo(()=>({prefixCls:un,status:"error"}),[un]);return be.createElement(ct.List,Object.assign({},kt),(Bn,zn,At)=>be.createElement(he.Rk.Provider,{value:wn},Nt(Bn.map(Kt=>Object.assign(Object.assign({},Kt),{fieldKey:Kt.key})),zn,{errors:At.errors,warnings:At.warnings})))};function oi(){const{form:Je}=(0,be.useContext)(he.q3);return Je}const $e=Ut;$e.Item=Zr,$e.List=lo,$e.ErrorList=gt,$e.useForm=Bt,$e.useFormInstance=oi,$e.useWatch=ct.useWatch,$e.Provider=he.RV,$e.create=()=>{};var nt=$e},8628:function(bn,qt,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}qt.Z=be},9432:function(bn,qt,Ee){"use strict";Ee.d(qt,{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:We,suffix:gt,allowClear:ct,addonAfter:Ct,addonBefore:it,className:yt,style:ut,styles:Ft,rootClassName:ht,onChange:rt,classNames:dt}=le,St=ee(le,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Et,direction:vt,input:Bt}=Pe.useContext(Se.E_),jt=Et("input",Ce),ln=(0,Pe.useRef)(null),[$t,yn]=(0,ue.ZP)(jt),{compactSize:Ut,compactItemClassnames:Wt}=(0,ve.ri)(jt,vt),Xt=(0,ge.Z)(tn=>{var nn;return(nn=je!=null?je:Ut)!==null&&nn!==void 0?nn:tn}),mt=Pe.useContext(xe.Z),ze=Ve!=null?Ve:mt,{status:Be,hasFeedback:et,feedbackIcon:qe}=(0,Pe.useContext)(ce.aM),Ue=(0,he.F)(Be,Ne),Xe=z(le)||!!et,Re=(0,Pe.useRef)(Xe);(0,Pe.useEffect)(()=>{var tn;Xe&&Re.current,Re.current=Xe},[Xe]);const Ae=(0,de.Z)(ln,!0),Ge=tn=>{Ae(),Qe==null||Qe(tn)},Ke=tn=>{Ae(),We==null||We(tn)},Ze=tn=>{Ae(),rt==null||rt(tn)},at=(et||gt)&&Pe.createElement(Pe.Fragment,null,gt,et&&qe);let xt;return typeof ct=="object"&&(ct!=null&&ct.clearIcon)?xt=ct:ct&&(xt={clearIcon:Pe.createElement(Le.Z,null)}),$t(Pe.createElement(Te.default,Object.assign({ref:(0,be.sQ)(ye,ln),prefixCls:jt,autoComplete:Bt==null?void 0:Bt.autoComplete},St,{disabled:ze,onBlur:Ge,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:at,allowClear:xt,className:Ie()(yt,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`]:Xt==="small",[`${jt}-lg`]:Xt==="large",[`${jt}-rtl`]:vt==="rtl",[`${jt}-borderless`]:!ke},!Xe&&(0,he.Z)(jt,Ue),dt==null?void 0:dt.input,(we=Bt==null?void 0:Bt.classNames)===null||we===void 0?void 0:we.input,yn)}),classes:{affixWrapper:Ie()({[`${jt}-affix-wrapper-sm`]:Xt==="small",[`${jt}-affix-wrapper-lg`]:Xt==="large",[`${jt}-affix-wrapper-rtl`]:vt==="rtl",[`${jt}-affix-wrapper-borderless`]:!ke},(0,he.Z)(`${jt}-affix-wrapper`,Ue,et),yn),wrapper:Ie()({[`${jt}-group-rtl`]:vt==="rtl"},yn),group:Ie()({[`${jt}-group-wrapper-sm`]:Xt==="small",[`${jt}-group-wrapper-lg`]:Xt==="large",[`${jt}-group-wrapper-rtl`]:vt==="rtl",[`${jt}-group-wrapper-disabled`]:ze},(0,he.Z)(`${jt}-group-wrapper`,Ue,et),yn)}})))})},1643:function(bn,qt,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:We}=be.useContext(he.E_),gt=(0,xe.Z)(se),ct=be.useContext(Se.Z),Ct=le!=null?le:ct,{status:it,hasFeedback:yt,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,ln;(0,ce.n)((ln=(jt=ht.current)===null||jt===void 0?void 0:jt.resizableTextArea)===null||ln===void 0?void 0:ln.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[St,Et]=(0,ve.ZP)(rt);return St(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`]:We==="rtl",[`${rt}-affix-wrapper-borderless`]:!ie,[`${rt}-affix-wrapper-sm`]:gt==="small",[`${rt}-affix-wrapper-lg`]:gt==="large",[`${rt}-textarea-show-count`]:Ce},(0,Pe.Z)(`${rt}-affix-wrapper`,Ft),Et)},classNames:Object.assign(Object.assign({},ke),{textarea:Ie()({[`${rt}-borderless`]:!ie,[`${rt}-sm`]:gt==="small",[`${rt}-lg`]:gt==="large"},(0,Pe.Z)(rt,Ft),Et,ke==null?void 0:ke.textarea)}),prefixCls:rt,suffix:yt&&be.createElement("span",{className:`${rt}-textarea-suffix`},ut),showCount:Ce,ref:ht})))});qt.Z=ue},59412:function(bn,qt,Ee){"use strict";Ee.d(qt,{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(bn,qt,Ee){"use strict";Ee.d(qt,{default:function(){return gt}});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:yt,className:ut}=ct,Ft=Ct("input-group",yt),ht=Ct("input"),[rt,dt]=(0,Pe.ZP)(ht),St=me()(Ft,{[`${Ft}-lg`]:ct.size==="large",[`${Ft}-sm`]:ct.size==="small",[`${Ft}-compact`]:ct.compact,[`${Ft}-rtl`]:it==="rtl"},dt,ut),Et=(0,Ie.useContext)(be.aM),vt=(0,Ie.useMemo)(()=>Object.assign(Object.assign({},Et),{isFormItemInput:!1}),[Et]);return rt(Ie.createElement("span",{className:St,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 yt in ct)Object.prototype.hasOwnProperty.call(ct,yt)&&Ct.indexOf(yt)<0&&(it[yt]=ct[yt]);if(ct!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,yt=Object.getOwnPropertySymbols(ct);ut<yt.length;ut++)Ct.indexOf(yt[ut])<0&&Object.prototype.propertyIsEnumerable.call(ct,yt[ut])&&(it[yt[ut]]=ct[yt[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,yt=typeof it=="object"&&it.visible!==void 0,[ut,Ft]=(0,Ie.useState)(()=>yt?it.visible:!1),ht=(0,Ie.useRef)(null);Ie.useEffect(()=>{yt&&Ft(it.visible)},[yt,it]);const rt=(0,ue.Z)(ht),dt=()=>{const{disabled:ze}=ct;ze||(ut&&rt(),Ft(Be=>{var et;const qe=!Be;return typeof it=="object"&&((et=it.onVisibleChange)===null||et===void 0||et.call(it,qe)),qe}))},St=ze=>{const{action:Be="click",iconRender:et=ee}=ct,qe=oe[Be]||"",Ue=et(ut),Xe={[qe]:dt,className:`${ze}-icon`,key:"passwordIcon",onMouseDown:Re=>{Re.preventDefault()},onMouseUp:Re=>{Re.preventDefault()}};return Ie.cloneElement(Ie.isValidElement(Ue)?Ue:Ie.createElement("span",null,Ue),Xe)},{className:Et,prefixCls:vt,inputPrefixCls:Bt,size:jt}=ct,ln=z(ct,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:$t}=Ie.useContext(Te.E_),yn=$t("input",Bt),Ut=$t("input-password",vt),Wt=it&&St(Ut),Xt=me()(Ut,Et,{[`${Ut}-${jt}`]:!!jt}),mt=Object.assign(Object.assign({},(0,ve.Z)(ln,["suffix","iconRender","visibilityToggle"])),{type:ut?"text":"password",className:Xt,prefixCls:yn,suffix:Wt});return jt&&(mt.size=jt),Ie.createElement(xe.Z,Object.assign({ref:(0,de.sQ)(Ct,ht)},mt))}),le=Ee(47472),ye=Ee(92343),we=Ee(3113),Ce=Ee(19716),ke=Ee(33234),Ne=function(ct,Ct){var it={};for(var yt in ct)Object.prototype.hasOwnProperty.call(ct,yt)&&Ct.indexOf(yt)<0&&(it[yt]=ct[yt]);if(ct!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,yt=Object.getOwnPropertySymbols(ct);ut<yt.length;ut++)Ct.indexOf(yt[ut])<0&&Object.prototype.propertyIsEnumerable.call(ct,yt[ut])&&(it[yt[ut]]=ct[yt[ut]]);return it},Ve=Ie.forwardRef((ct,Ct)=>{const{prefixCls:it,inputPrefixCls:yt,className:ut,size:Ft,suffix:ht,enterButton:rt=!1,addonAfter:dt,loading:St,disabled:Et,onSearch:vt,onChange:Bt,onCompositionStart:jt,onCompositionEnd:ln}=ct,$t=Ne(ct,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:yn,direction:Ut}=Ie.useContext(Te.E_),Wt=Ie.useRef(!1),Xt=yn("input-search",it),mt=yn("input",yt),{compactSize:ze}=(0,ke.ri)(Xt,Ut),Be=(0,Ce.Z)(Jt=>{var pn;return(pn=Ft!=null?Ft:ze)!==null&&pn!==void 0?pn:Jt}),et=Ie.useRef(null),qe=Jt=>{Jt&&Jt.target&&Jt.type==="click"&&vt&&vt(Jt.target.value,Jt,{source:"clear"}),Bt&&Bt(Jt)},Ue=Jt=>{var pn;document.activeElement===((pn=et.current)===null||pn===void 0?void 0:pn.input)&&Jt.preventDefault()},Xe=Jt=>{var pn,Mn;vt&&vt((Mn=(pn=et.current)===null||pn===void 0?void 0:pn.input)===null||Mn===void 0?void 0:Mn.value,Jt,{source:"input"})},Re=Jt=>{Wt.current||St||Xe(Jt)},Ae=typeof rt=="boolean"?Ie.createElement(le.Z,null):null,Ge=`${Xt}-button`;let Ke;const Ze=rt||{},at=Ze.type&&Ze.type.__ANT_BUTTON===!0;at||Ze.type==="button"?Ke=(0,ye.Tm)(Ze,Object.assign({onMouseDown:Ue,onClick:Jt=>{var pn,Mn;(Mn=(pn=Ze==null?void 0:Ze.props)===null||pn===void 0?void 0:pn.onClick)===null||Mn===void 0||Mn.call(pn,Jt),Xe(Jt)},key:"enterButton"},at?{className:Ge,size:Be}:{})):Ke=Ie.createElement(we.ZP,{className:Ge,type:rt?"primary":void 0,size:Be,disabled:Et,key:"enterButton",onMouseDown:Ue,onClick:Xe,loading:St,icon:Ae},rt),dt&&(Ke=[Ke,(0,ye.Tm)(dt,{key:"addonAfter"})]);const xt=me()(Xt,{[`${Xt}-rtl`]:Ut==="rtl",[`${Xt}-${Be}`]:!!Be,[`${Xt}-with-button`]:!!rt},ut),tn=Jt=>{Wt.current=!0,jt==null||jt(Jt)},nn=Jt=>{Wt.current=!1,ln==null||ln(Jt)};return Ie.createElement(xe.Z,Object.assign({ref:(0,de.sQ)(et,Ct),onPressEnter:Re},$t,{size:Be,onCompositionStart:tn,onCompositionEnd:nn,prefixCls:mt,addonAfter:Ke,suffix:ht,onChange:qe,className:xt,disabled:Et}))}),Qe=Ee(1643);const We=xe.Z;We.Group=Se,We.Search=Ve,We.TextArea=Qe.Z,We.Password=se;var gt=We},45818:function(bn,qt,Ee){"use strict";Ee.d(qt,{D:function(){return le},Z:function(){return Ce}});var Le=Ee(92413),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:We,defaultCollapsed:gt=!1,theme:ct="dark",style:Ct={},collapsible:it=!1,reverseArrow:yt=!1,width:ut=200,collapsedWidth:Ft=80,zeroWidthTriggerStyle:ht,breakpoint:rt,onCollapse:dt,onBreakpoint:St}=ke,Et=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:gt),[ln,$t]=(0,me.useState)(!1);(0,me.useEffect)(()=>{"collapsed"in ke&&jt(ke.collapsed)},[ke.collapsed]);const yn=(Be,et)=>{"collapsed"in ke||jt(Be),dt==null||dt(Be,et)},Ut=(0,me.useRef)();Ut.current=Be=>{$t(Be.matches),St==null||St(Be.matches),Bt!==Be.matches&&yn(Be.matches,"responsive")},(0,me.useEffect)(()=>{function Be(qe){return Ut.current(qe)}let et;if(typeof window!="undefined"){const{matchMedia:qe}=window;if(qe&&rt&&rt in se){et=qe(`(max-width: ${se[rt]})`);try{et.addEventListener("change",Be)}catch(Ue){et.addListener(Be)}Be(et)}}return()=>{try{et==null||et.removeEventListener("change",Be)}catch(qe){et==null||et.removeListener(Be)}}},[rt]),(0,me.useEffect)(()=>{const Be=ye("ant-sider-");return vt.addSider(Be),()=>vt.removeSider(Be)},[]);const Wt=()=>{yn(!Bt,"clickTrigger")},{getPrefixCls:Xt}=(0,me.useContext)(ee.E_),mt=()=>{const Be=Xt("layout-sider",je),et=(0,de.Z)(Et,["collapsed"]),qe=Bt?Ft:ut,Ue=z(qe)?`${qe}px`:String(qe),Xe=parseFloat(String(Ft||0))===0?me.createElement("span",{onClick:Wt,className:ve()(`${Be}-zero-width-trigger`,`${Be}-zero-width-trigger-${yt?"right":"left"}`),style:ht},Qe||me.createElement(Se,null)):null,Ge={expanded:yt?me.createElement(ge.Z,null):me.createElement(xe.Z,null),collapsed:yt?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:Ue}},Qe||Ge):null,Ze=Object.assign(Object.assign({},Ct),{flex:`0 0 ${Ue}`,maxWidth:Ue,minWidth:Ue,width:Ue}),at=ve()(Be,`${Be}-${ct}`,{[`${Be}-collapsed`]:!!Bt,[`${Be}-has-trigger`]:it&&Qe!==null&&!Xe,[`${Be}-below`]:!!ln,[`${Be}-zero-width`]:parseFloat(Ue)===0},Ve);return me.createElement("aside",Object.assign({className:at},et,{style:Ze,ref:Ne}),me.createElement("div",{className:`${Be}-children`},We),it||ln&&Xe?Ke:null)},ze=me.useMemo(()=>({siderCollapsed:Bt}),[Bt]);return me.createElement(le.Provider,{value:ze},mt())})},84966:function(bn,qt,Ee){"use strict";Ee.d(qt,{VY:function(){return le},$_:function(){return se},h4:function(){return ie},Gs:function(){return de},ZP:function(){return ye}});var Le=Ee(26407),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:We,headerPadding:gt,headerColor:ct,footerPadding:Ct,triggerHeight:it,zeroTriggerHeight:yt,zeroTriggerWidth:ut,motionDurationMid:Ft,motionDurationSlow:ht,fontSize:rt,borderRadius:dt,bodyBg:St,headerBg:Et,siderBg:vt}=we;return{[ke]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:St,"&, *":{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:We,insetInlineEnd:-ut,zIndex:1,width:ut,height:yt,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:We,padding:gt,color:ct,lineHeight:`${We}px`,background:Et,[`${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:We,colorBgContainer:gt}=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:We,zeroTriggerWidth:Ne,zeroTriggerHeight:Ne,lightSiderBg:gt,lightTriggerBg:gt,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,We)=>be.createElement(je,Object.assign({ref:We,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:We}=be.useContext(Pe.E_),gt=We("layout",ke),[ct,Ct]=ce(gt),it=Ne?`${gt}-${Ne}`:gt;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:We,children:gt,hasSider:ct,tagName:Ct,style:it}=we,yt=ve(we,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),ut=(0,Te.Z)(yt,["suffixCls"]),{getPrefixCls:Ft,layout:ht}=be.useContext(Pe.E_),rt=Ft("layout",Ve),[dt,St]=ce(rt),Et=Ie()(rt,{[`${rt}-has-sider`]:typeof ct=="boolean"?ct:Ne.length>0,[`${rt}-rtl`]:ke==="rtl"},ht==null?void 0:ht.className,Qe,We,St),vt=be.useMemo(()=>({siderHook:{addSider:Bt=>{je(jt=>[].concat((0,Le.Z)(jt),[Bt]))},removeSider:Bt=>{je(jt=>jt.filter(ln=>ln!==Bt))}}}),[]);return dt(be.createElement(de.Provider,{value:vt},be.createElement(Ct,Object.assign({ref:Ce,className:Et,style:Object.assign(Object.assign({},ht==null?void 0:ht.style),it)},ut),gt)))}),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(bn,qt,Ee){"use strict";Ee.d(qt,{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))});qt.Z=be},20834:function(bn,qt,Ee){"use strict";Ee.d(qt,{default:function(){return ze}});var Le=Ee(15285),me=Ee(59301),Ie=Ee(45818),Te=Ee(92310),be=Ee.n(Te),Pe=Ee(36355),he=function(Be,et){var qe={};for(var Ue in Be)Object.prototype.hasOwnProperty.call(Be,Ue)&&et.indexOf(Ue)<0&&(qe[Ue]=Be[Ue]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,Ue=Object.getOwnPropertySymbols(Be);Xe<Ue.length;Xe++)et.indexOf(Ue[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Be,Ue[Xe])&&(qe[Ue[Xe]]=Be[Ue[Xe]]);return qe},xe=Be=>{const{prefixCls:et,className:qe,dashed:Ue}=Be,Xe=he(Be,["prefixCls","className","dashed"]),{getPrefixCls:Re}=me.useContext(Pe.E_),Ae=Re("menu",et),Ge=be()({[`${Ae}-item-divider-dashed`]:!!Ue},qe);return me.createElement(Le.iz,Object.assign({className:Ge},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 et;const{className:qe,children:Ue,icon:Xe,title:Re,danger:Ae}=Be,{prefixCls:Ge,firstLevel:Ke,direction:Ze,disableMenuItemTitleTooltip:at,inlineCollapsed:xt}=me.useContext(z),tn=En=>{const Wn=me.createElement("span",{className:`${Ge}-title-content`},Ue);return(!Xe||(0,de.l$)(Ue)&&Ue.type==="span")&&Ue&&En&&Ke&&typeof Ue=="string"?me.createElement("div",{className:`${Ge}-inline-collapsed-noicon`},Ue.charAt(0)):Wn},{siderCollapsed:nn}=me.useContext(Ie.D);let Jt=Re;typeof Re=="undefined"?Jt=Ke?Ue:"":Re===!1&&(Jt="");const pn={title:Jt};!nn&&!xt&&(pn.title=null,pn.open=!1);const Mn=(0,ge.Z)(Ue).length;let hn=me.createElement(Le.ck,Object.assign({},(0,ce.Z)(Be,["title","icon","danger"]),{className:be()({[`${Ge}-item-danger`]:Ae,[`${Ge}-item-only-child`]:(Xe?Mn+1:Mn)===1},qe),title:typeof Re=="string"?Re:void 0}),(0,de.Tm)(Xe,{className:be()((0,de.l$)(Xe)?(et=Xe.props)===null||et===void 0?void 0:et.className:"",`${Ge}-item-icon`)}),tn(xt));return at||(hn=me.createElement(ve.Z,Object.assign({},pn,{placement:Ze==="rtl"?"left":"right",overlayClassName:`${Ge}-inline-collapsed-tooltip`}),hn)),hn},se=Be=>{var et;const{popupClassName:qe,icon:Ue,title:Xe,theme:Re}=Be,Ae=me.useContext(z),{prefixCls:Ge,inlineCollapsed:Ke,theme:Ze}=Ae,at=(0,Le.Xl)();let xt;if(!Ue)xt=Ke&&!at.length&&Xe&&typeof Xe=="string"?me.createElement("div",{className:`${Ge}-inline-collapsed-noicon`},Xe.charAt(0)):me.createElement("span",{className:`${Ge}-title-content`},Xe);else{const nn=(0,de.l$)(Xe)&&Xe.type==="span";xt=me.createElement(me.Fragment,null,(0,de.Tm)(Ue,{className:be()((0,de.l$)(Ue)?(et=Ue.props)===null||et===void 0?void 0:et.className:"",`${Ge}-item-icon`)}),nn?Xe:me.createElement("span",{className:`${Ge}-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()(Ge,qe,`${Ge}-${Re||Ze}`)})))},le=Ee(18785),ye=Ee(70425),we=Ee(62892),Ce=Ee(40875),ke=function(Be,et){var qe={};for(var Ue in Be)Object.prototype.hasOwnProperty.call(Be,Ue)&&et.indexOf(Ue)<0&&(qe[Ue]=Be[Ue]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,Ue=Object.getOwnPropertySymbols(Be);Xe<Ue.length;Xe++)et.indexOf(Ue[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Be,Ue[Xe])&&(qe[Ue[Xe]]=Be[Ue[Xe]]);return qe};function Ne(Be){return(Be||[]).map((et,qe)=>{if(et&&typeof et=="object"){const Ue=et,{label:Xe,children:Re,key:Ae,type:Ge}=Ue,Ke=ke(Ue,["label","children","key","type"]),Ze=Ae!=null?Ae:`tmp-${qe}`;return Re||Ge==="group"?Ge==="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)):Ge==="divider"?me.createElement(xe,Object.assign({key:Ze},Ke)):me.createElement(oe,Object.assign({key:Ze},Ke),Xe)}return null}).filter(et=>et)}function je(Be){return me.useMemo(()=>Be&&Ne(Be),[Be])}var Ve=Ee(64993),Qe=Ee(17313),We=Ee(8378),gt=Ee(13826),ct=Ee(29878),Ct=Ee(83116),it=Ee(37613),ut=Be=>{const{componentCls:et,motionDurationSlow:qe,horizontalLineHeight:Ue,colorSplit:Xe,lineWidth:Re,lineType:Ae,itemPaddingInline:Ge}=Be;return{[`${et}-horizontal`]:{lineHeight:Ue,border:0,borderBottom:`${Re}px ${Ae} ${Xe}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${et}-item, ${et}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Ge},[`> ${et}-item:hover,
|
|
|
> ${et}-item-active,
|
|
|
> ${et}-submenu ${et}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${et}-item, ${et}-submenu-title`]:{transition:[`border-color ${qe}`,`background ${qe}`].join(",")},[`${et}-submenu-arrow`]:{display:"none"}}}},ht=Be=>{let{componentCls:et,menuArrowOffset:qe}=Be;return{[`${et}-rtl`]:{direction:"rtl"},[`${et}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${et}-rtl${et}-vertical,
|
|
|
${et}-submenu-rtl ${et}-vertical`]:{[`${et}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${qe})`},"&::after":{transform:`rotate(45deg) translateY(${qe})`}}}}};const rt=Be=>Object.assign({},(0,Qe.oN)(Be));var St=(Be,et)=>{const{componentCls:qe,itemColor:Ue,itemSelectedColor:Xe,groupTitleColor:Re,itemBg:Ae,subMenuItemBg:Ge,itemSelectedBg:Ke,activeBarHeight:Ze,activeBarWidth:at,activeBarBorderWidth:xt,motionDurationSlow:tn,motionEaseInOut:nn,motionEaseOut:Jt,itemPaddingInline:pn,motionDurationMid:Mn,itemHoverColor:hn,lineType:En,colorSplit:Wn,itemDisabledColor:Tn,dangerItemColor:ci,dangerItemHoverColor:ri,dangerItemSelectedColor:Ii,dangerItemActiveBg:bi,dangerItemSelectedBg:nr,itemHoverBg:Ji,itemActiveBg:gr,menuSubMenuBg:cr,horizontalItemSelectedColor:eo,horizontalItemSelectedBg:ro,horizontalItemBorderRadius:hi,horizontalItemHoverBg:Pr,popupBg:Hi}=Be;return{[`${qe}-${et}, ${qe}-${et} > ${qe}`]:{color:Ue,background:Ae,[`&${qe}-root:focus-visible`]:Object.assign({},rt(Be)),[`${qe}-item-group-title`]:{color:Re},[`${qe}-submenu-selected`]:{[`> ${qe}-submenu-title`]:{color:Xe}},[`${qe}-item-disabled, ${qe}-submenu-disabled`]:{color:`${Tn} !important`},[`${qe}-item:not(${qe}-item-selected):not(${qe}-submenu-selected)`]:{[`&:hover, > ${qe}-submenu-title:hover`]:{color:hn}},[`&:not(${qe}-horizontal)`]:{[`${qe}-item:not(${qe}-item-selected)`]:{"&:hover":{backgroundColor:Ji},"&:active":{backgroundColor:gr}},[`${qe}-submenu-title`]:{"&:hover":{backgroundColor:Ji},"&:active":{backgroundColor:gr}}},[`${qe}-item-danger`]:{color:ci,[`&${qe}-item:hover`]:{[`&:not(${qe}-item-selected):not(${qe}-submenu-selected)`]:{color:ri}},[`&${qe}-item:active`]:{background:bi}},[`${qe}-item a`]:{"&, &:hover":{color:"inherit"}},[`${qe}-item-selected`]:{color:Xe,[`&${qe}-item-danger`]:{color:Ii},"a, a:hover":{color:"inherit"}},[`& ${qe}-item-selected`]:{backgroundColor:Ke,[`&${qe}-item-danger`]:{backgroundColor:nr}},[`${qe}-item, ${qe}-submenu-title`]:{[`&:not(${qe}-item-disabled):focus-visible`]:Object.assign({},rt(Be))},[`&${qe}-submenu > ${qe}`]:{backgroundColor:cr},[`&${qe}-popup > ${qe}`]:{backgroundColor:Hi},[`&${qe}-horizontal`]:Object.assign(Object.assign({},et==="dark"?{borderBottom:0}:{}),{[`> ${qe}-item, > ${qe}-submenu`]:{top:xt,marginTop:-xt,marginBottom:0,borderRadius:hi,"&::after":{position:"absolute",insetInline:pn,bottom:0,borderBottom:`${Ze}px solid transparent`,transition:`border-color ${tn} ${nn}`,content:'""'},"&:hover, &-active, &-open":{background:Pr,"&::after":{borderBottomWidth:Ze,borderBottomColor:eo}},"&-selected":{color:eo,backgroundColor:ro,"&:hover":{backgroundColor:ro},"&::after":{borderBottomWidth:Ze,borderBottomColor:eo}}}}),[`&${qe}-root`]:{[`&${qe}-inline, &${qe}-vertical`]:{borderInlineEnd:`${xt}px ${En} ${Wn}`}},[`&${qe}-inline`]:{[`${qe}-sub${qe}-inline`]:{background:Ge},[`${qe}-item, ${qe}-submenu-title`]:xt&&at?{width:`calc(100% + ${xt}px)`}:{},[`${qe}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${at}px solid ${Xe}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Mn} ${Jt}`,`opacity ${Mn} ${Jt}`].join(","),content:'""'},[`&${qe}-item-danger`]:{"&::after":{borderInlineEndColor:Ii}}},[`${qe}-selected, ${qe}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Mn} ${nn}`,`opacity ${Mn} ${nn}`].join(",")}}}}}};const Et=Be=>{const{componentCls:et,itemHeight:qe,itemMarginInline:Ue,padding:Xe,menuArrowSize:Re,marginXS:Ae,itemMarginBlock:Ge}=Be,Ke=Xe+Re+Ae;return{[`${et}-item`]:{position:"relative",overflow:"hidden"},[`${et}-item, ${et}-submenu-title`]:{height:qe,lineHeight:`${qe}px`,paddingInline:Xe,overflow:"hidden",textOverflow:"ellipsis",marginInline:Ue,marginBlock:Ge,width:`calc(100% - ${Ue*2}px)`},[`> ${et}-item,
|
|
|
> ${et}-submenu > ${et}-submenu-title`]:{height:qe,lineHeight:`${qe}px`},[`${et}-item-group-list ${et}-submenu-title,
|
|
|
${et}-submenu-title`]:{paddingInlineEnd:Ke}}};var Bt=Be=>{const{componentCls:et,iconCls:qe,itemHeight:Ue,colorTextLightSolid:Xe,dropdownWidth:Re,controlHeightLG:Ae,motionDurationMid:Ge,motionEaseOut:Ke,paddingXL:Ze,itemMarginInline:at,fontSizeLG:xt,motionDurationSlow:tn,paddingXS:nn,boxShadowSecondary:Jt,collapsedWidth:pn,collapsedIconSize:Mn}=Be,hn={height:Ue,lineHeight:`${Ue}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[et]:{"&-inline, &-vertical":Object.assign({[`&${et}-root`]:{boxShadow:"none"}},Et(Be))},[`${et}-submenu-popup`]:{[`${et}-vertical`]:Object.assign(Object.assign({},Et(Be)),{boxShadow:Jt})}},{[`${et}-submenu-popup ${et}-vertical${et}-sub`]:{minWidth:Re,maxHeight:`calc(100vh - ${Ae*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${et}-inline`]:{width:"100%",[`&${et}-root`]:{[`${et}-item, ${et}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${tn}`,`background ${tn}`,`padding ${Ge} ${Ke}`].join(","),[`> ${et}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${et}-sub${et}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${et}-submenu > ${et}-submenu-title`]:hn,[`& ${et}-item-group-title`]:{paddingInlineStart:Ze}},[`${et}-item`]:hn}},{[`${et}-inline-collapsed`]:{width:pn,[`&${et}-root`]:{[`${et}-item, ${et}-submenu ${et}-submenu-title`]:{[`> ${et}-inline-collapsed-noicon`]:{fontSize:xt,textAlign:"center"}}},[`> ${et}-item,
|
|
|
> ${et}-item-group > ${et}-item-group-list > ${et}-item,
|
|
|
> ${et}-item-group > ${et}-item-group-list > ${et}-submenu > ${et}-submenu-title,
|
|
|
> ${et}-submenu > ${et}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${xt/2}px - ${at}px)`,textOverflow:"clip",[`
|
|
|
${et}-submenu-arrow,
|
|
|
${et}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${et}-item-icon, ${qe}`]:{margin:0,fontSize:Mn,lineHeight:`${Ue}px`,"+ span":{display:"inline-block",opacity:0}}},[`${et}-item-icon, ${qe}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${et}-item-icon, ${qe}`]:{display:"none"},"a, a:hover":{color:Xe}},[`${et}-item-group-title`]:Object.assign(Object.assign({},Qe.vS),{paddingInline:nn})}}]};const jt=Be=>{const{componentCls:et,motionDurationSlow:qe,motionDurationMid:Ue,motionEaseInOut:Xe,motionEaseOut:Re,iconCls:Ae,iconSize:Ge,iconMarginInlineEnd:Ke}=Be;return{[`${et}-item, ${et}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${qe}`,`background ${qe}`,`padding ${qe} ${Xe}`].join(","),[`${et}-item-icon, ${Ae}`]:{minWidth:Ge,fontSize:Ge,transition:[`font-size ${Ue} ${Re}`,`margin ${qe} ${Xe}`,`color ${qe}`].join(","),"+ span":{marginInlineStart:Ke,opacity:1,transition:[`opacity ${qe} ${Xe}`,`margin ${qe}`,`color ${qe}`].join(",")}},[`${et}-item-icon`]:Object.assign({},(0,Qe.Ro)()),[`&${et}-item-only-child`]:{[`> ${Ae}, > ${et}-item-icon`]:{marginInlineEnd:0}}},[`${et}-item-disabled, ${et}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${et}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},ln=Be=>{const{componentCls:et,motionDurationSlow:qe,motionEaseInOut:Ue,borderRadius:Xe,menuArrowSize:Re,menuArrowOffset:Ae}=Be;return{[`${et}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Be.margin,width:Re,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${qe} ${Ue}, opacity ${qe}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Re*.6,height:Re*.15,backgroundColor:"currentcolor",borderRadius:Xe,transition:[`background ${qe} ${Ue}`,`transform ${qe} ${Ue}`,`top ${qe} ${Ue}`,`color ${qe} ${Ue}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Ae})`},"&::after":{transform:`rotate(-45deg) translateY(${Ae})`}}}}},$t=Be=>{const{antCls:et,componentCls:qe,fontSize:Ue,motionDurationSlow:Xe,motionDurationMid:Re,motionEaseInOut:Ae,paddingXS:Ge,padding:Ke,colorSplit:Ze,lineWidth:at,zIndexPopup:xt,borderRadiusLG:tn,subMenuItemBorderRadius:nn,menuArrowSize:Jt,menuArrowOffset:pn,lineType:Mn,menuPanelMaskInset:hn,groupTitleLineHeight:En,groupTitleFontSize:Wn}=Be;return[{"":{[`${qe}`]:Object.assign(Object.assign({},(0,Qe.dF)()),{"&-hidden":{display:"none"}})},[`${qe}-submenu-hidden`]:{display:"none"}},{[qe]: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:Ue,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",[`${qe}-item`]:{flex:"none"}},[`${qe}-item, ${qe}-submenu, ${qe}-submenu-title`]:{borderRadius:Be.itemBorderRadius},[`${qe}-item-group-title`]:{padding:`${Ge}px ${Ke}px`,fontSize:Wn,lineHeight:En,transition:`all ${Xe}`},[`&-horizontal ${qe}-submenu`]:{transition:[`border-color ${Xe} ${Ae}`,`background ${Xe} ${Ae}`].join(",")},[`${qe}-submenu, ${qe}-submenu-inline`]:{transition:[`border-color ${Xe} ${Ae}`,`background ${Xe} ${Ae}`,`padding ${Re} ${Ae}`].join(",")},[`${qe}-submenu ${qe}-sub`]:{cursor:"initial",transition:[`background ${Xe} ${Ae}`,`padding ${Xe} ${Ae}`].join(",")},[`${qe}-title-content`]:{transition:`color ${Xe}`},[`${qe}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${qe}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Ze,borderStyle:Mn,borderWidth:0,borderTopWidth:at,marginBlock:at,padding:0,"&-dashed":{borderStyle:"dashed"}}}),jt(Be)),{[`${qe}-item-group`]:{[`${qe}-item-group-list`]:{margin:0,padding:0,[`${qe}-item, ${qe}-submenu-title`]:{paddingInline:`${Ue*2}px ${Ke}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:xt,borderRadius:tn,boxShadow:"none",transformOrigin:"0 0",[`&${qe}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${hn}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:hn},"\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},[`> ${qe}`]:Object.assign(Object.assign(Object.assign({borderRadius:tn},jt(Be)),ln(Be)),{[`${qe}-item, ${qe}-submenu > ${qe}-submenu-title`]:{borderRadius:nn},[`${qe}-submenu-title::after`]:{transition:`transform ${Xe} ${Ae}`}})}}),ln(Be)),{[`&-inline-collapsed ${qe}-submenu-arrow,
|
|
|
&-inline ${qe}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${pn})`},"&::after":{transform:`rotate(45deg) translateX(-${pn})`}},[`${qe}-submenu-open${qe}-submenu-inline > ${qe}-submenu-title > ${qe}-submenu-arrow`]:{transform:`translateY(-${Jt*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${pn})`},"&::before":{transform:`rotate(45deg) translateX(${pn})`}}})},{[`${et}-layout-header`]:{[qe]:{lineHeight:"inherit"}}}]};var yn=(Be,et)=>(0,Ct.Z)("Menu",Ue=>{if(et===!1)return[];const{colorBgElevated:Xe,colorPrimary:Re,colorTextLightSolid:Ae,controlHeightLG:Ge,fontSize:Ke,darkItemColor:Ze,darkDangerItemColor:at,darkItemBg:xt,darkSubMenuItemBg:tn,darkItemSelectedColor:nn,darkItemSelectedBg:Jt,darkDangerItemSelectedBg:pn,darkItemHoverBg:Mn,darkGroupTitleColor:hn,darkItemHoverColor:En,darkItemDisabledColor:Wn,darkDangerItemHoverColor:Tn,darkDangerItemSelectedColor:ci,darkDangerItemActiveBg:ri}=Ue,Ii=Ke/7*5,bi=(0,it.TS)(Ue,{menuArrowSize:Ii,menuHorizontalHeight:Ge*1.15,menuArrowOffset:`${Ii*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Xe}),nr=(0,it.TS)(bi,{itemColor:Ze,itemHoverColor:En,groupTitleColor:hn,itemSelectedColor:nn,itemBg:xt,popupBg:xt,subMenuItemBg:tn,itemActiveBg:"transparent",itemSelectedBg:Jt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Mn,itemDisabledColor:Wn,dangerItemColor:at,dangerItemHoverColor:Tn,dangerItemSelectedColor:ci,dangerItemActiveBg:ri,dangerItemSelectedBg:pn,menuSubMenuBg:tn,horizontalItemSelectedColor:Ae,horizontalItemSelectedBg:Re});return[$t(bi),ut(bi),Bt(bi),St(bi,"light"),St(nr,"dark"),ht(bi),(0,We.Z)(bi),(0,gt.oN)(bi,"slide-up"),(0,gt.oN)(bi,"slide-down"),(0,ct._y)(bi,"zoom-big")]},Ue=>{const{colorPrimary:Xe,colorError:Re,colorTextDisabled:Ae,colorErrorBg:Ge,colorText:Ke,colorTextDescription:Ze,colorBgContainer:at,colorFillAlter:xt,colorFillContent:tn,lineWidth:nn,lineWidthBold:Jt,controlItemBgActive:pn,colorBgTextHover:Mn,controlHeightLG:hn,lineHeight:En,colorBgElevated:Wn,marginXXS:Tn,padding:ci,fontSize:ri,controlHeightSM:Ii,fontSizeLG:bi,colorTextLightSolid:nr,colorErrorHover:Ji}=Ue,gr=new Ve.C(nr).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:Ue.zIndexPopupBase+50,radiusItem:Ue.borderRadiusLG,itemBorderRadius:Ue.borderRadiusLG,radiusSubMenuItem:Ue.borderRadiusSM,subMenuItemBorderRadius:Ue.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:at,itemBg:at,colorItemBgHover:Mn,itemHoverBg:Mn,colorItemBgActive:tn,itemActiveBg:pn,colorSubItemBg:xt,subMenuItemBg:xt,colorItemBgSelected:pn,itemSelectedBg:pn,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Jt,activeBarHeight:Jt,colorActiveBarBorderSize:nn,activeBarBorderWidth:nn,colorItemTextDisabled:Ae,itemDisabledColor:Ae,colorDangerItemText:Re,dangerItemColor:Re,colorDangerItemTextHover:Re,dangerItemHoverColor:Re,colorDangerItemTextSelected:Re,dangerItemSelectedColor:Re,colorDangerItemBgActive:Ge,dangerItemActiveBg:Ge,colorDangerItemBgSelected:Ge,dangerItemSelectedBg:Ge,itemMarginInline:Ue.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:hn,groupTitleLineHeight:En,collapsedWidth:hn*2,popupBg:Wn,itemMarginBlock:Tn,itemPaddingInline:ci,horizontalLineHeight:`${hn*1.15}px`,iconSize:ri,iconMarginInlineEnd:Ii-ri,collapsedIconSize:bi,groupTitleFontSize:ri,darkItemDisabledColor:new Ve.C(nr).setAlpha(.25).toRgbString(),darkItemColor:gr,darkDangerItemColor:Re,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:nr,darkItemSelectedBg:Xe,darkDangerItemSelectedBg:Re,darkItemHoverBg:"transparent",darkGroupTitleColor:gr,darkItemHoverColor:nr,darkDangerItemHoverColor:Ji,darkDangerItemSelectedColor:nr,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,et){var qe={};for(var Ue in Be)Object.prototype.hasOwnProperty.call(Be,Ue)&&et.indexOf(Ue)<0&&(qe[Ue]=Be[Ue]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,Ue=Object.getOwnPropertySymbols(Be);Xe<Ue.length;Xe++)et.indexOf(Ue[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Be,Ue[Xe])&&(qe[Ue[Xe]]=Be[Ue[Xe]]);return qe},Xt=(0,me.forwardRef)((Be,et)=>{var qe,Ue;const Xe=me.useContext(Ce.Z),Re=Xe||{},{getPrefixCls:Ae,getPopupContainer:Ge,direction:Ke,menu:Ze}=me.useContext(Pe.E_),at=Ae(),{prefixCls:xt,className:tn,style:nn,theme:Jt="light",expandIcon:pn,_internalDisableMenuItemTitleTooltip:Mn,inlineCollapsed:hn,siderCollapsed:En,items:Wn,children:Tn,rootClassName:ci,mode:ri,selectable:Ii,onClick:bi,overflowedIndicatorPopupClassName:nr}=Be,Ji=Ut(Be,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),gr=(0,ce.Z)(Ji,["collapsedWidth"]),cr=je(Wn)||Tn;(qe=Re.validator)===null||qe===void 0||qe.call(Re,{mode:ri});const eo=(0,ye.useEvent)(function(){var Jr;bi==null||bi.apply(void 0,arguments),(Jr=Re.onClick)===null||Jr===void 0||Jr.call(Re)}),ro=Re.mode||ri,hi=Ii!=null?Ii:Re.selectable,Pr=me.useMemo(()=>En!==void 0?En:hn,[hn,En]),Hi={horizontal:{motionName:`${at}-slide-up`},inline:(0,we.Z)(at),other:{motionName:`${at}-zoom-big`}},st=Ae("menu",xt||Re.prefixCls),[Rr,Er]=yn(st,!Xe),yo=be()(`${st}-${Jt}`,Ze==null?void 0:Ze.className,tn);let Zr;if(typeof pn=="function")Zr=pn;else if(pn===null||pn===!1)Zr=null;else if(Re.expandIcon===null||Re.expandIcon===!1)Zr=null;else{const Jr=pn!=null?pn:Re.expandIcon;Zr=(0,de.Tm)(Jr,{className:be()(`${st}-submenu-expand-icon`,(0,de.l$)(Jr)?(Ue=Jr.props)===null||Ue===void 0?void 0:Ue.className:"")})}const ao=me.useMemo(()=>({prefixCls:st,inlineCollapsed:Pr||!1,direction:Ke,firstLevel:!0,theme:Jt,mode:ro,disableMenuItemTitleTooltip:Mn}),[st,Pr,Ke,Mn,Jt]);return Rr(me.createElement(Ce.Z.Provider,{value:null},me.createElement(z.Provider,{value:ao},me.createElement(Le.ZP,Object.assign({getPopupContainer:Ge,overflowedIndicator:me.createElement(le.Z,null),overflowedIndicatorPopupClassName:be()(st,`${st}-${Jt}`,nr),mode:ro,selectable:hi,onClick:eo},gr,{inlineCollapsed:Pr,style:Object.assign(Object.assign({},Ze==null?void 0:Ze.style),nn),className:yo,prefixCls:st,direction:Ke,defaultMotions:Hi,expandIcon:Zr,ref:et,rootClassName:be()(ci,Er)}),cr))))});const mt=(0,me.forwardRef)((Be,et)=>{const qe=(0,me.useRef)(null),Ue=me.useContext(Ie.D);return(0,me.useImperativeHandle)(et,()=>({menu:qe.current,focus:Xe=>{var Re;(Re=qe.current)===null||Re===void 0||Re.focus(Xe)}})),me.createElement(Xt,Object.assign({ref:qe},Be,Ue))});mt.Item=oe,mt.SubMenu=se,mt.Divider=xe,mt.ItemGroup=Le.BW;var ze=mt},58421:function(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Re}});var Le=Ee(92413),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(Ge,Ke){return me.createElement(be.Z,(0,Le.Z)({},Ge,{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(400),z=Ee(33708),ee=Ee(6909),oe=Ee(4771),ie=Ee(9427),se=Ee(25440),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 Ge=(0,se.Z)(Ke);function Ke(){var Ze;(0,ee.Z)(this,Ke);for(var at=arguments.length,xt=new Array(at),tn=0;tn<at;tn++)xt[tn]=arguments[tn];return Ze=Ge.call.apply(Ge,[this].concat(xt)),Ze.state={goInputText:""},Ze.getValidValue=function(){var nn=Ze.state.goInputText;return!nn||Number.isNaN(nn)?void 0:Number(nn)},Ze.buildOptionText=function(nn){return"".concat(nn," ").concat(Ze.props.locale.items_per_page)},Ze.changeSize=function(nn){Ze.props.changeSize(Number(nn))},Ze.handleChange=function(nn){Ze.setState({goInputText:nn.target.value})},Ze.handleBlur=function(nn){var Jt=Ze.props,pn=Jt.goButton,Mn=Jt.quickGo,hn=Jt.rootPrefixCls,En=Ze.state.goInputText;pn||En===""||(Ze.setState({goInputText:""}),!(nn.relatedTarget&&(nn.relatedTarget.className.indexOf("".concat(hn,"-item-link"))>=0||nn.relatedTarget.className.indexOf("".concat(hn,"-item"))>=0))&&Mn(Ze.getValidValue()))},Ze.go=function(nn){var Jt=Ze.state.goInputText;Jt!==""&&(nn.keyCode===we.ENTER||nn.type==="click")&&(Ze.setState({goInputText:""}),Ze.props.quickGo(Ze.getValidValue()))},Ze}return(0,oe.Z)(Ke,[{key:"getPageSizeOptions",value:function(){var at=this.props,xt=at.pageSize,tn=at.pageSizeOptions;return tn.some(function(nn){return nn.toString()===xt.toString()})?tn:tn.concat([xt.toString()]).sort(function(nn,Jt){var pn=Number.isNaN(Number(nn))?0:Number(nn),Mn=Number.isNaN(Number(Jt))?0:Number(Jt);return pn-Mn})}},{key:"render",value:function(){var at=this,xt=this.props,tn=xt.pageSize,nn=xt.locale,Jt=xt.rootPrefixCls,pn=xt.changeSize,Mn=xt.quickGo,hn=xt.goButton,En=xt.selectComponentClass,Wn=xt.buildOptionText,Tn=xt.selectPrefixCls,ci=xt.disabled,ri=this.state.goInputText,Ii="".concat(Jt,"-options"),bi=En,nr=null,Ji=null,gr=null;if(!pn&&!Mn)return null;var cr=this.getPageSizeOptions();if(pn&&bi){var eo=cr.map(function(ro,hi){return me.createElement(bi.Option,{key:hi,value:ro.toString()},(Wn||at.buildOptionText)(ro))});nr=me.createElement(bi,{disabled:ci,prefixCls:Tn,showSearch:!1,className:"".concat(Ii,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(tn||cr[0]).toString(),onChange:this.changeSize,getPopupContainer:function(hi){return hi.parentNode},"aria-label":nn.page_size,defaultOpen:!1},eo)}return Mn&&(hn&&(gr=typeof hn=="boolean"?me.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:ci,className:"".concat(Ii,"-quick-jumper-button")},nn.jump_to_confirm):me.createElement("span",{onClick:this.go,onKeyUp:this.go},hn)),Ji=me.createElement("div",{className:"".concat(Ii,"-quick-jumper")},nn.jump_to,me.createElement("input",{disabled:ci,type:"text",value:ri,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":nn.page}),nn.page,gr)),me.createElement("li",{className:"".concat(Ii)},nr,Ji)}}]),Ke}(me.Component);ke.defaultProps={pageSizeOptions:["10","20","50","100"]};var Ne=ke,je=function(Ge){var Ke,Ze=Ge.rootPrefixCls,at=Ge.page,xt=Ge.active,tn=Ge.className,nn=Ge.showTitle,Jt=Ge.onClick,pn=Ge.onKeyPress,Mn=Ge.itemRender,hn="".concat(Ze,"-item"),En=de()(hn,"".concat(hn,"-").concat(at),(Ke={},(0,ue.Z)(Ke,"".concat(hn,"-active"),xt),(0,ue.Z)(Ke,"".concat(hn,"-disabled"),!at),(0,ue.Z)(Ke,Ge.className,tn),Ke)),Wn=function(){Jt(at)},Tn=function(Ii){pn(Ii,Jt,at)},ci=Mn(at,"page",me.createElement("a",{rel:"nofollow"},at));return ci?me.createElement("li",{title:nn?at.toString():null,className:En,onClick:Wn,onKeyPress:Tn,tabIndex:0},ci):null},Ve=je;function Qe(){}function We(Ae){var Ge=Number(Ae);return typeof Ge=="number"&&!Number.isNaN(Ge)&&isFinite(Ge)&&Math.floor(Ge)===Ge}var gt=function(Ge,Ke,Ze){return Ze};function ct(Ae,Ge,Ke){var Ze=typeof Ae=="undefined"?Ge.pageSize:Ae;return Math.floor((Ke.total-1)/Ze)+1}var Ct=function(Ae){(0,ie.Z)(Ke,Ae);var Ge=(0,se.Z)(Ke);function Ke(Ze){var at;(0,ee.Z)(this,Ke),at=Ge.call(this,Ze),at.paginationNode=me.createRef(),at.getJumpPrevPage=function(){return Math.max(1,at.state.current-(at.props.showLessItems?3:5))},at.getJumpNextPage=function(){return Math.min(ct(void 0,at.state,at.props),at.state.current+(at.props.showLessItems?3:5))},at.getItemIcon=function(pn,Mn){var hn=at.props.prefixCls,En=pn||me.createElement("button",{type:"button","aria-label":Mn,className:"".concat(hn,"-item-link")});return typeof pn=="function"&&(En=me.createElement(pn,(0,z.Z)({},at.props))),En},at.isValid=function(pn){var Mn=at.props.total;return We(pn)&&pn!==at.state.current&&We(Mn)&&Mn>0},at.shouldDisplayQuickJumper=function(){var pn=at.props,Mn=pn.showQuickJumper,hn=pn.total,En=at.state.pageSize;return hn<=En?!1:Mn},at.handleKeyDown=function(pn){(pn.keyCode===we.ARROW_UP||pn.keyCode===we.ARROW_DOWN)&&pn.preventDefault()},at.handleKeyUp=function(pn){var Mn=at.getValidValue(pn),hn=at.state.currentInputValue;Mn!==hn&&at.setState({currentInputValue:Mn}),pn.keyCode===we.ENTER?at.handleChange(Mn):pn.keyCode===we.ARROW_UP?at.handleChange(Mn-1):pn.keyCode===we.ARROW_DOWN&&at.handleChange(Mn+1)},at.handleBlur=function(pn){var Mn=at.getValidValue(pn);at.handleChange(Mn)},at.changePageSize=function(pn){var Mn=at.state.current,hn=ct(pn,at.state,at.props);Mn=Mn>hn?hn:Mn,hn===0&&(Mn=at.state.current),typeof pn=="number"&&("pageSize"in at.props||at.setState({pageSize:pn}),"current"in at.props||at.setState({current:Mn,currentInputValue:Mn})),at.props.onShowSizeChange(Mn,pn),"onChange"in at.props&&at.props.onChange&&at.props.onChange(Mn,pn)},at.handleChange=function(pn){var Mn=at.props,hn=Mn.disabled,En=Mn.onChange,Wn=at.state,Tn=Wn.pageSize,ci=Wn.current,ri=Wn.currentInputValue;if(at.isValid(pn)&&!hn){var Ii=ct(void 0,at.state,at.props),bi=pn;return pn>Ii?bi=Ii:pn<1&&(bi=1),"current"in at.props||at.setState({current:bi}),bi!==ri&&at.setState({currentInputValue:bi}),En(bi,Tn),bi}return ci},at.prev=function(){at.hasPrev()&&at.handleChange(at.state.current-1)},at.next=function(){at.hasNext()&&at.handleChange(at.state.current+1)},at.jumpPrev=function(){at.handleChange(at.getJumpPrevPage())},at.jumpNext=function(){at.handleChange(at.getJumpNextPage())},at.hasPrev=function(){return at.state.current>1},at.hasNext=function(){return at.state.current<ct(void 0,at.state,at.props)},at.runIfEnter=function(pn,Mn){if(pn.key==="Enter"||pn.charCode===13){for(var hn=arguments.length,En=new Array(hn>2?hn-2:0),Wn=2;Wn<hn;Wn++)En[Wn-2]=arguments[Wn];Mn.apply(void 0,En)}},at.runIfEnterPrev=function(pn){at.runIfEnter(pn,at.prev)},at.runIfEnterNext=function(pn){at.runIfEnter(pn,at.next)},at.runIfEnterJumpPrev=function(pn){at.runIfEnter(pn,at.jumpPrev)},at.runIfEnterJumpNext=function(pn){at.runIfEnter(pn,at.jumpNext)},at.handleGoTO=function(pn){(pn.keyCode===we.ENTER||pn.type==="click")&&at.handleChange(at.state.currentInputValue)},at.renderPrev=function(pn){var Mn=at.props,hn=Mn.prevIcon,En=Mn.itemRender,Wn=En(pn,"prev",at.getItemIcon(hn,"prev page")),Tn=!at.hasPrev();return(0,me.isValidElement)(Wn)?(0,me.cloneElement)(Wn,{disabled:Tn}):Wn},at.renderNext=function(pn){var Mn=at.props,hn=Mn.nextIcon,En=Mn.itemRender,Wn=En(pn,"next",at.getItemIcon(hn,"next page")),Tn=!at.hasNext();return(0,me.isValidElement)(Wn)?(0,me.cloneElement)(Wn,{disabled:Tn}):Wn};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 nn=Ze.defaultCurrent;"current"in Ze&&(nn=Ze.current);var Jt=Ze.defaultPageSize;return"pageSize"in Ze&&(Jt=Ze.pageSize),nn=Math.min(nn,ct(Jt,void 0,Ze)),at.state={current:nn,currentInputValue:nn,pageSize:Jt},at}return(0,oe.Z)(Ke,[{key:"componentDidUpdate",value:function(at,xt){var tn=this.props.prefixCls;if(xt.current!==this.state.current&&this.paginationNode.current){var nn=this.paginationNode.current.querySelector(".".concat(tn,"-item-").concat(xt.current));if(nn&&document.activeElement===nn){var Jt;nn==null||(Jt=nn.blur)===null||Jt===void 0||Jt.call(nn)}}}},{key:"getValidValue",value:function(at){var xt=at.target.value,tn=ct(void 0,this.state,this.props),nn=this.state.currentInputValue,Jt;return xt===""?Jt=xt:Number.isNaN(Number(xt))?Jt=nn:xt>=tn?Jt=tn:Jt=Number(xt),Jt}},{key:"getShowSizeChanger",value:function(){var at=this.props,xt=at.showSizeChanger,tn=at.total,nn=at.totalBoundaryShowSizeChanger;return typeof xt!="undefined"?xt:tn>nn}},{key:"render",value:function(){var at=this.props,xt=at.prefixCls,tn=at.className,nn=at.style,Jt=at.disabled,pn=at.hideOnSinglePage,Mn=at.total,hn=at.locale,En=at.showQuickJumper,Wn=at.showLessItems,Tn=at.showTitle,ci=at.showTotal,ri=at.simple,Ii=at.itemRender,bi=at.showPrevNextJumpers,nr=at.jumpPrevIcon,Ji=at.jumpNextIcon,gr=at.selectComponentClass,cr=at.selectPrefixCls,eo=at.pageSizeOptions,ro=this.state,hi=ro.current,Pr=ro.pageSize,Hi=ro.currentInputValue;if(pn===!0&&Mn<=Pr)return null;var st=ct(void 0,this.state,this.props),Rr=[],Er=null,yo=null,Zr=null,ao=null,Jr=null,lo=En&&En.goButton,oi=Wn?1:2,$e=hi-1>0?hi-1:0,nt=hi+1<st?hi+1:st,Je=(0,le.Z)(this.props,{aria:!0,data:!0}),wt=ci&&me.createElement("li",{className:"".concat(xt,"-total-text")},ci(Mn,[Mn===0?0:(hi-1)*Pr+1,hi*Pr>Mn?Mn:hi*Pr]));if(ri){lo&&(typeof lo=="boolean"?Jr=me.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},hn.jump_to_confirm):Jr=me.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},lo),Jr=me.createElement("li",{title:Tn?"".concat(hn.jump_to).concat(hi,"/").concat(st):null,className:"".concat(xt,"-simple-pager")},Jr));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:nn,ref:this.paginationNode},Je),wt,Nt?me.createElement("li",{title:Tn?hn.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:Tn?"".concat(hi,"/").concat(st):null,className:"".concat(xt,"-simple-pager")},me.createElement("input",{type:"text",value:Hi,disabled:Jt,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),me.createElement("span",{className:"".concat(xt,"-slash")},"/"),st),me.createElement("li",{title:Tn?hn.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)),Jr)}if(st<=3+oi*2){var kt={locale:hn,rootPrefixCls:xt,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Tn,itemRender:Ii};st||Rr.push(me.createElement(Ve,(0,Le.Z)({},kt,{key:"noPager",page:1,className:"".concat(xt,"-item-disabled")})));for(var _t=1;_t<=st;_t+=1){var un=hi===_t;Rr.push(me.createElement(Ve,(0,Le.Z)({},kt,{key:_t,page:_t,active:un})))}}else{var wn=Wn?hn.prev_3:hn.prev_5,Bn=Wn?hn.next_3:hn.next_5,zn=Ii(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(nr,"prev page")),At=Ii(this.getJumpNextPage(),"jump-next",this.getItemIcon(Ji,"next page"));bi&&(Er=zn?me.createElement("li",{title:Tn?wn: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"),!!nr))},zn):null,yo=At?me.createElement("li",{title:Tn?Bn: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"),!!Ji))},At):null),ao=me.createElement(Ve,{locale:hn,last:!0,rootPrefixCls:xt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:st,page:st,active:!1,showTitle:Tn,itemRender:Ii}),Zr=me.createElement(Ve,{locale:hn,rootPrefixCls:xt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Tn,itemRender:Ii});var Kt=Math.max(1,hi-oi),Sn=Math.min(hi+oi,st);hi-1<=oi&&(Sn=1+oi*2),st-hi<=oi&&(Kt=st-oi*2);for(var kn=Kt;kn<=Sn;kn+=1){var Zt=hi===kn;Rr.push(me.createElement(Ve,{locale:hn,rootPrefixCls:xt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:kn,page:kn,active:Zt,showTitle:Tn,itemRender:Ii}))}hi-1>=oi*2&&hi!==3&&(Rr[0]=(0,me.cloneElement)(Rr[0],{className:"".concat(xt,"-item-after-jump-prev")}),Rr.unshift(Er)),st-hi>=oi*2&&hi!==st-2&&(Rr[Rr.length-1]=(0,me.cloneElement)(Rr[Rr.length-1],{className:"".concat(xt,"-item-before-jump-next")}),Rr.push(yo)),Kt!==1&&Rr.unshift(Zr),Sn!==st&&Rr.push(ao)}var rn=!this.hasPrev()||!st,Rn=!this.hasNext()||!st,An=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:nn,ref:this.paginationNode},Je),wt,An?me.createElement("li",{title:Tn?hn.prev_page:null,onClick:this.prev,tabIndex:rn?null:0,onKeyPress:this.runIfEnterPrev,className:de()("".concat(xt,"-prev"),(0,ue.Z)({},"".concat(xt,"-disabled"),rn)),"aria-disabled":rn},An):null,Rr,Qn?me.createElement("li",{title:Tn?hn.next_page:null,onClick:this.next,tabIndex:Rn?null:0,onKeyPress:this.runIfEnterNext,className:de()("".concat(xt,"-next"),(0,ue.Z)({},"".concat(xt,"-disabled"),Rn)),"aria-disabled":Rn},Qn):null,me.createElement(Ne,{disabled:Jt,locale:hn,rootPrefixCls:xt,selectComponentClass:gr,selectPrefixCls:cr,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:hi,pageSize:Pr,pageSizeOptions:eo,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:lo}))}}],[{key:"getDerivedStateFromProps",value:function(at,xt){var tn={};if("current"in at&&(tn.current=at.current,at.current!==xt.current&&(tn.currentInputValue=tn.current)),"pageSize"in at&&at.pageSize!==xt.pageSize){var nn=xt.current,Jt=ct(at.pageSize,xt,at);nn=nn>Jt?Jt:nn,"current"in at||(tn.current=nn,tn.currentInputValue=nn),tn.pageSize=at.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:gt,totalBoundaryShowSizeChanger:50};var it=Ct,yt=Ee(22075),ut=Ee(36355),Ft=Ee(19716),ht=Ee(8628),rt=Ee(9763),dt=Ee(57809);const St=Ae=>me.createElement(dt.default,Object.assign({},Ae,{showSearch:!0,size:"small"})),Et=Ae=>me.createElement(dt.default,Object.assign({},Ae,{showSearch:!0,size:"middle"}));St.Option=dt.default.Option,Et.Option=dt.default.Option;var vt=Ee(9937),Bt=Ee(17313),jt=Ee(83116),ln=Ee(37613);const $t=Ae=>{const{componentCls:Ge}=Ae;return{[`${Ge}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${Ge}-item-link`]:{color:Ae.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${Ge}-item-link`]:{color:Ae.colorTextDisabled,cursor:"not-allowed"}}},[`&${Ge}-disabled`]:{cursor:"not-allowed",[`${Ge}-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}}},[`${Ge}-item-link`]:{color:Ae.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${Ge}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${Ge}-simple-pager`]:{color:Ae.colorTextDisabled},[`${Ge}-jump-prev, ${Ge}-jump-next`]:{[`${Ge}-item-link-icon`]:{opacity:0},[`${Ge}-item-ellipsis`]:{opacity:1}}},[`&${Ge}-simple`]:{[`${Ge}-prev, ${Ge}-next`]:{[`&${Ge}-disabled ${Ge}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},yn=Ae=>{const{componentCls:Ge}=Ae;return{[`&${Ge}-mini ${Ge}-total-text, &${Ge}-mini ${Ge}-simple-pager`]:{height:Ae.itemSizeSM,lineHeight:`${Ae.itemSizeSM}px`},[`&${Ge}-mini ${Ge}-item`]:{minWidth:Ae.itemSizeSM,height:Ae.itemSizeSM,margin:0,lineHeight:`${Ae.itemSizeSM-2}px`},[`&${Ge}-mini:not(${Ge}-disabled) ${Ge}-item:not(${Ge}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:Ae.colorBgTextHover},"&:active":{backgroundColor:Ae.colorBgTextActive}},[`&${Ge}-mini ${Ge}-prev, &${Ge}-mini ${Ge}-next`]:{minWidth:Ae.itemSizeSM,height:Ae.itemSizeSM,margin:0,lineHeight:`${Ae.itemSizeSM}px`},[`&${Ge}-mini:not(${Ge}-disabled)`]:{[`${Ge}-prev, ${Ge}-next`]:{[`&:hover ${Ge}-item-link`]:{backgroundColor:Ae.colorBgTextHover},[`&:active ${Ge}-item-link`]:{backgroundColor:Ae.colorBgTextActive},[`&${Ge}-disabled:hover ${Ge}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${Ge}-mini ${Ge}-prev ${Ge}-item-link,
|
|
|
&${Ge}-mini ${Ge}-next ${Ge}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:Ae.itemSizeSM,lineHeight:`${Ae.itemSizeSM}px`}},[`&${Ge}-mini ${Ge}-jump-prev, &${Ge}-mini ${Ge}-jump-next`]:{height:Ae.itemSizeSM,marginInlineEnd:0,lineHeight:`${Ae.itemSizeSM}px`},[`&${Ge}-mini ${Ge}-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:Ge}=Ae;return{[`
|
|
|
&${Ge}-simple ${Ge}-prev,
|
|
|
&${Ge}-simple ${Ge}-next
|
|
|
`]:{height:Ae.itemSizeSM,lineHeight:`${Ae.itemSizeSM}px`,verticalAlign:"top",[`${Ge}-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`}}},[`&${Ge}-simple ${Ge}-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:Ge}=Ae;return{[`${Ge}-jump-prev, ${Ge}-jump-next`]:{outline:0,[`${Ge}-item-container`]:{position:"relative",[`${Ge}-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"}},[`${Ge}-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":{[`${Ge}-item-link-icon`]:{opacity:1},[`${Ge}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${Ge}-prev,
|
|
|
${Ge}-jump-prev,
|
|
|
${Ge}-jump-next
|
|
|
`]:{marginInlineEnd:Ae.marginXS},[`
|
|
|
${Ge}-prev,
|
|
|
${Ge}-next,
|
|
|
${Ge}-jump-prev,
|
|
|
${Ge}-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}`},[`${Ge}-prev, ${Ge}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:Ae.colorText,cursor:"pointer",userSelect:"none"},[`${Ge}-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 ${Ge}-item-link`]:{backgroundColor:Ae.colorBgTextHover},[`&:active ${Ge}-item-link`]:{backgroundColor:Ae.colorBgTextActive},[`&${Ge}-disabled:hover`]:{[`${Ge}-item-link`]:{backgroundColor:"transparent"}}},[`${Ge}-slash`]:{marginInlineEnd:Ae.paginationSlashMarginInlineEnd,marginInlineStart:Ae.paginationSlashMarginInlineStart},[`${Ge}-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})}}}},Xt=Ae=>{const{componentCls:Ge}=Ae;return{[`${Ge}-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(${Ge}-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}}}}},mt=Ae=>{const{componentCls:Ge}=Ae;return{[Ge]: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:'""'},[`${Ge}-total-text`]:{display:"inline-block",height:Ae.itemSize,marginInlineEnd:Ae.marginXS,lineHeight:`${Ae.itemSize-2}px`,verticalAlign:"middle"}}),Xt(Ae)),Wt(Ae)),Ut(Ae)),yn(Ae)),$t(Ae)),{[`@media only screen and (max-width: ${Ae.screenLG}px)`]:{[`${Ge}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${Ae.screenSM}px)`]:{[`${Ge}-options`]:{display:"none"}}}),[`&${Ae.componentCls}-rtl`]:{direction:"rtl"}}},ze=Ae=>{const{componentCls:Ge}=Ae;return{[`${Ge}${Ge}-disabled:not(${Ge}-mini)`]:{"&, &:hover":{[`${Ge}-item-link`]:{borderColor:Ae.colorBorder}},"&:focus-visible":{[`${Ge}-item-link`]:{borderColor:Ae.colorBorder}},[`${Ge}-item, ${Ge}-item-link`]:{backgroundColor:Ae.colorBgContainerDisabled,borderColor:Ae.colorBorder,[`&:hover:not(${Ge}-item-active)`]:{backgroundColor:Ae.colorBgContainerDisabled,borderColor:Ae.colorBorder,a:{color:Ae.colorTextDisabled}},[`&${Ge}-item-active`]:{backgroundColor:Ae.itemActiveBgDisabled}},[`${Ge}-prev, ${Ge}-next`]:{"&:hover button":{backgroundColor:Ae.colorBgContainerDisabled,borderColor:Ae.colorBorder,color:Ae.colorTextDisabled},[`${Ge}-item-link`]:{backgroundColor:Ae.colorBgContainerDisabled,borderColor:Ae.colorBorder}}},[`${Ge}:not(${Ge}-mini)`]:{[`${Ge}-prev, ${Ge}-next`]:{"&:hover button":{borderColor:Ae.colorPrimaryHover,backgroundColor:Ae.itemBg},[`${Ge}-item-link`]:{backgroundColor:Ae.itemLinkBg,borderColor:Ae.colorBorder},[`&:hover ${Ge}-item-link`]:{borderColor:Ae.colorPrimary,backgroundColor:Ae.itemBg,color:Ae.colorPrimary},[`&${Ge}-disabled`]:{[`${Ge}-item-link`]:{borderColor:Ae.colorBorder,color:Ae.colorTextDisabled}}},[`${Ge}-item`]:{backgroundColor:Ae.itemBg,border:`${Ae.lineWidth}px ${Ae.lineType} ${Ae.colorBorder}`,[`&:hover:not(${Ge}-item-active)`]:{borderColor:Ae.colorPrimary,backgroundColor:Ae.itemBg,a:{color:Ae.colorPrimary}},"&-active":{borderColor:Ae.colorPrimary}}}}},Be=Ae=>{const{componentCls:Ge}=Ae;return{[`${Ge}:not(${Ge}-disabled)`]:{[`${Ge}-item`]:Object.assign({},(0,Bt.Qy)(Ae)),[`${Ge}-jump-prev, ${Ge}-jump-next`]:{"&:focus-visible":Object.assign({[`${Ge}-item-link-icon`]:{opacity:1},[`${Ge}-item-ellipsis`]:{opacity:0}},(0,Bt.oN)(Ae))},[`${Ge}-prev, ${Ge}-next`]:{[`&:focus-visible ${Ge}-item-link`]:Object.assign({},(0,Bt.oN)(Ae))}}}};var et=(0,jt.Z)("Pagination",Ae=>{const Ge=(0,ln.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[mt(Ge),Be(Ge),Ae.wireframe&&ze(Ge)]},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})),qe=function(Ae,Ge){var Ke={};for(var Ze in Ae)Object.prototype.hasOwnProperty.call(Ae,Ze)&&Ge.indexOf(Ze)<0&&(Ke[Ze]=Ae[Ze]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,Ze=Object.getOwnPropertySymbols(Ae);at<Ze.length;at++)Ge.indexOf(Ze[at])<0&&Object.prototype.propertyIsEnumerable.call(Ae,Ze[at])&&(Ke[Ze[at]]=Ae[Ze[at]]);return Ke},Xe=Ae=>{const{prefixCls:Ge,selectPrefixCls:Ke,className:Ze,rootClassName:at,style:xt,size:tn,locale:nn,selectComponentClass:Jt,responsive:pn,showSizeChanger:Mn}=Ae,hn=qe(Ae,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:En}=(0,ht.Z)(pn),{getPrefixCls:Wn,direction:Tn,pagination:ci={}}=me.useContext(ut.E_),ri=Wn("pagination",Ge),[Ii,bi]=et(ri),nr=Mn!=null?Mn:ci.showSizeChanger,Ji=me.useMemo(()=>{const st=me.createElement("span",{className:`${ri}-item-ellipsis`},"\u2022\u2022\u2022"),Rr=me.createElement("button",{className:`${ri}-item-link`,type:"button",tabIndex:-1},Tn==="rtl"?me.createElement(ce.Z,null):me.createElement(ge.Z,null)),Er=me.createElement("button",{className:`${ri}-item-link`,type:"button",tabIndex:-1},Tn==="rtl"?me.createElement(ge.Z,null):me.createElement(ce.Z,null)),yo=me.createElement("a",{className:`${ri}-item-link`},me.createElement("div",{className:`${ri}-item-container`},Tn==="rtl"?me.createElement(xe.Z,{className:`${ri}-item-link-icon`}):me.createElement(Se,{className:`${ri}-item-link-icon`}),st)),Zr=me.createElement("a",{className:`${ri}-item-link`},me.createElement("div",{className:`${ri}-item-container`},Tn==="rtl"?me.createElement(Se,{className:`${ri}-item-link-icon`}):me.createElement(xe.Z,{className:`${ri}-item-link-icon`}),st));return{prevIcon:Rr,nextIcon:Er,jumpPrevIcon:yo,jumpNextIcon:Zr}},[Tn,ri]),[gr]=(0,rt.Z)("Pagination",yt.Z),cr=Object.assign(Object.assign({},gr),nn),eo=(0,Ft.Z)(tn),ro=eo==="small"||!!(En&&!eo&&pn),hi=Wn("select",Ke),Pr=de()({[`${ri}-mini`]:ro,[`${ri}-rtl`]:Tn==="rtl"},ci==null?void 0:ci.className,Ze,at,bi),Hi=Object.assign(Object.assign({},ci==null?void 0:ci.style),xt);return Ii(me.createElement(it,Object.assign({},Ji,hn,{style:Hi,prefixCls:ri,selectPrefixCls:hi,className:Pr,selectComponentClass:Jt||(ro?St:Et),locale:cr,showSizeChanger:nr})))},Re=Xe},57809:function(bn,qt,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:We,rootClassName:gt,getPopupContainer:ct,popupClassName:Ct,dropdownClassName:it,listHeight:yt=256,placement:ut,listItemHeight:Ft=24,size:ht,disabled:rt,notFoundContent:dt,status:St,builtinPlacements:Et,dropdownMatchSelectWidth:vt,popupMatchSelectWidth:Bt,direction:jt,style:ln,allowClear:$t}=ke,yn=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:Xt,direction:mt,virtual:ze,popupMatchSelectWidth:Be,popupOverflow:et,select:qe}=be.useContext(xe.E_),Ue=Wt("select",Ve),Xe=Wt(),Re=jt!=null?jt:mt,{compactSize:Ae,compactItemClassnames:Ge}=(0,ue.ri)(Ue,Re),[Ke,Ze]=(0,z.Z)(Ue),at=be.useMemo(()=>{const{mode:Hi}=yn;if(Hi!=="combobox")return Hi===le?"combobox":Hi},[yn.mode]),xt=at==="multiple"||at==="tags",tn=(0,oe.Z)(yn.suffixIcon,yn.showArrow),nn=(je=Bt!=null?Bt:vt)!==null&&je!==void 0?je:Be,{status:Jt,hasFeedback:pn,isFormItemInput:Mn,feedbackIcon:hn}=be.useContext(de.aM),En=(0,Se.F)(Jt,St);let Wn;dt!==void 0?Wn=dt:at==="combobox"?Wn=null:Wn=(Xt==null?void 0:Xt("Select"))||be.createElement(ce.Z,{componentName:"Select"});const{suffixIcon:Tn,itemIcon:ci,removeIcon:ri,clearIcon:Ii}=(0,ie.Z)(Object.assign(Object.assign({},yn),{multiple:xt,hasFeedback:pn,feedbackIcon:hn,showSuffixIcon:tn,prefixCls:Ue,showArrow:yn.showArrow,componentName:"Select"})),bi=$t===!0?{clearIcon:Ii}:$t,nr=(0,Te.Z)(yn,["suffixIcon","itemIcon"]),Ji=me()(Ct||it,{[`${Ue}-dropdown-${Re}`]:Re==="rtl"},gt,Ze),gr=(0,ve.Z)(Hi=>{var st;return(st=ht!=null?ht:Ae)!==null&&st!==void 0?st:Hi}),cr=be.useContext(ge.Z),eo=rt!=null?rt:cr,ro=me()({[`${Ue}-lg`]:gr==="large",[`${Ue}-sm`]:gr==="small",[`${Ue}-rtl`]:Re==="rtl",[`${Ue}-borderless`]:!Qe,[`${Ue}-in-form-item`]:Mn},(0,Se.Z)(Ue,En,pn),Ge,qe==null?void 0:qe.className,We,gt,Ze),hi=be.useMemo(()=>ut!==void 0?ut:Re==="rtl"?"bottomRight":"bottomLeft",[ut,Re]),Pr=(0,ee.Z)(Et,et);return Ke(be.createElement(Ie.ZP,Object.assign({ref:Ne,virtual:ze,showSearch:qe==null?void 0:qe.showSearch},nr,{style:Object.assign(Object.assign({},qe==null?void 0:qe.style),ln),dropdownMatchSelectWidth:nn,builtinPlacements:Pr,transitionName:(0,he.m)(Xe,"slide-up",yn.transitionName),listHeight:yt,listItemHeight:Ft,mode:at,prefixCls:Ue,placement:hi,direction:Re,suffixIcon:Tn,menuItemSelectedIcon:ci,removeIcon:ri,allowClear:bi,notFoundContent:Wn,className:ro,getPopupContainer:ct||Ut,dropdownClassName:Ji,disabled:eo})))},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,qt.default=we},14154:function(bn,qt,Ee){"use strict";Ee.d(qt,{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`,We=`&${ke}-slide-up-leave${ke}-slide-up-leave-active`,gt=`${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}${gt}bottomLeft,
|
|
|
${Qe}${gt}bottomLeft
|
|
|
`]:{animationName:be.fJ},[`
|
|
|
${Ve}${gt}topLeft,
|
|
|
${Qe}${gt}topLeft,
|
|
|
${Ve}${gt}topRight,
|
|
|
${Qe}${gt}topRight
|
|
|
`]:{animationName:be.Qt},[`${We}${gt}bottomLeft`]:{animationName:be.Uw},[`
|
|
|
${We}${gt}topLeft,
|
|
|
${We}${gt}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,[We]=ce(Ce),gt=ke?`${Ne}-${ke}`:"";return{[`${Ne}-multiple${gt}`]:{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:`${We-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-We,"\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,We=Math.ceil(Ce.fontSize*1.25),gt=ke?`${Ne}-${ke}`:"";return{[`${Ne}-single${gt}`]:{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:We},[`&${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:We}=ke,gt=Ne?{[`${je}-selector`]:{borderColor:Ve}}:{};return{[Ce]:{[`&:not(${je}-disabled):not(${je}-customize-input):not(${We}-pagination-size-changer)`]:Object.assign(Object.assign({},gt),{[`${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:We,fontWeightStrong:gt,controlItemBgActive:ct,controlItemBgHover:Ct,colorBgContainer:it,colorFillSecondary:yt,controlHeightLG:ut,controlHeightSM:Ft,colorBgContainerDisabled:ht,colorTextDisabled:rt}=Ce;return{zIndexPopup:Qe+50,optionSelectedColor:We,optionSelectedFontWeight:gt,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:yt,multipleItemBorderColor:"transparent",multipleItemHeight:Ft,multipleItemHeightLG:je,multipleSelectorBgDisabled:ht,multipleItemColorDisabled:rt,multipleItemBorderColorDisabled:"transparent"}})},58582:function(bn,qt,Ee){"use strict";Ee.d(qt,{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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Le}});function Le(me,Ie){return Ie!==void 0?Ie:me!==null}},66339:function(bn,qt,Ee){"use strict";Ee.d(qt,{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:We,showSearch:gt}=Qe;return Ce(We&>?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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return et}});var Le=Ee(92310),me=Ee.n(Le),Ie=Ee(59301),Te=Ee(36355),be=Ee(2738),he=qe=>{const{prefixCls:Ue,className:Xe,style:Re,size:Ae,shape:Ge}=qe,Ke=me()({[`${Ue}-lg`]:Ae==="large",[`${Ue}-sm`]:Ae==="small"}),Ze=me()({[`${Ue}-circle`]:Ge==="circle",[`${Ue}-square`]:Ge==="square",[`${Ue}-round`]:Ge==="round"}),at=Ie.useMemo(()=>typeof Ae=="number"?{width:Ae,height:Ae,lineHeight:`${Ae}px`}:{},[Ae]);return Ie.createElement("span",{className:me()(Ue,Ke,Ze,Xe),style:Object.assign(Object.assign({},at),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=qe=>({height:qe,lineHeight:`${qe}px`}),de=qe=>Object.assign({width:qe},ve(qe)),ue=qe=>({background:qe.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:ce,animationDuration:qe.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),z=qe=>Object.assign({width:qe*5,minWidth:qe*5},ve(qe)),ee=qe=>{const{skeletonAvatarCls:Ue,gradientFromColor:Xe,controlHeight:Re,controlHeightLG:Ae,controlHeightSM:Ge}=qe;return{[`${Ue}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Xe},de(Re)),[`${Ue}${Ue}-circle`]:{borderRadius:"50%"},[`${Ue}${Ue}-lg`]:Object.assign({},de(Ae)),[`${Ue}${Ue}-sm`]:Object.assign({},de(Ge))}},oe=qe=>{const{controlHeight:Ue,borderRadiusSM:Xe,skeletonInputCls:Re,controlHeightLG:Ae,controlHeightSM:Ge,gradientFromColor:Ke}=qe;return{[`${Re}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Ke,borderRadius:Xe},z(Ue)),[`${Re}-lg`]:Object.assign({},z(Ae)),[`${Re}-sm`]:Object.assign({},z(Ge))}},ie=qe=>Object.assign({width:qe},ve(qe)),se=qe=>{const{skeletonImageCls:Ue,imageSizeBase:Xe,gradientFromColor:Re,borderRadiusSM:Ae}=qe;return{[`${Ue}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:Re,borderRadius:Ae},ie(Xe*2)),{[`${Ue}-path`]:{fill:"#bfbfbf"},[`${Ue}-svg`]:Object.assign(Object.assign({},ie(Xe)),{maxWidth:Xe*4,maxHeight:Xe*4}),[`${Ue}-svg${Ue}-svg-circle`]:{borderRadius:"50%"}}),[`${Ue}${Ue}-circle`]:{borderRadius:"50%"}}},le=(qe,Ue,Xe)=>{const{skeletonButtonCls:Re}=qe;return{[`${Xe}${Re}-circle`]:{width:Ue,minWidth:Ue,borderRadius:"50%"},[`${Xe}${Re}-round`]:{borderRadius:Ue}}},ye=qe=>Object.assign({width:qe*2,minWidth:qe*2},ve(qe)),we=qe=>{const{borderRadiusSM:Ue,skeletonButtonCls:Xe,controlHeight:Re,controlHeightLG:Ae,controlHeightSM:Ge,gradientFromColor:Ke}=qe;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${Xe}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Ke,borderRadius:Ue,width:Re*2,minWidth:Re*2},ye(Re))},le(qe,Re,Xe)),{[`${Xe}-lg`]:Object.assign({},ye(Ae))}),le(qe,Ae,`${Xe}-lg`)),{[`${Xe}-sm`]:Object.assign({},ye(Ge))}),le(qe,Ge,`${Xe}-sm`))},Ce=qe=>{const{componentCls:Ue,skeletonAvatarCls:Xe,skeletonTitleCls:Re,skeletonParagraphCls:Ae,skeletonButtonCls:Ge,skeletonInputCls:Ke,skeletonImageCls:Ze,controlHeight:at,controlHeightLG:xt,controlHeightSM:tn,gradientFromColor:nn,padding:Jt,marginSM:pn,borderRadius:Mn,titleHeight:hn,blockRadius:En,paragraphLiHeight:Wn,controlHeightXS:Tn,paragraphMarginTop:ci}=qe;return{[`${Ue}`]:{display:"table",width:"100%",[`${Ue}-header`]:{display:"table-cell",paddingInlineEnd:Jt,verticalAlign:"top",[`${Xe}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:nn},de(at)),[`${Xe}-circle`]:{borderRadius:"50%"},[`${Xe}-lg`]:Object.assign({},de(xt)),[`${Xe}-sm`]:Object.assign({},de(tn))},[`${Ue}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${Re}`]:{width:"100%",height:hn,background:nn,borderRadius:En,[`+ ${Ae}`]:{marginBlockStart:tn}},[`${Ae}`]:{padding:0,"> li":{width:"100%",height:Wn,listStyle:"none",background:nn,borderRadius:En,"+ li":{marginBlockStart:Tn}}},[`${Ae}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${Ue}-content`]:{[`${Re}, ${Ae} > li`]:{borderRadius:Mn}}},[`${Ue}-with-avatar ${Ue}-content`]:{[`${Re}`]:{marginBlockStart:pn,[`+ ${Ae}`]:{marginBlockStart:ci}}},[`${Ue}${Ue}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},we(qe)),ee(qe)),oe(qe)),se(qe)),[`${Ue}${Ue}-block`]:{width:"100%",[`${Ge}`]:{width:"100%"},[`${Ke}`]:{width:"100%"}},[`${Ue}${Ue}-active`]:{[`
|
|
|
${Re},
|
|
|
${Ae} > li,
|
|
|
${Xe},
|
|
|
${Ge},
|
|
|
${Ke},
|
|
|
${Ze}
|
|
|
`]:Object.assign({},ue(qe))}}};var ke=(0,xe.Z)("Skeleton",qe=>{const{componentCls:Ue}=qe,Xe=(0,ge.TS)(qe,{skeletonAvatarCls:`${Ue}-avatar`,skeletonTitleCls:`${Ue}-title`,skeletonParagraphCls:`${Ue}-paragraph`,skeletonButtonCls:`${Ue}-button`,skeletonInputCls:`${Ue}-input`,skeletonImageCls:`${Ue}-image`,imageSizeBase:qe.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${qe.gradientFromColor} 25%, ${qe.gradientToColor} 37%, ${qe.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Ce(Xe)]},qe=>{const{colorFillContent:Ue,colorFill:Xe}=qe,Re=Ue,Ae=Xe;return{color:Re,colorGradientEnd:Ae,gradientFromColor:Re,gradientToColor:Ae,titleHeight:qe.controlHeight/2,blockRadius:qe.borderRadiusSM,paragraphMarginTop:qe.marginLG+qe.marginXXS,paragraphLiHeight:qe.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),je=qe=>{const{prefixCls:Ue,className:Xe,rootClassName:Re,active:Ae,shape:Ge="circle",size:Ke="default"}=qe,{getPrefixCls:Ze}=Ie.useContext(Te.E_),at=Ze("skeleton",Ue),[xt,tn]=ke(at),nn=(0,be.Z)(qe,["prefixCls","className"]),Jt=me()(at,`${at}-element`,{[`${at}-active`]:Ae},Xe,Re,tn);return xt(Ie.createElement("div",{className:Jt},Ie.createElement(he,Object.assign({prefixCls:`${at}-avatar`,shape:Ge,size:Ke},nn))))},Qe=qe=>{const{prefixCls:Ue,className:Xe,rootClassName:Re,active:Ae,block:Ge=!1,size:Ke="default"}=qe,{getPrefixCls:Ze}=Ie.useContext(Te.E_),at=Ze("skeleton",Ue),[xt,tn]=ke(at),nn=(0,be.Z)(qe,["prefixCls"]),Jt=me()(at,`${at}-element`,{[`${at}-active`]:Ae,[`${at}-block`]:Ge},Xe,Re,tn);return xt(Ie.createElement("div",{className:Jt},Ie.createElement(he,Object.assign({prefixCls:`${at}-button`,size:Ke},nn))))};const We="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=qe=>{const{prefixCls:Ue,className:Xe,rootClassName:Re,style:Ae,active:Ge}=qe,{getPrefixCls:Ke}=Ie.useContext(Te.E_),Ze=Ke("skeleton",Ue),[at,xt]=ke(Ze),tn=me()(Ze,`${Ze}-element`,{[`${Ze}-active`]:Ge},Xe,Re,xt);return at(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:We,className:`${Ze}-image-path`})))))},it=qe=>{const{prefixCls:Ue,className:Xe,rootClassName:Re,active:Ae,block:Ge,size:Ke="default"}=qe,{getPrefixCls:Ze}=Ie.useContext(Te.E_),at=Ze("skeleton",Ue),[xt,tn]=ke(at),nn=(0,be.Z)(qe,["prefixCls"]),Jt=me()(at,`${at}-element`,{[`${at}-active`]:Ae,[`${at}-block`]:Ge},Xe,Re,tn);return xt(Ie.createElement("div",{className:Jt},Ie.createElement(he,Object.assign({prefixCls:`${at}-input`,size:Ke},nn))))},yt=Ee(92413),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(Ue,Xe){return Ie.createElement(ht.Z,(0,yt.Z)({},Ue,{ref:Xe,icon:Ft}))},dt=Ie.forwardRef(rt),St=dt,vt=qe=>{const{prefixCls:Ue,className:Xe,rootClassName:Re,style:Ae,active:Ge,children:Ke}=qe,{getPrefixCls:Ze}=Ie.useContext(Te.E_),at=Ze("skeleton",Ue),[xt,tn]=ke(at),nn=me()(at,`${at}-element`,{[`${at}-active`]:Ge},tn,Xe,Re),Jt=Ke!=null?Ke:Ie.createElement(St,null);return xt(Ie.createElement("div",{className:nn},Ie.createElement("div",{className:me()(`${at}-image`,Xe),style:Ae},Jt)))},Bt=Ee(26407),ln=qe=>{const Ue=Ze=>{const{width:at,rows:xt=2}=qe;if(Array.isArray(at))return at[Ze];if(xt-1===Ze)return at},{prefixCls:Xe,className:Re,style:Ae,rows:Ge}=qe,Ke=(0,Bt.Z)(Array(Ge)).map((Ze,at)=>Ie.createElement("li",{key:at,style:{width:Ue(at)}}));return Ie.createElement("ul",{className:me()(Xe,Re),style:Ae},Ke)},yn=qe=>{let{prefixCls:Ue,className:Xe,width:Re,style:Ae}=qe;return Ie.createElement("h3",{className:me()(Ue,Xe),style:Object.assign({width:Re},Ae)})};function Ut(qe){return qe&&typeof qe=="object"?qe:{}}function Wt(qe,Ue){return qe&&!Ue?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Xt(qe,Ue){return!qe&&Ue?{width:"38%"}:qe&&Ue?{width:"50%"}:{}}function mt(qe,Ue){const Xe={};return(!qe||!Ue)&&(Xe.width="61%"),!qe&&Ue?Xe.rows=3:Xe.rows=2,Xe}const ze=qe=>{const{prefixCls:Ue,loading:Xe,className:Re,rootClassName:Ae,style:Ge,children:Ke,avatar:Ze=!1,title:at=!0,paragraph:xt=!0,active:tn,round:nn}=qe,{getPrefixCls:Jt,direction:pn,skeleton:Mn}=Ie.useContext(Te.E_),hn=Jt("skeleton",Ue),[En,Wn]=ke(hn);if(Xe||!("loading"in qe)){const Tn=!!Ze,ci=!!at,ri=!!xt;let Ii;if(Tn){const Ji=Object.assign(Object.assign({prefixCls:`${hn}-avatar`},Wt(ci,ri)),Ut(Ze));Ii=Ie.createElement("div",{className:`${hn}-header`},Ie.createElement(he,Object.assign({},Ji)))}let bi;if(ci||ri){let Ji;if(ci){const cr=Object.assign(Object.assign({prefixCls:`${hn}-title`},Xt(Tn,ri)),Ut(at));Ji=Ie.createElement(yn,Object.assign({},cr))}let gr;if(ri){const cr=Object.assign(Object.assign({prefixCls:`${hn}-paragraph`},mt(Tn,ci)),Ut(xt));gr=Ie.createElement(ln,Object.assign({},cr))}bi=Ie.createElement("div",{className:`${hn}-content`},Ji,gr)}const nr=me()(hn,{[`${hn}-with-avatar`]:Tn,[`${hn}-active`]:tn,[`${hn}-rtl`]:pn==="rtl",[`${hn}-round`]:nn},Mn==null?void 0:Mn.className,Re,Ae,Wn);return En(Ie.createElement("div",{className:nr,style:Object.assign(Object.assign({},Mn==null?void 0:Mn.style),Ge)},Ii,bi))}return typeof Ke!="undefined"?Ke:null};ze.Button=Qe,ze.Avatar=je,ze.Input=it,ze.Image=ct,ze.Node=vt;var Be=ze,et=Be},81327:function(bn,qt,Ee){"use strict";Ee.d(qt,{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:We,direction:gt="horizontal",prefixCls:ct,split:Ct,style:it,wrap:yt=!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],St=ve(dt),Et=ve(rt),vt=de(dt),Bt=de(rt),jt=(0,Te.Z)(We,{keepEmpty:!0}),ln=je===void 0&>==="horizontal"?"center":je,$t=we("space",ct),[yn,Ut]=(0,ce.Z)($t),Wt=Ie()($t,Ce==null?void 0:Ce.className,Ut,`${$t}-${gt}`,{[`${$t}-rtl`]:ke==="rtl",[`${$t}-align-${ln}`]:ln,[`${$t}-gap-row-${dt}`]:St,[`${$t}-gap-col-${rt}`]:Et},Ve,Qe),Xt=Ie()(`${$t}-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 mt=0;const ze=jt.map((qe,Ue)=>{var Xe,Re;qe!=null&&(mt=Ue);const Ae=qe&&qe.key||`${Xt}-${Ue}`;return Le.createElement(ge,{className:Xt,key:Ae,index:Ue,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},qe)}),Be=Le.useMemo(()=>({latestIndex:mt}),[mt]);if(jt.length===0)return null;const et={};return yt&&(et.flexWrap="wrap"),!Et&&Bt&&(et.columnGap=rt),!St&&vt&&(et.rowGap=dt),yn(Le.createElement("div",Object.assign({ref:se,className:Wt,style:Object.assign(Object.assign(Object.assign({},et),Ce==null?void 0:Ce.style),it)},ht),Le.createElement(Se,{value:Be},ze)))});ee.Compact=Pe.ZP;var oe=ee},31797:function(bn,qt,Ee){"use strict";Ee.d(qt,{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:We,groupSeparator:gt="",prefixCls:ct}=Ne;let Ct;if(typeof Ve=="function")Ct=Ve(je);else{const it=String(je),yt=it.match(/^(-?)(\d*)(\.(\d+))?$/);if(!yt||it==="-")Ct=it;else{const ut=yt[1];let Ft=yt[2]||"0",ht=yt[4]||"";Ft=Ft.replace(/\B(?=(\d{3})+(?!\d))/g,gt),typeof Qe=="number"&&(ht=ht.padEnd(Qe,"0").slice(0,Qe>0?Qe:0)),ht&&(ht=`${We}${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:We,titleFontSize:gt,colorTextHeading:ct,contentFontSize:Ct,fontFamily:it}=Ne;return{[`${je}`]:Object.assign(Object.assign({},(0,ge.Wf)(Ne)),{[`${je}-title`]:{marginBottom:Ve,color:We,fontSize:gt},[`${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:We,valueStyle:gt,value:ct=0,title:Ct,valueRender:it,prefix:yt,suffix:ut,loading:Ft=!1,onMouseEnter:ht,onMouseLeave:rt,decimalSeparator:dt=".",groupSeparator:St=","}=Ne,{getPrefixCls:Et,direction:vt,statistic:Bt}=Le.useContext(Pe.E_),jt=Et("statistic",je),[ln,$t]=ue(jt),yn=Le.createElement(xe,Object.assign({decimalSeparator:dt,groupSeparator:St,prefixCls:jt},Ne,{value:ct})),Ut=be()(jt,{[`${jt}-rtl`]:vt==="rtl"},Bt==null?void 0:Bt.className,Ve,Qe,$t);return ln(Le.createElement("div",{className:Ut,style:Object.assign(Object.assign({},Bt==null?void 0:Bt.style),We),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:gt,className:`${jt}-content`},yt&&Le.createElement("span",{className:`${jt}-content-prefix`},yt),it?it(yn):yn,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,We=(je.match(Qe)||[]).map(it=>it.slice(1,-1)),gt=je.replace(Qe,"[]"),ct=oe.reduce((it,yt)=>{let[ut,Ft]=yt;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},gt);let Ct=0;return ct.replace(Qe,()=>{const it=We[Ct];return Ct+=1,it})}function se(Ne,je){const{format:Ve=""}=je,Qe=new Date(Ne).getTime(),We=Date.now(),gt=Math.max(Qe-We,0);return ie(gt,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:We}=Ne,gt=(0,me.Z)(),ct=Le.useRef(null),Ct=()=>{We==null||We(),ct.current&&(clearInterval(ct.current),ct.current=null)},it=()=>{const Ft=ye(je);Ft>=Date.now()&&(ct.current=setInterval(()=>{gt(),Qe==null||Qe(Ft-Date.now()),Ft<Date.now()&&Ct()},le))};Le.useEffect(()=>(it(),()=>{ct.current&&(clearInterval(ct.current),ct.current=null)}),[je]);const yt=(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:yt}))};var Ce=Le.memo(we);ee.Countdown=Ce;var ke=ee},15969:function(bn,qt,Ee){"use strict";Ee.d(qt,{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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return gt}});var Le=Ee(58617),me=Ee(92310),Ie=Ee.n(me),Te=Ee(92413),be=Ee(400),Pe=Ee(33606),he=Ee(37061),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,yt=ct.prefixCls,ut=yt===void 0?"rc-switch":yt,Ft=ct.className,ht=ct.checked,rt=ct.defaultChecked,dt=ct.disabled,St=ct.loadingIcon,Et=ct.checkedChildren,vt=ct.unCheckedChildren,Bt=ct.onClick,jt=ct.onChange,ln=ct.onKeyDown,$t=(0,he.Z)(ct,ce),yn=(0,xe.Z)(!1,{value:ht,defaultValue:rt}),Ut=(0,Pe.Z)(yn,2),Wt=Ut[0],Xt=Ut[1];function mt(qe,Ue){var Xe=Wt;return dt||(Xe=qe,Xt(Xe),jt==null||jt(Xe,Ue)),Xe}function ze(qe){qe.which===ge.Z.LEFT?mt(!1,qe):qe.which===ge.Z.RIGHT&&mt(!0,qe),ln==null||ln(qe)}function Be(qe){var Ue=mt(!Wt,qe);Bt==null||Bt(Ue,qe)}var et=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)({},$t,{type:"button",role:"switch","aria-checked":Wt,disabled:dt,className:et,ref:Ct,onKeyDown:ze,onClick:Be}),St,Se.createElement("span",{className:"".concat(ut,"-inner")},Se.createElement("span",{className:"".concat(ut,"-inner-checked")},Et),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:yt,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+yt*2}px - ${ht*2}px)`,marginInlineEnd:`calc(100% - ${rt+yt*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+yt*2}px + ${ht*2}px)`,marginInlineEnd:`calc(-100% + ${rt+yt*2}px - ${ht*2}px)`}},[`${Ct}-handle`]:{insetInlineStart:`calc(100% - ${rt+yt}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:yt,handleBg:ut,handleShadow:Ft,handleSize:ht}=ct,rt=`${Ct}-handle`;return{[Ct]:{[rt]:{position:"absolute",top:yt,insetInlineStart:yt,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+yt}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:yt,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+yt*2}px - ${Ft*2}px)`,marginInlineEnd:`calc(100% - ${ht+yt*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+yt*2}px + ${Ft*2}px)`,marginInlineEnd:`calc(-100% + ${ht+yt*2}px - ${Ft*2}px)`}},[`&:not(${Ct}-disabled):active`]:{[`&:not(${Ct}-checked) ${rt}`]:{[`${rt}-unchecked`]:{marginInlineStart:yt*2,marginInlineEnd:-yt*2}},[`&${Ct}-checked ${rt}`]:{[`${rt}-checked`]:{marginInlineStart:-yt*2,marginInlineEnd:yt*2}}}}}},je=ct=>{const{componentCls:Ct,trackHeight:it,trackMinWidth:yt}=ct;return{[Ct]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,se.Wf)(ct)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:yt,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:yt,colorWhite:ut}=ct,Ft=Ct*it,ht=yt/2,rt=2,dt=Ft-rt*2,St=ht-rt*2;return{trackHeight:Ft,trackHeightSM:ht,trackMinWidth:dt*2+rt*4,trackMinWidthSM:St*2+rt*2,trackPadding:rt,handleBg:ut,handleSize:dt,handleSizeSM:St,handleShadow:`0 2px 4px 0 ${new ie.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:dt/2,innerMaxMargin:dt+rt+rt*2,innerMinMarginSM:St/2,innerMaxMarginSM:St+rt+rt*2}}),Qe=function(ct,Ct){var it={};for(var yt in ct)Object.prototype.hasOwnProperty.call(ct,yt)&&Ct.indexOf(yt)<0&&(it[yt]=ct[yt]);if(ct!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,yt=Object.getOwnPropertySymbols(ct);ut<yt.length;ut++)Ct.indexOf(yt[ut])<0&&Object.prototype.propertyIsEnumerable.call(ct,yt[ut])&&(it[yt[ut]]=ct[yt[ut]]);return it};const We=Se.forwardRef((ct,Ct)=>{const{prefixCls:it,size:yt,disabled:ut,loading:Ft,className:ht,rootClassName:rt,style:dt}=ct,St=Qe(ct,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:Et,direction:vt,switch:Bt}=Se.useContext(z.E_),jt=Se.useContext(ee.Z),ln=(ut!=null?ut:jt)||Ft,$t=Et("switch",it),yn=Se.createElement("div",{className:`${$t}-handle`},Ft&&Se.createElement(Le.Z,{className:`${$t}-loading-icon`})),[Ut,Wt]=Ve($t),Xt=(0,oe.Z)(yt),mt=Ie()(Bt==null?void 0:Bt.className,{[`${$t}-small`]:Xt==="small",[`${$t}-loading`]:Ft,[`${$t}-rtl`]:vt==="rtl"},ht,rt,Wt),ze=Object.assign(Object.assign({},Bt==null?void 0:Bt.style),dt);return Ut(Se.createElement(ue.Z,{component:"Switch"},Se.createElement(de,Object.assign({},St,{prefixCls:$t,className:mt,style:ze,disabled:ln,ref:Ct,loadingIcon:yn}))))});We.__ANT_SWITCH=!0;var gt=We},1710:function(bn,qt,Ee){"use strict";Ee.d(qt,{default:function(){return gf}});var Le={},me="rc-table-internal-hook",Ie=Ee(33606),Te=Ee(6089),be=Ee(34280),Pe=Ee(13697),he=Ee(59301),Se=Ee(4676);function xe(Rt){var zt=he.createContext(void 0),an=function(Pt){var Lt=Pt.value,vn=Pt.children,cn=he.useRef(Lt);cn.current=Lt;var sn=he.useState(function(){return{getValue:function(){return cn.current},listeners:new Set}}),gn=(0,Ie.Z)(sn,1),mn=gn[0];return(0,be.Z)(function(){(0,Se.unstable_batchedUpdates)(function(){mn.listeners.forEach(function(xn){xn(Lt)})})},[Lt]),he.createElement(zt.Provider,{value:mn},vn)};return{Context:zt,Provider:an,defaultValue:Rt}}function ge(Rt,zt){var an=(0,Te.Z)(typeof zt=="function"?zt:function(xn){if(zt===void 0)return xn;if(!Array.isArray(zt))return xn[zt];var jn={};return zt.forEach(function(ti){jn[ti]=xn[ti]}),jn}),pt=he.useContext(Rt==null?void 0:Rt.Context),Pt=pt||{},Lt=Pt.listeners,vn=Pt.getValue,cn=he.useRef();cn.current=an(pt?vn():Rt==null?void 0:Rt.defaultValue);var sn=he.useState({}),gn=(0,Ie.Z)(sn,2),mn=gn[1];return(0,be.Z)(function(){if(!pt)return;function xn(jn){var ti=an(jn);(0,Pe.Z)(cn.current,ti,!0)||mn({})}return Lt.add(xn),function(){Lt.delete(xn)}},[pt]),cn.current}var ce=Ee(92413),ve=Ee(8654);function de(){var Rt=he.createContext(null);function zt(){return he.useContext(Rt)}function an(Pt,Lt){var vn=(0,ve.Yr)(Pt),cn=function(gn,mn){var xn=vn?{ref:mn}:{},jn=he.useRef(0),ti=he.useRef(gn),Zn=zt();return Zn!==null?he.createElement(Pt,(0,ce.Z)({},gn,xn)):((!Lt||Lt(ti.current,gn))&&(jn.current+=1),ti.current=gn,he.createElement(Rt.Provider,{value:jn.current},he.createElement(Pt,(0,ce.Z)({},gn,xn))))};return vn?he.forwardRef(cn):cn}function pt(Pt,Lt){var vn=(0,ve.Yr)(Pt),cn=function(gn,mn){var xn=vn?{ref:mn}:{};return zt(),he.createElement(Pt,(0,ce.Z)({},gn,xn))};return vn?he.memo(he.forwardRef(cn),Lt):he.memo(cn,Lt)}return{makeImmutable:an,responseImmutable:pt,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 an=he.useRef(0);an.current+=1;var pt=he.useRef(Rt),Pt=[];Object.keys(Rt||{}).map(function(vn){var cn;(Rt==null?void 0:Rt[vn])!==((cn=pt.current)===null||cn===void 0?void 0:cn[vn])&&Pt.push(vn)}),pt.current=Rt;var Lt=he.useRef([]);return Pt.length&&(Lt.current=Pt),he.useDebugValue(an.current),he.useDebugValue(Lt.current.join(", ")),zt&&console.log("".concat(zt,":"),an.current,Lt.current),an.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(39559),Qe=Ee(33708),We=Ee(400),gt=Ee(92310),ct=Ee.n(gt),Ct=Ee(80547),it=Ee(97938),yt=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=[],an={};return Rt.forEach(function(pt){for(var Pt=pt||{},Lt=Pt.key,vn=Pt.dataIndex,cn=Lt||rt(vn).join("-")||ht;an[cn];)cn="".concat(cn,"_next");an[cn]=!0,zt.push(cn)}),zt}function St(Rt){return Rt!=null}function Et(Rt){return Rt&&(0,Ve.Z)(Rt)==="object"&&!Array.isArray(Rt)&&!he.isValidElement(Rt)}function vt(Rt,zt,an,pt,Pt,Lt){var vn=he.useContext(Ft),cn=ye(),sn=(0,Ct.Z)(function(){if(St(pt))return[pt];var gn=zt==null||zt===""?[]:Array.isArray(zt)?zt:[zt],mn=(0,it.Z)(Rt,gn),xn=mn,jn=void 0;if(Pt){var ti=Pt(mn,Rt,an);Et(ti)?(xn=ti.children,jn=ti.props,vn.renderWithProps=!0):xn=ti}return[xn,jn]},[cn,Rt,pt,zt,Pt,an],function(gn,mn){if(Lt){var xn=(0,Ie.Z)(gn,2),jn=xn[1],ti=(0,Ie.Z)(mn,2),Zn=ti[1];return Lt(Zn,jn)}return vn.renderWithProps?!0:!(0,Pe.Z)(gn,mn,!0)});return sn}function Bt(Rt,zt,an,pt){var Pt=Rt+zt-1;return Rt<=pt&&Pt>=an}function jt(Rt,zt){return ge(Ce,function(an){var pt=Bt(Rt,zt||1,an.hoverStartRow,an.hoverEndRow);return[pt,an.onHover]})}var ln=function(zt){var an=zt.ellipsis,pt=zt.rowType,Pt=zt.children,Lt,vn=an===!0?{showTitle:!0}:an;return vn&&(vn.showTitle||pt==="header")&&(typeof Pt=="string"||typeof Pt=="number"?Lt=Pt.toString():he.isValidElement(Pt)&&typeof Pt.props.children=="string"&&(Lt=Pt.props.children)),Lt};function $t(Rt){var zt,an,pt,Pt,Lt,vn,cn,sn,gn=Rt.component,mn=Rt.children,xn=Rt.ellipsis,jn=Rt.scope,ti=Rt.prefixCls,Zn=Rt.className,xi=Rt.align,Kn=Rt.record,mi=Rt.render,ai=Rt.dataIndex,Ri=Rt.renderIndex,Oi=Rt.shouldCellUpdate,Zi=Rt.index,Ai=Rt.rowType,Ni=Rt.colSpan,ur=Rt.rowSpan,ei=Rt.fixLeft,Gi=Rt.fixRight,Ei=Rt.firstFixLeft,wi=Rt.lastFixLeft,Yi=Rt.firstFixRight,gi=Rt.lastFixRight,dr=Rt.appendNode,Xi=Rt.additionalProps,Pi=Xi===void 0?{}:Xi,Ki=Rt.isSticky,vr="".concat(ti,"-cell"),or=ge(Ce,["supportSticky","allColumnsFixedLeft"]),wo=or.supportSticky,Eo=or.allColumnsFixedLeft,ns=vt(Kn,ai,Ri,mn,mi,Oi),uo=(0,Ie.Z)(ns,2),Nr=uo[0],Io=uo[1],Dr={},Vr=typeof ei=="number"&&wo,is=typeof Gi=="number"&&wo;Vr&&(Dr.position="sticky",Dr.left=ei),is&&(Dr.position="sticky",Dr.right=Gi);var Ur=(zt=(an=(pt=Io==null?void 0:Io.colSpan)!==null&&pt!==void 0?pt:Pi.colSpan)!==null&&an!==void 0?an:Ni)!==null&&zt!==void 0?zt:1,Tr=(Pt=(Lt=(vn=Io==null?void 0:Io.rowSpan)!==null&&vn!==void 0?vn:Pi.rowSpan)!==null&&Lt!==void 0?Lt:ur)!==null&&Pt!==void 0?Pt:1,$r=jt(Zi,Tr),_r=(0,Ie.Z)($r,2),co=_r[0],kr=_r[1],mo=function(xs){var Xs;Kn&&kr(Zi,Zi+Tr-1),Pi==null||(Xs=Pi.onMouseEnter)===null||Xs===void 0||Xs.call(Pi,xs)},Go=function(xs){var Xs;Kn&&kr(-1,-1),Pi==null||(Xs=Pi.onMouseLeave)===null||Xs===void 0||Xs.call(Pi,xs)};if(Ur===0||Tr===0)return null;var Wo=(cn=Pi.title)!==null&&cn!==void 0?cn:ln({rowType:Ai,ellipsis:xn,children:Nr}),Yr=ct()(vr,Zn,(sn={},(0,We.Z)(sn,"".concat(vr,"-fix-left"),Vr&&wo),(0,We.Z)(sn,"".concat(vr,"-fix-left-first"),Ei&&wo),(0,We.Z)(sn,"".concat(vr,"-fix-left-last"),wi&&wo),(0,We.Z)(sn,"".concat(vr,"-fix-left-all"),wi&&Eo&&wo),(0,We.Z)(sn,"".concat(vr,"-fix-right"),is&&wo),(0,We.Z)(sn,"".concat(vr,"-fix-right-first"),Yi&&wo),(0,We.Z)(sn,"".concat(vr,"-fix-right-last"),gi&&wo),(0,We.Z)(sn,"".concat(vr,"-ellipsis"),xn),(0,We.Z)(sn,"".concat(vr,"-with-append"),dr),(0,We.Z)(sn,"".concat(vr,"-fix-sticky"),(Vr||is)&&Ki&&wo),(0,We.Z)(sn,"".concat(vr,"-row-hover"),!Io&&co),sn),Pi.className,Io==null?void 0:Io.className),Ro={};xi&&(Ro.textAlign=xi);var _s=(0,Qe.Z)((0,Qe.Z)((0,Qe.Z)((0,Qe.Z)({},Dr),Pi.style),Ro),Io==null?void 0:Io.style),Ao=Nr;return(0,Ve.Z)(Ao)==="object"&&!Array.isArray(Ao)&&!he.isValidElement(Ao)&&(Ao=null),xn&&(wi||Yi)&&(Ao=he.createElement("span",{className:"".concat(vr,"-content")},Ao)),he.createElement(gn,(0,ce.Z)({},Io,Pi,{className:Yr,style:_s,title:Wo,scope:jn,onMouseEnter:mo,onMouseLeave:Go,colSpan:Ur!==1?Ur:null,rowSpan:Tr!==1?Tr:null}),dr,Ao)}var yn=he.memo($t);function Ut(Rt,zt,an,pt,Pt,Lt){var vn=an[Rt]||{},cn=an[zt]||{},sn,gn;vn.fixed==="left"?sn=pt.left[Pt==="rtl"?zt:Rt]:cn.fixed==="right"&&(gn=pt.right[Pt==="rtl"?Rt:zt]);var mn=!1,xn=!1,jn=!1,ti=!1,Zn=an[zt+1],xi=an[Rt-1],Kn=!(Lt!=null&&Lt.children);if(Pt==="rtl"){if(sn!==void 0){var mi=xi&&xi.fixed==="left";ti=!mi&&Kn}else if(gn!==void 0){var ai=Zn&&Zn.fixed==="right";jn=!ai&&Kn}}else if(sn!==void 0){var Ri=Zn&&Zn.fixed==="left";mn=!Ri&&Kn}else if(gn!==void 0){var Oi=xi&&xi.fixed==="right";xn=!Oi&&Kn}return{fixLeft:sn,fixRight:gn,lastFixLeft:mn,firstFixRight:xn,lastFixRight:jn,firstFixLeft:ti,isSticky:pt.isSticky}}var Wt=he.createContext({}),Xt=Wt;function mt(Rt){var zt=Rt.className,an=Rt.index,pt=Rt.children,Pt=Rt.colSpan,Lt=Pt===void 0?1:Pt,vn=Rt.rowSpan,cn=Rt.align,sn=ge(Ce,["prefixCls","direction"]),gn=sn.prefixCls,mn=sn.direction,xn=he.useContext(Xt),jn=xn.scrollColumnIndex,ti=xn.stickyOffsets,Zn=xn.flattenColumns,xi=xn.columns,Kn=an+Lt-1,mi=Kn+1===jn?Lt+1:Lt,ai=Ut(an,an+mi-1,Zn,ti,mn,xi==null?void 0:xi[an]);return he.createElement(yn,(0,ce.Z)({className:zt,index:an,component:"td",prefixCls:gn,record:null,dataIndex:null,align:cn,colSpan:mi,rowSpan:vn,render:function(){return pt}},ai))}var ze=Ee(37061),Be=["children"];function et(Rt){var zt=Rt.children,an=(0,ze.Z)(Rt,Be);return he.createElement("tr",an,zt)}function qe(Rt){var zt=Rt.children;return zt}qe.Row=et,qe.Cell=mt;var Ue=qe;function Xe(Rt){var zt=Rt.children,an=Rt.stickyOffsets,pt=Rt.flattenColumns,Pt=Rt.columns,Lt=ge(Ce,"prefixCls"),vn=pt.length-1,cn=pt[vn],sn=he.useMemo(function(){return{stickyOffsets:an,flattenColumns:pt,scrollColumnIndex:cn!=null&&cn.scrollbar?vn:null,columns:Pt}},[cn,pt,vn,an,Pt]);return he.createElement(Xt.Provider,{value:sn},he.createElement("tfoot",{className:"".concat(Lt,"-summary")},zt))}var Re=le(Xe),Ae=Ue,Ge=Ee(70425),Ke=Ee(29301),Ze=Ee(29194),at=Ee(24514),xt=Ee(75152),tn=Ee(26112);function nn(Rt,zt,an,pt,Pt,Lt,vn){Rt.push({record:zt,indent:an,index:vn});var cn=Lt(zt),sn=Pt==null?void 0:Pt.has(cn);if(zt&&Array.isArray(zt[pt])&&sn)for(var gn=0;gn<zt[pt].length;gn+=1)nn(Rt,zt[pt][gn],an+1,pt,Pt,Lt,gn)}function Jt(Rt,zt,an,pt){var Pt=he.useMemo(function(){if(an!=null&&an.size){for(var Lt=[],vn=0;vn<(Rt==null?void 0:Rt.length);vn+=1){var cn=Rt[vn];nn(Lt,cn,0,zt,an,pt,vn)}return Lt}return Rt==null?void 0:Rt.map(function(sn,gn){return{record:sn,indent:0,index:gn}})},[Rt,zt,an,pt]);return Pt}function pn(Rt){var zt=Rt.prefixCls,an=Rt.children,pt=Rt.component,Pt=Rt.cellComponent,Lt=Rt.className,vn=Rt.expanded,cn=Rt.colSpan,sn=Rt.isEmpty,gn=ge(Ce,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),mn=gn.scrollbarSize,xn=gn.fixHeader,jn=gn.fixColumn,ti=gn.componentWidth,Zn=gn.horizonScroll,xi=an;return(sn?Zn&&ti:jn)&&(xi=he.createElement("div",{style:{width:ti-(xn?mn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(zt,"-expanded-row-fixed")},xi)),he.createElement(pt,{className:Lt,style:{display:vn?null:"none"}},he.createElement(yn,{component:Pt,prefixCls:zt,colSpan:cn},xi))}var Mn=pn;function hn(Rt,zt,an,pt){var Pt=ge(Ce,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Lt=Pt.flattenColumns,vn=Pt.expandableType,cn=Pt.expandedKeys,sn=Pt.childrenColumnName,gn=Pt.onTriggerExpand,mn=Pt.rowExpandable,xn=Pt.onRow,jn=Pt.expandRowByClick,ti=Pt.rowClassName,Zn=vn==="nest",xi=vn==="row"&&(!mn||mn(Rt)),Kn=xi||Zn,mi=cn&&cn.has(zt),ai=sn&&Rt&&Rt[sn],Ri=(0,Ge.useEvent)(gn),Oi=xn==null?void 0:xn(Rt,an),Zi=Oi==null?void 0:Oi.onClick,Ai=function(Gi){jn&&Kn&&gn(Rt,Gi);for(var Ei=arguments.length,wi=new Array(Ei>1?Ei-1:0),Yi=1;Yi<Ei;Yi++)wi[Yi-1]=arguments[Yi];Zi==null||Zi.apply(void 0,[Gi].concat(wi))},Ni;typeof ti=="string"?Ni=ti:typeof ti=="function"&&(Ni=ti(Rt,an,pt));var ur=dt(Lt);return(0,Qe.Z)((0,Qe.Z)({},Pt),{},{columnsKey:ur,nestExpandable:Zn,expanded:mi,hasNestChildren:ai,record:Rt,onTriggerExpand:Ri,rowSupportExpand:xi,expandable:Kn,rowProps:(0,Qe.Z)((0,Qe.Z)({},Oi),{},{className:ct()(Ni,Oi==null?void 0:Oi.className),onClick:Ai})})}function En(Rt,zt,an,pt,Pt){var Lt=Rt.record,vn=Rt.prefixCls,cn=Rt.columnsKey,sn=Rt.fixedInfoList,gn=Rt.expandIconColumnIndex,mn=Rt.nestExpandable,xn=Rt.indentSize,jn=Rt.expandIcon,ti=Rt.expanded,Zn=Rt.hasNestChildren,xi=Rt.onTriggerExpand,Kn=cn[an],mi=sn[an],ai;an===(gn||0)&&mn&&(ai=he.createElement(he.Fragment,null,he.createElement("span",{style:{paddingLeft:"".concat(xn*pt,"px")},className:"".concat(vn,"-row-indent indent-level-").concat(pt)}),jn({prefixCls:vn,expanded:ti,expandable:Zn,record:Lt,onExpand:xi})));var Ri;return zt.onCell&&(Ri=zt.onCell(Lt,Pt)),{key:Kn,fixedInfo:mi,appendCellNode:ai,additionalCellProps:Ri||{}}}function Wn(Rt){var zt=Rt.className,an=Rt.style,pt=Rt.record,Pt=Rt.index,Lt=Rt.renderIndex,vn=Rt.rowKey,cn=Rt.indent,sn=cn===void 0?0:cn,gn=Rt.rowComponent,mn=Rt.cellComponent,xn=Rt.scopeCellComponent,jn=hn(pt,vn,Pt,sn),ti=jn.prefixCls,Zn=jn.flattenColumns,xi=jn.expandedRowClassName,Kn=jn.expandedRowRender,mi=jn.rowProps,ai=jn.expanded,Ri=jn.rowSupportExpand,Oi=he.useState(!1),Zi=(0,Ie.Z)(Oi,2),Ai=Zi[0],Ni=Zi[1];he.useEffect(function(){ai&&Ni(!0)},[ai]);var ur=he.createElement(gn,(0,ce.Z)({},mi,{"data-row-key":vn,className:ct()(zt,"".concat(ti,"-row"),"".concat(ti,"-row-level-").concat(sn),mi==null?void 0:mi.className),style:(0,Qe.Z)((0,Qe.Z)({},an),mi==null?void 0:mi.style)}),Zn.map(function(wi,Yi){var gi=wi.render,dr=wi.dataIndex,Xi=wi.className,Pi=En(jn,wi,Yi,sn,Pt),Ki=Pi.key,vr=Pi.fixedInfo,or=Pi.appendCellNode,wo=Pi.additionalCellProps;return he.createElement(yn,(0,ce.Z)({className:Xi,ellipsis:wi.ellipsis,align:wi.align,scope:wi.rowScope,component:wi.rowScope?xn:mn,prefixCls:ti,key:Ki,record:pt,index:Pt,renderIndex:Lt,dataIndex:dr,render:gi,shouldCellUpdate:wi.shouldCellUpdate},vr,{appendNode:or,additionalProps:wo}))})),ei;if(Ri&&(Ai||ai)){var Gi=Kn(pt,Pt,sn+1,ai),Ei=xi&&xi(pt,Pt,sn);ei=he.createElement(Mn,{expanded:ai,className:ct()("".concat(ti,"-expanded-row"),"".concat(ti,"-expanded-row-level-").concat(sn+1),Ei),prefixCls:ti,component:gn,cellComponent:mn,colSpan:Zn.length,isEmpty:!1},Gi)}return he.createElement(he.Fragment,null,ur,ei)}Wn.displayName="BodyRow";var Tn=le(Wn);function ci(Rt){var zt=Rt.columnKey,an=Rt.onColumnResize,pt=he.useRef();return he.useEffect(function(){pt.current&&an(zt,pt.current.offsetWidth)},[]),he.createElement(Ke.Z,{data:zt},he.createElement("td",{ref:pt,style:{padding:0,border:0,height:0}},he.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ri(Rt){var zt=Rt.prefixCls,an=Rt.columnsKey,pt=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(vn){var cn=vn.data,sn=vn.size;pt(cn,sn.offsetWidth)})}},an.map(function(Pt){return he.createElement(ci,{key:Pt,columnKey:Pt,onColumnResize:pt})})))}function Ii(Rt){var zt=Rt.data,an=Rt.measureColumnWidth,pt=ge(Ce,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Pt=pt.prefixCls,Lt=pt.getComponent,vn=pt.onColumnResize,cn=pt.flattenColumns,sn=pt.getRowKey,gn=pt.expandedKeys,mn=pt.childrenColumnName,xn=pt.emptyNode,jn=Jt(zt,mn,gn,sn),ti=he.useRef({renderWithProps:!1}),Zn=Lt(["body","wrapper"],"tbody"),xi=Lt(["body","row"],"tr"),Kn=Lt(["body","cell"],"td"),mi=Lt(["body","cell"],"th"),ai;zt.length?ai=jn.map(function(Oi,Zi){var Ai=Oi.record,Ni=Oi.indent,ur=Oi.index,ei=sn(Ai,Zi);return he.createElement(Tn,{key:ei,rowKey:ei,record:Ai,index:Zi,renderIndex:ur,rowComponent:xi,cellComponent:Kn,scopeCellComponent:mi,getRowKey:sn,indent:Ni})}):ai=he.createElement(Mn,{expanded:!0,className:"".concat(Pt,"-placeholder"),prefixCls:Pt,component:xi,cellComponent:Kn,colSpan:cn.length,isEmpty:!0},xn);var Ri=dt(cn);return he.createElement(Ft.Provider,{value:ti.current},he.createElement(Zn,{className:"".concat(Pt,"-tbody")},an&&he.createElement(ri,{prefixCls:Pt,columnsKey:Ri,onColumnResize:vn}),ai))}Ii.displayName="Body";var bi=le(Ii),nr=["expandable"],Ji="RC_TABLE_INTERNAL_COL_DEFINE";function gr(Rt){var zt=Rt.expandable,an=(0,ze.Z)(Rt,nr),pt;return"expandable"in Rt?pt=(0,Qe.Z)((0,Qe.Z)({},an),zt):pt=an,pt.showExpandColumn===!1&&(pt.expandIconColumnIndex=-1),pt}var cr=["columnType"];function eo(Rt){for(var zt=Rt.colWidths,an=Rt.columns,pt=Rt.columCount,Pt=[],Lt=pt||an.length,vn=!1,cn=Lt-1;cn>=0;cn-=1){var sn=zt[cn],gn=an&&an[cn],mn=gn&&gn[Ji];if(sn||mn||vn){var xn=mn||{},jn=xn.columnType,ti=(0,ze.Z)(xn,cr);Pt.unshift(he.createElement("col",(0,ce.Z)({key:cn,style:{width:sn}},ti))),vn=!0}}return he.createElement("colgroup",null,Pt)}var ro=eo,hi=Ee(26407),Pr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Hi(Rt,zt){return(0,he.useMemo)(function(){for(var an=[],pt=0;pt<zt;pt+=1){var Pt=Rt[pt];if(Pt!==void 0)an[pt]=Pt;else return null}return an},[Rt.join("_"),zt])}var st=he.forwardRef(function(Rt,zt){var an=Rt.className,pt=Rt.noData,Pt=Rt.columns,Lt=Rt.flattenColumns,vn=Rt.colWidths,cn=Rt.columCount,sn=Rt.stickyOffsets,gn=Rt.direction,mn=Rt.fixHeader,xn=Rt.stickyTopOffset,jn=Rt.stickyBottomOffset,ti=Rt.stickyClassName,Zn=Rt.onScroll,xi=Rt.maxContentScroll,Kn=Rt.children,mi=(0,ze.Z)(Rt,Pr),ai=ge(Ce,["prefixCls","scrollbarSize","isSticky"]),Ri=ai.prefixCls,Oi=ai.scrollbarSize,Zi=ai.isSticky,Ai=Zi&&!mn?0:Oi,Ni=he.useRef(null),ur=he.useCallback(function(Xi){(0,ve.mH)(zt,Xi),(0,ve.mH)(Ni,Xi)},[]);he.useEffect(function(){var Xi;function Pi(Ki){var vr=Ki,or=vr.currentTarget,wo=vr.deltaX;wo&&(Zn({currentTarget:or,scrollLeft:or.scrollLeft+wo}),Ki.preventDefault())}return(Xi=Ni.current)===null||Xi===void 0||Xi.addEventListener("wheel",Pi),function(){var Ki;(Ki=Ni.current)===null||Ki===void 0||Ki.removeEventListener("wheel",Pi)}},[]);var ei=he.useMemo(function(){return Lt.every(function(Xi){return Xi.width})},[Lt]),Gi=Lt[Lt.length-1],Ei={fixed:Gi?Gi.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Ri,"-cell-scrollbar")}}},wi=(0,he.useMemo)(function(){return Ai?[].concat((0,hi.Z)(Pt),[Ei]):Pt},[Ai,Pt]),Yi=(0,he.useMemo)(function(){return Ai?[].concat((0,hi.Z)(Lt),[Ei]):Lt},[Ai,Lt]),gi=(0,he.useMemo)(function(){var Xi=sn.right,Pi=sn.left;return(0,Qe.Z)((0,Qe.Z)({},sn),{},{left:gn==="rtl"?[].concat((0,hi.Z)(Pi.map(function(Ki){return Ki+Ai})),[0]):Pi,right:gn==="rtl"?Xi:[].concat((0,hi.Z)(Xi.map(function(Ki){return Ki+Ai})),[0]),isSticky:Zi})},[Ai,sn,Zi]),dr=Hi(vn,cn);return he.createElement("div",{style:(0,Qe.Z)({overflow:"hidden"},Zi?{top:xn,bottom:jn}:{}),ref:ur,className:ct()(an,(0,We.Z)({},ti,!!ti))},he.createElement("table",{style:{tableLayout:"fixed",visibility:pt||dr?null:"hidden"}},(!pt||!xi||ei)&&he.createElement(ro,{colWidths:dr?[].concat((0,hi.Z)(dr),[Ai]):[],columCount:cn+1,columns:Yi}),Kn((0,Qe.Z)((0,Qe.Z)({},mi),{},{stickyOffsets:gi,columns:wi,flattenColumns:Yi}))))});st.displayName="FixedHolder";var Rr=he.memo(st);function Er(Rt){var zt=Rt.cells,an=Rt.stickyOffsets,pt=Rt.flattenColumns,Pt=Rt.rowComponent,Lt=Rt.cellComponent,vn=Rt.tdCellComponent,cn=Rt.onHeaderRow,sn=Rt.index,gn=ge(Ce,["prefixCls","direction"]),mn=gn.prefixCls,xn=gn.direction,jn;cn&&(jn=cn(zt.map(function(Zn){return Zn.column}),sn));var ti=dt(zt.map(function(Zn){return Zn.column}));return he.createElement(Pt,jn,zt.map(function(Zn,xi){var Kn=Zn.column,mi=Ut(Zn.colStart,Zn.colEnd,pt,an,xn,Kn),ai;return Kn&&Kn.onHeaderCell&&(ai=Zn.column.onHeaderCell(Kn)),he.createElement(yn,(0,ce.Z)({},Zn,{scope:Kn.title?Zn.colSpan>1?"colgroup":"col":null,ellipsis:Kn.ellipsis,align:Kn.align,component:Kn.title?Lt:vn,prefixCls:mn,key:ti[xi]},mi,{additionalProps:ai,rowType:"header"}))}))}Er.displayName="HeaderRow";var yo=Er;function Zr(Rt){var zt=[];function an(vn,cn){var sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;zt[sn]=zt[sn]||[];var gn=cn,mn=vn.filter(Boolean).map(function(xn){var jn={key:xn.key,className:xn.className||"",children:xn.title,column:xn,colStart:gn},ti=1,Zn=xn.children;return Zn&&Zn.length>0&&(ti=an(Zn,gn,sn+1).reduce(function(xi,Kn){return xi+Kn},0),jn.hasSubColumns=!0),"colSpan"in xn&&(ti=xn.colSpan),"rowSpan"in xn&&(jn.rowSpan=xn.rowSpan),jn.colSpan=ti,jn.colEnd=jn.colStart+ti-1,zt[sn].push(jn),gn+=ti,ti});return mn}an(Rt,0);for(var pt=zt.length,Pt=function(cn){zt[cn].forEach(function(sn){!("rowSpan"in sn)&&!sn.hasSubColumns&&(sn.rowSpan=pt-cn)})},Lt=0;Lt<pt;Lt+=1)Pt(Lt);return zt}function ao(Rt){var zt=Rt.stickyOffsets,an=Rt.columns,pt=Rt.flattenColumns,Pt=Rt.onHeaderRow,Lt=ge(Ce,["prefixCls","getComponent"]),vn=Lt.prefixCls,cn=Lt.getComponent,sn=he.useMemo(function(){return Zr(an)},[an]),gn=cn(["header","wrapper"],"thead"),mn=cn(["header","row"],"tr"),xn=cn(["header","cell"],"th"),jn=cn(["header","cell"],"td");return he.createElement(gn,{className:"".concat(vn,"-thead")},sn.map(function(ti,Zn){var xi=he.createElement(yo,{key:Zn,flattenColumns:pt,cells:ti,stickyOffsets:zt,rowComponent:mn,cellComponent:xn,tdCellComponent:jn,onHeaderRow:Pt,index:Zn});return xi}))}var Jr=le(ao),lo=Ee(11592);function oi(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 an=0,pt=0;Rt.forEach(function(gn){var mn=oi(zt,gn.width);mn?an+=mn:pt+=1});var Pt=zt-an,Lt=pt,vn=Pt/pt,cn=0,sn=Rt.map(function(gn){var mn=(0,Qe.Z)({},gn),xn=oi(zt,mn.width);if(xn)mn.width=xn;else{var jn=Math.floor(vn);mn.width=Lt===1?Pt:jn,Pt-=jn,Lt-=1}return cn+=mn.width,mn});return[sn,cn]}return[Rt,zt]},[Rt,zt])}var nt=["children"],Je=["fixed"];function wt(Rt){return(0,lo.Z)(Rt).filter(function(zt){return he.isValidElement(zt)}).map(function(zt){var an=zt.key,pt=zt.props,Pt=pt.children,Lt=(0,ze.Z)(pt,nt),vn=(0,Qe.Z)({key:an},Lt);return Pt&&(vn.children=wt(Pt)),vn})}function Nt(Rt){var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Rt.filter(function(an){return an&&(0,Ve.Z)(an)==="object"}).reduce(function(an,pt,Pt){var Lt=pt.fixed,vn=Lt===!0?"left":Lt,cn="".concat(zt,"-").concat(Pt),sn=pt.children;return sn&&sn.length>0?[].concat((0,hi.Z)(an),(0,hi.Z)(Nt(sn,cn).map(function(gn){return(0,Qe.Z)({fixed:vn},gn)}))):[].concat((0,hi.Z)(an),[(0,Qe.Z)((0,Qe.Z)({key:cn},pt),{},{fixed:vn})])},[])}function kt(Rt){for(var zt=!0,an=0;an<Rt.length;an+=1){var pt=Rt[an];if(zt&&pt.fixed!=="left")zt=!1;else if(!zt&&pt.fixed==="left"){warning(!1,"Index ".concat(an-1," of `columns` missing `fixed='left'` prop."));break}}for(var Pt=!0,Lt=Rt.length-1;Lt>=0;Lt-=1){var vn=Rt[Lt];if(Pt&&vn.fixed!=="right")Pt=!1;else if(!Pt&&vn.fixed==="right"){warning(!1,"Index ".concat(Lt+1," of `columns` missing `fixed='right'` prop."));break}}}function _t(Rt){return Rt.map(function(zt){var an=zt.fixed,pt=(0,ze.Z)(zt,Je),Pt=an;return an==="left"?Pt="right":an==="right"&&(Pt="left"),(0,Qe.Z)({fixed:Pt},pt)})}function un(Rt,zt){var an=Rt.prefixCls,pt=Rt.columns,Pt=Rt.children,Lt=Rt.expandable,vn=Rt.expandedKeys,cn=Rt.columnTitle,sn=Rt.getRowKey,gn=Rt.onTriggerExpand,mn=Rt.expandIcon,xn=Rt.rowExpandable,jn=Rt.expandIconColumnIndex,ti=Rt.direction,Zn=Rt.expandRowByClick,xi=Rt.columnWidth,Kn=Rt.fixed,mi=Rt.scrollWidth,ai=he.useMemo(function(){return pt||wt(Pt)},[pt,Pt]),Ri=he.useMemo(function(){if(Lt){var Gi,Ei=ai.slice();if(!Ei.includes(Le)){var wi=jn||0;wi>=0&&Ei.splice(wi,0,Le)}var Yi=Ei.indexOf(Le);Ei=Ei.filter(function(Pi,Ki){return Pi!==Le||Ki===Yi});var gi=ai[Yi],dr;(Kn==="left"||Kn)&&!jn?dr="left":(Kn==="right"||Kn)&&jn===ai.length?dr="right":dr=gi?gi.fixed:null;var Xi=(Gi={},(0,We.Z)(Gi,Ji,{className:"".concat(an,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,We.Z)(Gi,"title",cn),(0,We.Z)(Gi,"fixed",dr),(0,We.Z)(Gi,"className","".concat(an,"-row-expand-icon-cell")),(0,We.Z)(Gi,"width",xi),(0,We.Z)(Gi,"render",function(Ki,vr,or){var wo=sn(vr,or),Eo=vn.has(wo),ns=xn?xn(vr):!0,uo=mn({prefixCls:an,expanded:Eo,expandable:ns,record:vr,onExpand:gn});return Zn?he.createElement("span",{onClick:function(Io){return Io.stopPropagation()}},uo):uo}),Gi);return Ei.map(function(Pi){return Pi===Le?Xi:Pi})}return ai.filter(function(Pi){return Pi!==Le})},[Lt,ai,sn,vn,mn,ti]),Oi=he.useMemo(function(){var Gi=Ri;return zt&&(Gi=zt(Gi)),Gi.length||(Gi=[{render:function(){return null}}]),Gi},[zt,Ri,ti]),Zi=he.useMemo(function(){return ti==="rtl"?_t(Nt(Oi)):Nt(Oi)},[Oi,ti,mi]),Ai=$e(Zi,mi),Ni=(0,Ie.Z)(Ai,2),ur=Ni[0],ei=Ni[1];return[Oi,ur,ei]}var wn=un;function Bn(Rt){var zt,an=Rt.prefixCls,pt=Rt.record,Pt=Rt.onExpand,Lt=Rt.expanded,vn=Rt.expandable,cn="".concat(an,"-row-expand-icon");if(!vn)return he.createElement("span",{className:ct()(cn,"".concat(an,"-row-spaced"))});var sn=function(mn){Pt(pt,mn),mn.stopPropagation()};return he.createElement("span",{className:ct()(cn,(zt={},(0,We.Z)(zt,"".concat(an,"-row-expanded"),Lt),(0,We.Z)(zt,"".concat(an,"-row-collapsed"),!Lt),zt)),onClick:sn})}function zn(Rt,zt,an){var pt=[];function Pt(Lt){(Lt||[]).forEach(function(vn,cn){pt.push(zt(vn,cn)),Pt(vn[an])})}return Pt(Rt),pt}function At(Rt,zt,an){var pt=gr(Rt),Pt=pt.expandIcon,Lt=pt.expandedRowKeys,vn=pt.defaultExpandedRowKeys,cn=pt.defaultExpandAllRows,sn=pt.expandedRowRender,gn=pt.onExpand,mn=pt.onExpandedRowsChange,xn=pt.childrenColumnName,jn=Pt||Bn,ti=xn||"children",Zn=he.useMemo(function(){return sn?"row":Rt.expandable&&Rt.internalHooks===me&&Rt.expandable.__PARENT_RENDER_ICON__||zt.some(function(Zi){return Zi&&(0,Ve.Z)(Zi)==="object"&&Zi[ti]})?"nest":!1},[!!sn,zt]),xi=he.useState(function(){return vn||(cn?zn(zt,an,ti):[])}),Kn=(0,Ie.Z)(xi,2),mi=Kn[0],ai=Kn[1],Ri=he.useMemo(function(){return new Set(Lt||mi||[])},[Lt,mi]),Oi=he.useCallback(function(Zi){var Ai=an(Zi,zt.indexOf(Zi)),Ni,ur=Ri.has(Ai);ur?(Ri.delete(Ai),Ni=(0,hi.Z)(Ri)):Ni=[].concat((0,hi.Z)(Ri),[Ai]),ai(Ni),gn&&gn(!ur,Zi),mn&&mn(Ni)},[an,Ri,zt,gn,mn]);return[pt,Zn,Ri,jn,ti,Oi]}function Kt(Rt,zt,an,pt){var Pt=Rt.map(function(Lt,vn){return Ut(vn,vn,Rt,zt,an,pt==null?void 0:pt[vn])});return(0,Ct.Z)(function(){return Pt},[Pt],function(Lt,vn){return!(0,Pe.Z)(Lt,vn)})}function Sn(Rt){var zt=(0,he.useRef)(Rt),an=(0,he.useState)({}),pt=(0,Ie.Z)(an,2),Pt=pt[1],Lt=(0,he.useRef)(null),vn=(0,he.useRef)([]);function cn(sn){vn.current.push(sn);var gn=Promise.resolve();Lt.current=gn,gn.then(function(){if(Lt.current===gn){var mn=vn.current,xn=zt.current;vn.current=[],mn.forEach(function(jn){zt.current=jn(zt.current)}),Lt.current=null,xn!==zt.current&&Pt({})}})}return(0,he.useEffect)(function(){return function(){Lt.current=null}},[]),[zt.current,cn]}function kn(Rt){var zt=(0,he.useRef)(Rt||null),an=(0,he.useRef)();function pt(){window.clearTimeout(an.current)}function Pt(vn){zt.current=vn,pt(),an.current=window.setTimeout(function(){zt.current=null,an.current=void 0},100)}function Lt(){return zt.current}return(0,he.useEffect)(function(){return pt},[]),[Pt,Lt]}function Zt(){var Rt=he.useState(-1),zt=(0,Ie.Z)(Rt,2),an=zt[0],pt=zt[1],Pt=he.useState(-1),Lt=(0,Ie.Z)(Pt,2),vn=Lt[0],cn=Lt[1],sn=he.useCallback(function(gn,mn){pt(gn),cn(mn)},[]);return[an,vn,sn]}var rn=Ee(47273),Rn=(0,rn.Z)()?window:null;function An(Rt,zt){var an=(0,Ve.Z)(Rt)==="object"?Rt:{},pt=an.offsetHeader,Pt=pt===void 0?0:pt,Lt=an.offsetSummary,vn=Lt===void 0?0:Lt,cn=an.offsetScroll,sn=cn===void 0?0:cn,gn=an.getContainer,mn=gn===void 0?function(){return Rn}:gn,xn=mn()||Rn;return he.useMemo(function(){var jn=!!Rt;return{isSticky:jn,stickyClassName:jn?"".concat(zt,"-sticky-holder"):"",offsetHeader:Pt,offsetSummary:vn,offsetScroll:sn,container:xn}},[sn,Pt,vn,zt,xn])}function Qn(Rt,zt,an){var pt=(0,he.useMemo)(function(){for(var Pt=[],Lt=[],vn=0,cn=0,sn=0;sn<zt;sn+=1)if(an==="rtl"){Lt[sn]=cn,cn+=Rt[sn]||0;var gn=zt-sn-1;Pt[gn]=vn,vn+=Rt[gn]||0}else{Pt[sn]=vn,vn+=Rt[sn]||0;var mn=zt-sn-1;Lt[mn]=cn,cn+=Rt[mn]||0}return{left:Pt,right:Lt}},[Rt,zt,an]);return pt}var Un=Qn;function qn(Rt){var zt=Rt.className,an=Rt.children;return he.createElement("div",{className:zt},an)}var Nn=qn,si=Ee(8224),Li=Ee(55468),Bi=function(zt,an){var pt,Pt,Lt=zt.scrollBodyRef,vn=zt.onScroll,cn=zt.offsetScroll,sn=zt.container,gn=ge(Ce,"prefixCls"),mn=((pt=Lt.current)===null||pt===void 0?void 0:pt.scrollWidth)||0,xn=((Pt=Lt.current)===null||Pt===void 0?void 0:Pt.clientWidth)||0,jn=mn&&xn*(xn/mn),ti=he.useRef(),Zn=Sn({scrollLeft:0,isHiddenScrollBar:!1}),xi=(0,Ie.Z)(Zn,2),Kn=xi[0],mi=xi[1],ai=he.useRef({delta:0,x:0}),Ri=he.useState(!1),Oi=(0,Ie.Z)(Ri,2),Zi=Oi[0],Ai=Oi[1],Ni=function(){Ai(!1)},ur=function(Yi){Yi.persist(),ai.current.delta=Yi.pageX-Kn.scrollLeft,ai.current.x=0,Ai(!0),Yi.preventDefault()},ei=function(Yi){var gi,dr=Yi||((gi=window)===null||gi===void 0?void 0:gi.event),Xi=dr.buttons;if(!Zi||Xi===0){Zi&&Ai(!1);return}var Pi=ai.current.x+Yi.pageX-ai.current.x-ai.current.delta;Pi<=0&&(Pi=0),Pi+jn>=xn&&(Pi=xn-jn),vn({scrollLeft:Pi/xn*(mn+2)}),ai.current.x=Yi.pageX},Gi=function(){if(Lt.current){var Yi=(0,Li.os)(Lt.current).top,gi=Yi+Lt.current.offsetHeight,dr=sn===window?document.documentElement.scrollTop+window.innerHeight:(0,Li.os)(sn).top+sn.clientHeight;gi-(0,xt.Z)()<=dr||Yi>=dr-cn?mi(function(Xi){return(0,Qe.Z)((0,Qe.Z)({},Xi),{},{isHiddenScrollBar:!0})}):mi(function(Xi){return(0,Qe.Z)((0,Qe.Z)({},Xi),{},{isHiddenScrollBar:!1})})}},Ei=function(Yi){mi(function(gi){return(0,Qe.Z)((0,Qe.Z)({},gi),{},{scrollLeft:Yi/mn*xn||0})})};return he.useImperativeHandle(an,function(){return{setScrollLeft:Ei}}),he.useEffect(function(){var wi=(0,si.Z)(document.body,"mouseup",Ni,!1),Yi=(0,si.Z)(document.body,"mousemove",ei,!1);return Gi(),function(){wi.remove(),Yi.remove()}},[jn,Zi]),he.useEffect(function(){var wi=(0,si.Z)(sn,"scroll",Gi,!1),Yi=(0,si.Z)(window,"resize",Gi,!1);return function(){wi.remove(),Yi.remove()}},[sn]),he.useEffect(function(){Kn.isHiddenScrollBar||mi(function(wi){var Yi=Lt.current;return Yi?(0,Qe.Z)((0,Qe.Z)({},wi),{},{scrollLeft:Yi.scrollLeft/Yi.scrollWidth*Yi.clientWidth}):wi})},[Kn.isHiddenScrollBar]),mn<=xn||!jn||Kn.isHiddenScrollBar?null:he.createElement("div",{style:{height:(0,xt.Z)(),width:xn,bottom:cn},className:"".concat(gn,"-sticky-scroll")},he.createElement("div",{onMouseDown:ur,ref:ti,className:ct()("".concat(gn,"-sticky-scroll-bar"),(0,We.Z)({},"".concat(gn,"-sticky-scroll-bar-active"),Zi)),style:{width:"".concat(jn,"px"),transform:"translate3d(".concat(Kn.scrollLeft,"px, 0, 0)")}}))},Ln=he.forwardRef(Bi);function Ui(Rt){return null}var lr=Ui;function Di(Rt){return null}var Pn=Di,Yn="rc-table",ui=[],Ti={};function pi(){return"No Data"}function Mi(Rt){var zt,an=(0,Qe.Z)({rowKey:"key",prefixCls:Yn,emptyText:pi},Rt),pt=an.prefixCls,Pt=an.className,Lt=an.rowClassName,vn=an.style,cn=an.data,sn=an.rowKey,gn=an.scroll,mn=an.tableLayout,xn=an.direction,jn=an.title,ti=an.footer,Zn=an.summary,xi=an.caption,Kn=an.id,mi=an.showHeader,ai=an.components,Ri=an.emptyText,Oi=an.onRow,Zi=an.onHeaderRow,Ai=an.internalHooks,Ni=an.transformColumns,ur=an.internalRefs,ei=an.tailor,Gi=an.sticky,Ei=cn||ui,wi=!!Ei.length,Yi=Ai===me,gi=he.useCallback(function(hs,$s){return(0,it.Z)(ai,hs)||$s},[ai]),dr=he.useMemo(function(){return typeof sn=="function"?sn:function(hs){var $s=hs&&hs[sn];return $s}},[sn]),Xi=gi(["body"]),Pi=Zt(),Ki=(0,Ie.Z)(Pi,3),vr=Ki[0],or=Ki[1],wo=Ki[2],Eo=At(an,Ei,dr),ns=(0,Ie.Z)(Eo,6),uo=ns[0],Nr=ns[1],Io=ns[2],Dr=ns[3],Vr=ns[4],is=ns[5],Ur=gn==null?void 0:gn.x,Tr=he.useState(0),$r=(0,Ie.Z)(Tr,2),_r=$r[0],co=$r[1],kr=wn((0,Qe.Z)((0,Qe.Z)((0,Qe.Z)({},an),uo),{},{expandable:!!uo.expandedRowRender,columnTitle:uo.columnTitle,expandedKeys:Io,getRowKey:dr,onTriggerExpand:is,expandIcon:Dr,expandIconColumnIndex:uo.expandIconColumnIndex,direction:xn,scrollWidth:Yi&&ei&&typeof Ur=="number"?Ur:null}),Yi?Ni:null),mo=(0,Ie.Z)(kr,3),Go=mo[0],Wo=mo[1],Yr=mo[2],Ro=Yr!=null?Yr:Ur,_s=he.useMemo(function(){return{columns:Go,flattenColumns:Wo}},[Go,Wo]),Ao=he.useRef(),Jo=he.useRef(),xs=he.useRef(),Xs=he.useRef(),Cl=he.useRef(),Qo=he.useState(!1),qo=(0,Ie.Z)(Qo,2),ws=qo[0],Ms=qo[1],fa=he.useState(!1),Fo=(0,Ie.Z)(fa,2),As=Fo[0],Pa=Fo[1],Pl=Sn(new Map),$l=(0,Ie.Z)(Pl,2),Bl=$l[0],cu=$l[1],hu=dt(Wo),Yl=hu.map(function(hs){return Bl.get(hs)}),fs=he.useMemo(function(){return Yl},[Yl.join("_")]),Da=Un(fs,Wo.length,xn),ia=gn&&St(gn.y),Ns=gn&&St(Ro)||!!uo.fixed,Xl=Ns&&Wo.some(function(hs){var $s=hs.fixed;return $s}),_c=he.useRef(),du=An(Gi,pt),Zu=du.isSticky,sc=du.offsetHeader,Fl=du.offsetSummary,ss=du.offsetScroll,js=du.stickyClassName,va=du.container,zs=he.useMemo(function(){return Zn==null?void 0:Zn(Ei)},[Zn,Ei]),rs=(ia||Zu)&&he.isValidElement(zs)&&zs.type===Ue&&zs.props.fixed,_a,_l,Nu;ia&&(_l={overflowY:"scroll",maxHeight:gn.y}),Ns&&(_a={overflowX:"auto"},ia||(_l={overflowY:"hidden"}),Nu={width:Ro===!0?"auto":Ro,minWidth:"100%"});var mf=he.useCallback(function(hs,$s){(0,Ze.Z)(Ao.current)&&cu(function(Ka){if(Ka.get(hs)!==$s){var fu=new Map(Ka);return fu.set(hs,$s),fu}return Ka})},[]),dn=kn(null),Bc=(0,Ie.Z)(dn,2),ac=Bc[0],vf=Bc[1];function Ph(hs,$s){$s&&(typeof $s=="function"?$s(hs):$s.scrollLeft!==hs&&($s.scrollLeft=hs,$s.scrollLeft!==hs&&setTimeout(function(){$s.scrollLeft=hs},0)))}var oh=(0,Te.Z)(function(hs){var $s=hs.currentTarget,Ka=hs.scrollLeft,fu=xn==="rtl",pu=typeof Ka=="number"?Ka:$s.scrollLeft,Wd=$s||Ti;if(!vf()||vf()===Wd){var zc;ac(Wd),Ph(pu,Jo.current),Ph(pu,xs.current),Ph(pu,Cl.current),Ph(pu,(zc=_c.current)===null||zc===void 0?void 0:zc.setScrollLeft)}var rd=$s||Jo.current;if(rd){var Ou=rd.scrollWidth,Ec=rd.clientWidth;if(Ou===Ec){Ms(!1),Pa(!1);return}fu?(Ms(-pu<Ou-Ec),Pa(-pu>0)):(Ms(pu>0),Pa(pu<Ou-Ec))}}),Rd=function(){Ns&&xs.current?oh({currentTarget:xs.current}):(Ms(!1),Pa(!1))},Kp=function($s){var Ka=$s.width;Ka!==_r&&(Rd(),co(Ao.current?Ao.current.offsetWidth:Ka))},Ra=he.useRef(!1);he.useEffect(function(){Ra.current&&Rd()},[Ns,cn,Go.length]),he.useEffect(function(){Ra.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],Jl=Sf[1];he.useEffect(function(){(!ei||!Yi)&&(xs.current instanceof Element?yf((0,xt.o)(xs.current).width):yf((0,xt.o)(Xs.current).width)),Jl((0,at.G)("position","sticky"))},[]),he.useEffect(function(){Yi&&ur&&(ur.body.current=xs.current)});var _h=he.useCallback(function(hs){return he.createElement(he.Fragment,null,he.createElement(Jr,hs),rs==="top"&&he.createElement(Re,hs,zs))},[rs,zs]),xf=he.useCallback(function(hs){return he.createElement(Re,hs,zs)},[zs]),Ku=gi(["table"],"table"),Fc=he.useMemo(function(){return mn||(Xl?Ro==="max-content"?"auto":"fixed":ia||Zu||Wo.some(function(hs){var $s=hs.ellipsis;return $s})?"fixed":"auto")},[ia,Xl,Wo,mn,Zu]),Eh,sh={colWidths:fs,columCount:Wo.length,stickyOffsets:Da,onHeaderRow:Zi,fixHeader:ia,scroll:gn},El=he.useMemo(function(){return wi?null:typeof Ri=="function"?Ri():Ri},[wi,Ri]),jd=he.createElement(bi,{data:Ei,measureColumnWidth:ia||Ns||Zu}),zd=he.createElement(ro,{colWidths:Wo.map(function(hs){var $s=hs.width;return $s}),columns:Wo}),Ql=xi!=null?he.createElement("caption",{className:"".concat(pt,"-caption")},xi):void 0,Lh=(0,tn.Z)(an,{data:!0}),Hd=(0,tn.Z)(an,{aria:!0});if(ia||Zu){var Ud;typeof Xi=="function"?(Ud=Xi(Ei,{scrollbarSize:id,ref:xs,onScroll:oh}),sh.colWidths=Wo.map(function(hs,$s){var Ka=hs.width,fu=$s===Wo.length-1?Ka-id:Ka;return typeof fu=="number"&&!Number.isNaN(fu)?fu:0})):Ud=he.createElement("div",{style:(0,Qe.Z)((0,Qe.Z)({},_a),_l),onScroll:oh,ref:xs,className:ct()("".concat(pt,"-body"))},he.createElement(Ku,(0,ce.Z)({style:(0,Qe.Z)((0,Qe.Z)({},Nu),{},{tableLayout:Fc})},Hd),Ql,zd,jd,!rs&&zs&&he.createElement(Re,{stickyOffsets:Da,flattenColumns:Wo,columns:Go},zs)));var jc=(0,Qe.Z)((0,Qe.Z)((0,Qe.Z)({noData:!Ei.length,maxContentScroll:Ns&&Ro==="max-content"},sh),_s),{},{direction:xn,stickyClassName:js,onScroll:oh});Eh=he.createElement(he.Fragment,null,mi!==!1&&he.createElement(Rr,(0,ce.Z)({},jc,{stickyTopOffset:sc,className:"".concat(pt,"-header"),ref:Jo}),_h),Ud,rs&&rs!=="top"&&he.createElement(Rr,(0,ce.Z)({},jc,{stickyBottomOffset:Fl,className:"".concat(pt,"-summary"),ref:Cl}),xf),Zu&&he.createElement(Ln,{ref:_c,offsetScroll:ss,scrollBodyRef:xs,onScroll:oh,container:va}))}else Eh=he.createElement("div",{style:(0,Qe.Z)((0,Qe.Z)({},_a),_l),className:ct()("".concat(pt,"-content")),onScroll:oh,ref:xs},he.createElement(Ku,(0,ce.Z)({style:(0,Qe.Z)((0,Qe.Z)({},Nu),{},{tableLayout:Fc})},Hd),Ql,zd,mi!==!1&&he.createElement(Jr,(0,ce.Z)({},sh,_s)),jd,zs&&he.createElement(Re,{stickyOffsets:Da,flattenColumns:Wo,columns:Go},zs)));var fl=he.createElement("div",(0,ce.Z)({className:ct()(pt,Pt,(zt={},(0,We.Z)(zt,"".concat(pt,"-rtl"),xn==="rtl"),(0,We.Z)(zt,"".concat(pt,"-ping-left"),ws),(0,We.Z)(zt,"".concat(pt,"-ping-right"),As),(0,We.Z)(zt,"".concat(pt,"-layout-fixed"),mn==="fixed"),(0,We.Z)(zt,"".concat(pt,"-fixed-header"),ia),(0,We.Z)(zt,"".concat(pt,"-fixed-column"),Xl),(0,We.Z)(zt,"".concat(pt,"-scroll-horizontal"),Ns),(0,We.Z)(zt,"".concat(pt,"-has-fix-left"),Wo[0]&&Wo[0].fixed),(0,We.Z)(zt,"".concat(pt,"-has-fix-right"),Wo[Wo.length-1]&&Wo[Wo.length-1].fixed==="right"),zt)),style:vn,id:Kn,ref:Ao},Lh),jn&&he.createElement(Nn,{className:"".concat(pt,"-title")},jn(Ei)),he.createElement("div",{ref:Xs,className:"".concat(pt,"-container")},Eh),ti&&he.createElement(Nn,{className:"".concat(pt,"-footer")},ti(Ei)));Ns&&(fl=he.createElement(Ke.Z,{onResize:Kp},fl));var Gd=Kt(Wo,Da,xn,Go),ya=he.useMemo(function(){return{scrollX:Ro,prefixCls:pt,getComponent:gi,scrollbarSize:id,direction:xn,fixedInfoList:Gd,isSticky:Zu,supportSticky:Fd,componentWidth:_r,fixHeader:ia,fixColumn:Xl,horizonScroll:Ns,tableLayout:Fc,rowClassName:Lt,expandedRowClassName:uo.expandedRowClassName,expandIcon:Dr,expandableType:Nr,expandRowByClick:uo.expandRowByClick,expandedRowRender:uo.expandedRowRender,onTriggerExpand:is,expandIconColumnIndex:uo.expandIconColumnIndex,indentSize:uo.indentSize,allColumnsFixedLeft:Wo.every(function(hs){return hs.fixed==="left"}),emptyNode:El,columns:Go,flattenColumns:Wo,onColumnResize:mf,hoverStartRow:vr,hoverEndRow:or,onHover:wo,rowExpandable:uo.rowExpandable,onRow:Oi,getRowKey:dr,expandedKeys:Io,childrenColumnName:Vr}},[Ro,pt,gi,id,xn,Gd,Zu,Fd,_r,ia,Xl,Ns,Fc,Lt,uo.expandedRowClassName,Dr,Nr,uo.expandRowByClick,uo.expandedRowRender,is,uo.expandIconColumnIndex,uo.indentSize,El,Go,Wo,mf,vr,or,wo,uo.rowExpandable,Oi,dr,Io,Vr]);return he.createElement(Ce.Provider,{value:ya},fl)}function ir(Rt){return se(Mi,Rt)}var Fi=ir();Fi.EXPAND_COLUMN=Le,Fi.INTERNAL_HOOKS=me,Fi.Column=lr,Fi.ColumnGroup=Pn,Fi.Summary=Ae;var Wi=Fi,hr=Ee(4409),In=xe(null),zr=xe(null);function On(Rt,zt,an){var pt=zt||1;return an[Rt+pt]-(an[Rt]||0)}function wr(Rt){var zt=Rt.rowInfo,an=Rt.column,pt=Rt.colIndex,Pt=Rt.indent,Lt=Rt.index,vn=Rt.renderIndex,cn=Rt.record,sn=Rt.style,gn=Rt.className,mn=Rt.inverse,xn=Rt.getHeight,jn=an.render,ti=an.dataIndex,Zn=an.className,xi=an.width,Kn=ge(zr,["columnsOffset"]),mi=Kn.columnsOffset,ai=En(zt,an,pt,Pt,Lt),Ri=ai.key,Oi=ai.fixedInfo,Zi=ai.appendCellNode,Ai=ai.additionalCellProps,Ni=Ai.style,ur=Ai.colSpan,ei=ur===void 0?1:ur,Gi=Ai.rowSpan,Ei=Gi===void 0?1:Gi,wi=pt-1,Yi=On(wi,ei,mi),gi=ei>1?xi-Yi:0,dr=(0,Qe.Z)((0,Qe.Z)((0,Qe.Z)({},Ni),sn),{},{flex:"0 0 ".concat(Yi,"px"),width:"".concat(Yi,"px"),marginRight:gi,pointerEvents:"auto"}),Xi=he.useMemo(function(){return mn?Ei<=1:ei===0||Ei===0||Ei>1},[Ei,ei,mn]);Xi?dr.visibility="hidden":mn&&(dr.height=xn==null?void 0:xn(Ei));var Pi=Xi?function(){return null}:jn,Ki={};return(Ei===0||ei===0)&&(Ki.rowSpan=1,Ki.colSpan=1),he.createElement(yn,(0,ce.Z)({className:ct()(Zn,gn),ellipsis:an.ellipsis,align:an.align,scope:an.rowScope,component:"div",prefixCls:zt.prefixCls,key:Ri,record:cn,index:Lt,renderIndex:vn,dataIndex:ti,render:Pi,shouldCellUpdate:an.shouldCellUpdate},Oi,{appendNode:Zi,additionalProps:(0,Qe.Z)((0,Qe.Z)({},Ai),{},{style:dr},Ki)}))}var po=wr,Ar=["data","index","className","rowKey","style","extra","getHeight"],To=he.forwardRef(function(Rt,zt){var an=Rt.data,pt=Rt.index,Pt=Rt.className,Lt=Rt.rowKey,vn=Rt.style,cn=Rt.extra,sn=Rt.getHeight,gn=(0,ze.Z)(Rt,Ar),mn=an.record,xn=an.indent,jn=an.index,ti=ge(Ce,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Zn=ti.scrollX,xi=ti.flattenColumns,Kn=ti.prefixCls,mi=ti.fixColumn,ai=ti.componentWidth,Ri=hn(mn,Lt,pt,xn),Oi=Ri.rowSupportExpand,Zi=Ri.expanded,Ai=Ri.rowProps,Ni=Ri.expandedRowRender,ur=Ri.expandedRowClassName,ei;if(Oi&&Zi){var Gi=Ni(mn,pt,xn+1,Zi),Ei=ur==null?void 0:ur(mn,pt,xn),wi={};mi&&(wi={style:(0,We.Z)({},"--virtual-width","".concat(ai,"px"))});var Yi="".concat(Kn,"-expanded-row-cell");ei=he.createElement("div",{className:ct()("".concat(Kn,"-expanded-row"),"".concat(Kn,"-expanded-row-level-").concat(xn+1),Ei)},he.createElement(yn,{component:"div",prefixCls:Kn,className:ct()(Yi,(0,We.Z)({},"".concat(Yi,"-fixed"),mi)),additionalProps:wi},Gi))}var gi=(0,Qe.Z)((0,Qe.Z)({},vn),{},{width:Zn});cn&&(gi.position="absolute",gi.pointerEvents="none");var dr=he.createElement("div",(0,ce.Z)({},Ai,gn,{ref:Oi?null:zt,className:ct()(Pt,"".concat(Kn,"-row"),Ai==null?void 0:Ai.className,(0,We.Z)({},"".concat(Kn,"-row-extra"),cn)),style:(0,Qe.Z)((0,Qe.Z)({},gi),Ai==null?void 0:Ai.style)}),xi.map(function(Xi,Pi){return he.createElement(po,{key:Pi,rowInfo:Ri,column:Xi,colIndex:Pi,indent:xn,index:pt,renderIndex:jn,record:mn,inverse:cn,getHeight:sn})}));return Oi?he.createElement("div",{ref:zt},dr,ei):dr}),oo=le(To),$i=oo,Qi=he.forwardRef(function(Rt,zt){var an=Rt.data,pt=Rt.onScroll,Pt=ge(Ce,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),Lt=Pt.flattenColumns,vn=Pt.onColumnResize,cn=Pt.getRowKey,sn=Pt.expandedKeys,gn=Pt.prefixCls,mn=Pt.childrenColumnName,xn=Pt.emptyNode,jn=Pt.scrollX,ti=ge(In),Zn=ti.scrollY,xi=ti.listItemHeight,Kn=he.useRef(),mi=Jt(an,mn,sn,cn),ai=he.useMemo(function(){var ei=0;return Lt.map(function(Gi){var Ei=Gi.width,wi=Gi.key;return ei+=Ei,[wi,Ei,ei]})},[Lt]),Ri=he.useMemo(function(){return ai.map(function(ei){return ei[2]})},[ai]);he.useEffect(function(){ai.forEach(function(ei){var Gi=(0,Ie.Z)(ei,2),Ei=Gi[0],wi=Gi[1];vn(Ei,wi)})},[ai]),he.useImperativeHandle(zt,function(){var ei={};return Object.defineProperty(ei,"scrollLeft",{get:function(){var Ei;return((Ei=Kn.current)===null||Ei===void 0?void 0:Ei.getScrollInfo().x)||0},set:function(Ei){var wi;(wi=Kn.current)===null||wi===void 0||wi.scrollTo({left:Ei})}}),ei});var Oi=function(Gi,Ei){var wi,Yi=(wi=mi[Ei])===null||wi===void 0?void 0:wi.record,gi=Gi.onCell;if(gi){var dr,Xi=gi(Yi,Ei);return(dr=Xi==null?void 0:Xi.rowSpan)!==null&&dr!==void 0?dr:1}return 1},Zi=function(Gi){var Ei=Gi.start,wi=Gi.end,Yi=Gi.getSize,gi=Gi.offsetY;if(wi<0)return null;for(var dr=Lt.filter(function(Ur){return Oi(Ur,Ei)===0}),Xi=Ei,Pi=function(Tr){if(dr=dr.filter(function($r){return Oi($r,Tr)===0}),!dr.length)return Xi=Tr,"break"},Ki=Ei;Ki>=0;Ki-=1){var vr=Pi(Ki);if(vr==="break")break}for(var or=Lt.filter(function(Ur){return Oi(Ur,wi)!==1}),wo=wi,Eo=function(Tr){if(or=or.filter(function($r){return Oi($r,Tr)!==1}),!or.length)return wo=Math.max(Tr-1,wi),"break"},ns=wi;ns<mi.length;ns+=1){var uo=Eo(ns);if(uo==="break")break}for(var Nr=[],Io=function(Tr){var $r=mi[Tr];if(!$r)return"continue";Lt.some(function(_r){return Oi(_r,Tr)>1})&&Nr.push(Tr)},Dr=Xi;Dr<=wo;Dr+=1)var Vr=Io(Dr);var is=Nr.map(function(Ur){var Tr=mi[Ur],$r=cn(Tr.record,Ur),_r=function(mo){var Go=Ur+mo-1,Wo=cn(mi[Go].record,Go),Yr=Yi($r,Wo);return Yr.bottom-Yr.top},co=Yi($r);return he.createElement($i,{key:Ur,data:Tr,rowKey:$r,index:Ur,style:{top:-gi+co.top},extra:!0,getHeight:_r})});return is},Ai=he.useMemo(function(){return{columnsOffset:Ri}},[Ri]),Ni="".concat(gn,"-tbody"),ur;return mi.length?ur=he.createElement(hr.Z,{fullHeight:!1,ref:Kn,className:ct()(Ni,"".concat(Ni,"-virtual")),height:Zn,itemHeight:xi||24,data:mi,itemKey:function(Gi){return cn(Gi.record)},scrollWidth:jn,onVirtualScroll:function(Gi){var Ei=Gi.x;pt({scrollLeft:Ei})},extraRender:Zi},function(ei,Gi,Ei){var wi=cn(ei.record,Gi);return he.createElement($i,(0,ce.Z)({data:ei,rowKey:wi,index:Gi},Ei))}):ur=he.createElement("div",{className:ct()("".concat(gn,"-placeholder"))},he.createElement(yn,{component:"div",prefixCls:gn},xn)),he.createElement(zr.Provider,{value:Ai},ur)}),fr=le(Qi),Mr=fr,fi=function(zt,an){var pt=an.ref,Pt=an.onScroll;return he.createElement(Mr,{ref:pt,data:zt,onScroll:Pt})},Tt=100;function Ir(Rt){var zt=Rt.columns,an=Rt.scroll,pt=Rt.prefixCls,Pt=pt===void 0?Yn:pt,Lt=Rt.className,vn=Rt.listItemHeight,cn=an||{},sn=cn.x,gn=cn.y;typeof sn!="number"&&(sn=((zt||[]).length+1)*Tt),typeof gn!="number"&&(gn=500);var mn=he.useMemo(function(){return{scrollY:gn,listItemHeight:vn}},[gn,vn]);return he.createElement(In.Provider,{value:mn},he.createElement(Wi,(0,ce.Z)({},Rt,{className:ct()(Lt,"".concat(Pt,"-virtual")),scroll:(0,Qe.Z)((0,Qe.Z)({},an),{},{x:sn}),components:{body:fi},columns:zt,internalHooks:me,tailor:!0})))}function ho(Rt){return se(Ir,Rt)}var Zo=ho(),Po=null;function $o(Rt){return null}var Yo=$o;function Sr(Rt){return null}var yr=Sr,qi=Ee(2738),Qr=Ee(68031),_o=Ee(36355),rr=Ee(93891),ji=Ee(19716),Xn=Ee(8628),er=Ee(31724),no=Ee(58421),Lo=Ee(71418),ko=Ee(88088);function Xo(Rt){return function(an){let{prefixCls:pt,onExpand:Pt,record:Lt,expanded:vn,expandable:cn}=an;const sn=`${pt}-row-expand-icon`;return he.createElement("button",{type:"button",onClick:gn=>{Pt(Lt,gn),gn.stopPropagation()},className:ct()(sn,{[`${sn}-spaced`]:!cn,[`${sn}-expanded`]:cn&&vn,[`${sn}-collapsed`]:cn&&!vn}),"aria-label":vn?Rt.collapse:Rt.expand,"aria-expanded":vn})}}var Ss=Xo;function os(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 Is(Rt,zt){return zt?`${zt}-${Rt}`:`${Rt}`}function ps(Rt,zt){return typeof Rt=="function"?Rt(zt):Rt}function sa(Rt,zt){const an=ps(Rt,zt);return Object.prototype.toString.call(an)==="[object Object]"?"":an}var _n={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"},Cs=_n,Pu=Ee(7657),Na=function(zt,an){return he.createElement(Pu.Z,(0,ce.Z)({},zt,{ref:an,icon:Cs}))},ma=he.forwardRef(Na),gs=ma,su=Ee(56762);function au(Rt){const zt=he.useRef(Rt),an=(0,su.Z)();return[()=>zt.current,pt=>{zt.current=pt,an()}]}var fo=Ee(3113),Lr=Ee(24905),La=Ee(38854),Cr=Ee(64165),to=Ee(20834),Kr=Ee(40875),Ci=Ee(5112),us=Ee(17574),Ts=Ee(47472),ba=Ee(92832);function Ha(Rt){let{value:zt,onChange:an,filterSearch:pt,tablePrefixCls:Pt,locale:Lt}=Rt;return pt?he.createElement("div",{className:`${Pt}-filter-dropdown-search`},he.createElement(ba.default,{prefix:he.createElement(Ts.Z,null),placeholder:Lt.filterSearchPlaceholder,onChange:an,value:zt,htmlSize:1,className:`${Pt}-filter-dropdown-search-input`})):null}var Qa=Ha,yi=Ee(10228);const ms=Rt=>{const{keyCode:zt}=Rt;zt===yi.Z.ENTER&&Rt.stopPropagation()};var qa=he.forwardRef((Rt,zt)=>he.createElement("div",{className:Rt.className,onClick:an=>an.stopPropagation(),onKeyDown:ms,ref:zt},Rt.children));function xl(Rt){let zt=[];return(Rt||[]).forEach(an=>{let{value:pt,children:Pt}=an;zt.push(pt),Pt&&(zt=[].concat((0,hi.Z)(zt),(0,hi.Z)(xl(Pt))))}),zt}function Ol(Rt){return Rt.some(zt=>{let{children:an}=zt;return an})}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:an,filteredKeys:pt,filterMultiple:Pt,searchValue:Lt,filterSearch:vn}=Rt;return zt.map((cn,sn)=>{const gn=String(cn.value);if(cn.children)return{key:gn||sn,label:cn.text,popupClassName:`${an}-dropdown-submenu`,children:nc({filters:cn.children,prefixCls:an,filteredKeys:pt,filterMultiple:Pt,searchValue:Lt,filterSearch:vn})};const mn=Pt?Lr.default:Ci.ZP,xn={key:cn.value!==void 0?gn:sn,label:he.createElement(he.Fragment,null,he.createElement(mn,{checked:pt.includes(gn)}),he.createElement("span",null,cn.text))};return Lt.trim()?typeof vn=="function"?vn(Lt,cn)?xn:null:Fr(Lt,cn.text)?xn:null:xn})}function Oa(Rt){var zt,an;const{tablePrefixCls:pt,prefixCls:Pt,column:Lt,dropdownPrefixCls:vn,columnKey:cn,filterMultiple:sn,filterMode:gn="menu",filterSearch:mn=!1,filterState:xn,triggerFilter:jn,locale:ti,children:Zn,getPopupContainer:xi}=Rt,{filterDropdownOpen:Kn,onFilterDropdownOpenChange:mi,filterResetToDefaultFilteredValue:ai,defaultFilteredValue:Ri,filterDropdownVisible:Oi,onFilterDropdownVisibleChange:Zi}=Lt,[Ai,Ni]=he.useState(!1),ur=!!(xn&&(!((zt=xn.filteredKeys)===null||zt===void 0)&&zt.length||xn.forceFiltered)),ei=kr=>{Ni(kr),mi==null||mi(kr),Zi==null||Zi(kr)},Gi=(an=Kn!=null?Kn:Oi)!==null&&an!==void 0?an:Ai,Ei=xn==null?void 0:xn.filteredKeys,[wi,Yi]=au(Ei||[]),gi=kr=>{let{selectedKeys:mo}=kr;Yi(mo)},dr=(kr,mo)=>{let{node:Go,checked:Wo}=mo;gi(sn?{selectedKeys:kr}:{selectedKeys:Wo&&Go.key?[Go.key]:[]})};he.useEffect(()=>{Ai&&gi({selectedKeys:Ei||[]})},[Ei]);const[Xi,Pi]=he.useState([]),Ki=kr=>{Pi(kr)},[vr,or]=he.useState(""),wo=kr=>{const{value:mo}=kr.target;or(mo)};he.useEffect(()=>{Ai||or("")},[Ai]);const Eo=kr=>{const mo=kr&&kr.length?kr:null;if(mo===null&&(!xn||!xn.filteredKeys)||(0,Pe.Z)(mo,xn==null?void 0:xn.filteredKeys,!0))return null;jn({column:Lt,key:cn,filteredKeys:mo})},ns=()=>{ei(!1),Eo(wi())},uo=function(){let{confirm:kr,closeDropdown:mo}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};kr&&Eo([]),mo&&ei(!1),or(""),Yi(ai?(Ri||[]).map(Go=>String(Go)):[])},Nr=function(){let{closeDropdown:kr}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};kr&&ei(!1),Eo(wi())},Io=kr=>{kr&&Ei!==void 0&&Yi(Ei||[]),ei(kr),!kr&&!Lt.filterDropdown&&ns()},Dr=ct()({[`${vn}-menu-without-submenu`]:!Ol(Lt.filters||[])}),Vr=kr=>{if(kr.target.checked){const mo=xl(Lt==null?void 0:Lt.filters).map(Go=>String(Go));Yi(mo)}else Yi([])},is=kr=>{let{filters:mo}=kr;return(mo||[]).map((Go,Wo)=>{const Yr=String(Go.value),Ro={title:Go.text,key:Go.value!==void 0?Yr:Wo};return Go.children&&(Ro.children=is({filters:Go.children})),Ro})},Ur=kr=>{var mo;return Object.assign(Object.assign({},kr),{text:kr.title,value:kr.key,children:((mo=kr.children)===null||mo===void 0?void 0:mo.map(Go=>Ur(Go)))||[]})};let Tr;if(typeof Lt.filterDropdown=="function")Tr=Lt.filterDropdown({prefixCls:`${vn}-custom`,setSelectedKeys:kr=>gi({selectedKeys:kr}),selectedKeys:wi(),confirm:Nr,clearFilters:uo,filters:Lt.filters,visible:Gi,close:()=>{ei(!1)}});else if(Lt.filterDropdown)Tr=Lt.filterDropdown;else{const kr=wi()||[],mo=()=>(Lt.filters||[]).length===0?he.createElement(Cr.Z,{image:Cr.Z.PRESENTED_IMAGE_SIMPLE,description:ti.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):gn==="tree"?he.createElement(he.Fragment,null,he.createElement(Qa,{filterSearch:mn,value:vr,onChange:wo,tablePrefixCls:pt,locale:ti}),he.createElement("div",{className:`${pt}-filter-dropdown-tree`},sn?he.createElement(Lr.default,{checked:kr.length===xl(Lt.filters).length,indeterminate:kr.length>0&&kr.length<xl(Lt.filters).length,className:`${pt}-filter-dropdown-checkall`,onChange:Vr},ti.filterCheckall):null,he.createElement(us.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:sn,checkStrictly:!sn,className:`${vn}-menu`,onCheck:dr,checkedKeys:kr,selectedKeys:kr,showIcon:!1,treeData:is({filters:Lt.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:vr.trim()?Wo=>typeof mn=="function"?mn(vr,Ur(Wo)):Fr(vr,Wo.title):void 0}))):he.createElement(he.Fragment,null,he.createElement(Qa,{filterSearch:mn,value:vr,onChange:wo,tablePrefixCls:pt,locale:ti}),he.createElement(to.default,{selectable:!0,multiple:sn,prefixCls:`${vn}-menu`,className:Dr,onSelect:gi,onDeselect:gi,selectedKeys:kr,getPopupContainer:xi,openKeys:Xi,onOpenChange:Ki,items:nc({filters:Lt.filters||[],filterSearch:mn,prefixCls:Pt,filteredKeys:wi(),filterMultiple:sn,searchValue:vr})})),Go=()=>ai?(0,Pe.Z)((Ri||[]).map(Wo=>String(Wo)),kr,!0):kr.length===0;Tr=he.createElement(he.Fragment,null,mo(),he.createElement("div",{className:`${Pt}-dropdown-btns`},he.createElement(fo.ZP,{type:"link",size:"small",disabled:Go(),onClick:()=>uo()},ti.filterReset),he.createElement(fo.ZP,{type:"primary",size:"small",onClick:ns},ti.filterConfirm)))}Lt.filterDropdown&&(Tr=he.createElement(Kr.J,{selectable:void 0},Tr));const $r=()=>he.createElement(qa,{className:`${Pt}-dropdown`},Tr);let _r;typeof Lt.filterIcon=="function"?_r=Lt.filterIcon(ur):Lt.filterIcon?_r=Lt.filterIcon:_r=he.createElement(gs,null);const{direction:co}=he.useContext(_o.E_);return he.createElement("div",{className:`${Pt}-column`},he.createElement("span",{className:`${pt}-column-title`},Zn),he.createElement(La.Z,{dropdownRender:$r,trigger:["click"],open:Gi,onOpenChange:Io,getPopupContainer:xi,placement:co==="rtl"?"bottomLeft":"bottomRight"},he.createElement("span",{role:"button",tabIndex:-1,className:ct()(`${Pt}-trigger`,{active:ur}),onClick:kr=>{kr.stopPropagation()}},_r)))}var Ua=Oa;function ka(Rt,zt,an){let pt=[];return(Rt||[]).forEach((Pt,Lt)=>{var vn;const cn=Is(Lt,an);if(Pt.filters||"filterDropdown"in Pt||"onFilter"in Pt)if("filteredValue"in Pt){let sn=Pt.filteredValue;"filterDropdown"in Pt||(sn=(vn=sn==null?void 0:sn.map(String))!==null&&vn!==void 0?vn:sn),pt.push({column:Pt,key:os(Pt,cn),filteredKeys:sn,forceFiltered:Pt.filtered})}else pt.push({column:Pt,key:os(Pt,cn),filteredKeys:zt&&Pt.defaultFilteredValue?Pt.defaultFilteredValue:void 0,forceFiltered:Pt.filtered});"children"in Pt&&(pt=[].concat((0,hi.Z)(pt),(0,hi.Z)(ka(Pt.children,zt,cn))))}),pt}function Kl(Rt,zt,an,pt,Pt,Lt,vn,cn){return an.map((sn,gn)=>{const mn=Is(gn,cn),{filterMultiple:xn=!0,filterMode:jn,filterSearch:ti}=sn;let Zn=sn;if(Zn.filters||Zn.filterDropdown){const xi=os(Zn,mn),Kn=pt.find(mi=>{let{key:ai}=mi;return xi===ai});Zn=Object.assign(Object.assign({},Zn),{title:mi=>he.createElement(Ua,{tablePrefixCls:Rt,prefixCls:`${Rt}-filter`,dropdownPrefixCls:zt,column:Zn,columnKey:xi,filterState:Kn,filterMultiple:xn,filterMode:jn,filterSearch:ti,triggerFilter:Lt,locale:Pt,getPopupContainer:vn},ps(sn.title,mi))})}return"children"in Zn&&(Zn=Object.assign(Object.assign({},Zn),{children:Kl(Rt,zt,Zn.children,pt,Pt,Lt,vn,mn)})),Zn})}function _u(Rt){const zt={};return Rt.forEach(an=>{let{key:pt,filteredKeys:Pt,column:Lt}=an;const{filters:vn,filterDropdown:cn}=Lt;if(cn)zt[pt]=Pt||null;else if(Array.isArray(Pt)){const sn=xl(vn);zt[pt]=sn.filter(gn=>Pt.includes(String(gn)))}else zt[pt]=null}),zt}function Ga(Rt,zt){return zt.reduce((an,pt)=>{const{column:{onFilter:Pt,filters:Lt},filteredKeys:vn}=pt;return Pt&&vn&&vn.length?an.filter(cn=>vn.some(sn=>{const gn=xl(Lt),mn=gn.findIndex(jn=>String(jn)===String(sn)),xn=mn!==-1?gn[mn]:sn;return Pt(xn,cn)})):an},Rt)}const Wa=Rt=>Rt.flatMap(zt=>"children"in zt?[zt].concat((0,hi.Z)(Wa(zt.children||[]))):[zt]);function Uu(Rt){let{prefixCls:zt,dropdownPrefixCls:an,mergedColumns:pt,onFilterChange:Pt,getPopupContainer:Lt,locale:vn}=Rt;const cn=he.useMemo(()=>Wa(pt||[]),[pt]),[sn,gn]=he.useState(()=>ka(cn,!0)),mn=he.useMemo(()=>{const Zn=ka(cn,!1);if(Zn.length===0)return Zn;let xi=!0,Kn=!0;if(Zn.forEach(mi=>{let{filteredKeys:ai}=mi;ai!==void 0?xi=!1:Kn=!1}),xi){const mi=(cn||[]).map((ai,Ri)=>os(ai,Is(Ri)));return sn.filter(ai=>{let{key:Ri}=ai;return mi.includes(Ri)}).map(ai=>{const Ri=cn[mi.findIndex(Oi=>Oi===ai.key)];return Object.assign(Object.assign({},ai),{column:Object.assign(Object.assign({},ai.column),Ri),forceFiltered:Ri.filtered})})}return Zn},[cn,sn]),xn=he.useMemo(()=>_u(mn),[mn]),jn=Zn=>{const xi=mn.filter(Kn=>{let{key:mi}=Kn;return mi!==Zn.key});xi.push(Zn),gn(xi),Pt(_u(xi),xi)};return[Zn=>Kl(zt,an,Zn,mn,vn,jn,Lt),mn,xn]}var yc=Uu;function Eu(Rt,zt,an){const pt=he.useRef({});function Pt(Lt){if(!pt.current||pt.current.data!==Rt||pt.current.childrenColumnName!==zt||pt.current.getRowKey!==an){let cn=function(sn){sn.forEach((gn,mn)=>{const xn=an(gn,mn);vn.set(xn,gn),gn&&typeof gn=="object"&&zt in gn&&cn(gn[zt]||[])})};const vn=new Map;cn(Rt),pt.current={data:Rt,childrenColumnName:zt,kvMap:vn,getRowKey:an}}return pt.current.kvMap.get(Lt)}return[Pt]}var Il=Ee(50371),Sc=function(Rt,zt){var an={};for(var pt in Rt)Object.prototype.hasOwnProperty.call(Rt,pt)&&zt.indexOf(pt)<0&&(an[pt]=Rt[pt]);if(Rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pt=0,pt=Object.getOwnPropertySymbols(Rt);Pt<pt.length;Pt++)zt.indexOf(pt[Pt])<0&&Object.prototype.propertyIsEnumerable.call(Rt,pt[Pt])&&(an[pt[Pt]]=Rt[pt[Pt]]);return an};const Gu=10;function Lu(Rt,zt){const an={current:Rt.current,pageSize:Rt.pageSize};return Object.keys(zt&&typeof zt=="object"?zt:{}).forEach(Pt=>{const Lt=Rt[Pt];typeof Lt!="function"&&(an[Pt]=Lt)}),an}function wl(Rt,zt,an){const pt=an&&typeof an=="object"?an:{},{total:Pt=0}=pt,Lt=Sc(pt,["total"]),[vn,cn]=(0,he.useState)(()=>({current:"defaultCurrent"in Lt?Lt.defaultCurrent:1,pageSize:"defaultPageSize"in Lt?Lt.defaultPageSize:Gu})),sn=(0,Il.Z)(vn,Lt,{total:Pt>0?Pt:Rt}),gn=Math.ceil((Pt||Rt)/sn.pageSize);sn.current>gn&&(sn.current=gn||1);const mn=(jn,ti)=>{cn({current:jn!=null?jn:1,pageSize:ti||sn.pageSize})},xn=(jn,ti)=>{var Zn;an&&((Zn=an.onChange)===null||Zn===void 0||Zn.call(an,jn,ti)),mn(jn,ti),zt(jn,ti||(sn==null?void 0:sn.pageSize))};return an===!1?[{},()=>{}]:[Object.assign(Object.assign({},sn),{onChange:xn}),mn]}var th=wl,xc=Ee(84105),lu=Ee(35654),so=Ee(90782),zo=Ee(71430),Ma=Ee(18929);const na={},Ds="SELECT_ALL",Ps="SELECT_INVERT",ks="SELECT_NONE",Ws=[],Zs=(Rt,zt)=>{let an=[];return(zt||[]).forEach(pt=>{an.push(pt),pt&&typeof pt=="object"&&Rt in pt&&(an=[].concat((0,hi.Z)(an),(0,hi.Z)(Zs(Rt,pt[Rt]))))}),an};var Dl=(Rt,zt)=>{const{preserveSelectedRowKeys:an,selectedRowKeys:pt,defaultSelectedRowKeys:Pt,getCheckboxProps:Lt,onChange:vn,onSelect:cn,onSelectAll:sn,onSelectInvert:gn,onSelectNone:mn,onSelectMultiple:xn,columnWidth:jn,type:ti,selections:Zn,fixed:xi,renderCell:Kn,hideSelectAll:mi,checkStrictly:ai=!0}=zt||{},{prefixCls:Ri,data:Oi,pageData:Zi,getRecordByKey:Ai,getRowKey:Ni,expandType:ur,childrenColumnName:ei,locale:Gi,getPopupContainer:Ei}=Rt,[wi,Yi]=(0,Ma.Z)(pt||Pt||Ws,{value:pt}),gi=he.useRef(new Map),dr=(0,he.useCallback)(Ur=>{if(an){const Tr=new Map;Ur.forEach($r=>{let _r=Ai($r);!_r&&gi.current.has($r)&&(_r=gi.current.get($r)),Tr.set($r,_r)}),gi.current=Tr}},[Ai,an]);he.useEffect(()=>{dr(wi)},[wi]);const{keyEntities:Xi}=(0,he.useMemo)(()=>{if(ai)return{keyEntities:null};let Ur=Oi;if(an){const Tr=new Set(Oi.map((_r,co)=>Ni(_r,co))),$r=Array.from(gi.current).reduce((_r,co)=>{let[kr,mo]=co;return Tr.has(kr)?_r:_r.concat(mo)},[]);Ur=[].concat((0,hi.Z)(Ur),(0,hi.Z)($r))}return(0,zo.I8)(Ur,{externalGetKey:Ni,childrenPropName:ei})},[Oi,Ni,ai,ei,an]),Pi=(0,he.useMemo)(()=>Zs(ei,Zi),[ei,Zi]),Ki=(0,he.useMemo)(()=>{const Ur=new Map;return Pi.forEach((Tr,$r)=>{const _r=Ni(Tr,$r),co=(Lt?Lt(Tr):null)||{};Ur.set(_r,co)}),Ur},[Pi,Ni,Lt]),vr=(0,he.useCallback)(Ur=>{var Tr;return!!(!((Tr=Ki.get(Ni(Ur)))===null||Tr===void 0)&&Tr.disabled)},[Ki,Ni]),[or,wo]=(0,he.useMemo)(()=>{if(ai)return[wi||[],[]];const{checkedKeys:Ur,halfCheckedKeys:Tr}=(0,so.S)(wi,!0,Xi,vr);return[Ur||[],Tr]},[wi,ai,Xi,vr]),Eo=(0,he.useMemo)(()=>{const Ur=ti==="radio"?or.slice(0,1):or;return new Set(Ur)},[or,ti]),ns=(0,he.useMemo)(()=>ti==="radio"?new Set:new Set(wo),[wo,ti]),[uo,Nr]=(0,he.useState)(null);he.useEffect(()=>{zt||Yi(Ws)},[!!zt]);const Io=(0,he.useCallback)((Ur,Tr)=>{let $r,_r;dr(Ur),an?($r=Ur,_r=Ur.map(co=>gi.current.get(co))):($r=[],_r=[],Ur.forEach(co=>{const kr=Ai(co);kr!==void 0&&($r.push(co),_r.push(kr))})),Yi($r),vn==null||vn($r,_r,{type:Tr})},[Yi,Ai,vn,an]),Dr=(0,he.useCallback)((Ur,Tr,$r,_r)=>{if(cn){const co=$r.map(kr=>Ai(kr));cn(Ai(Ur),Tr,co,_r)}Io($r,"single")},[cn,Ai,Io]),Vr=(0,he.useMemo)(()=>!Zn||mi?null:(Zn===!0?[Ds,Ps,ks]:Zn).map(Tr=>Tr===Ds?{key:"all",text:Gi.selectionAll,onSelect(){Io(Oi.map(($r,_r)=>Ni($r,_r)).filter($r=>{const _r=Ki.get($r);return!(_r!=null&&_r.disabled)||Eo.has($r)}),"all")}}:Tr===Ps?{key:"invert",text:Gi.selectInvert,onSelect(){const $r=new Set(Eo);Zi.forEach((co,kr)=>{const mo=Ni(co,kr),Go=Ki.get(mo);Go!=null&&Go.disabled||($r.has(mo)?$r.delete(mo):$r.add(mo))});const _r=Array.from($r);gn&&gn(_r),Io(_r,"invert")}}:Tr===ks?{key:"none",text:Gi.selectNone,onSelect(){mn==null||mn(),Io(Array.from(Eo).filter($r=>{const _r=Ki.get($r);return _r==null?void 0:_r.disabled}),"none")}}:Tr).map(Tr=>Object.assign(Object.assign({},Tr),{onSelect:function(){for(var $r,_r,co=arguments.length,kr=new Array(co),mo=0;mo<co;mo++)kr[mo]=arguments[mo];(_r=Tr.onSelect)===null||_r===void 0||($r=_r).call.apply($r,[Tr].concat(kr)),Nr(null)}})),[Zn,Eo,Zi,Ni,gn,Io]);return[(0,he.useCallback)(Ur=>{var Tr;if(!zt)return Ur.filter(Qo=>Qo!==na);let $r=(0,hi.Z)(Ur);const _r=new Set(Eo),co=Pi.map(Ni).filter(Qo=>!Ki.get(Qo).disabled),kr=co.every(Qo=>_r.has(Qo)),mo=co.some(Qo=>_r.has(Qo)),Go=()=>{const Qo=[];kr?co.forEach(ws=>{_r.delete(ws),Qo.push(ws)}):co.forEach(ws=>{_r.has(ws)||(_r.add(ws),Qo.push(ws))});const qo=Array.from(_r);sn==null||sn(!kr,qo.map(ws=>Ai(ws)),Qo.map(ws=>Ai(ws))),Io(qo,"all"),Nr(null)};let Wo;if(ti!=="radio"){let Qo;if(Vr){const Fo={getPopupContainer:Ei,items:Vr.map((As,Pa)=>{const{key:Pl,text:$l,onSelect:Bl}=As;return{key:Pl!=null?Pl:Pa,onClick:()=>{Bl==null||Bl(co)},label:$l}})};Qo=he.createElement("div",{className:`${Ri}-selection-extra`},he.createElement(La.Z,{menu:Fo,getPopupContainer:Ei},he.createElement("span",null,he.createElement(xc.Z,null))))}const qo=Pi.map((Fo,As)=>{const Pa=Ni(Fo,As),Pl=Ki.get(Pa)||{};return Object.assign({checked:_r.has(Pa)},Pl)}).filter(Fo=>{let{disabled:As}=Fo;return As}),ws=!!qo.length&&qo.length===Pi.length,Ms=ws&&qo.every(Fo=>{let{checked:As}=Fo;return As}),fa=ws&&qo.some(Fo=>{let{checked:As}=Fo;return As});Wo=!mi&&he.createElement("div",{className:`${Ri}-selection`},he.createElement(Lr.default,{checked:ws?Ms:!!Pi.length&&kr,indeterminate:ws?!Ms&&fa:!kr&&mo,onChange:Go,disabled:Pi.length===0||ws,"aria-label":Qo?"Custom selection":"Select all",skipGroup:!0}),Qo)}let Yr;ti==="radio"?Yr=(Qo,qo,ws)=>{const Ms=Ni(qo,ws),fa=_r.has(Ms);return{node:he.createElement(Ci.ZP,Object.assign({},Ki.get(Ms),{checked:fa,onClick:Fo=>Fo.stopPropagation(),onChange:Fo=>{_r.has(Ms)||Dr(Ms,!0,[Ms],Fo.nativeEvent)}})),checked:fa}}:Yr=(Qo,qo,ws)=>{var Ms;const fa=Ni(qo,ws),Fo=_r.has(fa),As=ns.has(fa),Pa=Ki.get(fa);let Pl;return ur==="nest"?Pl=As:Pl=(Ms=Pa==null?void 0:Pa.indeterminate)!==null&&Ms!==void 0?Ms:As,{node:he.createElement(Lr.default,Object.assign({},Pa,{indeterminate:Pl,checked:Fo,skipGroup:!0,onClick:$l=>$l.stopPropagation(),onChange:$l=>{let{nativeEvent:Bl}=$l;const{shiftKey:cu}=Bl;let hu=-1,Yl=-1;if(cu&&ai){const fs=new Set([uo,fa]);co.some((Da,ia)=>{if(fs.has(Da))if(hu===-1)hu=ia;else return Yl=ia,!0;return!1})}if(Yl!==-1&&hu!==Yl&&ai){const fs=co.slice(hu,Yl+1),Da=[];Fo?fs.forEach(Ns=>{_r.has(Ns)&&(Da.push(Ns),_r.delete(Ns))}):fs.forEach(Ns=>{_r.has(Ns)||(Da.push(Ns),_r.add(Ns))});const ia=Array.from(_r);xn==null||xn(!Fo,ia.map(Ns=>Ai(Ns)),Da.map(Ns=>Ai(Ns))),Io(ia,"multiple")}else{const fs=or;if(ai){const Da=Fo?(0,lu._5)(fs,fa):(0,lu.L0)(fs,fa);Dr(fa,!Fo,Da,Bl)}else{const Da=(0,so.S)([].concat((0,hi.Z)(fs),[fa]),!0,Xi,vr),{checkedKeys:ia,halfCheckedKeys:Ns}=Da;let Xl=ia;if(Fo){const _c=new Set(ia);_c.delete(fa),Xl=(0,so.S)(Array.from(_c),{checked:!1,halfCheckedKeys:Ns},Xi,vr).checkedKeys}Dr(fa,!Fo,Xl,Bl)}}Nr(Fo?null:fa)}})),checked:Fo}};const Ro=(Qo,qo,ws)=>{const{node:Ms,checked:fa}=Yr(Qo,qo,ws);return Kn?Kn(fa,qo,ws,Ms):Ms};if(!$r.includes(na))if($r.findIndex(Qo=>{var qo;return((qo=Qo[Ji])===null||qo===void 0?void 0:qo.columnType)==="EXPAND_COLUMN"})===0){const[Qo,...qo]=$r;$r=[Qo,na].concat((0,hi.Z)(qo))}else $r=[na].concat((0,hi.Z)($r));const _s=$r.indexOf(na);$r=$r.filter((Qo,qo)=>Qo!==na||qo===_s);const Ao=$r[_s-1],Jo=$r[_s+1];let xs=xi;xs===void 0&&((Jo==null?void 0:Jo.fixed)!==void 0?xs=Jo.fixed:(Ao==null?void 0:Ao.fixed)!==void 0&&(xs=Ao.fixed)),xs&&Ao&&((Tr=Ao[Ji])===null||Tr===void 0?void 0:Tr.columnType)==="EXPAND_COLUMN"&&Ao.fixed===void 0&&(Ao.fixed=xs);const Xs=ct()(`${Ri}-selection-col`,{[`${Ri}-selection-col-with-dropdown`]:Zn&&ti==="checkbox"}),Cl={fixed:xs,width:jn,className:`${Ri}-selection-column`,title:zt.columnTitle||Wo,render:Ro,onCell:zt.onCell,[Ji]:{className:Xs}};return $r.map(Qo=>Qo===na?Cl:Qo)},[Ni,Pi,zt,or,Eo,ns,jn,Vr,ur,uo,Ki,xn,Dr,vr]),Eo]},Rs=Ee(89489),xh=Ee(59477),nh=Ee(6848);const wc="ascend",mr="descend";function bc(Rt){return typeof Rt.sorter=="object"&&typeof Rt.sorter.multiple=="number"?Rt.sorter.multiple:!1}function on(Rt){return typeof Rt=="function"?Rt:Rt&&typeof Rt=="object"&&Rt.compare?Rt.compare:!1}function Jn(Rt,zt){return zt?Rt[Rt.indexOf(zt)+1]:Rt[0]}function wh(Rt,zt,an){let pt=[];function Pt(Lt,vn){pt.push({column:Lt,key:os(Lt,vn),multiplePriority:bc(Lt),sortOrder:Lt.sortOrder})}return(Rt||[]).forEach((Lt,vn)=>{const cn=Is(vn,an);Lt.children?("sortOrder"in Lt&&Pt(Lt,cn),pt=[].concat((0,hi.Z)(pt),(0,hi.Z)(wh(Lt.children,zt,cn)))):Lt.sorter&&("sortOrder"in Lt?Pt(Lt,cn):zt&&Lt.defaultSortOrder&&pt.push({column:Lt,key:os(Lt,cn),multiplePriority:bc(Lt),sortOrder:Lt.defaultSortOrder}))}),pt}function Qh(Rt,zt,an,pt,Pt,Lt,vn,cn){return(zt||[]).map((sn,gn)=>{const mn=Is(gn,cn);let xn=sn;if(xn.sorter){const jn=xn.sortDirections||Pt,ti=xn.showSorterTooltip===void 0?vn:xn.showSorterTooltip,Zn=os(xn,mn),xi=an.find(ur=>{let{key:ei}=ur;return ei===Zn}),Kn=xi?xi.sortOrder:null,mi=Jn(jn,Kn);let ai;if(sn.sortIcon)ai=sn.sortIcon({sortOrder:Kn});else{const ur=jn.includes(wc)&&he.createElement(xh.Z,{className:ct()(`${Rt}-column-sorter-up`,{active:Kn===wc})}),ei=jn.includes(mr)&&he.createElement(Rs.Z,{className:ct()(`${Rt}-column-sorter-down`,{active:Kn===mr})});ai=he.createElement("span",{className:ct()(`${Rt}-column-sorter`,{[`${Rt}-column-sorter-full`]:!!(ur&&ei)})},he.createElement("span",{className:`${Rt}-column-sorter-inner`,"aria-hidden":"true"},ur,ei))}const{cancelSort:Ri,triggerAsc:Oi,triggerDesc:Zi}=Lt||{};let Ai=Ri;mi===mr?Ai=Zi:mi===wc&&(Ai=Oi);const Ni=typeof ti=="object"?ti:{title:Ai};xn=Object.assign(Object.assign({},xn),{className:ct()(xn.className,{[`${Rt}-column-sort`]:Kn}),title:ur=>{const ei=he.createElement("div",{className:`${Rt}-column-sorters`},he.createElement("span",{className:`${Rt}-column-title`},ps(sn.title,ur)),ai);return ti?he.createElement(nh.Z,Object.assign({},Ni),ei):ei},onHeaderCell:ur=>{const ei=sn.onHeaderCell&&sn.onHeaderCell(ur)||{},Gi=ei.onClick,Ei=ei.onKeyDown;ei.onClick=gi=>{pt({column:sn,key:Zn,sortOrder:mi,multiplePriority:bc(sn)}),Gi==null||Gi(gi)},ei.onKeyDown=gi=>{gi.keyCode===yi.Z.ENTER&&(pt({column:sn,key:Zn,sortOrder:mi,multiplePriority:bc(sn)}),Ei==null||Ei(gi))};const wi=sa(sn.title,{}),Yi=wi==null?void 0:wi.toString();return Kn?ei["aria-sort"]=Kn==="ascend"?"ascending":"descending":ei["aria-label"]=Yi||"",ei.className=ct()(ei.className,`${Rt}-column-has-sorters`),ei.tabIndex=0,sn.ellipsis&&(ei.title=(wi!=null?wi:"").toString()),ei}})}return"children"in xn&&(xn=Object.assign(Object.assign({},xn),{children:Qh(Rt,xn.children,an,pt,Pt,Lt,vn,mn)})),xn})}function Mu(Rt){const{column:zt,sortOrder:an}=Rt;return{column:zt,order:an,field:zt.dataIndex,columnKey:zt.key}}function Tu(Rt){const zt=Rt.filter(an=>{let{sortOrder:pt}=an;return pt}).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,an){const pt=zt.slice().sort((vn,cn)=>cn.multiplePriority-vn.multiplePriority),Pt=Rt.slice(),Lt=pt.filter(vn=>{let{column:{sorter:cn},sortOrder:sn}=vn;return on(cn)&&sn});return Lt.length?Pt.sort((vn,cn)=>{for(let sn=0;sn<Lt.length;sn+=1){const gn=Lt[sn],{column:{sorter:mn},sortOrder:xn}=gn,jn=on(mn);if(jn&&xn){const ti=jn(vn,cn,xn);if(ti!==0)return xn===wc?ti:-ti}}return 0}).map(vn=>{const cn=vn[an];return cn?Object.assign(Object.assign({},vn),{[an]:Wu(cn,zt,an)}):vn}):Pt}function bh(Rt){let{prefixCls:zt,mergedColumns:an,onSorterChange:pt,sortDirections:Pt,tableLocale:Lt,showSorterTooltip:vn}=Rt;const[cn,sn]=he.useState(wh(an,!0)),gn=he.useMemo(()=>{let Zn=!0;const xi=wh(an,!1);if(!xi.length)return cn;const Kn=[];function mi(Ri){Zn?Kn.push(Ri):Kn.push(Object.assign(Object.assign({},Ri),{sortOrder:null}))}let ai=null;return xi.forEach(Ri=>{ai===null?(mi(Ri),Ri.sortOrder&&(Ri.multiplePriority===!1?Zn=!1:ai=!0)):(ai&&Ri.multiplePriority!==!1||(Zn=!1),mi(Ri))}),Kn},[an,cn]),mn=he.useMemo(()=>{const Zn=gn.map(xi=>{let{column:Kn,sortOrder:mi}=xi;return{column:Kn,order:mi}});return{sortColumns:Zn,sortColumn:Zn[0]&&Zn[0].column,sortOrder:Zn[0]&&Zn[0].order}},[gn]);function xn(Zn){let xi;Zn.multiplePriority===!1||!gn.length||gn[0].multiplePriority===!1?xi=[Zn]:xi=[].concat((0,hi.Z)(gn.filter(Kn=>{let{key:mi}=Kn;return mi!==Zn.key})),[Zn]),sn(xi),pt(Tu(xi),xi)}return[Zn=>Qh(zt,Zn,gn,xn,Pt,Lt,vn),gn,mn,()=>Tu(gn)]}function Cc(Rt,zt){return Rt.map(an=>{const pt=Object.assign({},an);return pt.title=ps(an.title,zt),"children"in pt&&(pt.children=Cc(pt.children,zt)),pt})}function Ks(Rt){return[he.useCallback(an=>Cc(an,Rt),[Rt])]}var Wr=ir((Rt,zt)=>{const{_renderTimes:an}=Rt,{_renderTimes:pt}=zt;return an!==pt}),Ia=ho((Rt,zt)=>{const{_renderTimes:an}=Rt,{_renderTimes:pt}=zt;return an!==pt}),Vs=Ee(64993),Ls=Ee(17313),bo=Ee(83116),da=Ee(37613),as=Rt=>{const{componentCls:zt}=Rt,an=`${Rt.lineWidth}px ${Rt.lineType} ${Rt.tableBorderColor}`,pt=(Pt,Lt,vn)=>({[`&${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 -${vn+Rt.lineWidth}px`}}}}}});return{[`${zt}-wrapper`]:{[`${zt}${zt}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${zt}-title`]:{border:an,borderBottom:0},[`> ${zt}-container`]:{borderInlineStart:an,borderTop:an,[`
|
|
|
> ${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:an},"> thead":{"> tr:not(:last-child) > th":{borderBottom:an},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${zt}-cell-fix-right-first::after`]:{borderInlineEnd:an}},"\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:an,content:'""'}}}}}},[`&${zt}-scroll-horizontal`]:{[`> ${zt}-container > ${zt}-body`]:{"> table > tbody":{[`
|
|
|
> tr${zt}-expanded-row,
|
|
|
> tr${zt}-placeholder
|
|
|
`]:{"> th, > td":{borderInlineEnd:0}}}}}},pt("middle",Rt.tablePaddingVerticalMiddle,Rt.tablePaddingHorizontalMiddle)),pt("small",Rt.tablePaddingVerticalSmall,Rt.tablePaddingHorizontalSmall)),{[`> ${zt}-footer`]:{border:an,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:an}}}},Ca=Rt=>{const{componentCls:zt}=Rt;return{[`${zt}-wrapper`]:{[`${zt}-cell-ellipsis`]:Object.assign(Object.assign({},Ls.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"}})}}},Ho=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}}}}},Za=Ee(15969),vs=Rt=>{const{componentCls:zt,antCls:an,controlInteractiveSize:pt,motionDurationSlow:Pt,lineWidth:Lt,paddingXS:vn,lineType:cn,tableBorderColor:sn,tableExpandIconBg:gn,tableExpandColumnWidth:mn,borderRadius:xn,fontSize:jn,fontSizeSM:ti,lineHeight:Zn,tablePaddingVertical:xi,tablePaddingHorizontal:Kn,tableExpandedRowBg:mi,paddingXXS:ai}=Rt,Ri=pt/2-Lt,Oi=Ri*2+Lt*3,Zi=`${Lt}px ${cn} ${sn}`,Ai=ai-Lt;return{[`${zt}-wrapper`]:{[`${zt}-expand-icon-col`]:{width:mn},[`${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,Za.N)(Rt)),{position:"relative",float:"left",boxSizing:"border-box",width:Oi,height:Oi,padding:0,color:"inherit",lineHeight:`${Oi}px`,background:gn,border:Zi,borderRadius:xn,transform:`scale(${pt/Oi})`,transition:`all ${Pt}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${Pt} ease-out`,content:'""'},"&::before":{top:Ri,insetInlineEnd:Ai,insetInlineStart:Ai,height:Lt},"&::after":{top:Ai,bottom:Ai,insetInlineStart:Ri,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:(jn*Zn-Lt*3)/2-Math.ceil((ti*1.4-Lt*3)/2),marginInlineEnd:vn},[`tr${zt}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:mi}},[`${an}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${zt}-expanded-row-fixed`]:{position:"relative",margin:`-${xi}px -${Kn}px`,padding:`${xi}px ${Kn}px`}}}},Bs=Rt=>{const{componentCls:zt,antCls:an,iconCls:pt,tableFilterDropdownWidth:Pt,tableFilterDropdownSearchWidth:Lt,paddingXXS:vn,paddingXS:cn,colorText:sn,lineWidth:gn,lineType:mn,tableBorderColor:xn,tableHeaderIconColor:jn,fontSizeSM:ti,tablePaddingHorizontal:Zn,borderRadius:xi,motionDurationSlow:Kn,colorTextDescription:mi,colorPrimary:ai,tableHeaderFilterActiveBg:Ri,colorTextDisabled:Oi,tableFilterDropdownBg:Zi,tableFilterDropdownHeight:Ai,controlItemBgHover:Ni,controlItemBgActive:ur,boxShadowSecondary:ei,filterDropdownMenuBg:Gi}=Rt,Ei=`${an}-dropdown`,wi=`${zt}-filter-dropdown`,Yi=`${an}-tree`,gi=`${gn}px ${mn} ${xn}`;return[{[`${zt}-wrapper`]:{[`${zt}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${zt}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-vn,marginInline:`${vn}px ${-Zn/2}px`,padding:`0 ${vn}px`,color:jn,fontSize:ti,borderRadius:xi,cursor:"pointer",transition:`all ${Kn}`,"&:hover":{color:mi,background:Ri},"&.active":{color:ai}}}},{[`${an}-dropdown`]:{[wi]:Object.assign(Object.assign({},(0,Ls.Wf)(Rt)),{minWidth:Pt,backgroundColor:Zi,borderRadius:xi,boxShadow:ei,overflow:"hidden",[`${Ei}-menu`]:{maxHeight:Ai,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:Gi,"&:empty::after":{display:"block",padding:`${cn}px 0`,color:Oi,fontSize:ti,textAlign:"center",content:'"Not Found"'}},[`${wi}-tree`]:{paddingBlock:`${cn}px 0`,paddingInline:cn,[Yi]:{padding:0},[`${Yi}-treenode ${Yi}-node-content-wrapper:hover`]:{backgroundColor:Ni},[`${Yi}-treenode-checkbox-checked ${Yi}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:ur}}},[`${wi}-search`]:{padding:cn,borderBottom:gi,"&-input":{input:{minWidth:Lt},[pt]:{color:Oi}}},[`${wi}-checkall`]:{width:"100%",marginBottom:vn,marginInlineStart:vn},[`${wi}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${cn-gn}px ${cn}px`,overflow:"hidden",borderTop:gi}})}},{[`${an}-dropdown ${wi}, ${wi}-submenu`]:{[`${an}-checkbox-wrapper + span`]:{paddingInlineStart:cn,color:sn},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},Rc=Rt=>{const{componentCls:zt,lineWidth:an,colorSplit:pt,motionDurationSlow:Pt,zIndexTableFixed:Lt,tableBg:vn,zIndexTableSticky:cn}=Rt,sn=pt;return{[`${zt}-wrapper`]:{[`
|
|
|
${zt}-cell-fix-left,
|
|
|
${zt}-cell-fix-right
|
|
|
`]:{position:"sticky !important",zIndex:Lt,background:vn},[`
|
|
|
${zt}-cell-fix-left-first::after,
|
|
|
${zt}-cell-fix-left-last::after
|
|
|
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-an,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:-an,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:cn+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:an}=Rt;return{[`${zt}-wrapper`]:{[`${zt}-pagination${an}-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:an}=Rt;return{[`${zt}-wrapper`]:{[zt]:{[`${zt}-title, ${zt}-header`]:{borderRadius:`${an}px ${an}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:an,borderStartEndRadius:an,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:an},"> *:last-child":{borderStartEndRadius:an}}},"&-footer":{borderRadius:`0 0 ${an}px ${an}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:an,iconCls:pt,fontSizeIcon:Pt,padding:Lt,paddingXS:vn,tableHeaderIconColor:cn,tableHeaderIconColorHover:sn,tableSelectionColumnWidth:gn}=Rt;return{[`${zt}-wrapper`]:{[`${zt}-selection-col`]:{width:gn,[`&${zt}-selection-col-with-dropdown`]:{width:gn+Pt+Lt/4}},[`${zt}-bordered ${zt}-selection-col`]:{width:gn+vn*2,[`&${zt}-selection-col-with-dropdown`]:{width:gn+Pt+Lt/4+vn*2}},[`
|
|
|
table tr th${zt}-selection-column,
|
|
|
table tr td${zt}-selection-column
|
|
|
`]:{paddingInlineEnd:Rt.paddingXS,paddingInlineStart:Rt.paddingXS,textAlign:"center",[`${an}-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`,[pt]:{color:cn,fontSize:Pt,verticalAlign:"baseline","&:hover":{color:sn}}}}}},io=Rt=>{const{componentCls:zt}=Rt,an=(pt,Pt,Lt,vn)=>({[`${zt}${zt}-${pt}`]:{fontSize:vn,[`
|
|
|
${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({},an("middle",Rt.tablePaddingVerticalMiddle,Rt.tablePaddingHorizontalMiddle,Rt.tableFontSizeMiddle)),an("small",Rt.tablePaddingVerticalSmall,Rt.tablePaddingHorizontalSmall,Rt.tableFontSizeSmall))}},ku=Rt=>{const{componentCls:zt,marginXXS:an,fontSizeIcon:pt,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:an,color:Pt,fontSize:0,transition:`color ${Rt.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:pt,"&.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:an,tableScrollThumbBg:pt,tableScrollThumbBgHover:Pt,tableScrollThumbSize:Lt,tableScrollBg:vn,zIndexTableSticky:cn,stickyScrollBarBorderRadius:sn}=Rt,gn=`${Rt.lineWidth}px ${Rt.lineType} ${Rt.tableBorderColor}`;return{[`${zt}-wrapper`]:{[`${zt}-sticky`]:{"&-holder":{position:"sticky",zIndex:cn,background:Rt.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Lt}px !important`,zIndex:cn,display:"flex",alignItems:"center",background:vn,borderTop:gn,opacity:an,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:Lt,backgroundColor:pt,borderRadius:sn,transition:`all ${Rt.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:Pt}}}}}}},uu=Rt=>{const{componentCls:zt,lineWidth:an,tableBorderColor:pt}=Rt,Pt=`${an}px ${Rt.lineType} ${pt}`;return{[`${zt}-wrapper`]:{[`${zt}-summary`]:{position:"relative",zIndex:Rt.zIndexTableFixed,background:Rt.tableBg,"> tr":{"> th, > td":{borderBottom:Pt}}},[`div${zt}-summary`]:{boxShadow:`0 -${an}px 0 ${pt}`}}}},ds=Rt=>{const{componentCls:zt}=Rt,an=`${Rt.lineWidth}px ${Rt.lineType} ${Rt.tableBorderColor}`,pt=`${zt}-expanded-row-cell`;return{[`${zt}-wrapper`]:{[`${zt}-tbody-virtual`]:{[`${zt}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${zt}-cell`]:{borderBottom:an},[`${zt}-expanded-row`]:{[`${pt}${pt}-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:an,position:"absolute"},[`${zt}-cell`]:{borderInlineEnd:an,[`&${zt}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-Rt.lineWidth,borderInlineStart:an}}}}}}};const Fs=Rt=>{const{componentCls:zt,fontWeightStrong:an,tablePaddingVertical:pt,tablePaddingHorizontal:Pt,lineWidth:Lt,lineType:vn,tableBorderColor:cn,tableFontSize:sn,tableBg:gn,tableRadius:mn,tableHeaderTextColor:xn,motionDurationMid:jn,tableHeaderBg:ti,tableHeaderCellSplitColor:Zn,tableRowHoverBg:xi,tableSelectedRowBg:Kn,tableSelectedRowHoverBg:mi,tableFooterTextColor:ai,tableFooterBg:Ri,paddingContentVerticalLG:Oi}=Rt,Zi=`${Lt}px ${vn} ${cn}`;return{[`${zt}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,Ls.dF)()),{[zt]:Object.assign(Object.assign({},(0,Ls.Wf)(Rt)),{fontSize:sn,background:gn,borderRadius:`${mn}px ${mn}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${mn}px ${mn}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:`${Oi}px ${Pt}px`,overflowWrap:"break-word"},[`${zt}-title`]:{padding:`${pt}px ${Pt}px`},[`${zt}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:xn,fontWeight:an,textAlign:"start",background:ti,borderBottom:Zi,transition:`background ${jn} 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:Zn,transform:"translateY(-50%)",transition:`background-color ${jn}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${zt}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${jn}, border-color ${jn}`,borderBottom:Zi,[`
|
|
|
> ${zt}-wrapper:only-child,
|
|
|
> ${zt}-expanded-row-fixed > ${zt}-wrapper:only-child
|
|
|
`]:{[zt]:{marginBlock:`-${pt}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:xn,fontWeight:an,textAlign:"start",background:ti,borderBottom:Zi,transition:`background ${jn} ease`},[`
|
|
|
&${zt}-row:hover > th,
|
|
|
&${zt}-row:hover > td,
|
|
|
> th${zt}-cell-row-hover,
|
|
|
> td${zt}-cell-row-hover
|
|
|
`]:{background:xi},[`&${zt}-row-selected`]:{"> th, > td":{background:Kn},"&:hover > th, &:hover > td":{background:mi}}}},[`${zt}-footer`]:{padding:`${pt}px ${Pt}px`,color:ai,background:Ri}})}};var rc=(0,bo.Z)("Table",Rt=>{const{colorTextHeading:zt,colorSplit:an,colorIcon:pt,colorIconHover:Pt,opacityLoading:Lt,colorBgContainer:vn,controlInteractiveSize:cn,headerBg:sn,headerColor:gn,headerSortActiveBg:mn,headerSortHoverBg:xn,bodySortBg:jn,rowHoverBg:ti,rowSelectedBg:Zn,rowSelectedHoverBg:xi,rowExpandedBg:Kn,cellPaddingBlock:mi,cellPaddingInline:ai,cellPaddingBlockMD:Ri,cellPaddingInlineMD:Oi,cellPaddingBlockSM:Zi,cellPaddingInlineSM:Ai,borderColor:Ni,footerBg:ur,footerColor:ei,headerBorderRadius:Gi,cellFontSize:Ei,cellFontSizeMD:wi,cellFontSizeSM:Yi,headerSplitColor:gi,fixedHeaderSortActiveBg:dr,headerFilterHoverBg:Xi,filterDropdownBg:Pi,expandIconBg:Ki,selectionColumnWidth:vr,stickyScrollBarBg:or}=Rt,wo=new Vs.C(pt),Eo=new Vs.C(Pt),ns=2,uo=(0,da.TS)(Rt,{tableFontSize:Ei,tableBg:vn,tableRadius:Gi,tablePaddingVertical:mi,tablePaddingHorizontal:ai,tablePaddingVerticalMiddle:Ri,tablePaddingHorizontalMiddle:Oi,tablePaddingVerticalSmall:Zi,tablePaddingHorizontalSmall:Ai,tableBorderColor:Ni,tableHeaderTextColor:gn,tableHeaderBg:sn,tableFooterTextColor:ei,tableFooterBg:ur,tableHeaderCellSplitColor:gi,tableHeaderSortBg:mn,tableHeaderSortHoverBg:xn,tableHeaderIconColor:wo.clone().setAlpha(wo.getAlpha()*Lt).toRgbString(),tableHeaderIconColorHover:Eo.clone().setAlpha(Eo.getAlpha()*Lt).toRgbString(),tableBodySortBg:jn,tableFixedHeaderSortActiveBg:dr,tableHeaderFilterActiveBg:Xi,tableFilterDropdownBg:Pi,tableRowHoverBg:ti,tableSelectedRowBg:Zn,tableSelectedRowHoverBg:xi,zIndexTableFixed:ns,zIndexTableSticky:ns+1,tableFontSizeMiddle:wi,tableFontSizeSmall:Yi,tableSelectionColumnWidth:vr,tableExpandIconBg:Ki,tableExpandColumnWidth:cn+2*Rt.padding,tableExpandedRowBg:Kn,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:or,tableScrollThumbBgHover:zt,tableScrollBg:an});return[Fs(uo),Ad(uo),uu(uo),ku(uo),Bs(uo),as(uo),Nd(uo),vs(uo),uu(uo),Ho(uo),Ch(uo),Rc(uo),Au(uo),Ca(uo),io(uo),rh(uo),ds(uo)]},Rt=>{const{colorFillAlter:zt,colorBgContainer:an,colorTextHeading:pt,colorFillSecondary:Pt,colorFillContent:Lt,controlItemBgActive:vn,controlItemBgActiveHover:cn,padding:sn,paddingSM:gn,paddingXS:mn,colorBorderSecondary:xn,borderRadiusLG:jn,fontSize:ti,controlHeight:Zn,colorTextPlaceholder:xi}=Rt,Kn=new Vs.C(Pt).onBackground(an).toHexShortString(),mi=new Vs.C(Lt).onBackground(an).toHexShortString(),ai=new Vs.C(zt).onBackground(an).toHexShortString();return{headerBg:ai,headerColor:pt,headerSortActiveBg:Kn,headerSortHoverBg:mi,bodySortBg:ai,rowHoverBg:ai,rowSelectedBg:vn,rowSelectedHoverBg:cn,rowExpandedBg:zt,cellPaddingBlock:sn,cellPaddingInline:sn,cellPaddingBlockMD:gn,cellPaddingInlineMD:mn,cellPaddingBlockSM:mn,cellPaddingInlineSM:mn,borderColor:xn,headerBorderRadius:jn,footerBg:ai,footerColor:pt,cellFontSize:ti,cellFontSizeMD:ti,cellFontSizeSM:ti,headerSplitColor:xn,fixedHeaderSortActiveBg:Kn,headerFilterHoverBg:Lt,filterDropdownMenuBg:an,filterDropdownBg:an,expandIconBg:an,selectionColumnWidth:Zn,stickyScrollBarBg:xi,stickyScrollBarBorderRadius:100}});const el=[],Id=(Rt,zt)=>{const{prefixCls:an,className:pt,rootClassName:Pt,style:Lt,size:vn,bordered:cn,dropdownPrefixCls:sn,dataSource:gn,pagination:mn,rowSelection:xn,rowKey:jn="key",rowClassName:ti,columns:Zn,children:xi,childrenColumnName:Kn,onChange:mi,getPopupContainer:ai,loading:Ri,expandIcon:Oi,expandable:Zi,expandedRowRender:Ai,expandIconColumnIndex:Ni,indentSize:ur,scroll:ei,sortDirections:Gi,locale:Ei,showSorterTooltip:wi=!0,virtual:Yi}=Rt,gi=he.useMemo(()=>Zn||wt(xi),[Zn,xi]),dr=he.useMemo(()=>gi.some(ss=>ss.responsive),[gi]),Xi=(0,Xn.Z)(dr),Pi=he.useMemo(()=>{const ss=new Set(Object.keys(Xi).filter(js=>Xi[js]));return gi.filter(js=>!js.responsive||js.responsive.some(va=>ss.has(va)))},[gi,Xi]),Ki=(0,qi.Z)(Rt,["className","style","columns"]),{locale:vr=er.Z,direction:or,table:wo,renderEmpty:Eo,getPrefixCls:ns,getPopupContainer:uo}=he.useContext(_o.E_),Nr=(0,ji.Z)(vn),Io=Object.assign(Object.assign({},vr.Table),Ei),Dr=gn||el,Vr=ns("table",an),is=ns("dropdown",sn),Ur=Object.assign({childrenColumnName:Kn,expandIconColumnIndex:Ni},Zi),{childrenColumnName:Tr="children"}=Ur,$r=he.useMemo(()=>Dr.some(ss=>ss==null?void 0:ss[Tr])?"nest":Ai||Zi&&Zi.expandedRowRender?"row":null,[Dr]),_r={body:he.useRef()},co=he.useMemo(()=>typeof jn=="function"?jn:ss=>ss==null?void 0:ss[jn],[jn]),[kr]=Eu(Dr,Tr,co),mo={},Go=function(ss,js){let va=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var zs,rs,_a;const _l=Object.assign(Object.assign({},mo),ss);va&&((zs=mo.resetPagination)===null||zs===void 0||zs.call(mo),!((rs=_l.pagination)===null||rs===void 0)&&rs.current&&(_l.pagination.current=1),mn&&mn.onChange&&mn.onChange(1,(_a=_l.pagination)===null||_a===void 0?void 0:_a.pageSize)),ei&&ei.scrollToFirstRowOnChange!==!1&&_r.body.current&&(0,Qr.Z)(0,{getContainer:()=>_r.body.current}),mi==null||mi(_l.pagination,_l.filters,_l.sorter,{currentDataSource:Ga(Wu(Dr,_l.sorterStates,Tr),_l.filterStates),action:js})},Wo=(ss,js)=>{Go({sorter:ss,sorterStates:js},"sort",!1)},[Yr,Ro,_s,Ao]=bh({prefixCls:Vr,mergedColumns:Pi,onSorterChange:Wo,sortDirections:Gi||["ascend","descend"],tableLocale:Io,showSorterTooltip:wi}),Jo=he.useMemo(()=>Wu(Dr,Ro,Tr),[Dr,Ro]);mo.sorter=Ao(),mo.sorterStates=Ro;const xs=(ss,js)=>{Go({filters:ss,filterStates:js},"filter",!0)},[Xs,Cl,Qo]=yc({prefixCls:Vr,locale:Io,dropdownPrefixCls:is,mergedColumns:Pi,onFilterChange:xs,getPopupContainer:ai||uo}),qo=Ga(Jo,Cl);mo.filters=Qo,mo.filterStates=Cl;const ws=he.useMemo(()=>{const ss={};return Object.keys(Qo).forEach(js=>{Qo[js]!==null&&(ss[js]=Qo[js])}),Object.assign(Object.assign({},_s),{filters:ss})},[_s,Qo]),[Ms]=Ks(ws),fa=(ss,js)=>{Go({pagination:Object.assign(Object.assign({},mo.pagination),{current:ss,pageSize:js})},"paginate")},[Fo,As]=th(qo.length,fa,mn);mo.pagination=mn===!1?{}:Lu(Fo,mn),mo.resetPagination=As;const Pa=he.useMemo(()=>{if(mn===!1||!Fo.pageSize)return qo;const{current:ss=1,total:js,pageSize:va=Gu}=Fo;return qo.length<js?qo.length>va?qo.slice((ss-1)*va,ss*va):qo:qo.slice((ss-1)*va,ss*va)},[!!mn,qo,Fo&&Fo.current,Fo&&Fo.pageSize,Fo&&Fo.total]),[Pl,$l]=Dl({prefixCls:Vr,data:qo,pageData:Pa,getRowKey:co,getRecordByKey:kr,expandType:$r,childrenColumnName:Tr,locale:Io,getPopupContainer:ai||uo},xn),Bl=(ss,js,va)=>{let zs;return typeof ti=="function"?zs=ct()(ti(ss,js,va)):zs=ct()(ti),ct()({[`${Vr}-row-selected`]:$l.has(co(ss,js))},zs)};Ur.__PARENT_RENDER_ICON__=Ur.expandIcon,Ur.expandIcon=Ur.expandIcon||Oi||Ss(Io),$r==="nest"&&Ur.expandIconColumnIndex===void 0?Ur.expandIconColumnIndex=xn?1:0:Ur.expandIconColumnIndex>0&&xn&&(Ur.expandIconColumnIndex-=1),typeof Ur.indentSize!="number"&&(Ur.indentSize=typeof ur=="number"?ur:15);const cu=he.useCallback(ss=>Ms(Pl(Xs(Yr(ss)))),[Yr,Xs,Pl]);let hu,Yl;if(mn!==!1&&(Fo!=null&&Fo.total)){let ss;Fo.size?ss=Fo.size:ss=Nr==="small"||Nr==="middle"?"small":void 0;const js=rs=>he.createElement(no.Z,Object.assign({},Fo,{className:ct()(`${Vr}-pagination ${Vr}-pagination-${rs}`,Fo.className),size:ss})),va=or==="rtl"?"left":"right",{position:zs}=Fo;if(zs!==null&&Array.isArray(zs)){const rs=zs.find(Nu=>Nu.includes("top")),_a=zs.find(Nu=>Nu.includes("bottom")),_l=zs.every(Nu=>`${Nu}`=="none");!rs&&!_a&&!_l&&(Yl=js(va)),rs&&(hu=js(rs.toLowerCase().replace("top",""))),_a&&(Yl=js(_a.toLowerCase().replace("bottom","")))}else Yl=js(va)}let fs;typeof Ri=="boolean"?fs={spinning:Ri}:typeof Ri=="object"&&(fs=Object.assign({spinning:!0},Ri));const[Da,ia]=rc(Vr),[,Ns]=(0,ko.Z)(),Xl=ct()(`${Vr}-wrapper`,wo==null?void 0:wo.className,{[`${Vr}-wrapper-rtl`]:or==="rtl"},pt,Pt,ia),_c=Object.assign(Object.assign({},wo==null?void 0:wo.style),Lt),du=Ei&&Ei.emptyText||(Eo==null?void 0:Eo("Table"))||he.createElement(rr.Z,{componentName:"Table"}),Zu=Yi?Ia:Wr,sc={},Fl=he.useMemo(()=>{const{fontSize:ss,lineHeight:js,padding:va,paddingXS:zs,paddingSM:rs}=Ns,_a=Math.floor(ss*js);switch(Nr){case"large":return va*2+_a;case"small":return zs*2+_a;default:return rs*2+_a}},[Ns,Nr]);return Yi&&(sc.listItemHeight=Fl),Da(he.createElement("div",{ref:zt,className:Xl,style:_c},he.createElement(Lo.Z,Object.assign({spinning:!1},fs),hu,he.createElement(Zu,Object.assign({},sc,Ki,{columns:Pi,direction:or,expandable:Ur,prefixCls:Vr,className:ct()({[`${Vr}-middle`]:Nr==="middle",[`${Vr}-small`]:Nr==="small",[`${Vr}-bordered`]:cn,[`${Vr}-empty`]:Dr.length===0}),data:Pa,rowKey:co,rowClassName:Bl,emptyText:du,internalHooks:me,internalRefs:_r,transformColumns:cu})),Yl)))};var td=he.forwardRef(Id);const Dd=(Rt,zt)=>{const an=he.useRef(0);return an.current+=1,he.createElement(td,Object.assign({},Rt,{ref:zt,_renderTimes:an.current}))},Aa=he.forwardRef(Dd);Aa.SELECTION_COLUMN=na,Aa.EXPAND_COLUMN=Le,Aa.SELECTION_ALL=Ds,Aa.SELECTION_INVERT=Ps,Aa.SELECTION_NONE=ks,Aa.Column=Yo,Aa.ColumnGroup=yr,Aa.Summary=Ae;var oc=Aa,gf=oc},12563:function(bn,qt,Ee){"use strict";Ee.d(qt,{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=We=>{const{paddingXXS:gt,lineWidth:ct,tagPaddingHorizontal:Ct,componentCls:it}=We,yt=Ct-ct,ut=gt-ct;return{[it]:Object.assign(Object.assign({},(0,xe.Wf)(We)),{display:"inline-block",height:"auto",marginInlineEnd:We.marginXS,paddingInline:yt,fontSize:We.tagFontSize,lineHeight:We.tagLineHeight,whiteSpace:"nowrap",background:We.defaultBg,border:`${We.lineWidth}px ${We.lineType} ${We.colorBorder}`,borderRadius:We.borderRadiusSM,opacity:1,transition:`all ${We.motionDurationMid}`,textAlign:"start",position:"relative",[`&${it}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:We.defaultColor},[`${it}-close-icon`]:{marginInlineStart:ut,color:We.colorTextDescription,fontSize:We.tagIconSize,cursor:"pointer",transition:`all ${We.motionDurationMid}`,"&:hover":{color:We.colorTextHeading}},[`&${it}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${We.iconCls}-close, ${We.iconCls}-close:hover`]:{color:We.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${it}-checkable-checked):hover`]:{color:We.colorPrimary,backgroundColor:We.colorFillSecondary},"&:active, &-checked":{color:We.colorTextLightSolid},"&-checked":{backgroundColor:We.colorPrimary,"&:hover":{backgroundColor:We.colorPrimaryHover}},"&:active":{backgroundColor:We.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${We.iconCls} + span, > span + ${We.iconCls}`]:{marginInlineStart:yt}}),[`${it}-borderless`]:{borderColor:"transparent",background:We.tagBorderlessBg}}},de=We=>{const{lineWidth:gt,fontSizeIcon:ct}=We,Ct=We.fontSizeSM,it=`${We.lineHeightSM*Ct}px`;return(0,ge.TS)(We,{tagFontSize:Ct,tagLineHeight:it,tagIconSize:ct-2*gt,tagPaddingHorizontal:8,tagBorderlessBg:We.colorFillTertiary})},ue=We=>({defaultBg:We.colorFillQuaternary,defaultColor:We.colorText});var z=(0,ce.Z)("Tag",We=>{const gt=de(We);return ve(gt)},ue),ee=function(We,gt){var ct={};for(var Ct in We)Object.prototype.hasOwnProperty.call(We,Ct)&>.indexOf(Ct)<0&&(ct[Ct]=We[Ct]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var it=0,Ct=Object.getOwnPropertySymbols(We);it<Ct.length;it++)gt.indexOf(Ct[it])<0&&Object.prototype.propertyIsEnumerable.call(We,Ct[it])&&(ct[Ct[it]]=We[Ct[it]]);return ct},ie=We=>{const{prefixCls:gt,style:ct,className:Ct,checked:it,onChange:yt,onClick:ut}=We,Ft=ee(We,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:ht,tag:rt}=Le.useContext(Se.E_),dt=jt=>{yt==null||yt(!it),ut==null||ut(jt)},St=ht("tag",gt),[Et,vt]=z(St),Bt=Te()(St,`${St}-checkable`,{[`${St}-checkable-checked`]:it},rt==null?void 0:rt.className,Ct,vt);return Et(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=We=>(0,se.Z)(We,(gt,ct)=>{let{textColor:Ct,lightBorderColor:it,lightColor:yt,darkColor:ut}=ct;return{[`${We.componentCls}-${gt}`]:{color:Ct,background:yt,borderColor:it,"&-inverse":{color:We.colorTextLightSolid,background:ut,borderColor:ut},[`&${We.componentCls}-borderless`]:{borderColor:"transparent"}}}});var ye=(0,ce.b)(["Tag","preset"],We=>{const gt=de(We);return le(gt)},ue);function we(We){return typeof We!="string"?We:We.charAt(0).toUpperCase()+We.slice(1)}const Ce=(We,gt,ct)=>{const Ct=we(ct);return{[`${We.componentCls}-${gt}`]:{color:We[`color${ct}`],background:We[`color${Ct}Bg`],borderColor:We[`color${Ct}Border`],[`&${We.componentCls}-borderless`]:{borderColor:"transparent"}}}};var ke=(0,ce.b)(["Tag","status"],We=>{const gt=de(We);return[Ce(gt,"success","Success"),Ce(gt,"processing","Info"),Ce(gt,"error","Error"),Ce(gt,"warning","Warning")]},ue),Ne=function(We,gt){var ct={};for(var Ct in We)Object.prototype.hasOwnProperty.call(We,Ct)&>.indexOf(Ct)<0&&(ct[Ct]=We[Ct]);if(We!=null&&typeof Object.getOwnPropertySymbols=="function")for(var it=0,Ct=Object.getOwnPropertySymbols(We);it<Ct.length;it++)gt.indexOf(Ct[it])<0&&Object.prototype.propertyIsEnumerable.call(We,Ct[it])&&(ct[Ct[it]]=We[Ct[it]]);return ct};const je=(We,gt)=>{const{prefixCls:ct,className:Ct,rootClassName:it,style:yt,children:ut,icon:Ft,color:ht,onClose:rt,closeIcon:dt,closable:St,bordered:Et=!0}=We,vt=Ne(We,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:Bt,direction:jt,tag:ln}=Le.useContext(Se.E_),[$t,yn]=Le.useState(!0);Le.useEffect(()=>{"visible"in vt&&yn(vt.visible)},[vt.visible]);const Ut=(0,be.o2)(ht),Wt=(0,be.yT)(ht),Xt=Ut||Wt,mt=Object.assign(Object.assign({backgroundColor:ht&&!Xt?ht:void 0},ln==null?void 0:ln.style),yt),ze=Bt("tag",ct),[Be,et]=z(ze),qe=Te()(ze,ln==null?void 0:ln.className,{[`${ze}-${ht}`]:Xt,[`${ze}-has-color`]:ht&&!Xt,[`${ze}-hidden`]:!$t,[`${ze}-rtl`]:jt==="rtl",[`${ze}-borderless`]:!Et},Ct,it,et),Ue=Ze=>{Ze.stopPropagation(),rt==null||rt(Ze),!Ze.defaultPrevented&&yn(!1)},[,Xe]=(0,Pe.Z)(St,dt,Ze=>Ze===null?Le.createElement(me.Z,{className:`${ze}-close-icon`,onClick:Ue}):Le.createElement("span",{className:`${ze}-close-icon`,onClick:Ue},Ze),null,!1),Re=typeof vt.onClick=="function"||ut&&ut.type==="a",Ae=Ft||null,Ge=Ae?Le.createElement(Le.Fragment,null,Ae,ut&&Le.createElement("span",null,ut)):ut,Ke=Le.createElement("span",Object.assign({},vt,{ref:gt,className:qe,style:mt}),Ge,Xe,Ut&&Le.createElement(ye,{key:"preset",prefixCls:ze}),Wt&&Le.createElement(ke,{key:"status",prefixCls:ze}));return Be(Re?Le.createElement(he.Z,{component:"Tag"},Ke):Ke)},Ve=Le.forwardRef(je);Ve.CheckableTag=ie;var Qe=Ve},17574:function(bn,qt,Ee){"use strict";Ee.d(qt,{default:function(){return ht}});var Le=Ee(23130),me=Ee(26407),Ie=Ee(52671),Te=Ee(8657),be=Ee(92413),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,St){return Pe.createElement(xe.Z,(0,be.Z)({},dt,{ref:St,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:St,prefixCls:Et,indent:vt,direction:Bt="ltr"}=rt,jt=Bt==="ltr"?"left":"right",ln=Bt==="ltr"?"right":"left",$t={[jt]:-St*vt+ye,[ln]:0};switch(dt){case-1:$t.top=-3;break;case 1:$t.bottom=-3;break;default:$t.bottom=-3,$t[jt]=vt+ye;break}return Pe.createElement("div",{style:$t,className:`${Et}-drop-indicator`})}var Ce=Ee(71997),Ne=Pe.forwardRef((rt,dt)=>{const{getPrefixCls:St,direction:Et,virtual:vt,tree:Bt}=Pe.useContext(oe.E_),{prefixCls:jt,className:ln,showIcon:$t=!1,showLine:yn,switcherIcon:Ut,blockNode:Wt=!1,children:Xt,checkable:mt=!1,selectable:ze=!0,draggable:Be,motion:et,style:qe}=rt,Ue=St("tree",jt),Xe=St(),Re=et!=null?et:Object.assign(Object.assign({},(0,se.Z)(Xe)),{motionAppear:!1}),Ae=Object.assign(Object.assign({},rt),{checkable:mt,selectable:ze,showIcon:$t,motion:Re,blockNode:Wt,showLine:!!yn,dropIndicatorRender:we}),[Ge,Ke]=(0,le.ZP)(Ue),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]),at=xt=>Pe.createElement(Ce.Z,{prefixCls:Ue,switcherIcon:Ut,treeNodeProps:xt,showLine:yn});return Ge(Pe.createElement(Le.Z,Object.assign({itemHeight:20,ref:dt,virtual:vt},Ae,{style:Object.assign(Object.assign({},Bt==null?void 0:Bt.style),qe),prefixCls:Ue,className:ue()({[`${Ue}-icon-hide`]:!$t,[`${Ue}-block-node`]:Wt,[`${Ue}-unselectable`]:!ze,[`${Ue}-rtl`]:Et==="rtl"},Bt==null?void 0:Bt.className,ln,Ke),direction:Et,checkable:mt&&Pe.createElement("span",{className:`${Ue}-checkbox-inner`}),selectable:ze,switcherIcon:at,draggable:Ze}),Xt))}),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 St(Et){const{key:vt,children:Bt}=Et;dt(vt,Et)!==!1&&Ve(Bt||[],dt)}rt.forEach(St)}function Qe(rt){let{treeData:dt,expandedKeys:St,startKey:Et,endKey:vt}=rt;const Bt=[];let jt=je.None;if(Et&&Et===vt)return[Et];if(!Et||!vt)return[];function ln($t){return $t===Et||$t===vt}return Ve(dt,$t=>{if(jt===je.End)return!1;if(ln($t)){if(Bt.push($t),jt===je.None)jt=je.Start;else if(jt===je.Start)return jt=je.End,!1}else jt===je.Start&&Bt.push($t);return St.includes($t)}),Bt}function We(rt,dt){const St=(0,me.Z)(dt),Et=[];return Ve(rt,(vt,Bt)=>{const jt=St.indexOf(vt);return jt!==-1&&(Et.push(Bt),St.splice(jt,1)),!!St.length}),Et}var gt=function(rt,dt){var St={};for(var Et in rt)Object.prototype.hasOwnProperty.call(rt,Et)&&dt.indexOf(Et)<0&&(St[Et]=rt[Et]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var vt=0,Et=Object.getOwnPropertySymbols(rt);vt<Et.length;vt++)dt.indexOf(Et[vt])<0&&Object.prototype.propertyIsEnumerable.call(rt,Et[vt])&&(St[Et[vt]]=rt[Et[vt]]);return St};function ct(rt){const{isLeaf:dt,expanded:St}=rt;return dt?Pe.createElement(Ie.Z,null):St?Pe.createElement(Te.Z,null):Pe.createElement(ve,null)}function Ct(rt){let{treeData:dt,children:St}=rt;return dt||(0,ee.zn)(St)}const it=(rt,dt)=>{var{defaultExpandAll:St,defaultExpandParent:Et,defaultExpandedKeys:vt}=rt,Bt=gt(rt,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const jt=Pe.useRef(),ln=Pe.useRef(),$t=()=>{const{keyEntities:Ze}=(0,ee.I8)(Ct(Bt));let at;return St?at=Object.keys(Ze):Et?at=(0,z.r7)(Bt.expandedKeys||vt||[],Ze):at=Bt.expandedKeys||vt,at},[yn,Ut]=Pe.useState(Bt.selectedKeys||Bt.defaultSelectedKeys||[]),[Wt,Xt]=Pe.useState(()=>$t());Pe.useEffect(()=>{"selectedKeys"in Bt&&Ut(Bt.selectedKeys)},[Bt.selectedKeys]),Pe.useEffect(()=>{"expandedKeys"in Bt&&Xt(Bt.expandedKeys)},[Bt.expandedKeys]);const mt=(Ze,at)=>{var xt;return"expandedKeys"in Bt||Xt(Ze),(xt=Bt.onExpand)===null||xt===void 0?void 0:xt.call(Bt,Ze,at)},ze=(Ze,at)=>{var xt;const{multiple:tn}=Bt,{node:nn,nativeEvent:Jt}=at,{key:pn=""}=nn,Mn=Ct(Bt),hn=Object.assign(Object.assign({},at),{selected:!0}),En=(Jt==null?void 0:Jt.ctrlKey)||(Jt==null?void 0:Jt.metaKey),Wn=Jt==null?void 0:Jt.shiftKey;let Tn;tn&&En?(Tn=Ze,jt.current=pn,ln.current=Tn,hn.selectedNodes=We(Mn,Tn)):tn&&Wn?(Tn=Array.from(new Set([].concat((0,me.Z)(ln.current||[]),(0,me.Z)(Qe({treeData:Mn,expandedKeys:Wt,startKey:pn,endKey:jt.current}))))),hn.selectedNodes=We(Mn,Tn)):(Tn=[pn],jt.current=pn,ln.current=Tn,hn.selectedNodes=We(Mn,Tn)),(xt=Bt.onSelect)===null||xt===void 0||xt.call(Bt,Tn,hn),"selectedKeys"in Bt||Ut(Tn)},{getPrefixCls:Be,direction:et}=Pe.useContext(oe.E_),{prefixCls:qe,className:Ue,showIcon:Xe=!0,expandAction:Re="click"}=Bt,Ae=gt(Bt,["prefixCls","className","showIcon","expandAction"]),Ge=Be("tree",qe),Ke=ue()(`${Ge}-directory`,{[`${Ge}-directory-rtl`]:et==="rtl"},Ue);return Pe.createElement(Ne,Object.assign({icon:ct,ref:dt,blockNode:!0},Ae,{showIcon:Xe,expandAction:Re,prefixCls:Ge,className:Ke,expandedKeys:Wt,selectedKeys:yn,onSelect:ze,onExpand:mt}))};var ut=Pe.forwardRef(it);const Ft=Ne;Ft.DirectoryTree=ut,Ft.TreeNode=Le.O;var ht=Ft},20648:function(bn,qt,Ee){"use strict";Ee.d(qt,{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}};qt.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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return oe}});var Le=Ee(92413),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 We=typeof je=="function"?je(ye):je,gt=`${se}-switcher-line-custom-icon`;return(0,z.l$)(We)?(0,z.Tm)(We,{className:ue()(We.props.className||"",gt)}):We}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(bn,qt,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(bn,qt,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,We,gt=z.getRange(Qe,Ie(Qe.line,Qe.ch+1));if(ke&&!Ve.empty())We="surround";else if((we||!ke)&>==ee)we&&ue(z,Qe)?We="both":ye.indexOf(ee)>=0&&z.getRange(Qe,Ie(Qe.line,Qe.ch+3))==ee+ee+ee?We="skipThree":We="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;We="addFour"}else if(we){var ct=Qe.ch==0?" ":z.getRange(Ie(Qe.line,Qe.ch-1),Qe);if(!Le.isWordChar(gt)&&ct!=ee&&!Le.isWordChar(ct))We="both";else return Le.Pass}else if(ke&&(gt.length===0||/\s/.test(gt)||le.indexOf(gt)>-1))We="both";else return Le.Pass;if(!Ne)Ne=We;else if(Ne!=We)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 yt=0;yt<3;yt++)z.execCommand("goCharRight");else if(Ne=="surround"){for(var ut=z.getSelections(),yt=0;yt<ut.length;yt++)ut[yt]=Ct+ut[yt]+it;z.replaceSelections(ut,"around"),ut=z.listSelections().slice();for(var yt=0;yt<ut.length;yt++)ut[yt]=ce(ut[yt]);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(bn,qt,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(bn,qt,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(bn){(function(qt,Ee){bn.exports=Ee()})(this,function(){"use strict";var qt=navigator.userAgent,Ee=navigator.platform,Le=/gecko\/\d/i.test(qt),me=/MSIE \d/.test(qt),Ie=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(qt),Te=/Edge\/(\d+)/.exec(qt),be=me||Ie||Te,Pe=be&&(me?document.documentMode||6:+(Te||Ie)[1]),he=!Te&&/WebKit\//.test(qt),Se=he&&/Qt\/\d+\.\d+/.test(qt),xe=!Te&&/Chrome\//.test(qt),ge=/Opera\//.test(qt),ce=/Apple Computer/.test(navigator.vendor),ve=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(qt),de=/PhantomJS/.test(qt),ue=!Te&&/AppleWebKit/.test(qt)&&/Mobile\/\w+/.test(qt),z=/Android/.test(qt),ee=ue||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(qt),oe=ue||/Mac/.test(Ee),ie=/\bCrOS\b/.test(qt),se=/win/i.test(Ee),le=ge&&qt.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 He=De.slice(Oe.index+Oe[0].length);re.className=De.slice(0,Oe.index)+(He?Oe[1]+He:"")}};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 He=document.createElement(re);if(De&&(He.className=De),Oe&&(He.style.cssText=Oe),typeof pe=="string")He.appendChild(document.createTextNode(pe));else if(pe)for(var lt=0;lt<pe.length;++lt)He.appendChild(pe[lt]);return He}function Qe(re,pe,De,Oe){var He=Ve(re,pe,De,Oe);return He.setAttribute("role","presentation"),He}var We;document.createRange?We=function(re,pe,De,Oe){var He=document.createRange();return He.setEnd(Oe||re,De),He.setStart(re,pe),He}:We=function(re,pe,De){var Oe=document.body.createTextRange();try{Oe.moveToElementText(re.parentNode)}catch(He){return Oe}return Oe.collapse(!0),Oe.moveEnd("character",De),Oe.moveStart("character",pe),Oe};function gt(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 yt=function(re){re.select()};ue?yt=function(re){re.selectionStart=0,re.selectionEnd=re.value.length}:be&&(yt=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,He){pe==null&&(pe=re.search(/[^\s\u00a0]/),pe==-1&&(pe=re.length));for(var lt=Oe||0,bt=He||0;;){var Dt=re.indexOf(" ",lt);if(Dt<0||Dt>=pe)return bt+(pe-lt);bt+=Dt-lt,bt+=De-bt%De,lt=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 St=50,Et={toString:function(){return"CodeMirror.Pass"}},vt={scroll:!1},Bt={origin:"*mouse"},jt={origin:"+move"};function ln(re,pe,De){for(var Oe=0,He=0;;){var lt=re.indexOf(" ",Oe);lt==-1&&(lt=re.length);var bt=lt-Oe;if(lt==re.length||He+bt>=pe)return Oe+Math.min(bt,pe-He);if(He+=lt-Oe,He+=De-He%De,Oe=lt+1,He>=pe)return Oe}}var $t=[""];function yn(re){for(;$t.length<=re;)$t.push(Ut($t)+" ");return $t[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 Xt(re,pe,De){for(var Oe=0,He=De(pe);Oe<re.length&&De(re[Oe])<=He;)Oe++;re.splice(Oe,0,pe)}function mt(){}function ze(re,pe){var De;return Object.create?De=Object.create(re):(mt.prototype=re,De=new mt),pe&&Ft(pe,De),De}var Be=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function et(re){return/\w/.test(re)||re>"\x80"&&(re.toUpperCase()!=re.toLowerCase()||Be.test(re))}function qe(re,pe){return pe?pe.source.indexOf("\\w")>-1&&et(re)?!0:pe.test(re):et(re)}function Ue(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 Ge(re,pe,De){for(var Oe=pe>De?-1:1;;){if(pe==De)return pe;var He=(pe+De)/2,lt=Oe<0?Math.ceil(He):Math.floor(He);if(lt==pe)return re(lt)?pe:De;re(lt)?De=lt:pe=lt+Oe}}function Ke(re,pe,De,Oe){if(!re)return Oe(pe,De,"ltr",0);for(var He=!1,lt=0;lt<re.length;++lt){var bt=re[lt];(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",lt),He=!0)}He||Oe(pe,De,"ltr")}var Ze=null;function at(re,pe,De){var Oe;Ze=null;for(var He=0;He<re.length;++He){var lt=re[He];if(lt.from<pe&<.to>pe)return He;lt.to==pe&&(lt.from!=lt.to&&De=="before"?Oe=He:Ze=He),lt.from==pe&&(lt.from!=lt.to&&De!="before"?Oe=He:Ze=He)}return Oe!=null?Oe:Ze}var xt=function(){var re="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",pe="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function De(Yt){return Yt<=247?re.charAt(Yt):1424<=Yt&&Yt<=1524?"R":1536<=Yt&&Yt<=1785?pe.charAt(Yt-1536):1774<=Yt&&Yt<=2220?"r":8192<=Yt&&Yt<=8203?"w":Yt==8204?"b":"L"}var Oe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,He=/[stwN]/,lt=/[LRr]/,bt=/[Lb1n]/,Dt=/[1n]/;function Ot(Yt,Cn,en){this.level=Yt,this.from=Cn,this.to=en}return function(Yt,Cn){var en=Cn=="ltr"?"L":"R";if(Yt.length==0||Cn=="ltr"&&!Oe.test(Yt))return!1;for(var Hn=Yt.length,Fn=[],vi=0;vi<Hn;++vi)Fn.push(De(Yt.charCodeAt(vi)));for(var _i=0,zi=en;_i<Hn;++_i){var ar=Fn[_i];ar=="m"?Fn[_i]=zi:zi=ar}for(var Br=0,br=en;Br<Hn;++Br){var Gr=Fn[Br];Gr=="1"&&br=="r"?Fn[Br]="n":lt.test(Gr)&&(br=Gr,Gr=="r"&&(Fn[Br]="R"))}for(var Co=1,xr=Fn[0];Co<Hn-1;++Co){var jo=Fn[Co];jo=="+"&&xr=="1"&&Fn[Co+1]=="1"?Fn[Co]="1":jo==","&&xr==Fn[Co+1]&&(xr=="1"||xr=="n")&&(Fn[Co]=xr),xr=jo}for(var aa=0;aa<Hn;++aa){var $a=Fn[aa];if($a==",")Fn[aa]="N";else if($a=="%"){var pa=void 0;for(pa=aa+1;pa<Hn&&Fn[pa]=="%";++pa);for(var eu=aa&&Fn[aa-1]=="!"||pa<Hn&&Fn[pa]=="1"?"1":"N",Ll=aa;Ll<pa;++Ll)Fn[Ll]=eu;aa=pa-1}}for(var Fa=0,gu=en;Fa<Hn;++Fa){var pl=Fn[Fa];gu=="L"&&pl=="1"?Fn[Fa]="L":lt.test(pl)&&(gu=pl)}for(var ja=0;ja<Hn;++ja)if(He.test(Fn[ja])){var bs=void 0;for(bs=ja+1;bs<Hn&&He.test(Fn[bs]);++bs);for(var Sa=(ja?Fn[ja-1]:en)=="L",tl=(bs<Hn?Fn[bs]:en)=="L",gl=Sa==tl?Sa?"L":"R":en,lc=ja;lc<bs;++lc)Fn[lc]=gl;ja=bs-1}for(var ga=[],Vu,Ea=0;Ea<Hn;)if(bt.test(Fn[Ea])){var Ef=Ea;for(++Ea;Ea<Hn&&bt.test(Fn[Ea]);++Ea);ga.push(new Ot(0,Ef,Ea))}else{var Iu=Ea,mu=ga.length,tu=Cn=="rtl"?1:0;for(++Ea;Ea<Hn&&Fn[Ea]!="L";++Ea);for(var Qs=Iu;Qs<Ea;)if(Dt.test(Fn[Qs])){Iu<Qs&&(ga.splice(mu,0,new Ot(1,Iu,Qs)),mu+=tu);var nl=Qs;for(++Qs;Qs<Ea&&Dt.test(Fn[Qs]);++Qs);ga.splice(mu,0,new Ot(2,nl,Qs)),mu+=tu,Iu=Qs}else++Qs;Iu<Ea&&ga.splice(mu,0,new Ot(1,Iu,Ea))}return Cn=="ltr"&&(ga[0].level==1&&(Vu=Yt.match(/^\s+/))&&(ga[0].from=Vu[0].length,ga.unshift(new Ot(0,0,Vu[0].length))),Ut(ga).level==1&&(Vu=Yt.match(/\s+$/))&&(Ut(ga).to-=Vu[0].length,ga.push(new Ot(0,Hn-Vu[0].length,Hn)))),Cn=="rtl"?ga.reverse():ga}}();function tn(re,pe){var De=re.order;return De==null&&(De=re.order=xt(re.text,pe)),De}var nn=[],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]||nn).concat(De)}};function pn(re,pe){return re._handlers&&re._handlers[pe]||nn}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,He=Oe&&Oe[pe];if(He){var lt=dt(He,De);lt>-1&&(Oe[pe]=He.slice(0,lt).concat(He.slice(lt+1)))}}}function hn(re,pe){var De=pn(re,pe);if(De.length)for(var Oe=Array.prototype.slice.call(arguments,2),He=0;He<De.length;++He)De[He].apply(null,Oe)}function En(re,pe,De){return typeof pe=="string"&&(pe={type:pe,preventDefault:function(){this.defaultPrevented=!0}}),hn(re,De||pe.type,re,pe),bi(pe)||pe.codemirrorIgnore}function Wn(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 Tn(re,pe){return pn(re,pe).length>0}function ci(re){re.prototype.on=function(pe,De){Jt(this,pe,De)},re.prototype.off=function(pe,De){Mn(this,pe,De)}}function ri(re){re.preventDefault?re.preventDefault():re.returnValue=!1}function Ii(re){re.stopPropagation?re.stopPropagation():re.cancelBubble=!0}function bi(re){return re.defaultPrevented!=null?re.defaultPrevented:re.returnValue==!1}function nr(re){ri(re),Ii(re)}function Ji(re){return re.target||re.srcElement}function gr(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 cr=function(){if(be&&Pe<9)return!1;var re=Ve("div");return"draggable"in re||"dragDrop"in re}(),eo;function ro(re){if(eo==null){var pe=Ve("span","\u200B");je(re,Ve("span",[pe,document.createTextNode("x")])),re.firstChild.offsetHeight!=0&&(eo=pe.offsetWidth<=1&&pe.offsetHeight>2&&!(be&&Pe<8))}var De=eo?Ve("span","\u200B"):Ve("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return De.setAttribute("cm-text",""),De}var hi;function Pr(re){if(hi!=null)return hi;var pe=je(re,document.createTextNode("A\u062EA")),De=We(pe,0,1).getBoundingClientRect(),Oe=We(pe,1,2).getBoundingClientRect();return Ne(re),!De||De.left==De.right?!1:hi=Oe.right-De.right<3}var Hi=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(re){for(var pe=0,De=[],Oe=re.length;pe<=Oe;){var He=re.indexOf(`
|
|
|
`,pe);He==-1&&(He=re.length);var lt=re.slice(pe,re.charAt(He-1)=="\r"?He-1:He),bt=lt.indexOf("\r");bt!=-1?(De.push(lt.slice(0,bt)),pe+=bt+1):(De.push(lt),pe=He+1)}return De}:function(re){return re.split(/\r\n?|\n/)},st=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")}(),Er=null;function yo(re){if(Er!=null)return Er;var pe=je(re,Ve("span","x")),De=pe.getBoundingClientRect(),Oe=We(pe,0,1).getBoundingClientRect();return Er=Math.abs(De.left-Oe.left)>1}var Zr={},ao={};function Jr(re,pe){arguments.length>2&&(pe.dependencies=Array.prototype.slice.call(arguments,2)),Zr[re]=pe}function lo(re,pe){ao[re]=pe}function oi(re){if(typeof re=="string"&&ao.hasOwnProperty(re))re=ao[re];else if(re&&typeof re.name=="string"&&ao.hasOwnProperty(re.name)){var pe=ao[re.name];typeof pe=="string"&&(pe={name:pe}),re=ze(pe,re),re.name=pe.name}else{if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(re))return oi("application/xml");if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(re))return oi("application/json")}return typeof re=="string"?{name:re}:re||{name:"null"}}function $e(re,pe){pe=oi(pe);var De=Zr[pe.name];if(!De)return $e(re,"text/plain");var Oe=De(re,pe);if(nt.hasOwnProperty(pe.name)){var He=nt[pe.name];for(var lt in He)He.hasOwnProperty(lt)&&(Oe.hasOwnProperty(lt)&&(Oe["_"+lt]=Oe[lt]),Oe[lt]=He[lt])}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 He=pe[Oe];He instanceof Array&&(He=He.concat([])),De[Oe]=He}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 _t=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};_t.prototype.eol=function(){return this.pos>=this.string.length},_t.prototype.sol=function(){return this.pos==this.lineStart},_t.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},_t.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},_t.prototype.eat=function(re){var pe=this.string.charAt(this.pos),De;if(typeof re=="string"?De=pe==re:De=pe&&(re.test?re.test(pe):re(pe)),De)return++this.pos,pe},_t.prototype.eatWhile=function(re){for(var pe=this.pos;this.eat(re););return this.pos>pe},_t.prototype.eatSpace=function(){for(var re=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>re},_t.prototype.skipToEnd=function(){this.pos=this.string.length},_t.prototype.skipTo=function(re){var pe=this.string.indexOf(re,this.pos);if(pe>-1)return this.pos=pe,!0},_t.prototype.backUp=function(re){this.pos-=re},_t.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=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)},_t.prototype.indentation=function(){return ht(this.string,null,this.tabSize)-(this.lineStart?ht(this.string,this.lineStart,this.tabSize):0)},_t.prototype.match=function(re,pe,De){if(typeof re=="string"){var Oe=function(bt){return De?bt.toLowerCase():bt},He=this.string.substr(this.pos,re.length);if(Oe(He)==Oe(re))return pe!==!1&&(this.pos+=re.length),!0}else{var lt=this.string.slice(this.pos).match(re);return lt&<.index>0?null:(lt&&pe!==!1&&(this.pos+=lt[0].length),lt)}},_t.prototype.current=function(){return this.string.slice(this.start,this.pos)},_t.prototype.hideFirstChars=function(re,pe){this.lineStart+=re;try{return pe()}finally{this.lineStart-=re}},_t.prototype.lookAhead=function(re){var pe=this.lineOracle;return pe&&pe.lookAhead(re)},_t.prototype.baseToken=function(){var re=this.lineOracle;return re&&re.baseToken(this.pos)};function un(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 He=De.children[Oe],lt=He.chunkSize();if(pe<lt){De=He;break}pe-=lt}return De.lines[pe]}function wn(re,pe,De){var Oe=[],He=pe.line;return re.iter(pe.line,De.line+1,function(lt){var bt=lt.text;He==De.line&&(bt=bt.slice(0,De.ch)),He==pe.line&&(bt=bt.slice(pe.ch)),Oe.push(bt),++He}),Oe}function Bn(re,pe,De){var Oe=[];return re.iter(pe,De,function(He){Oe.push(He.text)}),Oe}function zn(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 He=0;Oe.children[He]!=pe;++He)De+=Oe.children[He].chunkSize();return De+pe.first}function Kt(re,pe){var De=re.first;e:do{for(var Oe=0;Oe<re.children.length;++Oe){var He=re.children[Oe],lt=He.height;if(pe<lt){re=He;continue e}pe-=lt,De+=He.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 Sn(re,pe){return pe>=re.first&&pe<re.first+re.size}function kn(re,pe){return String(re.lineNumberFormatter(pe+re.firstLineNumber))}function Zt(re,pe,De){if(De===void 0&&(De=null),!(this instanceof Zt))return new Zt(re,pe,De);this.line=re,this.ch=pe,this.sticky=De}function rn(re,pe){return re.line-pe.line||re.ch-pe.ch}function Rn(re,pe){return re.sticky==pe.sticky&&rn(re,pe)==0}function An(re){return Zt(re.line,re.ch)}function Qn(re,pe){return rn(re,pe)<0?pe:re}function Un(re,pe){return rn(re,pe)<0?re:pe}function qn(re,pe){return Math.max(re.first,Math.min(pe,re.first+re.size-1))}function Nn(re,pe){if(pe.line<re.first)return Zt(re.first,0);var De=re.first+re.size-1;return pe.line>De?Zt(De,un(re,De).text.length):si(pe,un(re,pe.line).text.length)}function si(re,pe){var De=re.ch;return De==null||De>pe?Zt(re.line,pe):De<0?Zt(re.line,0):re}function Li(re,pe){for(var De=[],Oe=0;Oe<pe.length;Oe++)De[Oe]=Nn(re,pe[Oe]);return De}var Bi=function(re,pe){this.state=re,this.lookAhead=pe},Ln=function(re,pe,De,Oe){this.state=pe,this.doc=re,this.line=De,this.maxLookAhead=Oe||0,this.baseTokens=null,this.baseTokenPos=1};Ln.prototype.lookAhead=function(re){var pe=this.doc.getLine(this.line+re);return pe!=null&&re>this.maxLookAhead&&(this.maxLookAhead=re),pe},Ln.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}},Ln.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ln.fromSaved=function(re,pe,De){return pe instanceof Bi?new Ln(re,wt(re.mode,pe.state),De,pe.lookAhead):new Ln(re,wt(re.mode,pe),De)},Ln.prototype.save=function(re){var pe=re!==!1?wt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Bi(pe,this.maxLookAhead):pe};function Ui(re,pe,De,Oe){var He=[re.state.modeGen],lt={};ir(re,pe.text,re.doc.mode,De,function(Yt,Cn){return He.push(Yt,Cn)},lt,Oe);for(var bt=De.state,Dt=function(Yt){De.baseTokens=He;var Cn=re.state.overlays[Yt],en=1,Hn=0;De.state=!0,ir(re,pe.text,Cn.mode,De,function(Fn,vi){for(var _i=en;Hn<Fn;){var zi=He[en];zi>Fn&&He.splice(en,1,Fn,He[en+1],zi),en+=2,Hn=Math.min(Fn,zi)}if(vi)if(Cn.opaque)He.splice(_i,en-_i,Fn,"overlay "+vi),en=_i+2;else for(;_i<en;_i+=2){var ar=He[_i+1];He[_i+1]=(ar?ar+" ":"")+"overlay "+vi}},lt),De.state=bt,De.baseTokens=null,De.baseTokenPos=1},Ot=0;Ot<re.state.overlays.length;++Ot)Dt(Ot);return{styles:He,classes:lt.bgClass||lt.textClass?lt:null}}function lr(re,pe,De){if(!pe.styles||pe.styles[0]!=re.state.modeGen){var Oe=Di(re,At(pe)),He=pe.text.length>re.options.maxHighlightLength&&wt(re.doc.mode,Oe.state),lt=Ui(re,pe,Oe);He&&(Oe.state=He),pe.stateAfter=Oe.save(!He),pe.styles=lt.styles,lt.classes?pe.styleClasses=lt.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 Di(re,pe,De){var Oe=re.doc,He=re.display;if(!Oe.mode.startState)return new Ln(Oe,!0,pe);var lt=Fi(re,pe,De),bt=lt>Oe.first&&un(Oe,lt-1).stateAfter,Dt=bt?Ln.fromSaved(Oe,bt,lt):new Ln(Oe,kt(Oe.mode),lt);return Oe.iter(lt,pe,function(Ot){Pn(re,Ot.text,Dt);var Yt=Dt.line;Ot.stateAfter=Yt==pe-1||Yt%5==0||Yt>=He.viewFrom&&Yt<He.viewTo?Dt.save():null,Dt.nextLine()}),De&&(Oe.modeFrontier=Dt.line),Dt}function Pn(re,pe,De,Oe){var He=re.doc.mode,lt=new _t(pe,re.options.tabSize,De);for(lt.start=lt.pos=Oe||0,pe==""&&Yn(He,De.state);!lt.eol();)ui(He,lt,De.state),lt.start=lt.pos}function Yn(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 He=0;He<10;He++){Oe&&(Oe[0]=Nt(re,De).mode);var lt=re.token(pe,De);if(pe.pos>pe.start)return lt}throw new Error("Mode "+re.name+" failed to advance stream.")}var Ti=function(re,pe,De){this.start=re.start,this.end=re.pos,this.string=re.current(),this.type=pe||null,this.state=De};function pi(re,pe,De,Oe){var He=re.doc,lt=He.mode,bt;pe=Nn(He,pe);var Dt=un(He,pe.line),Ot=Di(re,pe.line,De),Yt=new _t(Dt.text,re.options.tabSize,Ot),Cn;for(Oe&&(Cn=[]);(Oe||Yt.pos<pe.ch)&&!Yt.eol();)Yt.start=Yt.pos,bt=ui(lt,Yt,Ot.state),Oe&&Cn.push(new Ti(Yt,bt,wt(He.mode,Ot.state)));return Oe?Cn:new Ti(Yt,bt,Ot.state)}function Mi(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 ir(re,pe,De,Oe,He,lt,bt){var Dt=De.flattenSpans;Dt==null&&(Dt=re.options.flattenSpans);var Ot=0,Yt=null,Cn=new _t(pe,re.options.tabSize,Oe),en,Hn=re.options.addModeClass&&[null];for(pe==""&&Mi(Yn(De,Oe.state),lt);!Cn.eol();){if(Cn.pos>re.options.maxHighlightLength?(Dt=!1,bt&&Pn(re,pe,Oe,Cn.pos),Cn.pos=pe.length,en=null):en=Mi(ui(De,Cn,Oe.state,Hn),lt),Hn){var Fn=Hn[0].name;Fn&&(en="m-"+(en?Fn+" "+en:Fn))}if(!Dt||Yt!=en){for(;Ot<Cn.start;)Ot=Math.min(Cn.start,Ot+5e3),He(Ot,Yt);Yt=en}Cn.start=Cn.pos}for(;Ot<Cn.pos;){var vi=Math.min(Cn.pos,Ot+5e3);He(vi,Yt),Ot=vi}}function Fi(re,pe,De){for(var Oe,He,lt=re.doc,bt=De?-1:pe-(re.doc.mode.innerMode?1e3:100),Dt=pe;Dt>bt;--Dt){if(Dt<=lt.first)return lt.first;var Ot=un(lt,Dt-1),Yt=Ot.stateAfter;if(Yt&&(!De||Dt+(Yt instanceof Bi?Yt.lookAhead:0)<=lt.modeFrontier))return Dt;var Cn=ht(Ot.text,null,re.options.tabSize);(He==null||Oe>Cn)&&(He=Dt-1,Oe=Cn)}return He}function Wi(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 He=un(re,Oe).stateAfter;if(He&&(!(He instanceof Bi)||Oe+He.lookAhead<pe)){De=Oe+1;break}}re.highlightFrontier=Math.min(re.highlightFrontier,De)}}var hr=!1,In=!1;function zr(){hr=!0}function On(){In=!0}function wr(re,pe,De){this.marker=re,this.from=pe,this.to=De}function po(re,pe){if(re)for(var De=0;De<re.length;++De){var Oe=re[De];if(Oe.marker==pe)return Oe}}function Ar(re,pe){for(var De,Oe=0;Oe<re.length;++Oe)re[Oe]!=pe&&(De||(De=[])).push(re[Oe]);return De}function To(re,pe){re.markedSpans=re.markedSpans?re.markedSpans.concat([pe]):[pe],pe.marker.attachLine(re)}function oo(re,pe,De){var Oe;if(re)for(var He=0;He<re.length;++He){var lt=re[He],bt=lt.marker,Dt=lt.from==null||(bt.inclusiveLeft?lt.from<=pe:lt.from<pe);if(Dt||lt.from==pe&&bt.type=="bookmark"&&(!De||!lt.marker.insertLeft)){var Ot=lt.to==null||(bt.inclusiveRight?lt.to>=pe:lt.to>pe);(Oe||(Oe=[])).push(new wr(bt,lt.from,Ot?null:lt.to))}}return Oe}function $i(re,pe,De){var Oe;if(re)for(var He=0;He<re.length;++He){var lt=re[He],bt=lt.marker,Dt=lt.to==null||(bt.inclusiveRight?lt.to>=pe:lt.to>pe);if(Dt||lt.from==pe&&bt.type=="bookmark"&&(!De||lt.marker.insertLeft)){var Ot=lt.from==null||(bt.inclusiveLeft?lt.from<=pe:lt.from<pe);(Oe||(Oe=[])).push(new wr(bt,Ot?null:lt.from-pe,lt.to==null?null:lt.to-pe))}}return Oe}function Qi(re,pe){if(pe.full)return null;var De=Sn(re,pe.from.line)&&un(re,pe.from.line).markedSpans,Oe=Sn(re,pe.to.line)&&un(re,pe.to.line).markedSpans;if(!De&&!Oe)return null;var He=pe.from.ch,lt=pe.to.ch,bt=rn(pe.from,pe.to)==0,Dt=oo(De,He,bt),Ot=$i(Oe,lt,bt),Yt=pe.text.length==1,Cn=Ut(pe.text).length+(Yt?He:0);if(Dt)for(var en=0;en<Dt.length;++en){var Hn=Dt[en];if(Hn.to==null){var Fn=po(Ot,Hn.marker);Fn?Yt&&(Hn.to=Fn.to==null?null:Fn.to+Cn):Hn.to=He}}if(Ot)for(var vi=0;vi<Ot.length;++vi){var _i=Ot[vi];if(_i.to!=null&&(_i.to+=Cn),_i.from==null){var zi=po(Dt,_i.marker);zi||(_i.from=Cn,Yt&&(Dt||(Dt=[])).push(_i))}else _i.from+=Cn,Yt&&(Dt||(Dt=[])).push(_i)}Dt&&(Dt=fr(Dt)),Ot&&Ot!=Dt&&(Ot=fr(Ot));var ar=[Dt];if(!Yt){var Br=pe.text.length-2,br;if(Br>0&&Dt)for(var Gr=0;Gr<Dt.length;++Gr)Dt[Gr].to==null&&(br||(br=[])).push(new wr(Dt[Gr].marker,null,null));for(var Co=0;Co<Br;++Co)ar.push(br);ar.push(Ot)}return ar}function fr(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 Mr(re,pe,De){var Oe=null;if(re.iter(pe.line,De.line+1,function(Fn){if(Fn.markedSpans)for(var vi=0;vi<Fn.markedSpans.length;++vi){var _i=Fn.markedSpans[vi].marker;_i.readOnly&&(!Oe||dt(Oe,_i)==-1)&&(Oe||(Oe=[])).push(_i)}}),!Oe)return null;for(var He=[{from:pe,to:De}],lt=0;lt<Oe.length;++lt)for(var bt=Oe[lt],Dt=bt.find(0),Ot=0;Ot<He.length;++Ot){var Yt=He[Ot];if(!(rn(Yt.to,Dt.from)<0||rn(Yt.from,Dt.to)>0)){var Cn=[Ot,1],en=rn(Yt.from,Dt.from),Hn=rn(Yt.to,Dt.to);(en<0||!bt.inclusiveLeft&&!en)&&Cn.push({from:Yt.from,to:Dt.from}),(Hn>0||!bt.inclusiveRight&&!Hn)&&Cn.push({from:Dt.to,to:Yt.to}),He.splice.apply(He,Cn),Ot+=Cn.length-3}}return He}function fi(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 Ir(re){return re.inclusiveLeft?-1:0}function ho(re){return re.inclusiveRight?1:0}function Zo(re,pe){var De=re.lines.length-pe.lines.length;if(De!=0)return De;var Oe=re.find(),He=pe.find(),lt=rn(Oe.from,He.from)||Ir(re)-Ir(pe);if(lt)return-lt;var bt=rn(Oe.to,He.to)||ho(re)-ho(pe);return bt||pe.id-re.id}function Po(re,pe){var De=In&&re.markedSpans,Oe;if(De)for(var He=void 0,lt=0;lt<De.length;++lt)He=De[lt],He.marker.collapsed&&(pe?He.from:He.to)==null&&(!Oe||Zo(Oe,He.marker)<0)&&(Oe=He.marker);return Oe}function $o(re){return Po(re,!0)}function Yo(re){return Po(re,!1)}function Sr(re,pe){var De=In&&re.markedSpans,Oe;if(De)for(var He=0;He<De.length;++He){var lt=De[He];lt.marker.collapsed&&(lt.from==null||lt.from<pe)&&(lt.to==null||lt.to>pe)&&(!Oe||Zo(Oe,lt.marker)<0)&&(Oe=lt.marker)}return Oe}function yr(re,pe,De,Oe,He){var lt=un(re,pe),bt=In&<.markedSpans;if(bt)for(var Dt=0;Dt<bt.length;++Dt){var Ot=bt[Dt];if(Ot.marker.collapsed){var Yt=Ot.marker.find(0),Cn=rn(Yt.from,De)||Ir(Ot.marker)-Ir(He),en=rn(Yt.to,Oe)||ho(Ot.marker)-ho(He);if(!(Cn>=0&&en<=0||Cn<=0&&en>=0)&&(Cn<=0&&(Ot.marker.inclusiveRight&&He.inclusiveLeft?rn(Yt.to,De)>=0:rn(Yt.to,De)>0)||Cn>=0&&(Ot.marker.inclusiveRight&&He.inclusiveLeft?rn(Yt.from,Oe)<=0:rn(Yt.from,Oe)<0)))return!0}}}function qi(re){for(var pe;pe=$o(re);)re=pe.find(-1,!0).line;return re}function Qr(re){for(var pe;pe=Yo(re);)re=pe.find(1,!0).line;return re}function _o(re){for(var pe,De;pe=Yo(re);)re=pe.find(1,!0).line,(De||(De=[])).push(re);return De}function rr(re,pe){var De=un(re,pe),Oe=qi(De);return De==Oe?pe:At(Oe)}function ji(re,pe){if(pe>re.lastLine())return pe;var De=un(re,pe),Oe;if(!Xn(re,De))return pe;for(;Oe=Yo(De);)De=Oe.find(1,!0).line;return At(De)+1}function Xn(re,pe){var De=In&&pe.markedSpans;if(De){for(var Oe=void 0,He=0;He<De.length;++He)if(Oe=De[He],!!Oe.marker.collapsed){if(Oe.from==null)return!0;if(!Oe.marker.widgetNode&&Oe.from==0&&Oe.marker.inclusiveLeft&&er(re,pe,Oe))return!0}}}function er(re,pe,De){if(De.to==null){var Oe=De.marker.find(1,!0);return er(re,Oe.line,po(Oe.line.markedSpans,De.marker))}if(De.marker.inclusiveRight&&De.to==pe.text.length)return!0;for(var He=void 0,lt=0;lt<pe.markedSpans.length;++lt)if(He=pe.markedSpans[lt],He.marker.collapsed&&!He.marker.widgetNode&&He.from==De.to&&(He.to==null||He.to!=De.from)&&(He.marker.inclusiveLeft||De.marker.inclusiveRight)&&er(re,pe,He))return!0}function no(re){re=qi(re);for(var pe=0,De=re.parent,Oe=0;Oe<De.lines.length;++Oe){var He=De.lines[Oe];if(He==re)break;pe+=He.height}for(var lt=De.parent;lt;De=lt,lt=De.parent)for(var bt=0;bt<lt.children.length;++bt){var Dt=lt.children[bt];if(Dt==De)break;pe+=Dt.height}return pe}function Lo(re){if(re.height==0)return 0;for(var pe=re.text.length,De,Oe=re;De=$o(Oe);){var He=De.find(0,!0);Oe=He.from.line,pe+=He.from.ch-He.to.ch}for(Oe=re;De=Yo(Oe);){var lt=De.find(0,!0);pe-=Oe.text.length-lt.from.ch,Oe=lt.to.line,pe+=Oe.text.length-lt.to.ch}return pe}function ko(re){var pe=re.display,De=re.doc;pe.maxLine=un(De,De.first),pe.maxLineLength=Lo(pe.maxLine),pe.maxLineChanged=!0,De.iter(function(Oe){var He=Lo(Oe);He>pe.maxLineLength&&(pe.maxLineLength=He,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)},ci(Xo);function Ss(re,pe,De,Oe){re.text=pe,re.stateAfter&&(re.stateAfter=null),re.styles&&(re.styles=null),re.order!=null&&(re.order=null),fi(re),Tt(re,De);var He=Oe?Oe(re):1;He!=re.height&&zn(re,He)}function os(re){re.parent=null,fi(re)}var Is={},ps={};function sa(re,pe){if(!re||/^\s*$/.test(re))return null;var De=pe.addModeClass?ps:Is;return De[re]||(De[re]=re.replace(/\S+/g,"cm-$&"))}function _n(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 He=0;He<=(pe.rest?pe.rest.length:0);He++){var lt=He?pe.rest[He-1]:pe.line,bt=void 0;Oe.pos=0,Oe.addToken=Pu,Pr(re.display.measure)&&(bt=tn(lt,re.doc.direction))&&(Oe.addToken=ma(Oe.addToken,bt)),Oe.map=[];var Dt=pe!=re.display.externalMeasured&&At(lt);su(lt,Oe,lr(re,lt,Dt)),lt.styleClasses&&(lt.styleClasses.bgClass&&(Oe.bgClass=it(lt.styleClasses.bgClass,Oe.bgClass||"")),lt.styleClasses.textClass&&(Oe.textClass=it(lt.styleClasses.textClass,Oe.textClass||""))),Oe.map.length==0&&Oe.map.push(0,0,Oe.content.appendChild(ro(re.display.measure))),He==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 hn(re,"renderLine",re,pe.line,Oe.pre),Oe.pre.className&&(Oe.textClass=it(Oe.pre.className,Oe.textClass||"")),Oe}function Cs(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,He,lt,bt){if(pe){var Dt=re.splitSpaces?Na(pe,re.trailingSpace):pe,Ot=re.cm.state.specialChars,Yt=!1,Cn;if(!Ot.test(pe))re.col+=pe.length,Cn=document.createTextNode(Dt),re.map.push(re.pos,re.pos+pe.length,Cn),be&&Pe<9&&(Yt=!0),re.pos+=pe.length;else{Cn=document.createDocumentFragment();for(var en=0;;){Ot.lastIndex=en;var Hn=Ot.exec(pe),Fn=Hn?Hn.index-en:pe.length-en;if(Fn){var vi=document.createTextNode(Dt.slice(en,en+Fn));be&&Pe<9?Cn.appendChild(Ve("span",[vi])):Cn.appendChild(vi),re.map.push(re.pos,re.pos+Fn,vi),re.col+=Fn,re.pos+=Fn}if(!Hn)break;en+=Fn+1;var _i=void 0;if(Hn[0]==" "){var zi=re.cm.options.tabSize,ar=zi-re.col%zi;_i=Cn.appendChild(Ve("span",yn(ar),"cm-tab")),_i.setAttribute("role","presentation"),_i.setAttribute("cm-text"," "),re.col+=ar}else Hn[0]=="\r"||Hn[0]==`
|
|
|
`?(_i=Cn.appendChild(Ve("span",Hn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),_i.setAttribute("cm-text",Hn[0]),re.col+=1):(_i=re.cm.options.specialCharPlaceholder(Hn[0]),_i.setAttribute("cm-text",Hn[0]),be&&Pe<9?Cn.appendChild(Ve("span",[_i])):Cn.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||He||Yt||lt||bt){var Br=De||"";Oe&&(Br+=Oe),He&&(Br+=He);var br=Ve("span",[Cn],Br,lt);if(bt)for(var Gr in bt)bt.hasOwnProperty(Gr)&&Gr!="style"&&Gr!="class"&&br.setAttribute(Gr,bt[Gr]);return re.content.appendChild(br)}re.content.appendChild(Cn)}}function Na(re,pe){if(re.length>1&&!/ /.test(re))return re;for(var De=pe,Oe="",He=0;He<re.length;He++){var lt=re.charAt(He);lt==" "&&De&&(He==re.length-1||re.charCodeAt(He+1)==32)&&(lt="\xA0"),Oe+=lt,De=lt==" "}return Oe}function ma(re,pe){return function(De,Oe,He,lt,bt,Dt,Ot){He=He?He+" cm-force-border":"cm-force-border";for(var Yt=De.pos,Cn=Yt+Oe.length;;){for(var en=void 0,Hn=0;Hn<pe.length&&(en=pe[Hn],!(en.to>Yt&&en.from<=Yt));Hn++);if(en.to>=Cn)return re(De,Oe,He,lt,bt,Dt,Ot);re(De,Oe.slice(0,en.to-Yt),He,lt,null,Dt,Ot),lt=null,Oe=Oe.slice(en.to-Yt),Yt=en.to}}}function gs(re,pe,De,Oe){var He=!Oe&&De.widgetNode;He&&re.map.push(re.pos,re.pos+pe,He),!Oe&&re.cm.display.input.needsContentAttribute&&(He||(He=re.content.appendChild(document.createElement("span"))),He.setAttribute("cm-marker",De.id)),He&&(re.cm.display.input.setUneditable(He),re.content.appendChild(He)),re.pos+=pe,re.trailingSpace=!1}function su(re,pe,De){var Oe=re.markedSpans,He=re.text,lt=0;if(!Oe){for(var bt=1;bt<De.length;bt+=2)pe.addToken(pe,He.slice(lt,lt=De[bt]),sa(De[bt+1],pe.cm.options));return}for(var Dt=He.length,Ot=0,Yt=1,Cn="",en,Hn,Fn=0,vi,_i,zi,ar,Br;;){if(Fn==Ot){vi=_i=zi=Hn="",Br=null,ar=null,Fn=1/0;for(var br=[],Gr=void 0,Co=0;Co<Oe.length;++Co){var xr=Oe[Co],jo=xr.marker;if(jo.type=="bookmark"&&xr.from==Ot&&jo.widgetNode)br.push(jo);else if(xr.from<=Ot&&(xr.to==null||xr.to>Ot||jo.collapsed&&xr.to==Ot&&xr.from==Ot)){if(xr.to!=null&&xr.to!=Ot&&Fn>xr.to&&(Fn=xr.to,_i=""),jo.className&&(vi+=" "+jo.className),jo.css&&(Hn=(Hn?Hn+";":"")+jo.css),jo.startStyle&&xr.from==Ot&&(zi+=" "+jo.startStyle),jo.endStyle&&xr.to==Fn&&(Gr||(Gr=[])).push(jo.endStyle,xr.to),jo.title&&((Br||(Br={})).title=jo.title),jo.attributes)for(var aa in jo.attributes)(Br||(Br={}))[aa]=jo.attributes[aa];jo.collapsed&&(!ar||Zo(ar.marker,jo)<0)&&(ar=xr)}else xr.from>Ot&&Fn>xr.from&&(Fn=xr.from)}if(Gr)for(var $a=0;$a<Gr.length;$a+=2)Gr[$a+1]==Fn&&(_i+=" "+Gr[$a]);if(!ar||ar.from==Ot)for(var pa=0;pa<br.length;++pa)gs(pe,0,br[pa]);if(ar&&(ar.from||0)==Ot){if(gs(pe,(ar.to==null?Dt+1:ar.to)-Ot,ar.marker,ar.from==null),ar.to==null)return;ar.to==Ot&&(ar=!1)}}if(Ot>=Dt)break;for(var eu=Math.min(Dt,Fn);;){if(Cn){var Ll=Ot+Cn.length;if(!ar){var Fa=Ll>eu?Cn.slice(0,eu-Ot):Cn;pe.addToken(pe,Fa,en?en+vi:vi,zi,Ot+Fa.length==Fn?_i:"",Hn,Br)}if(Ll>=eu){Cn=Cn.slice(eu-Ot),Ot=eu;break}Ot=Ll,zi=""}Cn=He.slice(lt,lt=De[Yt++]),en=sa(De[Yt++],pe.cm.options)}}}function au(re,pe,De){this.line=pe,this.rest=_o(pe),this.size=this.rest?At(Ut(this.rest))-De+1:1,this.node=this.text=null,this.hidden=Xn(re,pe)}function fo(re,pe,De){for(var Oe=[],He,lt=pe;lt<De;lt=He){var bt=new au(re.doc,un(re.doc,lt),lt);He=lt+bt.size,Oe.push(bt)}return Oe}var Lr=null;function La(re){Lr?Lr.ops.push(re):re.ownsGroup=Lr={ops:[re],delayedCallbacks:[]}}function Cr(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 He=re.ops[Oe];if(He.cursorActivityHandlers)for(;He.cursorActivityCalled<He.cursorActivityHandlers.length;)He.cursorActivityHandlers[He.cursorActivityCalled++].call(null,He.cm)}}while(De<pe.length)}function to(re,pe){var De=re.ownsGroup;if(De)try{Cr(De)}finally{Lr=null,pe(De)}}var Kr=null;function Ci(re,pe){var De=pn(re,pe);if(De.length){var Oe=Array.prototype.slice.call(arguments,2),He;Lr?He=Lr.delayedCallbacks:Kr?He=Kr:(He=Kr=[],setTimeout(us,0));for(var lt=function(Dt){He.push(function(){return De[Dt].apply(null,Oe)})},bt=0;bt<De.length;++bt)lt(bt)}}function us(){var re=Kr;Kr=null;for(var pe=0;pe<re.length;++pe)re[pe]()}function Ts(re,pe,De,Oe){for(var He=0;He<pe.changes.length;He++){var lt=pe.changes[He];lt=="text"?yi(re,pe):lt=="gutter"?Ys(re,pe,De,Oe):lt=="class"?ms(re,pe):lt=="widget"&&qa(re,pe,Oe)}pe.changes=null}function ba(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 Ha(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=ba(pe);pe.background=Oe.insertBefore(Ve("div",null,De),Oe.firstChild),re.display.input.setUneditable(pe.background)}}function Qa(re,pe){var De=re.display.externalMeasured;return De&&De.line==pe.line?(re.display.externalMeasured=null,pe.measure=De.measure,De.built):_n(re,pe)}function yi(re,pe){var De=pe.text.className,Oe=Qa(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){Ha(re,pe),pe.line.wrapClass?ba(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 Ys(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 He=ba(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),He.insertBefore(pe.gutterBackground,pe.text)}var lt=pe.line.gutterMarkers;if(re.options.lineNumbers||lt){var bt=ba(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&&(!lt||!lt["CodeMirror-linenumbers"])&&(pe.lineNumber=Dt.appendChild(Ve("div",kn(re.options,De),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+Oe.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+re.display.lineNumInnerWidth+"px"))),lt)for(var Ot=0;Ot<re.display.gutterSpecs.length;++Ot){var Yt=re.display.gutterSpecs[Ot].className,Cn=lt.hasOwnProperty(Yt)&<[Yt];Cn&&Dt.appendChild(Ve("div",[Cn],"CodeMirror-gutter-elt","left: "+Oe.gutterLeft[Yt]+"px; width: "+Oe.gutterWidth[Yt]+"px"))}}}function qa(re,pe,De){pe.alignable&&(pe.alignable=null);for(var Oe=Ce("CodeMirror-linewidget"),He=pe.node.firstChild,lt=void 0;He;He=lt)lt=He.nextSibling,Oe.test(He.className)&&pe.node.removeChild(He);Ol(re,pe,De)}function xl(re,pe,De,Oe){var He=Qa(re,pe);return pe.text=pe.node=He.pre,He.bgClass&&(pe.bgClass=He.bgClass),He.textClass&&(pe.textClass=He.textClass),ms(re,pe),Ys(re,pe,De,Oe),Ol(re,pe,Oe),pe.node}function Ol(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,He){if(pe.widgets)for(var lt=ba(De),bt=0,Dt=pe.widgets;bt<Dt.length;++bt){var Ot=Dt[bt],Yt=Ve("div",[Ot.node],"CodeMirror-linewidget"+(Ot.className?" "+Ot.className:""));Ot.handleMouseEvents||Yt.setAttribute("cm-ignore-events","true"),nc(Ot,Yt,De,Oe),re.display.input.setUneditable(Yt),He&&Ot.above?lt.insertBefore(Yt,De.gutter||De.text):lt.appendChild(Yt),Ci(Ot,"redraw")}}function nc(re,pe,De,Oe){if(re.noHScroll){(De.alignable||(De.alignable=[])).push(pe);var He=Oe.wrapperWidth;pe.style.left=Oe.fixedPos+"px",re.coverGutter||(He-=Oe.gutterTotalWidth,pe.style.paddingLeft=Oe.gutterTotalWidth+"px"),pe.style.width=He+"px"}re.coverGutter&&(pe.style.zIndex=5,pe.style.position="relative",re.noHScroll||(pe.style.marginLeft=-Oe.gutterTotalWidth+"px"))}function Oa(re){if(re.height!=null)return re.height;var pe=re.doc.cm;if(!pe)return 0;if(!gt(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 Ua(re,pe){for(var De=Ji(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 ka(re){return re.lineSpace.offsetTop}function Kl(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 Ga(re){return St-re.display.nativeBarWidth}function Wa(re){return re.display.scroller.clientWidth-Ga(re)-re.display.barWidth}function Uu(re){return re.display.scroller.clientHeight-Ga(re)-re.display.barHeight}function yc(re,pe,De){var Oe=re.options.lineWrapping,He=Oe&&Wa(re);if(!pe.measure.heights||Oe&&pe.measure.width!=He){var lt=pe.measure.heights=[];if(Oe){pe.measure.width=He;for(var bt=pe.text.firstChild.getClientRects(),Dt=0;Dt<bt.length-1;Dt++){var Ot=bt[Dt],Yt=bt[Dt+1];Math.abs(Ot.bottom-Yt.bottom)>2&<.push((Ot.bottom+Yt.top)/2-De.top)}}lt.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 He=0;He<re.rest.length;He++)if(At(re.rest[He])>De)return{map:re.measure.maps[He],cache:re.measure.caches[He],before:!0}}function Il(re,pe){pe=qi(pe);var De=At(pe),Oe=re.display.externalMeasured=new au(re.doc,pe,De);Oe.lineN=De;var He=Oe.built=_n(re,Oe);return Oe.text=He.pre,je(re.display.lineMeasure,He.pre),Oe}function Sc(re,pe,De,Oe){return wl(re,Lu(re,pe),De,Oe)}function Gu(re,pe){if(pe>=re.display.viewFrom&&pe<re.display.viewTo)return re.display.view[Vs(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&&(Ts(re,Oe,De,bh(re)),re.curOp.forceUpdate=!0),Oe||(Oe=Il(re,pe));var He=Eu(Oe,pe,De);return{line:pe,view:Oe,rect:null,map:He.map,cache:He.cache,before:He.before,hasHeights:!1}}function wl(re,pe,De,Oe,He){pe.before&&(De=-1);var lt=De+(Oe||""),bt;return pe.cache.hasOwnProperty(lt)?bt=pe.cache[lt]:(pe.rect||(pe.rect=pe.view.text.getBoundingClientRect()),pe.hasHeights||(yc(re,pe.view,pe.rect),pe.hasHeights=!0),bt=so(re,pe,De,Oe),bt.bogus||(pe.cache[lt]=bt)),{left:bt.left,right:bt.right,top:He?bt.rtop:bt.top,bottom:He?bt.rbottom:bt.bottom}}var th={left:0,right:0,top:0,bottom:0};function xc(re,pe,De){for(var Oe,He,lt,bt,Dt,Ot,Yt=0;Yt<re.length;Yt+=3)if(Dt=re[Yt],Ot=re[Yt+1],pe<Dt?(He=0,lt=1,bt="left"):pe<Ot?(He=pe-Dt,lt=He+1):(Yt==re.length-3||pe==Ot&&re[Yt+3]>pe)&&(lt=Ot-Dt,He=lt-1,pe>=Ot&&(bt="right")),He!=null){if(Oe=re[Yt+2],Dt==Ot&&De==(Oe.insertLeft?"left":"right")&&(bt=De),De=="left"&&He==0)for(;Yt&&re[Yt-2]==re[Yt-3]&&re[Yt-1].insertLeft;)Oe=re[(Yt-=3)+2],bt="left";if(De=="right"&&He==Ot-Dt)for(;Yt<re.length-3&&re[Yt+3]==re[Yt+4]&&!re[Yt+5].insertLeft;)Oe=re[(Yt+=3)+2],bt="right";break}return{node:Oe,start:He,end:lt,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 He=re.length-1;He>=0&&(De=re[He]).left==De.right;He--);return De}function so(re,pe,De,Oe){var He=xc(pe.map,De,Oe),lt=He.node,bt=He.start,Dt=He.end,Ot=He.collapse,Yt;if(lt.nodeType==3){for(var Cn=0;Cn<4;Cn++){for(;bt&&Re(pe.line.text.charAt(He.coverStart+bt));)--bt;for(;He.coverStart+Dt<He.coverEnd&&Re(pe.line.text.charAt(He.coverStart+Dt));)++Dt;if(be&&Pe<9&&bt==0&&Dt==He.coverEnd-He.coverStart?Yt=lt.parentNode.getBoundingClientRect():Yt=lu(We(lt,bt,Dt).getClientRects(),Oe),Yt.left||Yt.right||bt==0)break;Dt=bt,bt=bt-1,Ot="right"}be&&Pe<11&&(Yt=zo(re.display.measure,Yt))}else{bt>0&&(Ot=Oe="right");var en;re.options.lineWrapping&&(en=lt.getClientRects()).length>1?Yt=en[Oe=="right"?en.length-1:0]:Yt=lt.getBoundingClientRect()}if(be&&Pe<9&&!bt&&(!Yt||!Yt.left&&!Yt.right)){var Hn=lt.parentNode.getClientRects()[0];Hn?Yt={left:Hn.left,right:Hn.left+Wu(re.display),top:Hn.top,bottom:Hn.bottom}:Yt=th}for(var Fn=Yt.top-pe.rect.top,vi=Yt.bottom-pe.rect.top,_i=(Fn+vi)/2,zi=pe.view.measure.heights,ar=0;ar<zi.length-1&&!(_i<zi[ar]);ar++);var Br=ar?zi[ar-1]:0,br=zi[ar],Gr={left:(Ot=="right"?Yt.right:Yt.left)-pe.rect.left,right:(Ot=="left"?Yt.left:Yt.right)-pe.rect.left,top:Br,bottom:br};return!Yt.left&&!Yt.right&&(Gr.bogus=!0),re.options.singleCursorHeightPerLine||(Gr.rtop=Fn,Gr.rbottom=vi),Gr}function zo(re,pe){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!yo(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 Ma(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 na(re){re.display.externalMeasure=null,Ne(re.display.lineMeasure);for(var pe=0;pe<re.display.view.length;pe++)Ma(re.display.view[pe])}function Ds(re){na(re),re.display.cachedCharWidth=re.display.cachedTextHeight=re.display.cachedPaddingH=null,re.options.lineWrapping||(re.display.maxLineChanged=!0),re.display.lineNumChars=null}function Ps(){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 Ws(re){var pe=0;if(re.widgets)for(var De=0;De<re.widgets.length;++De)re.widgets[De].above&&(pe+=Oa(re.widgets[De]));return pe}function Zs(re,pe,De,Oe,He){if(!He){var lt=Ws(pe);De.top+=lt,De.bottom+=lt}if(Oe=="line")return De;Oe||(Oe="local");var bt=no(pe);if(Oe=="local"?bt+=ka(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:Ps());De.left+=Ot,De.right+=Ot}return De.top+=bt,De.bottom+=bt,De}function Vl(re,pe,De){if(De=="div")return pe;var Oe=pe.left,He=pe.top;if(De=="page")Oe-=Ps(),He-=ks();else if(De=="local"||!De){var lt=re.display.sizer.getBoundingClientRect();Oe+=lt.left,He+=lt.top}var bt=re.display.lineSpace.getBoundingClientRect();return{left:Oe-bt.left,top:He-bt.top}}function Dl(re,pe,De,Oe,He){return Oe||(Oe=un(re.doc,pe.line)),Zs(re,Oe,Sc(re,Oe,pe.ch,He),De)}function Rs(re,pe,De,Oe,He,lt){Oe=Oe||un(re.doc,pe.line),He||(He=Lu(re,Oe));function bt(vi,_i){var zi=wl(re,He,vi,_i?"right":"left",lt);return _i?zi.left=zi.right:zi.right=zi.left,Zs(re,Oe,zi,De)}var Dt=tn(Oe,re.doc.direction),Ot=pe.ch,Yt=pe.sticky;if(Ot>=Oe.text.length?(Ot=Oe.text.length,Yt="before"):Ot<=0&&(Ot=0,Yt="after"),!Dt)return bt(Yt=="before"?Ot-1:Ot,Yt=="before");function Cn(vi,_i,zi){var ar=Dt[_i],Br=ar.level==1;return bt(zi?vi-1:vi,Br!=zi)}var en=at(Dt,Ot,Yt),Hn=Ze,Fn=Cn(Ot,en,Yt=="before");return Hn!=null&&(Fn.other=Cn(Ot,Hn,Yt!="before")),Fn}function xh(re,pe){var De=0;pe=Nn(re.doc,pe),re.options.lineWrapping||(De=Wu(re.display)*pe.ch);var Oe=un(re.doc,pe.line),He=no(Oe)+ka(re.display);return{left:De,right:De,top:He,bottom:He+Oe.height}}function nh(re,pe,De,Oe,He){var lt=Zt(re,pe,De);return lt.xRel=He,Oe&&(lt.outside=Oe),lt}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 He=Kt(Oe,De),lt=Oe.first+Oe.size-1;if(He>lt)return nh(Oe.first+Oe.size-1,un(Oe,lt).text.length,null,1,1);pe<0&&(pe=0);for(var bt=un(Oe,He);;){var Dt=Jn(re,bt,He,pe,De),Ot=Sr(bt,Dt.ch+(Dt.xRel>0||Dt.outside>0?1:0));if(!Ot)return Dt;var Yt=Ot.find(1);if(Yt.line==He)return Yt;bt=un(Oe,He=Yt.line)}}function mr(re,pe,De,Oe){Oe-=Ws(pe);var He=pe.text.length,lt=Ge(function(bt){return wl(re,De,bt-1).bottom<=Oe},He,0);return He=Ge(function(bt){return wl(re,De,bt).top>Oe},lt,He),{begin:lt,end:He}}function bc(re,pe,De,Oe){De||(De=Lu(re,pe));var He=Zs(re,pe,wl(re,De,Oe),"line").top;return mr(re,pe,De,He)}function on(re,pe,De,Oe){return re.bottom<=De?!1:re.top>De?!0:(Oe?re.left:re.right)>pe}function Jn(re,pe,De,Oe,He){He-=no(pe);var lt=Lu(re,pe),bt=Ws(pe),Dt=0,Ot=pe.text.length,Yt=!0,Cn=tn(pe,re.doc.direction);if(Cn){var en=(re.options.lineWrapping?Qh:wh)(re,pe,De,lt,Cn,Oe,He);Yt=en.level!=1,Dt=Yt?en.from:en.to-1,Ot=Yt?en.to:en.from-1}var Hn=null,Fn=null,vi=Ge(function(Co){var xr=wl(re,lt,Co);return xr.top+=bt,xr.bottom+=bt,on(xr,Oe,He,!1)?(xr.top<=He&&xr.left<=Oe&&(Hn=Co,Fn=xr),!0):!1},Dt,Ot),_i,zi,ar=!1;if(Fn){var Br=Oe-Fn.left<Fn.right-Oe,br=Br==Yt;vi=Hn+(br?0:1),zi=br?"after":"before",_i=Br?Fn.left:Fn.right}else{!Yt&&(vi==Ot||vi==Dt)&&vi++,zi=vi==0?"after":vi==pe.text.length?"before":wl(re,lt,vi-(Yt?1:0)).bottom+bt<=He==Yt?"after":"before";var Gr=Rs(re,Zt(De,vi,zi),"line",pe,lt);_i=Gr.left,ar=He<Gr.top?-1:He>=Gr.bottom?1:0}return vi=Ae(pe.text,vi,1),nh(De,vi,zi,ar,Oe-_i)}function wh(re,pe,De,Oe,He,lt,bt){var Dt=Ge(function(en){var Hn=He[en],Fn=Hn.level!=1;return on(Rs(re,Zt(De,Fn?Hn.to:Hn.from,Fn?"before":"after"),"line",pe,Oe),lt,bt,!0)},0,He.length-1),Ot=He[Dt];if(Dt>0){var Yt=Ot.level!=1,Cn=Rs(re,Zt(De,Yt?Ot.from:Ot.to,Yt?"after":"before"),"line",pe,Oe);on(Cn,lt,bt,!0)&&Cn.top>bt&&(Ot=He[Dt-1])}return Ot}function Qh(re,pe,De,Oe,He,lt,bt){var Dt=mr(re,pe,Oe,bt),Ot=Dt.begin,Yt=Dt.end;/\s/.test(pe.text.charAt(Yt-1))&&Yt--;for(var Cn=null,en=null,Hn=0;Hn<He.length;Hn++){var Fn=He[Hn];if(!(Fn.from>=Yt||Fn.to<=Ot)){var vi=Fn.level!=1,_i=wl(re,Oe,vi?Math.min(Yt,Fn.to)-1:Math.max(Ot,Fn.from)).right,zi=_i<lt?lt-_i+1e9:_i-lt;(!Cn||en>zi)&&(Cn=Fn,en=zi)}}return Cn||(Cn=He[He.length-1]),Cn.from<Ot&&(Cn={from:Ot,to:Cn.to,level:Cn.level}),Cn.to>Yt&&(Cn={from:Cn.from,to:Yt,level:Cn.level}),Cn}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(),He=(Oe.right-Oe.left)/10;return He>2&&(re.cachedCharWidth=He),He||10}function bh(re){for(var pe=re.display,De={},Oe={},He=pe.gutters.clientLeft,lt=pe.gutters.firstChild,bt=0;lt;lt=lt.nextSibling,++bt){var Dt=re.display.gutterSpecs[bt].className;De[Dt]=lt.offsetLeft+lt.clientLeft+He,Oe[Dt]=lt.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 Ks(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(He){if(Xn(re.doc,He))return 0;var lt=0;if(He.widgets)for(var bt=0;bt<He.widgets.length;bt++)He.widgets[bt].height&&(lt+=He.widgets[bt].height);return De?lt+(Math.ceil(He.text.length/Oe)||1)*pe:lt+pe}}function Wr(re){var pe=re.doc,De=Ks(re);pe.iter(function(Oe){var He=De(Oe);He!=Oe.height&&zn(Oe,He)})}function Ia(re,pe,De,Oe){var He=re.display;if(!De&&Ji(pe).getAttribute("cm-not-content")=="true")return null;var lt,bt,Dt=He.lineSpace.getBoundingClientRect();try{lt=pe.clientX-Dt.left,bt=pe.clientY-Dt.top}catch(en){return null}var Ot=wc(re,lt,bt),Yt;if(Oe&&Ot.xRel>0&&(Yt=un(re.doc,Ot.line).text).length==Ot.ch){var Cn=ht(Yt,Yt.length,re.options.tabSize)-Yt.length;Ot=Zt(Ot.line,Math.max(0,Math.round((lt-_u(re.display).left)/Wu(re.display))-Cn))}return Ot}function Vs(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 Ls(re,pe,De,Oe){pe==null&&(pe=re.doc.first),De==null&&(De=re.doc.first+re.doc.size),Oe||(Oe=0);var He=re.display;if(Oe&&De<He.viewTo&&(He.updateLineNumbers==null||He.updateLineNumbers>pe)&&(He.updateLineNumbers=pe),re.curOp.viewChanged=!0,pe>=He.viewTo)In&&rr(re.doc,pe)<He.viewTo&&da(re);else if(De<=He.viewFrom)In&&ji(re.doc,De+Oe)>He.viewFrom?da(re):(He.viewFrom+=Oe,He.viewTo+=Oe);else if(pe<=He.viewFrom&&De>=He.viewTo)da(re);else if(pe<=He.viewFrom){var lt=dl(re,De,De+Oe,1);lt?(He.view=He.view.slice(lt.index),He.viewFrom=lt.lineN,He.viewTo+=Oe):da(re)}else if(De>=He.viewTo){var bt=dl(re,pe,pe,-1);bt?(He.view=He.view.slice(0,bt.index),He.viewTo=bt.lineN):da(re)}else{var Dt=dl(re,pe,pe,-1),Ot=dl(re,De,De+Oe,1);Dt&&Ot?(He.view=He.view.slice(0,Dt.index).concat(fo(re,Dt.lineN,Ot.lineN)).concat(He.view.slice(Ot.index)),He.viewTo+=Oe):da(re)}var Yt=He.externalMeasured;Yt&&(De<Yt.lineN?Yt.lineN+=Oe:pe<Yt.lineN+Yt.size&&(He.externalMeasured=null))}function bo(re,pe,De){re.curOp.viewChanged=!0;var Oe=re.display,He=re.display.externalMeasured;if(He&&pe>=He.lineN&&pe<He.lineN+He.size&&(Oe.externalMeasured=null),!(pe<Oe.viewFrom||pe>=Oe.viewTo)){var lt=Oe.view[Vs(re,pe)];if(lt.node!=null){var bt=lt.changes||(lt.changes=[]);dt(bt,De)==-1&&bt.push(De)}}}function da(re){re.display.viewFrom=re.display.viewTo=re.doc.first,re.display.view=[],re.display.viewOffset=0}function dl(re,pe,De,Oe){var He=Vs(re,pe),lt,bt=re.display.view;if(!In||De==re.doc.first+re.doc.size)return{index:He,lineN:De};for(var Dt=re.display.viewFrom,Ot=0;Ot<He;Ot++)Dt+=bt[Ot].size;if(Dt!=pe){if(Oe>0){if(He==bt.length-1)return null;lt=Dt+bt[He].size-pe,He++}else lt=Dt-pe;pe+=lt,De+=lt}for(;rr(re.doc,De)!=De;){if(He==(Oe<0?0:bt.length-1))return null;De+=Oe*bt[He-(Oe<0?1:0)].size,He+=Oe}return{index:He,lineN:De}}function as(re,pe,De){var Oe=re.display,He=Oe.view;He.length==0||pe>=Oe.viewTo||De<=Oe.viewFrom?(Oe.view=fo(re,pe,De),Oe.viewFrom=pe):(Oe.viewFrom>pe?Oe.view=fo(re,pe,Oe.viewFrom).concat(Oe.view):Oe.viewFrom<pe&&(Oe.view=Oe.view.slice(Vs(re,pe))),Oe.viewFrom=pe,Oe.viewTo<De?Oe.view=Oe.view.concat(fo(re,Oe.viewTo,De)):Oe.viewTo>De&&(Oe.view=Oe.view.slice(0,Vs(re,De)))),Oe.viewTo=De}function bl(re){for(var pe=re.display.view,De=0,Oe=0;Oe<pe.length;Oe++){var He=pe[Oe];!He.hidden&&(!He.node||He.changes)&&++De}return De}function Ca(re){re.display.input.showSelection(re.display.input.prepareSelection())}function Pc(re,pe){pe===void 0&&(pe=!0);for(var De=re.doc,Oe={},He=Oe.cursors=document.createDocumentFragment(),lt=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)&&Ho(re,Dt.head,He),Ot||Ko(re,Dt,lt)}}return Oe}function Ho(re,pe,De){var Oe=Rs(re,pe,"div",null,null,!re.options.singleCursorHeightPerLine),He=De.appendChild(Ve("div","\xA0","CodeMirror-cursor"));if(He.style.left=Oe.left+"px",He.style.top=Oe.top+"px",He.style.height=Math.max(0,Oe.bottom-Oe.top)*re.options.cursorHeight+"px",Oe.other){var lt=De.appendChild(Ve("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));lt.style.display="",lt.style.left=Oe.other.left+"px",lt.style.top=Oe.other.top+"px",lt.style.height=(Oe.other.bottom-Oe.other.top)*.85+"px"}}function Za(re,pe){return re.top-pe.top||re.left-pe.left}function Ko(re,pe,De){var Oe=re.display,He=re.doc,lt=document.createDocumentFragment(),bt=_u(re.display),Dt=bt.left,Ot=Math.max(Oe.sizerWidth,Wa(re)-Oe.sizer.offsetLeft)-bt.right,Yt=He.direction=="ltr";function Cn(br,Gr,Co,xr){Gr<0&&(Gr=0),Gr=Math.round(Gr),xr=Math.round(xr),lt.appendChild(Ve("div",null,"CodeMirror-selected","position: absolute; left: "+br+`px;
|
|
|
top: `+Gr+"px; width: "+(Co==null?Ot-br:Co)+`px;
|
|
|
height: `+(xr-Gr)+"px"))}function en(br,Gr,Co){var xr=un(He,br),jo=xr.text.length,aa,$a;function pa(Fa,gu){return Dl(re,Zt(br,Fa),"div",xr,gu)}function eu(Fa,gu,pl){var ja=bc(re,xr,null,Fa),bs=gu=="ltr"==(pl=="after")?"left":"right",Sa=pl=="after"?ja.begin:ja.end-(/\s/.test(xr.text.charAt(ja.end-1))?2:1);return pa(Sa,bs)[bs]}var Ll=tn(xr,He.direction);return Ke(Ll,Gr||0,Co==null?jo:Co,function(Fa,gu,pl,ja){var bs=pl=="ltr",Sa=pa(Fa,bs?"left":"right"),tl=pa(gu-1,bs?"right":"left"),gl=Gr==null&&Fa==0,lc=Co==null&&gu==jo,ga=ja==0,Vu=!Ll||ja==Ll.length-1;if(tl.top-Sa.top<=3){var Ea=(Yt?gl:lc)&&ga,Ef=(Yt?lc:gl)&&Vu,Iu=Ea?Dt:(bs?Sa:tl).left,mu=Ef?Ot:(bs?tl:Sa).right;Cn(Iu,Sa.top,mu-Iu,Sa.bottom)}else{var tu,Qs,nl,Hc;bs?(tu=Yt&&gl&&ga?Dt:Sa.left,Qs=Yt?Ot:eu(Fa,pl,"before"),nl=Yt?Dt:eu(gu,pl,"after"),Hc=Yt&&lc&&Vu?Ot:tl.right):(tu=Yt?eu(Fa,pl,"before"):Dt,Qs=!Yt&&gl&&ga?Ot:Sa.right,nl=!Yt&&lc&&Vu?Dt:tl.left,Hc=Yt?eu(gu,pl,"after"):Ot),Cn(tu,Sa.top,Qs-tu,Sa.bottom),Sa.bottom<tl.top&&Cn(Dt,Sa.bottom,null,tl.top),Cn(nl,tl.top,Hc-nl,tl.bottom)}(!aa||Za(Sa,aa)<0)&&(aa=Sa),Za(tl,aa)<0&&(aa=tl),(!$a||Za(Sa,$a)<0)&&($a=Sa),Za(tl,$a)<0&&($a=tl)}),{start:aa,end:$a}}var Hn=pe.from(),Fn=pe.to();if(Hn.line==Fn.line)en(Hn.line,Hn.ch,Fn.ch);else{var vi=un(He,Hn.line),_i=un(He,Fn.line),zi=qi(vi)==qi(_i),ar=en(Hn.line,Hn.ch,zi?vi.text.length+1:null).end,Br=en(Fn.line,zi?0:null,Fn.ch).start;zi&&(ar.top<Br.top-2?(Cn(ar.right,ar.top,null,ar.bottom),Cn(Dt,Br.top,Br.left,Br.bottom)):Cn(ar.right,ar.top,Br.left-ar.right,ar.bottom)),ar.bottom<Br.top&&Cn(Dt,ar.bottom,null,Br.top)}De.appendChild(lt)}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 cs(re){re.state.focused||(re.display.input.focus(),Bo(re))}function Bs(re){re.state.delayingBlurEvent=!0,setTimeout(function(){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1,Rc(re))},100)}function Bo(re,pe){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1),re.options.readOnly!="nocursor"&&(re.state.focused||(hn(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&&(hn(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 Hr(re){for(var pe=re.display,De=pe.lineDiv.offsetTop,Oe=0;Oe<pe.view.length;Oe++){var He=pe.view[Oe],lt=re.options.lineWrapping,bt=void 0,Dt=0;if(!He.hidden){if(be&&Pe<8){var Ot=He.node.offsetTop+He.node.offsetHeight;bt=Ot-De,De=Ot}else{var Yt=He.node.getBoundingClientRect();bt=Yt.bottom-Yt.top,!lt&&He.text.firstChild&&(Dt=He.text.firstChild.getBoundingClientRect().right-Yt.left-1)}var Cn=He.line.height-bt;if((Cn>.005||Cn<-.005)&&(zn(He.line,bt),Ad(He.line),He.rest))for(var en=0;en<He.rest.length;en++)Ad(He.rest[en]);if(Dt>re.display.sizerWidth){var Hn=Math.ceil(Dt/Wu(re.display));Hn>re.display.maxLineLength&&(re.display.maxLineLength=Hn,re.display.maxLine=He.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 Uo(re,pe,De){var Oe=De&&De.top!=null?Math.max(0,De.top):re.scroller.scrollTop;Oe=Math.floor(Oe-ka(re));var He=De&&De.bottom!=null?De.bottom:Oe+re.wrapper.clientHeight,lt=Kt(pe,Oe),bt=Kt(pe,He);if(De&&De.ensure){var Dt=De.ensure.from.line,Ot=De.ensure.to.line;Dt<lt?(lt=Dt,bt=Kt(pe,no(un(pe,Dt))+re.wrapper.clientHeight)):Math.min(Ot,pe.lastLine())>=bt&&(lt=Kt(pe,no(un(pe,Ot))-re.wrapper.clientHeight),bt=Ot)}return{from:lt,to:Math.max(bt,lt+1)}}function Nd(re,pe){if(!En(re,"scrollCursorIntoView")){var De=re.display,Oe=De.sizer.getBoundingClientRect(),He=null;if(pe.top+Oe.top<0?He=!0:pe.bottom+Oe.top>(window.innerHeight||document.documentElement.clientHeight)&&(He=!1),He!=null&&!de){var lt=Ve("div","\u200B",null,`position: absolute;
|
|
|
top: `+(pe.top-De.viewOffset-ka(re.display))+`px;
|
|
|
height: `+(pe.bottom-pe.top+Ga(re)+De.barHeight)+`px;
|
|
|
left: `+pe.left+"px; width: "+Math.max(2,pe.right-pe.left)+"px;");re.display.lineSpace.appendChild(lt),lt.scrollIntoView(He),re.display.lineSpace.removeChild(lt)}}}function ih(re,pe,De,Oe){Oe==null&&(Oe=0);var He;!re.options.lineWrapping&&pe==De&&(pe=pe.ch?Zt(pe.line,pe.sticky=="before"?pe.ch-1:pe.ch,"after"):pe,De=pe.sticky=="before"?Zt(pe.line,pe.ch+1,"before"):pe);for(var lt=0;lt<5;lt++){var bt=!1,Dt=Rs(re,pe),Ot=!De||De==pe?Dt:Rs(re,De);He={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 Yt=Od(re,He),Cn=re.doc.scrollTop,en=re.doc.scrollLeft;if(Yt.scrollTop!=null&&(Au(re,Yt.scrollTop),Math.abs(re.doc.scrollTop-Cn)>1&&(bt=!0)),Yt.scrollLeft!=null&&(uu(re,Yt.scrollLeft),Math.abs(re.doc.scrollLeft-en)>1&&(bt=!0)),!bt)break}return He}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 He=re.curOp&&re.curOp.scrollTop!=null?re.curOp.scrollTop:De.scroller.scrollTop,lt=Uu(re),bt={};pe.bottom-pe.top>lt&&(pe.bottom=pe.top+lt);var Dt=re.doc.height+Kl(De),Ot=pe.top<Oe,Yt=pe.bottom>Dt-Oe;if(pe.top<He)bt.scrollTop=Ot?0:pe.top;else if(pe.bottom>He+lt){var Cn=Math.min(pe.top,(Yt?Dt:pe.bottom)-lt);Cn!=He&&(bt.scrollTop=Cn)}var en=re.options.fixedGutter?0:De.gutters.offsetWidth,Hn=re.curOp&&re.curOp.scrollLeft!=null?re.curOp.scrollLeft:De.scroller.scrollLeft-en,Fn=Wa(re)-De.gutters.offsetWidth,vi=pe.right-pe.left>Fn;return vi&&(pe.right=pe.left+Fn),pe.left<10?bt.scrollLeft=0:pe.left<Hn?bt.scrollLeft=Math.max(0,pe.left+en-(vi?0:10)):pe.right>Fn+Hn-3&&(bt.scrollLeft=pe.right+(vi?0:10)-Fn),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 io(re,pe,De){(pe!=null||De!=null)&&ku(re),pe!=null&&(re.curOp.scrollLeft=pe),De!=null&&(re.curOp.scrollTop=De)}function ts(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 He=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});io(re,He.scrollLeft,He.scrollTop)}function Au(re,pe){Math.abs(re.doc.scrollTop-pe)<2||(Le||mi(re,{top:pe}),ed(re,pe,!0),Le&&mi(re),gn(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,Zi(re),re.display.scroller.scrollLeft!=pe&&(re.display.scroller.scrollLeft=pe),re.display.scrollbars.setScrollLeft(pe))}function Rl(re){var pe=re.display,De=pe.gutters.offsetWidth,Oe=Math.round(re.doc.height+Kl(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+Ga(re)+pe.barHeight,nativeBarWidth:pe.nativeBarWidth,gutterWidth:De}}var ds=function(re,pe,De){this.cm=De;var Oe=this.vert=Ve("div",[Ve("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),He=this.horiz=Ve("div",[Ve("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");Oe.tabIndex=He.tabIndex=-1,re(Oe),re(He),Jt(Oe,"scroll",function(){Oe.clientHeight&&pe(Oe.scrollTop,"vertical")}),Jt(He,"scroll",function(){He.clientWidth&&pe(He.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,be&&Pe<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ds.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 He=re.viewHeight-(pe?Oe:0);this.vert.firstChild.style.height=Math.max(0,re.scrollHeight-re.clientHeight+He)+"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 lt=re.viewWidth-re.barLeft-(De?Oe:0);this.horiz.firstChild.style.width=Math.max(0,re.scrollWidth-re.clientWidth+lt)+"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}},ds.prototype.setScrollLeft=function(re){this.horiz.scrollLeft!=re&&(this.horiz.scrollLeft=re),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ds.prototype.setScrollTop=function(re){this.vert.scrollTop!=re&&(this.vert.scrollTop=re),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ds.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},ds.prototype.enableZeroWidthBar=function(re,pe,De){re.style.pointerEvents="auto";function Oe(){var He=re.getBoundingClientRect(),lt=De=="vert"?document.elementFromPoint(He.right-1,(He.top+He.bottom)/2):document.elementFromPoint((He.right+He.left)/2,He.bottom-1);lt!=re?re.style.pointerEvents="none":pe.set(1e3,Oe)}pe.set(1e3,Oe)},ds.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=Rl(re));var De=re.display.barWidth,Oe=re.display.barHeight;el(re,pe);for(var He=0;He<4&&De!=re.display.barWidth||Oe!=re.display.barHeight;He++)De!=re.display.barWidth&&re.options.lineWrapping&&Hr(re),el(re,Rl(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:ds,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 Aa(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},La(re.curOp)}function oc(re){var pe=re.curOp;pe&&to(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 He=0;He<pe.length;He++)an(pe[He]);for(var lt=0;lt<pe.length;lt++)pt(pe[lt]);for(var bt=0;bt<pe.length;bt++)Pt(pe[bt])}function Rt(re){var pe=re.cm,De=pe.display;jn(pe),re.updateMaxLine&&ko(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 xn(pe,re.mustUpdate&&{top:re.scrollTop,ensure:re.scrollToPos},re.forceUpdate)}function zt(re){re.updatedDisplay=re.mustUpdate&&xi(re.cm,re.update)}function an(re){var pe=re.cm,De=pe.display;re.updatedDisplay&&Hr(pe),re.barMeasure=Rl(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+Ga(pe)+pe.display.barWidth),re.maxScrollLeft=Math.max(0,De.sizer.offsetLeft+re.adjustWidthTo-Wa(pe))),(re.updatedDisplay||re.selectionChanged)&&(re.preparedSelection=De.input.prepareSelection())}function pt(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&&Oi(pe,re.barMeasure),re.selectionChanged&&vs(pe),pe.state.focused&&re.updateInput&&pe.display.input.reset(re.typing),De&&cs(re.cm)}function Pt(re){var pe=re.cm,De=pe.display,Oe=pe.doc;if(re.updatedDisplay&&Kn(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 He=ih(pe,Nn(Oe,re.scrollToPos.from),Nn(Oe,re.scrollToPos.to),re.scrollToPos.margin);Nd(pe,He)}var lt=re.maybeHiddenMarkers,bt=re.maybeUnhiddenMarkers;if(lt)for(var Dt=0;Dt<lt.length;++Dt)lt[Dt].lines.length||hn(lt[Dt],"hide");if(bt)for(var Ot=0;Ot<bt.length;++Ot)bt[Ot].lines.length&&hn(bt[Ot],"unhide");De.wrapper.offsetHeight&&(Oe.scrollTop=pe.display.scroller.scrollTop),re.changeObjs&&hn(pe,"changes",pe,re.changeObjs),re.update&&re.update.finish()}function Lt(re,pe){if(re.curOp)return pe();Aa(re);try{return pe()}finally{oc(re)}}function vn(re,pe){return function(){if(re.curOp)return pe.apply(re,arguments);Aa(re);try{return pe.apply(re,arguments)}finally{oc(re)}}}function cn(re){return function(){if(this.curOp)return re.apply(this,arguments);Aa(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);Aa(pe);try{return re.apply(this,arguments)}finally{oc(pe)}}}function gn(re,pe){re.doc.highlightFrontier<re.display.viewTo&&re.state.highlight.set(pe,ut(mn,re))}function mn(re){var pe=re.doc;if(!(pe.highlightFrontier>=re.display.viewTo)){var De=+new Date+re.options.workTime,Oe=Di(re,pe.highlightFrontier),He=[];pe.iter(Oe.line,Math.min(pe.first+pe.size,re.display.viewTo+500),function(lt){if(Oe.line>=re.display.viewFrom){var bt=lt.styles,Dt=lt.text.length>re.options.maxHighlightLength?wt(pe.mode,Oe.state):null,Ot=Ui(re,lt,Oe,!0);Dt&&(Oe.state=Dt),lt.styles=Ot.styles;var Yt=lt.styleClasses,Cn=Ot.classes;Cn?lt.styleClasses=Cn:Yt&&(lt.styleClasses=null);for(var en=!bt||bt.length!=lt.styles.length||Yt!=Cn&&(!Yt||!Cn||Yt.bgClass!=Cn.bgClass||Yt.textClass!=Cn.textClass),Hn=0;!en&&Hn<bt.length;++Hn)en=bt[Hn]!=lt.styles[Hn];en&&He.push(Oe.line),lt.stateAfter=Oe.save(),Oe.nextLine()}else lt.text.length<=re.options.maxHighlightLength&&Pn(re,lt.text,Oe),lt.stateAfter=Oe.line%5==0?Oe.save():null,Oe.nextLine();if(+new Date>De)return gn(re,re.options.workDelay),!0}),pe.highlightFrontier=Oe.line,pe.modeFrontier=Math.max(pe.modeFrontier,Oe.line),He.length&&Lt(re,function(){for(var lt=0;lt<He.length;lt++)bo(re,He[lt],"text")})}}var xn=function(re,pe,De){var Oe=re.display;this.viewport=pe,this.visible=Uo(Oe,re.doc,pe),this.editorIsHidden=!Oe.wrapper.offsetWidth,this.wrapperHeight=Oe.wrapper.clientHeight,this.wrapperWidth=Oe.wrapper.clientWidth,this.oldDisplayWidth=Wa(re),this.force=De,this.dims=bh(re),this.events=[]};xn.prototype.signal=function(re,pe){Tn(re,pe)&&this.events.push(arguments)},xn.prototype.finish=function(){for(var re=0;re<this.events.length;re++)hn.apply(null,this.events[re])};function jn(re){var pe=re.display;!pe.scrollbarsClipped&&pe.scroller.offsetWidth&&(pe.nativeBarWidth=pe.scroller.offsetWidth-pe.scroller.clientWidth,pe.heightForcer.style.height=Ga(re)+"px",pe.sizer.style.marginBottom=-pe.nativeBarWidth+"px",pe.sizer.style.borderRightWidth=Ga(re)+"px",pe.scrollbarsClipped=!0)}function ti(re){if(re.hasFocus())return null;var pe=ct();if(!pe||!gt(re.display.lineDiv,pe))return null;var De={activeElt:pe};if(window.getSelection){var Oe=window.getSelection();Oe.anchorNode&&Oe.extend&>(re.display.lineDiv,Oe.anchorNode)&&(De.anchorNode=Oe.anchorNode,De.anchorOffset=Oe.anchorOffset,De.focusNode=Oe.focusNode,De.focusOffset=Oe.focusOffset)}return De}function Zn(re){if(!(!re||!re.activeElt||re.activeElt==ct())&&(re.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(re.activeElt.nodeName)&&re.anchorNode&>(document.body,re.anchorNode)&>(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 xi(re,pe){var De=re.display,Oe=re.doc;if(pe.editorIsHidden)return da(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&&bl(re)==0)return!1;Ai(re)&&(da(re),pe.dims=bh(re));var He=Oe.first+Oe.size,lt=Math.max(pe.visible.from-re.options.viewportMargin,Oe.first),bt=Math.min(He,pe.visible.to+re.options.viewportMargin);De.viewFrom<lt&<-De.viewFrom<20&&(lt=Math.max(Oe.first,De.viewFrom)),De.viewTo>bt&&De.viewTo-bt<20&&(bt=Math.min(He,De.viewTo)),In&&(lt=rr(re.doc,lt),bt=ji(re.doc,bt));var Dt=lt!=De.viewFrom||bt!=De.viewTo||De.lastWrapHeight!=pe.wrapperHeight||De.lastWrapWidth!=pe.wrapperWidth;as(re,lt,bt),De.viewOffset=no(un(re.doc,De.viewFrom)),re.display.mover.style.top=De.viewOffset+"px";var Ot=bl(re);if(!Dt&&Ot==0&&!pe.force&&De.renderedView==De.view&&(De.updateLineNumbers==null||De.updateLineNumbers>=De.viewTo))return!1;var Yt=ti(re);return Ot>4&&(De.lineDiv.style.display="none"),ai(re,De.updateLineNumbers,pe.dims),Ot>4&&(De.lineDiv.style.display=""),De.renderedView=De.view,Zn(Yt),Ne(De.cursorDiv),Ne(De.selectionDiv),De.gutters.style.height=De.sizer.style.minHeight=0,Dt&&(De.lastWrapHeight=pe.wrapperHeight,De.lastWrapWidth=pe.wrapperWidth,gn(re,400)),De.updateLineNumbers=null,!0}function Kn(re,pe){for(var De=pe.viewport,Oe=!0;;Oe=!1){if(!Oe||!re.options.lineWrapping||pe.oldDisplayWidth==Wa(re)){if(De&&De.top!=null&&(De={top:Math.min(re.doc.height+Kl(re.display)-Uu(re),De.top)}),pe.visible=Uo(re.display,re.doc,De),pe.visible.from>=re.display.viewFrom&&pe.visible.to<=re.display.viewTo)break}else Oe&&(pe.visible=Uo(re.display,re.doc,De));if(!xi(re,pe))break;Hr(re);var He=Rl(re);Ca(re),rc(re,He),Oi(re,He),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 mi(re,pe){var De=new xn(re,pe);if(xi(re,De)){Hr(re),Kn(re,De);var Oe=Rl(re);Ca(re),rc(re,Oe),Oi(re,Oe),De.finish()}}function ai(re,pe,De){var Oe=re.display,He=re.options.lineNumbers,lt=Oe.lineDiv,bt=lt.firstChild;function Dt(vi){var _i=vi.nextSibling;return he&&oe&&re.display.currentWheelTarget==vi?vi.style.display="none":vi.parentNode.removeChild(vi),_i}for(var Ot=Oe.view,Yt=Oe.viewFrom,Cn=0;Cn<Ot.length;Cn++){var en=Ot[Cn];if(!en.hidden)if(!en.node||en.node.parentNode!=lt){var Hn=xl(re,en,Yt,De);lt.insertBefore(Hn,bt)}else{for(;bt!=en.node;)bt=Dt(bt);var Fn=He&&pe!=null&&pe<=Yt&&en.lineNumber;en.changes&&(dt(en.changes,"gutter")>-1&&(Fn=!1),Ts(re,en,Yt,De)),Fn&&(Ne(en.lineNumber),en.lineNumber.appendChild(document.createTextNode(kn(re.options,Yt)))),bt=en.node.nextSibling}Yt+=en.size}for(;bt;)bt=Dt(bt)}function Ri(re){var pe=re.gutters.offsetWidth;re.sizer.style.marginLeft=pe+"px"}function Oi(re,pe){re.display.sizer.style.minHeight=pe.docHeight+"px",re.display.heightForcer.style.top=pe.docHeight+"px",re.display.gutters.style.height=pe.docHeight+re.display.barHeight+Ga(re)+"px"}function Zi(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,He=pe.gutters.offsetWidth,lt=Oe+"px",bt=0;bt<De.length;bt++)if(!De[bt].hidden){re.options.fixedGutter&&(De[bt].gutter&&(De[bt].gutter.style.left=lt),De[bt].gutterBackground&&(De[bt].gutterBackground.style.left=lt));var Dt=De[bt].alignable;if(Dt)for(var Ot=0;Ot<Dt.length;Ot++)Dt[Ot].style.left=lt}re.options.fixedGutter&&(pe.gutters.style.left=Oe+He+"px")}}function Ai(re){if(!re.options.lineNumbers)return!1;var pe=re.doc,De=kn(re.options,pe.first+pe.size-1),Oe=re.display;if(De.length!=Oe.lineNumChars){var He=Oe.measure.appendChild(Ve("div",[Ve("div",De)],"CodeMirror-linenumber CodeMirror-gutter-elt")),lt=He.firstChild.offsetWidth,bt=He.offsetWidth-lt;return Oe.lineGutter.style.width="",Oe.lineNumInnerWidth=Math.max(lt,Oe.lineGutter.offsetWidth-bt)+1,Oe.lineNumWidth=Oe.lineNumInnerWidth+bt,Oe.lineNumChars=Oe.lineNumInnerWidth?De.length:-1,Oe.lineGutter.style.width=Oe.lineNumWidth+"px",Ri(re.display),!0}return!1}function Ni(re,pe){for(var De=[],Oe=!1,He=0;He<re.length;He++){var lt=re[He],bt=null;if(typeof lt!="string"&&(bt=lt.style,lt=lt.className),lt=="CodeMirror-linenumbers")if(pe)Oe=!0;else continue;De.push({className:lt,style:bt})}return pe&&!Oe&&De.push({className:"CodeMirror-linenumbers",style:null}),De}function ur(re){var pe=re.gutters,De=re.gutterSpecs;Ne(pe),re.lineGutter=null;for(var Oe=0;Oe<De.length;++Oe){var He=De[Oe],lt=He.className,bt=He.style,Dt=pe.appendChild(Ve("div",null,"CodeMirror-gutter "+lt));bt&&(Dt.style.cssText=bt),lt=="CodeMirror-linenumbers"&&(re.lineGutter=Dt,Dt.style.width=(re.lineNumWidth||1)+"px")}pe.style.display=De.length?"":"none",Ri(re)}function ei(re){ur(re.display),Ls(re),Zi(re)}function Gi(re,pe,De,Oe){var He=this;this.input=De,He.scrollbarFiller=Ve("div",null,"CodeMirror-scrollbar-filler"),He.scrollbarFiller.setAttribute("cm-not-content","true"),He.gutterFiller=Ve("div",null,"CodeMirror-gutter-filler"),He.gutterFiller.setAttribute("cm-not-content","true"),He.lineDiv=Qe("div",null,"CodeMirror-code"),He.selectionDiv=Ve("div",null,null,"position: relative; z-index: 1"),He.cursorDiv=Ve("div",null,"CodeMirror-cursors"),He.measure=Ve("div",null,"CodeMirror-measure"),He.lineMeasure=Ve("div",null,"CodeMirror-measure"),He.lineSpace=Qe("div",[He.measure,He.lineMeasure,He.selectionDiv,He.cursorDiv,He.lineDiv],null,"position: relative; outline: none");var lt=Qe("div",[He.lineSpace],"CodeMirror-lines");He.mover=Ve("div",[lt],null,"position: relative"),He.sizer=Ve("div",[He.mover],"CodeMirror-sizer"),He.sizerWidth=null,He.heightForcer=Ve("div",null,null,"position: absolute; height: "+St+"px; width: 1px;"),He.gutters=Ve("div",null,"CodeMirror-gutters"),He.lineGutter=null,He.scroller=Ve("div",[He.sizer,He.heightForcer,He.gutters],"CodeMirror-scroll"),He.scroller.setAttribute("tabIndex","-1"),He.wrapper=Ve("div",[He.scrollbarFiller,He.gutterFiller,He.scroller],"CodeMirror"),be&&Pe<8&&(He.gutters.style.zIndex=-1,He.scroller.style.paddingRight=0),!he&&!(Le&&ee)&&(He.scroller.draggable=!0),re&&(re.appendChild?re.appendChild(He.wrapper):re(He.wrapper)),He.viewFrom=He.viewTo=pe.first,He.reportedViewFrom=He.reportedViewTo=pe.first,He.view=[],He.renderedView=null,He.externalMeasured=null,He.viewOffset=0,He.lastWrapHeight=He.lastWrapWidth=0,He.updateLineNumbers=null,He.nativeBarWidth=He.barHeight=He.barWidth=0,He.scrollbarsClipped=!1,He.lineNumWidth=He.lineNumInnerWidth=He.lineNumChars=null,He.alignWidgets=!1,He.cachedCharWidth=He.cachedTextHeight=He.cachedPaddingH=null,He.maxLine=null,He.maxLineLength=0,He.maxLineChanged=!1,He.wheelDX=He.wheelDY=He.wheelStartX=He.wheelStartY=null,He.shift=!1,He.selForContextMenu=null,He.activeTouch=null,He.gutterSpecs=Ni(Oe.gutters,Oe.lineNumbers),ur(He),De.init(He)}var Ei=0,wi=null;be?wi=-.53:Le?wi=15:xe?wi=-.7:ce&&(wi=-1/3);function Yi(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 gi(re){var pe=Yi(re);return pe.x*=wi,pe.y*=wi,pe}function dr(re,pe){var De=Yi(pe),Oe=De.x,He=De.y,lt=re.display,bt=lt.scroller,Dt=bt.scrollWidth>bt.clientWidth,Ot=bt.scrollHeight>bt.clientHeight;if(Oe&&Dt||He&&Ot){if(He&&oe&&he){e:for(var Yt=pe.target,Cn=lt.view;Yt!=bt;Yt=Yt.parentNode)for(var en=0;en<Cn.length;en++)if(Cn[en].node==Yt){re.display.currentWheelTarget=Yt;break e}}if(Oe&&!Le&&!ge&&wi!=null){He&&Ot&&Au(re,Math.max(0,bt.scrollTop+He*wi)),uu(re,Math.max(0,bt.scrollLeft+Oe*wi)),(!He||He&&Ot)&&ri(pe),lt.wheelStartX=null;return}if(He&&wi!=null){var Hn=He*wi,Fn=re.doc.scrollTop,vi=Fn+lt.wrapper.clientHeight;Hn<0?Fn=Math.max(0,Fn+Hn-50):vi=Math.min(re.doc.height,vi+Hn+50),mi(re,{top:Fn,bottom:vi})}Ei<20&&(lt.wheelStartX==null?(lt.wheelStartX=bt.scrollLeft,lt.wheelStartY=bt.scrollTop,lt.wheelDX=Oe,lt.wheelDY=He,setTimeout(function(){if(lt.wheelStartX!=null){var _i=bt.scrollLeft-lt.wheelStartX,zi=bt.scrollTop-lt.wheelStartY,ar=zi&<.wheelDY&&zi/lt.wheelDY||_i&<.wheelDX&&_i/lt.wheelDX;lt.wheelStartX=lt.wheelStartY=null,ar&&(wi=(wi*Ei+ar)/(Ei+1),++Ei)}},200)):(lt.wheelDX+=Oe,lt.wheelDY+=He))}}var Xi=function(re,pe){this.ranges=re,this.primIndex=pe};Xi.prototype.primary=function(){return this.ranges[this.primIndex]},Xi.prototype.equals=function(re){if(re==this)return!0;if(re.primIndex!=this.primIndex||re.ranges.length!=this.ranges.length)return!1;for(var pe=0;pe<this.ranges.length;pe++){var De=this.ranges[pe],Oe=re.ranges[pe];if(!Rn(De.anchor,Oe.anchor)||!Rn(De.head,Oe.head))return!1}return!0},Xi.prototype.deepCopy=function(){for(var re=[],pe=0;pe<this.ranges.length;pe++)re[pe]=new Pi(An(this.ranges[pe].anchor),An(this.ranges[pe].head));return new Xi(re,this.primIndex)},Xi.prototype.somethingSelected=function(){for(var re=0;re<this.ranges.length;re++)if(!this.ranges[re].empty())return!0;return!1},Xi.prototype.contains=function(re,pe){pe||(pe=re);for(var De=0;De<this.ranges.length;De++){var Oe=this.ranges[De];if(rn(pe,Oe.from())>=0&&rn(re,Oe.to())<=0)return De}return-1};var Pi=function(re,pe){this.anchor=re,this.head=pe};Pi.prototype.from=function(){return Un(this.anchor,this.head)},Pi.prototype.to=function(){return Qn(this.anchor,this.head)},Pi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ki(re,pe,De){var Oe=re&&re.options.selectionsMayTouch,He=pe[De];pe.sort(function(Hn,Fn){return rn(Hn.from(),Fn.from())}),De=dt(pe,He);for(var lt=1;lt<pe.length;lt++){var bt=pe[lt],Dt=pe[lt-1],Ot=rn(Dt.to(),bt.from());if(Oe&&!bt.empty()?Ot>0:Ot>=0){var Yt=Un(Dt.from(),bt.from()),Cn=Qn(Dt.to(),bt.to()),en=Dt.empty()?bt.from()==bt.head:Dt.from()==Dt.head;lt<=De&&--De,pe.splice(--lt,2,new Pi(en?Cn:Yt,en?Yt:Cn))}}return new Xi(pe,De)}function vr(re,pe){return new Xi([new Pi(re,pe||re)],0)}function or(re){return re.text?Zt(re.from.line+re.text.length-1,Ut(re.text).length+(re.text.length==1?re.from.ch:0)):re.to}function wo(re,pe){if(rn(re,pe.from)<0)return re;if(rn(re,pe.to)<=0)return or(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+=or(pe).ch-pe.to.ch),Zt(De,Oe)}function Eo(re,pe){for(var De=[],Oe=0;Oe<re.sel.ranges.length;Oe++){var He=re.sel.ranges[Oe];De.push(new Pi(wo(He.anchor,pe),wo(He.head,pe)))}return Ki(re.cm,De,re.sel.primIndex)}function ns(re,pe,De){return re.line==pe.line?Zt(De.line,re.ch-pe.ch+De.ch):Zt(De.line+(re.line-pe.line),re.ch)}function uo(re,pe,De){for(var Oe=[],He=Zt(re.first,0),lt=He,bt=0;bt<pe.length;bt++){var Dt=pe[bt],Ot=ns(Dt.from,He,lt),Yt=ns(or(Dt),He,lt);if(He=Dt.to,lt=Yt,De=="around"){var Cn=re.sel.ranges[bt],en=rn(Cn.head,Cn.anchor)<0;Oe[bt]=new Pi(en?Yt:Ot,en?Ot:Yt)}else Oe[bt]=new Pi(Ot,Ot)}return new Xi(Oe,re.sel.primIndex)}function Nr(re){re.doc.mode=$e(re.options,re.doc.modeOption),Io(re)}function Io(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,gn(re,100),re.state.modeGen++,re.curOp&&Ls(re)}function Dr(re,pe){return pe.from.ch==0&&pe.to.ch==0&&Ut(pe.text)==""&&(!re.cm||re.cm.options.wholeLineUpdateBefore)}function Vr(re,pe,De,Oe){function He(Br){return De?De[Br]:null}function lt(Br,br,Gr){Ss(Br,br,Gr,Oe),Ci(Br,"change",Br,pe)}function bt(Br,br){for(var Gr=[],Co=Br;Co<br;++Co)Gr.push(new Xo(Yt[Co],He(Co),Oe));return Gr}var Dt=pe.from,Ot=pe.to,Yt=pe.text,Cn=un(re,Dt.line),en=un(re,Ot.line),Hn=Ut(Yt),Fn=He(Yt.length-1),vi=Ot.line-Dt.line;if(pe.full)re.insert(0,bt(0,Yt.length)),re.remove(Yt.length,re.size-Yt.length);else if(Dr(re,pe)){var _i=bt(0,Yt.length-1);lt(en,en.text,Fn),vi&&re.remove(Dt.line,vi),_i.length&&re.insert(Dt.line,_i)}else if(Cn==en)if(Yt.length==1)lt(Cn,Cn.text.slice(0,Dt.ch)+Hn+Cn.text.slice(Ot.ch),Fn);else{var zi=bt(1,Yt.length-1);zi.push(new Xo(Hn+Cn.text.slice(Ot.ch),Fn,Oe)),lt(Cn,Cn.text.slice(0,Dt.ch)+Yt[0],He(0)),re.insert(Dt.line+1,zi)}else if(Yt.length==1)lt(Cn,Cn.text.slice(0,Dt.ch)+Yt[0]+en.text.slice(Ot.ch),He(0)),re.remove(Dt.line+1,vi);else{lt(Cn,Cn.text.slice(0,Dt.ch)+Yt[0],He(0)),lt(en,Hn+en.text.slice(Ot.ch),Fn);var ar=bt(1,Yt.length-1);vi>1&&re.remove(Dt.line+1,vi-1),re.insert(Dt.line+1,ar)}Ci(re,"change",re,pe)}function is(re,pe,De){function Oe(He,lt,bt){if(He.linked)for(var Dt=0;Dt<He.linked.length;++Dt){var Ot=He.linked[Dt];if(Ot.doc!=lt){var Yt=bt&&Ot.sharedHist;De&&!Yt||(pe(Ot.doc,Yt),Oe(Ot.doc,He,Yt))}}}Oe(re,null,!0)}function Ur(re,pe){if(pe.cm)throw new Error("This document is already in use.");re.doc=pe,pe.cm=re,Wr(re),Nr(re),Tr(re),re.options.lineWrapping||ko(re),re.options.mode=pe.modeOption,Ls(re)}function Tr(re){(re.doc.direction=="rtl"?Ct:ke)(re.display.lineDiv,"CodeMirror-rtl")}function $r(re){Lt(re,function(){Tr(re),Ls(re)})}function _r(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 co(re,pe){var De={from:An(pe.from),to:or(pe),text:wn(re,pe.from,pe.to)};return _s(re,De,pe.from.line,pe.to.line+1),is(re,function(Oe){return _s(Oe,De,pe.from.line,pe.to.line+1)},!0),De}function kr(re){for(;re.length;){var pe=Ut(re);if(pe.ranges)re.pop();else break}}function mo(re,pe){if(pe)return kr(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 Go(re,pe,De,Oe){var He=re.history;He.undone.length=0;var lt=+new Date,bt,Dt;if((He.lastOp==Oe||He.lastOrigin==pe.origin&&pe.origin&&(pe.origin.charAt(0)=="+"&&He.lastModTime>lt-(re.cm?re.cm.options.historyEventDelay:500)||pe.origin.charAt(0)=="*"))&&(bt=mo(He,He.lastOp==Oe)))Dt=Ut(bt.changes),rn(pe.from,pe.to)==0&&rn(pe.from,Dt.to)==0?Dt.to=or(pe):bt.changes.push(co(re,pe));else{var Ot=Ut(He.done);for((!Ot||!Ot.ranges)&&Ro(re.sel,He.done),bt={changes:[co(re,pe)],generation:He.generation},He.done.push(bt);He.done.length>He.undoDepth;)He.done.shift(),He.done[0].ranges||He.done.shift()}He.done.push(De),He.generation=++He.maxGeneration,He.lastModTime=He.lastSelTime=lt,He.lastOp=He.lastSelOp=Oe,He.lastOrigin=He.lastSelOrigin=pe.origin,Dt||hn(re,"historyAdded")}function Wo(re,pe,De,Oe){var He=pe.charAt(0);return He=="*"||He=="+"&&De.ranges.length==Oe.ranges.length&&De.somethingSelected()==Oe.somethingSelected()&&new Date-re.history.lastSelTime<=(re.cm?re.cm.options.historyEventDelay:500)}function Yr(re,pe,De,Oe){var He=re.history,lt=Oe&&Oe.origin;De==He.lastSelOp||lt&&He.lastSelOrigin==lt&&(He.lastModTime==He.lastSelTime&&He.lastOrigin==lt||Wo(re,lt,Ut(He.done),pe))?He.done[He.done.length-1]=pe:Ro(pe,He.done),He.lastSelTime=+new Date,He.lastSelOrigin=lt,He.lastSelOp=De,Oe&&Oe.clearRedo!==!1&&kr(He.undone)}function Ro(re,pe){var De=Ut(pe);De&&De.ranges&&De.equals(re)||pe.push(re)}function _s(re,pe,De,Oe){var He=pe["spans_"+re.id],lt=0;re.iter(Math.max(re.first,De),Math.min(re.first+re.size,Oe),function(bt){bt.markedSpans&&((He||(He=pe["spans_"+re.id]={}))[lt]=bt.markedSpans),++lt})}function Ao(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=[],He=0;He<pe.text.length;++He)Oe.push(Ao(De[He]));return Oe}function xs(re,pe){var De=Jo(re,pe),Oe=Qi(re,pe);if(!De)return Oe;if(!Oe)return De;for(var He=0;He<De.length;++He){var lt=De[He],bt=Oe[He];if(lt&&bt)e:for(var Dt=0;Dt<bt.length;++Dt){for(var Ot=bt[Dt],Yt=0;Yt<lt.length;++Yt)if(lt[Yt].marker==Ot.marker)continue e;lt.push(Ot)}else bt&&(De[He]=bt)}return De}function Xs(re,pe,De){for(var Oe=[],He=0;He<re.length;++He){var lt=re[He];if(lt.ranges){Oe.push(De?Xi.prototype.deepCopy.call(lt):lt);continue}var bt=lt.changes,Dt=[];Oe.push({changes:Dt});for(var Ot=0;Ot<bt.length;++Ot){var Yt=bt[Ot],Cn=void 0;if(Dt.push({from:Yt.from,to:Yt.to,text:Yt.text}),pe)for(var en in Yt)(Cn=en.match(/^spans_(\d+)$/))&&dt(pe,Number(Cn[1]))>-1&&(Ut(Dt)[en]=Yt[en],delete Yt[en])}}return Oe}function Cl(re,pe,De,Oe){if(Oe){var He=re.anchor;if(De){var lt=rn(pe,He)<0;lt!=rn(De,He)<0?(He=pe,pe=De):lt!=rn(pe,De)<0&&(pe=De)}return new Pi(He,pe)}else return new Pi(De||pe,pe)}function Qo(re,pe,De,Oe,He){He==null&&(He=re.cm&&(re.cm.display.shift||re.extend)),As(re,new Xi([Cl(re.sel.primary(),pe,De,He)],0),Oe)}function qo(re,pe,De){for(var Oe=[],He=re.cm&&(re.cm.display.shift||re.extend),lt=0;lt<re.sel.ranges.length;lt++)Oe[lt]=Cl(re.sel.ranges[lt],pe[lt],null,He);var bt=Ki(re.cm,Oe,re.sel.primIndex);As(re,bt,De)}function ws(re,pe,De,Oe){var He=re.sel.ranges.slice(0);He[pe]=De,As(re,Ki(re.cm,He,re.sel.primIndex),Oe)}function Ms(re,pe,De,Oe){As(re,vr(pe,De),Oe)}function fa(re,pe,De){var Oe={ranges:pe.ranges,update:function(He){this.ranges=[];for(var lt=0;lt<He.length;lt++)this.ranges[lt]=new Pi(Nn(re,He[lt].anchor),Nn(re,He[lt].head))},origin:De&&De.origin};return hn(re,"beforeSelectionChange",re,Oe),re.cm&&hn(re.cm,"beforeSelectionChange",re.cm,Oe),Oe.ranges!=pe.ranges?Ki(re.cm,Oe.ranges,Oe.ranges.length-1):pe}function Fo(re,pe,De){var Oe=re.history.done,He=Ut(Oe);He&&He.ranges?(Oe[Oe.length-1]=pe,Pa(re,pe,De)):As(re,pe,De)}function As(re,pe,De){Pa(re,pe,De),Yr(re,re.sel,re.cm?re.cm.curOp.id:NaN,De)}function Pa(re,pe,De){(Tn(re,"beforeSelectionChange")||re.cm&&Tn(re.cm,"beforeSelectionChange"))&&(pe=fa(re,pe,De));var Oe=De&&De.bias||(rn(pe.primary().head,re.sel.primary().head)<0?-1:1);Pl(re,Bl(re,pe,Oe,!0)),!(De&&De.scroll===!1)&&re.cm&&ic(re.cm)}function Pl(re,pe){pe.equals(re.sel)||(re.sel=pe,re.cm&&(re.cm.curOp.updateInput=1,re.cm.curOp.selectionChanged=!0,Wn(re.cm)),Ci(re,"cursorActivity",re))}function $l(re){Pl(re,Bl(re,re.sel,null,!1))}function Bl(re,pe,De,Oe){for(var He,lt=0;lt<pe.ranges.length;lt++){var bt=pe.ranges[lt],Dt=pe.ranges.length==re.sel.ranges.length&&re.sel.ranges[lt],Ot=hu(re,bt.anchor,Dt&&Dt.anchor,De,Oe),Yt=hu(re,bt.head,Dt&&Dt.head,De,Oe);(He||Ot!=bt.anchor||Yt!=bt.head)&&(He||(He=pe.ranges.slice(0,lt)),He[lt]=new Pi(Ot,Yt))}return He?Ki(re.cm,He,pe.primIndex):pe}function cu(re,pe,De,Oe,He){var lt=un(re,pe.line);if(lt.markedSpans)for(var bt=0;bt<lt.markedSpans.length;++bt){var Dt=lt.markedSpans[bt],Ot=Dt.marker,Yt="selectLeft"in Ot?!Ot.selectLeft:Ot.inclusiveLeft,Cn="selectRight"in Ot?!Ot.selectRight:Ot.inclusiveRight;if((Dt.from==null||(Yt?Dt.from<=pe.ch:Dt.from<pe.ch))&&(Dt.to==null||(Cn?Dt.to>=pe.ch:Dt.to>pe.ch))){if(He&&(hn(Ot,"beforeCursorEnter"),Ot.explicitlyCleared))if(lt.markedSpans){--bt;continue}else break;if(!Ot.atomic)continue;if(De){var en=Ot.find(Oe<0?1:-1),Hn=void 0;if((Oe<0?Cn:Yt)&&(en=Yl(re,en,-Oe,en&&en.line==pe.line?lt:null)),en&&en.line==pe.line&&(Hn=rn(en,De))&&(Oe<0?Hn<0:Hn>0))return cu(re,en,pe,Oe,He)}var Fn=Ot.find(Oe<0?-1:1);return(Oe<0?Yt:Cn)&&(Fn=Yl(re,Fn,Oe,Fn.line==pe.line?lt:null)),Fn?cu(re,Fn,pe,Oe,He):null}}return pe}function hu(re,pe,De,Oe,He){var lt=Oe||1,bt=cu(re,pe,De,lt,He)||!He&&cu(re,pe,De,lt,!0)||cu(re,pe,De,-lt,He)||!He&&cu(re,pe,De,-lt,!0);return bt||(re.cantEdit=!0,Zt(re.first,0))}function Yl(re,pe,De,Oe){return De<0&&pe.ch==0?pe.line>re.first?Nn(re,Zt(pe.line-1)):null:De>0&&pe.ch==(Oe||un(re,pe.line)).text.length?pe.line<re.first+re.size-1?Zt(pe.line+1,0):null:new Zt(pe.line,pe.ch+De)}function fs(re){re.setSelection(Zt(re.firstLine(),0),Zt(re.lastLine()),vt)}function Da(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(He,lt,bt,Dt){He&&(Oe.from=Nn(re,He)),lt&&(Oe.to=Nn(re,lt)),bt&&(Oe.text=bt),Dt!==void 0&&(Oe.origin=Dt)}),hn(re,"beforeChange",re,Oe),re.cm&&hn(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 ia(re,pe,De){if(re.cm){if(!re.cm.curOp)return vn(re.cm,ia)(re,pe,De);if(re.cm.state.suppressEdits)return}if(!((Tn(re,"beforeChange")||re.cm&&Tn(re.cm,"beforeChange"))&&(pe=Da(re,pe,!0),!pe))){var Oe=hr&&!De&&Mr(re,pe.from,pe.to);if(Oe)for(var He=Oe.length-1;He>=0;--He)Ns(re,{from:Oe[He].from,to:Oe[He].to,text:He?[""]:pe.text,origin:pe.origin});else Ns(re,pe)}}function Ns(re,pe){if(!(pe.text.length==1&&pe.text[0]==""&&rn(pe.from,pe.to)==0)){var De=Eo(re,pe);Go(re,pe,De,re.cm?re.cm.curOp.id:NaN),du(re,pe,De,Qi(re,pe));var Oe=[];is(re,function(He,lt){!lt&&dt(Oe,He.history)==-1&&(js(He.history,pe),Oe.push(He.history)),du(He,pe,null,Qi(He,pe))})}}function Xl(re,pe,De){var Oe=re.cm&&re.cm.state.suppressEdits;if(!(Oe&&!De)){for(var He=re.history,lt,bt=re.sel,Dt=pe=="undo"?He.done:He.undone,Ot=pe=="undo"?He.undone:He.done,Yt=0;Yt<Dt.length&&(lt=Dt[Yt],!(De?lt.ranges&&!lt.equals(re.sel):!lt.ranges));Yt++);if(Yt!=Dt.length){for(He.lastOrigin=He.lastSelOrigin=null;;)if(lt=Dt.pop(),lt.ranges){if(Ro(lt,Ot),De&&!lt.equals(re.sel)){As(re,lt,{clearRedo:!1});return}bt=lt}else if(Oe){Dt.push(lt);return}else break;var Cn=[];Ro(bt,Ot),Ot.push({changes:Cn,generation:He.generation}),He.generation=lt.generation||++He.maxGeneration;for(var en=Tn(re,"beforeChange")||re.cm&&Tn(re.cm,"beforeChange"),Hn=function(_i){var zi=lt.changes[_i];if(zi.origin=pe,en&&!Da(re,zi,!1))return Dt.length=0,{};Cn.push(co(re,zi));var ar=_i?Eo(re,zi):Ut(Dt);du(re,zi,ar,xs(re,zi)),!_i&&re.cm&&re.cm.scrollIntoView({from:zi.from,to:or(zi)});var Br=[];is(re,function(br,Gr){!Gr&&dt(Br,br.history)==-1&&(js(br.history,zi),Br.push(br.history)),du(br,zi,null,xs(br,zi))})},Fn=lt.changes.length-1;Fn>=0;--Fn){var vi=Hn(Fn);if(vi)return vi.v}}}}function _c(re,pe){if(pe!=0&&(re.first+=pe,re.sel=new Xi(Wt(re.sel.ranges,function(He){return new Pi(Zt(He.anchor.line+pe,He.anchor.ch),Zt(He.head.line+pe,He.head.ch))}),re.sel.primIndex),re.cm)){Ls(re.cm,re.first,re.first-pe,pe);for(var De=re.cm.display,Oe=De.viewFrom;Oe<De.viewTo;Oe++)bo(re.cm,Oe,"gutter")}}function du(re,pe,De,Oe){if(re.cm&&!re.cm.curOp)return vn(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 He=pe.text.length-1-(re.first-pe.from.line);_c(re,He),pe={from:Zt(re.first,0),to:Zt(pe.to.line+He,pe.to.ch),text:[Ut(pe.text)],origin:pe.origin}}var lt=re.lastLine();pe.to.line>lt&&(pe={from:pe.from,to:Zt(lt,un(re,lt).text.length),text:[pe.text[0]],origin:pe.origin}),pe.removed=wn(re,pe.from,pe.to),De||(De=Eo(re,pe)),re.cm?Zu(re.cm,pe,Oe):Vr(re,pe,Oe),Pa(re,De,vt),re.cantEdit&&hu(re,Zt(re.firstLine(),0))&&(re.cantEdit=!1)}}function Zu(re,pe,De){var Oe=re.doc,He=re.display,lt=pe.from,bt=pe.to,Dt=!1,Ot=lt.line;re.options.lineWrapping||(Ot=At(qi(un(Oe,lt.line))),Oe.iter(Ot,bt.line+1,function(Fn){if(Fn==He.maxLine)return Dt=!0,!0})),Oe.sel.contains(pe.from,pe.to)>-1&&Wn(re),Vr(Oe,pe,De,Ks(re)),re.options.lineWrapping||(Oe.iter(Ot,lt.line+pe.text.length,function(Fn){var vi=Lo(Fn);vi>He.maxLineLength&&(He.maxLine=Fn,He.maxLineLength=vi,He.maxLineChanged=!0,Dt=!1)}),Dt&&(re.curOp.updateMaxLine=!0)),Wi(Oe,lt.line),gn(re,400);var Yt=pe.text.length-(bt.line-lt.line)-1;pe.full?Ls(re):lt.line==bt.line&&pe.text.length==1&&!Dr(re.doc,pe)?bo(re,lt.line,"text"):Ls(re,lt.line,bt.line+1,Yt);var Cn=Tn(re,"changes"),en=Tn(re,"change");if(en||Cn){var Hn={from:lt,to:bt,text:pe.text,removed:pe.removed,origin:pe.origin};en&&Ci(re,"change",re,Hn),Cn&&(re.curOp.changeObjs||(re.curOp.changeObjs=[])).push(Hn)}re.display.selForContextMenu=null}function sc(re,pe,De,Oe,He){var lt;Oe||(Oe=De),rn(Oe,De)<0&&(lt=[Oe,De],De=lt[0],Oe=lt[1]),typeof pe=="string"&&(pe=re.splitLines(pe)),ia(re,{from:De,to:Oe,text:pe,origin:He})}function Fl(re,pe,De,Oe){De<re.line?re.line+=Oe:pe<re.line&&(re.line=pe,re.ch=0)}function ss(re,pe,De,Oe){for(var He=0;He<re.length;++He){var lt=re[He],bt=!0;if(lt.ranges){lt.copied||(lt=re[He]=lt.deepCopy(),lt.copied=!0);for(var Dt=0;Dt<lt.ranges.length;Dt++)Fl(lt.ranges[Dt].anchor,pe,De,Oe),Fl(lt.ranges[Dt].head,pe,De,Oe);continue}for(var Ot=0;Ot<lt.changes.length;++Ot){var Yt=lt.changes[Ot];if(De<Yt.from.line)Yt.from=Zt(Yt.from.line+Oe,Yt.from.ch),Yt.to=Zt(Yt.to.line+Oe,Yt.to.ch);else if(pe<=Yt.to.line){bt=!1;break}}bt||(re.splice(0,He+1),He=0)}}function js(re,pe){var De=pe.from.line,Oe=pe.to.line,He=pe.text.length-(Oe-De)-1;ss(re.done,De,Oe,He),ss(re.undone,De,Oe,He)}function va(re,pe,De,Oe){var He=pe,lt=pe;return typeof pe=="number"?lt=un(re,qn(re,pe)):He=At(pe),He==null?null:(Oe(lt,He)&&re.cm&&bo(re.cm,He,De),lt)}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 He=this.lines[De];this.height-=He.height,os(He),Ci(He,"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 rs(re){this.children=re;for(var pe=0,De=0,Oe=0;Oe<re.length;++Oe){var He=re[Oe];pe+=He.chunkSize(),De+=He.height,He.parent=this}this.size=pe,this.height=De,this.parent=null}rs.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],He=Oe.chunkSize();if(re<He){var lt=Math.min(pe,He-re),bt=Oe.height;if(Oe.removeInner(re,lt),this.height-=bt-Oe.height,He==lt&&(this.children.splice(De--,1),Oe.parent=null),(pe-=lt)==0)break;re=0}else re-=He}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 He=this.children[Oe],lt=He.chunkSize();if(re<=lt){if(He.insertInner(re,pe,De),He.lines&&He.lines.length>50){for(var bt=He.lines.length%25+25,Dt=bt;Dt<He.lines.length;){var Ot=new zs(He.lines.slice(Dt,Dt+=25));He.height-=Ot.height,this.children.splice(++Oe,0,Ot),Ot.parent=this}He.lines=He.lines.slice(0,bt),this.maybeSpill()}break}re-=lt}},maybeSpill:function(){if(!(this.children.length<=10)){var re=this;do{var pe=re.children.splice(re.children.length-5,5),De=new rs(pe);if(re.parent){re.size-=De.size,re.height-=De.height;var He=dt(re.parent.children,re);re.parent.children.splice(He+1,0,De)}else{var Oe=new rs(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 He=this.children[Oe],lt=He.chunkSize();if(re<lt){var bt=Math.min(pe,lt-re);if(He.iterN(re,bt,De))return!0;if((pe-=bt)==0)break;re=0}else re-=lt}}};var _a=function(re,pe,De){if(De)for(var Oe in De)De.hasOwnProperty(Oe)&&(this[Oe]=De[Oe]);this.doc=re,this.node=pe};_a.prototype.clear=function(){var re=this.doc.cm,pe=this.line.widgets,De=this.line,Oe=At(De);if(!(Oe==null||!pe)){for(var He=0;He<pe.length;++He)pe[He]==this&&pe.splice(He--,1);pe.length||(De.widgets=null);var lt=Oa(this);zn(De,Math.max(0,De.height-lt)),re&&(Lt(re,function(){_l(re,De,-lt),bo(re,Oe,"widget")}),Ci(re,"lineWidgetCleared",re,this,Oe))}},_a.prototype.changed=function(){var re=this,pe=this.height,De=this.doc.cm,Oe=this.line;this.height=null;var He=Oa(this)-pe;He&&(Xn(this.doc,Oe)||zn(Oe,Oe.height+He),De&&Lt(De,function(){De.curOp.forceUpdate=!0,_l(De,Oe,He),Ci(De,"lineWidgetChanged",De,re,At(Oe))}))},ci(_a);function _l(re,pe,De){no(pe)<(re.curOp&&re.curOp.scrollTop||re.doc.scrollTop)&&Ch(re,De)}function Nu(re,pe,De,Oe){var He=new _a(re,De,Oe),lt=re.cm;return lt&&He.noHScroll&&(lt.display.alignWidgets=!0),va(re,pe,"widget",function(bt){var Dt=bt.widgets||(bt.widgets=[]);if(He.insertAt==null?Dt.push(He):Dt.splice(Math.min(Dt.length-1,Math.max(0,He.insertAt)),0,He),He.line=bt,lt&&!Xn(re,bt)){var Ot=no(bt)<re.scrollTop;zn(bt,bt.height+Oa(He)),Ot&&Ch(lt,He.height),lt.curOp.forceUpdate=!0}return!0}),lt&&Ci(lt,"lineWidgetAdded",lt,He,typeof pe=="number"?pe:At(pe)),He}var mf=0,dn=function(re,pe){this.lines=[],this.type=pe,this.doc=re,this.id=++mf};dn.prototype.clear=function(){if(!this.explicitlyCleared){var re=this.doc.cm,pe=re&&!re.curOp;if(pe&&Aa(re),Tn(this,"clear")){var De=this.find();De&&Ci(this,"clear",De.from,De.to)}for(var Oe=null,He=null,lt=0;lt<this.lines.length;++lt){var bt=this.lines[lt],Dt=po(bt.markedSpans,this);re&&!this.collapsed?bo(re,At(bt),"text"):re&&(Dt.to!=null&&(He=At(bt)),Dt.from!=null&&(Oe=At(bt))),bt.markedSpans=Ar(bt.markedSpans,Dt),Dt.from==null&&this.collapsed&&!Xn(this.doc,bt)&&re&&zn(bt,Tu(re.display))}if(re&&this.collapsed&&!re.options.lineWrapping)for(var Ot=0;Ot<this.lines.length;++Ot){var Yt=qi(this.lines[Ot]),Cn=Lo(Yt);Cn>re.display.maxLineLength&&(re.display.maxLine=Yt,re.display.maxLineLength=Cn,re.display.maxLineChanged=!0)}Oe!=null&&re&&this.collapsed&&Ls(re,Oe,He+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,re&&$l(re.doc)),re&&Ci(re,"markerCleared",re,this,Oe,He),pe&&oc(re),this.parent&&this.parent.clear()}},dn.prototype.find=function(re,pe){re==null&&this.type=="bookmark"&&(re=1);for(var De,Oe,He=0;He<this.lines.length;++He){var lt=this.lines[He],bt=po(lt.markedSpans,this);if(bt.from!=null&&(De=Zt(pe?lt:At(lt),bt.from),re==-1))return De;if(bt.to!=null&&(Oe=Zt(pe?lt:At(lt),bt.to),re==1))return Oe}return De&&{from:De,to:Oe}},dn.prototype.changed=function(){var re=this,pe=this.find(-1,!0),De=this,Oe=this.doc.cm;!pe||!Oe||Lt(Oe,function(){var He=pe.line,lt=At(pe.line),bt=Gu(Oe,lt);if(bt&&(Ma(bt),Oe.curOp.selectionChanged=Oe.curOp.forceUpdate=!0),Oe.curOp.updateMaxLine=!0,!Xn(De.doc,He)&&De.height!=null){var Dt=De.height;De.height=null;var Ot=Oa(De)-Dt;Ot&&zn(He,He.height+Ot)}Ci(Oe,"markerChanged",Oe,re)})},dn.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)},dn.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)}},ci(dn);function Bc(re,pe,De,Oe,He){if(Oe&&Oe.shared)return vf(re,pe,De,Oe,He);if(re.cm&&!re.cm.curOp)return vn(re.cm,Bc)(re,pe,De,Oe,He);var lt=new dn(re,He),bt=rn(pe,De);if(Oe&&Ft(Oe,lt,!1),bt>0||bt==0&<.clearWhenEmpty!==!1)return lt;if(lt.replacedWith&&(lt.collapsed=!0,lt.widgetNode=Qe("span",[lt.replacedWith],"CodeMirror-widget"),Oe.handleMouseEvents||lt.widgetNode.setAttribute("cm-ignore-events","true"),Oe.insertLeft&&(lt.widgetNode.insertLeft=!0)),lt.collapsed){if(yr(re,pe.line,pe,De,lt)||pe.line!=De.line&&yr(re,De.line,pe,De,lt))throw new Error("Inserting collapsed marker partially overlapping an existing one");On()}lt.addToHistory&&Go(re,{from:pe,to:De,origin:"markText"},re.sel,NaN);var Dt=pe.line,Ot=re.cm,Yt;if(re.iter(Dt,De.line+1,function(en){Ot&<.collapsed&&!Ot.options.lineWrapping&&qi(en)==Ot.display.maxLine&&(Yt=!0),lt.collapsed&&Dt!=pe.line&&zn(en,0),To(en,new wr(lt,Dt==pe.line?pe.ch:null,Dt==De.line?De.ch:null)),++Dt}),lt.collapsed&&re.iter(pe.line,De.line+1,function(en){Xn(re,en)&&zn(en,0)}),lt.clearOnEnter&&Jt(lt,"beforeCursorEnter",function(){return lt.clear()}),lt.readOnly&&(zr(),(re.history.done.length||re.history.undone.length)&&re.clearHistory()),lt.collapsed&&(lt.id=++mf,lt.atomic=!0),Ot){if(Yt&&(Ot.curOp.updateMaxLine=!0),lt.collapsed)Ls(Ot,pe.line,De.line+1);else if(lt.className||lt.startStyle||lt.endStyle||lt.css||lt.attributes||lt.title)for(var Cn=pe.line;Cn<=De.line;Cn++)bo(Ot,Cn,"text");lt.atomic&&$l(Ot.doc),Ci(Ot,"markerAdded",Ot,lt)}return lt}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();Ci(this,"clear")}},ac.prototype.find=function(re,pe){return this.primary.find(re,pe)},ci(ac);function vf(re,pe,De,Oe,He){Oe=Ft(Oe),Oe.shared=!1;var lt=[Bc(re,pe,De,Oe,He)],bt=lt[0],Dt=Oe.widgetNode;return is(re,function(Ot){Dt&&(Oe.widgetNode=Dt.cloneNode(!0)),lt.push(Bc(Ot,Nn(Ot,pe),Nn(Ot,De),Oe,He));for(var Yt=0;Yt<Ot.linked.length;++Yt)if(Ot.linked[Yt].isParent)return;bt=Ut(lt)}),new ac(lt,bt)}function Ph(re){return re.findMarks(Zt(re.first,0),re.clipPos(Zt(re.lastLine())),function(pe){return pe.parent})}function oh(re,pe){for(var De=0;De<pe.length;De++){var Oe=pe[De],He=Oe.find(),lt=re.clipPos(He.from),bt=re.clipPos(He.to);if(rn(lt,bt)){var Dt=Bc(re,lt,bt,Oe.primary,Oe.primary.type);Oe.markers.push(Dt),Dt.parent=Oe}}}function Rd(re){for(var pe=function(Oe){var He=re[Oe],lt=[He.primary.doc];is(He.primary.doc,function(Ot){return lt.push(Ot)});for(var bt=0;bt<He.markers.length;bt++){var Dt=He.markers[bt];dt(lt,Dt.doc)==-1&&(Dt.parent=null,He.markers.splice(bt--,1))}},De=0;De<re.length;De++)pe(De)}var Kp=0,Ra=function(re,pe,De,Oe,He){if(!(this instanceof Ra))return new Ra(re,pe,De,Oe,He);De==null&&(De=0),rs.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 lt=Zt(De,0);this.sel=vr(lt),this.history=new _r(null),this.id=++Kp,this.modeOption=pe,this.lineSep=Oe,this.direction=He=="rtl"?"rtl":"ltr",this.extend=!1,typeof re=="string"&&(re=this.splitLines(re)),Vr(this,{from:lt,to:lt,text:re}),As(this,vr(lt),vt)};Ra.prototype=ze(rs.prototype,{constructor:Ra,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=Bn(this,this.first,this.first+this.size);return re===!1?pe:pe.join(re||this.lineSeparator())},setValue:sn(function(re){var pe=Zt(this.first,0),De=this.first+this.size-1;ia(this,{from:pe,to:Zt(De,un(this,De).text.length),text:this.splitLines(re),origin:"setValue",full:!0},!0),this.cm&&io(this.cm,0,0),As(this,vr(pe),vt)}),replaceRange:function(re,pe,De,Oe){pe=Nn(this,pe),De=De?Nn(this,De):pe,sc(this,re,pe,De,Oe)},getRange:function(re,pe,De){var Oe=wn(this,Nn(this,re),Nn(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(Sn(this,re))return un(this,re)},getLineNumber:function(re){return At(re)},getLineHandleVisualStart:function(re){return typeof re=="number"&&(re=un(this,re)),qi(re)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(re){return Nn(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){Ms(this,Nn(this,typeof re=="number"?Zt(re,pe||0):re),null,De)}),setSelection:sn(function(re,pe,De){Ms(this,Nn(this,re),Nn(this,pe||re),De)}),extendSelection:sn(function(re,pe,De){Qo(this,Nn(this,re),pe&&Nn(this,pe),De)}),extendSelections:sn(function(re,pe){qo(this,Li(this,re),pe)}),extendSelectionsBy:sn(function(re,pe){var De=Wt(this.sel.ranges,re);qo(this,Li(this,De),pe)}),setSelections:sn(function(re,pe,De){if(re.length){for(var Oe=[],He=0;He<re.length;He++)Oe[He]=new Pi(Nn(this,re[He].anchor),Nn(this,re[He].head));pe==null&&(pe=Math.min(re.length-1,this.sel.primIndex)),As(this,Ki(this.cm,Oe,pe),De)}}),addSelection:sn(function(re,pe,De){var Oe=this.sel.ranges.slice(0);Oe.push(new Pi(Nn(this,re),Nn(this,pe||re))),As(this,Ki(this.cm,Oe,Oe.length-1),De)}),getSelection:function(re){for(var pe=this.sel.ranges,De,Oe=0;Oe<pe.length;Oe++){var He=wn(this,pe[Oe].from(),pe[Oe].to());De=De?De.concat(He):He}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 He=wn(this,De[Oe].from(),De[Oe].to());re!==!1&&(He=He.join(re||this.lineSeparator())),pe[Oe]=He}return pe},replaceSelection:function(re,pe,De){for(var Oe=[],He=0;He<this.sel.ranges.length;He++)Oe[He]=re;this.replaceSelections(Oe,pe,De||"+input")},replaceSelections:sn(function(re,pe,De){for(var Oe=[],He=this.sel,lt=0;lt<He.ranges.length;lt++){var bt=He.ranges[lt];Oe[lt]={from:bt.from(),to:bt.to(),text:this.splitLines(re[lt]),origin:De}}for(var Dt=pe&&pe!="end"&&uo(this,Oe,pe),Ot=Oe.length-1;Ot>=0;Ot--)ia(this,Oe[Ot]);Dt?Fo(this,Dt):this.cm&&ic(this.cm)}),undo:sn(function(){Xl(this,"undo")}),redo:sn(function(){Xl(this,"redo")}),undoSelection:sn(function(){Xl(this,"undo",!0)}),redoSelection:sn(function(){Xl(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 He=0;He<re.undone.length;He++)re.undone[He].ranges||++De;return{undo:pe,redo:De}},clearHistory:function(){var re=this;this.history=new _r(this.history.maxGeneration),is(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:Xs(this.history.done),undone:Xs(this.history.undone)}},setHistory:function(re){var pe=this.history=new _r(this.history.maxGeneration);pe.done=Xs(re.done.slice(0),null,!0),pe.undone=Xs(re.undone.slice(0),null,!0)},setGutterMarker:sn(function(re,pe,De){return va(this,re,"gutter",function(Oe){var He=Oe.gutterMarkers||(Oe.gutterMarkers={});return He[pe]=De,!De&&Ue(He)&&(Oe.gutterMarkers=null),!0})}),clearGutter:sn(function(re){var pe=this;this.iter(function(De){De.gutterMarkers&&De.gutterMarkers[re]&&va(pe,De,"gutter",function(){return De.gutterMarkers[re]=null,Ue(De.gutterMarkers)&&(De.gutterMarkers=null),!0})})}),lineInfo:function(re){var pe;if(typeof re=="number"){if(!Sn(this,re)||(pe=re,re=un(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 va(this,re,pe=="gutter"?"gutter":"class",function(Oe){var He=pe=="text"?"textClass":pe=="background"?"bgClass":pe=="gutter"?"gutterClass":"wrapClass";if(!Oe[He])Oe[He]=De;else{if(Ce(De).test(Oe[He]))return!1;Oe[He]+=" "+De}return!0})}),removeLineClass:sn(function(re,pe,De){return va(this,re,pe=="gutter"?"gutter":"class",function(Oe){var He=pe=="text"?"textClass":pe=="background"?"bgClass":pe=="gutter"?"gutterClass":"wrapClass",lt=Oe[He];if(lt)if(De==null)Oe[He]=null;else{var bt=lt.match(Ce(De));if(!bt)return!1;var Dt=bt.index+bt[0].length;Oe[He]=lt.slice(0,bt.index)+(!bt.index||Dt==lt.length?"":" ")+lt.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,Nn(this,re),Nn(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=Nn(this,re),Bc(this,re,re,De,"bookmark")},findMarksAt:function(re){re=Nn(this,re);var pe=[],De=un(this,re.line).markedSpans;if(De)for(var Oe=0;Oe<De.length;++Oe){var He=De[Oe];(He.from==null||He.from<=re.ch)&&(He.to==null||He.to>=re.ch)&&pe.push(He.marker.parent||He.marker)}return pe},findMarks:function(re,pe,De){re=Nn(this,re),pe=Nn(this,pe);var Oe=[],He=re.line;return this.iter(re.line,pe.line+1,function(lt){var bt=lt.markedSpans;if(bt)for(var Dt=0;Dt<bt.length;Dt++){var Ot=bt[Dt];!(Ot.to!=null&&He==re.line&&re.ch>=Ot.to||Ot.from==null&&He!=re.line||Ot.from!=null&&He==pe.line&&Ot.from>=pe.ch)&&(!De||De(Ot.marker))&&Oe.push(Ot.marker.parent||Ot.marker)}++He}),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(He){var lt=He.text.length+Oe;if(lt>re)return pe=re,!0;re-=lt,++De}),Nn(this,Zt(De,pe))},indexFromPos:function(re){re=Nn(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 Ra(Bn(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 Ra(Bn(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];is(re,function(He){return Oe.push(He.id)},!0),re.history=new _r(null),re.history.done=Xs(this.history.done,Oe),re.history.undone=Xs(this.history.undone,Oe)}},iterLinkedDocs:function(re){is(this,re)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(re){return this.lineSep?re.split(this.lineSep):Hi(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&&$r(this.cm))})}),Ra.prototype.eachLine=Ra.prototype.iter;var nd=0;function Bd(re){var pe=this;if(Yf(pe),!(En(pe,re)||Ua(pe.display,re))){ri(re),be&&(nd=+new Date);var De=Ia(pe,re,!0),Oe=re.dataTransfer.files;if(!(!De||pe.isReadOnly()))if(Oe&&Oe.length&&window.FileReader&&window.File)for(var He=Oe.length,lt=Array(He),bt=0,Dt=function(){++bt==He&&vn(pe,function(){De=Nn(pe.doc,De);var Fn={from:De,to:De,text:pe.doc.splitLines(lt.filter(function(vi){return vi!=null}).join(pe.doc.lineSeparator())),origin:"paste"};ia(pe.doc,Fn),Fo(pe.doc,vr(Nn(pe.doc,De),Nn(pe.doc,or(Fn))))})()},Ot=function(Fn,vi){if(pe.options.allowDropFileTypes&&dt(pe.options.allowDropFileTypes,Fn.type)==-1){Dt();return}var _i=new FileReader;_i.onerror=function(){return Dt()},_i.onload=function(){var zi=_i.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(zi)){Dt();return}lt[vi]=zi,Dt()},_i.readAsText(Fn)},Yt=0;Yt<Oe.length;Yt++)Ot(Oe[Yt],Yt);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 Cn=re.dataTransfer.getData("Text");if(Cn){var en;if(pe.state.draggingText&&!pe.state.draggingText.copy&&(en=pe.listSelections()),Pa(pe.doc,vr(De,De)),en)for(var Hn=0;Hn<en.length;++Hn)sc(pe.doc,"",en[Hn].anchor,en[Hn].head,"drag");pe.replaceSelection(Cn,"around","paste"),pe.display.input.focus()}}catch(Fn){}}}}function id(re,pe){if(be&&(!re.state.draggingText||+new Date-nd<100)){nr(pe);return}if(!(En(re,pe)||Ua(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=Ia(re,pe);if(De){var Oe=document.createDocumentFragment();Ho(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 He=pe[Oe].CodeMirror;He&&De.push(He)}De.length&&De[0].operation(function(){for(var lt=0;lt<De.length;lt++)re(De[lt])})}}var Fd=!1;function Jl(){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 El={};El.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"},El.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"},El.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"},El.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"]},El.default=oe?El.macDefault:El.pcDefault;function jd(re){var pe=re.split(/-(?!$)/);re=pe[pe.length-1];for(var De,Oe,He,lt,bt=0;bt<pe.length-1;bt++){var Dt=pe[bt];if(/^(cmd|meta|m)$/i.test(Dt))lt=!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))He=!0;else throw new Error("Unrecognized modifier name: "+Dt)}return De&&(re="Alt-"+re),Oe&&(re="Ctrl-"+re),lt&&(re="Cmd-"+re),He&&(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 He=Wt(De.split(" "),jd),lt=0;lt<He.length;lt++){var bt=void 0,Dt=void 0;lt==He.length-1?(Dt=He.join(" "),bt=Oe):(Dt=He.slice(0,lt+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 Yt in pe)re[Yt]=pe[Yt];return re}function Ql(re,pe,De,Oe){pe=jc(pe);var He=pe.call?pe.call(re,Oe):pe[re];if(He===!1)return"nothing";if(He==="...")return"multi";if(He!=null&&De(He))return"handled";if(pe.fallthrough){if(Object.prototype.toString.call(pe.fallthrough)!="[object Array]")return Ql(re,pe.fallthrough,De,Oe);for(var lt=0;lt<pe.fallthrough.length;lt++){var bt=Ql(re,pe.fallthrough[lt],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"?El[re]:re}function fl(re,pe){for(var De=re.doc.sel.ranges,Oe=[],He=0;He<De.length;He++){for(var lt=pe(De[He]);Oe.length&&rn(lt.from,Ut(Oe).to)<=0;){var bt=Oe.pop();if(rn(bt.from,lt.from)<0){lt.from=bt.from;break}}Oe.push(lt)}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 ya(re,pe,De){var Oe=Gd(re,pe.ch,De);return Oe==null?null:new Zt(pe.line,Oe,De<0?"after":"before")}function hs(re,pe,De,Oe,He){if(re){pe.doc.direction=="rtl"&&(He=-He);var lt=tn(De,pe.doc.direction);if(lt){var bt=He<0?Ut(lt):lt[0],Dt=He<0==(bt.level==1),Ot=Dt?"after":"before",Yt;if(bt.level>0||pe.doc.direction=="rtl"){var Cn=Lu(pe,De);Yt=He<0?De.text.length-1:0;var en=wl(pe,Cn,Yt).top;Yt=Ge(function(Hn){return wl(pe,Cn,Hn).top==en},He<0==(bt.level==1)?bt.from:bt.to-1,Yt),Ot=="before"&&(Yt=Gd(De,Yt,1))}else Yt=He<0?bt.to:bt.from;return new Zt(Oe,Yt,Ot)}}return new Zt(Oe,He<0?De.text.length:0,He<0?"before":"after")}function $s(re,pe,De,Oe){var He=tn(pe,re.doc.direction);if(!He)return ya(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 lt=at(He,De.ch,De.sticky),bt=He[lt];if(re.doc.direction=="ltr"&&bt.level%2==0&&(Oe>0?bt.to>De.ch:bt.from<De.ch))return ya(pe,De,Oe);var Dt=function(ar,Br){return Gd(pe,ar instanceof Zt?ar.ch:ar,Br)},Ot,Yt=function(ar){return re.options.lineWrapping?(Ot=Ot||Lu(re,pe),bc(re,pe,Ot,ar)):{begin:0,end:pe.text.length}},Cn=Yt(De.sticky=="before"?Dt(De,-1):De.ch);if(re.doc.direction=="rtl"||bt.level==1){var en=bt.level==1==Oe<0,Hn=Dt(De,en?1:-1);if(Hn!=null&&(en?Hn<=bt.to&&Hn<=Cn.end:Hn>=bt.from&&Hn>=Cn.begin)){var Fn=en?"before":"after";return new Zt(De.line,Hn,Fn)}}var vi=function(ar,Br,br){for(var Gr=function(aa,$a){return $a?new Zt(De.line,Dt(aa,1),"before"):new Zt(De.line,aa,"after")};ar>=0&&ar<He.length;ar+=Br){var Co=He[ar],xr=Br>0==(Co.level!=1),jo=xr?br.begin:Dt(br.end,-1);if(Co.from<=jo&&jo<Co.to||(jo=xr?Co.from:Dt(Co.to,-1),br.begin<=jo&&jo<br.end))return Gr(jo,xr)}},_i=vi(lt+Oe,Oe,Cn);if(_i)return _i;var zi=Oe>0?Cn.end:Dt(Cn.begin,-1);return zi!=null&&!(Oe>0&&zi==pe.text.length)&&(_i=vi(Oe>0?0:He.length-1,Oe,Yt(zi)),_i)?_i:null}var Ka={selectAll:fs,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=un(re.doc,pe.head.line).text.length;return pe.head.ch==De&&pe.head.line<re.lastLine()?{from:pe.head,to:Zt(pe.head.line+1,0)}:{from:pe.head,to:Zt(pe.head.line,De)}}else return{from:pe.from(),to:pe.to()}})},deleteLine:function(re){return fl(re,function(pe){return{from:Zt(pe.from().line,0),to:Nn(re.doc,Zt(pe.to().line+1,0))}})},delLineLeft:function(re){return fl(re,function(pe){return{from:Zt(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(Zt(re.firstLine(),0))},goDocEnd:function(re){return re.extendSelection(Zt(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,He=0;He<De.length;He++){var lt=De[He].from(),bt=ht(re.getLine(lt.line),lt.ch,Oe);pe.push(yn(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 He=pe[Oe].head,lt=un(re.doc,He.line).text;if(lt){if(He.ch==lt.length&&(He=new Zt(He.line,He.ch-1)),He.ch>0)He=new Zt(He.line,He.ch+1),re.replaceRange(lt.charAt(He.ch-1)+lt.charAt(He.ch-2),Zt(He.line,He.ch-2),He,"+transpose");else if(He.line>re.doc.first){var bt=un(re.doc,He.line-1).text;bt&&(He=new Zt(He.line,1),re.replaceRange(lt.charAt(0)+re.doc.lineSeparator()+bt.charAt(bt.length-1),Zt(He.line-1,bt.length-1),He,"+transpose"))}}De.push(new Pi(He,He))}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=un(re.doc,pe),Oe=qi(De);return Oe!=De&&(pe=At(Oe)),hs(!0,re,Oe,pe,1)}function pu(re,pe){var De=un(re.doc,pe),Oe=Qr(De);return Oe!=De&&(pe=At(Oe)),hs(!0,re,De,pe,-1)}function Wd(re,pe){var De=fu(re,pe.line),Oe=un(re.doc,De.line),He=tn(Oe,re.doc.direction);if(!He||He[0].level==0){var lt=Math.max(De.ch,Oe.text.search(/\S/)),bt=pe.line==De.line&&pe.ch<=lt&&pe.ch;return Zt(De.line,bt?0:lt,De.sticky)}return De}function zc(re,pe,De){if(typeof pe=="string"&&(pe=Ka[pe],!pe))return!1;re.display.input.ensurePolled();var Oe=re.display.shift,He=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),De&&(re.display.shift=!1),He=pe(re)!=Et}finally{re.display.shift=Oe,re.state.suppressEdits=!1}return He}function rd(re,pe,De){for(var Oe=0;Oe<re.state.keyMaps.length;Oe++){var He=Ql(pe,re.state.keyMaps[Oe],De,re);if(He)return He}return re.options.extraKeys&&Ql(pe,re.options.extraKeys,De,re)||Ql(pe,re.options.keyMap,De,re)}var Ou=new rt;function Ec(re,pe,De,Oe){var He=re.state.keySeq;if(He){if(Lh(pe))return"handled";if(/\'$/.test(pe)?re.state.keySeq=null:Ou.set(50,function(){re.state.keySeq==He&&(re.state.keySeq=null,re.display.input.reset())}),Xf(re,He+" "+pe,De,Oe))return!0}return Xf(re,pe,De,Oe)}function Xf(re,pe,De,Oe){var He=rd(re,pe,Oe);return He=="multi"&&(re.state.keySeq=pe),He=="handled"&&Ci(re,"keyHandled",re,pe,De),(He=="handled"||He=="multi")&&(ri(De),vs(re)),!!He}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(),!En(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),En(this,re)}function Lc(re){var pe=this;if(!(re.target&&re.target!=pe.display.input.getField())&&!(Ua(pe.display,re)||En(pe,re)||re.ctrlKey&&!re.altKey||oe&&re.metaKey)){var De=re.keyCode,Oe=re.charCode;if(ge&&De==od){od=null,ri(re);return}if(!(ge&&(!re.which||re.which<10)&&Jf(pe,re))){var He=String.fromCharCode(Oe==null?De:Oe);He!="\b"&&(Qf(pe,re,He)||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&&rn(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(!(En(pe,re)||De.activeTouch&&De.input.supportsTouch())){if(De.input.ensurePolled(),De.shift=re.shiftKey,Ua(De,re)){he||(De.scroller.draggable=!1,setTimeout(function(){return De.scroller.draggable=!0},100));return}if(!tp(pe,re)){var Oe=Ia(pe,re),He=gr(re),lt=Oe?Jp(Oe,He):"single";window.focus(),He==1&&pe.state.selectingText&&pe.state.selectingText(re),!(Oe&&Qp(pe,He,Oe,lt,re))&&(He==1?Oe?sm(pe,Oe,lt,re):Ji(re)==De.scroller&&ri(re):He==2?(Oe&&Qo(pe.doc,Oe),setTimeout(function(){return De.input.focus()},20)):He==3&&(we?pe.display.input.onContextMenu(re):Bs(pe)))}}}function Qp(re,pe,De,Oe,He){var lt="Click";return Oe=="double"?lt="Double"+lt:Oe=="triple"&&(lt="Triple"+lt),lt=(pe==1?"Left":pe==2?"Middle":"Right")+lt,Ec(re,Hd(lt,He),He,function(bt){if(typeof bt=="string"&&(bt=Ka[bt]),!bt)return!1;var Dt=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Dt=bt(re,De)!=Et}finally{re.state.suppressEdits=!1}return Dt})}function qf(re,pe,De){var Oe=re.getOption("configureMouse"),He=Oe?Oe(re,pe,De):{};if(He.unit==null){var lt=ie?De.shiftKey&&De.metaKey:De.altKey;He.unit=lt?"rectangle":pe=="single"?"char":pe=="double"?"word":"line"}return(He.extend==null||re.doc.extend)&&(He.extend=re.doc.extend||De.shiftKey),He.addNew==null&&(He.addNew=oe?De.metaKey:De.ctrlKey),He.moveOnDrag==null&&(He.moveOnDrag=!(oe?De.altKey:De.ctrlKey)),He}function sm(re,pe,De,Oe){be?setTimeout(ut(cs,re),0):re.curOp.focus=ct();var He=qf(re,De,Oe),lt=re.doc.sel,bt;re.options.dragDrop&&cr&&!re.isReadOnly()&&De=="single"&&(bt=lt.contains(pe))>-1&&(rn((bt=lt.ranges[bt]).from(),pe)<0||pe.xRel>0)&&(rn(bt.to(),pe)>0||pe.xRel<0)?qp(re,Oe,pe,He):nv(re,Oe,pe,He)}function qp(re,pe,De,Oe){var He=re.display,lt=!1,bt=vn(re,function(Yt){he&&(He.scroller.draggable=!1),re.state.draggingText=!1,Mn(He.wrapper.ownerDocument,"mouseup",bt),Mn(He.wrapper.ownerDocument,"mousemove",Dt),Mn(He.scroller,"dragstart",Ot),Mn(He.scroller,"drop",bt),lt||(ri(Yt),Oe.addNew||Qo(re.doc,De,null,null,Oe.extend),he&&!ce||be&&Pe==9?setTimeout(function(){He.wrapper.ownerDocument.body.focus({preventScroll:!0}),He.input.focus()},20):He.input.focus())}),Dt=function(Yt){lt=lt||Math.abs(pe.clientX-Yt.clientX)+Math.abs(pe.clientY-Yt.clientY)>=10},Ot=function(){return lt=!0};he&&(He.scroller.draggable=!0),re.state.draggingText=bt,bt.copy=!Oe.moveOnDrag,He.scroller.dragDrop&&He.scroller.dragDrop(),Jt(He.wrapper.ownerDocument,"mouseup",bt),Jt(He.wrapper.ownerDocument,"mousemove",Dt),Jt(He.scroller,"dragstart",Ot),Jt(He.scroller,"drop",bt),Bs(re),setTimeout(function(){return He.input.focus()},20)}function eg(re,pe,De){if(De=="char")return new Pi(pe,pe);if(De=="word")return re.findWordAt(pe);if(De=="line")return new Pi(Zt(pe.line,0),Nn(re.doc,Zt(pe.line+1,0)));var Oe=De(re,pe);return new Pi(Oe.from,Oe.to)}function nv(re,pe,De,Oe){var He=re.display,lt=re.doc;ri(pe);var bt,Dt,Ot=lt.sel,Yt=Ot.ranges;if(Oe.addNew&&!Oe.extend?(Dt=lt.sel.contains(De),Dt>-1?bt=Yt[Dt]:bt=new Pi(De,De)):(bt=lt.sel.primary(),Dt=lt.sel.primIndex),Oe.unit=="rectangle")Oe.addNew||(bt=new Pi(De,De)),De=Ia(re,pe,!0,!0),Dt=-1;else{var Cn=eg(re,De,Oe.unit);Oe.extend?bt=Cl(bt,Cn.anchor,Cn.head,Oe.extend):bt=Cn}Oe.addNew?Dt==-1?(Dt=Yt.length,As(lt,Ki(re,Yt.concat([bt]),Dt),{scroll:!1,origin:"*mouse"})):Yt.length>1&&Yt[Dt].empty()&&Oe.unit=="char"&&!Oe.extend?(As(lt,Ki(re,Yt.slice(0,Dt).concat(Yt.slice(Dt+1)),0),{scroll:!1,origin:"*mouse"}),Ot=lt.sel):ws(lt,Dt,bt,Bt):(Dt=0,As(lt,new Xi([bt],0),Bt),Ot=lt.sel);var en=De;function Hn(br){if(rn(en,br)!=0)if(en=br,Oe.unit=="rectangle"){for(var Gr=[],Co=re.options.tabSize,xr=ht(un(lt,De.line).text,De.ch,Co),jo=ht(un(lt,br.line).text,br.ch,Co),aa=Math.min(xr,jo),$a=Math.max(xr,jo),pa=Math.min(De.line,br.line),eu=Math.min(re.lastLine(),Math.max(De.line,br.line));pa<=eu;pa++){var Ll=un(lt,pa).text,Fa=ln(Ll,aa,Co);aa==$a?Gr.push(new Pi(Zt(pa,Fa),Zt(pa,Fa))):Ll.length>Fa&&Gr.push(new Pi(Zt(pa,Fa),Zt(pa,ln(Ll,$a,Co))))}Gr.length||Gr.push(new Pi(De,De)),As(lt,Ki(re,Ot.ranges.slice(0,Dt).concat(Gr),Dt),{origin:"*mouse",scroll:!1}),re.scrollIntoView(br)}else{var gu=bt,pl=eg(re,br,Oe.unit),ja=gu.anchor,bs;rn(pl.anchor,ja)>0?(bs=pl.head,ja=Un(gu.from(),pl.anchor)):(bs=pl.anchor,ja=Qn(gu.to(),pl.head));var Sa=Ot.ranges.slice(0);Sa[Dt]=am(re,new Pi(Nn(lt,ja),bs)),As(lt,Ki(re,Sa,Dt),Bt)}}var Fn=He.wrapper.getBoundingClientRect(),vi=0;function _i(br){var Gr=++vi,Co=Ia(re,br,!0,Oe.unit=="rectangle");if(Co)if(rn(Co,en)!=0){re.curOp.focus=ct(),Hn(Co);var xr=Uo(He,lt);(Co.line>=xr.to||Co.line<xr.from)&&setTimeout(vn(re,function(){vi==Gr&&_i(br)}),150)}else{var jo=br.clientY<Fn.top?-20:br.clientY>Fn.bottom?20:0;jo&&setTimeout(vn(re,function(){vi==Gr&&(He.scroller.scrollTop+=jo,_i(br))}),50)}}function zi(br){re.state.selectingText=!1,vi=1/0,br&&(ri(br),He.input.focus()),Mn(He.wrapper.ownerDocument,"mousemove",ar),Mn(He.wrapper.ownerDocument,"mouseup",Br),lt.history.lastSelOrigin=null}var ar=vn(re,function(br){br.buttons===0||!gr(br)?zi(br):_i(br)}),Br=vn(re,zi);re.state.selectingText=Br,Jt(He.wrapper.ownerDocument,"mousemove",ar),Jt(He.wrapper.ownerDocument,"mouseup",Br)}function am(re,pe){var De=pe.anchor,Oe=pe.head,He=un(re.doc,De.line);if(rn(De,Oe)==0&&De.sticky==Oe.sticky)return pe;var lt=tn(He);if(!lt)return pe;var bt=at(lt,De.ch,De.sticky),Dt=lt[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==lt.length)return pe;var Yt;if(Oe.line!=De.line)Yt=(Oe.line-De.line)*(re.doc.direction=="ltr"?1:-1)>0;else{var Cn=at(lt,Oe.ch,Oe.sticky),en=Cn-bt||(Oe.ch-De.ch)*(Dt.level==1?-1:1);Cn==Ot-1||Cn==Ot?Yt=en<0:Yt=en>0}var Hn=lt[Ot+(Yt?-1:0)],Fn=Yt==(Hn.level==1),vi=Fn?Hn.from:Hn.to,_i=Fn?"after":"before";return De.ch==vi&&De.sticky==_i?pe:new Pi(new Zt(De.line,vi,_i),Oe)}function ep(re,pe,De,Oe){var He,lt;if(pe.touches)He=pe.touches[0].clientX,lt=pe.touches[0].clientY;else try{He=pe.clientX,lt=pe.clientY}catch(Hn){return!1}if(He>=Math.floor(re.display.gutters.getBoundingClientRect().right))return!1;Oe&&ri(pe);var bt=re.display,Dt=bt.lineDiv.getBoundingClientRect();if(lt>Dt.bottom||!Tn(re,De))return bi(pe);lt-=Dt.top-bt.viewOffset;for(var Ot=0;Ot<re.display.gutterSpecs.length;++Ot){var Yt=bt.gutters.childNodes[Ot];if(Yt&&Yt.getBoundingClientRect().right>=He){var Cn=Kt(re.doc,lt),en=re.display.gutterSpecs[Ot];return hn(re,De,re,Cn,en.className,pe),bi(pe)}}}function tp(re,pe){return ep(re,pe,"gutterClick",!0)}function np(re,pe){Ua(re.display,pe)||lm(re,pe)||En(re,pe,"contextmenu")||we||re.display.input.onContextMenu(pe)}function lm(re,pe){return Tn(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,He,lt,bt){re.defaults[Oe]=He,lt&&(pe[Oe]=bt?function(Dt,Ot,Yt){Yt!=Mh&<(Dt,Ot,Yt)}:lt)}re.defineOption=De,re.Init=Mh,De("value","",function(Oe,He){return Oe.setValue(He)},!0),De("mode",null,function(Oe,He){Oe.doc.modeOption=He,Nr(Oe)},!0),De("indentUnit",2,Nr,!0),De("indentWithTabs",!1),De("smartIndent",!0),De("tabSize",4,function(Oe){Io(Oe),Ds(Oe),Ls(Oe)},!0),De("lineSeparator",null,function(Oe,He){if(Oe.doc.lineSep=He,!!He){var lt=[],bt=Oe.doc.first;Oe.doc.iter(function(Ot){for(var Yt=0;;){var Cn=Ot.text.indexOf(He,Yt);if(Cn==-1)break;Yt=Cn+He.length,lt.push(Zt(bt,Cn))}bt++});for(var Dt=lt.length-1;Dt>=0;Dt--)sc(Oe.doc,He,lt[Dt],Zt(lt[Dt].line,lt[Dt].ch+He.length))}}),De("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(Oe,He,lt){Oe.state.specialChars=new RegExp(He.source+(He.test(" ")?"":"| "),"g"),lt!=Mh&&Oe.refresh()}),De("specialCharPlaceholder",Cs,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,He){return Oe.getInputField().spellcheck=He},!0),De("autocorrect",!1,function(Oe,He){return Oe.getInputField().autocorrect=He},!0),De("autocapitalize",!1,function(Oe,He){return Oe.getInputField().autocapitalize=He},!0),De("rtlMoveVisually",!se),De("wholeLineUpdateBefore",!0),De("theme","default",function(Oe){ip(Oe),ei(Oe)},!0),De("keyMap","default",function(Oe,He,lt){var bt=jc(He),Dt=lt!=Mh&&jc(lt);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,He){Oe.display.gutterSpecs=Ni(He,Oe.options.lineNumbers),ei(Oe)},!0),De("fixedGutter",!0,function(Oe,He){Oe.display.gutters.style.left=He?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,He){Oe.display.gutterSpecs=Ni(Oe.options.gutters,He),ei(Oe)},!0),De("firstLineNumber",1,ei,!0),De("lineNumberFormatter",function(Oe){return Oe},ei,!0),De("showCursorWhenSelecting",!1,Ca,!0),De("resetSelectionOnContextMenu",!0),De("lineWiseCopyCut",!0),De("pasteLinesPerSelection",!0),De("selectionsMayTouch",!1),De("readOnly",!1,function(Oe,He){He=="nocursor"&&(Rc(Oe),Oe.display.input.blur()),Oe.display.input.readOnlyChanged(He)}),De("screenReaderLabel",null,function(Oe,He){He=He===""?null:He,Oe.display.input.screenReaderLabelChanged(He)}),De("disableInput",!1,function(Oe,He){He||Oe.display.input.reset()},!0),De("dragDrop",!0,rp),De("allowDropFileTypes",null),De("cursorBlinkRate",530),De("cursorScrollMargin",0),De("cursorHeight",1,Ca,!0),De("singleCursorHeightPerLine",!0,Ca,!0),De("workTime",100),De("workDelay",100),De("flattenSpans",!0,Io,!0),De("addModeClass",!1,Io,!0),De("pollInterval",100),De("undoDepth",200,function(Oe,He){return Oe.doc.history.undoDepth=He}),De("historyEventDelay",1250),De("viewportMargin",10,function(Oe){return Oe.refresh()},!0),De("maxHighlightLength",1e4,Io,!0),De("moveInputWithCursor",!0,function(Oe,He){He||Oe.display.input.resetPosition()}),De("tabindex",null,function(Oe,He){return Oe.display.input.getField().tabIndex=He||""}),De("autofocus",null),De("direction","ltr",function(Oe,He){return Oe.doc.setDirection(He)},!0),De("phrases",null)}function rp(re,pe,De){var Oe=De&&De!=Mh;if(!pe!=!Oe){var He=re.display.dragFunctions,lt=pe?Jt:Mn;lt(re.display.scroller,"dragstart",He.start),lt(re.display.scroller,"dragenter",He.enter),lt(re.display.scroller,"dragover",He.over),lt(re.display.scroller,"dragleave",He.leave),lt(re.display.scroller,"drop",He.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"),ko(re)),Wr(re),Ls(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 Ra(Oe,pe.mode,null,pe.lineSeparator,pe.direction):pe.mode&&(Oe.modeOption=pe.mode),this.doc=Oe;var He=new ys.inputStyles[pe.inputStyle](this),lt=this.display=new Gi(re,Oe,He,pe);lt.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&<.input.focus(),be&&Pe<11&&setTimeout(function(){return De.display.input.reset(!0)},20),Kd(this),Jl(),Aa(this),this.curOp.forceUpdate=!0,Ur(this,Oe),pe.autofocus&&!ee||this.hasFocus()?setTimeout(function(){De.hasFocus()&&!De.state.focused&&Bo(De)},20):Rc(this);for(var bt in wf)wf.hasOwnProperty(bt)&&wf[bt](this,pe[bt],Mh);Ai(this),pe.finishInit&&pe.finishInit(this);for(var Dt=0;Dt<ad.length;++Dt)ad[Dt](this);oc(this),he&&pe.lineWrapping&&getComputedStyle(lt.lineDiv).textRendering=="optimizelegibility"&&(lt.lineDiv.style.textRendering="auto")}ys.defaults=tg,ys.optionHandlers=wf;function Kd(re){var pe=re.display;Jt(pe.scroller,"mousedown",vn(re,Mc)),be&&Pe<11?Jt(pe.scroller,"dblclick",vn(re,function(Ot){if(!En(re,Ot)){var Yt=Ia(re,Ot);if(!(!Yt||tp(re,Ot)||Ua(re.display,Ot))){ri(Ot);var Cn=re.findWordAt(Yt);Qo(re.doc,Cn.anchor,Cn.head)}}})):Jt(pe.scroller,"dblclick",function(Ot){return En(re,Ot)||ri(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 He(){pe.activeTouch&&(De=setTimeout(function(){return pe.activeTouch=null},1e3),Oe=pe.activeTouch,Oe.end=+new Date)}function lt(Ot){if(Ot.touches.length!=1)return!1;var Yt=Ot.touches[0];return Yt.radiusX<=1&&Yt.radiusY<=1}function bt(Ot,Yt){if(Yt.left==null)return!0;var Cn=Yt.left-Ot.left,en=Yt.top-Ot.top;return Cn*Cn+en*en>20*20}Jt(pe.scroller,"touchstart",function(Ot){if(!En(re,Ot)&&!lt(Ot)&&!tp(re,Ot)){pe.input.ensurePolled(),clearTimeout(De);var Yt=+new Date;pe.activeTouch={start:Yt,moved:!1,prev:Yt-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 Yt=pe.activeTouch;if(Yt&&!Ua(pe,Ot)&&Yt.left!=null&&!Yt.moved&&new Date-Yt.start<300){var Cn=re.coordsChar(pe.activeTouch,"page"),en;!Yt.prev||bt(Yt,Yt.prev)?en=new Pi(Cn,Cn):!Yt.prev.prev||bt(Yt,Yt.prev.prev)?en=re.findWordAt(Cn):en=new Pi(Zt(Cn.line,0),Nn(re.doc,Zt(Cn.line+1,0))),re.setSelection(en.anchor,en.head),re.focus(),ri(Ot)}He()}),Jt(pe.scroller,"touchcancel",He),Jt(pe.scroller,"scroll",function(){pe.scroller.clientHeight&&(Au(re,pe.scroller.scrollTop),uu(re,pe.scroller.scrollLeft,!0),hn(re,"scroll",re))}),Jt(pe.scroller,"mousewheel",function(Ot){return dr(re,Ot)}),Jt(pe.scroller,"DOMMouseScroll",function(Ot){return dr(re,Ot)}),Jt(pe.wrapper,"scroll",function(){return pe.wrapper.scrollTop=pe.wrapper.scrollLeft=0}),pe.dragFunctions={enter:function(Ot){En(re,Ot)||nr(Ot)},over:function(Ot){En(re,Ot)||(yf(re,Ot),nr(Ot))},start:function(Ot){return id(re,Ot)},drop:vn(re,Bd),leave:function(Ot){En(re,Ot)||Yf(re)}};var Dt=pe.input.getField();Jt(Dt,"keyup",function(Ot){return Yp.call(re,Ot)}),Jt(Dt,"keydown",vn(re,Vp)),Jt(Dt,"keypress",vn(re,Lc)),Jt(Dt,"focus",function(Ot){return Bo(re,Ot)}),Jt(Dt,"blur",function(Ot){return Rc(re,Ot)})}var ad=[];ys.defineInitHook=function(re){return ad.push(re)};function Va(re,pe,De,Oe){var He=re.doc,lt;De==null&&(De="add"),De=="smart"&&(He.mode.indent?lt=Di(re,pe).state:De="prev");var bt=re.options.tabSize,Dt=un(He,pe),Ot=ht(Dt.text,null,bt);Dt.stateAfter&&(Dt.stateAfter=null);var Yt=Dt.text.match(/^\s*/)[0],Cn;if(!Oe&&!/\S/.test(Dt.text))Cn=0,De="not";else if(De=="smart"&&(Cn=He.mode.indent(lt,Dt.text.slice(Yt.length),Dt.text),Cn==Et||Cn>150)){if(!Oe)return;De="prev"}De=="prev"?pe>He.first?Cn=ht(un(He,pe-1).text,null,bt):Cn=0:De=="add"?Cn=Ot+re.options.indentUnit:De=="subtract"?Cn=Ot-re.options.indentUnit:typeof De=="number"&&(Cn=Ot+De),Cn=Math.max(0,Cn);var en="",Hn=0;if(re.options.indentWithTabs)for(var Fn=Math.floor(Cn/bt);Fn;--Fn)Hn+=bt,en+=" ";if(Hn<Cn&&(en+=yn(Cn-Hn)),en!=Yt)return sc(He,en,Zt(pe,0),Zt(pe,Yt.length),"+input"),Dt.stateAfter=null,!0;for(var vi=0;vi<He.sel.ranges.length;vi++){var _i=He.sel.ranges[vi];if(_i.head.line==pe&&_i.head.ch<Yt.length){var zi=Zt(pe,Yt.length);ws(He,vi,new Pi(zi,zi));break}}}var ql=null;function ld(re){ql=re}function bf(re,pe,De,Oe,He){var lt=re.doc;re.display.shift=!1,Oe||(Oe=lt.sel);var bt=+new Date-200,Dt=He=="paste"||re.state.pasteIncoming>bt,Ot=Hi(pe),Yt=null;if(Dt&&Oe.ranges.length>1)if(ql&&ql.text.join(`
|
|
|
`)==pe){if(Oe.ranges.length%ql.text.length==0){Yt=[];for(var Cn=0;Cn<ql.text.length;Cn++)Yt.push(lt.splitLines(ql.text[Cn]))}}else Ot.length==Oe.ranges.length&&re.options.pasteLinesPerSelection&&(Yt=Wt(Ot,function(ar){return[ar]}));for(var en=re.curOp.updateInput,Hn=Oe.ranges.length-1;Hn>=0;Hn--){var Fn=Oe.ranges[Hn],vi=Fn.from(),_i=Fn.to();Fn.empty()&&(De&&De>0?vi=Zt(vi.line,vi.ch-De):re.state.overwrite&&!Dt?_i=Zt(_i.line,Math.min(un(lt,_i.line).text.length,_i.ch+Ut(Ot).length)):Dt&&ql&&ql.lineWise&&ql.text.join(`
|
|
|
`)==Ot.join(`
|
|
|
`)&&(vi=_i=Zt(vi.line,0)));var zi={from:vi,to:_i,text:Yt?Yt[Hn%Yt.length]:Ot,origin:He||(Dt?"paste":re.state.cutIncoming>bt?"cut":"+input")};ia(re.doc,zi),Ci(re,"inputRead",re,zi)}pe&&!Dt&&ig(re,pe),ic(re),re.curOp.updateInput<2&&(re.curOp.updateInput=en),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 He=De.ranges[Oe];if(!(He.head.ch>100||Oe&&De.ranges[Oe-1].head.line==He.head.line)){var lt=re.getModeAt(He.head),bt=!1;if(lt.electricChars){for(var Dt=0;Dt<lt.electricChars.length;Dt++)if(pe.indexOf(lt.electricChars.charAt(Dt))>-1){bt=Va(re,He.head.line,"smart");break}}else lt.electricInput&<.electricInput.test(un(re.doc,He.head.line).text.slice(0,He.head.ch))&&(bt=Va(re,He.head.line,"smart"));bt&&Ci(re,"electricInput",re,He.head.line)}}}function rg(re){for(var pe=[],De=[],Oe=0;Oe<re.doc.sel.ranges.length;Oe++){var He=re.doc.sel.ranges[Oe].head.line,lt={anchor:Zt(He,0),head:Zt(He+1,0)};De.push(lt),pe.push(re.getRange(lt.anchor,lt.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,He){var lt=this.options,bt=lt[Oe];lt[Oe]==He&&Oe!="mode"||(lt[Oe]=He,pe.hasOwnProperty(Oe)&&vn(this,pe[Oe])(this,He,bt),hn(this,"optionChange",this,Oe))},getOption:function(Oe){return this.options[Oe]},getDoc:function(){return this.doc},addKeyMap:function(Oe,He){this.state.keyMaps[He?"push":"unshift"](jc(Oe))},removeKeyMap:function(Oe){for(var He=this.state.keyMaps,lt=0;lt<He.length;++lt)if(He[lt]==Oe||He[lt].name==Oe)return He.splice(lt,1),!0},addOverlay:cn(function(Oe,He){var lt=Oe.token?Oe:re.getMode(this.options,Oe);if(lt.startState)throw new Error("Overlays may not be stateful.");Xt(this.state.overlays,{mode:lt,modeSpec:Oe,opaque:He&&He.opaque,priority:He&&He.priority||0},function(bt){return bt.priority}),this.state.modeGen++,Ls(this)}),removeOverlay:cn(function(Oe){for(var He=this.state.overlays,lt=0;lt<He.length;++lt){var bt=He[lt].modeSpec;if(bt==Oe||typeof Oe=="string"&&bt.name==Oe){He.splice(lt,1),this.state.modeGen++,Ls(this);return}}}),indentLine:cn(function(Oe,He,lt){typeof He!="string"&&typeof He!="number"&&(He==null?He=this.options.smartIndent?"smart":"prev":He=He?"add":"subtract"),Sn(this.doc,Oe)&&Va(this,Oe,He,lt)}),indentSelection:cn(function(Oe){for(var He=this.doc.sel.ranges,lt=-1,bt=0;bt<He.length;bt++){var Dt=He[bt];if(Dt.empty())Dt.head.line>lt&&(Va(this,Dt.head.line,Oe,!0),lt=Dt.head.line,bt==this.doc.sel.primIndex&&ic(this));else{var Ot=Dt.from(),Yt=Dt.to(),Cn=Math.max(lt,Ot.line);lt=Math.min(this.lastLine(),Yt.line-(Yt.ch?0:1))+1;for(var en=Cn;en<lt;++en)Va(this,en,Oe);var Hn=this.doc.sel.ranges;Ot.ch==0&&He.length==Hn.length&&Hn[bt].from().ch>0&&ws(this.doc,bt,new Pi(Ot,Hn[bt].to()),vt)}}}),getTokenAt:function(Oe,He){return pi(this,Oe,He)},getLineTokens:function(Oe,He){return pi(this,Zt(Oe),He,!0)},getTokenTypeAt:function(Oe){Oe=Nn(this.doc,Oe);var He=lr(this,un(this.doc,Oe.line)),lt=0,bt=(He.length-1)/2,Dt=Oe.ch,Ot;if(Dt==0)Ot=He[2];else for(;;){var Yt=lt+bt>>1;if((Yt?He[Yt*2-1]:0)>=Dt)bt=Yt;else if(He[Yt*2+1]<Dt)lt=Yt+1;else{Ot=He[Yt*2+2];break}}var Cn=Ot?Ot.indexOf("overlay "):-1;return Cn<0?Ot:Cn==0?null:Ot.slice(0,Cn-1)},getModeAt:function(Oe){var He=this.doc.mode;return He.innerMode?re.innerMode(He,this.getTokenAt(Oe).state).mode:He},getHelper:function(Oe,He){return this.getHelpers(Oe,He)[0]},getHelpers:function(Oe,He){var lt=[];if(!De.hasOwnProperty(He))return lt;var bt=De[He],Dt=this.getModeAt(Oe);if(typeof Dt[He]=="string")bt[Dt[He]]&<.push(bt[Dt[He]]);else if(Dt[He])for(var Ot=0;Ot<Dt[He].length;Ot++){var Yt=bt[Dt[He][Ot]];Yt&<.push(Yt)}else Dt.helperType&&bt[Dt.helperType]?lt.push(bt[Dt.helperType]):bt[Dt.name]&<.push(bt[Dt.name]);for(var Cn=0;Cn<bt._global.length;Cn++){var en=bt._global[Cn];en.pred(Dt,this)&&dt(lt,en.val)==-1&<.push(en.val)}return lt},getStateAfter:function(Oe,He){var lt=this.doc;return Oe=qn(lt,Oe==null?lt.first+lt.size-1:Oe),Di(this,Oe+1,He).state},cursorCoords:function(Oe,He){var lt,bt=this.doc.sel.primary();return Oe==null?lt=bt.head:typeof Oe=="object"?lt=Nn(this.doc,Oe):lt=Oe?bt.from():bt.to(),Rs(this,lt,He||"page")},charCoords:function(Oe,He){return Dl(this,Nn(this.doc,Oe),He||"page")},coordsChar:function(Oe,He){return Oe=Vl(this,Oe,He||"page"),wc(this,Oe.left,Oe.top)},lineAtHeight:function(Oe,He){return Oe=Vl(this,{top:Oe,left:0},He||"page").top,Kt(this.doc,Oe+this.display.viewOffset)},heightAtLine:function(Oe,He,lt){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=un(this.doc,Oe)}else Dt=Oe;return Zs(this,Dt,{top:0,left:0},He||"page",lt||bt).top+(bt?this.doc.height-no(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,He,lt,bt,Dt){var Ot=this.display;Oe=Rs(this,Nn(this.doc,Oe));var Yt=Oe.bottom,Cn=Oe.left;if(He.style.position="absolute",He.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(He),Ot.sizer.appendChild(He),bt=="over")Yt=Oe.top;else if(bt=="above"||bt=="near"){var en=Math.max(Ot.wrapper.clientHeight,this.doc.height),Hn=Math.max(Ot.sizer.clientWidth,Ot.lineSpace.clientWidth);(bt=="above"||Oe.bottom+He.offsetHeight>en)&&Oe.top>He.offsetHeight?Yt=Oe.top-He.offsetHeight:Oe.bottom+He.offsetHeight<=en&&(Yt=Oe.bottom),Cn+He.offsetWidth>Hn&&(Cn=Hn-He.offsetWidth)}He.style.top=Yt+"px",He.style.left=He.style.right="",Dt=="right"?(Cn=Ot.sizer.clientWidth-He.offsetWidth,He.style.right="0px"):(Dt=="left"?Cn=0:Dt=="middle"&&(Cn=(Ot.sizer.clientWidth-He.offsetWidth)/2),He.style.left=Cn+"px"),lt&&rh(this,{left:Cn,top:Yt,right:Cn+He.offsetWidth,bottom:Yt+He.offsetHeight})},triggerOnKeyDown:cn(Vp),triggerOnKeyPress:cn(Lc),triggerOnKeyUp:Yp,triggerOnMouseDown:cn(Mc),execCommand:function(Oe){if(Ka.hasOwnProperty(Oe))return Ka[Oe].call(null,this)},triggerElectric:cn(function(Oe){ig(this,Oe)}),findPosH:function(Oe,He,lt,bt){var Dt=1;He<0&&(Dt=-1,He=-He);for(var Ot=Nn(this.doc,Oe),Yt=0;Yt<He&&(Ot=Cf(this.doc,Ot,Dt,lt,bt),!Ot.hitSide);++Yt);return Ot},moveH:cn(function(Oe,He){var lt=this;this.extendSelectionsBy(function(bt){return lt.display.shift||lt.doc.extend||bt.empty()?Cf(lt.doc,bt.head,Oe,He,lt.options.rtlMoveVisually):Oe<0?bt.from():bt.to()},jt)}),deleteH:cn(function(Oe,He){var lt=this.doc.sel,bt=this.doc;lt.somethingSelected()?bt.replaceSelection("",null,"+delete"):fl(this,function(Dt){var Ot=Cf(bt,Dt.head,Oe,He,!1);return Oe<0?{from:Ot,to:Dt.head}:{from:Dt.head,to:Ot}})}),findPosV:function(Oe,He,lt,bt){var Dt=1,Ot=bt;He<0&&(Dt=-1,He=-He);for(var Yt=Nn(this.doc,Oe),Cn=0;Cn<He;++Cn){var en=Rs(this,Yt,"div");if(Ot==null?Ot=en.left:en.left=Ot,Yt=kh(this,en,Dt,lt),Yt.hitSide)break}return Yt},moveV:cn(function(Oe,He){var lt=this,bt=this.doc,Dt=[],Ot=!this.display.shift&&!bt.extend&&bt.sel.somethingSelected();if(bt.extendSelectionsBy(function(Cn){if(Ot)return Oe<0?Cn.from():Cn.to();var en=Rs(lt,Cn.head,"div");Cn.goalColumn!=null&&(en.left=Cn.goalColumn),Dt.push(en.left);var Hn=kh(lt,en,Oe,He);return He=="page"&&Cn==bt.sel.primary()&&Ch(lt,Dl(lt,Hn,"div").top-en.top),Hn},jt),Dt.length)for(var Yt=0;Yt<bt.sel.ranges.length;Yt++)bt.sel.ranges[Yt].goalColumn=Dt[Yt]}),findWordAt:function(Oe){var He=this.doc,lt=un(He,Oe.line).text,bt=Oe.ch,Dt=Oe.ch;if(lt){var Ot=this.getHelper(Oe,"wordChars");(Oe.sticky=="before"||Dt==lt.length)&&bt?--bt:++Dt;for(var Yt=lt.charAt(bt),Cn=qe(Yt,Ot)?function(en){return qe(en,Ot)}:/\s/.test(Yt)?function(en){return/\s/.test(en)}:function(en){return!/\s/.test(en)&&!qe(en)};bt>0&&Cn(lt.charAt(bt-1));)--bt;for(;Dt<lt.length&&Cn(lt.charAt(Dt));)++Dt}return new Pi(Zt(Oe.line,bt),Zt(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"),hn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ct()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:cn(function(Oe,He){io(this,Oe,He)}),getScrollInfo:function(){var Oe=this.display.scroller;return{left:Oe.scrollLeft,top:Oe.scrollTop,height:Oe.scrollHeight-Ga(this)-this.display.barHeight,width:Oe.scrollWidth-Ga(this)-this.display.barWidth,clientHeight:Uu(this),clientWidth:Wa(this)}},scrollIntoView:cn(function(Oe,He){Oe==null?(Oe={from:this.doc.sel.primary().head,to:null},He==null&&(He=this.options.cursorScrollMargin)):typeof Oe=="number"?Oe={from:Zt(Oe,0),to:null}:Oe.from==null&&(Oe={from:Oe,to:null}),Oe.to||(Oe.to=Oe.from),Oe.margin=He||0,Oe.from.line!=null?ts(this,Oe):qh(this,Oe.from,Oe.to,Oe.margin)}),setSize:cn(function(Oe,He){var lt=this,bt=function(Ot){return typeof Ot=="number"||/^\d+$/.test(String(Ot))?Ot+"px":Ot};Oe!=null&&(this.display.wrapper.style.width=bt(Oe)),He!=null&&(this.display.wrapper.style.height=bt(He)),this.options.lineWrapping&&na(this);var Dt=this.display.viewFrom;this.doc.iter(Dt,this.display.viewTo,function(Ot){if(Ot.widgets){for(var Yt=0;Yt<Ot.widgets.length;Yt++)if(Ot.widgets[Yt].noHScroll){bo(lt,Dt,"widget");break}}++Dt}),this.curOp.forceUpdate=!0,hn(this,"refresh",this)}),operation:function(Oe){return Lt(this,Oe)},startOperation:function(){return Aa(this)},endOperation:function(){return oc(this)},refresh:cn(function(){var Oe=this.display.cachedTextHeight;Ls(this),this.curOp.forceUpdate=!0,Ds(this),io(this,this.doc.scrollLeft,this.doc.scrollTop),Ri(this.display),(Oe==null||Math.abs(Oe-Tu(this.display))>.5||this.options.lineWrapping)&&Wr(this),hn(this,"refresh",this)}),swapDoc:cn(function(Oe){var He=this.doc;return He.cm=null,this.state.selectingText&&this.state.selectingText(),Ur(this,Oe),Ds(this),this.display.input.reset(),io(this,Oe.scrollLeft,Oe.scrollTop),this.curOp.forceScroll=!0,Ci(this,"swapDoc",this,He),He}),phrase:function(Oe){var He=this.options.phrases;return He&&Object.prototype.hasOwnProperty.call(He,Oe)?He[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}},ci(re),re.registerHelper=function(Oe,He,lt){De.hasOwnProperty(Oe)||(De[Oe]=re[Oe]={_global:[]}),De[Oe][He]=lt},re.registerGlobalHelper=function(Oe,He,lt,bt){re.registerHelper(Oe,He,bt),De[Oe]._global.push({pred:lt,val:bt})}}function Cf(re,pe,De,Oe,He){var lt=pe,bt=De,Dt=un(re,pe.line),Ot=He&&re.direction=="rtl"?-De:De;function Yt(){var Br=pe.line+Ot;return Br<re.first||Br>=re.first+re.size?!1:(pe=new Zt(Br,pe.ch,pe.sticky),Dt=un(re,Br))}function Cn(Br){var br;if(Oe=="codepoint"){var Gr=Dt.text.charCodeAt(pe.ch+(Oe>0?0:-1));isNaN(Gr)?br=null:br=new Zt(pe.line,Math.max(0,Math.min(Dt.text.length,pe.ch+De*(Gr>=55296&&Gr<56320?2:1))),-De)}else He?br=$s(re.cm,Dt,pe,De):br=ya(Dt,pe,De);if(br==null)if(!Br&&Yt())pe=hs(He,re.cm,Dt,pe.line,Ot);else return!1;else pe=br;return!0}if(Oe=="char"||Oe=="codepoint")Cn();else if(Oe=="column")Cn(!0);else if(Oe=="word"||Oe=="group")for(var en=null,Hn=Oe=="group",Fn=re.cm&&re.cm.getHelper(pe,"wordChars"),vi=!0;!(De<0&&!Cn(!vi));vi=!1){var _i=Dt.text.charAt(pe.ch)||`
|
|
|
`,zi=qe(_i,Fn)?"w":Hn&&_i==`
|
|
|
`?"n":!Hn||/\s/.test(_i)?null:"p";if(Hn&&!vi&&!zi&&(zi="s"),en&&en!=zi){De<0&&(De=1,Cn(),pe.sticky="after");break}if(zi&&(en=zi),De>0&&!Cn(!vi))break}var ar=hu(re,pe,lt,bt,!0);return Rn(lt,ar)&&(ar.hitSide=!0),ar}function kh(re,pe,De,Oe){var He=re.doc,lt=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 Yt;Yt=wc(re,lt,bt),!!Yt.outside;){if(De<0?bt<=0:bt>=He.height){Yt.hitSide=!0;break}bt+=De*5}return Yt}var Js=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};Js.prototype.init=function(re){var pe=this,De=this,Oe=De.cm,He=De.div=re.lineDiv;og(He,Oe.options.spellcheck,Oe.options.autocorrect,Oe.options.autocapitalize);function lt(Dt){for(var Ot=Dt.target;Ot;Ot=Ot.parentNode){if(Ot==He)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Ot.className))break}return!1}Jt(He,"paste",function(Dt){!lt(Dt)||En(Oe,Dt)||ng(Dt,Oe)||Pe<=11&&setTimeout(vn(Oe,function(){return pe.updateFromDOM()}),20)}),Jt(He,"compositionstart",function(Dt){pe.composing={data:Dt.data,done:!1}}),Jt(He,"compositionupdate",function(Dt){pe.composing||(pe.composing={data:Dt.data,done:!1})}),Jt(He,"compositionend",function(Dt){pe.composing&&(Dt.data!=pe.composing.data&&pe.readFromDOMSoon(),pe.composing.done=!0)}),Jt(He,"touchstart",function(){return De.forceCompositionEnd()}),Jt(He,"input",function(){pe.composing||pe.readFromDOMSoon()});function bt(Dt){if(!(!lt(Dt)||En(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 Yt=ql.text.join(`
|
|
|
`);if(Dt.clipboardData.setData("Text",Yt),Dt.clipboardData.getData("Text")==Yt){Dt.preventDefault();return}}var Cn=sg(),en=Cn.firstChild;Oe.display.lineSpace.insertBefore(Cn,Oe.display.lineSpace.firstChild),en.value=ql.text.join(`
|
|
|
`);var Hn=document.activeElement;yt(en),setTimeout(function(){Oe.display.lineSpace.removeChild(Cn),Hn.focus(),Hn==He&&De.showPrimarySelection()},50)}}Jt(He,"copy",bt),Jt(He,"cut",bt)},Js.prototype.screenReaderLabelChanged=function(re){re?this.div.setAttribute("aria-label",re):this.div.removeAttribute("aria-label")},Js.prototype.prepareSelection=function(){var re=Pc(this.cm,!1);return re.focus=document.activeElement==this.div,re},Js.prototype.showSelection=function(re,pe){!re||!this.cm.display.view.length||((re.focus||pe)&&this.showPrimarySelection(),this.showMultipleSelections(re))},Js.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Js.prototype.showPrimarySelection=function(){var re=this.getSelection(),pe=this.cm,De=pe.doc.sel.primary(),Oe=De.from(),He=De.to();if(pe.display.viewTo==pe.display.viewFrom||Oe.line>=pe.display.viewTo||He.line<pe.display.viewFrom){re.removeAllRanges();return}var lt=Pf(pe,re.anchorNode,re.anchorOffset),bt=Pf(pe,re.focusNode,re.focusOffset);if(!(lt&&!lt.bad&&bt&&!bt.bad&&rn(Un(lt,bt),Oe)==0&&rn(Qn(lt,bt),He)==0)){var Dt=pe.display.view,Ot=Oe.line>=pe.display.viewFrom&&op(pe,Oe)||{node:Dt[0].measure.map[2],offset:0},Yt=He.line<pe.display.viewTo&&op(pe,He);if(!Yt){var Cn=Dt[Dt.length-1].measure,en=Cn.maps?Cn.maps[Cn.maps.length-1]:Cn.map;Yt={node:en[en.length-1],offset:en[en.length-2]-en[en.length-3]}}if(!Ot||!Yt){re.removeAllRanges();return}var Hn=re.rangeCount&&re.getRangeAt(0),Fn;try{Fn=We(Ot.node,Ot.offset,Yt.offset,Yt.node)}catch(vi){}Fn&&(!Le&&pe.state.focused?(re.collapse(Ot.node,Ot.offset),Fn.collapsed||(re.removeAllRanges(),re.addRange(Fn))):(re.removeAllRanges(),re.addRange(Fn)),Hn&&re.anchorNode==null?re.addRange(Hn):Le&&this.startGracePeriod()),this.rememberSelection()}},Js.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)},Js.prototype.showMultipleSelections=function(re){je(this.cm.display.cursorDiv,re.cursors),je(this.cm.display.selectionDiv,re.selection)},Js.prototype.rememberSelection=function(){var re=this.getSelection();this.lastAnchorNode=re.anchorNode,this.lastAnchorOffset=re.anchorOffset,this.lastFocusNode=re.focusNode,this.lastFocusOffset=re.focusOffset},Js.prototype.selectionInEditor=function(){var re=this.getSelection();if(!re.rangeCount)return!1;var pe=re.getRangeAt(0).commonAncestorContainer;return gt(this.div,pe)},Js.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Js.prototype.blur=function(){this.div.blur()},Js.prototype.getField=function(){return this.div},Js.prototype.supportsTouch=function(){return!0},Js.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)},Js.prototype.selectionChanged=function(){var re=this.getSelection();return re.anchorNode!=this.lastAnchorNode||re.anchorOffset!=this.lastAnchorOffset||re.focusNode!=this.lastFocusNode||re.focusOffset!=this.lastFocusOffset},Js.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)})}}},Js.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(),He=De.to();if(Oe.ch==0&&Oe.line>re.firstLine()&&(Oe=Zt(Oe.line-1,un(re.doc,Oe.line-1).length)),He.ch==un(re.doc,He.line).text.length&&He.line<re.lastLine()&&(He=Zt(He.line+1,0)),Oe.line<pe.viewFrom||He.line>pe.viewTo-1)return!1;var lt,bt,Dt;Oe.line==pe.viewFrom||(lt=Vs(re,Oe.line))==0?(bt=At(pe.view[0].line),Dt=pe.view[0].node):(bt=At(pe.view[lt].line),Dt=pe.view[lt-1].node.nextSibling);var Ot=Vs(re,He.line),Yt,Cn;if(Ot==pe.view.length-1?(Yt=pe.viewTo-1,Cn=pe.lineDiv.lastChild):(Yt=At(pe.view[Ot+1].line)-1,Cn=pe.view[Ot+1].node.previousSibling),!Dt)return!1;for(var en=re.doc.splitLines($d(re,Dt,Cn,bt,Yt)),Hn=wn(re.doc,Zt(bt,0),Zt(Yt,un(re.doc,Yt).text.length));en.length>1&&Hn.length>1;)if(Ut(en)==Ut(Hn))en.pop(),Hn.pop(),Yt--;else if(en[0]==Hn[0])en.shift(),Hn.shift(),bt++;else break;for(var Fn=0,vi=0,_i=en[0],zi=Hn[0],ar=Math.min(_i.length,zi.length);Fn<ar&&_i.charCodeAt(Fn)==zi.charCodeAt(Fn);)++Fn;for(var Br=Ut(en),br=Ut(Hn),Gr=Math.min(Br.length-(en.length==1?Fn:0),br.length-(Hn.length==1?Fn:0));vi<Gr&&Br.charCodeAt(Br.length-vi-1)==br.charCodeAt(br.length-vi-1);)++vi;if(en.length==1&&Hn.length==1&&bt==Oe.line)for(;Fn&&Fn>Oe.ch&&Br.charCodeAt(Br.length-vi-1)==br.charCodeAt(br.length-vi-1);)Fn--,vi++;en[en.length-1]=Br.slice(0,Br.length-vi).replace(/^\u200b+/,""),en[0]=en[0].slice(Fn).replace(/\u200b+$/,"");var Co=Zt(bt,Fn),xr=Zt(Yt,Hn.length?Ut(Hn).length-vi:0);if(en.length>1||en[0]||rn(Co,xr))return sc(re.doc,en,Co,xr,"+input"),!0},Js.prototype.ensurePolled=function(){this.forceCompositionEnd()},Js.prototype.reset=function(){this.forceCompositionEnd()},Js.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Js.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))},Js.prototype.updateFromDOM=function(){var re=this;(this.cm.isReadOnly()||!this.pollContent())&&Lt(this.cm,function(){return Ls(re.cm)})},Js.prototype.setUneditable=function(re){re.contentEditable="false"},Js.prototype.onKeyPress=function(re){re.charCode==0||this.composing||(re.preventDefault(),this.cm.isReadOnly()||vn(this.cm,bf)(this.cm,String.fromCharCode(re.charCode==null?re.keyCode:re.charCode),0))},Js.prototype.readOnlyChanged=function(re){this.div.contentEditable=String(re!="nocursor")},Js.prototype.onContextMenu=function(){},Js.prototype.resetPosition=function(){},Js.prototype.needsContentAttribute=!0;function op(re,pe){var De=Gu(re,pe.line);if(!De||De.hidden)return null;var Oe=un(re.doc,pe.line),He=Eu(De,Oe,pe.line),lt=tn(Oe,re.doc.direction),bt="left";if(lt){var Dt=at(lt,pe.ch);bt=Dt%2?"right":"left"}var Ot=xc(He.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,He){var lt="",bt=!1,Dt=re.doc.lineSeparator(),Ot=!1;function Yt(Fn){return function(vi){return vi.id==Fn}}function Cn(){bt&&(lt+=Dt,Ot&&(lt+=Dt),bt=Ot=!1)}function en(Fn){Fn&&(Cn(),lt+=Fn)}function Hn(Fn){if(Fn.nodeType==1){var vi=Fn.getAttribute("cm-text");if(vi){en(vi);return}var _i=Fn.getAttribute("cm-marker"),zi;if(_i){var ar=re.findMarks(Zt(Oe,0),Zt(He+1,0),Yt(+_i));ar.length&&(zi=ar[0].find(0))&&en(wn(re.doc,zi.from,zi.to).join(Dt));return}if(Fn.getAttribute("contenteditable")=="false")return;var Br=/^(pre|div|p|li|table|br)$/i.test(Fn.nodeName);if(!/^br$/i.test(Fn.nodeName)&&Fn.textContent.length==0)return;Br&&Cn();for(var br=0;br<Fn.childNodes.length;br++)Hn(Fn.childNodes[br]);/^(pre|p)$/i.test(Fn.nodeName)&&(Ot=!0),Br&&(bt=!0)}else Fn.nodeType==3&&en(Fn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Hn(pe),pe!=De;)pe=pe.nextSibling,Ot=!1;return lt}function Pf(re,pe,De){var Oe;if(pe==re.display.lineDiv){if(Oe=re.display.lineDiv.childNodes[De],!Oe)return Vd(re.clipPos(Zt(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 He=0;He<re.display.view.length;He++){var lt=re.display.view[He];if(lt.node==Oe)return hm(lt,pe,De)}}function hm(re,pe,De){var Oe=re.text.firstChild,He=!1;if(!pe||!gt(Oe,pe))return Vd(Zt(At(re.line),0),!0);if(pe==Oe&&(He=!0,pe=Oe.childNodes[De],De=0,!pe)){var lt=re.rest?Ut(re.rest):re.line;return Vd(Zt(At(lt),lt.text.length),He)}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,Yt=Ot.maps;function Cn(zi,ar,Br){for(var br=-1;br<(Yt?Yt.length:0);br++)for(var Gr=br<0?Ot.map:Yt[br],Co=0;Co<Gr.length;Co+=3){var xr=Gr[Co+2];if(xr==zi||xr==ar){var jo=At(br<0?re.line:re.rest[br]),aa=Gr[Co]+Br;return(Br<0||xr!=zi)&&(aa=Gr[Co+(Br?1:0)]),Zt(jo,aa)}}}var en=Cn(bt,Dt,De);if(en)return Vd(en,He);for(var Hn=Dt.nextSibling,Fn=bt?bt.nodeValue.length-De:0;Hn;Hn=Hn.nextSibling){if(en=Cn(Hn,Hn.firstChild,0),en)return Vd(Zt(en.line,en.ch-Fn),He);Fn+=Hn.textContent.length}for(var vi=Dt.previousSibling,_i=De;vi;vi=vi.previousSibling){if(en=Cn(vi,vi.firstChild,-1),en)return Vd(Zt(en.line,en.ch+_i),He);_i+=vi.textContent.length}}var Ba=function(re){this.cm=re,this.prevInput="",this.pollingFast=!1,this.polling=new rt,this.hasSelection=!1,this.composing=null};Ba.prototype.init=function(re){var pe=this,De=this,Oe=this.cm;this.createField(re);var He=this.textarea;re.wrapper.insertBefore(this.wrapper,re.wrapper.firstChild),ue&&(He.style.width="0px"),Jt(He,"input",function(){be&&Pe>=9&&pe.hasSelection&&(pe.hasSelection=null),De.poll()}),Jt(He,"paste",function(bt){En(Oe,bt)||ng(bt,Oe)||(Oe.state.pasteIncoming=+new Date,De.fastPoll())});function lt(bt){if(!En(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="",He.value=Dt.text.join(`
|
|
|
`),yt(He))}else return;bt.type=="cut"&&(Oe.state.cutIncoming=+new Date)}}Jt(He,"cut",lt),Jt(He,"copy",lt),Jt(re.scroller,"paste",function(bt){if(!(Ua(re,bt)||En(Oe,bt))){if(!He.dispatchEvent){Oe.state.pasteIncoming=+new Date,De.focus();return}var Dt=new Event("paste");Dt.clipboardData=bt.clipboardData,He.dispatchEvent(Dt)}}),Jt(re.lineSpace,"selectstart",function(bt){Ua(re,bt)||ri(bt)}),Jt(He,"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(He,"compositionend",function(){De.composing&&(De.poll(),De.composing.range.clear(),De.composing=null)})},Ba.prototype.createField=function(re){this.wrapper=sg(),this.textarea=this.wrapper.firstChild},Ba.prototype.screenReaderLabelChanged=function(re){re?this.textarea.setAttribute("aria-label",re):this.textarea.removeAttribute("aria-label")},Ba.prototype.prepareSelection=function(){var re=this.cm,pe=re.display,De=re.doc,Oe=Pc(re);if(re.options.moveInputWithCursor){var He=Rs(re,De.sel.primary().head,"div"),lt=pe.wrapper.getBoundingClientRect(),bt=pe.lineDiv.getBoundingClientRect();Oe.teTop=Math.max(0,Math.min(pe.wrapper.clientHeight-10,He.top+bt.top-lt.top)),Oe.teLeft=Math.max(0,Math.min(pe.wrapper.clientWidth-10,He.left+bt.left-lt.left))}return Oe},Ba.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")},Ba.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&&yt(this.textarea),be&&Pe>=9&&(this.hasSelection=De)}else re||(this.prevInput=this.textarea.value="",be&&Pe>=9&&(this.hasSelection=null))}},Ba.prototype.getField=function(){return this.textarea},Ba.prototype.supportsTouch=function(){return!1},Ba.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||ct()!=this.textarea))try{this.textarea.focus()}catch(re){}},Ba.prototype.blur=function(){this.textarea.blur()},Ba.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ba.prototype.receivedFocus=function(){this.slowPoll()},Ba.prototype.slowPoll=function(){var re=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){re.poll(),re.cm.state.focused&&re.slowPoll()})},Ba.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)},Ba.prototype.poll=function(){var re=this,pe=this.cm,De=this.textarea,Oe=this.prevInput;if(this.contextMenuPending||!pe.state.focused||st(De)&&!Oe&&!this.composing||pe.isReadOnly()||pe.options.disableInput||pe.state.keySeq)return!1;var He=De.value;if(He==Oe&&!pe.somethingSelected())return!1;if(be&&Pe>=9&&this.hasSelection===He||oe&&/[\uf700-\uf7ff]/.test(He))return pe.display.input.reset(),!1;if(pe.doc.sel==pe.display.selForContextMenu){var lt=He.charCodeAt(0);if(lt==8203&&!Oe&&(Oe="\u200B"),lt==8666)return this.reset(),this.cm.execCommand("undo")}for(var bt=0,Dt=Math.min(Oe.length,He.length);bt<Dt&&Oe.charCodeAt(bt)==He.charCodeAt(bt);)++bt;return Lt(pe,function(){bf(pe,He.slice(bt),Oe.length-bt,null,re.composing?"*compose":null),He.length>1e3||He.indexOf(`
|
|
|
`)>-1?De.value=re.prevInput="":re.prevInput=He,re.composing&&(re.composing.range.clear(),re.composing.range=pe.markText(re.composing.start,pe.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ba.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ba.prototype.onKeyPress=function(){be&&Pe>=9&&(this.hasSelection=null),this.fastPoll()},Ba.prototype.onContextMenu=function(re){var pe=this,De=pe.cm,Oe=De.display,He=pe.textarea;pe.contextMenuPending&&pe.contextMenuPending();var lt=Ia(De,re),bt=Oe.scroller.scrollTop;if(!lt||ge)return;var Dt=De.options.resetSelectionOnContextMenu;Dt&&De.doc.sel.contains(lt)==-1&&vn(De,As)(De.doc,vr(lt),vt);var Ot=He.style.cssText,Yt=pe.wrapper.style.cssText,Cn=pe.wrapper.offsetParent.getBoundingClientRect();pe.wrapper.style.cssText="position: static",He.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(re.clientY-Cn.top-5)+"px; left: "+(re.clientX-Cn.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 en;he&&(en=window.scrollY),Oe.input.focus(),he&&window.scrollTo(null,en),Oe.input.reset(),De.somethingSelected()||(He.value=pe.prevInput=" "),pe.contextMenuPending=Fn,Oe.selForContextMenu=De.doc.sel,clearTimeout(Oe.detectingSelectAll);function Hn(){if(He.selectionStart!=null){var _i=De.somethingSelected(),zi="\u200B"+(_i?He.value:"");He.value="\u21DA",He.value=zi,pe.prevInput=_i?"":"\u200B",He.selectionStart=1,He.selectionEnd=zi.length,Oe.selForContextMenu=De.doc.sel}}function Fn(){if(pe.contextMenuPending==Fn&&(pe.contextMenuPending=!1,pe.wrapper.style.cssText=Yt,He.style.cssText=Ot,be&&Pe<9&&Oe.scrollbars.setScrollTop(Oe.scroller.scrollTop=bt),He.selectionStart!=null)){(!be||be&&Pe<9)&&Hn();var _i=0,zi=function(){Oe.selForContextMenu==De.doc.sel&&He.selectionStart==0&&He.selectionEnd>0&&pe.prevInput=="\u200B"?vn(De,fs)(De):_i++<10?Oe.detectingSelectAll=setTimeout(zi,500):(Oe.selForContextMenu=null,Oe.input.reset())};Oe.detectingSelectAll=setTimeout(zi,200)}}if(be&&Pe>=9&&Hn(),we){nr(re);var vi=function(){Mn(window,"mouseup",vi),setTimeout(Fn,20)};Jt(window,"mouseup",vi)}else setTimeout(Fn,50)},Ba.prototype.readOnlyChanged=function(re){re||this.reset(),this.textarea.disabled=re=="nocursor",this.textarea.readOnly=!!re},Ba.prototype.setUneditable=function(){},Ba.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 He;if(re.form&&(Jt(re.form,"submit",Oe),!pe.leaveSubmitMethodAlone)){var lt=re.form;He=lt.submit;try{var bt=lt.submit=function(){Oe(),lt.submit=He,lt.submit(),lt.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=He))}},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=gi,re.Doc=Ra,re.splitLines=Hi,re.countColumn=ht,re.findColumn=ln,re.isWordChar=et,re.Pass=Et,re.signal=hn,re.Line=Xo,re.changeEnd=or,re.scrollbarModel=Id,re.Pos=Zt,re.cmpPos=rn,re.modes=Zr,re.mimeModes=ao,re.resolveMode=oi,re.getMode=$e,re.modeExtensions=nt,re.extendMode=Je,re.copyState=wt,re.startState=kt,re.innerMode=Nt,re.commands=Ka,re.keyMap=El,re.keyName=Ud,re.isModifierKey=Lh,re.lookupKey=Ql,re.normalizeKeyMap=zd,re.StringStream=_t,re.SharedTextMarker=ac,re.TextMarker=dn,re.LineWidget=_a,re.e_preventDefault=ri,re.e_stopPropagation=Ii,re.e_stop=nr,re.addClass=Ct,re.contains=gt,re.rmClass=ke,re.keyNames=Ku}um(ys),Th(ys);var ah="iter insert remove copy getEditor constructor".split(" ");for(var _f in Ra.prototype)Ra.prototype.hasOwnProperty(_f)&&dt(ah,_f)<0&&(ys.prototype[_f]=function(re){return function(){return re.apply(this.doc,arguments)}}(Ra.prototype[_f]));return ci(Ra),ys.inputStyles={textarea:Ba,contenteditable:Js},ys.defineMode=function(re){!ys.defaults.mode&&re!="null"&&(ys.defaults.mode=re),Jr.apply(this,arguments)},ys.defineMIME=lo,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){Ra.prototype[re]=pe},ys.fromTextArea=dm,Yd(ys),ys.version="5.58.2",ys})},25419:function(bn,qt,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,St=ye(rt.prevLine.stream),Et=rt.indentedCode,vt=rt.prevLine.hr,Bt=rt.list!==!1,jt=(rt.listStack[rt.listStack.length-1]||0)+3;rt.indentedCode=!1;var ln=rt.indentation;if(rt.indentationDiff===null&&(rt.indentationDiff=rt.indentation,Bt)){for(rt.list=null;ln<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=ln-rt.listStack[rt.listStack.length-1])}var $t=!St&&!vt&&!rt.prevLine.header&&(!Bt||!Et)&&!rt.prevLine.fencedCodeEnd,yn=(rt.list===!1||vt||St)&&rt.indentation<=jt&&ht.match(xe),Ut=null;if(rt.indentationDiff>=4&&(Et||rt.prevLine.fencedCodeEnd||rt.prevLine.header||St))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(!yn&&!rt.setext&&dt&&rt.indentation<=jt&&(Ut=ht.match(ge))){var Wt=Ut[1]?"ol":"ul";return rt.indentation=ln+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||(!$t||!Bt)&&!rt.quote&&rt.list===!1&&!rt.code&&!yn&&!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(yn)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 St=Le.innerMode(Te,rt.htmlState);(St.mode.name=="xml"&&St.state.tagStart===null&&!St.state.context&&St.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,St=rt.indentation<dt,Et=dt+3;if(rt.fencedEndRE&&rt.indentation<=Et&&(St||ht.match(rt.fencedEndRE))){Ie.highlightFormatting&&(rt.formatting="code-block");var vt;return St||(vt=je(rt)),rt.localMode=rt.localState=null,rt.block=Ce,rt.f=Qe,rt.fencedEndRE=null,rt.code=0,rt.thisLine.fencedCodeEnd=!0,St?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 St=(ht.listStack.length-1)%3;St?St===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 St=ht.match(ce,!0)[1]===" ";return St?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 Et=ht.next();if(rt.linkTitle){rt.linkTitle=!1;var vt=Et;Et==="("&&(vt=")"),vt=(vt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Bt="^\\s*(?:[^"+vt+"\\\\]+|\\\\\\\\|\\\\.)"+vt;if(ht.match(new RegExp(Bt),!0))return he.linkHref}if(Et==="`"){var jt=rt.formatting;Ie.highlightFormatting&&(rt.formatting="code"),ht.eatWhile("`");var ln=ht.current().length;if(rt.code==0&&(!rt.quote||ln==1))return rt.code=ln,je(rt);if(ln==rt.code){var $t=je(rt);return rt.code=0,$t}else return rt.formatting=jt,je(rt)}else if(rt.code)return je(rt);if(Et==="\\"&&(ht.next(),Ie.highlightFormatting)){var yn=je(rt),Ut=he.formatting+"-escape";return yn?yn+" "+Ut:Ut}if(Et==="!"&&ht.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return rt.imageMarker=!0,rt.image=!0,Ie.highlightFormatting&&(rt.formatting="image"),je(rt);if(Et==="["&&rt.imageMarker&&ht.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return rt.imageMarker=!1,rt.imageAltText=!0,Ie.highlightFormatting&&(rt.formatting="image"),je(rt);if(Et==="]"&&rt.imageAltText){Ie.highlightFormatting&&(rt.formatting="image");var yn=je(rt);return rt.imageAltText=!1,rt.image=!1,rt.inline=rt.f=gt,yn}if(Et==="["&&!rt.image)return rt.linkText&&ht.match(/^.*?\]/)||(rt.linkText=!0,Ie.highlightFormatting&&(rt.formatting="link")),je(rt);if(Et==="]"&&rt.linkText){Ie.highlightFormatting&&(rt.formatting="link");var yn=je(rt);return rt.linkText=!1,rt.inline=rt.f=ht.match(/\(.*?\)| ?\[.*?\]/,!1)?gt:Qe,yn}if(Et==="<"&&ht.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){rt.f=rt.inline=We,Ie.highlightFormatting&&(rt.formatting="link");var yn=je(rt);return yn?yn+=" ":yn="",yn+he.linkInline}if(Et==="<"&&ht.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){rt.f=rt.inline=We,Ie.highlightFormatting&&(rt.formatting="link");var yn=je(rt);return yn?yn+=" ":yn="",yn+he.linkEmail}if(Ie.xml&&Et==="<"&&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 Xt=ht.string.substring(ht.start,Wt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Xt)&&(rt.md_inside=!0)}return ht.backUp(1),rt.htmlState=Le.startState(Te),le(ht,rt,ke)}if(Ie.xml&&Et==="<"&&ht.match(/^\/\w*?>/))return rt.md_inside=!1,"tag";if(Et==="*"||Et==="_"){for(var mt=1,ze=ht.pos==1?" ":ht.string.charAt(ht.pos-2);mt<3&&ht.eat(Et);)mt++;var Be=ht.peek()||" ",et=!/\s/.test(Be)&&(!oe.test(Be)||/\s/.test(ze)||oe.test(ze)),qe=!/\s/.test(ze)&&(!oe.test(ze)||/\s/.test(Be)||oe.test(Be)),Ue=null,Xe=null;if(mt%2&&(!rt.em&&et&&(Et==="*"||!qe||oe.test(ze))?Ue=!0:rt.em==Et&&qe&&(Et==="*"||!et||oe.test(Be))&&(Ue=!1)),mt>1&&(!rt.strong&&et&&(Et==="*"||!qe||oe.test(ze))?Xe=!0:rt.strong==Et&&qe&&(Et==="*"||!et||oe.test(Be))&&(Xe=!1)),Xe!=null||Ue!=null){Ie.highlightFormatting&&(rt.formatting=Ue==null?"strong":Xe==null?"em":"strong em"),Ue===!0&&(rt.em=Et),Xe===!0&&(rt.strong=Et);var $t=je(rt);return Ue===!1&&(rt.em=!1),Xe===!1&&(rt.strong=!1),$t}}else if(Et===" "&&(ht.eat("*")||ht.eat("_"))){if(ht.peek()===" ")return je(rt);ht.backUp(1)}if(Ie.strikethrough){if(Et==="~"&&ht.eatWhile(Et)){if(rt.strikethrough){Ie.highlightFormatting&&(rt.formatting="strikethrough");var $t=je(rt);return rt.strikethrough=!1,$t}else if(ht.match(/^[^\s]/,!1))return rt.strikethrough=!0,Ie.highlightFormatting&&(rt.formatting="strikethrough"),je(rt)}else if(Et===" "&&ht.match(/^~~/,!0)){if(ht.peek()===" ")return je(rt);ht.backUp(2)}}if(Ie.emoji&&Et===":"&&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 Et===" "&&(ht.match(/^ +$/,!1)?rt.trailingSpace++:rt.trailingSpace&&(rt.trailingSpaceNewLine=!0)),je(rt)}function We(ht,rt){var dt=ht.next();if(dt===">"){rt.f=rt.inline=Qe,Ie.highlightFormatting&&(rt.formatting="link");var St=je(rt);return St?St+=" ":St="",St+he.linkInline}return ht.match(/^[^>]+/,!0),he.linkInline}function gt(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 St=rt.next();if(St===ht){dt.f=dt.inline=Qe,Ie.highlightFormatting&&(dt.formatting="link-string");var Et=je(dt);return dt.linkHref=!1,Et}return rt.match(ct[ht]),dt.linkHref=!0,je(dt)}}function it(ht,rt){return ht.match(/^([^\]\\]|\\.)*\]:/,!1)?(rt.f=yt,ht.next(),Ie.highlightFormatting&&(rt.formatting="link"),rt.linkText=!0,je(rt)):se(ht,rt,Qe)}function yt(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(bn,qt,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(bn,qt,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(bn,qt,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(We,gt){function ct(yt){return gt.tokenize=yt,yt(We,gt)}var Ct=We.next();if(Ct=="<")return We.eat("!")?We.eat("[")?We.match("CDATA[")?ct(z("atom","]]>")):null:We.match("--")?ct(z("comment","-->")):We.match("DOCTYPE",!0,!0)?(We.eatWhile(/[\w\._\-]/),ct(ee(1))):null:We.eat("?")?(We.eatWhile(/[\w\._\-]/),gt.tokenize=z("meta","?>"),"meta"):(ge=We.eat("/")?"closeTag":"openTag",gt.tokenize=de,"tag bracket");if(Ct=="&"){var it;return We.eat("#")?We.eat("x")?it=We.eatWhile(/[a-fA-F\d]/)&&We.eat(";"):it=We.eatWhile(/[\d]/)&&We.eat(";"):it=We.eatWhile(/[\w\.\-:]/)&&We.eat(";"),it?"atom":"error"}else return We.eatWhile(/[^&<]/),null}ve.isInText=!0;function de(We,gt){var ct=We.next();if(ct==">"||ct=="/"&&We.eat(">"))return gt.tokenize=ve,ge=ct==">"?"endTag":"selfcloseTag","tag bracket";if(ct=="=")return ge="equals",null;if(ct=="<"){gt.tokenize=ve,gt.state=le,gt.tagName=gt.tagStart=null;var Ct=gt.tokenize(We,gt);return Ct?Ct+" tag error":"tag error"}else return/[\'\"]/.test(ct)?(gt.tokenize=ue(ct),gt.stringStartCol=We.column(),gt.tokenize(We,gt)):(We.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ue(We){var gt=function(ct,Ct){for(;!ct.eol();)if(ct.next()==We){Ct.tokenize=de;break}return"string"};return gt.isInAttribute=!0,gt}function z(We,gt){return function(ct,Ct){for(;!ct.eol();){if(ct.match(gt)){Ct.tokenize=ve;break}ct.next()}return We}}function ee(We){return function(gt,ct){for(var Ct;(Ct=gt.next())!=null;){if(Ct=="<")return ct.tokenize=ee(We+1),ct.tokenize(gt,ct);if(Ct==">")if(We==1){ct.tokenize=ve;break}else return ct.tokenize=ee(We-1),ct.tokenize(gt,ct)}return"meta"}}function oe(We,gt,ct){this.prev=We.context,this.tagName=gt,this.indent=We.indented,this.startOfLine=ct,(he.doNotIndent.hasOwnProperty(gt)||We.context&&We.context.noIndent)&&(this.noIndent=!0)}function ie(We){We.context&&(We.context=We.context.prev)}function se(We,gt){for(var ct;;){if(!We.context||(ct=We.context.tagName,!he.contextGrabbers.hasOwnProperty(ct)||!he.contextGrabbers[ct].hasOwnProperty(gt)))return;ie(We)}}function le(We,gt,ct){return We=="openTag"?(ct.tagStart=gt.column(),ye):We=="closeTag"?we:le}function ye(We,gt,ct){return We=="word"?(ct.tagName=gt.current(),ce="tag",Ne):he.allowMissingTagName&&We=="endTag"?(ce="tag bracket",Ne(We,gt,ct)):(ce="error",ye)}function we(We,gt,ct){if(We=="word"){var Ct=gt.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&&We=="endTag"?(ce="tag bracket",Ce(We,gt,ct)):(ce="error",ke)}function Ce(We,gt,ct){return We!="endTag"?(ce="error",Ce):(ie(ct),le)}function ke(We,gt,ct){return ce="error",Ce(We,gt,ct)}function Ne(We,gt,ct){if(We=="word")return ce="attribute",je;if(We=="endTag"||We=="selfcloseTag"){var Ct=ct.tagName,it=ct.tagStart;return ct.tagName=ct.tagStart=null,We=="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(We,gt,ct){return We=="equals"?Ve:(he.allowMissing||(ce="error"),Ne(We,gt,ct))}function Ve(We,gt,ct){return We=="string"?Qe:We=="word"&&he.allowUnquoted?(ce="string",Ne):(ce="error",Ne(We,gt,ct))}function Qe(We,gt,ct){return We=="string"?Qe:Ne(We,gt,ct)}return{startState:function(We){var gt={tokenize:ve,state:le,indented:We||0,tagName:null,tagStart:null,context:null};return We!=null&&(gt.baseIndent=We),gt},token:function(We,gt){if(!gt.tagName&&We.sol()&&(gt.indented=We.indentation()),We.eatSpace())return null;ge=null;var ct=gt.tokenize(We,gt);return(ct||ge)&&ct!="comment"&&(ce=null,gt.state=gt.state(ge||ct,We,gt),ce&&(ct=ce=="error"?ct+" error":ce)),ct},indent:function(We,gt,ct){var Ct=We.context;if(We.tokenize.isInAttribute)return We.tagStart==We.indented?We.stringStartCol+1:We.indented+Pe;if(Ct&&Ct.noIndent)return Le.Pass;if(We.tokenize!=de&&We.tokenize!=ve)return ct?ct.match(/^(\s*)/)[0].length:0;if(We.tagName)return he.multilineTagIndentPastTag!==!1?We.tagStart+We.tagName.length+2:We.tagStart+Pe*(he.multilineTagIndentFactor||1);if(he.alignCDATA&&/<!\[CDATA\[/.test(gt))return 0;var it=gt&&/^<(\/)?([\w_:\.-]*)/.exec(gt);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 yt=he.contextGrabbers[Ct.tagName];if(yt&&yt.hasOwnProperty(it[2]))Ct=Ct.prev;else break}for(;Ct&&Ct.prev&&!Ct.startOfLine;)Ct=Ct.prev;return Ct?Ct.indent+Pe:We.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:he.htmlMode?"html":"xml",helperType:he.htmlMode?"html":"xml",skipAttribute:function(We){We.state==Ve&&(We.state=Ne)},xmlCurrentTag:function(We){return We.tagName?{name:We.tagName,close:We.type=="closeTag"}:null},xmlCurrentContext:function(We){for(var gt=[],ct=We.context;ct;ct=ct.prev)ct.tagName&>.push(ct.tagName);return gt.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(bn,qt,Ee){var Le=Ee(97671);(function(me,Ie){bn.exports=Ie()})(this,function(){"use strict";function me(Ae){var Ge=typeof Ae;return Ae!==null&&(Ge==="object"||Ge==="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(Ge,Ke){we[Pe]=Ge,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,Ge=new ue(Ce),Ke=document.createTextNode("");return Ge.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 Ge=we[Ae],Ke=we[Ae+1];Ge(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(Ge){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,Ge){var Ke=this,Ze=new this.constructor(We);Ze[Qe]===void 0&&Wt(Ze);var at=Ke._state;if(at){var xt=arguments[at-1];xe(function(){return ln(at,Ze,xt,Ke._result)})}else Bt(Ke,Ze,Ae,Ge);return Ze}function Ve(Ae){var Ge=this;if(Ae&&typeof Ae=="object"&&Ae.constructor===Ge)return Ae;var Ke=new Ge(We);return dt(Ke,Ae),Ke}var Qe=Math.random().toString(36).substring(2);function We(){}var gt=void 0,ct=1,Ct=2;function it(){return new TypeError("You cannot resolve a promise with itself")}function yt(){return new TypeError("A promises callback cannot return that same promise.")}function ut(Ae,Ge,Ke,Ze){try{Ae.call(Ge,Ke,Ze)}catch(at){return at}}function Ft(Ae,Ge,Ke){xe(function(Ze){var at=!1,xt=ut(Ke,Ge,function(tn){at||(at=!0,Ge!==tn?dt(Ze,tn):Et(Ze,tn))},function(tn){at||(at=!0,vt(Ze,tn))},"Settle: "+(Ze._label||" unknown promise"));!at&&xt&&(at=!0,vt(Ze,xt))},Ae)}function ht(Ae,Ge){Ge._state===ct?Et(Ae,Ge._result):Ge._state===Ct?vt(Ae,Ge._result):Bt(Ge,void 0,function(Ke){return dt(Ae,Ke)},function(Ke){return vt(Ae,Ke)})}function rt(Ae,Ge,Ke){Ge.constructor===Ae.constructor&&Ke===je&&Ge.constructor.resolve===Ve?ht(Ae,Ge):Ke===void 0?Et(Ae,Ge):Ie(Ke)?Ft(Ae,Ge,Ke):Et(Ae,Ge)}function dt(Ae,Ge){if(Ae===Ge)vt(Ae,it());else if(me(Ge)){var Ke=void 0;try{Ke=Ge.then}catch(Ze){vt(Ae,Ze);return}rt(Ae,Ge,Ke)}else Et(Ae,Ge)}function St(Ae){Ae._onerror&&Ae._onerror(Ae._result),jt(Ae)}function Et(Ae,Ge){Ae._state===gt&&(Ae._result=Ge,Ae._state=ct,Ae._subscribers.length!==0&&xe(jt,Ae))}function vt(Ae,Ge){Ae._state===gt&&(Ae._state=Ct,Ae._result=Ge,xe(St,Ae))}function Bt(Ae,Ge,Ke,Ze){var at=Ae._subscribers,xt=at.length;Ae._onerror=null,at[xt]=Ge,at[xt+ct]=Ke,at[xt+Ct]=Ze,xt===0&&Ae._state&&xe(jt,Ae)}function jt(Ae){var Ge=Ae._subscribers,Ke=Ae._state;if(Ge.length!==0){for(var Ze=void 0,at=void 0,xt=Ae._result,tn=0;tn<Ge.length;tn+=3)Ze=Ge[tn],at=Ge[tn+Ke],Ze?ln(Ke,Ze,at,xt):at(xt);Ae._subscribers.length=0}}function ln(Ae,Ge,Ke,Ze){var at=Ie(Ke),xt=void 0,tn=void 0,nn=!0;if(at){try{xt=Ke(Ze)}catch(Jt){nn=!1,tn=Jt}if(Ge===xt){vt(Ge,yt());return}}else xt=Ze;Ge._state!==gt||(at&&nn?dt(Ge,xt):nn===!1?vt(Ge,tn):Ae===ct?Et(Ge,xt):Ae===Ct&&vt(Ge,xt))}function $t(Ae,Ge){try{Ge(function(Ze){dt(Ae,Ze)},function(Ze){vt(Ae,Ze)})}catch(Ke){vt(Ae,Ke)}}var yn=0;function Ut(){return yn++}function Wt(Ae){Ae[Qe]=yn++,Ae._state=void 0,Ae._result=void 0,Ae._subscribers=[]}function Xt(){return new Error("Array Methods must be provided an Array")}var mt=function(){function Ae(Ge,Ke){this._instanceConstructor=Ge,this.promise=new Ge(We),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?Et(this.promise,this._result):(this.length=this.length||0,this._enumerate(Ke),this._remaining===0&&Et(this.promise,this._result))):vt(this.promise,Xt())}return Ae.prototype._enumerate=function(Ke){for(var Ze=0;this._state===gt&&Ze<Ke.length;Ze++)this._eachEntry(Ke[Ze],Ze)},Ae.prototype._eachEntry=function(Ke,Ze){var at=this._instanceConstructor,xt=at.resolve;if(xt===Ve){var tn=void 0,nn=void 0,Jt=!1;try{tn=Ke.then}catch(Mn){Jt=!0,nn=Mn}if(tn===je&&Ke._state!==gt)this._settledAt(Ke._state,Ze,Ke._result);else if(typeof tn!="function")this._remaining--,this._result[Ze]=Ke;else if(at===Xe){var pn=new at(We);Jt?vt(pn,nn):rt(pn,Ke,tn),this._willSettleAt(pn,Ze)}else this._willSettleAt(new at(function(Mn){return Mn(Ke)}),Ze)}else this._willSettleAt(xt(Ke),Ze)},Ae.prototype._settledAt=function(Ke,Ze,at){var xt=this.promise;xt._state===gt&&(this._remaining--,Ke===Ct?vt(xt,at):this._result[Ze]=at),this._remaining===0&&Et(xt,this._result)},Ae.prototype._willSettleAt=function(Ke,Ze){var at=this;Bt(Ke,void 0,function(xt){return at._settledAt(ct,Ze,xt)},function(xt){return at._settledAt(Ct,Ze,xt)})},Ae}();function ze(Ae){return new mt(this,Ae).promise}function Be(Ae){var Ge=this;return be(Ae)?new Ge(function(Ke,Ze){for(var at=Ae.length,xt=0;xt<at;xt++)Ge.resolve(Ae[xt]).then(Ke,Ze)}):new Ge(function(Ke,Ze){return Ze(new TypeError("You must pass an array to race."))})}function et(Ae){var Ge=this,Ke=new Ge(We);return vt(Ke,Ae),Ke}function qe(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Ue(){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(Ge){this[Qe]=Ut(),this._result=this._state=void 0,this._subscribers=[],We!==Ge&&(typeof Ge!="function"&&qe(),this instanceof Ae?$t(this,Ge):Ue())}return Ae.prototype.catch=function(Ke){return this.then(null,Ke)},Ae.prototype.finally=function(Ke){var Ze=this,at=Ze.constructor;return Ie(Ke)?Ze.then(function(xt){return at.resolve(Ke()).then(function(){return xt})},function(xt){return at.resolve(Ke()).then(function(){throw xt})}):Ze.then(Ke,Ke)},Ae}();Xe.prototype.then=je,Xe.all=ze,Xe.race=Be,Xe.resolve=Ve,Xe.reject=et,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 Ge=Ae.Promise;if(Ge){var Ke=null;try{Ke=Object.prototype.toString.call(Ge.resolve())}catch(Ze){}if(Ke==="[object Promise]"&&!Ge.cast)return}Ae.Promise=Xe}return Xe.polyfill=Re,Xe.Promise=Xe,Xe})},86204:function(bn){"use strict";var qt=typeof Reflect=="object"?Reflect:null,Ee=qt&&typeof qt.apply=="function"?qt.apply:function(le,ye,we){return Function.prototype.apply.call(le,ye,we)},Le;qt&&typeof qt.ownKeys=="function"?Le=qt.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)}bn.exports=Te,bn.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,We=de(Ve,Qe),we=0;we<Qe;++we)Ee(We[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(bn,qt,Ee){"use strict";Ee.d(qt,{$u:function(){return xe},BD:function(){return mt},E9:function(){return Se},FF:function(){return eo},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 at},YI:function(){return Wt},ZA:function(){return Ie},Zt:function(){return ce},al:function(){return Ue},bn:function(){return qe},bx:function(){return ze},g2:function(){return Xt},h1:function(){return Ve},hD:function(){return ci},l4:function(){return Pe},rU:function(){return Ze},s_:function(){return Be},uz:function(){return Ge},z6:function(){return ve}}),bn=Ee.hmd(bn),function(){var st;function Rr(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Er(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Rr(a)}}function yo(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Zr=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},ao;if(typeof Object.setPrototypeOf=="function")ao=Object.setPrototypeOf;else{var Jr;e:{var lo={a:!0},oi={};try{oi.__proto__=lo,Jr=oi.a;break e}catch(a){}Jr=!1}ao=Jr?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var $e=ao;function nt(a,y){if(a.prototype=Zr(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 _t=typeof globalThis=="object"&&globalThis||typeof Ee.g=="object"&&Ee.g.global===Ee.g&&Ee.g||typeof self=="object"&&self.self===self&&self||{};_t.requestAnimationFrame===void 0&&(_t.setImmediate===void 0?_t.requestAnimationFrame=function(a){_t.setTimeout(a,0)}:_t.requestAnimationFrame=_t.setImmediate);function un(){}function wn(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&_t.clearTimeout(x),x=Bn(function(){x=-1,a.apply(b,E)},y)}}function Bn(a,y){return _t.setTimeout(a,y)}function zn(a){return _t.document.createElement(a)}function At(a){throw Error(a)}function Kt(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 Sn(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 kn(a){_t.console&&_t.console.log(a)}function Zt(a){return typeof a=="object"&&a!==null}function rn(a){return Array.isArray(a)||_t.NodeList&&a instanceof _t.NodeList||_t.HTMLCollection&&a instanceof _t.HTMLCollection}function Rn(a){return Array.prototype.slice.call(a)}function An(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 Un(){var a=Di.pop();return a===void 0?[]:a}function qn(a){a.length=0,Di.push(a)}function Nn(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(Zt(a)&&a.constructor)return Nn(a.constructor);return typeof a}function si(a){var y=a;return Zt(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 Li(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 Bi(a,y,x){Object.defineProperty(Uo.prototype,a,{get:y,set:x})}function Ln(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 Ui=_t.navigator!==void 0&&0<_t.navigator.userAgent.indexOf("Trident/7"),lr=_t.navigator!==void 0&&_t.navigator.platform!==void 0&&_t.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Di=[];Object.freeze([]),un.className="Util",un.Dx="32ab5ff3b26f42dc0ed90f21472913b5",un.adym="gojs.net",un.vfo="28e645fdb266",un.className="Util";function Pn(a,y,x){wr(this),this.j=a,this.xa=y,this.o=x}Pn.prototype.toString=function(){return"EnumValue."+this.xa};function Yn(a,y){return y==null||y===""?null:a[y]}Je.Object.defineProperties(Pn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Pn.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 Ti(){}Ti.className="PropertyCollection";var pi={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){_t.console&&_t.console.log(a)},HA:function(a,y,x,b){a.strokeStyle="red",a.fillStyle="red",a.font="8px sans-serif",a.beginPath(),a.moveTo(-10,0),a.lineTo(10,0),a.moveTo(0,-10),a.lineTo(0,10),a.stroke(),a.setTransform(1,0,0,1,0,0),a.scale(x,x),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.lineWidth=2,a.beginPath(),a.moveTo(b.left,b.top+20),a.lineTo(b.left,b.top),a.lineTo(b.left+20,b.top),a.moveTo(b.right,b.bottom-20),a.lineTo(b.right,b.bottom),a.lineTo(b.right-20,b.bottom),a.stroke(),a.fillText("DB: "+Math.round(b.x)+", "+Math.round(b.y)+", "+Math.round(b.width)+", "+Math.round(b.height),b.left,b.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var b=a[y.x];if(b.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(b.prototype);for(var E={Tj:0};E.Tj<y.Zl.length;E={Tj:E.Tj},E.Tj++){var te=Object.getOwnPropertyDescriptor(b.prototype,y.Zl[E.Tj]);te.get!==void 0&&te.set===void 0&&Object.defineProperty(b.prototype,y.Zl[E.Tj],{set:function(ne,ae){return function(){throw Error("Property "+ne.Zl[ae.Tj]+" of "+ne.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Mi(){}Mi.prototype.reset=function(){},Mi.prototype.next=function(){return!1},Mi.prototype.Ad=function(){return!1},Mi.prototype.first=function(){return null},Mi.prototype.any=function(){return!1},Mi.prototype.all=function(){return!0},Mi.prototype.each=function(){return this},Mi.prototype.map=function(){return this},Mi.prototype.filter=function(){return this},Mi.prototype.de=function(){},Mi.prototype.toString=function(){return"EmptyIterator"},Je.Object.defineProperties(Mi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Mi.prototype.first=Mi.prototype.first,Mi.prototype.hasNext=Mi.prototype.Ad,Mi.prototype.next=Mi.prototype.next,Mi.prototype.reset=Mi.prototype.reset;var ir=null;Mi.className="EmptyIterator",ir=new Mi;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):ir},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 Wi(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Wi.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Wi.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},Wi.prototype.Ad=function(){return this.next()},Wi.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},Wi.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},Wi.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},Wi.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},Wi.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 In,a.s=x,a.xb(),a.iterator},Wi.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 In,a.s=x,a.xb(),a.iterator},Wi.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Wi.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Je.Object.defineProperties(Wi.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}}}),Wi.prototype.first=Wi.prototype.first,Wi.prototype.hasNext=Wi.prototype.Ad,Wi.prototype.next=Wi.prototype.next,Wi.prototype.reset=Wi.prototype.reset,Wi.className="ListIterator";function hr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}hr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},hr.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;var y=--this.Za;return 0<=y?(this.key=y,this.value=a.s[y],!0):(this.de(),!1)},hr.prototype.Ad=function(){return this.next()},hr.prototype.first=function(){var a=this.Bb;this.qa=a.Ja;var y=a.s;return this.Za=a=y.length-1,0<=a?(y=y[a],this.key=a,this.value=y):null},hr.prototype.any=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)if(a(y[x]))return!0;return!1},hr.prototype.all=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)if(!a(y[x]))return!1;return!0},hr.prototype.each=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)a(y[x]);return this},hr.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--)x.push(a(y[b]));return a=new In,a.s=x,a.xb(),a.iterator},hr.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--){var E=y[b];a(E)&&x.push(E)}return a=new In,a.s=x,a.xb(),a.iterator},hr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},hr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Je.Object.defineProperties(hr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),hr.prototype.first=hr.prototype.first,hr.prototype.hasNext=hr.prototype.Ad,hr.prototype.next=hr.prototype.next,hr.prototype.reset=hr.prototype.reset,hr.className="ListIteratorBackwards";function In(a){wr(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)}st=In.prototype,st.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},st.freeze=function(){return this._isFrozen=!0,this},st.ka=function(){return this._isFrozen=!1,this},st.toString=function(){return"List()#"+Ar(this)},st.add=function(a){return a===null?this:(this._isFrozen&&Kt(this,a),this.s.push(a),this.xb(),this)},st.push=function(a){this.add(a)},st.addAll=function(a){if(a===null)return this;this._isFrozen&&Kt(this);var y=this.s;if(rn(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},st.clear=function(){this._isFrozen&&Kt(this),this.s.length=0,this.xb()},st.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},st.has=function(a){return this.contains(a)},st.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},st.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Sn(a,"0 <= i < length",In,"elt:i"),y[a]},st.get=function(a){return this.M(a)},st.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Sn(a,"0 <= i < length",In,"setElt:i"),this._isFrozen&&Kt(this,a),x[a]=y},st.set=function(a,y){this.cd(a,y)},st.first=function(){var a=this.s;return a.length===0?null:a[0]},st.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},st.pop=function(){this._isFrozen&&Kt(this);var a=this.s;return 0<a.length?a.pop():null},In.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},In.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},In.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},In.prototype.map=function(a){for(var y=new In,x=[],b=this.s,E=b.length,te=0;te<E;te++)x.push(a(b[te]));return y.s=x,y.xb(),y},In.prototype.filter=function(a){for(var y=new In,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},st=In.prototype,st.Gb=function(a,y){0>a&&Sn(a,">= 0",In,"insertAt:i"),this._isFrozen&&Kt(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},st.remove=function(a){if(a===null)return!1;this._isFrozen&&Kt(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)},st.delete=function(a){return this.remove(a)},st.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Sn(a,"0 <= i < length",In,"removeAt:i"),this._isFrozen&&Kt(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},st.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&&Kt(this);for(var E=a,te=y+1;te<b;)x[E++]=x[te++];return x.length=b-(y-a+1),this.xb(),this},In.prototype.copy=function(){var a=new In,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},st=In.prototype,st.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},st.Iv=function(){for(var a=new On,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},st.sort=function(a){return this._isFrozen&&Kt(this),this.s.sort(a),this.xb(),this},st.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&Kt(this);var te=x-y;if(1>=te)return this;if((0>y||y>=E-1)&&Sn(y,"0 <= from < length",In,"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},st.reverse=function(){return this._isFrozen&&Kt(this),this.s.reverse(),this.xb(),this},Je.Object.defineProperties(In.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 ir;var a=this.Sa;return a!==null?(a.reset(),a):new Wi(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return ir;var a=this.Hg;return a!==null?(a.reset(),a):new hr(this)}}}),In.prototype.reverse=In.prototype.reverse,In.prototype.sortRange=In.prototype.zi,In.prototype.sort=In.prototype.sort,In.prototype.toSet=In.prototype.Iv,In.prototype.toArray=In.prototype.Fa,In.prototype.removeRange=In.prototype.removeRange,In.prototype.removeAt=In.prototype.mb,In.prototype.delete=In.prototype.delete,In.prototype.remove=In.prototype.remove,In.prototype.insertAt=In.prototype.Gb,In.prototype.pop=In.prototype.pop,In.prototype.last=In.prototype.jc,In.prototype.first=In.prototype.first,In.prototype.set=In.prototype.set,In.prototype.setElt=In.prototype.cd,In.prototype.get=In.prototype.get,In.prototype.elt=In.prototype.M,In.prototype.indexOf=In.prototype.indexOf,In.prototype.has=In.prototype.has,In.prototype.contains=In.prototype.contains,In.prototype.clear=In.prototype.clear,In.prototype.addAll=In.prototype.addAll,In.prototype.push=In.prototype.push,In.prototype.add=In.prototype.add,In.prototype.thaw=In.prototype.ka,In.prototype.freeze=In.prototype.freeze,In.className="List";function zr(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}zr.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},zr.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)},zr.prototype.Ad=function(){return this.next()},zr.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},zr.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},zr.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},zr.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},zr.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new In;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},zr.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new In;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},zr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},zr.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Je.Object.defineProperties(zr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),zr.prototype.first=zr.prototype.first,zr.prototype.hasNext=zr.prototype.Ad,zr.prototype.next=zr.prototype.next,zr.prototype.reset=zr.prototype.reset,zr.className="SetIterator";function On(a){wr(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)}st=On.prototype,st.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},st.freeze=function(){return this._isFrozen=!0,this},st.ka=function(){return this._isFrozen=!1,this},st.toString=function(){return"Set()#"+Ar(this)},st.add=function(a){if(a===null)return this;this._isFrozen&&Kt(this,a);var y=a;return Zt(a)&&(y=po(a)),this.Tb[y]===void 0&&(this.Sb++,a=new fr(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},st.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Kt(this),rn(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},st.contains=function(a){if(a===null)return!1;var y=a;return Zt(a)&&(y=Ar(a),y===void 0)?!1:this.Tb[y]!==void 0},st.has=function(a){return this.contains(a)},st.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},st.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},st.first=function(){var a=this.ea;return a===null?null:a.value},On.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},On.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},On.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},On.prototype.map=function(a){for(var y=new On,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},On.prototype.filter=function(a){for(var y=new On,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},st=On.prototype,st.remove=function(a){if(a===null)return!1;this._isFrozen&&Kt(this,a);var y=a;if(Zt(a)&&(y=Ar(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},st.delete=function(a){return this.remove(a)},st.hp=function(a){if(a===null)return this;if(this._isFrozen&&Kt(this),rn(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},st.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Kt(this);var y=new On;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},st.clear=function(){this._isFrozen&&Kt(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},On.prototype.copy=function(){var a=new On,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},On.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},On.prototype.Hv=function(){var a=new In,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function wr(a){a.__gohashid=To++}function po(a){var y=a.__gohashid;return y===void 0&&(y=To++,a.__gohashid=y),y}function Ar(a){return a.__gohashid}Je.Object.defineProperties(On.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return ir;var a=this.Sa;return a!==null?(a.reset(),a):new zr(this)}}}),On.prototype.toList=On.prototype.Hv,On.prototype.toArray=On.prototype.Fa,On.prototype.clear=On.prototype.clear,On.prototype.retainAll=On.prototype.pA,On.prototype.removeAll=On.prototype.hp,On.prototype.delete=On.prototype.delete,On.prototype.remove=On.prototype.remove,On.prototype.first=On.prototype.first,On.prototype.containsAny=On.prototype.Ty,On.prototype.containsAll=On.prototype.Sy,On.prototype.has=On.prototype.has,On.prototype.contains=On.prototype.contains,On.prototype.addAll=On.prototype.addAll,On.prototype.add=On.prototype.add,On.prototype.thaw=On.prototype.ka,On.prototype.freeze=On.prototype.freeze;var To=1;On.className="Set",On.uniqueHash=wr,On.hashIdUnique=po,On.hashId=Ar;function oo(a){this.ma=a,this.qa=a.Ja,this.sa=null}oo.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},oo.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=this.key=a=y.key,!0):(this.de(),!1)},oo.prototype.Ad=function(){return this.next()},oo.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.value=this.key=a=a.key):null},oo.prototype.any=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},oo.prototype.all=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},oo.prototype.each=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;)a(y.key),y=y.va;return this},oo.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new In;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},oo.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new In;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},oo.prototype.de=function(){this.value=this.key=null,this.qa=-1},oo.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Je.Object.defineProperties(oo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),oo.prototype.first=oo.prototype.first,oo.prototype.hasNext=oo.prototype.Ad,oo.prototype.next=oo.prototype.next,oo.prototype.reset=oo.prototype.reset,oo.className="MapKeySetIterator";function $i(a){On.call(this),wr(this),this._isFrozen=!0,this.ma=a}nt($i,On),st=$i.prototype,st.freeze=function(){return this},st.ka=function(){return this},st.toString=function(){return"MapKeySet("+this.ma.toString()+")"},st.add=function(){At("This Set is read-only: "+this.toString())},st.contains=function(a){return this.ma.contains(a)},st.has=function(a){return this.contains(a)},st.remove=function(){At("This Set is read-only: "+this.toString())},st.delete=function(a){return this.remove(a)},st.clear=function(){At("This Set is read-only: "+this.toString())},st.first=function(){var a=this.ma.ea;return a!==null?a.key:null},$i.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},$i.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},$i.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},$i.prototype.map=function(a){for(var y=new On,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},$i.prototype.filter=function(a){for(var y=new On,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},$i.prototype.copy=function(){return new $i(this.ma)},$i.prototype.Iv=function(){var a=new On,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},$i.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},$i.prototype.Hv=function(){var a=new In,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Je.Object.defineProperties($i.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?ir:new oo(this.ma)}}}),$i.prototype.toList=$i.prototype.Hv,$i.prototype.toArray=$i.prototype.Fa,$i.prototype.toSet=$i.prototype.Iv,$i.prototype.first=$i.prototype.first,$i.prototype.clear=$i.prototype.clear,$i.prototype.delete=$i.prototype.delete,$i.prototype.remove=$i.prototype.remove,$i.prototype.has=$i.prototype.has,$i.prototype.contains=$i.prototype.contains,$i.prototype.add=$i.prototype.add,$i.prototype.thaw=$i.prototype.ka,$i.prototype.freeze=$i.prototype.freeze,$i.className="MapKeySet";function Qi(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Qi.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Qi.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},Qi.prototype.Ad=function(){return this.next()},Qi.prototype.first=function(){var a=this.ma;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},Qi.prototype.any=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Qi.prototype.all=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Qi.prototype.each=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},Qi.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new In;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Qi.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new In;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Qi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Qi.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Je.Object.defineProperties(Qi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Qi.prototype.first=Qi.prototype.first,Qi.prototype.hasNext=Qi.prototype.Ad,Qi.prototype.next=Qi.prototype.next,Qi.prototype.reset=Qi.prototype.reset,Qi.className="MapValueSetIterator";function fr(a,y){this.key=a,this.value=y,this.ll=this.va=null}fr.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},fr.className="KeyValuePair";function Mr(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Mr.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Mr.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)},Mr.prototype.Ad=function(){return this.next()},Mr.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},Mr.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},Mr.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},Mr.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},Mr.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new In;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Mr.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new In;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Mr.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Mr.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Je.Object.defineProperties(Mr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Mr.prototype.first=Mr.prototype.first,Mr.prototype.hasNext=Mr.prototype.Ad,Mr.prototype.next=Mr.prototype.next,Mr.prototype.reset=Mr.prototype.reset,Mr.className="MapIterator";function fi(a){wr(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)}st=fi.prototype,st.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},st.freeze=function(){return this._isFrozen=!0,this},st.ka=function(){return this._isFrozen=!1,this},st.toString=function(){return"Map()#"+Ar(this)},st.add=function(a,y){this._isFrozen&&Kt(this,a);var x=a;Zt(a)&&(x=po(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new fr(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},st.set=function(a,y){return this.add(a,y)},st.addAll=function(a){if(a===null)return this;if(rn(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 fi)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},st.first=function(){return this.ea},fi.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},fi.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},fi.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},fi.prototype.map=function(a){for(var y=new fi,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},fi.prototype.filter=function(a){for(var y=new fi,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},st=fi.prototype,st.contains=function(a){var y=a;return Zt(a)&&(y=Ar(a),y===void 0)?!1:this.Tb[y]!==void 0},st.has=function(a){return this.contains(a)},st.I=function(a){var y=a;return Zt(a)&&(y=Ar(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},st.get=function(a){return this.I(a)},st.remove=function(a){if(a===null)return!1;this._isFrozen&&Kt(this,a);var y=a;if(Zt(a)&&(y=Ar(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},st.delete=function(a){return this.remove(a)},st.clear=function(){this._isFrozen&&Kt(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()},fi.prototype.copy=function(){var a=new fi,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},fi.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 fr(E.key,E.value),x++}return y},fi.prototype.Lf=function(){return new $i(this)},Je.Object.defineProperties(fi.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return ir;var a=this.Sa;return a!==null?(a.reset(),a):new Mr(this)}},iteratorKeys:{get:function(){return 0>=this.count?ir:new oo(this)}},iteratorValues:{get:function(){if(0>=this.count)return ir;var a=this.jf;return a!==null?(a.reset(),a):new Qi(this)}}}),fi.prototype.toKeySet=fi.prototype.Lf,fi.prototype.toArray=fi.prototype.Fa,fi.prototype.clear=fi.prototype.clear,fi.prototype.delete=fi.prototype.delete,fi.prototype.remove=fi.prototype.remove,fi.prototype.get=fi.prototype.get,fi.prototype.getValue=fi.prototype.I,fi.prototype.has=fi.prototype.has,fi.prototype.contains=fi.prototype.contains,fi.prototype.first=fi.prototype.first,fi.prototype.addAll=fi.prototype.addAll,fi.prototype.set=fi.prototype.set,fi.prototype.add=fi.prototype.add,fi.prototype.thaw=fi.prototype.ka,fi.prototype.freeze=fi.prototype.freeze,fi.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 Ir,ho,Zo,Po,$o;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},st=Tt.prototype,st.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},st.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},st.freeze=function(){return this._isFrozen=!0,this},st.ka=function(){return Object.isFrozen(this)&&At("cannot thaw constant: "+this),this._isFrozen=!1,this};function Yo(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 Sr(a){return a.x.toString()+" "+a.y.toString()}st.toString=function(){return"Point("+this.x+","+this.y+")"},st.D=function(a){return a instanceof Tt?this.x===a.x&&this.y===a.y:!1},st.hi=function(a,y){return this.x===a&&this.y===y},st.Xa=function(a){return on.B(this.x,a.x)&&on.B(this.y,a.y)},st.add=function(a){return this.x+=a.x,this.y+=a.y,this},st.re=function(a){return this.x-=a.x,this.y-=a.y,this},st.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},st=Tt.prototype,st.scale=function(a,y){return this.x*=a,this.y*=y,this},st.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},st.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},st.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},st.ab=function(a){return yr(a.x-this.x,a.y-this.y)},st.direction=function(a,y){return yr(a-this.x,y-this.y)};function yr(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}st.Ry=function(a,y){return on.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},st.fA=function(a,y,x,b){return on.qh(a,y,x,b,this.x,this.y,this),this},st.gA=function(a,y){return on.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},st.uA=function(a,y,x,b){return on.No(this.x,this.y,a,y,x,b,this),this},st.vA=function(a,y){return on.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},st.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},st.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},st.transform=function(a){return a.Ga(this),this};function qi(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 _o(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function rr(a,y,x,b){return a=x-a,y=b-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(b=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?b=0>y?b+180:180-b:0>y&&(b=360-b),b)}st.w=function(){return isFinite(this.x)&&isFinite(this.y)},Tt.alloc=function(){var a=ji.pop();return a===void 0?new Tt:a},Tt.allocAt=function(a,y){var x=ji.pop();return x===void 0?new Tt(a,y):(x.x=a,x.y=y,x)},Tt.free=function(a){ji.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 on.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 on.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 ji=[];Tt.className="Point",Tt.parse=Yo,Tt.stringify=Sr,Tt.distanceLineSegmentSquared=Qr,Tt.distanceSquared=_o,Tt.direction=rr,Tt.Origin=Ir=new Tt(0,0).ja(),Tt.InfiniteTopLeft=ho=new Tt(-1/0,-1/0).ja(),Tt.InfiniteBottomRight=Zo=new Tt(1/0,1/0).ja(),Tt.SixPoint=Po=new Tt(6,6).ja(),Tt.NoPoint=$o=new Tt(NaN,NaN).ja(),Tt.parse=Yo,Tt.stringify=Sr,Tt.distanceLineSegmentSquared=Qr,Tt.distanceSquared=_o,Tt.direction=rr;function Xn(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 er,no,Lo,ko,Xo,Ss,os;Xn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Xn.prototype.h=function(a,y){return this.width=a,this.height=y,this},Xn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Xn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Xn.prototype.copy=function(){var a=new Xn;return a.width=this.width,a.height=this.height,a},st=Xn.prototype,st.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},st.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},st.freeze=function(){return this._isFrozen=!0,this},st.ka=function(){return Object.isFrozen(this)&&At("cannot thaw constant: "+this),this._isFrozen=!1,this};function Is(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 Xn(x,E)}return new Xn}function ps(a){return a.width.toString()+" "+a.height.toString()}st.toString=function(){return"Size("+this.width+","+this.height+")"},st.D=function(a){return a instanceof Xn?this.width===a.width&&this.height===a.height:!1},st.hi=function(a,y){return this.width===a&&this.height===y},st.Xa=function(a){return on.B(this.width,a.width)&&on.B(this.height,a.height)},st.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},st.w=function(){return isFinite(this.width)&&isFinite(this.height)},Xn.alloc=function(){var a=sa.pop();return a===void 0?new Xn:a},Xn.free=function(a){sa.push(a)},Xn.prototype.isReal=Xn.prototype.w,Xn.prototype.inflate=Xn.prototype.Bc,Xn.prototype.equalsApprox=Xn.prototype.Xa,Xn.prototype.equalTo=Xn.prototype.hi,Xn.prototype.equals=Xn.prototype.D,Xn.prototype.set=Xn.prototype.set,Xn.prototype.setTo=Xn.prototype.sg;var sa=[];Xn.className="Size",Xn.parse=Is,Xn.stringify=ps,Xn.ZeroSize=er=new Xn(0,0).ja(),Xn.OneSize=no=new Xn(1,1).ja(),Xn.SixSize=Lo=new Xn(6,6).ja(),Xn.EightSize=ko=new Xn(8,8).ja(),Xn.TenSize=Xo=new Xn(10,10).ja(),Xn.InfiniteSize=Ss=new Xn(1/0,1/0).ja(),Xn.NoSize=os=new Xn(NaN,NaN).ja(),Xn.parse=Is,Xn.stringify=ps;function _n(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 Xn?(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}st=_n.prototype,st.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},st.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Cs(a,y,x){a.width=y,a.height=x}st.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},st.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},st.dd=function(a){return this.x=a.x,this.y=a.y,this},st.tA=function(a){return this.width=a.width,this.height=a.height,this},_n.prototype.copy=function(){var a=new _n;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},st=_n.prototype,st.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},st.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},st.freeze=function(){return this._isFrozen=!0,this},st.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 _n(x,E,te,ne)}return new _n}function Na(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}st.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},st.D=function(a){return a instanceof _n?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},st.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},st.Xa=function(a){return on.B(this.x,a.x)&&on.B(this.y,a.y)&&on.B(this.width,a.width)&&on.B(this.height,a.height)};function ma(a,y){return on.$(a.x,y.x)&&on.$(a.y,y.y)&&on.$(a.width,y.width)&&on.$(a.height,y.height)}st.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},st.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},st.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},st.offset=function(a,y){return this.x+=a,this.y+=y,this},st.Bc=function(a,y){return gs(this,y,a,y,a)},st.Co=function(a){return gs(this,a.top,a.right,a.bottom,a.left)},st.Fv=function(a){return gs(this,-a.top,-a.right,-a.bottom,-a.left)},st.Hz=function(a,y,x,b){return gs(this,a,y,x,b)};function gs(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}st.Ex=function(a){return su(this,a.x,a.y,a.width,a.height)},st.Uu=function(a,y,x,b){return su(this,a,y,x,b)};function su(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}st.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},st.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 au(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))}st.Ye=function(a){return fo(this,a.x,a.y,0,0)},st.ed=function(a){return fo(this,a.x,a.y,a.width,a.height)},st.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),fo(this,a,y,x,b)};function fo(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}st.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 Lr(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 La(a,y,x,b,E,te,ne,ae){return a>ne+E||E>x+a?!1:!(y>ae+te||te>b+y)}st.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},st.Mz=function(){return this.width===0&&this.height===0},_n.alloc=function(){var a=Kr.pop();return a===void 0?new _n:a},_n.allocAt=function(a,y,x,b){var E=Kr.pop();return E===void 0?new _n(a,y,x,b):E.h(a,y,x,b)},_n.free=function(a){Kr.push(a)},Je.Object.defineProperties(_n.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 Xn(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}}}),_n.prototype.isEmpty=_n.prototype.Mz,_n.prototype.isReal=_n.prototype.w,_n.intersectsLineSegment=function(a,y,x,b,E,te,ne,ae){return on.Fx(a,y,x,b,E,te,ne,ae)},_n.prototype.setSpot=_n.prototype.yi,_n.prototype.union=_n.prototype.Kv,_n.prototype.unionRect=_n.prototype.ed,_n.prototype.unionPoint=_n.prototype.Ye,_n.prototype.intersects=_n.prototype.Vu,_n.prototype.intersectsRect=_n.prototype.Yc,_n.prototype.intersect=_n.prototype.Uu,_n.prototype.intersectRect=_n.prototype.Ex,_n.prototype.grow=_n.prototype.Hz,_n.prototype.subtractMargin=_n.prototype.Fv,_n.prototype.addMargin=_n.prototype.Co,_n.prototype.inflate=_n.prototype.Bc,_n.prototype.offset=_n.prototype.offset,_n.prototype.contains=_n.prototype.contains,_n.prototype.containsRect=_n.prototype.Re,_n.prototype.containsPoint=_n.prototype.ca,_n.prototype.equalsApprox=_n.prototype.Xa,_n.prototype.equalTo=_n.prototype.hi,_n.prototype.equals=_n.prototype.D,_n.prototype.setSize=_n.prototype.tA,_n.prototype.setPoint=_n.prototype.dd,_n.prototype.set=_n.prototype.set,_n.prototype.setTo=_n.prototype.sg;var Cr=null,to=null,Kr=[];_n.className="Rect",_n.parse=Pu,_n.stringify=Na,_n.contains=Lr,_n.intersects=La,_n.ZeroRect=Cr=new _n(0,0,0,0).ja(),_n.NoRect=to=new _n(NaN,NaN,NaN,NaN).ja(),_n.parse=Pu,_n.stringify=Na,_n.contains=Lr,_n.intersects=La;function Ci(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}Ci.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ci.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Ci.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Ci.prototype.copy=function(){var a=new Ci;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},st=Ci.prototype,st.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},st.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},st.freeze=function(){return this._isFrozen=!0,this},st.ka=function(){return Object.isFrozen(this)&&At("cannot thaw constant: "+this),this._isFrozen=!1,this};function us(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 Ci;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Ci(x);for(var te=NaN;a[y]==="";)y++;if((b=a[y++])&&(te=parseFloat(b)),isNaN(te))return new Ci(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new Ci(x,E):new Ci(x,E,te,ne)}return new Ci}function Ts(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}st.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},st.D=function(a){return a instanceof Ci?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},st.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},st.Xa=function(a){return on.B(this.top,a.top)&&on.B(this.right,a.right)&&on.B(this.bottom,a.bottom)&&on.B(this.left,a.left)},st.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Ci.alloc=function(){var a=Qa.pop();return a===void 0?new Ci:a},Ci.free=function(a){Qa.push(a)},Ci.prototype.isReal=Ci.prototype.w,Ci.prototype.equalsApprox=Ci.prototype.Xa,Ci.prototype.equalTo=Ci.prototype.hi,Ci.prototype.equals=Ci.prototype.D,Ci.prototype.set=Ci.prototype.set,Ci.prototype.setTo=Ci.prototype.sg;var ba=null,Ha=null,Qa=[];Ci.className="Margin",Ci.parse=us,Ci.stringify=Ts,Ci.ZeroMargin=ba=new Ci(0,0,0,0).ja(),Ci.TwoMargin=Ha=new Ci(2,2,2,2).ja(),Ci.parse=us,Ci.stringify=Ts;function yi(a,y,x,b){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=b),this._isFrozen=!1}var ms,Ys,qa,xl,Ol,Fr,nc,Oa,Ua,ka,Kl,_u,Ga,Wa,Uu,yc,Eu,Il,Sc,Gu,Lu,wl,th,xc,lu,so,zo,Ma,na,Ds,Ps,ks,Ws,Zs,Vl,Dl;yi.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},yi.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},yi.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},yi.prototype.copy=function(){var a=new yi;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},st=yi.prototype,st.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},st.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},st.freeze=function(){return this._isFrozen=!0,this},st.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 Ys;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return qa;if(a==="TopRight")return xl;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Ol;if(a==="Center")return Fr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return nc;if(a==="BottomLeft")return Oa;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Ua;if(a==="BottomRight")return ka;if(a==="TopSide")return Kl;if(a==="LeftSide")return _u;if(a==="RightSide")return Ga;if(a==="BottomSide")return Wa;if(a==="TopBottomSides")return Uu;if(a==="LeftRightSides")return yc;if(a==="TopLeftSides")return Eu;if(a==="TopRightSides")return Il;if(a==="BottomLeftSides")return Sc;if(a==="BottomRightSides")return Gu;if(a==="NotTopSide")return Lu;if(a==="NotLeftSide")return wl;if(a==="NotRightSide")return th;if(a==="NotBottomSide")return xc;if(a==="AllSides")return lu;if(a==="Default")return so;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b!==void 0&&0<b.length&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(E=parseFloat(b));for(var te=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(te=parseFloat(b));for(var ne=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(ne=parseFloat(b)),new yi(x,E,te,ne)}return new yi}function nh(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}st.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(Ys)?"TopLeft":this.D(qa)?"Top":this.D(xl)?"TopRight":this.D(Ol)?"Left":this.D(Fr)?"Center":this.D(nc)?"Right":this.D(Oa)?"BottomLeft":this.D(Ua)?"Bottom":this.D(ka)?"BottomRight":this.D(Kl)?"TopSide":this.D(_u)?"LeftSide":this.D(Ga)?"RightSide":this.D(Wa)?"BottomSide":this.D(Uu)?"TopBottomSides":this.D(yc)?"LeftRightSides":this.D(Eu)?"TopLeftSides":this.D(Il)?"TopRightSides":this.D(Sc)?"BottomLeftSides":this.D(Gu)?"BottomRightSides":this.D(Lu)?"NotTopSide":this.D(wl)?"NotLeftSide":this.D(th)?"NotRightSide":this.D(xc)?"NotBottomSide":this.D(lu)?"AllSides":this.D(so)?"Default":"None"},st.D=function(a){return a instanceof yi?(this.x===a.x||isNaN(this.x)&&isNaN(a.x))&&(this.y===a.y||isNaN(this.y)&&isNaN(a.y))&&this.offsetX===a.offsetX&&this.offsetY===a.offsetY:!1},st.gv=function(){return new yi(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},st.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(zo))a=_u;else if(a.D(Ma))a=Ga;else if(a.D(na))a=Kl;else if(a.D(Ds))a=Wa;else return!1;return a=a.offsetY,(this.offsetY&a)===a},st.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},st.Mc=function(){return isNaN(this.x)||isNaN(this.y)},st.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},st.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},st.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},yi.alloc=function(){var a=wc.pop();return a===void 0?new yi:a},yi.free=function(a){wc.push(a)},yi.prototype.isDefault=yi.prototype.Xb,yi.prototype.isNone=yi.prototype.ys,yi.prototype.isSide=yi.prototype.$c,yi.prototype.isNoSpot=yi.prototype.Mc,yi.prototype.isSpot=yi.prototype.sb,yi.prototype.includesSide=yi.prototype.Hf,yi.prototype.opposite=yi.prototype.gv,yi.prototype.equals=yi.prototype.D,yi.prototype.set=yi.prototype.set,yi.prototype.setTo=yi.prototype.sg;var wc=[];yi.className="Spot",yi.parse=xh,yi.stringify=nh,yi.None=ms=Rs(new yi(0,0,0,0),0).ja(),yi.Default=so=Rs(new yi(0,0,-1,0),-1).ja(),yi.TopLeft=Ys=new yi(0,0,0,0).ja(),yi.TopCenter=qa=new yi(.5,0,0,0).ja(),yi.TopRight=xl=new yi(1,0,0,0).ja(),yi.LeftCenter=Ol=new yi(0,.5,0,0).ja(),yi.Center=Fr=new yi(.5,.5,0,0).ja(),yi.RightCenter=nc=new yi(1,.5,0,0).ja(),yi.BottomLeft=Oa=new yi(0,1,0,0).ja(),yi.BottomCenter=Ua=new yi(.5,1,0,0).ja(),yi.BottomRight=ka=new yi(1,1,0,0).ja(),yi.MiddleTop=Ps=qa,yi.MiddleLeft=ks=Ol,yi.MiddleRight=Ws=nc,yi.MiddleBottom=Zs=Ua,yi.Top=na=qa,yi.Left=zo=Ol,yi.Right=Ma=nc,yi.Bottom=Ds=Ua,yi.TopSide=Kl=Rs(new yi(0,0,1,1),1).ja(),yi.LeftSide=_u=Rs(new yi(0,0,1,2),1).ja(),yi.RightSide=Ga=Rs(new yi(0,0,1,4),1).ja(),yi.BottomSide=Wa=Rs(new yi(0,0,1,8),1).ja(),yi.TopBottomSides=Uu=Rs(new yi(0,0,1,9),1).ja(),yi.LeftRightSides=yc=Rs(new yi(0,0,1,6),1).ja(),yi.TopLeftSides=Eu=Rs(new yi(0,0,1,3),1).ja(),yi.TopRightSides=Il=Rs(new yi(0,0,1,5),1).ja(),yi.BottomLeftSides=Sc=Rs(new yi(0,0,1,10),1).ja(),yi.BottomRightSides=Gu=Rs(new yi(0,0,1,12),1).ja(),yi.NotTopSide=Lu=Rs(new yi(0,0,1,14),1).ja(),yi.NotLeftSide=wl=Rs(new yi(0,0,1,13),1).ja(),yi.NotRightSide=th=Rs(new yi(0,0,1,11),1).ja(),yi.NotBottomSide=xc=Rs(new yi(0,0,1,7),1).ja(),yi.AllSides=lu=Rs(new yi(0,0,1,15),1).ja(),Vl=new yi(.156,.156).ja(),Dl=new yi(.844,.844).ja(),yi.parse=xh,yi.stringify=nh;function mr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}mr.prototype.set=function(a){return this.m11=a.m11,this.m12=a.m12,this.m21=a.m21,this.m22=a.m22,this.dx=a.dx,this.dy=a.dy,this},mr.prototype.setTransform=function(a,y,x,b,E,te){return this.m11=a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=te,this},mr.prototype.copy=function(){var a=new mr;return a.m11=this.m11,a.m12=this.m12,a.m21=this.m21,a.m22=this.m22,a.dx=this.dx,a.dy=this.dy,a},mr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},mr.prototype.D=function(a){return this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy},mr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},mr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},mr.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,b=this.m11*a.m21+this.m21*a.m22,E=this.m12*a.m21+this.m22*a.m22;return this.dx=this.m11*a.dx+this.m21*a.dy+this.dx,this.dy=this.m12*a.dx+this.m22*a.dy+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},mr.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,b=-a.m12*y,E=-a.m21*y,te=a.m11*y,ne=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*b,x=this.m12*x+this.m22*b,b=this.m11*E+this.m21*te,E=this.m12*E+this.m22*te,this.dx=this.m11*ne+this.m21*a+this.dx,this.dy=this.m12*ne+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},mr.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,b=this.m11*a,E=a*(this.m21*this.dy-this.m22*this.dx),te=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=te,this},mr.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.m12*a+this.m22*b,te=this.m11*-b+this.m21*a,ne=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=te,this.m22=ne,this.translate(-y,-x),this},st=mr.prototype,st.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},st.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},st.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)},st.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))},st.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))},st.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,ot=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,ot),Ye=Math.max(Ye,ot),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},mr.alloc=function(){var a=bc.pop();return a===void 0?new mr:a},mr.free=function(a){bc.push(a)},mr.prototype.transformRect=mr.prototype.pp,mr.prototype.transformPoint=mr.prototype.Ga,mr.prototype.scale=mr.prototype.scale,mr.prototype.translate=mr.prototype.translate,mr.prototype.rotate=mr.prototype.rotate,mr.prototype.invert=mr.prototype.Vj,mr.prototype.multiplyInverted=mr.prototype.bv,mr.prototype.multiply=mr.prototype.multiply,mr.prototype.reset=mr.prototype.reset,mr.prototype.isIdentity=mr.prototype.ws,mr.prototype.equals=mr.prototype.D,mr.prototype.setTransform=mr.prototype.setTransform,mr.prototype.set=mr.prototype.set;var bc=[];mr.className="Transform",mr.xF="54a702f3e53909c447824c6706603faf4c";var on={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=on.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);on.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,b,E,te,ne){if(0>=E&&(E=1e-6),a<x)var ae=a,fe=x;else ae=x,fe=a;if(y<b)var _e=y,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(on.Yb(a,y,ne,ae,Fe,x,b)&&on.Yb(a,y,ne,ae,Fe,E,te))return on.Yb(a,y,ne,ae,Fe,_e,Me);var Ye=(a+x)/2,tt=(y+b)/2,ot=(x+E)/2,ft=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(Ye+ot)/2,x=(tt+ft)/2,ot=(ot+E)/2,ft=(ft+te)/2;var It=(b+ot)/2,Mt=(x+ft)/2;return on.cs(a,y,Ye,tt,b,x,It,Mt,fe,_e,Me,Fe)||on.cs(It,Mt,ot,ft,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 rr(((a+x)/2+fe)/2,((y+b)/2+_e)/2,(fe+(E+ne)/2)/2,(_e+(te+ae)/2)/2)},Dl:function(a,y,x,b,E,te,ne,ae,fe,_e){if(on.Yb(a,y,ne,ae,fe,x,b)&&on.Yb(a,y,ne,ae,fe,E,te))fo(_e,a,y,0,0),fo(_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 ot=(b+Ye)/2,ft=(x+tt)/2;on.Dl(a,y,Me,Fe,b,x,ot,ft,fe,_e),on.Dl(ot,ft,Ye,tt,E,te,ne,ae,fe,_e)}return _e},Qe:function(a,y,x,b,E,te,ne,ae,fe,_e){if(on.Yb(a,y,ne,ae,fe,x,b)&&on.Yb(a,y,ne,ae,fe,E,te))_e.length===0&&(_e.push(a),_e.push(y)),_e.push(ne),_e.push(ae);else{var 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 ot=(b+Ye)/2,ft=(x+tt)/2;on.Qe(a,y,Me,Fe,b,x,ot,ft,fe,_e),on.Qe(ot,ft,Ye,tt,E,te,ne,ae,fe,_e)}return _e},jv:function(a,y,x,b,E,te,ne,ae,fe,_e){if(on.Yb(a,y,E,te,_e,x,b))return on.Yb(a,y,E,te,_e,ae,fe);var 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 on.jv(a,y,Me,Fe,Ye,tt,ne,ae,fe,_e)||on.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(on.Yb(a,y,E,te,ne,x,b))fo(ae,a,y,0,0),fo(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;on.iv(a,y,fe,_e,Me,Fe,ne,ae),on.iv(Me,Fe,x,b,E,te,ne,ae)}return ae},ep:function(a,y,x,b,E,te,ne,ae){if(on.Yb(a,y,E,te,ne,x,b))ae.length===0&&(ae.push(a),ae.push(y)),ae.push(E),ae.push(te);else{var fe=(a+x)/2,_e=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var Me=(fe+x)/2,Fe=(_e+b)/2;on.ep(a,y,fe,_e,Me,Fe,ne,ae),on.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(on.Yb(a,y,ne,ae,Ye,x,b)&&on.Yb(a,y,ne,ae,Ye,E,te))return!on.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 ot=(a+x)/2,ft=(y+b)/2,It=(x+E)/2,Mt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(ot+It)/2,x=(ft+Mt)/2,It=(It+E)/2,Mt=(Mt+te)/2;var Ht=(b+It)/2,Gt=(x+Mt)/2,Vt=1/0,Qt=!1,fn=0,ni=0;return on.Eo(a,y,ot,ft,b,x,Ht,Gt,fe,_e,Me,Fe,Ye,tt)&&(a=(tt.x-fe)*(tt.x-fe)+(tt.y-_e)*(tt.y-_e),a<Vt&&(Vt=a,Qt=!0,fn=tt.x,ni=tt.y)),on.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)<Vt&&(Qt=!0,fn=tt.x,ni=tt.y),Qt&&(tt.x=fn,tt.y=ni),Qt},Fo:function(a,y,x,b,E,te,ne,ae,fe,_e,Me,Fe,Ye){var tt=0;if(on.Yb(a,y,ne,ae,Ye,x,b)&&on.Yb(a,y,ne,ae,Ye,E,te)){if(Ye=(a-ne)*(_e-Fe)-(y-ae)*(fe-Me),Ye===0)return tt;var ot=((a*ae-y*ne)*(fe-Me)-(a-ne)*(fe*Fe-_e*Me))/Ye,ft=((a*ae-y*ne)*(_e-Fe)-(y-ae)*(fe*Fe-_e*Me))/Ye;if(ot>=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),ft<fe||ft>a)return tt}else if(a<ne?(fe=a,a=ne):fe=ne,ot<fe||ot>a)return tt;0<Ye?tt++:0>Ye&&tt--}else{ot=(a+x)/2,ft=(y+b)/2;var It=(x+E)/2,Mt=(b+te)/2;E=(E+ne)/2,te=(te+ae)/2,b=(ot+It)/2,x=(ft+Mt)/2,It=(It+E)/2,Mt=(Mt+te)/2;var Ht=(b+It)/2,Gt=(x+Mt)/2;tt+=on.Fo(a,y,ot,ft,b,x,Ht,Gt,fe,_e,Me,Fe,Ye),tt+=on.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 on.$(a,x)?(y<b?(x=y,y=b):x=b,te<x?(ne.h(a,x),!1):te>y?(ne.h(a,y),!1):(ne.h(a,te),!0)):on.$(y,b)?(a<x?(b=a,a=x):b=x,E<b?(ne.h(b,y),!1):E>a?(ne.h(a,y),!1):(ne.h(E,y),!0)):(E=((a-E)*(a-x)+(y-te)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(ne.h(a,y),!1):1.000005<E?(ne.h(x,b),!1):(ne.h(a+E*(x-a),y+E*(b-y)),!0))},Ve:function(a,y,x,b,E,te,ne,ae,fe){return on.B(a,x)&&on.B(y,b)?(fe.h(a,y),!1):on.$(E,ne)?on.$(a,x)?(on.qh(a,y,x,b,E,te,fe),!1):on.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,fe):(ae=(ae-te)/(ne-E),on.$(a,x)?(x=ae*(a-E)+te,y<b?(E=y,y=b):E=b,x<E?(fe.h(a,E),!1):x>y?(fe.h(a,y),!1):(fe.h(a,x),!0)):(ne=(b-y)/(x-a),on.$(ae,ne)?(on.qh(a,y,x,b,E,te,fe),!1):(E=(ne*a-ae*E+te-y)/(ne-ae),on.$(ne,0)?(a<x?(b=a,a=x):b=x,E<b?(fe.h(b,y),!1):E>a?(fe.h(a,y),!1):(fe.h(E,y),!0)):on.qh(a,y,x,b,E,ne*(E-a)+y,fe))))},MA:function(a,y,x,b,E){return on.Ve(x.x,x.y,b.x,b.y,a.x,a.y,y.x,y.y,E)},KA:function(a,y,x,b,E,te,ne,ae,fe,_e){function 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,ot=0,ft=0;if(E<ne?(Ye=E,tt=ne):(Ye=ne,tt=E),te<ae?(ot=E,ft=ne):(ot=ne,ft=E),Ye=(tt-Ye)/2+_e,_e=(ft-ot)/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(on.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 on.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)),on.Ve(a,y,x,y,E,te,ne,ae,fe)&&(y=(fe.x-E)*(fe.x-E)+(fe.y-te)*(fe.y-te),y<_e&&(_e=y,Me=fe.x,Fe=fe.y)),on.Ve(a,b,x,b,E,te,ne,ae,fe)&&(a=(fe.x-E)*(fe.x-E)+(fe.y-te)*(fe.y-te),a<_e&&(_e=a,Me=fe.x,Fe=fe.y)),fe.h(Me,Fe),1e21>_e},us:function(a,y,x){return on.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,te,ne,ae){var fe=a+x,_e=y+b;return E===ne?(te<ae?(ne=te,te=ae):ne=ae,a<=E&&E<=fe&&ne<=_e&&te>=y):te===ae?(E<ne?(ae=E,E=ne):ae=ne,y<=te&&te<=_e&&ae<=fe&&E>=a):!!(Lr(a,y,x,b,E,te)||Lr(a,y,x,b,ne,ae)||on.Rl(a,y,fe,y,E,te,ne,ae)||on.Rl(fe,y,fe,_e,E,te,ne,ae)||on.Rl(fe,_e,a,_e,E,te,ne,ae)||on.Rl(a,_e,a,y,E,te,ne,ae))},Rl:function(a,y,x,b,E,te,ne,ae){return a===x&&y===b&&E===ne&&te===ae?a===E&&y===te:0>=on.Fl(a,y,x,b,E,te)*on.Fl(a,y,x,b,ne,ae)&&0>=on.Fl(E,te,ne,ae,a,y)*on.Fl(E,te,ne,ae,x,b)},Fl:function(a,y,x,b,E,te){return x-=a,b-=y,a=E-a,y=te-y,te=a*b-y*x,te===0&&(te=a*x+y*b,0<te&&(te=(a-x)*x+(y-b)*b,0>te&&(te=0))),te},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,te){var ne=Math.PI;te||(b*=ne/180,E*=ne/180);var ae=b>E?-1:1;te=[];var fe=ne/2,_e=b;if(b=Math.min(2*ne,Math.abs(E-b)),1e-5>b)return fe=_e+ae*Math.min(b,fe),ae=a+x*Math.cos(_e),_e=y+x*Math.sin(_e),a+=x*Math.cos(fe),y+=x*Math.sin(fe),x=(ae+a)/2,fe=(_e+y)/2,te.push([ae,_e,x,fe,x,fe,a,y]),te;for(;1e-5<b;)E=_e+ae*Math.min(b,fe),te.push(on.Vy(x,_e,E,a,y)),b-=Math.abs(E-_e),_e=E;return te},Vy:function(a,y,x,b,E){var te=(x-y)/2,ne=a*Math.cos(te),ae=a*Math.sin(te),fe=-ae,_e=ne*ne+fe*fe,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),on.az(fe,ne===0?a:y,_e,x,0,0)},az:function(a,y,x,b,E,te){if(0<b)if(0<x){E=a*a,te=y*y,a*=x;var ne=y*b,ae=-te+ne,fe=-te+Math.sqrt(a*a+ne*ne);y=ae;for(var _e=0;9999999999>_e&&(y=.5*(ae+fe),!(y===ae||y===fe));++_e){var 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 Ti,um:new Ti,Mf:new Ti,Nf:0,vm:100};on.za=on.AA;function Jn(a){wr(this),this.l=2,a===void 0&&(a=Jn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Jn.o?this.ee=new In:(Jn.V===null&&(Jn.V=new In().freeze()),this.ee=Jn.V),this.aq=this.ee.Ja,this.Ip=new _n().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Ys,this.gg=ka,this.Rk=this.Sk=NaN,this.Uf=Hn}Jn.prototype.copy=function(){var a=new Jn;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===Jn.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},Jn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Jn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Jn.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},Jn.prototype.ka=function(){if(Object.isFrozen(this)&&At("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Jn.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},Jn.prototype.Xa=function(a){if(!(a instanceof Jn))return!1;if(this.type!==a.type)return this.type===Jn.j&&a.type===Jn.o?wh(this,a):a.type===Jn.j&&this.type===Jn.o?wh(a,this):!1;if(this.type===Jn.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0}return on.B(this.startX,a.startX)&&on.B(this.startY,a.startY)&&on.B(this.endX,a.endX)&&on.B(this.endY,a.endY)};function wh(a,y){return a.type!==Jn.j||y.type!==Jn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&on.B(a.startX,y.startX)&&on.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===bo&&on.B(a.endX,y.endX)&&on.B(a.endY,y.endY))))}Jn.ia=function(a){return a.toString()},Jn.prototype.qb=function(a){a.classType===Jn&&(this.type=a)},Jn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Jn.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 Jn.u:var y=new _n(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 Jn.F:if(y=new _n(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 Jn.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()}},Jn.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},Jn.parse=function(a,y){function x(){return ft>=Vt-1?!0:_e[ft+1].match(Qt)!==null}function b(){return ft++,_e[ft]}function E(tr){var Vi=parseFloat(b()),qr=parseFloat(b());It===It.toLowerCase()&&(Vi=Gt.x+Vi,qr=Gt.y+qr),tr.h(Vi,qr)}function te(){return E(Gt),Gt}function ne(){return E(Ht),Ht}function ae(){var tr=Mt.toLowerCase();return tr!=="c"&&tr!=="s"&&tr!=="q"&&tr!=="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=Un();for(var Fe="",Ye=!1,tt=0;tt<Me.length;tt++){var ot=Me[tt];ot!=="."||Ye?ot==="."?(fe.push(Fe),Fe="."):Fe+=ot:(Ye=!0,Fe+=ot)}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,qn(fe)}}var ft=-1,It="",Mt="";fe=new Tt(0,0);var Ht=new Tt(0,0),Gt=new Tt(0,0),Vt=_e.length;a=A1(null),Ye=Fe=Me=!1,tt=!0,ot=null;for(var Qt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(ft>=Vt-1);)if(Mt=It,It=b(),It!=="")switch(It.toUpperCase()){case"X":tt=!0,Fe=Me=!1;break;case"M":for(ot=te(),a.mc===null||tt===!0?(Sp(a,ot.x,ot.y,Me,!Fe,Ye),tt=!1):a.moveTo(ot.x,ot.y),fe.assign(Gt);!x();)ot=te(),a.lineTo(ot.x,ot.y);break;case"L":for(;!x();)ot=te(),a.lineTo(ot.x,ot.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();){ot=new Tt,E(ot);var fn=ne(),ni=te();Ih(a,ot.x,ot.y,fn.x,fn.y,ni.x,ni.y)}break;case"S":for(;!x();)ot=ae(),fn=ne(),ni=te(),Ih(a,ot.x,ot.y,fn.x,fn.y,ni.x,ni.y);break;case"Q":for(;!x();)ot=ne(),fn=te(),Um(a,ot.x,ot.y,fn.x,fn.y);break;case"T":for(;!x();)Ht=ot=ae(),fn=te(),Um(a,ot.x,ot.y,fn.x,fn.y);break;case"B":for(;!x();){ot=parseFloat(b()),fn=parseFloat(b()),ni=parseFloat(b());var di=parseFloat(b()),li=parseFloat(b()),Vn=li,Dn=!1;x()||(Vn=parseFloat(b()),x()||(Dn=parseFloat(b())!==0)),It===It.toLowerCase()&&(ni+=Gt.x,di+=Gt.y),a.arcTo(ot,fn,ni,di,li,Vn,Dn)}break;case"A":for(;!x();)ot=Math.abs(parseFloat(b())),fn=Math.abs(parseFloat(b())),ni=parseFloat(b()),li=di=!1,Dn=Vn=0,Vn=b(),Vn.length===1?(di=!!parseFloat(Vn),li=!!parseFloat(b()),Vn=parseFloat(b())):Vn.length===2?(di=!!parseFloat(Vn[0]),li=!!parseFloat(Vn[1]),Vn=parseFloat(b())):(di=!!parseFloat(Vn[0]),li=!!parseFloat(Vn[1]),Vn=parseFloat(Vn.slice(2))),Dn=parseFloat(b()),It===It.toLowerCase()&&(Vn=Gt.x+Vn,Dn=Gt.y+Dn),Gt.h(Vn,Dn),Cx(a,ot,fn,ni,di,li,Vn,Dn);break;case"Z":bx(a),Gt.assign(fe);break;case"F":for(ot="",fn=1;_e[ft+fn];)if(_e[ft+fn]==="0")Ye=!0,fn++;else if(_e[ft+fn].match(/[Uu]/)!==null)fn++;else if(_e[ft+fn].match(Qt)===null)fn++;else{ot=_e[ft+fn];break}ot.match(/[Mm]/)?Me=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(ot="",fn=1;_e[ft+fn];)if(_e[ft+fn].match(/[Ff]/)!==null)fn++;else if(_e[ft+fn].match(Qt)===null)fn++;else{ot=_e[ft+fn];break}ot.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},Jn.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)},Jn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Jn.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},Jn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Jn.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),fo(a,0,0,0,0),a.freeze()},Jn.prototype.ix=function(){var a=new _n;return Qh(this,a,!0),a};function Qh(a,y,x){switch(a.type){case Jn.j:case Jn.u:case Jn.F:x?y.h(a.od,a.pd,0,0):fo(y,a.od,a.pd,0,0),fo(y,a.Dc,a.Ec,0,0);break;case Jn.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):fo(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 bo:case Ls:fe=Fe.endX,_e=Fe.endY,fo(y,fe,_e,0,0);break;case da:on.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:on.iv(fe,_e,Fe.point1X,Fe.point1Y,Fe.endX,Fe.endY,.5,y),fe=Fe.endX,_e=Fe.endY;break;case as:case bl:var Ye=Fe.type===as?Ia(Fe,te):Vs(Fe,te,fe,_e),tt=Ye.length;if(tt===0){fe=Fe.type===as?Fe.centerX:Fe.endX,_e=Fe.type===as?Fe.centerY:Fe.endY,fo(y,fe,_e,0,0);break}Fe=null;for(var ot=0;ot<tt;ot++)Fe=Ye[ot],on.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)}}Jn.prototype.normalize=function(){this._isFrozen&&Kt(this);var a=this.ix();return this.offset(-a.x,-a.y),new Tt(-a.x,-a.y)},Jn.prototype.offset=function(a,y){return this._isFrozen&&Kt(this),this.transform(1,0,0,1,a,y),this},Jn.prototype.scale=function(a,y){return this._isFrozen&&Kt(this),this.transform(a,0,0,y,0,0),this},Jn.prototype.rotate=function(a,y,x){this._isFrozen&&Kt(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=mr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),mr.free(b),this},st=Jn.prototype,st.transform=function(a,y,x,b,E,te){switch(this.type){case Jn.j:case Jn.u:case Jn.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 Jn.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 ot=Fe[tt];switch(ot.type){case bo:case Ls:ne=ot.endX,ae=ot.endY,ot.endX=ne*a+ae*x+E,ot.endY=ne*y+ae*b+te;break;case da:ne=ot.point1X,ae=ot.point1Y,ot.point1X=ne*a+ae*x+E,ot.point1Y=ne*y+ae*b+te,ne=ot.point2X,ae=ot.point2Y,ot.point2X=ne*a+ae*x+E,ot.point2Y=ne*y+ae*b+te,ne=ot.endX,ae=ot.endY,ot.endX=ne*a+ae*x+E,ot.endY=ne*y+ae*b+te;break;case dl:ne=ot.point1X,ae=ot.point1Y,ot.point1X=ne*a+ae*x+E,ot.point1Y=ne*y+ae*b+te,ne=ot.endX,ae=ot.endY,ot.endX=ne*a+ae*x+E,ot.endY=ne*y+ae*b+te;break;case as:ne=ot.centerX,ae=ot.centerY,ot.centerX=ne*a+ae*x+E,ot.centerY=ne*y+ae*b+te,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),ot.startAngle+=ne),0>a&&(ot.startAngle=180-ot.startAngle,ot.sweepAngle=-ot.sweepAngle),0>b&&(ot.startAngle=-ot.startAngle,ot.sweepAngle=-ot.sweepAngle),ot.radiusX*=Math.sqrt(a*a+x*x),ot.radiusY!==void 0&&(ot.radiusY*=Math.sqrt(y*y+b*b));break;case bl:if(ne=ot.endX,ae=ot.endY,ot.endX=ne*a+ae*x+E,ot.endY=ne*y+ae*b+te,ot.radiusX===0||ot.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),ot.xAxisRotation+=ne),0>a&&(ot.xAxisRotation=180-ot.xAxisRotation,ot.isClockwiseArc=!ot.isClockwiseArc),0>b&&(ot.xAxisRotation=-ot.xAxisRotation,ot.isClockwiseArc=!ot.isClockwiseArc),ot.radiusX*=Math.sqrt(a*a+x*x),ot.radiusY*=Math.sqrt(y*y+b*b);break;default:At("Unknown Segment type: "+ot.type)}}}}return this._isInvalidBounds=!0,this},st.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 Jn.j:return on.Yb(x,b,E,te,y,a.x,a.y);case Jn.u:var ne=_n.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),_n.free(ne),a;case Jn.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 Jn.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,ot=0;ot<tt;ot++){var ft=Ye[ot],It=!ft.isEvenOdd;if(ft.isFilled){if(b&&ft.ca(te,y,x))return!0;var Mt=ft.segments;fe=ft.startX,_e=ft.startY;for(var Ht=fe,Gt=_e,Vt=Mt.s,Qt=0;Qt<=Mt.length;Qt++){var fn=void 0;if(Qt!==Mt.length){fn=Vt[Qt];var ni=fn.type;a=fn.endX,Fe=fn.endY}else ni=bo,a=Ht,Fe=Gt;switch(ni){case Ls:if(Ht=Tu(te,y,ne,y,fe,_e,Ht,Gt),isNaN(Ht))return!0;ae+=Ht,Ht=a,Gt=Fe;break;case bo:if(fe=Tu(te,y,ne,y,fe,_e,a,Fe),isNaN(fe))return!0;ae+=fe;break;case da:Me=on.Fo(fe,_e,fn.point1X,fn.point1Y,fn.point2X,fn.point2Y,a,Fe,ne,y,te,y,.5),ae+=Me;break;case dl:Me=on.Fo(fe,_e,(fe+2*fn.point1X)/3,(_e+2*fn.point1Y)/3,(2*fn.point1X+a)/3,(2*fn.point1Y+Fe)/3,a,Fe,ne,y,te,y,.5),ae+=Me;break;case as:case bl:ni=fn.type===as?Ia(fn,ft):Vs(fn,ft,fe,_e);var di=ni.length;if(di===0){if(fe=Tu(te,y,ne,y,fe,_e,fn.type===as?fn.centerX:fn.endX,fn.type===as?fn.centerY:fn.endY),isNaN(fe))return!0;ae+=fe;break}fn=null;for(var li=0;li<di;li++){if(fn=ni[li],li===0){if(Me=Tu(te,y,ne,y,fe,_e,fn[0],fn[1]),isNaN(Me))return!0;ae+=Me}Me=on.Fo(fn[0],fn[1],fn[2],fn[3],fn[4],fn[5],fn[6],fn[7],ne,y,te,y,.5),ae+=Me}fn!==null&&(a=fn[6],Fe=fn[7]);break;default:At("Unknown Segment type: "+fn.type)}fe=a,_e=Fe}if(It){if(ae!==0)return!0}else if(ae%2!==0)return!0;ae=0}else if(ft.ca(te,y,E?x:x+2))return!0}return!1}function Tu(a,y,x,b,E,te,ne,ae){if(on.Yb(E,te,ne,ae,.05,a,y))return NaN;var fe=(a-x)*(te-ae);if(fe===0)return 0;var _e=((a*b-y*x)*(E-ne)-(a-x)*(E*ae-te*ne))/fe;if(y=(a*b-y*x)*(te-ae)/fe,_e>=a)return 0;if((E>ne?E-ne:ne-E)<(te>ae?te-ae:ae-te)){if(te<ae){if(y<te||y>ae)return 0}else if(y<ae||y>te)return 0}else if(E<ne){if(_e<E||_e>ne)return 0}else if(_e<ne||_e>E)return 0;return 0<fe?1:-1}function Wu(a,y,x,b){a=a.figures.s;for(var E=a.length,te=0;te<E;te++)if(a[te].ca(y,x,b))return!0;return!1}st.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Tt),this.type===Jn.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},st.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Jn.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},st.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Jn.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},st.xx=function(a){if(this.type===Jn.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 on.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===Jn.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],ot=Ye.length,ft=0;ft<ot;ft+=2){var It=Ye[ft],Mt=Ye[ft+1];if(ft!==0){on.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[(ft-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===Jn.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===Jn.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===Jn.F){var te=new Ks;te.startX=a.endX,te.startY=(a.startY+a.endY)/2;var ne=new Wr(as);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=Ia(ne,te),E=a.length,E===0)b.push(ne.centerX),b.push(ne.centerY);else{ne=te.startX,te=te.startY;for(var ae=0;ae<E;ae++){var fe=a[ae];on.Qe(ne,te,fe[2],fe[3],fe[4],fe[5],fe[6],fe[7],.5,b),ne=fe[6],te=fe[7]}}y.push(b),x.push(Cc(b))}else for(a=a.figures.iterator;a.next();){E=a.value,b=[],b.push(E.startX),b.push(E.startY),ne=E.startX,te=E.startY,ae=ne,fe=te;for(var _e=E.segments.s,Me=_e.length,Fe=0;Fe<Me;Fe++){var Ye=_e[Fe];switch(Ye.type){case Ls: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 bo:b.push(Ye.endX),b.push(Ye.endY),ne=Ye.endX,te=Ye.endY;break;case da:on.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:on.ep(ne,te,Ye.point1X,Ye.point1Y,Ye.endX,Ye.endY,.5,b),ne=Ye.endX,te=Ye.endY;break;case as:var tt=Ia(Ye,E),ot=tt.length;if(ot===0){b.push(Ye.centerX),b.push(Ye.centerY),ne=Ye.centerX,te=Ye.centerY;break}for(var ft=0;ft<ot;ft++){var It=tt[ft];on.Qe(ne,te,It[2],It[3],It[4],It[5],It[6],It[7],.5,b),ne=It[6],te=It[7]}break;case bl:if(tt=Vs(Ye,E,ne,te),ot=tt.length,ft=Ye.endX,It=Ye.endY,ot===0){b.push(ft),b.push(It),ne=ft,te=It;break}for(ft=0;ft<ot;ft++)It=tt[ft],on.Qe(ne,te,It[2],It[3],It[4],It[5],It[6],It[7],.5,b),ne=It[6],te=It[7];break;default: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(_o(x,b,ne,ae))),x=ne,b=ae}return y}st.add=function(a){return this.ee.add(a),this},st.pm=function(a,y,x,b,E,te,ne,ae){return this._isFrozen&&Kt(this),this.fg=new yi(a,y,E,te).freeze(),this.gg=new yi(x,b,ne,ae).freeze(),this},Je.Object.defineProperties(Jn.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===Jn.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===Jn.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&&Kt(this,a),this.na=a,a===Jn.o?this.ee=new In:(Jn.V===null&&(Jn.V=new In().freeze()),this.ee=Jn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Kt(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Kt(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Kt(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Kt(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Kt(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Kt(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Kt(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Kt(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Jn.prototype.setSpots=Jn.prototype.pm,Jn.prototype.add=Jn.prototype.add,Jn.prototype.getFractionForPoint=Jn.prototype.xx,Jn.prototype.getPointAndAngleAlongPath=Jn.prototype.Qu,Jn.prototype.getAngleAlongPath=Jn.prototype.wx,Jn.prototype.getPointAlongPath=Jn.prototype.Pu,Jn.prototype.containsPoint=Jn.prototype.ca,Jn.prototype.transform=Jn.prototype.transform,Jn.prototype.rotate=Jn.prototype.rotate,Jn.prototype.scale=Jn.prototype.scale,Jn.prototype.offset=Jn.prototype.offset,Jn.prototype.normalize=Jn.prototype.normalize,Jn.prototype.computeBoundsWithoutOrigin=Jn.prototype.ix,Jn.prototype.equalsApprox=Jn.prototype.Xa,Jn.className="Geometry",Jn.j=new Pn(Jn,"Line",0),Jn.u=new Pn(Jn,"Rectangle",1),Jn.F=new Pn(Jn,"Ellipse",2),Jn.o=new Pn(Jn,"Path",3),Jn.V=null,Jn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Jn.className="Geometry",Jn.stringify=Jn.ia,Jn.fillPath=Jn.nb,Jn.parse=Jn.parse,Jn.Line=Jn.j,Jn.Rectangle=Jn.u,Jn.Ellipse=Jn.F,Jn.Path=Jn.o;function Ks(a,y,x,b,E){wr(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 In,this.sr=this.pl.Ja,this.fw=null}Ks.prototype.copy=function(){var a=new Ks;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},st=Ks.prototype,st.Xa=function(a){if(!(a instanceof Ks&&on.B(this.startX,a.startX)&&on.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0},st.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},st.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},st.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},st.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},st.add=function(a){return this.pl.add(a),this},st.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 Ls:te=Me.endX,ne=Me.endY,b=Me.endX,E=Me.endY;break;case bo:if(on.Yb(b,E,Me.endX,Me.endY,x,a,y))return!0;b=Me.endX,E=Me.endY;break;case da:if(on.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(on.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 as:case bl:var Fe=Me.type===as?Ia(Me,this):Vs(Me,this,b,E),Ye=Fe.length,tt=Me.type===as?Me.centerX:Me.endX,ot=Me.type===as?Me.centerY:Me.endY;if(Ye===0){if(on.Yb(b,E,tt,ot,x,a,y))return!0;b=tt,E=ot;break}for(tt=null,ot=0;ot<Ye;ot++)if(tt=Fe[ot],ot===0&&on.Yb(b,E,tt[0],tt[1],x,a,y)||on.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)&&on.Yb(b,E,te,ne,x,a,y))return!0}return!1},Je.Object.defineProperties(Ks.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&&Kt(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Kt(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Kt(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Kt(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Kt(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Kt(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Ks.prototype.add=Ks.prototype.add,Ks.prototype.equalsApprox=Ks.prototype.Xa,Ks.className="PathFigure";function Wr(a,y,x,b,E,te,ne,ae){wr(this),a===void 0&&(a=bo),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,b===void 0&&(b=0),E===void 0&&(E=0),te===void 0&&(te=0),ne===void 0&&(ne=0),a===bl?(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===as&&(te=Math.max(te,0)),this.Wh=te,typeof ne=="number"?(a===as&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}Wr.prototype.copy=function(){var a=new Wr;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},st=Wr.prototype,st.Xa=function(a){if(!(a instanceof Wr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Ls:case bo:return on.B(this.endX,a.endX)&&on.B(this.endY,a.endY);case da:return on.B(this.endX,a.endX)&&on.B(this.endY,a.endY)&&on.B(this.point1X,a.point1X)&&on.B(this.point1Y,a.point1Y)&&on.B(this.point2X,a.point2X)&&on.B(this.point2Y,a.point2Y);case dl:return on.B(this.endX,a.endX)&&on.B(this.endY,a.endY)&&on.B(this.point1X,a.point1X)&&on.B(this.point1Y,a.point1Y);case as:return on.B(this.startAngle,a.startAngle)&&on.B(this.sweepAngle,a.sweepAngle)&&on.B(this.centerX,a.centerX)&&on.B(this.centerY,a.centerY)&&on.B(this.radiusX,a.radiusX)&&on.B(this.radiusY,a.radiusY);case bl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&on.B(this.xAxisRotation,a.xAxisRotation)&&on.B(this.endX,a.endX)&&on.B(this.endY,a.endY)&&on.B(this.radiusX,a.radiusX)&&on.B(this.radiusY,a.radiusY);default:return!1}},st.qb=function(a){a.classType===Wr&&(this.type=a)},st.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Ls:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case bo:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case da: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 as: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 bl: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":"")},st.freeze=function(){return this._isFrozen=!0,this},st.ka=function(){return this._isFrozen=!1,this},st.close=function(){return this.isClosed=!0,this};function Ia(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,b=a.radiusY;if(b===void 0&&(b=x),x===0||b===0)return a.ae=[],a.ae;y=a.Ne;var E=a.Vh,te=on.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=mr.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),Jn.Ha(te,ne),mr.free(ne)}for(x=te.length,b=0;b<x;b++)ne=te[b],ne[0]+=y,ne[1]+=E,ne[2]+=y,ne[3]+=E,ne[4]+=y,ne[5]+=E,ne[6]+=y,ne[7]+=E;return a.ae=te,a.ae}function Vs(a,y,x,b){function E(ft,It,Mt,Ht){return(ft*Ht<It*Mt?-1:1)*Math.acos((ft*Mt+It*Ht)/(Math.sqrt(ft*ft+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 ot=tt*tt/(y*y)+ne*ne/(te*te);return 1<ot&&(y*=Math.sqrt(ot),te*=Math.sqrt(ot)),ot=(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(ot)&&(ot=0),ae=ot*y*ne/te,ot=ot*-te*tt/y,isNaN(ae)&&(ae=0),isNaN(ot)&&(ot=0),x=(x+_e)/2+Fe*ae-Ye*ot,b=(b+Me)/2+Ye*ae+Fe*ot,Me=E(1,0,(tt-ae)/y,(ne-ot)/te),Fe=(tt-ae)/y,_e=(ne-ot)/te,tt=(-tt-ae)/y,ae=(-ne-ot)/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=on.jx(0,0,y>te?y:te,Me,Me+ne,!0),te=mr.alloc(),te.reset(),te.translate(x,b),te.rotate(a.Ne,0,0),te.scale(fe,tt),Jn.Ha(y,te),mr.free(te),a.ae=y,a.ae}Je.Object.defineProperties(Wr.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&&Kt(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Kt(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Kt(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Kt(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Kt(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Kt(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Kt(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Kt(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Kt(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Sn(a,">= zero",Wr,"radiusX"),this._isFrozen&&Kt(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Sn(a,">= zero",Wr,"radiusY"),this._isFrozen&&Kt(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Kt(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&&Kt(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&&Kt(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&&Kt(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&&Kt(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Wr.prototype.equalsApprox=Wr.prototype.Xa;var Ls=new Pn(Wr,"Move",0),bo=new Pn(Wr,"Line",1),da=new Pn(Wr,"Bezier",2),dl=new Pn(Wr,"QuadraticBezier",3),as=new Pn(Wr,"Arc",4),bl=new Pn(Wr,"SvgArc",4);Wr.className="PathSegment",Wr.Move=Ls,Wr.Line=bo,Wr.Bezier=da,Wr.QuadraticBezier=dl,Wr.Arc=as,Wr.SvgArc=bl;function Ca(){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}Ca.prototype.copy=function(){var a=new Ca;return this.clone(a)},Ca.prototype.clone=function(a){return a.H=this.H,a.xu.assign(this.viewPoint),a.mt.assign(this.documentPoint),a.Rq=this.Rq,a.Bp=this.Bp,a.Cp=this.Cp,a.xq=this.xq,a.Tp=this.Tp,a.Wr=this.Wr,a.Ep=this.Ep,a.Rp=this.Rp,a.tq=this.tq,a.nq=this.nq,a.xg=this.xg,a.Zp=this.Zp,a.Rr=this.Rr,a.Nr=this.Nr,a.xd=this.xd,a},Ca.prototype.toString=function(){var a="^";return this.modifiers!==0&&(a+="M:"+this.modifiers),this.button!==0&&(a+="B:"+this.button),this.key!==""&&(a+="K:"+this.key),this.clickCount!==0&&(a+="C:"+this.clickCount),this.delta!==0&&(a+="D:"+this.delta),this.handled&&(a+="h"),this.bubbles&&(a+="b"),this.documentPoint!==null&&(a+="@"+this.documentPoint.toString()),a},Ca.prototype.So=function(a,y){var x=this.diagram;return x===null||Hd(x,a,y),y},Ca.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Hd(x,a,y),y.assign(x.Ps(y))),y},Je.Object.defineProperties(Ca.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{get:function(){return this.xu},set:function(a){this.xu.assign(a)}},documentPoint:{get:function(){return this.mt},set:function(a){this.mt.assign(a)}},modifiers:{get:function(){return this.Rq},set:function(a){this.Rq=a}},button:{get:function(){return this.Bp},set:function(a){if(this.Bp=a,this.event===null)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{get:function(){return this.Cp},set:function(a){this.Cp=a}},key:{get:function(){return this.xq},set:function(a){this.xq=a}},down:{get:function(){return this.Tp},set:function(a){this.Tp=a}},up:{get:function(){return this.Wr},set:function(a){this.Wr=a}},clickCount:{get:function(){return this.Ep},set:function(a){this.Ep=a}},delta:{get:function(){return this.Rp},set:function(a){this.Rp=a}},isMultiTouch:{get:function(){return this.tq},set:function(a){this.tq=a}},handled:{get:function(){return this.nq},set:function(a){this.nq=a}},bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},event:{get:function(){return this.Zp},set:function(a){this.Zp=a}},isTouchEvent:{get:function(){var a=this.event;return a===null?!1:a.pointerType==="touch"||a.pointerType==="pen"}},timestamp:{get:function(){return this.Rr},set:function(a){this.Rr=a}},targetDiagram:{get:function(){return this.Nr},set:function(a){this.Nr=a}},targetObject:{get:function(){return this.xd},set:function(a){this.xd=a}},control:{get:function(){return(this.modifiers&1)!==0},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{get:function(){return(this.modifiers&4)!==0},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{get:function(){return(this.modifiers&2)!==0},set:function(a){this.modifiers=a?this.modifiers|2:this.modifiers&-3}},meta:{get:function(){return(this.modifiers&8)!==0},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&1)!==0:this.button===0},set:function(a){this.buttons=a?this.buttons|1:this.buttons&-2}},right:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&2)!==0:this.button===2},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&4)!==0:this.button===1},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}}),Ca.prototype.getMultiTouchDocumentPoint=Ca.prototype.Bz,Ca.prototype.getMultiTouchViewPoint=Ca.prototype.So,Ca.className="InputEvent";function Pc(){this.H=null,this.xa="",this.ar=this.Lr=null}Pc.prototype.copy=function(){var a=new Pc;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Pc.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},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 Ho(){this.Fm=Ko,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Ho.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Ho.prototype.copy=function(){var a=new Ho;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=Zt(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Zt(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Zt(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Zt(y)&&typeof y.J=="function"?y.J():y,a},Ho.prototype.qb=function(a){a.classType===Ho&&(this.change=a)},Ho.prototype.toString=function(){var a="";return a=this.change===Za?a+"* ":this.change===Ko?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===Za?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=si(this.object)),this.oldValue!==null&&(a+=" old: "+si(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+si(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Ho.prototype.I=function(a){return a?this.oldValue:this.newValue},Ho.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Ho.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Ho.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Ho.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Ho.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Je.Object.defineProperties(Ho.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===Za&&(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}}}),Ho.prototype.redo=Ho.prototype.redo,Ho.prototype.canRedo=Ho.prototype.canRedo,Ho.prototype.undo=Ho.prototype.undo,Ho.prototype.canUndo=Ho.prototype.canUndo,Ho.prototype.getParam=Ho.prototype.Dz,Ho.prototype.getValue=Ho.prototype.I,Ho.prototype.clear=Ho.prototype.clear;var Za=new Pn(Ho,"Transaction",-1),Ko=new Pn(Ho,"Property",0),vs=new Pn(Ho,"Insert",1),cs=new Pn(Ho,"Remove",2);Ho.className="ChangedEvent",Ho.Transaction=Za,Ho.Property=Ko,Ho.Insert=vs,Ho.Remove=cs;function Bs(){this.o=new In().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 fi,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===Ko&&b.object){var E=y.get(b.object);E||(E=new fi,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 Bo(){this.Pt=new On,this.Jd=!1,this.u=new In().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new In().freeze(),this.hl=new In,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Bo.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},Bo.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},Bo.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},st=Bo.prototype,st.Xw=function(a){this.Pt.add(a)},st.Rx=function(a){this.Pt.remove(a)},st.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},st.eb=function(a){return a===void 0&&(a=""),Rc(this,!0,a)},st.Kf=function(){return Rc(this,!1,"")};function Rc(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&kn("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}st.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()}},Bo.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Bo.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){kn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Bo.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Bo.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){kn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Bo.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new Ho;for(b.change=Za,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},Bo.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||kn("Change not within a transaction: "+x.toString()))}},Bo.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(Bo.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}}}),Bo.prototype.handleChanged=Bo.prototype.Tu,Bo.prototype.redo=Bo.prototype.redo,Bo.prototype.undo=Bo.prototype.undo,Bo.prototype.canUndo=Bo.prototype.canUndo,Bo.prototype.discardHistoryAfterIndex=Bo.prototype.lx,Bo.prototype.rollbackTransaction=Bo.prototype.Kf,Bo.prototype.commitTransaction=Bo.prototype.eb,Bo.prototype.startTransaction=Bo.prototype.Ea,Bo.prototype.removeModel=Bo.prototype.Rx,Bo.prototype.addModel=Bo.prototype.Xw,Bo.prototype.clear=Bo.prototype.clear,Bo.className="UndoManager";function Hr(){wr(this),this.H=ac,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Ca,this.Zr=-1}Hr.prototype.toString=function(){return this.name!==""?this.name+" Tool":Nn(this.constructor)},Hr.prototype.updateAdornments=function(){},Hr.prototype.canStart=function(){return this.isEnabled},Hr.prototype.doStart=function(){},Hr.prototype.doActivate=function(){this.isActive=!0},Hr.prototype.doDeactivate=function(){this.isActive=!1},Hr.prototype.doStop=function(){},Hr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Hr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Hr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Hr.prototype.doMouseMove=function(){},Hr.prototype.doMouseUp=function(){this.stopTool()},Hr.prototype.doMouseWheel=function(){},Hr.prototype.canStartMultiTouch=function(){return!0},Hr.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)},Hr.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)},Hr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Hr.prototype.doKeyUp=function(){},Hr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Hr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Hr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(lr?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||(lr?y.meta:y.control)||y.shift||a.clearSelection()}},Hr.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)}}}Hr.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}},Hr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Hr.prototype.doCurrentObjectChanged=function(){},Hr.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)}}},Hr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Hr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=Bn(function(){x.doWaitAfter(b)},a)},Hr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&_t.clearTimeout(this.Zr),this.Zr=-1},Hr.prototype.doWaitAfter=function(){},Hr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Xr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Hr.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(Hr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof dn&&(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}}}),Hr.prototype.startTransaction=Hr.prototype.Ea,Hr.className="Tool";function Uo(){Hr.call(this),this.name="ToolManager",this.hb=new In,this.ob=new In,this.Hb=new In,this.F=this.V=850,this.o=new Xn(2,2).ja(),this.Ha=5e3,this.ia=ih,this.u=Ch,this.Mp=this.j=null,this.zj=-1}nt(Uo,Hr),Uo.prototype.initializeStandardTools=function(){},Uo.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Xr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Uo.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===ic&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===io){y.bubbles=!0;return}if(this.gestureBehavior===ic)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===ih?this.mouseWheelBehavior=rh:this.mouseWheelBehavior===rh&&(this.mouseWheelBehavior=ih)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Uo.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===io){y.bubbles=!0;return}if(this.gestureBehavior===ic)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,b=0;b<x;b++){var E=this.mouseMoveTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseMove());return}}Nd(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Nd(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Uo.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Xr&&(y===a||y.rg(a))||this.hideToolTip()},Uo.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()))},Uo.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)},Uo.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 Xr)||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()},Uo.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Xr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof Yi&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(_t.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=Bn(function(){E.hideToolTip()},a)}},Uo.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}},Uo.prototype.hideToolTip=function(){this.zj!==-1&&(_t.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Xr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Yi&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Uo.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()},Uo.prototype.doMouseWheel=function(){this.standardMouseWheel()},Uo.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Uo.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Uo.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},Uo.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},Uo.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(Uo.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 Xr?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}}}),Uo.prototype.replaceStandardTool=Uo.prototype.gb;var ih=new Pn(Uo,"WheelScroll",0),rh=new Pn(Uo,"WheelZoom",1),Od=new Pn(Uo,"WheelNone",2),Ch=new Pn(Uo,"GestureZoom",3),ic=new Pn(Uo,"GestureCancel",4),io=new Pn(Uo,"GestureNone",5);Uo.className="ToolManager",Uo.WheelScroll=ih,Uo.WheelZoom=rh,Uo.WheelNone=Od,Uo.GestureZoom=Ch,Uo.GestureCancel=ic,Uo.GestureNone=io;function ts(){Hr.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 On().freeze(),this.ia=new pe,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var ku;nt(ts,Hr),ts.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},ts.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},ts.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,(lr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},ts.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),pt=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&&Ra(a),Qf(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,pt=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 $n?(a.draggedLink=y.first(),a.draggedLink.canRelinkFrom()&&a.draggedLink.canRelinkTo()&&a.draggedLink.Ej(),a.Oe=x.toolManager.findTool("Relinking"),a.Oe===null&&(a.Oe=new Zn,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}ts.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},ts.prototype.Pd=function(a){return a===void 0?new ah(Ir):this.isGridSnapEnabled?new ah(new Tt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new ah(a.copy())},ts.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);ds(E),Rl(E),Au(E),E.diagram.ug()}y.clear()}ds(this),this.tl.h(NaN,NaN),Pt!==null&&(Pt.currentCursor=""),pt=Pt=null,Rl(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),nd(a,!0)},ts.prototype.stopTransaction=function(){var a=this.diagram,y=Hr.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=pt;Rl(a),rc(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}ts.prototype.doCancel=function(){Rl(this),rc(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},ts.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},ts.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 fi,b=a.draggedParts.iterator;b.next();){var E=b.key;if(E.Zc()&&E.canCopy()){var te=y.I(E);te!==null&&(te.location=E.location,te.Va(),x.add(te,a.Pd(te.location)))}}for(y=y.iterator;y.next();)b=y.value,b instanceof $n&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,qh(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Bh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Rl(a){var y=a.diagram;if(a.copiedParts!==null){if(y.Is(a.copiedParts.Lf(),!1),a.copiedParts=null,a.draggedParts!==null)for(var x=a.draggedParts.iterator;x.next();)x.key instanceof $n&&(x.value.point=new Tt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function ds(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&&(Ra(b),b.hk())}ts.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&Ec(b,a,y,this.dragOptions,x)};function rc(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var b=x.key;b.Zc()&&(b.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(b=x.key,b instanceof $n&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),Bh(b,-E.x,-E.y)}y.bd()}}function el(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),Aa(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&&pt===null)return;var ae=b!==null?b.part:null;if(ae===null||x.handlesDragDropForTopLevelParts&&ae.isTopLevel&&!(ae instanceof sr)){var fe=x.mouseDragOver;fe!==null&&(fe(E),ne=!0)}if(!a.isActive&&pt===null||(a.doDragOver(y,b),!a.isActive&&pt===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)}ts.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 Xr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},ts.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&&pt===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=td(E);for(E=a.Cg.length,x=0;x<E&&(ne=a.Cg[x],ae=ne.mouseDragEnter,ae===null||(ae(y,ne,te),b=!0,!y.handled));x++);return b}function td(a){var y=a.panel;return y!==null?y:a instanceof ki&&!(a instanceof sr)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Dd(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(_e){return b.findValidLinkablePort(_e,x)});a=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 Aa(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)):xi(E,ne,te,fe,ae):xi(E,null,null,null,null)}}}}ts.prototype.doDragOver=function(){};function oc(a,y){var x=a.diagram;a.dragsLink&&Aa(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||pt!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)te=E.key,te instanceof ii&&te.linksConnected.each(function(ae){ae.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||pt!==null){for(a=_n.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof ii&&Rt(x,b,a);_n.free(a)}}}function gf(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof sr||(x=a.mouseDrop,x!==null&&x(y))}function 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 $n},!0,function(E){return E instanceof $n},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}ts.prototype.doDropOnto=function(){},ts.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()?(Rl(this),Fs(this,this.draggedParts,!0)):this.mayDragOut()?(uu(this,!1),Fs(this,this.copiedParts,!1)):Rl(this),el(this,a.lastInput.documentPoint))}},ts.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?(Rl(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,Rl(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)}}},ts.prototype.simulatedMouseMove=function(a,y,x){if(pt===null)return!1;var b=pt.diagram;x instanceof dn||(x=null);var E=Pt;return x!==E&&(E!==null&&E!==b&&(E.ug(),pt.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)},ts.prototype.simulatedMouseUp=function(a,y,x){if(pt===null)return!1;var b=Pt,E=pt.diagram;if(x===null)return pt.doCancel(),!0;if(x!==b){var te=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&te!==null)return b.ug(),pt.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=pt,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 ii&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}ts.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(lr?!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())},ts.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())},ts.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())},ts.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},ts.prototype.Az=function(){return pt},ts.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=pt;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},ts.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),fl(a),a.animationManager.Cc(),a=pt,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},ts.prototype.doSimulatedDragLeave=function(){var a=pt;a!==null&&a.doSimulatedDragOut(),this.doCancel()},ts.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=pt;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;an(this,y.draggedParts.Lf(),!1,a.firstInput),Fs(this,this.copiedParts,!1),el(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},ts.prototype.doSimulatedDrop=function(){var a=this.diagram,y=pt;if(y!==null){var x=y.diagram;if(y.Ym=!0,Rl(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),an(this,y.draggedParts.Lf(),!0,a.lastInput),Fs(this,this.copiedParts,!1);var b=new On;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 an(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=_n.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,_n.free(te),te=a.Fr,ne=new fi,ae=Tt.alloc(),fe=y.iterator;fe.next();)_e=fe.value,_e instanceof $n&&_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)}}}ts.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},ts.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(ts.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}}}),ts.prototype.getDraggingSource=ts.prototype.Az;var pt=null,Pt=null;ts.className="DraggingTool",ku=new In,Bi("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Uo.prototype.doCancel=function(){pt!==null&&pt.doCancel(),Hr.prototype.doCancel.call(this)};function Lt(){Hr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new $n,y=new pr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new pr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new ii,y=new pr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=no,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new ii,y=new pr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=no,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 fi,this.Of=this.gj=this.Pf=null}nt(Lt,Hr),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=Xn.alloc();ne.width=y.naturalBounds.width*te,ne.height=y.naturalBounds.height*te,b.desiredSize=ne,Xn.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=no,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 ii){var y=this.targetPort.part;this.isForwards?this.copyPortProperties(y,this.targetPort,this.temporaryToNode,this.temporaryToPort,!0):this.copyPortProperties(y,this.targetPort,this.temporaryFromNode,this.temporaryFromPort,!1)}else this.isForwards?this.setNoTargetPortProperties(this.temporaryToNode,this.temporaryToPort,!0):this.setNoTargetPortProperties(this.temporaryFromNode,this.temporaryFromPort,!1);(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Lt.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof ii))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof ii)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},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 ii){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 ii&&(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 ii))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof ii))return!1;for(y=y.portId,y===null&&(y=""),y=b.Sd(y);y.next();)if(b=y.value,b.fromNode===x&&b.fromPortId===a)return!0;return!1},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 On;return b.add(a),vn(this,x,y,b)};function vn(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),vn(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),vn(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!cn(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!cn(this,a,y,x,!0)}if(b===ng)return a===y?a=!0:(b=new On,b.add(y),a=sn(this,b,a,y,x)),!a;if(b===ig)return!cn(this,a,y,x,!1);if(b===rg)return a===y?a=!0:(b=new On,b.add(y),a=gn(this,b,a,y,x)),!a}return!0};function cn(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&&cn(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 gn(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&&gn(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 mn(){Lt.call(this),this.name="Linking",this.V={},this.F=null,this.K=xn,this.Xd=null}nt(mn,Lt),mn.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},mn.prototype.findLinkablePort=function(){var a=this.diagram,y=this.startObject;if(y===null&&(y=a.ic(a.firstInput.documentPoint,null,null)),y===null||(a=y.part,!(a instanceof ii)))return null;var x=this.direction;if(x===xn||x===jn){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===xn||x===ti)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},mn.prototype.doActivate=function(){var a=this.diagram,y=this.findLinkablePort();y===null?this.stopTool():(this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(this.temporaryToNode!==null&&(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=y,y=this.originalFromPort.part,y instanceof ii&&(this.originalFromNode=y),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1)):(this.temporaryFromNode!==null&&(this.temporaryFromNode.location=a.lastInput.documentPoint),this.originalToPort=y,y=this.originalToPort.part,y instanceof ii&&(this.originalToNode=y),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),a.add(this.temporaryFromNode),this.temporaryFromNode&&this.temporaryFromNode.Va(),a.add(this.temporaryToNode),this.temporaryToNode&&this.temporaryToNode.Va(),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.temporaryLink.isTreeLink=this.isNewTreeLink(),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0)},mn.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()},mn.prototype.doStop=function(){Lt.prototype.doStop.call(this),this.startObject=null},mn.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,te=null;try{var ne=this.targetPort=this.findTargetPort(this.isForwards);if(ne!==null){var ae=ne.part;ae instanceof ii&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=ae,E=ne):(y=ae,x=ne,this.originalToNode!==null&&(b=this.originalToNode,E=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(b=this.originalToNode,E=this.originalToPort);y!==null||b!==null?(te=this.insertLink(y,x,b,E),te!==null?(ne===null&&(this.isForwards?te.defaultToPoint=a.lastInput.documentPoint:te.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),te.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",te)):this.doNoLink(y,x,b,E)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),te&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},mn.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof $n)return a.isTreeLink;var y=this.diagram;return y===null?!0:(a=y.partManager.getLinkCategoryForData(a),y=y.partManager.findLinkTemplateForCategory(a),y!==null?y.isTreeLink:!0)},mn.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},mn.prototype.doNoLink=function(){},Je.Object.defineProperties(mn.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 xn=new Pn(mn,"Either",0),jn=new Pn(mn,"ForwardsOnly",0),ti=new Pn(mn,"BackwardsOnly",0);mn.className="LinkingTool",mn.Either=xn,mn.ForwardsOnly=jn,mn.BackwardsOnly=ti;function Zn(){Lt.call(this),this.name="Relinking";var a=new pr;a.figure="Diamond",a.desiredSize=ko,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new pr,a.figure="Diamond",a.desiredSize=ko,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new _n}nt(Zn,Lt),Zn.prototype.updateAdornments=function(a){if(a!==null&&a instanceof $n){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var b=a.selectionObject;b!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(b,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(b=a.selectionObject,b!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(b,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},Zn.prototype.makeAdornment=function(a,y){var x=new Xr;return x.type=Gn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Zn.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.xs()||!a.lastInput.left)return!1;var y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom");return y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo")),y!==null},Zn.prototype.doActivate=function(){var a=this.diagram;if(this.originalLink===null){var y=this.handle;if(y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom"),y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo"))),y===null)return;var x=y.part;if(!(x instanceof Xr&&x.adornedPart instanceof $n))return;this.handle=y,this.isForwards=x===null||x.category==="RelinkTo",this.originalLink=x.adornedPart}this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.originalFromPort=this.originalLink.fromPort,this.originalFromNode=this.originalLink.fromNode,this.originalToPort=this.originalLink.toPort,this.originalToNode=this.originalLink.toNode,this.Ew.set(this.originalLink.actualBounds),this.originalLink!==null&&0<this.originalLink.pointsCount&&(this.originalLink.fromNode===null&&(this.temporaryFromPort!==null&&(this.temporaryFromPort.desiredSize=er),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=er),this.temporaryToNode!==null&&(this.temporaryToNode.location=this.originalLink.i(this.originalLink.pointsCount-1)))),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0),a.add(this.temporaryFromNode),a.add(this.temporaryToNode),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.copyLinkProperties(this.originalLink,this.temporaryLink),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0},Zn.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===bp||x===Fh)&&(x=ol),y.curve=x,y.curviness=a.curviness,y.isTreeLink=a.isTreeLink,y.points=a.points,y.routing=a.routing,y.smoothness=a.smoothness,y.fromSpot=a.fromSpot,y.fromEndSegmentLength=a.fromEndSegmentLength,y.fromShortLength=a.fromShortLength,y.toSpot=a.toSpot,y.toEndSegmentLength=a.toEndSegmentLength,y.toShortLength=a.toShortLength}},Zn.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;a.remove(this.temporaryLink),a.remove(this.temporaryFromNode),a.remove(this.temporaryToNode),a.isMouseCaptured=!1,a.currentCursor="",this.stopTransaction()},Zn.prototype.doStop=function(){Lt.prototype.doStop.call(this),this.handle=null},Zn.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,b=this.originalToNode,E=this.originalToPort,te=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var ne=this.targetPort.part;ne instanceof ii&&(this.isForwards?(b=ne,E=this.targetPort):(y=ne,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?E=b=null:x=y=null:te=null;te!==null?(this.reconnectLink(te,this.isForwards?b:y,this.isForwards?E:x,this.isForwards),this.targetPort===null&&(this.isForwards?te.defaultToPoint=a.lastInput.documentPoint:te.defaultFromPoint=a.lastInput.documentPoint,te.bb()),this.transactionResult=this.name,a.R("LinkRelinked",te,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},Zn.prototype.reconnectLink=function(a,y,x,b){return x=x!==null&&x.portId!==null?x.portId:"",b?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},Zn.prototype.doNoRelink=function(){};function xi(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(Zn.prototype,{fromHandleArchetype:{get:function(){return this.V},set:function(a){this.V=a}},toHandleArchetype:{get:function(){return this.Xd},set:function(a){this.Xd=a}},handle:{get:function(){return this.F},set:function(a){if(a!==null&&!(a.part instanceof Xr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Zn.className="RelinkingTool",Bi("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Bi("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Kn(){Hr.call(this),this.name="LinkReshaping";var a=new pr;a.figure="Rectangle",a.desiredSize=Lo,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new pr,a.figure="Diamond",a.desiredSize=ko,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 In}nt(Kn,Hr),Kn.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:ai},Kn.prototype.om=function(a,y){a.reshapingBehavior=y},Kn.prototype.updateAdornments=function(a){if(a!==null&&a instanceof $n){var y=null;if(a.isSelected&&!this.diagram.isReadOnly){var x=a.path;x!==null&&a.canReshape()&&a.actualBounds.w()&&a.isVisible()&&x.actualBounds.w()&&x.Ed()&&(y=a.Pj(this.name),y===null||y.Aw!==a.pointsCount||y.Uw!==a.resegmentable)&&(y=this.makeAdornment(x),y!==null&&(y.Aw=a.pointsCount,y.Uw=a.resegmentable,a.bh(this.name,y)))}y===null&&a.Jf(this.name)}},Kn.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new Xr,E.type=Gn.Link,x=y.firstPickIndex;var te=y.lastPickIndex,ne=b?1:0;if(y.resegmentable&&y.computeCurve()!==iu)for(var ae=x+ne;ae<te-ne;ae++){var fe=this.makeResegmentHandle(a,ae);fe!==null&&(fe.segmentIndex=ae,fe.segmentFraction=.5,fe.fromMaxLinks=999,E.add(fe))}for(ne=x+1;ne<te;ne++)if(ae=this.makeHandle(a,ne),ae!==null){if(ae.segmentIndex=ne,ne!==x)if(ne===x+1&&b){fe=y.i(x);var _e=y.i(x+1);on.B(fe.x,_e.x)&&on.B(fe.y,_e.y)&&(_e=y.i(x-1)),on.B(fe.x,_e.x)?(this.om(ae,Oi),ae.cursor="n-resize"):on.B(fe.y,_e.y)&&(this.om(ae,Ri),ae.cursor="w-resize")}else ne===te-1&&b?(fe=y.i(te-1),_e=y.i(te),on.B(fe.x,_e.x)&&on.B(fe.y,_e.y)&&(fe=y.i(te+1)),on.B(fe.x,_e.x)?(this.om(ae,Oi),ae.cursor="n-resize"):on.B(fe.y,_e.y)&&(this.om(ae,Ri),ae.cursor="w-resize")):ne!==te&&(this.om(ae,Zi),ae.cursor="move");E.add(ae)}E.adornedObject=a}return E},Kn.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Kn.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Kn.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowReshape&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},Kn.prototype.doActivate=function(){var a=this.diagram;if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null){var y=this.handle.part.adornedPart;if(y instanceof $n){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),b=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,b),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,b),y.points=x,y.Wb(),y.updateAdornments(),this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name),this.handle===null){this.doDeactivate();return}}this.Fw=y.i(this.handle.segmentIndex),this.Yq=y.points.copy(),this.isActive=!0}}},Kn.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Kn.prototype.stopTransaction=function(){var a=this.diagram,y=Hr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Kn.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Kn.prototype.getResegmentingPoint=function(){return this.handle.ga(Fr)},Kn.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Kn.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.computeReshape(a.lastInput.documentPoint);if(this.reshape(y),y=this.adornedLink,y!==null&&y.resegmentable){var x=this.handle.segmentIndex,b=y.i(x-1),E=y.i(x),te=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var ne=y.i(x-2);if(Math.abs(b.x-E.x)<this.resegmentingDistance&&Math.abs(b.y-E.y)<this.resegmentingDistance&&(mi(this,ne,b,E,te,!0)||mi(this,ne,b,E,te,!1))){var ae=y.points.copy();mi(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&&(mi(this,b,E,te,ne,!0)||mi(this,b,E,te,ne,!1))&&(ae=y.points.copy(),mi(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(),on.qh(b.x,b.y,te.x,te.y,E.x,E.y,ne)&&ne.Bf(E)<this.resegmentingDistance*this.resegmentingDistance&&(b=y.points.copy(),b.mb(x),y.points=b,y.Wb()),Tt.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function mi(a,y,x,b,E,te){return te?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-b.y)<a.resegmentingDistance&&Math.abs(b.y-E.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-b.x)<a.resegmentingDistance&&Math.abs(b.x-E.x)<a.resegmentingDistance}Kn.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,b=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,b===Oi?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===Ri&&(y.L(x,a.x,y.i(x-1).y),y.L(x+1,a.x,y.i(x+2).y));else if(x===y.lastPickIndex-1)x=y.lastPickIndex-1,b===Oi?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===Ri&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{b=x;var E=y.i(b),te=y.i(b-1),ne=y.i(b+1);on.B(te.x,E.x)&&on.B(E.y,ne.y)?(on.B(te.x,y.i(b-2).x)&&!on.B(te.y,y.i(b-2).y)?(y.m(b,a.x,te.y),x++,b++):y.L(b-1,a.x,te.y),on.B(ne.y,y.i(b+2).y)&&!on.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):on.B(te.y,E.y)&&on.B(E.x,ne.x)?(on.B(te.y,y.i(b-2).y)&&!on.B(te.x,y.i(b-2).x)?(y.m(b,te.x,a.y),x++,b++):y.L(b-1,te.x,a.y),on.B(ne.x,y.i(b+2).x)&&!on.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):on.B(te.x,E.x)&&on.B(E.x,ne.x)?(on.B(te.x,y.i(b-2).x)&&!on.B(te.y,y.i(b-2).y)?(y.m(b,a.x,te.y),x++,b++):y.L(b-1,a.x,te.y),on.B(ne.x,y.i(b+2).x)&&!on.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):on.B(te.y,E.y)&&on.B(E.y,ne.y)&&(on.B(te.y,y.i(b-2).y)&&!on.B(te.x,y.i(b-2).x)?(y.m(b,te.x,a.y),x++,b++):y.L(b-1,te.x,a.y),on.B(ne.y,y.i(b+2).y)&&!on.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),b=y.fromNode,E=y.fromPort,b!==null&&(te=b.findVisibleNode(),te!==null&&te!==b&&(b=te,E=b.port)),x===1&&y.computeSpot(!0,E).Mc()&&(te=E.ga(Fr,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()},Kn.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Zi:return a;case Oi:return new Tt(y.i(x).x,a.y);case Ri:return new Tt(a.x,y.i(x).y);default:case ai:return y.i(x)}},Je.Object.defineProperties(Kn.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},midHandleArchetype:{get:function(){return this.u},set:function(a){this.u=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof Xr))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedLink:{get:function(){return this.Ts}},resegmentingDistance:{get:function(){return this.F},set:function(a){this.F=a}},originalPoint:{get:function(){return this.Fw}},originalPoints:{get:function(){return this.Yq}}}),Kn.prototype.setReshapingBehavior=Kn.prototype.om,Kn.prototype.getReshapingBehavior=Kn.prototype.Ru;var ai=new Pn(Kn,"None",0),Ri=new Pn(Kn,"Horizontal",1),Oi=new Pn(Kn,"Vertical",2),Zi=new Pn(Kn,"All",3);Kn.className="LinkReshapingTool",Kn.None=ai,Kn.Horizontal=Ri,Kn.Vertical=Oi,Kn.All=Zi,Bi("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Ai(){Hr.call(this),this.name="Resizing",this.o=new Xn(1,1).freeze(),this.j=new Xn(9999,9999).freeze(),this.yg=new Xn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new pr;a.alignmentFocus=Fr,a.figure="Rectangle",a.desiredSize=Lo,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 Xn,this.Tn=new Tt,this.rt=new Xn(0,0),this.qt=new Xn(1/0,1/0),this.pt=new Xn(1,1)}nt(Ai,Hr),Ai.prototype.updateAdornments=function(a){if(!(a===null||a instanceof $n)){if(a.isSelected&&!this.diagram.isReadOnly){var y=a.resizeObject,x=a.Pj(this.name);if(y!==null&&a.canResize()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed()&&((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null)){y=y.li(),hd(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},Ai.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Xr,y.type=Gn.Spot,y.locationSpot=Fr;var x=new rl;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Ys)),y.add(this.makeHandle(a,xl)),y.add(this.makeHandle(a,ka)),y.add(this.makeHandle(a,Oa)),y.add(this.makeHandle(a,Ps)),y.add(this.makeHandle(a,Ws)),y.add(this.makeHandle(a,Zs)),y.add(this.makeHandle(a,ks))}else if(Ru(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ai.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Ai.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))e:{var x=a.alignment;if(x.Mc()&&(x=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)}},Ai.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},Ai.prototype.doActivate=function(){var a=this.diagram;this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null&&(this.adornedObject=this.handle.part.adornedObject,this.adornedObject!==null&&(a.isMouseCaptured=!0,a.animationManager.Cc(),this.Ea(this.name),this.Xq.set(this.adornedObject.ga(this.handle.alignment.gv())),this.Tn.set(this.adornedObject.part.location),this.Dw.set(this.adornedObject.desiredSize),this.pt=this.computeCellSize(),this.rt=this.computeMinSize(),this.qt=this.computeMaxSize(),this.isActive=!0))},Ai.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Ai.prototype.stopTransaction=function(){var a=this.diagram,y=Hr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ai.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Ai.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,Tt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),a.bd(),Tt.free(E)}},Ai.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,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()},Ai.prototype.resize=function(a){var y=this.diagram,x=this.adornedObject;if(x!==null){if(x.desiredSize=a.size,a=x.part,a.Va(),x=x.ga(this.handle.alignment.gv()),a instanceof sr){var b=new In;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new pe;E.dragsMembers=!1}y.moveParts(b,this.oppositePoint.copy().re(x),!0,E)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},Ai.prototype.computeResize=function(a,y,x,b,E,te){y.Mc()&&(y=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(),on.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},Ai.prototype.computeReshape=function(){var a=Fn;return this.adornedObject instanceof pr&&(a=_v(this.adornedObject)),!(a===vi||this.diagram.lastInput.shift)},Ai.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),y=this.minSize;return!isNaN(y.width)&&y.width>a.width&&(a.width=y.width),!isNaN(y.height)&&y.height>a.height&&(a.height=y.height),a},Ai.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),y=this.maxSize;return!isNaN(y.width)&&y.width<a.width&&(a.width=y.width),!isNaN(y.height)&&y.height<a.height&&(a.height=y.height),a},Ai.prototype.computeCellSize=function(){var a=new Xn(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(Ai.prototype,{handleArchetype:{get:function(){return this.F},set:function(a){this.F=a}},handle:{get:function(){return this.u},set:function(a){if(a!==null&&!(a.part instanceof Xr))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 Xr)throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},minSize:{get:function(){return this.o},set:function(a){if(!this.o.D(a)){var y=a.width;isNaN(y)&&(y=0),a=a.height,isNaN(a)&&(a=0),this.o.h(y,a)}}},maxSize:{get:function(){return this.j},set:function(a){if(!this.j.D(a)){var y=a.width;isNaN(y)&&(y=1/0),a=a.height,isNaN(a)&&(a=1/0),this.j.h(y,a)}}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||this.yg.assign(a)}},isGridSnapEnabled:{get:function(){return this.V},set:function(a){this.V=a}},dragsMembers:{get:function(){return this.ia},set:function(a){this.ia=a}},oppositePoint:{get:function(){return this.Xq},set:function(a){this.Xq.D(a)||this.Xq.assign(a)}},originalDesiredSize:{get:function(){return this.Dw}},originalLocation:{get:function(){return this.Tn}}}),Ai.className="ResizingTool",Bi("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ni(){Hr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Tt,this.ue=null;var a=new pr;a.figure="Ellipse",a.desiredSize=ko,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(Ni,Hr),Ni.prototype.updateAdornments=function(a){if(a!==null){if(a.ph()){var y=a.rotateObject;if(y===a||y===a.path||y.isPanelMain)return}if(a.isSelected&&!this.diagram.isReadOnly&&(y=a.rotateObject,y!==null&&a.canRotate()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed())){var x=a.Pj(this.name);if((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null){x.angle=y.li(),x.placeholder===null&&(x.location=this.computeAdornmentLocation(y)),a.bh(this.name,x);return}}a.Jf(this.name)}},Ni.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Xr,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},Ni.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowRotate&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},Ni.prototype.doActivate=function(){var a=this.diagram;if(this.adornedObject===null){if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle===null)return;this.adornedObject=this.handle.part.adornedObject}this.adornedObject!==null&&(a.isMouseCaptured=!0,a.delaysLayout=!0,this.Ea(this.name),this.Cw=this.adornedObject.angle,this.kr=this.computeRotationPoint(this.adornedObject),this.Tn=this.adornedObject.part.location.copy(),this.isActive=!0)},Ni.prototype.computeRotationPoint=function(a){var y=a.part,x=y.locationObject;return y.rotationSpot.sb()?a.ga(y.rotationSpot):a===y||a===x?x.ga(y.locationSpot):a.ga(Fr)},Ni.prototype.computeAdornmentLocation=function(a){var y=this.rotationPoint;y.w()||(y=this.computeRotationPoint(a)),y=a.qs(y);var x=this.handleAngle;0>x?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var b=this.handleDistance;return x===0?y.x=a.naturalBounds.width+b:x===45?(y.x=a.naturalBounds.width+b,y.y=a.naturalBounds.height+b):x===90?y.y=a.naturalBounds.height+b:x===135?(y.x=-b,y.y=a.naturalBounds.height+b):x===180?y.x=-b:x===225?(y.x=-b,y.y=-b):x===270?y.y=-b:x===315&&(y.x=a.naturalBounds.width+b,y.y=-b),a.ga(y)},Ni.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Tt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Ni.prototype.stopTransaction=function(){var a=this.diagram,y=Hr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ni.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Ni.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Ni.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var y=this.computeRotate(a.lastInput.documentPoint);this.rotate(y),a.Ya(),this.transactionResult=this.name,a.R("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()},Ni.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,b=y.rotateObject;(x===b||x.rg(b))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},Ni.prototype.computeRotate=function(a){a=this.rotationPoint.ab(a)-this.handleAngle;var y=this.adornedObject.panel;y!==null&&(a-=y.li()),360<=a?a-=360:0>a&&(a+=360),y=Math.min(Math.abs(this.snapAngleMultiple),180);var x=Math.min(Math.abs(this.snapAngleEpsilon),y/2);return!this.diagram.lastInput.shift&&0<y&&0<x&&(a%y<x?a=Math.floor(a/y)*y:a%y>y-x&&(a=(Math.floor(a/y)+1)*y)),360<=a?a-=360:0>a&&(a+=360),a},Je.Object.defineProperties(Ni.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof Xr))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 Xr)throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},snapAngleMultiple:{get:function(){return this.ia},set:function(a){this.ia=a}},snapAngleEpsilon:{get:function(){return this.V},set:function(a){this.V=a}},originalAngle:{get:function(){return this.Cw}},rotationPoint:{get:function(){return this.kr},set:function(a){this.kr=a.copy()}},handleAngle:{get:function(){return this.u},set:function(a){this.u=a}},handleDistance:{get:function(){return this.F},set:function(a){this.F=a}}}),Ni.className="RotatingTool",Bi("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function ur(){Hr.call(this),this.name="ClickSelecting"}nt(ur,Hr),ur.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},ur.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},ur.className="ClickSelectingTool";function ei(){Hr.call(this),this.name="Action",this.pk=null}nt(ei,Hr),ei.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},ei.prototype.doMouseDown=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionDown!==null&&y.actionDown(a,y))}else this.canStart()&&this.doActivate()},ei.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionMove!==null&&y.actionMove(a,y))}},ei.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;if(y===null)return;a.targetObject=y,y.actionUp!==null&&y.actionUp(a,y),this.standardMouseClick(function(x){for(;x.panel!==null&&(!x.isActionable||x!==y);)x=x.panel;return x},function(x){return x===y})}this.stopTool()},ei.prototype.doCancel=function(){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionCancel!==null&&y.actionCancel(a,y),this.stopTool())},ei.prototype.doStop=function(){this.pk=null},ei.className="ActionTool";function Gi(){Hr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Tt(0,0)}nt(Gi,Hr),Gi.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)},Gi.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},Gi.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var b=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof ki)x.Zc()&&(Ru(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);Zt(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(Gi.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}}}),Gi.className="ClickCreatingTool";function Ei(){Hr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new ki;a.layerName="Tool",a.selectable=!1;var y=new pr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}nt(Ei,Hr),Ei.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))},Ei.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Ei.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Ei.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=Xn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),Xn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Ei.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()},Ei.prototype.computeBoxBounds=function(){var a=this.diagram;return new _n(a.firstInput.documentPoint,a.lastInput.documentPoint)},Ei.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),lr?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 In,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(Ei.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}}}),Ei.className="DragSelectingTool";function wi(){Hr.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(_t.document,"scroll",a.Kw,!1),a.stopTool()}}nt(wi,Hr),wi.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())},wi.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(_t.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},wi.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},wi.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},wi.prototype.doMouseMove=function(){this.move()},wi.prototype.doMouseUp=function(){this.move(),this.stopTool()},wi.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(wi.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),wi.className="PanningTool",Bi("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Bi("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Bi("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Bi("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Bi("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Yi(){this.F=this.u=this.j=this.o=null}Je.Object.defineProperties(Yi.prototype,{mainElement:{get:function(){return this.u},set:function(a){this.u=a}},show:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},hide:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},valueFunction:{get:function(){return this.F},set:function(a){this.F=a}}}),Yi.className="HTMLInfo";function gi(a,y,x){this.text=a,this.hx=y,this.visible=x}gi.className="ContextMenuButtonInfo";function dr(){Hr.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(dr,Hr);function Xi(a){var y=new Yi;y.show=function(E,te,ne){ne.showDefaultContextMenu()},y.hide=function(E,te){te.hideDefaultContextMenu()},wo=y,a.tu=function(){a.stopTool()},y=zn("div");var x=zn("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=zn("style");_t.document.getElementsByTagName("head")[0].appendChild(b),b.sheet.insertRule(".goCXul { list-style: none; }",0),b.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),b.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),b=a.diagram,b!==null&&(b.addEventListener(y,"contextmenu",Pi,!1),b.addEventListener(y,"selectstart",Pi,!1),b.addEventListener(x,"contextmenu",Pi,!1)),y.className="goCXforeground",x.className="goCXbackground",_t.document.body&&(_t.document.body.appendChild(y),_t.document.body.appendChild(x)),uo=y,ns=x,Eo=!0}function Pi(a){return a.preventDefault(),!1}dr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return this.isBeyondDragSize()||!a.lastInput.right||1<a.lastInput.clickCount?!1:!!(a.lastInput.isTouchEvent&&this.defaultTouchContextMenu!==null||this.findObjectWithContextMenu()!==null)},dr.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},dr.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},dr.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof dn||(a instanceof en?b=a:b=y.ic(x.documentPoint,null,function(E){return!E.layer.isTemporary})),b!==null){for(a=b;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return b.part}else if(y.contextMenu!==null)return y;return null},dr.prototype.doActivate=function(){},dr.prototype.doMouseDown=function(){if(Hr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Xr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Ki(this)},dr.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Xr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Ki(this)};function Ki(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Yi||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(vr(a,!0),a.isActive||a.stopTool())}dr.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function vr(a,y,x){if(x===void 0&&(x=null),!a.Et&&(a.Et=!0,y&&a.standardMouseSelect(),y=a.standardMouseClick(),a.Et=!1,!y)){if(a.isActive=!0,y=wo,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof en?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Xr&&!a.currentContextMenu.visible&&a.stopTool()}}dr.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},dr.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Xr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof Yi&&a.show(y,x,this);this.currentContextMenu=a},dr.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y+b.height>E.bottom&&(x.y-=b.height+5/y.scale),x.y<E.y&&(x.y=E.y),a.position=x}},dr.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Xr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Yi&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function or(a){var y=new In;return y.add(new gi("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new gi("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new gi("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new gi("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new gi("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new gi("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new gi("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new gi("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new gi("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new gi("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new gi("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new gi("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new gi("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}dr.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=or(this)),uo.innerHTML="",ns.addEventListener("pointerdown",this.tu,!1);var y=this,x=zn("ul");x.className="goCXul",uo.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=zn("li"),te.className="goCXli";var ne=zn("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)}}uo.style.display="block",ns.style.display="block"},dr.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===wo){uo.style.display="none",ns.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(ns,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Je.Object.defineProperties(dr.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Xr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Eo===!1&&wo===null&&ys&&Xi(this),wo},set:function(a){a===null&&(Eo=!0),wo=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var wo=null,Eo=!1,ns=null,uo=null;dr.className="ContextMenuTool",Bi("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Nr(){Hr.call(this),this.name="TextEditing",this.Zh=new No,this.ia=null,this.V=_r,this.vj=null,this.qa=kr,this.u=1,this.F=!0,this.o=null,this.j=new Yi,this.kt=null,Io(this,this.j)}nt(Nr,Hr);function Io(a,y){if(ys){var x=zn("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(Tr)):E==="Tab"?(a.acceptText(Ur),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==kr){var b=a.kt;a.qa===mo&&(a.qa=Go),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==kr){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 No&&te instanceof Nr)if(te.state===Yr)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)}}}Nr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||_s&&_s!==this&&(_s.acceptText(is),_s&&_s!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof No&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===_r&&!y.isSelected||this.starting===co&&2>a.lastInput.clickCount)):!1},Nr.prototype.doStart=function(){_s=this,this.textBlock!==null&&this.doActivate()},Nr.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 No&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=mo;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new _n(this.textBlock.ga(Ys),this.textBlock.ga(ka));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},Nr.prototype.doCancel=function(){this.stopTool()},Nr.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Nr.prototype.doMouseDown=function(){this.isActive&&this.acceptText(is)},Nr.prototype.acceptText=function(a){switch(a){case is:this.qa===Ro?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===mo||this.qa===Yr||this.qa===Go)&&(this.qa=Wo,Dr(this));break;case Vr:case Tr:case Ur:(Tr!==a||this.textBlock.isMultiline!==!0)&&(this.qa===mo||this.qa===Yr||this.qa===Go)&&(this.qa=Wo,Dr(this))}};function Dr(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,te="";b.valueFunction!==null&&(te=b.valueFunction()),a.isValidText(y,E,te)?(a.Ea(a.name),a.qa=Ro,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=Yr,a.doError(E,te))}}Nr.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)},Nr.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Nr.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=kr,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Nr.prototype.doStop=function(){_s=null},Nr.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)))},Nr.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Je.Object.defineProperties(Nr.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)}}}),Nr.prototype.measureTemporaryTextBlock=Nr.prototype.Lx;var Vr=new Pn(Nr,"LostFocus",0),is=new Pn(Nr,"MouseDown",1),Ur=new Pn(Nr,"Tab",2),Tr=new Pn(Nr,"Enter",3),$r=new Pn(Nr,"SingleClick",0),_r=new Pn(Nr,"SingleClickSelected",1),co=new Pn(Nr,"DoubleClick",2),kr=new Pn(Nr,"StateNone",0),mo=new Pn(Nr,"StateActive",1),Go=new Pn(Nr,"StateEditing",2),Wo=new Pn(Nr,"StateValidating",3),Yr=new Pn(Nr,"StateInvalid",4),Ro=new Pn(Nr,"StateValidated",5),_s=null;Nr.className="TextEditingTool",Nr.LostFocus=Vr,Nr.MouseDown=is,Nr.Tab=Ur,Nr.Enter=Tr,Nr.SingleClick=$r,Nr.SingleClickSelected=_r,Nr.DoubleClick=co,Nr.StateNone=kr,Nr.StateActive=mo,Nr.StateEditing=Go,Nr.StateValidating=Wo,Nr.StateInvalid=Yr,Nr.StateValidated=Ro,Bi("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Ao(a){Bl||(Pl(),Bl=!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 On,this.ce=new fs,this.ce.Yd=this,this.Ei=new On,this.pu=new On,this.Sr=new On,this.pr=new On,a&&Object.assign(this,a)}Ao.prototype.Xe=function(a){this.H=a},Ao.prototype.canStart=function(){return!0};function Jo(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),ya(a.H),a.zb=!0)}function xs(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===Yl&&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(),Da(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==Va&&b!==null&&(delete b.start.scale,delete b.end.scale),_t.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Ra(x),Bd(x),a.zb=!1,y.start(),y.bc&&(ws(a),x.Ya(),_c(y,0),fl(x,!0),Ms(a),x.R("AnimationStarting",a)))}))}}function Xs(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Cl(a,y,x,b){a.isTicking||Xs(a)||y instanceof $n&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}st=Ao.prototype,st.fv=function(a){return this.ce.fv(a)},st.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 en&&fe.diagram!==null||fe instanceof dn){ae=!0;break e}}ae=!1}ae?Xl(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(ws(E),fl(E.H),Ms(E)),_t.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),_t.requestAnimationFrame(function(){x()}))}function qo(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function ws(a){if(!a.vq){var y=a.H;a.Ow=y.skipsUndoManager,a.cw=y.skipsModelSourceBindings,y.skipsUndoManager=!0,y.skipsModelSourceBindings=!0,a.vq=!0}}function Ms(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}st.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(),Da(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Da(y,this.H)},st.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))},st.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),As(this,a))},st.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),ia(this.ce,y,"position",y.position,y.position),As(this,a))};function fa(a,y,x){!a.zb||y.D(x)||Xs(a)||(a.H.pi||(y=x.copy()),ia(a.ce,a.H,"position",y,x))}function Fo(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 Pa(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var te=a[0],ne=a[1],ae=a[2];a=a[3];var fe=y[0],_e=y[1],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 Pl(){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 fi;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 _n(te(ne,b.width,E.width-b.width,ae),te(ne,b.height,E.height-b.height,ae))}),y.add("width",function(x,b,E,te,ne,ae){x.width=te(ne,b,E-b,ae)}),y.add("height",function(x,b,E,te,ne,ae){x.height=te(ne,b,E-b,ae)}),y.add("fill",function(x,b,E,te,ne,ae){x.fill=Pa(b,E,ne,ae,te)}),y.add("stroke",function(x,b,E,te,ne,ae){x.stroke=Pa(b,E,ne,ae,te)}),y.add("strokeWidth",function(x,b,E,te,ne,ae){x.strokeWidth=te(ne,b,E-b,ae)}),y.add("strokeDashOffset",function(x,b,E,te,ne,ae){x.strokeDashOffset=te(ne,b,E-b,ae)}),y.add("background",function(x,b,E,te,ne,ae){x.background=Pa(b,E,ne,ae,te)}),y.add("areaBackground",function(x,b,E,te,ne,ae){x.areaBackground=Pa(b,E,ne,ae,te)}),y.add("opacity",function(x,b,E,te,ne,ae){x.opacity=te(ne,b,E-b,ae)}),y.add("scale",function(x,b,E,te,ne,ae){x.scale=te(ne,b,E-b,ae)}),y.add("angle",function(x,b,E,te,ne,ae){x.angle=te(ne,b,E-b,ae)}),$l=y}Je.Object.defineProperties(Ao.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&&Sn(a,">= 1",Ao,"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}}}),Ao.prototype.stopAnimation=Ao.prototype.Cc;var $l=null,Bl=!1,cu=new Pn(Ao,"Default",1),hu=new Pn(Ao,"AnimateLocations",2),Yl=new Pn(Ao,"None",3);Ao.className="AnimationManager",Ao.defineAnimationEffect=function(a,y){Bl||(Pl(),Bl=!0),$l.add(a,y)},Ao.Default=cu,Ao.AnimateLocations=hu,Ao.None=Yl;function fs(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=Ir,this.vc=new fi,this.Tt=new fi,this.yl=new On,this.Ut=new On,this.dw=Th,a&&Object.assign(this,a)}fs.prototype.suspend=function(){this.Xk=!0},fs.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Xl(this,!0),ws(this.Yd),fl(this.H),Ms(this.Yd),this.H.redraw()};function Da(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}st=fs.prototype,st.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 dn?a=x:x instanceof en&&(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),ws(y),this.yl.each(function(b){b.data=null,a.add(b)}),Ms(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Qo(y,this),this)},st.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},st.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof dn?this.H=a:a instanceof en&&a.diagram!==null&&(this.H=a.diagram)),a instanceof ki){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return ia(this,a,y,x,b,E),this};function ia(a,y,x,b,E,te){var ne=a.vc;if(y instanceof dn&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(uh(b),av(),b=[nu.j,nu.u,nu.o,nu.F],uh(E),av(),E=[nu.j,nu.u,nu.o,nu.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 en&&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 ki?ae.Ku.location=Ns(y.location):te&&(ae.Ku[x]=Ns(b))}function Ns(a){return a instanceof Tt||a instanceof Xn?a.copy():a}st.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},st.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function Xl(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),ws(x),_c(a,E),fl(a.H,!0),Ms(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 en&&te.diagram===null)){var ne=b.value,ae=E?ne.end:ne.start;ne=E?ne.start:ne.end;var fe=$l,_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)}}}st.stop=function(){return this.bc?(this.Ml(!0),this):this},st.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,ws(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=$l;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 ki&&(ne.location=Me.location),ae.nv&&ne instanceof ki&&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),Ms(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Da(this,null),x.Ml(this),y.$b())}},st.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof sr&&(b=y.placeholder),b!==null?(x=b.ga(Ys),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 sr)for(a=a.memberParts;a.next();)b=a.value,b instanceof ii&&this.Cj(b,y)},st.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof sr&&(x=y.placeholder),x!==null){var b=x.ga(Ys);x=x.padding,b.x+=x.left,b.y+=x.top,this.add(a,"position:placeholder",a.position,b,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),b=this.vc,b.contains(a)&&(b.I(a).nv=!0),a instanceof sr)for(a=a.memberParts;a.next();)b=a.value,b instanceof ii&&this.Aj(b,y)}},st.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Je.Object.defineProperties(fs.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Sn(a,">= 1",fs,"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}}}),fs.prototype.getTemporaryState=fs.prototype.Ez,fs.prototype.stop=fs.prototype.stop,fs.prototype.add=fs.prototype.add,fs.prototype.addTemporaryPart=fs.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}fs.className="Animation",fs.EaseLinear=function(a,y,x,b){return x*a/b+y},fs.EaseInOutQuad=du,fs.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},fs.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},fs.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},fs.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 Fl(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=va))}Fl.prototype.copy=function(){var a=new Fl(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 ss(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(Fl.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 Pn(Fl,"Default",1),va=new Pn(Fl,"Immediate",2),zs=new Pn(Fl,"Bundled",3);Fl.className="AnimationTrigger",Fl.Default=js,Fl.Immediate=va,Fl.Bundled=zs;function rs(a){wr(this),this.H=null,this.Pa=new In,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)}st=rs.prototype,st.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,ja(x)}a.clear(),this.Zq.length=0},st.Xe=function(a){this.H=a},st.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,b=0,E=0,te=0,ne=0,ae=this.Pa.iterator;ae.next();){var fe=ae.value;fe instanceof sr?E++:fe instanceof ii?b++:fe instanceof $n?te++:fe instanceof Xr?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&&Ar(b)&&(ae+=" #"+Ar(b)),x instanceof ii?ae+=" "+si(b):x instanceof $n&&(ae+=" "+si(x.fromNode)+" "+si(x.toNode));return y+" "+this.Pa.count+": "+ae},st.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),qi(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},st.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof In||b instanceof On||(b=new On),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),qi(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},st.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 In||E instanceof On||(E=new On),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},st.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},st.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 In||E instanceof On)&&(te=E),E=!0),te instanceof In||te instanceof On||(te=new On),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),qi(ae,Fe.oe),fe.h(a.x+y,a.y),qi(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},st.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=Un();for(var E=Un(),te=0;te<b;te++){var ne=x[te];if(ne.vw=te,ne instanceof $n){if(ne.fd===!1)continue}else if(ne instanceof Xr&&ne.adornedPart!==null)continue;var ae=ne.actualBounds;ne.isVisible()&&au(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]);qn(a),qn(E)}}};function _a(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}st.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var b=x.length;if(b!==0){if(a.isTemporary)for(var E=0;E<b;E++)x[E].Gj();E=_a(this,a);var te=this.Zq;te.length=0;for(var ne=y.scale,ae=_n.alloc(),fe=0;fe<b;fe++)this.Oj(a,x[fe],y,te,ne,ae,!0);if(_n.free(ae),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function _l(a,y,x,b,E){if(a.visible&&a.pb!==0&&(E||!a.isTemporary)){E=a.Pa.s;var te=E.length;if(te!==0){var ne=_a(a,y),ae=a.Zq;ae.length=0;for(var fe=x.scale,_e=_n.alloc(),Me=0;Me<te;Me++){var Fe=E[Me];b.contains(Fe)&&a.Oj(y,Fe,x,ae,fe,_e,!1)}_n.free(_e),y.globalAlpha=ne}}}st.Oj=function(a,y,x,b,E,te,ne){if(ne&&!hd(y))a.Hs(y);else{if(b!==null&&y instanceof $n&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(ne=!1,b=y.containingGroup;b!==null;)ne?b.tb!==null&&te.Ex(b.tb):b.tb!==null&&(ne=!0,te.assign(b.tb)),b=b.containingGroup;var ae=y.actualBounds;if(b=!1,ne&&y.isVisible()){if(!te.Yc(ae)){a.Hs(y);return}b=!te.Re(ae)}b&&(a.save(),a instanceof jl?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&&(bs(y,a,y.areaBackground,!0,!0,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(bs(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),bs(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))}},st.g=function(a,y,x,b,E){var te=this.diagram;te!==null&&te.cb(Ko,a,this,y,x,b,E)},st.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&ja(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},st.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,ja(y),a};function Nu(a,y,x){if(y=mf(a,y,x),x instanceof sr&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,te=E.length,ne=0;ne<te;ne++){var ae=E[ne];if(ae===x&&(y=ne,0<=b)||0>b&&ae.containingGroup===x&&(b=ne,0<=y))break}!(0>b)&&b<y&&(E=a.Pa,E.mb(y),E.Gb(b,x))}y=x.containingGroup,y!==null&&Nu(a,-1,y)}x.svg!==null&&x.svg.remove()}function mf(a,y,x){var b=x.zOrder;if(isNaN(b))return y;a=a.Pa;var E=a.count;if(1>=E)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var te=y-1,ne=NaN;0<=te&&(ne=a.M(te).zOrder,!!isNaN(ne));)te--;for(var ae=y+1,fe=NaN;ae<E&&(fe=a.M(ae).zOrder,!!isNaN(fe));)ae++;if(!isNaN(ne)&&ne>b)for(;;){if(te===-1||ne<=b){if(te++,te===y)break;return a.mb(y),a.Gb(te,x),te}for(ne=NaN;0<=--te&&(ne=a.M(te).zOrder,isNaN(ne)););}else if(!isNaN(fe)&&fe<b)for(;;){if(ae===E||fe>=b){if(ae--,ae===y)break;return a.mb(y),a.Gb(ae,x),ae}for(fe=NaN;++ae<E&&(fe=a.M(ae).zOrder,isNaN(fe)););}return y}Je.Object.defineProperties(rs.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)&&Sn(a,"0 <= value <= 1",rs,"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))}}}),rs.prototype.findObjectsNear=rs.prototype.og,rs.prototype.findObjectsIn=rs.prototype.Cf,rs.prototype.findObjectsAt=rs.prototype.ji,rs.prototype.findObjectAt=rs.prototype.ic,rs.className="Layer";function dn(a,y){if(hm||(Ba(),hm=!0),wr(this),ac=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,ys){var x=this,b=function(){x.removeEventListener(_t.document,"DOMContentLoaded",b,!1),x.setRTL()};_t.document.body!==null?this.setRTL():x.addEventListener(_t.document,"DOMContentLoaded",b,!1)}this.ol=null,rp.add("Model",So);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===Ko&&ne.updateDataBindings(te.object,te.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(te){E.partManager.doModelChanged(te)},this.hu=this.ku=null,vf(this),this.model=hy(),this.Wg=!0,id(this),this.layout=new es,this.Wg=!1,this.ck=this.ek=this.fk=this.dk=this.ui=this.aA=this.$j=this.Ov=null,this.hk=function(){},this.preventDefault=null,this.rn=!1,this.Yf=new dm,a!==void 0&&(typeof a=="string"||_t.Element&&a instanceof Element?Rd(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Bc,ac;function vf(a){a.Yd=new Ao,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new In,a.pj=new fi,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 mr,a.zu=new Tt(NaN,NaN).freeze(),a.ut=new _n(NaN,NaN,NaN,NaN).freeze(),a.rj=new Ci(0,0,0,0).freeze(),a.sj=Th,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Va,a.zk=so,a.Fg=Va,a.pq=so,a.yt=Ys,a.Bt=Ys,a.Fc=!0,a.pn=!1,a.De=new On,a.Eh=new fi,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Ci(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Ca,a.bq.diagram=a,a.Qg=new Ca,a.Qg.diagram=a,a.cj=new Ca,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,nv(a),a.ai=new On,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 fi,a.Xn=new In,a.Gg=!1,a.Jd=!0,a.Us=!0,a.Fi=!0,a.Gi=!0,a.Vs=!1,a.Ws=!0,a.Pi=!0,a.Hi=!0,a.Qi=!0,a.Ys=!0,a.Ii=!0,a.Ki=!0,a.Ji=!0,a.Li=!0,a.Mi=!0,a.Ni=!0,a.Oi=!0,a.Zs=!0,a.at=!0,a.qw=!1,a.Vk=!1,a.mn=!0,a.nn=!0,a.Xs=!0,a.$s=!0,a.iu=16,a.mu=16,a.qr=!1,a.gu=!1,a.lu=0,a.ju=0,a.yb=new Ci(5).freeze(),a.Hw=new On().freeze(),a.Nt=999999999,a.nw=new On().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 On,a.ow=new On,a.Xh=null,a.aw=new Xn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Tt,bounds:new _n,Py:new Xn,bA:new Xn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new _n(NaN,NaN,NaN,NaN).freeze(),a.wo=new Xn(NaN,NaN).freeze(),a.Sp=new _n(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new fi;var y=new ii,x=new No;x.bind(new Hs("text","",si)),y.add(x),a.ny=y,a.Lg.add("",y),y=new ii,x=new No,x.stroke="brown",x.bind(new Hs("text","",si)),y.add(x),a.Lg.add("Comment",y),y=new ii,y.selectable=!1,y.avoidable=!1,x=new pr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Xn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new fi,y=new sr,y.selectionObjectName="GROUPPANEL",y.type=Gn.Vertical,x=new No,x.font="bold 12pt sans-serif",x.bind(new Hs("text","",si)),y.add(x),x=new Gn(Gn.Auto),x.name="GROUPPANEL";var b=new pr;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new rl,b.padding=new Ci(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new fi,y=new $n,x=new pr,x.isPanelMain=!0,y.add(x),x=new pr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new $n,x=new pr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Xr,y.type=Gn.Auto,x=new pr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new rl,x.margin=new Ci(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Xr,y.type=Gn.Link,x=new pr,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 So,a.toolManager=new Uo,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=$o,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}dn.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 On().freeze(),a.nw=new On().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(),Di=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),te}function oh(){return null}dn.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 Bo,this.vb=this.rn=!1,this.N()},dn.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=_t.document.body);var y=zn("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},dn.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=_t.document.body);var y=0;if(ys){var x=cm;y=Bc,x===null&&(x=cm=zn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Bc=zn("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||lr||(y=11)}this.Db=y,this.Gw=!0},dn.prototype.qb=function(a){a.classType===dn&&(this.autoScale=a)},dn.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=_t.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&&_t.ResizeObserver){var x=wn(function(){a.$b()},250);a.ol=new _t.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}_t.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var b="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=b,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=_t.go;var E=new Du(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",_t.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),E.style.zIndex="2",E.style.userSelect="none",E.style.MozUserSelect="none",E.style.touchAction="none",E.style.letterSpacing="normal !important",E.style.wordSpacing="normal !important"),a.ta=E,a.ib=E.context,b=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Wd(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new Du(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,ys){E=zn("div");var te=zn("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=wn(function(){a.Yh=null,a.N()},300),a.Ov=wn(function(){Bd(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var ae=El(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(),Ql(ae,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,El(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():Ql(fe,ne)}},a.dk=function(ne){if(a.isEnabled){a.Vk=!0;var ae=a.oj;if(ae[0]===null||ae[0].pointerId!==ne.pointerId&&ae[0].pointerType===ne.pointerType){if(ae[1]!==null&&ae[1].pointerId===ne.pointerId){ae[1]=ne;return}if(ae[0]===null)ae[0]=ne;else return}else ae[0]=ne;if(ae[0].pointerId===ne.pointerId){ae=zd(a,ne,!1,!1,!1,ae[1]!==null);var fe=_t.document.elementFromPoint(ne.clientX,ne.clientY)||null;fe!==null&&fe.shadowRoot!==void 0&&fe.shadowRoot!==null&&(fe=fe.shadowRoot.elementFromPoint(ne.clientX,ne.clientY));var _e=a,Me=ne;fe&&fe.H&&(Me=ne,_e=fe.H),ae.targetDiagram=_e,Lh(a,Me,ae),ae.targetObject=null,a.doMouseMove(),Ql(ae,ne)}}},a.fk=function(ne){if(a.isEnabled){a.Vk=!0;var ae=ne.pointerType==="touch"||ne.pointerType==="pen",fe=a.Yt;if(ae&&a.qu)delete fe[ne.pointerId],ne.preventDefault();else if(fe=a.oj,fe[0]===null||fe[0].pointerId!==ne.pointerId&&fe[0].pointerType===ne.pointerType)fe[1]!==null&&fe[1].pointerId===ne.pointerId&&(fe[1]=null);else{fe[0]=null,fe=zd(a,ne,!1,!0,!0,!1);var _e=_t.document.elementFromPoint(ne.clientX,ne.clientY)||null;_e!==null&&_e.shadowRoot!==void 0&&_e.shadowRoot!==null&&(_e=_e.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),_e!==null&&_e.H instanceof dn&&_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(),Ql(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)}}dn.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},dn.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function Kp(a){var y=a.ta.Oa;y instanceof HTMLCanvasElement||(y=a.div),a.addEventListener(y,"pointerdown",a.ui,!1),a.addEventListener(y,"pointermove",a.dk,!1),a.addEventListener(y,"pointerup",a.fk,!1),a.addEventListener(y,"pointerout",a.ek,!1),a.addEventListener(y,"pointercancel",a.ck,!1),a.addEventListener(y,"pointerenter",a.bz,!1),a.addEventListener(y,"pointerleave",a.cz,!1),a.addEventListener(y,"wheel",a.$j,!1),a.addEventListener(y,"keydown",a.Qz,!1),a.addEventListener(y,"keyup",a.Rz,!1),a.addEventListener(y,"blur",a.Ny,!1),a.addEventListener(y,"focus",a.Oy,!1),a.addEventListener(y,"selectstart",function(x){return x.preventDefault(),!1},!1),a.addEventListener(y,"contextmenu",function(x){return x.preventDefault(),!1},!1),a.addEventListener(_t,"resize",a.Ov,!1)}function Ra(a){30<a.Sq&&(a.Yh=1)}function nd(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),pi&&pi.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}dn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:_t.devicePixelRatio||1},dn.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},dn.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},dn.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},dn.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},dn.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},dn.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},dn.prototype.doFocus=function(){this.focus()},dn.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=_t.scrollX||_t.pageXOffset,y=_t.scrollY||_t.pageYOffset;this.ta.focus(),_t.scrollTo(a,y)}},dn.prototype.Oy=function(){this.H.R("GainedFocus")},dn.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===Va&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function id(a){var y=new rs;y.name="Background",a.Al(y),y=new rs,y.name="",a.Al(y),y=new rs,y.name="Foreground",a.Al(y),y=new rs,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new rs,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new rs,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 pr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new pr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new pr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new pr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new pr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new pr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new ki,x.add(y),x.layerName="Grid",x.zOrder=0,x.isInDocumentBounds=!1,x.isAnimated=!1,x.pickable=!1,x.locationObjectName="GRID",a.add(x),a.partManager.parts.remove(x),y.visible=!1,y}function Yf(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):zc(this.H)}function Sf(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):zc(this.H)}dn.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,ot=E.right,ft=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>ot&&(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>ft&&(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,ot=E.right,te=b.bottom,ft=E.bottom,ne=b.x,Fe=E.x,ae=b.y,b=E.y,Ye>=fe&&ne>=Fe&&Me<=ot&&(x.style.width="1px"),tt>=_e&&ae>=b&&te<=ft&&(x.style.height="1px"))}},dn.prototype.computeBounds=function(a){return a===void 0&&(a=new _n),ya(this),Fd(this,a)};function Fd(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,b=a.Wa.s,E=b.length,te=0;te<E;te++){var ne=b[te];if(ne.visible&&ne.isInDocumentBounds){ne=ne.Pa.s;for(var ae=ne.length,fe=0;fe<ae;fe++){var _e=ne[fe];_e.isInDocumentBounds&&_e.isVisible()&&(_e=_e.actualBounds,_e.w()&&(x?(x=!1,y.assign(_e)):y.ed(_e)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}dn.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(rn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof $n||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds))}else for(a=a.iterator;a.next();)b=a.value,!y&&b instanceof $n||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new _n(NaN,NaN,0,0):x};function Jl(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=_n.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,_n.free(b),Tt.free(E),Tt.free(x)}x=a.yh,y&&a.Fg!==Va&&(x=a.Fg);var te=x!==Va?_h(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/te;var ne=a.ya/te,ae=a.zk,fe=a.pq;y&&!ae.sb()&&(fe.sb()||fe.Xb())&&(ae=fe.Xb()?Fr:fe),xf(a,a.documentBounds,E,ne,ae,y),y=a.scale,a.scale=te,a.vb=!1,te=a.viewportBounds,on.B(te.x,x)&&on.B(te.y,b)&&on.B(te.width,E)&&on.B(te.height,ne)||a.onViewportBoundsChanged(new _n(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===ql?(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}dn.prototype.zoomToFit=function(){var a=this.sj;this.sj=Th,this.scale=_h(this,ql),a!==Th&&(Jl(this,!1),xf(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},st=dn.prototype,st.BA=function(a,y){y===void 0&&(y=ql);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===ql||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)}},st.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))},st.zz=function(a){if(a instanceof en){this.eq=a;var y=Tt.alloc();this.fq=this.op(a.ga(Ys,y)),Tt.free(y)}else this.eq=null,this.fq=$o};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(Ys,_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),fa(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),Mc(a),Tt.free(ne)}st.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Ku(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof ki)return a}else if(a=Ku(this,a,function(x){return x.part}),a instanceof ki)return a;return null},st.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),ya(this);for(var b=this.Wa.iteratorBackwards;b.next();){var E=b.value;if(E.visible&&(E=E.ic(a,y,x),E!==null))return E}return null};function Ku(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),ya(a),a=a.Wa.iteratorBackwards;a.next();){var E=a.value;if(E.visible&&!E.isTemporary&&(E=E.ic(y,x,b),E!==null))return E}return null}st.lz=function(a,y,x){return y===void 0&&(y=!0),Fc(this,a,function(b){return b.part},y?function(b){return b instanceof ki&&b.canSelect()}:null,x)};function Fc(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof In||E instanceof On||(E=new On),ya(a),a=a.Wa.iteratorBackwards;a.next();){var te=a.value;te.visible&&!te.isTemporary&&te.ji(y,x,b,E)}return E}st.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof In||b instanceof On||(b=new On),ya(this);for(var E=this.Wa.iteratorBackwards;E.next();){var te=E.value;te.visible&&te.ji(a,y,x,b)}return b},st.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),Eh(this,a,function(E){return E instanceof ki&&(!x||E.canSelect())},y,b)},st.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof In||E instanceof On||(E=new On),ya(this);for(var te=this.Wa.iteratorBackwards;te.next();){var ne=te.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},st.Nu=function(a,y,x,b,E,te){var ne=new On;ya(this);for(var ae=this.Wa.iteratorBackwards;ae.next();){var fe=ae.value;fe.visible&&fe.Nu(a,y,x,b,ne,E,te)}return ne};function Eh(a,y,x,b,E){var te=null;for(te===void 0&&(te=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof In||E instanceof On||(E=new On),ya(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,te,x,b,E)}return E}st.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),sh(this,a,y,function(te){return te instanceof ki&&(!b||te.canSelect())},x,E)},st.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 In||E instanceof On)&&(te=E),E=!0),te instanceof In||te instanceof On||(te=new On),ya(this);for(var ne=this.Wa.iteratorBackwards;ne.next();){var ae=ne.value;ae.visible&&ae.og(a,y,x,b,E,te)}return te};function sh(a,y,x,b,E,te){var ne=null;for(ne===void 0&&(ne=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof In||E instanceof On)&&(te=E),E=!0),te instanceof In||te instanceof On||(te=new On),ya(a),a=a.Wa.iteratorBackwards;a.next();){var ae=a.value;ae.visible&&!ae.isTemporary&&ae.og(y,x,ne,b,E,te)}return te}dn.prototype.acceptEvent=function(a){return El(this,a,a instanceof MouseEvent)};function El(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),lr&&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,lr&&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 Ql(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}dn.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=El(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(),Ql(x,a)},dn.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=El(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(),Ql(x,a)},dn.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=El(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Ql(x,a)},dn.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=El(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Ql(x,a)},dn.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?qi(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))}}dn.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Ud(a){a.ld||ya(a),a.Va()}dn.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},st=dn.prototype,st.Pz=function(){return this.kg},st.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&&Bn(function(){b.ld=!1,Jo(y,"Model"),a(b)},1)},st.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;_t.requestAnimationFrame(function(){y.kg&&y.bd()})}},st.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&&ya(a),x&&Jl(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];Qs(ae,!1),ae.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(fe){fe.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Bd(a),jc(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Lc(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),ya(a),te=!1,(!a.hf||a.xh)&&(a.hf?qp(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),qp(a,!1)),te=!0),a.Jk=!1,ya(a),a.ou||Ud(a),jc(a,!0,!1),ne=!1,te?(x=_n.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),_n.free(x)):x.Ok&&x.Qw&&(a.Fg!==Va?a.scale=_h(a,a.Fg):a.yh!==Va?a.scale=_h(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Jl(a,!0)),te&&ne&&a.eb("Initial Layout"),ya(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function Gd(a){if(a.Fg!==Va)a.scale=_h(a,a.Fg);else if(a.yh!==Va)a.scale=_h(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}Jl(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Lc(a)}function ya(a){if(a.De.count!==0&&(a.ld||!a.animationManager.isTicking)){for(var y=0;23>y;y++){var x=a.De.iterator;if(x===null||a.De.count===0)break;a.De=new On,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof sr&&b.U&65536&&(b.U=b.U^65536)})}}st.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof sr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof sr&&x.isVisible()&&hs(this,x);for(a.reset();a.next();)x=a.value,x instanceof $n&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x));for(a.reset();a.next();)x=a.value,x instanceof Xr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function hs(a,y){for(var x=Un(),b=Un(),E=y.memberParts;E.next();){var te=E.value;te.isVisible()&&(te instanceof sr?(tu(te)||nl(te)||cd(te))&&hs(a,te):te instanceof $n?te.fromNode===y||te.toNode===y?b.push(te):x.push(te):(te.measure(1/0,1/0),te.arrange()))}for(a=x.length,E=0;E<a;E++)te=x[E],te.measure(1/0,1/0),te.arrange();for(qn(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();qn(b)}st.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},st.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),Ka(this,a),y=this.Mb,this.ta.context.setTransform(y,0,0,y,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya),y=0;y<b;y++)x[y].gc(a,this);a=!1,this.Yf?Yd(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(mr.prototype.Cd=mr.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(te=this.animationManager,!te.zb&&(!te.isAnimating||te.isTicking)&&(x=new Date,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),Ka(this,a),ae=0;ae<E;ae++)a.setTransform(ne,0,0,ne,0,0),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),a.yc(),y[ae].gc(a,this);if(y=!1,this.Yf?Yd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(mr.prototype.Cd=mr.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=pi&&pi.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 $s(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 _n(te.x,te.y,b.width/E,b.height/E),ot=tt.copy();ot.Co(x),Lc(a,ot),ya(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 ft=a.Mb;y.scale(ft,ft);var It=mr.alloc();It.reset(),It.translate(x.left,x.top),It.scale(E),te.x===0&&te.y===0||It.translate(-te.x,-te.y),y.setTransform(It.m11,It.m12,It.m21,It.m22,It.dx,It.dy),y.yc(),y instanceof jl&&Yy(y,It.m11,It.m12,It.m21,It.m22,It.dx,It.dy),mr.free(It),Ka(a,y),y.globalAlpha=a.pb;var Mt=a.Qj("Grid");if(ne){var Ht=new On,Gt=ne.iterator;for(Gt.reset();Gt.next();){var Vt=Gt.value;Vt instanceof ki&&(_e||Vt.layer!==Mt)&&(Vt.Gj(),Ht.add(Vt))}for(_e=0;_e<Ye;_e++)_l(Fe[_e],y,a,Ht,fe);Ht.each(function(fn){return fn.Gj()})}else for(Ht=0;Ht<Ye;Ht++){var Qt=Fe[Ht];Qt===Mt?_e&&Qt.gc(y,a,!0):Qt.gc(y,a,fe)}a.$i=!1,a.Yf&&Yd(a.Yf,a)&&a.Vp()}finally{a.Ca=Me,a.ib.Vc(!0),a.vd=!0,a.Fd(Fe,Ye,a,a.viewportBounds),Lc(a),a.ib instanceof jl&&(a.ib.Nj.PA(),a.redraw())}}}st.Gf=function(a){return this.Rg[a]},st.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},st.Tx=function(){this.Rg=new Ti,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(lr||Ui),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Ka(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}st.Ql=function(a){return this.on[a]},st.sA=function(a,y){this.on[a]=y},st.Sx=function(){this.on=new Ti,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},st.set=function(a){return Object.assign(this,a),this},st.Du=function(a){return this.nm(a)},st.nm=function(a){return fu(this,a),this};function fu(a,y){var x=a instanceof Gn,b=a instanceof dn,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])),Zt(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]!=="_"&&!Li(te,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&Li(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 en&&te.Vw(ne)}}st.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new fi,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},st.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")},dn.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=_n.alloc(),Qp(this,this.computeBounds(b)),_n.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=Un(),a=Un(),tt=Math.abs(te),Ye=Math.abs(y);var ot=Me===0?0:E-tt;Me=Tt.allocAt(ot,0),tt=Tt.allocAt(tt+ot,ae),a.push(new _n(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 ft=this.Ab;if(ft.reset(),ft.scale(ne,ne),this.Ca!==1&&ft.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&ft.translate(-ne.x,-ne.y),qi(Me,ft),qi(tt,ft),b.push(new _n(Math.min(Me.x,tt.x),Math.min(Me.y,tt.y),Math.abs(Me.x-tt.x),Math.abs(Me.y-tt.y))),ot=Fe===0?0:ae-Ye,Me.h(0,ot),tt.h(E,Ye+ot),a.push(new _n(Math.min(Me.x,tt.x),Math.min(Me.y,tt.y),Math.abs(Me.x-tt.x),Math.abs(Me.y-tt.y))),qi(Me,ft),qi(tt,ft),b.push(new _n(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 _n(Math.min(Me.x,tt.x),Math.min(Me.y,tt.y),Math.abs(Me.x-tt.x),Math.abs(Me.y-tt.y))),qi(Me,ft),qi(tt,ft),b.push(new _n(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),Ka(this,E),E.globalAlpha=this.pb,ae=0;ae<te;ae++)if(ne=y[ae],fe=b,ne.visible&&ne.pb!==0){_e=_a(ne,E),Fe=ne.Zq,Fe.length=0,Me=this.scale,Ye=_n.alloc(),tt=ne.Pa.s,ft=tt.length,ot=fe.length;for(var It=0;It<ft;It++){var Mt=tt[It],Ht=nf(Mt,Mt.actualBounds);e:{for(var Gt=2/Me,Vt=4/Me,Qt=0;Qt<ot;Qt++){var fn=fe[Qt];if(fn.width!==0&&fn.height!==0&&Ht.Vu(fn.x-Gt,fn.y-Gt,fn.width+Vt,fn.height+Vt)){Ht=!0;break e}}Ht=!1}Ht&&ne.Oj(E,Mt,this,Fe,Me,Ye,!0)}_n.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()}qn(b),qn(a),this.ld=!1}}else this.bd();x&&(Ra(this),this.bd(),nd(this,!0))}else x?(Ra(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 ot=a.ku,ft=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,Vt=0,Qt=Me.width,fn=Me.height,ni=a.rj;a.contentAlignment.sb()?(It.width>Qt&&(Mt=ni.left,Ht=ni.right),It.height>fn&&(Gt=ni.top,Vt=ni.bottom)):(Mt=ni.left,Ht=ni.right,Gt=ni.top,Vt=ni.bottom);var di=It.width+Mt+Ht,li=It.height+Gt+Vt;ni=a.scale;var Vn=di>fe/ni,Dn=li>_e/ni;if(!(te||a.gf||a.Be||Vn||Dn))return!0;Mt=It.x-Mt,fe=Me.x,Ht=It.right+Ht,_e=Me.right+ne,Gt=It.y-Gt;var tr=Me.y;It=It.bottom+Vt,Me=Me.bottom+ae;var Vi="1px";if(Vt="1px",a.scrollMode===Th&&(Vn||Dn)&&(Vn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Vn=1,Mt+1<fe&&(Vn=Math.max((fe-Mt)*ni+a.Aa,Vn)),Ht>_e+1&&(Vn=Math.max((Ht-_e)*ni+a.Aa,Vn)),Qt+ne+1<di&&(Vn=Math.max((di-Qt)*ni+a.Aa,Vn)),Vi=Vn.toString()+"px"),Dn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Vn=1,Gt+1<tr&&(Vn=Math.max((tr-Gt)*ni+a.ya,Vn)),It>Me+1&&(Vn=Math.max((It-Me)*ni+a.ya,Vn)),fn+ae+1<li&&(Vn=Math.max((li-fn)*ni+a.ya,Vn)),Vt=Vn.toString()+"px")),Vn=Vi!=="1px",Dn=Vt!=="1px",Vn&&Dn||!Vn&&!Dn||(Dn&&(_e-=a.Db),Vn&&(Me-=a.Db),di<Qt+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,Mt+1<fe&&(ne=Math.max((fe-Mt)*ni+a.Aa,ne)),Ht>_e+1&&(ne=Math.max((Ht-_e)*ni+a.Aa,ne)),Qt+1<di&&(ne=Math.max((di-Qt)*ni+a.Aa,ne)),Vi=ne.toString()+"px"),Vn=Vi!=="1px",ne=a.ya,Vn!==a.Be&&(ne=Vn?a.ya-a.Db:a.ya+a.Db),li<fn+ae||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(ae=1,Gt+1<tr&&(ae=Math.max((tr-Gt)*ni+ne,ae)),It>Me+1&&(ae=Math.max((It-Me)*ni+ne,ae)),fn+1<li&&(ae=Math.max((li-fn)*ni+ne,ae)),Vt=ae.toString()+"px"),Dn=Vt!=="1px"),a.qr&&Vn===a.Be&&Dn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(Vn!==a.Be&&(Vi==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),te=!0),a.Be=Vn,ft.style.width=Vi,Dn!==a.gf&&(Vt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),te=!0,a.tn&&(ae=Tt.alloc(),Dn?(y.style.left=a.Db+"px",a.position=ae.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=ae.h(a.pa.x-a.Db/a.scale,a.pa.y)),Tt.free(ae))),te&&Mc(a),a.gf=Dn,ft.style.height=Vt,a.gu=!0,te&&(a.pn=!0),y=ot.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Qt+1<di?y=(a.position.x-Mt)*ni:Mt+1<fe?y=ot.scrollWidth-ot.clientWidth:Ht>_e+1&&(y=a.position.x*ni)),a.tn)switch(a.bu){case"negative":y=-(ot.scrollWidth-y-ot.clientWidth);break;case"reverse":y=ot.scrollWidth-y-ot.clientWidth}return ot.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(fn+1<li?ot.scrollTop=(a.position.y-Gt)*ni:Gt+1<tr?ot.scrollTop=ot.scrollHeight-ot.clientHeight:It>Me+1&&(ot.scrollTop=a.position.y*ni)),fe=a.Aa,_e=a.ya,ot.style.width=fe+(a.gf?a.Db:0)+"px",ot.style.height=_e+(a.Be?a.Db:0)+"px",x!==fe||b!==_e||a.animationManager.zb?(x=_n.allocAt(E,Fe,Ye,tt),a.onViewportBoundsChanged(x,a.viewportBounds,ni,te),_n.free(x),!1):!0}st=dn.prototype,st.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)}},st.oi=function(a){this.partManager.oi(a);var y=this;qd(a,function(x){Zd(y,x)}),(a instanceof Xr||a instanceof sr&&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()},st.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()},st.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(cs,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}st.Is=function(a,y){if(y===void 0&&(y=!1),rn(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 On,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},st.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},dn.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 fi;if(a!==null)if(rn(a))for(var te=0;te<a.length;te++)Ou(this,E,a[te],x,b);else for(a=a.iterator;a.next();)Ou(this,E,a.value,x,b);else{for(a=this.parts;a.next();)Ou(this,E,a.value,x,b);for(a=this.nodes;a.next();)Ou(this,E,a.value,x,b);for(a=this.links;a.next();)Ou(this,E,a.value,x,b)}Ec(this,E,y,b,x)}};function Ou(a,y,x,b,E,te){if(!y.contains(x)&&(te===void 0&&(te=!1),!b||te||x.canMove()||x.canCopy()))if(E===void 0&&(E=Xf(a)),x instanceof ii){if(y.add(x,a.Pd(E,x,x.location)),x instanceof sr&&(x.placeholder!==null||E.dragsMembers))for(te=x.memberParts;te.next();)Ou(a,y,te.value,b,E,E.groupsAlwaysMove);for(te=x.linksConnected;te.next();){var ne=te.value;if(!y.contains(ne)){var ae=ne.fromNode,fe=ne.toNode;ae!==null&&y.contains(ae)&&fe!==null&&y.contains(fe)&&Ou(a,y,ne,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)Ou(a,y,x.value,b,E)}else if(x instanceof $n)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)Ou(a,y,x.value,b,E);else x instanceof Xr||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=Un(),fe=Un(),_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 $n&&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 ot=fe[Ye];if(tt=ot.key,tt instanceof $n)if(tt.suspendsRouting){tt.Tg=null,Me=tt.fromNode;var ft=tt.toNode;if(a.draggedLink!==null&&b.dragsLink)if(ft=ot.value.point,tt.dragComputation===null)y.add(tt,a.Pd(b,tt,ne)),Bh(tt,ne.x-ft.x,ne.y-ft.y);else{ot=Tt.allocAt(0,0),(Me=tt.i(0))&&Me.w()&&ot.assign(Me);var It=Me=Tt.alloc().assign(ot).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(ot),y.add(tt,a.Pd(b,tt,Me)),Bh(tt,Me.x-ft.x,Me.y-ft.y),Tt.free(ot),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)),ft!==null&&(_e.assign(ft.location),It=y.I(ft),It!==null&&_e.re(It.point)),Me!==null&&ft!==null?E.Xa(_e)?(Me=ot.value.point,ft=te,ft.assign(E),ft.re(Me),y.add(tt,a.Pd(b,tt,E)),Bh(tt,ft.x,ft.y)):(tt.suspendsRouting=!1,tt.bb()):(ot=ot.value.point,Me=Me!==null?E:ft!==null?_e:ne,y.add(tt,a.Pd(b,tt,Me)),Bh(tt,Me.x-ot.x,Me.y-ot.y))}else(tt.fromNode===null||tt.toNode===null)&&(Me=ot.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),qn(ae),qn(fe),x||(ya(a),od(a,y))}}dn.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),on.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 $n&&(y.suspendsRouting=!0)}function od(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof $n&&(x.suspendsRouting=!1,$v(x)&&x.bb())}a.Mr=!1}}function Vp(a,y,x){return y=y.containingGroup,y!==null&&(a=Vp(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}st=dn.prototype,st.Pd=function(a,y,x){if(x===void 0)return new ah(Ir);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.")}}st.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},st.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(cs,"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},st.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(cs,"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},st.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(cs,"layers",this,a,null,x,null),this.N(),this.Ya()}}},st.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},st.Yw=function(a){return this.pf===null&&(this.pf=new In),this.pf.add(a),this.model.Pe(a),this},st.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},st.Pe=function(a){return this.zg===null&&(this.zg=new In),this.zg.add(a),this},st.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},st.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Za&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},st.cb=function(a,y,x,b,E,te,ne){te===void 0&&(te=null),ne===void 0&&(ne=null);var ae=new Ho;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)},st.g=function(a,y,x,b,E){this.cb(Ko,a,this,y,x,b,E)},dn.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===Ko){var E=a.object;if(Vo(E,a.propertyName,a.I(y)),E instanceof en){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 en){y?ne.pc(ae):ne.Gb(ae,fe);var _e=ne.part;_e!==null&&_e.Wb()}else typeof ae=="number"&&fe instanceof ea&&(fe.isRow?h1(ne,ae,y?void 0:fe):d1(ne,ae,y?void 0:fe));else if(ne instanceof rs){var Me=a.oldParam===!0;typeof ae=="number"&&fe instanceof ki&&(y?(fe.isSelected=!1,fe.isHighlighted=!1,fe.Wb(),ne.pc(Me?ae:-1,fe,Me)):ne.oi(ae,fe,Me))}else ne instanceof dn?typeof ae=="number"&&fe instanceof rs&&(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===cs){var Fe=a.object,Ye=a.oldParam,tt=a.oldValue;if(Fe instanceof Gn)typeof Ye=="number"&&tt instanceof en?y?Fe.Gb(Ye,tt):Fe.pc(Ye):typeof Ye=="number"&&tt instanceof ea&&(tt.isRow?h1(Fe,Ye,y?tt:void 0):d1(Fe,Ye,y?tt:void 0));else if(Fe instanceof rs){var ot=a.newParam===!0;typeof Ye=="number"&&tt instanceof ki&&(y?0>Fe.Pa.indexOf(tt)&&Fe.oi(Ye,tt,ot):(tt.isSelected=!1,tt.isHighlighted=!1,tt.Wb(),Fe.pc(ot?Ye:-1,tt,ot)))}else Fe instanceof dn?typeof Ye=="number"&&tt instanceof rs&&(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!==Za&&At("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},dn.prototype.Ea=function(a){return this.undoManager.Ea(a)},dn.prototype.eb=function(a){return this.undoManager.eb(a)},dn.prototype.Kf=function(){return this.undoManager.Kf()},dn.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}},dn.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},dn.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&&(Xs(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(Ga)&&(ae=te-1):ae=_e.sb()?_e.x*(te-1):te/2),isNaN(fe)&&(_e.$c()?_e.Hf(Kl)?fe=0:_e.Hf(Wa)&&(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),Jl(a,!1),b.zb&&(Xs(b)||b.ce.add(b.H,"scale",y,a.Ca))}}dn.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!==Va||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof Uo&&(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=Xn.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/on.vx(te,Me):E=E*Me/on.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=_n.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){_n.free(y);return}E=y.width,te=y.height,a=y.x,ne=y.y,_n.free(y)}x.width=E+2*b.width,x.height=te+2*b.height,y=Tt.alloc(),on.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),Xn.free(b),x.part.location=y,Tt.free(y)}}dn.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)}},dn.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))},dn.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),rn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof ki||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 ki||At("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},dn.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()}},st=dn.prototype,st.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},st.Jz=function(a){a=new On().addAll(a);for(var y=this.highlighteds.copy().hp(a).iterator;y.next();)y.value.isHighlighted=!1;for(a=a.iterator;a.next();)y=a.value,y instanceof ki||At("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},st.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)},st.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)},st.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},st.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)},st.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 _n(te,tt,Ye-te,y-tt)},st.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),qi(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 So}dn.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===Za&&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===Za){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),ya(this));var te=this.animationManager;b==="RolledBackTransaction"&&te.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||xs(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;Bn(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 On&&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 On&&x.Bg.remove(a),vp(b));break}}}}}dn.prototype.Wd=function(){this.partManager.Wd()},dn.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},dn.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},dn.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},dn.prototype.Vb=function(a){return this.partManager.Vb(a)},dn.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},st=dn.prototype,st.Lc=function(a){return this.partManager.Lc(a)},st.ii=function(a){return this.partManager.ii(a)},st.Kc=function(a){return this.partManager.Kc(a)},st.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:yo(Er(y)))},st.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:yo(Er(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),Jl(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}st.Va=function(){if(this.Zi){var a=_n.alloc();Qp(this,this.computeBounds(a)),_n.free(a)}},st.rz=function(){for(var a=new On,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},st.qz=function(){return this.ai.iterator},st.Uz=function(a){ya(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),ya(a),E.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,b===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||b!==0&&b!==1||xs(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),hs(a,y),E.isValidLayout=!0):a.xh=!0)}}st.yz=function(){for(var a=new In,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 In;x.add(E,ne),x.add(te,ne),b.add(E,E),b.add(te,E)}var x=new fi,b=new fi;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)}st.Bj=function(a,y){return a=ep(this,a),a!==null&&a.add(y),this},st.am=function(a,y){a=ep(this,a),a!==null&&a.remove(y)},st.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}st.Yj=function(a,y){return np(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},dn.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=_n.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)}_n.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=_n.alloc(),te=x.memberParts;te.next();)ne=te.value,ne instanceof ii&&ip(a,ne,b,y);_n.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&oS(E);return E}function lm(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?lm(a,y.containingGroup):null}function ip(a,y,x,b){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(b),a=a.Xh;var E=y.x,te=y.y;if(Cp(a,E,te))for(x=(te-a.Od)/a.sc|0,b=Math.min((E+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((te+y.height-a.Od)/a.sc|0,a.ei),E=(E-a.Nd)/a.rc|0;E<=b;E++)if(te=a.ac[E],te.fill)te.fill(jh,x,y+1);else for(var ne=x;ne<=y;ne++)te[ne]=jh}else if(y instanceof sr)for(y=y.memberParts;y.next();)E=y.value,E instanceof ii&&ip(a,E,x,b)}}function Mh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}dn.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=Bn(function(){if(a.vk!==-1&&(a.ug(),a.lastInput.event!==null)){var y=a.computeAutoScrollPosition(a.wp);y.Xa(a.position)||(a.position=y,a.lastInput.documentPoint=a.Ps(a.wp),a.doMouseMove(),a.Zi=!0,y=_n.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Qp(a,y),_n.free(y),a.Fc=!0,a.bd(),tg(a))}},a.vp))}dn.prototype.ug=function(){this.vk!==-1&&(_t.clearTimeout(this.vk),this.vk=-1)},dn.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=_n.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(Ir)||(y=new Tt(y.x+te.x/E,y.y+te.y/E)),_n.free(b),Tt.free(te),y},st=dn.prototype,st.Cs=function(){return null},st.av=function(){return null},st.bs=function(a,y){this.pj.add(a,y)},st.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof sr&&(y.$p=null)})};function wf(a,y,x){function b(){var 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):_t.requestAnimationFrame(b)}for(var E=x.callback,te=!0,ne=a.Og.iterator;ne.next();)if(!ne.value[0].al){te=!1;break}if(typeof E!="function"||te)return y(x,E,a);var ae=a,fe=x.callbackTimeout||300,_e=+new Date;return _t.requestAnimationFrame(function(){b()}),null}st.Wz=function(a){return ys?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},st.Jx=function(a){return a===void 0&&(a={}),wf(this,this.Xz,a)},st.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 Xn(1/0,1/0):new Xn(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,ot=y.showTemporary;ot===void 0&&(ot=!Fe),y=y.showGrid,y===void 0&&(y=ot),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof _e=="number"?_e=new Ci(_e):_e instanceof Ci||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 ft=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,$s(a,b.context,_e,new Xn(Fe.width,Fe.height),a.Ca,a.pa,fe,Me,ot,y),b.context):(a.Xm=!1,$s(a,ft,_e,new Xn(Fe.width,Fe.height),a.Ca,a.pa,fe,Me,ot,y),a.Xm=!0,Fe.context);var It=a.Pp,Mt=a.documentBounds.copy();if(Mt.Fv(a.yb),ot)for(var Ht=a.Wa.s,Gt=Ht.length,Vt=0;Vt<Gt;Vt++){var Qt=Ht[Vt];if(Qt.visible&&Qt.isTemporary){Qt=Qt.Pa.s;for(var fn=Qt.length,ni=0;ni<fn;ni++){var di=Qt[ni];di.isInDocumentBounds&&di.isVisible()&&(di=di.actualBounds,di.w()&&Mt.ed(di))}}}if(Ht=new Tt(Mt.x,Mt.y),fe!==null){for(Gt=new _n(0,0,0,0),Vt=!0,Qt=fe.iterator,Qt.reset();Qt.next();)fn=Qt.value,fn instanceof ki&&(ni=fn.layer,ni!==null&&!ni.visible||ni!==null&&!ot&&ni.isTemporary||!fn.isVisible()||(fn=fn.actualBounds,fn.w()&&(Vt?(Vt=!1,Gt.assign(fn)):Gt.ed(fn))));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),Vt=Qt=0,E!==null&&(Qt=E.width,Vt=E.height,isFinite(Qt)&&(Qt=Math.max(0,Qt-ae)),isFinite(Vt)&&(Vt=Math.max(0,Vt-Gt))),E!==null&&te!==null?(te==="NaN"&&(te=It),E.w()?(E=Qt,Mt=Vt):isNaN(Vt)?(E=Qt,Mt=Mt.height*te):(E=Mt.width*te,Mt=Vt)):E!==null?E.w()?(te=Math.min(Qt/Mt.width,Vt/Mt.height),E=Qt,Mt=Vt):isNaN(Vt)?(te=Qt/Mt.width,E=Qt,Mt=Mt.height*te):(te=Vt/Mt.height,E=Mt.width*te,Mt=Vt):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 Ci(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,$s(a,b.context,_e,new Xn(Math.ceil(E),Math.ceil(Mt)),te,Ht,fe,Me,ot,y),b.context):(a.Xm=!1,$s(a,ft,_e,new Xn(Math.ceil(E),Math.ceil(Mt)),te,Ht,fe,Me,ot,y),a.Xm=!0,Fe.context)}Je.Object.defineProperties(dn.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof He||(a===""&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,a==="default"||a==="canvas"?(a=this.pj.get("svg"),a!==null&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):a==="svg"?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new Tc(this,_t.document),this.bs("svg",a)),this.div!==null&&this.div.appendChild(a.Oa),this.ib=a.context,this.ta&&(this.ta.context.setTransform(this.Mb,0,0,this.Mb,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya))):a!=="debug"||this.pj.contains("SVG")||(a=new Tc(this,_t.document),this.bs("SVG",a),a.Oa.style.backgroundColor="whitesmoke",this.div!==null&&this.div.after(a.Oa)),this.hk()))}},div:{get:function(){return this.Ka},set:function(a){if(this.Ka!==a){var y=this.Ka;y!==null?(y.H=void 0,y.goDiagram=void 0,y.go=void 0,y.innerHTML="",this.ta!==null&&(y=this.ta.Oa,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.ta.mx()),this.ol&&(this.ol.disconnect(),this.ol=null),y=this.toolManager,y!==null&&(y.mouseDownTools.each(function(x){x.cancelWaitAfter()}),y.mouseMoveTools.each(function(x){x.cancelWaitAfter()}),y.mouseUpTools.each(function(x){x.cancelWaitAfter()})),y.cancelWaitAfter(),this.currentTool.doCancel(),this.ta=null,this.removeEventListener(_t,"resize",this.Ov,!1),this.removeEventListener(_t,"wheel",this.$j,!0),ac===this&&(ac=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Rd(this,a),this.hk())}}},$w:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,a!==null&&(this.Vt=a.fromPort,this.Wt=a.toPort))}},Mx:{get:function(){return this.Vt},set:function(a){this.Vt=a}},Nx:{get:function(){return this.Wt},set:function(a){this.Wt=a}},animationManager:{get:function(){return this.Yd}},undoManager:{get:function(){return this.cc.undoManager}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a,this.cc.skipsUndoManager=a}},delaysLayout:{get:function(){return this.lt},set:function(a){this.lt=a}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Sn(a,"0 <= value <= 1",dn,"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),Jl(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),Jl(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),Jl(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),Jl(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Sn(a,">= 0",dn,"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&&Sn(a,">= 0",dn,"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 Sn(a,">= 0",dn,"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(_t,"pointermove",this.dk,!0),this.addEventListener(_t,"pointerdown",this.ui,!0),this.addEventListener(_t,"pointerup",this.fk,!0),this.addEventListener(_t,"pointerout",this.ek,!0),this.addEventListener(_t,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(_t,"wheel",this.$j,!0),this.addEventListener(_t,"selectstart",this.preventDefault,!1)):(this.removeEventListener(_t,"pointermove",this.dk,!0),this.removeEventListener(_t,"pointerdown",this.ui,!0),this.removeEventListener(_t,"pointerup",this.fk,!0),this.removeEventListener(_t,"pointerout",this.ek,!0),this.removeEventListener(_t,"pointercancel",this.ck,!0),this.addEventListener(y,"pointermove",this.dk,!1),this.addEventListener(y,"pointerdown",this.ui,!1),this.addEventListener(y,"pointerup",this.fk,!1),this.addEventListener(y,"pointerout",this.ek,!1),this.addEventListener(y,"pointercancel",this.ck,!1),this.removeEventListener(_t,"wheel",this.$j,!0),this.removeEventListener(_t,"selectstart",this.preventDefault,!1),this.addEventListener(y,"wheel",this.$j,!1)),this.qw=a))}},position:{get:function(){return this.pa},set:function(a){var y=Tt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),fa(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 Ci(a));var y=this.rj;y.D(a)||(this.rj=a=a.J(),this.g("scrollMargin",y,a),this.hk())}},scrollMode:{get:function(){return this.sj},set:function(a){var y=this.sj;y!==a&&(this.sj=a,a===Th&&Jl(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,Jl(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!==Va&&Jl(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)):Sn(a,"> 0",dn,"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)):Sn(a,"> 0",dn,"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),Jl(this,!1))}},initialContentAlignment:{get:function(){return this.pq},set:function(a){var y=this.pq;y.D(a)||(this.pq=a=a.J(),this.g("initialContentAlignment",y,a))}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Ci(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.Ya(),this.g("padding",y,a))}},partManager:{get:function(){return this.Pc},set:function(a){var y=this.Pc;y!==a&&(a.diagram!==null&&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!==Js&&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 Xn(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.bw},set:function(a){this.bw=Math.max(1,a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var y=this.vp;y!==a&&(this.vp=a,this.g("autoScrollInterval",y,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){typeof a=="number"&&(a=new Ci(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Je.Object.defineProperties(dn,{licenseKey:{get:function(){return ag.jc()},set:function(a){ag.add(a.replace(/\s/g,""))}},version:{get:function(){return Vd}}}),dn.prototype.makeImageData=dn.prototype.Jx,dn.prototype.makeImage=dn.prototype.Wz,dn.prototype.cacheGroupExternalLinks=dn.prototype.Fu,dn.prototype.addRenderer=dn.prototype.bs,dn.prototype.makeSVG=dn.prototype.av,dn.prototype.makeSvg=dn.prototype.Cs,dn.prototype.stopAutoScroll=dn.prototype.ug,dn.prototype.doAutoScroll=dn.prototype.gs,dn.prototype.isUnoccupied=dn.prototype.Yj,dn.prototype.raiseDiagramEvent=dn.prototype.R,dn.prototype.removeDiagramListener=dn.prototype.am,dn.prototype.addDiagramListener=dn.prototype.Bj,dn.prototype.findTreeRoots=dn.prototype.yz,dn.prototype.layoutDiagram=dn.prototype.Uz,dn.prototype.findTopLevelGroups=dn.prototype.qz,dn.prototype.findTopLevelNodesAndLinks=dn.prototype.rz,dn.prototype.ensureBounds=dn.prototype.Va,dn.prototype.findLinksByExample=dn.prototype.ls,dn.prototype.findNodesByExample=dn.prototype.ms,dn.prototype.findLinkForData=dn.prototype.Kc,dn.prototype.findNodeForData=dn.prototype.ii,dn.prototype.findPartForData=dn.prototype.Lc,dn.prototype.findLinkForKey=dn.prototype.findLinkForKey,dn.prototype.findNodeForKey=dn.prototype.Vb,dn.prototype.findPartForKey=dn.prototype.findPartForKey,dn.prototype.rebuildParts=dn.prototype.Wd,dn.prototype.transformViewToDoc=dn.prototype.Ps,dn.prototype.transformRectDocToView=dn.prototype.zA,dn.prototype.transformDocToView=dn.prototype.op,dn.prototype.centerRect=dn.prototype.es,dn.prototype.scrollToRect=dn.prototype.tv,dn.prototype.scroll=dn.prototype.scroll,dn.prototype.highlightCollection=dn.prototype.Jz,dn.prototype.highlight=dn.prototype.Iz,dn.prototype.selectCollection=dn.prototype.rA,dn.prototype.select=dn.prototype.select,dn.prototype.updateAllRelationshipsFromData=dn.prototype.rp,dn.prototype.updateAllTargetBindings=dn.prototype.updateAllTargetBindings,dn.prototype.commit=dn.prototype.commit,dn.prototype.rollbackTransaction=dn.prototype.Kf,dn.prototype.commitTransaction=dn.prototype.eb,dn.prototype.startTransaction=dn.prototype.Ea,dn.prototype.raiseChanged=dn.prototype.g,dn.prototype.raiseChangedEvent=dn.prototype.cb,dn.prototype.removeChangedListener=dn.prototype.ik,dn.prototype.addChangedListener=dn.prototype.Pe,dn.prototype.removeModelChangedListener=dn.prototype.mA,dn.prototype.addModelChangedListener=dn.prototype.Yw,dn.prototype.findLayer=dn.prototype.Qj,dn.prototype.removeLayer=dn.prototype.kA,dn.prototype.addLayerAfter=dn.prototype.Cy,dn.prototype.addLayerBefore=dn.prototype.Ww,dn.prototype.addLayer=dn.prototype.Al,dn.prototype.moveParts=dn.prototype.moveParts,dn.prototype.copyParts=dn.prototype.Kj,dn.prototype.removeParts=dn.prototype.Is,dn.prototype.remove=dn.prototype.remove,dn.prototype.add=dn.prototype.add,dn.prototype.clearDelayedGeometries=dn.prototype.bx,dn.prototype.setProperties=dn.prototype.nm,dn.prototype.attach=dn.prototype.Du,dn.prototype.set=dn.prototype.set,dn.prototype.resetInputOptions=dn.prototype.Sx,dn.prototype.setInputOption=dn.prototype.sA,dn.prototype.getInputOption=dn.prototype.Ql,dn.prototype.resetRenderingHints=dn.prototype.Tx,dn.prototype.setRenderingHint=dn.prototype.Xx,dn.prototype.getRenderingHint=dn.prototype.Gf,dn.prototype.maybeUpdate=dn.prototype.bd,dn.prototype.requestUpdate=dn.prototype.$b,dn.prototype.delayInitialization=dn.prototype.Xy,dn.prototype.isUpdateRequested=dn.prototype.Pz,dn.prototype.invalidateDocumentBounds=dn.prototype.Ya,dn.prototype.findObjectsNear=dn.prototype.og,dn.prototype.findPartsNear=dn.prototype.mz,dn.prototype.findObjectsIn=dn.prototype.Cf,dn.prototype.findPartsIn=dn.prototype.ux,dn.prototype.findObjectsAt=dn.prototype.ji,dn.prototype.findPartsAt=dn.prototype.lz,dn.prototype.findObjectAt=dn.prototype.ic,dn.prototype.findPartAt=dn.prototype.Ol,dn.prototype.focusObject=dn.prototype.zz,dn.prototype.alignDocument=dn.prototype.Jy,dn.prototype.zoomToRect=dn.prototype.BA,dn.prototype.zoomToFit=dn.prototype.zoomToFit,dn.prototype.diagramScroll=dn.prototype.kx,dn.prototype.focus=dn.prototype.focus;var rp=new fi,cm=null,ys=_t.document!==void 0,Kd=null,ad="",Va=new Pn(dn,"None",0),ql=new Pn(dn,"Uniform",1),ld=new Pn(dn,"UniformToFill",2),bf=new Pn(dn,"CycleAll",10),ng=new Pn(dn,"CycleNotDirected",11),ig=new Pn(dn,"CycleNotDirectedFast",12),rg=new Pn(dn,"CycleNotUndirected",13),og=new Pn(dn,"CycleDestinationTree",14),sg=new Pn(dn,"CycleSourceTree",15),Th=new Pn(dn,"DocumentScroll",1),Cf=new Pn(dn,"InfiniteScroll",2),kh=new Pn(dn,"TreeParentCollapsed",21),Js=new Pn(dn,"AllParentsCollapsed",22),op=new Pn(dn,"AnyParentsCollapsed",23),ag=new In,Vd="2.3.10",$d="image",Pf=null,hm=!1;function Ba(){if(ys){var a=_t.document.createElement("canvas"),y=a.getContext("2d"),x=Ln("7ca11abfd022028846");y[x]=Ln("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",un.Dx+"4ae6247590da4bb21c324ba3a84e385776",mr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",on.za],E=1;5>E;E++)y[Ln("7ca11abfd7330390")](Ln(b[E-1]),10,15*E);for(y[x]=Ln("39f046ebb36e4b"),x=1;5>x;x++)y[Ln("7ca11abfd7330390")](Ln(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(mr.prototype.Cd=mr.prototype.Eu),Pf=a}}dn.className="Diagram",dn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=_t.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof dn?y.H:null},dn.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},dn.useDOM=function(a){ys=a?_t.document!==void 0:!1},dn.isUsingDOM=function(){return ys},dn.None=Va,dn.Uniform=ql,dn.UniformToFill=ld,dn.CycleAll=bf,dn.CycleNotDirected=ng,dn.CycleNotDirectedFast=ig,dn.CycleNotUndirected=rg,dn.CycleDestinationTree=og,dn.CycleSourceTree=sg,dn.DocumentScroll=Th,dn.InfiniteScroll=Cf,dn.TreeParentCollapsed=kh,dn.AllParentsCollapsed=Js,dn.AnyParentsCollapsed=op;function dm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Yd(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)e:{y="f";var x=_t[Ln("76a715b2f73f148a")][Ln("72ba13b5")]||"";if(a.Rc=!0,ys){var b=dn[Ln("76a115b6ed251eaf4692")];if(b)for(var E=ag.iterator;E.next()&&(b=E.value,b=Ln(b).split(Ln("39e9")),!(6>b.length));){var te=Ln(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=Ln(un[Ln("6cae19")]).split(".");if(te[0]>ne[0]||te[0]===ne[0]&&te[1]>=ne[1]){var ae=_t[Ln("74a900bae4370f8b51")][Ln("6fbb13a1c2311e8a57")].toLowerCase();if(ne=ae[Ln("73a612b6fb191d")](Ln("3aad1ab6e022098b4dc4")),te=Ln(b[2]),-1<ne&&(ae=ae[Ln("73a612b6fb191d")](te.toLowerCase()+"/"),a.Rc=!(-1<ae&&ae<ne),!a.Rc))break;for(ne=x[Ln("76ad18b4f73e")],ae=x[Ln("73a612b6fb191d")](Ln("35e7"))+2;ae<ne;ae++)y+=x[ae];if(ne=y[Ln("73a612b6fb191d")](te),0>ne&&te!==Ln("7da71ca0ad381e90")&&(ne=y[Ln("73a612b6fb191d")](Ln("76a715b2ef3e149757"))),0>ne&&(ne=y[Ln("73a612b6fb191d")](Ln("76a715b2ef3e149757"))),0>ne&&(ne=y[Ln("73a612b6fb191d")](Ln("2bfa41fdb3784bca12"))),0>ne&&(ne=x[Ln("73a612b6fb191d")](Ln("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[Ln("73a612b6fb191d")](Ln("35"))||y[Ln("73a612b6fb191d")](Ln("35"))===-1),!a.Rc||x[Ln("73a612b6fb191d")](Ln("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Ln("73a612b6fb191d")](te)),!a.Rc)||(ne=_t[Ln("76a715b2f73f148a")][Ln("69ad17a1e03e")],ae=ne[Ln("73a612b6fb191d")](Ln("7fb002b6ed25128b4da25b2e")),-1<ae&&(a.Rc=!(ne[Ln("73a612b6fb191d")](te)>ae),!a.Rc)))break;if(te[0]==="#"){ne=_t.document.createElement("div");for(var fe=b[0].replace(/[A-Za-z]/g,"");4>fe.length;)fe+="9";if(ae=fe,fe=fe.substr(fe.length-4),b="",b+=["gsh","gsf"][parseInt(fe.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(fe.substr(0,1),10)%4],ne[Ln("79a417a0f0181a8946")]=b,_t.document[Ln("78a712aa")]){_t.document[Ln("78a712aa")][Ln("7bb806b6ed32388c4a875b")](ne),fe=_t.getComputedStyle(ne).getPropertyValue(Ln("78a704b7e62456904c9b12701b6532a8"));var _e=_t.getComputedStyle(ne).getPropertyValue(Ln("75b817b0ea2202"));if(_t.document[Ln("78a712aa")][Ln("68ad1bbcf533388c4a875b")](ne),fe){if(ne=_t[Ln("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(Ln("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[Ln("76ad18b4f73e")],E=x[Ln("73a612b6fb191d")](Ln("35e7"))+2;E<Me;E++)y+=x[E];x=y[Ln("73a612b6fb191d")](Ln("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Ln("73a612b6fb191d")](Ln("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 Xn(NaN,NaN).freeze(),this.gridSnapCellSpot=Ys,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"||_t.Element&&a instanceof Element)var x=dn.call(this,a)||this;else x=dn.call(this)||this,y=a;return Oe(x),y&&x.nm(y),x}nt(De,dn);function Oe(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=qa,a.layout=new xa}De.prototype.reset=function(){dn.prototype.reset.call(this),Oe(this)},De.className="Palette";function He(a,y){if(typeof a=="string"||_t.Element&&a instanceof Element)var x=dn.call(this,a)||this;else x=dn.call(this)||this,y=a;var b=x;x.animationManager.isEnabled=!1,x.vb=!0,x.V=null,x.mn=!1,x.nn=!1,x.F=!0,x.u=!0,x.ia=0,x.o=!1,x.ql=null,x.Xx("drawShadows",!1),a=new ki;var E=new pr;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 Ci(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=ql,x.vb=!1,y&&Object.assign(x,y),x}nt(He,dn),He.prototype.computePixelRatio=function(){return 1},He.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),lt(this)}finally{this.ta=a,this.ib=y}}}dn.prototype.redraw.call(this)},He.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?lt(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,b=0;b<x;b++)y[b].gc(a,this);this.Fc=this.vd=!1}}};function lt(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=_n.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Lc(y,E),_n.free(E),ya(y));var te=a.Ab;te.reset(),a.scale!==1&&te.scale(a.scale),a.position.x===0&&a.position.y===0||te.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),E.yc(),y=y.Wa.s,te=y.length;for(var ne=0;ne<te;ne++){var ae=y[ne],fe=a;if(ae.visible&&ae.opacity!==0){var _e=ae.diagram.grid.part;if(!x&&ae.isTemporary)b&&_e.layer===ae&&(ae=_a(ae,E),_e.gc(E,fe),E.globalAlpha=ae);else{for(var Me=_a(ae,E),Fe=fe.scale,Ye=_n.alloc(),tt=ae.Pa.s,ot=tt.length,ft=0;ft<ot;ft++){var It=tt[ft];(b||It!==_e)&&ae.Oj(E,It,fe,null,Fe,Ye,!1)}_n.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=Xn.alloc();E.h(x.width,x.height),b.desiredSize=E,Xn.free(E),a=2/a.scale,b instanceof pr&&(b.strokeWidth=a),y.location=new Tt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}He.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Cr;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},He.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},He.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(He.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof He&&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)}}}),He.className="Overview";function Dt(){ts.call(this),this.j=null}nt(Dt,ts),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,ts.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(){wr(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=Cr,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=lr?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 Uo&&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 On,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 On;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 In,x.addAll(te),Kd=x,ad=y.model.dataFormat}}y.R("ClipboardChanged",x)},Ot.prototype.pasteFromClipboard=function(){var a=new On,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===Va&&(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!==Va?!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===Va&&(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!==Va?!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=Cr):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),xs(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=Yt(this,a,[a]);if(E.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var te=function(){y.Ea();for(var fe=E.pop();0<E.length&&fe instanceof ii&&fe.isTreeExpanded&&(!(fe instanceof sr)||fe.isSubGraphExpanded);)fe=E.pop();0<E.length?(fe instanceof ki&&y.tv(fe.actualBounds),fe instanceof ii&&!fe.isTreeExpanded&&(fe.isTreeExpanded=!0),fe instanceof sr&&!fe.isSubGraphExpanded&&(fe.isSubGraphExpanded=!0)):(fe instanceof ki&&y.es(fe.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){Bn(te,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",ne),te()}}else{var ae=y.position.copy();y.es(a.actualBounds),ae.Xa(y.position)&&x.Cc()}}};function Yt(a,y,x){if(y.isVisible())return x;if(y instanceof Xr)Yt(a,y.adornedPart,x);else if(y instanceof $n){var b=y.fromNode;b!==null&&Yt(a,b,x),y=y.toNode,y!==null&&Yt(a,y,x)}else y instanceof ii&&(b=y.labeledLink,b!==null&&Yt(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Yt(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Yt(a,y,x));return x}Ot.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof ki)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Ot.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Jo(y.animationManager,"Collapse Tree");var x=new In;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof ii&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Ot.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof ii&&a.isTreeExpanded))return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ii&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Ot.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Jo(y.animationManager,"Expand Tree");var x=new In;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof ii&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Ot.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof ii)||a.isTreeExpanded)return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ii&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Ot.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var b=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var E=new In,te=a.selection.iterator;te.next();){var ne=te.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var ae=new In,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 sr)Ru(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var tt=y.copyNodeData(x);Zt(tt)&&(y.xf(tt),b=a.ii(tt))}if(b!==null){Fe!==null&&this.isValidMember(Fe,b)&&(b.containingGroup=Fe);for(var ot=ae.iterator;ot.next();){var ft=ot.value;this.isValidMember(b,ft)&&(ft.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 Cn(a){var y=Un();for(a=a.iterator;a.next();){var x=a.value;x instanceof $n||y.push(x)}a=new On,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 qn(y),a}Ot.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof $n)return!1;if(a!==null){if(a===y||a.Td(y))return!1;var x=a.memberValidation;if(x!==null&&!x(a,y)||a.data===null&&y.data!==null||a.data!==null&&y.data===null)return!1}return x=this.memberValidation,x!==null?x(a,y):!0},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 In;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var te=E.value;te instanceof sr&&te.canUngroup()&&b.add(te)}var ne=new In;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 $n)){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 sr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof sr&&y.canUngroup())return!0;return!1},Ot.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Cn(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 In;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof sr&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Ot.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof sr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof sr&&y.isSubGraphExpanded)return!0;return!1},Ot.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Jo(y.animationManager,"Expand SubGraph");var x=new In;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof sr&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Ot.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof sr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof sr&&!y.isSubGraphExpanded)return!0;return!1},Ot.prototype.editTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.toolManager.findTool("TextEditing");if(x!==null){if(a===null){a=null;for(var b=y.selection.iterator;b.next();){var E=b.value;if(E.canEdit()){a=E;break}}if(a===null)return;a=a.Nl(function(te){return te instanceof No&&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 No))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 No&&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 en?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 fi,a===null)return b;for(var te=a.iterator;te.next();)Ou(x,b,te.value,E,y);if(x.draggedLink!==null&&y.dragsLink)return b;for(te=a.iterator;te.next();)a=te.value,a instanceof $n&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},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 en(){wr(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Tt(NaN,NaN).freeze(),this.jd=os,this.Ab=new mr,this.wh=new mr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=ba,this.uc=new _n(NaN,NaN,NaN,NaN).freeze(),this.Ib=new _n(NaN,NaN,NaN,NaN).freeze(),this.dc=new _n(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=so,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 Hn,Fn,vi,_i,zi,ar,Br,br,Gr,Co;en.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=Rn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},en.prototype.Vw=function(a){var y=this.Dh;if(rn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},en.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},en.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},en.prototype.copy=function(){return this.clone()},st=en.prototype,st.qb=function(a){a.classType===$n?a.name.indexOf("Orient")===0?this.segmentOrientation=a:At("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===en&&(this.stretch=a)},st.toString=function(){return Nn(this.constructor)+"#"+Ar(this)},st.th=function(){this.A!==null&&(this.A.nc=!0)};function xr(a){a.A===null?a.A=new Lf:a.A.nc&&(a.A=a.A.copy())}st.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}},st.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===Ko&&Ea(this)&&jo(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 fi),ne=te.undoManager.transactionLevel===0,a.startCondition===va?ne=!0:a.startCondition===zs&&(ne=!1),ne?(te=new fs,ss(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 jo(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))}}st.ks=function(a){return this.bindingId===a?this:null},st.g=function(a,y,x){this.cb(Ko,a,this,y,x)},st.Ge=function(a,y,x,b){var E=this.uc;if(E.h(a,y,x,b),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new mr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),te.pp(E)}};function aa(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}st.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},st.se=function(){return!0},st.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=Lr(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 Xr||this instanceof pr?Lr(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},st.gh=function(a){var y=this.naturalBounds;return Lr(0,0,y.width,y.height,a.x,a.y)},st.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=_n.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),_n.free(y),b},st.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},st.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=_n.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),_n.free(x),!ae&&(on.us(a,b,E)||on.us(a,E,te)||on.us(a,te,ne)||on.us(a,ne,b))&&(ae=!0)}return Tt.free(b),Tt.free(E),Tt.free(te),Tt.free(ne),ae},st.ga=function(a,y){if(y===void 0&&(y=new Tt),a instanceof yi){var x=this.naturalBounds;y.h(a.x*x.width+a.offsetX,a.y*x.height+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},st.mi=function(a){a===void 0&&(a=new _n);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),fo(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),fo(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),fo(a,b.x,b.y,0,0),Tt.free(b),a},st.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},st.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},st.qs=function(a,y){return y===void 0&&(y=new Tt),y.assign(a),this.oe.Cd(y),y},st.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},st.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,on.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=on.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(te),x)},en.prototype.measure=function(a,y,x,b){if(tu(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 Fn:ne=E=0,ae&&(y=a=1/0);break;case Hn: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 zi: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()),Qs(this,!1)}},en.prototype.Wl=function(){},en.prototype.Dd=function(){return!1},en.prototype.arrange=function(a,y,x,b,E){this.Uk();var te=_n.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 No&&(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),_n.free(te)},st=en.prototype,st.eh=function(){};function $a(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=Fn),y){case Fn:(x>b||te>E)&&(Qs(a,!0),a.measure(x>b?b:x,te>E?E:te,0,0));break;case Hn:Qs(a,!0),a.measure(b,E,0,0);break;case _i:Qs(a,!0),a.measure(b,te,0,0);break;case zi:Qs(a,!0),a.measure(x,E,0,0)}}}st.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(),ma(a,y)||(x.oh(),this.Pn(x)))},st.Pn=function(a){this.portId!==null&&(jv(a,!0),a instanceof ii&&W1(a,this))},st.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&&(bs(this,a,_e,!0,!0,fe,ae),_e instanceof vo&&_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&&(bs(this,a,Me,!0,!1,fe,ae),Me instanceof vo&&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&&Sa(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 ot=Ye.m11,ft=Ye.m21,It=Ye.dx,Mt=Ye.m12,Ht=Ye.m22,Gt=Ye.dy,Vt,Qt=Vt=0;Ye=Vt*ot+Qt*ft+It;var fn=Vt*Mt+Qt*Ht+Gt;Vt=tt.width+Fe,Qt=0;var ni=Vt*ot+Qt*ft+It;Vt=Vt*Mt+Qt*Ht+Gt,Qt=Math.min(Ye,ni);var di=Math.min(fn,Vt),li=Math.max(Ye+0,ni)-Qt,Vn=Math.max(fn+0,Vt)-di;Ye=Qt,fn=di,Vt=tt.width+Fe,Qt=tt.height+Fe,ni=Vt*ot+Qt*ft+It,Vt=Vt*Mt+Qt*Ht+Gt,Qt=Math.min(Ye,ni),di=Math.min(fn,Vt),li=Math.max(Ye+li,ni)-Qt,Vn=Math.max(fn+Vn,Vt)-di,Ye=Qt,fn=di,Vt=0,Qt=tt.height+Fe,ni=Vt*ot+Qt*ft+It,Vt=Vt*Mt+Qt*Ht+Gt,Qt=Math.min(Ye,ni),di=Math.min(fn,Vt),li=Math.max(Ye+li,ni)-Qt,Vn=Math.max(fn+Vn,Vt)-di,Ye=Qt,fn=di,Fe=y.viewportBounds,tt=Fe.x,ot=Fe.y,Ye=!(Ye>Fe.width+tt||tt>li+Ye||fn>Fe.height+ot||ot>Vn+fn)}if(Ye){if(Ye=(this.l&256)!==0,a.clipInsteadOfFill&&(Ye=!1),this instanceof No&&(a.font=this.font),Ye){if(fn=ae.se()?ae.naturalBounds:ae.actualBounds,li=Math.max(ne.x,fn.x),Vn=Math.max(ne.y,fn.y),Fe=Math.min(ne.right,fn.right)-li,tt=Math.min(ne.bottom,fn.bottom)-Vn,ot=this.tb,ot!==null&&(li=ot.x,Vn=ot.y,Fe=ot.width,tt=ot.height),li>ne.width+ne.x||ne.x>fn.width+fn.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(li,Vn,Fe,tt),a.clip()}if(Me){if(!_e.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}fe&&(fn=_e.shadowOffset,a.Ev(fn.x*y.scale*this.scale*y.Mb,fn.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(),eu(this,a,_e,ne)),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),fe&&pa(this,ae)&&this.shadowVisible===null&&Uc(a),this.Ma!==null&&(a.yc(),Ll(this,a,_e,ne)),fe&&(this.Ma!==null||this.areaBackground!==null||pa(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 pa(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)}st.Dv=function(){};function eu(a,y,x,b){bs(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof vo&&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 Ll(a,y,x,b){var E=a.kq(),te=x.x,ne=x.y,ae=x.width+E,fe=x.height+E;bs(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof vo&&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 Fa(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 jl))return!1;if(!a.visible||a.opacity===0||a.Dd()&&!a.isVisible())return a.svg!==null&&a.svg.parentNode!==null&&a.svg.remove(),!0;var 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&&Fa(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 No&&(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&&Sa(a);var fe=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,te&&ae?(ug(y,1,0,0,1,0,0),a.svg=y.ad):te?(ug(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):ug(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var _e=ne.copy().Vj();y.rb.ha=[_e.m11,_e.m12,_e.m21,_e.m22,_e.dx,_e.dy],eu(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]),Ll(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],Ll(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&&pa(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||pa(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&&Fa(a,b,ae),ne!==null&&ne(a,ae)),!0)}st.$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"+To++,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 ja(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Er(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()}}st.hh=function(){},st.lv=function(){this.Uc=!0},st.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 pr){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],eu(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]),Ll(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},st.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 bs(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,ot=0,ft=0,It=0;if(It=ft=0,E?(ft=ne.x,It=ne.y):b||(ft-=_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,ot=x.end.y*fe+x.end.offsetY,Fe+=ft,tt+=ft,Ye+=It,ot+=It,x.type===ch)Me=y.createLinearGradient(Fe,Ye,tt,ot);else if(x.type===yu)It=isNaN(x.endRadius)?Math.max(ae,fe)/2:x.endRadius,isNaN(x.startRadius)?(ft=0,It=Math.max(ae,fe)/2):ft=x.startRadius,Me=y.createRadialGradient(Fe,Ye,ft,tt,ot,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&&Bn(function(){Mt.redraw()},600)}}b?y.fillStyle=Me:y.strokeStyle=Me}}}st.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},st.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},st.If=function(){for(var a=this instanceof Gn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Sa(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Iu(a,!1);return}if(y.translate(a.Ib.x-a.uc.x,a.Ib.y-a.uc.y),a.scale!==1||a.angle!==0){var x=a.naturalBounds;a.no(y,x.x,x.y,x.width,x.height)}Iu(a,!1),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)))}st.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)}},st.v=function(a){if(!tu(this)){a===void 0&&(a=!1),Qs(this,!0),Hc(this,!0);var y=this.panel;y===null||a||y.v()}},st.Uj=function(){tu(this)||(Qs(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 ii&&a.Bd(),y.$b())),Hc(a,!0)}}st.Uk=function(){!(this.l&2048)&&(Iu(this,!0),mu(this,!0))},st.Wu=function(){mu(this,!0)},st.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?ga(a,Hn,y):x===ar?b!==null?b.type===Gn.Spot&&b.Pb()===a?ga(a,Hn,y):(x=b.defaultStretch,x===ar?ga(a,Fn,y):ga(a,x,y)):ga(a,Fn,y):ga(a,x,y)}function lc(a,y,x,b){var E=a.stretch;if(E!==ar)return ga(a,E,b);var te=E=null;switch(y.stretch){case zi:te=!0;break;case Hn:te=!0}switch(x.stretch){case _i:E=!0;break;case Hn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===_i||y===Hn),te===null&&(te=y===zi||y===Hn),E===!0&&te===!0?ga(a,Hn,b):E===!0?ga(a,_i,b):te===!0?ga(a,zi,b):ga(a,Fn,b)}function ga(a,y,x){if(x)return y;if(y===Fn||(x=a.desiredSize,x.w()))return Fn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===_i)return Fn;if(y===Hn)return zi}else{if(y===zi)return Fn;if(y===Hn)return _i}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===zi)return Fn;if(y===Hn)return _i}else{if(y===_i)return Fn;if(y===Hn)return zi}return y}function Vu(a,y){a.l=y?a.l|512:a.l&-513}function Ea(a){return(a.l&1024)!==0}function Ef(a,y){a.l=y?a.l|1024:a.l&-1025}function Iu(a,y){a.l=y?a.l|2048:a.l&-2049}function mu(a,y){a.l=y?a.l|4096:a.l&-4097}function tu(a){return(a.l&8192)!==0}function Qs(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}st.Gj=function(){this.svg=null},st.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},st.Av=function(){},st.zv=function(a){return this.pa=a,tl(this),!0},st.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},st.kq=function(){return 0};function Xd(a){var y=a.part;if(y instanceof ii&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||W1(y,a)}}function $y(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Gn?a instanceof ii?a.Bd():a.qm(a,function(x){Xd(x)}):Xd(a))}st.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 In),this.localBindings.add(E),this},st.set=function(a){return Object.assign(this,a),this},st.Du=function(a){return iv(this,a),this},st.apply=function(a){return a(this),this},st.nm=function(a){return fu(this,a),this},st.pz=function(){return this.ih()},st.ih=function(){for(var a=this instanceof Gn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},st.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new fi),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=Rn(arguments),b=te(x),Zt(b)||At('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=_t.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 dn&&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 No)a.text=y;else if(a instanceof pr)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 vo){var x=Yn(vo,y);x!==null?a.type=x:At("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Jn?(y=Yn(Jn,y),y!==null&&(a.type=y)):a instanceof Wr&&(y=Yn(Wr,y),y!==null&&(a.type=y));else if(y instanceof en)a instanceof Gn||At("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof ea){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 ea?Am(b,y):At("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Pn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof ra)a.type=y;else if(y instanceof Hs)a instanceof en||a instanceof ea?a.bind(y):At("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof Fl)a instanceof en?a.Jv(y):At("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Ks)a instanceof Jn&&a.type===Jn.o?a.figures.add(y):At("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Wr)a instanceof Ks?a.segments.add(y):At("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof es)a instanceof dn||a instanceof sr?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 vo){x=new Ti;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 ea){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 Ti;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(en.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&&(xr(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&&(xr(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:Ir},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new ud),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:ar},set:function(a){var y=this.stretch;y!==a&&(xr(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&&(xr(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)&&Sn(a,"0 <= value <= 1",en,"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 vo&&a.freeze(),xr(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 vo&&a.freeze(),this.Ma=a,this.N(),this.g("background",y,a))}},part:{get:function(){if(this.Dd())return this;if(this.Ng!==null)return this.Ng;var a;for(a=this.panel;a;){if(a instanceof ki)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,b=this.pa,E=b.x;b=b.y,(E===y||isNaN(E)&&isNaN(y))&&(b===x||isNaN(b)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,E,b)&&this.g("position",new 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 pr&&this.qc(),this.g("desiredSize",b,a),Ea(this)&&(a=this.part,a!==null&&(jo(this,a,"width"),jo(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 Xn(a,this.jd.height).freeze(),this.v(),this instanceof pr&&this.qc(),this.g("desiredSize",y,a),Ea(this)&&(a=this.part,a!==null&&jo(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 Xn(this.jd.width,a).freeze(),this.v(),this instanceof pr&&this.qc(),this.g("desiredSize",y,a),Ea(this)&&(a=this.part,a!==null&&jo(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:er},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(),xr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:Ss},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(),xr(this),this.A.o=a,this.v(),this.g("maxSize",y,a))}},measuredBounds:{get:function(){return this.uc}},naturalBounds:{get:function(){return this.dc}},margin:{get:function(){return this.Kg},set:function(a){typeof a=="number"&&(a=new Ci(a));var y=this.Kg;y.D(a)||(this.Kg=a=a.J(),this.v(),this.g("margin",y,a))}},transform:{get:function(){return this.l&2048&&Sa(this),this.Ab}},oe:{get:function(){return this.l&4096&&Sa(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(xr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:Fn},set:function(a){this.reshapingBehavior!==a&&(xr(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&&Sn(a,">= 0",en,"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&&Sn(a,">= 1",en,"columnSpan"),xr(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&&Sn(a,">= 0",en,"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&&Sn(a,">= 1",en,"rowSpan"),xr(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&&(xr(this),this.A.Di=a,this.v(),this.g("spanAllocation",y,a))}},alignmentFocus:{get:function(){return this.sk},set:function(a){var y=this.sk;y.D(a)||(this.sk=a=a.J(),this.v(),this.g("alignmentFocus",y,a))}},portId:{get:function(){return this.Yn},set:function(a){var y=this.Yn;if(y!==a){var x=this.part;x===null||x instanceof ii||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&&Sn(a,">= 0",en,"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&&Sn(a,">= 0",en,"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&&Sn(a,">= 0",en,"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&&Sn(a,">= 0",en,"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&&(xr(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&&(xr(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&&(xr(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&&(xr(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&&(xr(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&&(xr(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&&(xr(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&&(xr(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&&(xr(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&&(xr(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&&(xr(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&&(xr(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&&(xr(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&&(xr(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&&(xr(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&&(xr(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&&(xr(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&&(xr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),en.prototype.trigger=en.prototype.Jv,en.prototype.findBindingPanel=en.prototype.ih,en.prototype.findTemplateBinder=en.prototype.pz,en.prototype.setProperties=en.prototype.nm,en.prototype.apply=en.prototype.apply,en.prototype.attach=en.prototype.Du,en.prototype.set=en.prototype.set,en.prototype.isEnabledObject=en.prototype.If,en.prototype.isVisibleObject=en.prototype.Ed,en.prototype.isContainedBy=en.prototype.rg,en.prototype.getNearestIntersectionPoint=en.prototype.rs,en.prototype.getLocalPoint=en.prototype.qs,en.prototype.getDocumentScale=en.prototype.Df,en.prototype.getDocumentAngle=en.prototype.li,en.prototype.getDocumentBounds=en.prototype.mi,en.prototype.getDocumentPoint=en.prototype.ga,en.prototype.intersectsRect=en.prototype.Yc,en.prototype.containedInRect=en.prototype.fh,en.prototype.containsRect=en.prototype.Re,en.prototype.containsPoint=en.prototype.ca,en.prototype.raiseChanged=en.prototype.g,en.prototype.raiseChangedEvent=en.prototype.cb,en.prototype.addCopyProperty=en.prototype.Vw;var sp=null;en.className="GraphObject",sp=new fi,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(pr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new yi(0,0,2.76142374915397,2.761423749153969),spot2:new yi(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,b){if(b.If()&&b instanceof Gn&&(x=b.fb("ButtonBorder"),x instanceof pr)){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 pr&&(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 pr){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 pr){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 pr){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 pr))){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(pr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:ko},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 Xr&&(x=x.adornedPart),x instanceof ii){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isTreeExpanded){if(!b.canCollapseTree(x))return}else if(!b.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?b.collapseTree(x):b.expandTree(x)}}},a}),Ah("SubGraphExpanderButton",function(){var a=vu("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},vu(pr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:ko},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 Xr&&(x=x.adornedPart),x instanceof sr){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isSubGraphExpanded){if(!b.canCollapseSubGraph(x))return}else if(!b.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?b.collapseSubGraph(x):b.expandSubGraph(x)}}},a}),Ah("ToolTip",function(){return vu(Xr,Gn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Tt(0,3),shadowBlur:5},vu(pr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new yi(0,0,4,6),spot2:new yi(1,1,-4,-4)}))}),Ah("ContextMenu",function(){return vu(Xr,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 pr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new yi(0,0,2,3),y.spot2=new yi(1,1,-2,-2)),a}),Ah("PanelExpanderButton",function(a){var y=fm(a,"COLLAPSIBLE"),x=vu("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},vu(pr,{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 pr&&(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 Xn(14,14)},vu(pr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Hn,geometryStretch:vi,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 Ci(0,1,0,0)});var y=vu(Gn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Ci(1),_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave,actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});return a.mouseEnter=null,a.mouseLeave=null,a.actionDown=null,a.actionUp=null,a.actionCancel=null,a.actionMove=null,a.click=null,y}),en.None=Fn=new Pn(en,"None",0),en.Default=ar=new Pn(en,"Default",0),en.Vertical=zi=new Pn(en,"Vertical",4),en.Horizontal=_i=new Pn(en,"Horizontal",5),en.Fill=Hn=new Pn(en,"Fill",3),en.Uniform=vi=new Pn(en,"Uniform",1),en.UniformToFill=Br=new Pn(en,"UniformToFill",2),en.FlipVertical=br=new Pn(en,"FlipVertical",1),en.FlipHorizontal=Gr=new Pn(en,"FlipHorizontal",2),en.FlipBoth=Co=new Pn(en,"FlipBoth",3),en.make=vu,en.getBuilders=function(){var a=new fi,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},en.defineBuilder=Ah,en.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 en))return y&&b.set(y),b;At('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},en.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=er,this.o=Ss,this.hg=ar,this.ob=this.Bi=1,this.Pf=Fn,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=Ir,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=so,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}lg.prototype.copy=function(){var a=new lg;return a.Xi=this.Xi.J(),a.yj=this.yj.J(),a.Vi=this.Vi,a.wj=this.wj,a.Wi=this.Wi,a.xj=this.xj,a.hq=this.hq,a.Tr=this.Tr,a.iq=this.iq,a.Ur=this.Ur,a},lg.className="LinkSettings";function Jd(){this.ha=[1,0,0,1,0,0]}Jd.prototype.copy=function(){var a=new Jd;return a.ha[0]=this.ha[0],a.ha[1]=this.ha[1],a.ha[2]=this.ha[2],a.ha[3]=this.ha[3],a.ha[4]=this.ha[4],a.ha[5]=this.ha[5],a},Jd.prototype.translate=function(a,y){this.ha[4]+=this.ha[0]*a+this.ha[2]*y,this.ha[5]+=this.ha[1]*a+this.ha[3]*y},Jd.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Jd.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.ha[1]*a+this.ha[3]*b,te=this.ha[0]*-b+this.ha[2]*a,ne=this.ha[1]*-b+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*b,this.ha[1]=E,this.ha[2]=te,this.ha[3]=ne,this.translate(-y,-x)}},Jd.className="STransform";function Mf(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Mf.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Mf.className="SGradient";function Tc(a,y,x){this.ownerDocument=a=y===void 0?_t.document:y,this.cA="http://www.w3.org/2000/svg",a!==void 0&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink")),this.hs=null,this.context=new jl(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),Zt(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 jl(a,y){this.Gv=a,this.svg=a.Oa,this.stack=[],this.nh=[],this.fillStyle="#000000",this.font="10px sans-serif",this.globalAlpha=1,this.lineCap="butt",this.lineDashOffset=0,this.lineJoin="miter",this.lineWidth=1,this.miterLimit=10,this.shadowBlur=0,this.shadowColor="rgba(0, 0, 0, 0)",this.shadowOffsetY=this.shadowOffsetX=0,this.Il=!1,this.strokeStyle="#000000",this.textAlign="start",this.clipInsteadOfFill=!1,this.Vg=this.Br=this.Ar=0,this.yd=this.ad=null,this.path=[],this.Yl={},this.Ct=!1,this.Yg=null,this.uj=0,this.rb=new Jd,this.j=pm(this),this.Nj=pm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=To++,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+")")}st=jl.prototype,st.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,ot=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,ot,a-Me,y-Fe]),this.path.push(["A",x,x,0,1,ot,Ye,tt])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),ot,a+x*Math.cos(E),y+x*Math.sin(E)])},st.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},st.Se=function(a){this.addPath(this.path,this.rb,a||0)},st.bezierCurveTo=function(a,y,x,b,E,te){this.path.push(["C",a,y,x,b,E,te])},st.clearRect=function(){},st.clip=function(){this.Yl.clipPath=!0},st.closePath=function(){this.path.push(["z"])},st.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},st.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"+To++,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+")"},st.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)}st.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},on.$(b,ae)&&on.$(E,fe)?_e.toLowerCase().indexOf(".svg")===-1&&_e.toLowerCase().indexOf("data:image/svg")===-1&&(te.preserveAspectRatio="xMidYMid slice"):te.preserveAspectRatio="none",(y!==0||x!==0||b!==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)},st.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),rv(this,this.Yl)},st.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},st.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)},st.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))},st.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])},st.lineTo=function(a,y){this.path.push(["L",a,y])},st.moveTo=function(a,y){this.path.push(["M",a,y])},st.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},st.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"])},st.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},st.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())},st.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]+")"}st.scale=function(a,y){this.rb.scale(a,y)},st.translate=function(a,y){this.rb.translate(a,y)},st.transform=function(){},st.yc=function(){},st.stroke=function(){qy(this,this.Yl)},st.jk=function(){this.clipInsteadOfFill||this.stroke()},st.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},st.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"+To++,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+")"}st.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var te=Rn(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}st.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}st.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},st.fs=function(){this.Ct=!1},st.Vc=function(){},st.Wx=function(){},jl.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},jl.prototype.getImageData=function(){return null},jl.prototype.measureText=function(){return null};function gm(a,y){y=y.getAttribute("fill"),y!==null&&(y=y.split("#"),y.length!==1&&(y=a.svg.getElementById(y[1].slice(0,-1)),y!==null&&a.svg.innerHTML.match(new RegExp(y.id,"g")).length===1&&y.remove()))}jl.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},jl.className="SVGContext",dn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Tc(this,_t.document));var y=new Tc(this,_t.document,!0);a===void 0&&(a=new Ti);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)},dn.prototype.makeSvg=dn.prototype.Cs,dn.prototype.av=function(a){return this.Cs(a)},dn.prototype.makeSVG=dn.prototype.av;function Du(a,y,x,b){this.ownerDocument=y=y===void 0?_t.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Qd(y,x,b),y.H=a}Du.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",!0):!1},Du.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Du.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Du.prototype.focus=function(){this.Oa.focus()},Du.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},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 mr,this.isTemporary=!!x}st=Qd.prototype,st.Wx=function(a){this.Z.imageSmoothingEnabled=a},st.arc=function(a,y,x,b,E,te){this.Z.arc(a,y,x,b,E,te)},st.beginPath=function(){this.Z.beginPath()},st.Se=function(){},st.bezierCurveTo=function(a,y,x,b,E,te){this.Z.bezierCurveTo(a,y,x,b,E,te)},st.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},st.clip=function(){this.Z.clip()},st.closePath=function(){this.Z.closePath()},st.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},st.createPattern=function(a,y){return this.Z.createPattern(a,y)},st.createRadialGradient=function(a,y,x,b,E,te){return this.Z.createRadialGradient(a,y,x,b,E,te)},st.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)},st.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},st.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},st.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},st.fillText=function(a,y,x){this.Z.fillText(a,y,x)},st.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},st.lineTo=function(a,y){this.Z.lineTo(a,y)},st.measureText=function(a){return this.Z.measureText(a)},st.moveTo=function(a,y){this.Z.moveTo(a,y)},st.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},st.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},st.restore=function(){this.Z.restore()},st.save=function(){this.yc(),this.Z.save()},Qd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},st=Qd.prototype,st.setTransform=function(a,y,x,b,E,te){this.El.setTransform(a,y,x,b,E,te)},st.scale=function(a,y){this.El.scale(a,y)},st.translate=function(a,y){this.El.translate(a,y)},st.stroke=function(){this.Z.stroke()},st.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}},st.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},st.ng=function(a,y){if(a instanceof vo&&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)},st.jk=function(){this.Hm||this.stroke()},st.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},st.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},st.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},st.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},st.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 vo(a,y){hp||(hv(),hp=!0),wr(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=Ua):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)}vo.prototype.copy=function(){var a=new vo;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},st=vo.prototype,st.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},st.ka=function(){return Object.isFrozen(this)&&At("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},st.qb=function(a){a.classType===vo&&(this.type=a)},st.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+")"},st.addColorStop=function(a,y){return this._isFrozen&&Kt(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Sn(a,"0 <= loc <= 1",vo,"addColorStop:loc"),this.we===null&&(this.we=new fi),this.we.add(a,y),this.na===Nh&&(this.type=ch),this.xe=null,this},st.Vz=function(a,y){if(this._isFrozen&&Kt(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)}st.Wy=function(a,y){if(this._isFrozen&&Kt(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=Do.j;var b=Do.u,E=Do.o,te=Do.F;return uh(y),x===void 0&&(x=.5),"rgba("+Math.round((Do.j-a)*x+a)+", "+Math.round((Do.u-b)*x+b)+", "+Math.round((Do.o-E)*x+E)+", "+Math.round((Do.F-te)*x+te)+")"}st.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 vo?a.Gx():(uh(a),128>(299*Do.j+587*Do.u+114*Do.o)/1e3):!1}function up(a,y){switch(y){case fp:y=100*lv(Do.j);var x=100*lv(Do.u),b=100*lv(Do.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=Do.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,Do.j=255*uv((3.2404542*il.j+-1.5371385*il.u+-.4985314*il.o)/100),Do.u=255*uv(a/100),Do.o=255*uv(y/100),Do.F=il.F,Do.j=Math.round(Do.j),255<Do.j?Do.j=255:0>Do.j&&(Do.j=0),Do.u=Math.round(Do.u),255<Do.u?Do.u=255:0>Do.u&&(Do.u=0),Do.o=Math.round(Do.o),255<Do.o?Do.o=255:0>Do.o&&(Do.o=0),"rgba("+Do.j+", "+Do.u+", "+Do.o+", "+Do.F+")";case i1:return av(),nu.o=Math.min(100,Math.max(0,nu.o+100*a)),"hsla("+nu.j+", "+nu.u+"%, "+nu.o+"%, "+nu.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,Do.j=a[0],Do.u=a[1],Do.o=a[2],Do.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Do.j=0,Do.u=0,Do.o=0,Do.F=1)}}function av(){var a=Do.j/255,y=Do.u/255,x=Do.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))}nu.j=Math.round(ne),nu.u=Math.round(100*a),nu.o=Math.round(100*E),nu.F=Do.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 vo||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(vo.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Kt(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=Ua:a===yu&&(this.end=Fr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Kt(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Kt(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Kt(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Kt(this,a),0>a&&Sn(a,">= zero",vo,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Kt(this,a),0>a&&Sn(a,">= zero",vo,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Kt(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Kt(this,a),this.cr=a,this.xe=null}}}),vo.prototype.isDark=vo.prototype.Gx,vo.prototype.darkenBy=vo.prototype.Wy,vo.prototype.lightenBy=vo.prototype.Vz,vo.prototype.addColorStop=vo.prototype.addColorStop;var dv=216/24389,mm=24389/27,cp=[95.047,100,108.883],fv=null,Do=new cg,nu=new cg,il=new cg,Gc=new cg,hp=!1;vo.className="Brush";var Nh;vo.Solid=Nh=new Pn(vo,"Solid",0);var ch;vo.Linear=ch=new Pn(vo,"Linear",1);var yu;vo.Radial=yu=new Pn(vo,"Radial",2);var dp;vo.Pattern=dp=new Pn(vo,"Pattern",4);var fp;vo.Lab=fp=new Pn(vo,"Lab",5);var i1;vo.HSL=i1=new Pn(vo,"HSL",6),vo.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},vo.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)},vo.lighten=function(a){return e1(a)},vo.lightenBy=e1,vo.darken=function(a){return t1(a)},vo.darkenBy=t1,vo.mix=sv,vo.isDark=lp;function ra(){this.xa="Base"}ra.prototype.measure=function(){},ra.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},ra.prototype.arrange=function(){},ra.prototype.Ly=function(a,y,x,b,E,te){a.arrange(y,x,b,E,te)},ra.prototype.iA=function(a){a.Uj()},ra.prototype.gc=function(){},Je.Object.defineProperties(ra.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Gn}}}),ra.prototype.remeasureObject=ra.prototype.iA,ra.prototype.arrangeElement=ra.prototype.Ly,ra.prototype.measureElement=ra.prototype.Yz,ra.className="PanelLayout";function vm(){this.xa="Base"}nt(vm,ra),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 pr&&_e.isGeometryPositioned&&(_e=_e.strokeWidth/2,Ye-=_e,tt-=_e),fo(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 pr&&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,ra),ym.prototype.measure=function(a,y,x,b,E,te,ne){var ae=b.length;y=Un(),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!==Fn&&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));qn(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,ot=te+E.bottom,ft=Fe.height,It=gl(Me,!1);(isNaN(Me.desiredSize.height)&&It===Hn||It===zi)&&(ft=Math.max(x.height-tt-ot,0)),tt=ft+tt+ot,ot=Me.alignment,ot.Xb()&&(ot=a.defaultAlignment),ot.sb()||(ot=Fr),ne&&(ae-=Fe.width+Ye.left+Ye.right),Me.arrange(ae+ot.offsetX+Ye.left,_e+ot.offsetY+Ye.top+(x.height*ot.y-tt*ot.y),Fe.width,ft),ne||(ae+=Fe.width+Ye.left+Ye.right)}}};function Sm(){this.xa="Base"}nt(Sm,ra),Sm.prototype.measure=function(a,y,x,b,E,te){var ne=b.length;x=Un();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!==Fn&&Me!==zi)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,Cs(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);qn(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,ot=te+E.right,ft=Fe.width,It=gl(Me,!1);(isNaN(Me.desiredSize.width)&&It===Hn||It===_i)&&(ft=Math.max(x.width-tt-ot,0)),tt=ft+tt+ot,ot=Me.alignment,ot.Xb()&&(ot=a.defaultAlignment),ot.sb()||(ot=Fr),ne&&(ae-=Fe.height+Ye.bottom+Ye.top),Me.arrange(_e+ot.offsetX+Ye.left+(x.width*ot.x-tt*ot.x),ae+ot.offsetY+Ye.top,ft,Fe.height),ne||(ae+=Fe.height+Ye.bottom+Ye.top)}}};function xm(){this.xa="Base"}nt(xm,ra),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),ot=Math.max(ne+Fe,0),ft=a.isClipping,It=_n.allocAt(-_e.left,-_e.top,tt,ot),Mt=_n.allocAt(0,0,te,ne);pv(fe,Mt,!0),te=Mt.width,ne=Mt.height;for(var Ht=!0,Gt=hh(a),Vt=0;Vt<ae;Vt++){var Qt=b[Vt];Ye=y;var fn=x;if(Qt!==fe&&(Qt.visible||Qt===Gt)){_e=Qt.margin;var ni=_e.left,di=_e.top;switch(tt=_e.right+_e.left,ot=_e.top+_e.bottom,_e=gl(Qt,!1),_e){case Hn:Ye=te,fn=ne,di=ni=ot=tt=0;break;case _i:Ye=te,ni=tt=0;break;case zi:fn=ne,di=ot=0}Qt.measure(Ye,fn,0,0),Ye=Qt.measuredBounds,tt=Math.max(Ye.width+tt,0),ot=Math.max(Ye.height+ot,0),_e=Qt.alignment,_e.Xb()&&(_e=a.defaultAlignment),_e.sb()||(_e=Fr);var li=Qt.alignmentFocus;if(li.Xb()&&(li=Fr),fn=null,Qt instanceof Gn&&Qt.$e!==""&&(fn=Qt.fb(Qt.$e),fn===Qt&&(fn=null)),ni=Mt.x-ni,di=Mt.y-di,fn!==null){for(Qt.arrange(0,0,Ye.width,Ye.height),Ye=fn.actualBounds,Ye=Tt.allocAt(Ye.x+(li.x*Ye.width-li.offsetX),Ye.y+(li.y*Ye.height-li.offsetY)),fn=fn.panel;fn!==Qt;)fn.transform.Ga(Ye),fn=fn.panel;ni+=_e.x*te+_e.offsetX-Ye.x,di+=_e.y*ne+_e.offsetY-Ye.y,Tt.free(Ye)}else ni+=_e.x*te+_e.offsetX-(li.x*Ye.width+li.offsetX),di+=_e.y*ne+_e.offsetY-(li.y*Ye.height+li.offsetY);Ht?(Ht=!1,E.h(ni,di,tt,ot)):fo(E,ni,di,tt,ot)}}switch(Ht?E.assign(It):ft?E.Uu(Mt.x,Mt.y,Mt.width,Mt.height):fo(E,It.x,It.y,It.width,It.height),_n.free(It),_n.free(Mt),_e=fe.stretch,_e===ar&&(_e=gl(fe,!1)),_e){case Fn:return;case Hn:if(!isFinite(y)&&!isFinite(x))return;break;case _i:if(!isFinite(y))return;break;case zi:if(!isFinite(x))return}for(Ye=fe.measuredBounds,te=Ye.width,ne=Ye.height,tt=Math.max(te+Me,0),ot=Math.max(ne+Fe,0),_e=fe.margin,Mt=_n.allocAt(-_e.left,-_e.top,tt,ot),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,ot=_e.top+_e.bottom,Ye=x.measuredBounds,tt=Math.max(Ye.width+tt,0),ot=Math.max(Ye.height+ot,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,ot)):fo(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,ot));Ht?E.assign(It):ft?E.Uu(Mt.x,Mt.y,Mt.width,Mt.height):fo(E,It.x,It.y,It.width,It.height),_n.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=_n.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 ot=Fe.alignmentFocus;if(ot.Xb()&&(ot=Fr),_e=null,Fe instanceof Gn&&Fe.$e!==""&&(_e=Fe.fb(Fe.$e),_e===Fe&&(_e=null)),_e!==null){var ft=_e.actualBounds;for(ot=Tt.allocAt(ft.x+(ot.x*ft.width-ot.offsetX),ft.y+(ot.y*ft.height-ot.offsetY)),_e=_e.panel;_e!==Fe;)_e.transform.Ga(ot),_e=_e.panel;_e=Me.x*ne.width+Me.offsetX-ot.x,Me=Me.y*ne.height+Me.offsetY-ot.y,Tt.free(ot)}else _e=Me.x*ne.width+Me.offsetX-(ot.x*Ye+ot.offsetX),Me=Me.y*ne.height+Me.offsetY-(ot.y*tt+ot.offsetY);_e+=ne.x-x.x,Me+=ne.y-x.y,Fe.visible&&Fe.arrange(te+_e,fe+Me,Ye,tt)}}_n.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,ra),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 ot=0,ft=null;fe instanceof pr&&(ft=fe,ot=ft.strokeWidth*ft.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),Vt=Gt.x*It+Gt.offsetX;for(Gt=Gt.y*_e+Gt.offsetY,isFinite(y)&&(Me=Math.max(Math.abs(Ht-Vt)-ot,0)),isFinite(x)&&(Fe=Math.max(Math.abs(Mt-Gt)-ot,0)),ot=Xn.alloc(),ot.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),ot.h(Math.max(It,ot.width),Math.max(_e,ot.height)));if(ae===1)E.width=It,E.height=_e,Xn.free(ot);else{switch(Mt=yv(fe),Gt=Sv(fe),ae=b=0,Gt.x!==Mt.x&&Gt.y!==Mt.y&&(b=ot.width/Math.abs(Gt.x-Mt.x),ae=ot.height/Math.abs(Gt.y-Mt.y)),Xn.free(ot),ot=0,ft!==null&&(ot=ft.strokeWidth*ft.scale,_v(ft)===vi&&(b=ae=Math.max(b,ae))),b+=Math.abs(Mt.offsetX)+Math.abs(Gt.offsetX)+ot,ae+=Math.abs(Mt.offsetY)+Math.abs(Gt.offsetY)+ot,ft=fe.stretch,ft===ar&&(ft=gl(fe,!1)),ft){case Fn:ne=te=0;break;case Hn:isFinite(y)&&(b=y),isFinite(x)&&(ae=x);break;case _i:isFinite(y)&&(b=y),ne=0;break;case zi: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=_n.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,fo(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&&(Lr(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 _n(te.x,te.y,te.width,te.height))));_n.free(te)};function bm(){this.xa="Base",this.name="Table"}nt(bm,ra),bm.prototype.measure=function(a,y,x,b,E){for(var te=b.length,ne=Un(),ae=Un(),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 ot=Fe[tt];Me.type===Gn.TableRow?ot.row=_e.row:Me.type===Gn.TableColumn&&(ot.column=_e.column),ne.push(ot)}}else ne.push(_e)}te=ne.length,te===0&&(a.Fb(0),a.Eb(0));for(var ft=[],It=0;It<te;It++){var Mt=ne[It];Mt.visible&&(Qs(Mt,!0),Hc(Mt,!0),ft[Mt.row]||(ft[Mt.row]=[]),ft[Mt.row][Mt.column]||(ft[Mt.row][Mt.column]=[]),ft[Mt.row][Mt.column].push(Mt))}qn(ne);var Ht=Un(),Gt=Un(),Vt=Un(),Qt={count:0},fn={count:0},ni=y,di=x,li=a.rowDefs,Vn=a.colDefs,Dn=null;te=li.length;for(var tr=0;tr<te;tr++)Dn=li[tr],Dn!==void 0&&(Dn.actual=0);te=Vn.length;for(var Vi=0;Vi<te;Vi++)Dn=Vn[Vi],Dn!==void 0&&(Dn.actual=0);for(var qr=ft.length,Mo=0,la=0;la<qr;la++)ft[la]&&(Mo=Math.max(Mo,ft[la].length));var ha=Math.min(a.topIndex,qr-1),Ya=Math.min(a.leftIndex,Mo-1),ua=0;qr=ft.length;for(var Gh=hh(a),Us=0;Us<qr;Us++)if(ft[Us]){Mo=ft[Us].length;var fc=a.Fb(Us);fc.actual=0;for(var Xa=fc.oc=0;Xa<Mo;Xa++)if(ft[Us][Xa]){var Wh=a.Eb(Xa);Ht[Xa]===void 0&&(Wh.actual=0,Wh.oc=0,Ht[Xa]=!0);for(var ou=ft[Us][Xa],ju=ou.length,Ul=0;Ul<ju;Ul++){var Tl=ou[Ul];if(Tl.visible||Tl===Gh){var Cd=1<Tl.rowSpan||1<Tl.columnSpan;Cd&&(Us<ha||Xa<Ya||Gt.push(Tl));var pc=Tl.margin,Rp=pc.right+pc.left,Gl=pc.top+pc.bottom,Ja=lc(Tl,fc,Wh,!1),Jg=Tl.desiredSize,Hf=!isNaN(Jg.height),Nc=!isNaN(Jg.width)&&Hf;if(Cd||Ja===Fn||Nc||Us<ha||Xa<Ya||(Qt[Xa]!==void 0||Ja!==Hn&&Ja!==_i||(Qt[Xa]=-1,Qt.count++),fn[Us]!==void 0||Ja!==Hn&&Ja!==zi||(fn[Us]=-1,fn.count++),Vt.push(Tl)),Tl.measure(1/0,1/0,0,0),!(Us<ha||Xa<Ya)){var kl=Tl.measuredBounds,lf=Math.max(kl.width+Rp,0),Wl=Math.max(kl.height+Gl,0);if(Tl.rowSpan===1&&(Ja===Fn||Ja===_i)){Dn=a.Fb(Us);var Pd=Dn.Wc();ua=Math.max(Wl-Dn.actual,0),ua+Pd>di&&(ua=Math.max(di-Pd,0));var Z0=Dn.oa===0;Dn.oc=Dn.oc+ua,Dn.actual=Dn.oa+ua,di=Math.max(di-(ua+(Z0?Pd:0)),0)}if(Tl.columnSpan===1&&(Ja===Fn||Ja===zi)){Dn=a.Eb(Xa);var Qg=Dn.Wc();ua=Math.max(lf-Dn.actual,0),ua+Qg>ni&&(ua=Math.max(ni-Qg,0));var Hy=Dn.oa===0;Dn.oc=Dn.oc+ua,Dn.actual=Dn.oa+ua,ni=Math.max(ni-(ua+(Hy?Qg:0)),0)}Cd&&Tl.Uj()}}}}}qn(Ht);var Qc=0,ph=0;te=a.columnCount;for(var Uf=0;Uf<te;Uf++){var _d=Vn[Uf];_d!==void 0&&(Qc+=isNaN(_d.Hc)?_d.oc:_d.Hc,_d.oc!==0&&(Qc+=_d.Wc()))}te=a.rowCount;for(var Bp=0;Bp<te;Bp++){var Ed=li[Bp];Ed!==void 0&&(ph+=isNaN(Ed.Hc)?Ed.oc:Ed.Hc,Ed.oc!==0&&(ph+=Ed.Wc()))}ni=Math.max(y-Qc,0);var qc=di=Math.max(x-ph,0),Zh=ni;te=Vt.length;for(var Al=0;Al<te;Al++){var Oc=Vt[Al],K0=a.Fb(Oc.row),gh=a.Eb(Oc.column),Fp=Oc.measuredBounds,gc=Oc.margin,uf=gc.right+gc.left,Ic=gc.top+gc.bottom;Qt[Oc.column]=gh.oc===0&&Qt[Oc.column]!==void 0?Math.max(Fp.width+uf,Qt[Oc.column]):null,fn[Oc.row]=K0.oc===0&&fn[Oc.row]!==void 0?Math.max(Fp.height+Ic,fn[Oc.row]):null}var Gf=0,jp=0,ec;for(ec in fn)ec!=="count"&&(Gf+=fn[ec]);for(ec in Qt)ec!=="count"&&(jp+=Qt[ec]);for(var wa=Xn.alloc(),qg=0;qg<te;qg++){var cl=Vt[qg];if(cl.visible||cl===Gh){var Gs=a.Fb(cl.row),hl=a.Eb(cl.column),mh=0;isFinite(hl.width)?mh=hl.width:(isFinite(ni)&&Qt[cl.column]!==null?jp===0?mh=hl.actual+ni:mh=Qt[cl.column]/jp*Zh:Qt[cl.column]!==null?mh=ni:mh=hl.actual||ni,mh=Math.max(0,mh-hl.Wc()));var Kh=0;switch(isFinite(Gs.height)?Kh=Gs.height:(isFinite(di)&&fn[cl.row]!==null?Gf===0?Kh=Gs.actual+di:Kh=fn[cl.row]/Gf*qc:fn[cl.row]!==null?Kh=di:Kh=Gs.actual||di,Kh=Math.max(0,Kh-Gs.Wc())),wa.h(Math.max(hl.minimum,Math.min(mh,hl.maximum)),Math.max(Gs.minimum,Math.min(Kh,Gs.maximum))),Ja=lc(cl,Gs,hl,!1),Ja){case _i:wa.height=Math.max(wa.height,Gs.actual+di);break;case zi:wa.width=Math.max(wa.width,hl.actual+ni)}var cf=cl.margin,Uy=cf.right+cf.left,V0=cf.top+cf.bottom;cl.Uj(),cl.measure(wa.width,wa.height,hl.minimum,Gs.minimum);var zp=cl.measuredBounds,hf=Math.max(zp.width+Uy,0),Wf=Math.max(zp.height+V0,0);isFinite(ni)&&(hf=Math.min(hf,wa.width)),isFinite(di)&&(Wf=Math.min(Wf,wa.height));var Nl=0;Nl=Gs.actual,Gs.actual=Math.max(Gs.actual,Wf),Gs.oc=Math.max(Gs.oc,Wf),ua=Gs.actual-Nl,di=Math.max(di-ua,0),fn[cl.row]===null&&(qc=Math.max(qc-ua,0)),Nl=hl.actual,hl.actual=Math.max(hl.actual,hf),hl.oc=Math.max(hl.oc,hf),ua=hl.actual-Nl,ni=Math.max(ni-ua,0),Qt[cl.column]===null&&(Zh=Math.max(Zh-ua,0))}}qn(Vt);var vh=Xn.alloc(),mc=Un(),Cu=Un();if(te=Gt.length,te!==0){for(var Ld=0;Ld<qr;Ld++)if(ft[Ld]){Mo=ft[Ld].length;var Hp=a.Fb(Ld);mc[Ld]=Hp.actual;for(var Md=0;Md<Mo;Md++)if(ft[Ld][Md]){var $0=a.Eb(Md);Cu[Md]=$0.actual}}}for(var Up=0;Up<te;Up++){var Es=Gt[Up];if(Es.visible||Es===Gh){var tc=a.Fb(Es.row),zu=a.Eb(Es.column);switch(wa.h(Math.max(zu.minimum,Math.min(y,zu.maximum)),Math.max(tc.minimum,Math.min(x,tc.maximum))),Ja=lc(Es,tc,zu,!1),Ja){case Hn:Cu[zu.index]!==0&&(wa.width=Math.min(wa.width,Cu[zu.index])),mc[tc.index]!==0&&(wa.height=Math.min(wa.height,mc[tc.index]));break;case _i:Cu[zu.index]!==0&&(wa.width=Math.min(wa.width,Cu[zu.index]));break;case zi:mc[tc.index]!==0&&(wa.height=Math.min(wa.height,mc[tc.index]))}isFinite(zu.width)&&(wa.width=zu.width),isFinite(tc.height)&&(wa.height=tc.height),vh.h(0,0);for(var Y0=zu.minimum,Zl=tc.minimum,Vh=1;Vh<Es.rowSpan&&!(Es.row+Vh>=a.rowCount);Vh++)Dn=a.Fb(Es.row+Vh),ua=0,ua=Ja===Hn||Ja===zi?Math.max(Dn.minimum,mc[Es.row+Vh]===0?Dn.maximum:Math.min(mc[Es.row+Vh],Dn.maximum)):Math.max(Dn.minimum,isNaN(Dn.Hc)?Dn.maximum:Math.min(Dn.Hc,Dn.maximum)),vh.height+=ua,Zl+=Dn.minimum;for(var Hu=1;Hu<Es.columnSpan&&!(Es.column+Hu>=a.columnCount);Hu++)Dn=a.Eb(Es.column+Hu),ua=0,ua=Ja===Hn||Ja===_i?Math.max(Dn.minimum,Cu[Es.column+Hu]===0?Dn.maximum:Math.min(Cu[Es.column+Hu],Dn.maximum)):Math.max(Dn.minimum,isNaN(Dn.Hc)?Dn.maximum:Math.min(Dn.Hc,Dn.maximum)),vh.width+=ua,Y0+=Dn.minimum;wa.width+=vh.width,wa.height+=vh.height;var Gp=Es.margin,Td=Gp.right+Gp.left,em=Gp.top+Gp.bottom;Es.measure(wa.width,wa.height,Y0,Zl);for(var Wp=Es.measuredBounds,Dc=Math.max(Wp.width+Td,0),df=Math.max(Wp.height+em,0),kd=0,Zp=0;Zp<Es.rowSpan&&!(Es.row+Zp>=a.rowCount);Zp++)Dn=a.Fb(Es.row+Zp),kd+=Dn.total||0;if(kd<df){var $h=df-kd,eh=df-kd;if(Es.spanAllocation!==null)for(var Yh=Es.spanAllocation,yh=0;yh<Es.rowSpan&&!(0>=$h)&&!(Es.row+yh>=a.rowCount);yh++){Dn=a.Fb(Es.row+yh);var Xh=Dn.oa||0,ff=Yh(Es,Dn,eh);Dn.actual=Math.min(Dn.maximum,Xh+ff),Dn.oa!==Xh&&($h-=Dn.oa-Xh)}for(;0<$h;){var vc=Dn.oa||0;if(isNaN(Dn.height)&&Dn.maximum>vc&&(Dn.actual=Math.min(Dn.maximum,vc+$h),Dn.oa!==vc&&($h-=Dn.oa-vc)),Dn.index===0)break;Dn=a.Fb(Dn.index-1)}}for(var Zf=0,Jh=0;Jh<Es.columnSpan&&!(Es.column+Jh>=a.columnCount);Jh++)Dn=a.Eb(Es.column+Jh),Zf+=Dn.total||0;if(Zf<Dc){var Kf=Dc-Zf,Gy=Dc-Zf;if(Es.spanAllocation!==null)for(var Sh=Es.spanAllocation,pf=0;pf<Es.columnSpan&&!(0>=Kf)&&!(Es.column+pf>=a.columnCount);pf++){Dn=a.Eb(Es.column+pf);var tm=Dn.oa||0,Wy=Sh(Es,Dn,Gy);Dn.actual=Math.min(Dn.maximum,tm+Wy),Dn.oa!==tm&&(Kf-=Dn.oa-tm)}for(;0<Kf;){var X0=Dn.oa||0;if(isNaN(Dn.width)&&Dn.maximum>X0&&(Dn.actual=Math.min(Dn.maximum,X0+Kf),Dn.oa!==X0&&(Kf-=Dn.oa-X0)),Dn.index===0)break;Dn=a.Eb(Dn.index-1)}}}}qn(Gt),Xn.free(vh),Xn.free(wa),mc!==void 0&&qn(mc),Cu!==void 0&&qn(Cu);var Vf=0,$f=0,J0=a.desiredSize,gx=a.maxSize;Ja=gl(a,!0);var nm=ph=Qc=0,im=0;te=a.columnCount;for(var Q0=0;Q0<te;Q0++)Vn[Q0]!==void 0&&(Dn=a.Eb(Q0),isFinite(Dn.width)?(nm+=Dn.width,nm+=Dn.Wc()):Nm(Dn)===pg?(nm+=Dn.oa,nm+=Dn.Wc()):Dn.oa!==0&&(Qc+=Dn.oa,Qc+=Dn.Wc()));isFinite(J0.width)?Vf=Math.min(J0.width,gx.width):Vf=Ja!==Fn&&isFinite(y)?y:Qc,Vf=Math.max(Vf,a.minSize.width),Vf=Math.max(Vf-nm,0);for(var Qx=Qc===0?1:Math.max(Vf/Qc,1),q0=0;q0<te;q0++)Vn[q0]!==void 0&&(Dn=a.Eb(q0),isFinite(Dn.width)||Nm(Dn)===pg||(Dn.actual=Dn.oa*Qx),Dn.position=E.width,Dn.oa!==0&&(E.width+=Dn.oa,E.width+=Dn.Wc()));te=a.rowCount;for(var ev=0;ev<te;ev++)li[ev]!==void 0&&(Dn=a.Fb(ev),isFinite(Dn.height)?(im+=Dn.height,im+=Dn.Wc()):Nm(Dn)===pg?(im+=Dn.oa,im+=Dn.Wc()):Dn.oa!==0&&(ph+=Dn.oa,ph+=Dn.Wc()));isFinite(J0.height)?$f=Math.min(J0.height,gx.height):$f=Ja!==Fn&&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&&(Dn=a.Fb(tv),isFinite(Dn.height)||Nm(Dn)===pg||(Dn.actual=Dn.oa*qx),Dn.position=E.height,Dn.oa!==0&&(E.height+=Dn.oa,E.height+=Dn.Wc()));te=ae.length;for(var Zy=0;Zy<te;Zy++){var rm=ae[Zy],Ky=0,Vy=0;rm.type===Gn.TableRow?(Ky=E.width,Dn=a.Fb(rm.row),Vy=Dn.actual):(Dn=a.Eb(rm.column),Ky=Dn.actual,Vy=E.height),rm.measuredBounds.h(0,0,Ky,Vy),Qs(rm,!1)}qn(ae),a.inRowsCols=ft},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 ot=Math.min(a.leftIndex,Me-1);if(0<ae.length){for(;ot!==Me&&(ae[ot]===void 0||ae[ot].oa===0);)ot++;ot=Math.max(Math.min(ot,Me-1),0),Ye=-ae[ot].position}for(var ft=0,It=0;ft!==_e&&fe[ft]===void 0;)ft++;for(;It!==_e&&ae[It]===void 0;)It++;Me=a.part,a.Fb(ft),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(ft),Gt=a.Eb(Ht.column);fe=ae.position+Fe+E,ae.oa!==0&&(fe+=ae.Io(Math.max(ft,tt))),ae=Gt.position+Ye+te,Gt.oa!==0&&(ae+=Gt.Io(Math.max(It,ot))),Gt=Ht.measuredBounds,Ht.Uk(),Ht.actualBounds.ka();var Vt=Ht.actualBounds,Qt=_n.allocAt(Vt.x,Vt.y,Vt.width,Vt.height);Vt.x=Ht.type===Gn.TableRow?te:ae,Vt.y=Ht.type===Gn.TableColumn?E:fe,Vt.width=Gt.width,Vt.height=Gt.height,Ht.actualBounds.freeze(),Hc(Ht,!1),ma(Qt,Vt)||Me===null||(Me.oh(),Ht.Pn(Me)),_n.free(Qt)}}for(Mt=Xn.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(ft,tt))),Vt=0;Vt<Me;Vt++)if(ne[Ht][Vt]){Qt=a.Eb(Vt),ae=Qt.position+Ye+te,Qt.oa!==0&&(ae+=Qt.Io(Math.max(It,ot)));for(var fn=ne[Ht][Vt],ni=fn.length,di=0;di<ni;di++){var li=fn[di],Vn=li.measuredBounds;Mt.h(0,0);for(var Dn=1;Dn<li.rowSpan&&!(Ht+Dn>=a.rowCount);Dn++){var tr=a.Fb(Ht+Dn);tr.oa!==0&&(Mt.height+=tr.total)}for(Dn=1;Dn<li.columnSpan&&!(Vt+Dn>=a.columnCount);Dn++)tr=a.Eb(Vt+Dn),tr.oa!==0&&(Mt.width+=tr.total);var Vi=Qt.oa+Mt.width,qr=Gt.oa+Mt.height;Dn=ae,tr=fe;var Mo=Vi,la=qr,ha=ae,Ya=fe,ua=Vi,Gh=qr;ae+Vi>x.width&&(ua=Math.max(x.width-ae,0)),fe+qr>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,Xa=Us.y,Wh=Us.offsetX;Us=Us.offsetY;var ou=Qt.alignment,ju=Gt.alignment;ou.sb()&&(fc=ou.x,Wh=ou.offsetX),ju.sb()&&(Xa=ju.y,Us=ju.offsetY)}else fc=Us.x,Xa=Us.y,Wh=Us.offsetX,Us=Us.offsetY;(isNaN(fc)||isNaN(Xa))&&(Xa=fc=.5,Us=Wh=0),ou=Vn.width,ju=Vn.height;var Ul=li.margin,Tl=Ul.left+Ul.right,Cd=Ul.top+Ul.bottom,pc=lc(li,Gt,Qt,!1);!isNaN(li.desiredSize.width)||pc!==Hn&&pc!==_i||(ou=Math.max(Vi-Tl,0)),!isNaN(li.desiredSize.height)||pc!==Hn&&pc!==zi||(ju=Math.max(qr-Cd,0)),Vi=li.maxSize,qr=li.minSize,ou=Math.min(Vi.width,ou),ju=Math.min(Vi.height,ju),ou=Math.max(qr.width,ou),ju=Math.max(qr.height,ju),Vi=ju+Cd,Dn+=Mo*fc-(ou+Tl)*fc+Wh+Ul.left,tr+=la*Xa-Vi*Xa+Us+Ul.top,li.visible&&(Lr(ha,Ya,ua,Gh,Dn,tr,Vn.width,Vn.height)?li.arrange(Dn,tr,ou,ju):li.arrange(Dn,tr,ou,ju,new _n(ha,Ya,ua,Gh)))}}}for(Xn.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,ra),Cm.prototype.measure=function(){},Cm.prototype.arrange=function(){};function Pm(){this.xa="Base"}nt(Pm,ra),Pm.prototype.measure=function(){},Pm.prototype.arrange=function(){};function _m(){this.xa="Base"}nt(_m,ra),_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),ot=1;a.viewboxStretch===vi?Fe!==0&&ae!==0&&(ot=Math.min(Ye/Fe,tt/ae)):Fe!==0&&ae!==0&&(ot=Math.max(Ye/Fe,tt/ae)),ot===0&&(ot=1e-4),b.Ca*=ot,Me!==b.scale&&(Qs(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,ra),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=[],ot=a.O.s,ft=ot.length,It=0;It<ft;It++){var Mt=ot[It],Ht=[];if(tt.push(Ht),Mt.visible){var Gt=Mt.interval;if(!(0>Gt)){Mt=mv(Mt.figure);for(var Vt=0;Vt<ft;Vt++)if(Vt!==It){var Qt=ot[Vt];Qt.visible&&mv(Qt.figure)===Mt&&(Qt=Qt.interval,Qt>Gt&&Ht.push(Qt))}}}}for(ot=a.O.s,ft=ot.length,It=0;It<ft;It++){var fn=ot[It];if(fn.visible&&(Ht=fn.interval||1,Mt=Math.abs(Ht),!(2>E*Mt*x))){if(Gt=fn.segmentIndex,(!isFinite(Gt)||isNaN(Gt))&&(Gt=0),0>Gt&&(Gt=Mt-Math.min(-Gt,Mt)),Gt=Math.round(Gt%Mt),Mt=fn.opacity,Vt=1,Mt!==1){if(Mt===0)continue;Vt=y.globalAlpha,y.globalAlpha=Vt*Mt}Qt=tt[It];var ni=!1,di=fn.strokeDashArray;if(di!==null&&(ni=!0,y.js(di,fn.strokeDashOffset)),fn.figure==="LineV"&&fn.stroke!==null&&0<fn.strokeWidth){for(y.lineWidth=fn.strokeWidth,bs(a,y,fn.stroke,!1,!1,te,ne),y.beginPath(),di=fn=Math.floor((Ye-E)/E);di<=fn+_e;di++){var li=di*E+Ye;0<=li&&li<=ae&&Em(di,Ht,Gt,Qt)&&(y.moveTo(li,0),y.lineTo(li,fe))}y.stroke(),y.Se()}else if(fn.figure==="LineH"&&fn.stroke!==null&&0<fn.strokeWidth){for(y.lineWidth=fn.strokeWidth,bs(a,y,fn.stroke,!1,!1,te,ne),y.beginPath(),di=fn=Math.floor((Fe-b)/b);di<=fn+Me;di++)li=di*b+Fe,0<=li&&li<=fe&&Em(di,Ht,Gt,Qt)&&(y.moveTo(0,li),y.lineTo(ae,li));y.stroke(),y.Se()}else if(fn.figure==="BarV"&&fn.fill!==null)for(bs(a,y,fn.fill,!0,!1,te,ne),fn=fn.width,isNaN(fn)&&(fn=E),li=di=Math.floor((Ye-E)/E);li<=di+_e;li++){var Vn=li*E+Ye;0<=Vn+fn&&Vn<=ae&&Em(li,Ht,Gt,Qt)&&y.fillRect(Vn,0,fn,fe)}else if(fn.figure==="BarH"&&fn.fill!==null)for(bs(a,y,fn.fill,!0,!1,te,ne),fn=fn.height,isNaN(fn)&&(fn=b),li=di=Math.floor((Fe-b)/b);li<=di+Me;li++)Vn=li*b+Fe,0<=Vn+fn&&Vn<=fe&&Em(li,Ht,Gt,Qt)&&y.fillRect(0,Vn,ae,fn);ni&&y.fs(),Mt!==1&&(y.globalAlpha=Vt)}}y.restore(),y.Vc(!1)};function Em(a,y,x,b){if(0>y)return a%y===x;if(a%y!==x)return!1;y=b.length;for(var E=0;E<y;E++)if(a%b[E]===x)return!1;return!0}function Lm(){this.xa="Base"}nt(Lm,ra),Lm.prototype.measure=function(a,y,x,b,E){var te=b.length;if(a instanceof Xr||a instanceof $n){var ne=null,ae=null;if(a instanceof $n&&(ne=a),a instanceof Xr&&(ae=a,ne=ae.adornedPart,a.j===null&&(a.j=[])),ne instanceof $n){var fe=ne;if(te===0)Cs(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var _e=a instanceof Xr?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 ot=_e.measuredBounds;x.ed(ot),tt.push(ot)}ot=mr.alloc();for(var ft=Tt.alloc(),It=Tt.alloc(),Mt=0;Mt<te;Mt++){var Ht=b[Mt];if(Ht!==_e)if(Ht.isPanelMain&&Ht instanceof pr){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 Vt=Ht.segmentIndex,Qt=Ht.segmentFraction,fn=Ht.alignmentFocus;fn.Mc()&&(fn=Fr);var ni=Ht.segmentOrientation,di=Ht.segmentOffset;if(isNaN(Vt)){var li=fe.ua;Gt=Un(),li.Qu(Qt,Gt);var Vn=Tt.allocAt(Gt[0],Gt[1]);if(Vn.add(fe.i(0)),li.type===Jn.j?Vn.offset(-li.startX,-li.startY):(li=li.figures.first(),li!==null&&Vn.offset(-li.startX,-li.startY)),li=Gt[2],ni!==ol){var Dn=fe.computeAngle(Ht,ni,li);Ht.Kb=Dn}Dn=Vn.x-y.x;var tr=Vn.y-y.y;Tt.free(Vn),qn(Gt)}else if(Vt<-Fe||Vt>=Fe)Gt=Tt.alloc(),fe.vg(),fe.computeMidPoint(Gt),li=fe.midAngle,ni!==ol&&(Dn=fe.computeAngle(Ht,ni,li),Ht.Kb=Dn),Dn=Gt.x-y.x,tr=Gt.y-y.y,Tt.free(Gt);else{if(Dn=0,0<=Vt?(tr=Me.M(Vt),Gt=Vt<Fe-1?Me.M(Vt+1):tr):(Dn=Fe+Vt,tr=Me.M(Dn),Gt=0<Dn?Me.M(Dn-1):tr),tr.Xa(Gt)){0<=Vt?(li=0<Vt?Me.M(Vt-1):tr,Dn=Vt<Fe-2?Me.M(Vt+2):Gt):(li=Dn<Fe-1?Me.M(Dn+1):tr,Dn=1<Dn?Me.M(Dn-2):Gt),Vn=li.Bf(tr);var Vi=Gt.Bf(Dn);li=Vn>Vi+10?0<=Vt?li.ab(tr):tr.ab(li):Vi>Vn+10?0<=Vt?Gt.ab(Dn):Dn.ab(Gt):0<=Vt?li.ab(Dn):Dn.ab(li)}else li=0<=Vt?tr.ab(Gt):Gt.ab(tr);ni!==ol&&(Dn=fe.computeAngle(Ht,ni,li),Ht.Kb=Dn),Dn=tr.x+(Gt.x-tr.x)*Qt-y.x,tr=tr.y+(Gt.y-tr.y)*Qt-y.y}Ht.measure(1/0,1/0,0,0),Gt=Ht.measuredBounds,Vn=Ht.naturalBounds;var qr=0;Ht instanceof pr&&(qr=Ht.strokeWidth),Vi=Vn.width+qr;var Mo=Vn.height+qr;ot.reset(),ot.translate(-Gt.x,-Gt.y),ot.scale(Ht.scale,Ht.scale),ot.rotate(ni===ol?Ht.angle:li,Vi/2,Mo/2),ni!==Pg&&ni!==Eg||ot.rotate(90,Vi/2,Mo/2),ni!==_g&&ni!==Lg||ot.rotate(-90,Vi/2,Mo/2),ni===i0&&(45<li&&135>li||225<li&&315>li)&&ot.rotate(-li,Vi/2,Mo/2),Vn=new _n(0,0,Vi,Mo),ft.xi(Vn,fn),ot.Ga(ft),fn=-ft.x+qr/2*Ht.scale,Ht=-ft.y+qr/2*Ht.scale,It.assign(di),qr=isNaN(di.x);var la=isNaN(di.y);if(qr||la){Vi=Vi/2+3,Mo=Mo/2+3;var ha=45<=li&&135>=li,Ya=225<=li&&315>=li;ni===ol&&(ha||Ya)?(It.x=la?Vi:di.y,It.y=qr?Mo:di.x,ha?0<=Vt||isNaN(Vt)&&.5>Qt||!qr||(It.y=-Mo):Ya&&((0<=Vt||isNaN(Vt)&&.5>Qt)&&qr&&(It.y=-Mo),la&&(It.x=-Vi))):(qr&&(It.x=0<=Vt||isNaN(Vt)&&.5>Qt?Vi:-Vi),la&&(It.y=-Mo),It.rotate(li))}else It.rotate(li);Dn+=It.x,tr+=It.y,Vn.set(Gt),Vn.h(Dn+fn,tr+Ht,Gt.width,Gt.height),tt.push(Vn),x.ed(Vn)}}if(ne!==null)for(b=ne.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),Cs(E,x.width||0,x.height||0),mr.free(ot),Tt.free(ft),Tt.free(It)}}}},Lm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Xr||a instanceof $n){var b=a,E=null;a instanceof Xr&&(E=a,b=E.adornedPart);var te=a instanceof Xr?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 $n)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,ot=Un();tt.Qu(fe,ot);var ft=Tt.allocAt(ot[0],ot[1]);ft.add(Fe.i(0)),tt.type===Jn.j||(tt=tt.figures.first()),ft.offset(-tt.startX,-tt.startY),tt=ot[2],_e!==ol&&(Fe=Fe.computeAngle(ne,_e,tt),ne.angle=Fe),Fe=ft.x;var It=ft.y;Tt.free(ft),qn(ot)}else if(ae<-x||ae>=x)ot=Tt.alloc(),tt=Fe,It=ot,tt.vg(),tt.computeMidPoint(It),tt=Fe.midAngle,_e!==ol&&(Fe=Fe.computeAngle(ne,_e,tt),ne.angle=Fe),Fe=ot.x,It=ot.y,Tt.free(ot);else{if(ft=0,0<=ae?(ot=y.s[ae],It=ae<x-1?y.s[ae+1]:ot):(ft=x+ae,ot=y.s[ft],It=0<ft?y.s[ft-1]:ot),ot.Xa(It)){0<=ae?(tt=0<ae?y.s[ae-1]:ot,ft=ae<x-2?y.s[ae+2]:It):(tt=ft<x-1?y.s[ft+1]:ot,ft=1<ft?y.s[ft-2]:It);var Mt=tt.Bf(ot),Ht=It.Bf(ft);tt=Mt>Ht+10?0<=ae?tt.ab(ot):ot.ab(tt):Ht>Mt+10?0<=ae?It.ab(ft):ft.ab(It):0<=ae?tt.ab(ft):ft.ab(tt)}else tt=0<=ae?ot.ab(It):It.ab(ot);_e!==ol&&(Fe=Fe.computeAngle(ne,_e,tt),ne.angle=Fe),Fe=ot.x+(It.x-ot.x)*fe,It=ot.y+(It.y-ot.y)*fe}if(Ye.ys())ne.location=new Tt(Fe,It);else{Ye.Mc()&&(Ye=Fr),ot=mr.alloc(),ot.reset(),ot.scale(ne.scale,ne.scale),ot.rotate(ne.angle,0,0);var Gt=ne.naturalBounds;ft=_n.allocAt(0,0,Gt.width,Gt.height),Mt=Tt.alloc(),Mt.xi(ft,Ye),ot.Ga(Mt),Ye=-Mt.x,Ht=-Mt.y;var Vt=Gt.width,Qt=Gt.height;Gt=Tt.alloc(),Gt.assign(Me);var fn=isNaN(Me.x),ni=isNaN(Me.y);if(fn||ni){Vt=Vt/2+3,Qt=Qt/2+3;var di=45<=tt&&135>=tt,li=225<=tt&&315>=tt;_e===ol&&(di||li)?(Gt.x=ni?Vt:Me.y,Gt.y=fn?Qt:Me.x,di?0<=ae||isNaN(ae)&&.5>fe||!fn||(Gt.y=-Qt):li&&((0<=ae||isNaN(ae)&&.5>fe)&&fn&&(Gt.y=-Qt),ni&&(Gt.x=-Vt))):(fn&&(Gt.x=0<=ae||isNaN(ae)&&.5>fe?Vt:-Vt),ni&&(Gt.y=-Qt),Gt.rotate(tt))}else Gt.rotate(tt);Fe+=Gt.x,It+=Gt.y,ot.pp(ft),Ye+=ft.x,Ht+=ft.y,ae=Tt.allocAt(Fe+Ye,It+Ht),ne.move(ae),Tt.free(ae),Tt.free(Gt),Tt.free(Mt),_n.free(ft),mr.free(ot)}}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(tu(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof Xr&&a.type===Gn.Link&&a.adornedObject instanceof pr&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof $n&&a.ua!==null?(a=a.geometry.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):a instanceof Xr&&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),Qs(b,!1)}}function dg(){this.xa="Base"}nt(dg,ra),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 _n(-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,ot=ae.strokeWidth,ft=tt.flattenedSegments,It=tt.flattenedLengths,Mt=tt.flattenedTotalLength,Ht=ft.length,Gt=0,Vt=0,Qt=Un(),fn=0;fn<Ht;fn++){var ni=ft[fn],di=[];Vt=Gt=0;for(var li=ni.length,Vn=0;Vn<li;Vn+=2){var Dn=ni[Vn],tr=ni[Vn+1];if(Vn!==0){var Vi=180*Math.atan2(tr-Vt,Dn-Gt)/Math.PI;0>Vi&&(Vi+=360),di.push(Vi)}Gt=Dn,Vt=tr}Qt.push(di)}if(a.graduatedIntervals===null){for(var qr=[],Mo=a.O.s,la=Mo.length,ha=0;ha<la;ha++){var Ya=Mo[ha],ua=[];if(qr.push(ua),Ya.visible){var Gh=Ya.interval;if(!(0>Gh)){for(var Us=0;Us<la;Us++)if(Us!==ha){var fc=Mo[Us];if(fc.visible&&Ya.constructor===fc.constructor){var Xa=fc.interval;Xa>Gh&&ua.push(Xa)}}}}}a.graduatedIntervals=qr}var Wh=a.graduatedIntervals,ou=a.O.s,ju=ou.length,Ul=0,Tl=0,Cd=Mt;a.graduatedMarks=[];for(var pc,Rp=0;Rp<ju;Rp++){var Gl=ou[Rp];if(pc=[],Gl.visible&&Gl!==ae){var Ja=Math.abs(Gl.interval),Jg=a.graduatedTickUnit;if(!(2>Jg*Ja*Mt/a.graduatedRange&&Gl.graduatedSkip===null)){var Hf=It[0][0],Nc=0,kl=0;Tl=Mt*Gl.graduatedStart-1e-4,Cd=Mt*Gl.graduatedEnd+1e-4;var lf=Jg*Ja,Wl=a.graduatedTickBase;if(Wl<a.graduatedMin){var Pd=(a.graduatedMin-Wl)/lf;Pd=Pd%1===0?Pd:Math.floor(Pd+1),Wl+=Pd*lf}else Wl>a.graduatedMin+lf&&(Wl-=Math.floor((Wl-a.graduatedMin)/lf)*lf);for(var Z0=Wh[Rp],Qg=Wl,Hy=1e-6*a.graduatedMax,Qc=1;Wl<=a.graduatedMax+Hy;Qc++){e:{for(var ph=Z0.length,Uf=0;Uf<ph;Uf++){var _d=(Wl-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&&(Wl>a.graduatedMax&&(Wl=a.graduatedMax),Gl.graduatedSkip===null||Gl instanceof No&&!Gl.graduatedSkip(Wl,Gl)||Gl instanceof pr&&!Gl.graduatedSkip(Wl,Gl))&&(Ul=(Wl-a.graduatedMin)*Mt/a.graduatedRange,Ul>Mt&&(Ul=Mt),Tl<=Ul&&Ul<=Cd)){for(var qc=Qt[Nc][kl],Zh=It[Nc][kl];Nc<It.length;){for(;Ul>Hf&&kl<It[Nc].length-1;)kl++,qc=Qt[Nc][kl],Zh=It[Nc][kl],Hf+=Zh;if(Ul<=Hf)break;Nc++,kl=0,qc=Qt[Nc][kl],Zh=It[Nc][kl],Hf+=Zh}var Al=ft[Nc],Oc=Al[2*kl],K0=Al[2*kl+1],gh=(Ul-(Hf-Zh))/Zh,Fp=new Tt(Oc+(Al[2*kl+2]-Oc)*gh+ot/2-tt.bounds.x,K0+(Al[2*kl+3]-K0)*gh+ot/2-tt.bounds.y);Fp.scale(ae.scale,ae.scale);e:{var gc=qc,uf=Qt[Nc];if(!(.5005>gh&&.4995<gh)){var Ic=gc;if(.5>gh?0<kl?Ic=uf[kl-1]:on.$(Al[0],Al[Al.length-2])&&on.$(Al[1],Al[Al.length-1])&&(Ic=uf[uf.length-1]):.5<gh&&(kl+1<uf.length?Ic=uf[kl+1]:on.$(Al[0],Al[Al.length-2])&&on.$(Al[1],Al[Al.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(Gl instanceof No){var ec="";Gl.graduatedFunction!==null?(ec=Gl.graduatedFunction(Wl,Gl),ec=ec!=null?ec.toString():""):ec=(+Wl.toFixed(2)).toString(),ec!==""&&pc.push({$l:Fp,angle:qc,text:ec})}else pc.push({$l:Fp,angle:qc})}Wl=Qg+Qc*lf}}}a.graduatedMarks.push(pc)}qn(Qt);var wa=a.graduatedMarks;if(wa!==null)for(var qg=b.length,cl=0;cl<qg;cl++){var Gs=b[cl],hl=wa[cl];if(Gs.visible&&Gs!==ae&&hl.length!==0){if(Gs instanceof pr){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=_n.allocAt(0,0,zp,hf),Nl=Tt.alloc();Nl.xi(Wf,cf),_n.free(Wf);for(var vh=-Nl.x,mc=-Nl.y,Cu=new _n,Ld=hl.length,Hp=0;Hp<Ld;Hp++)for(var Md=hl[Hp],$0=Md.$l.x,Up=Md.$l.y,Es=Md.angle,tc=0;4>tc;tc++){switch(tc){case 0:Nl.h(vh,mc);break;case 1:Nl.h(vh+zp,mc);break;case 2:Nl.h(vh,mc+hf);break;case 3:Nl.h(vh+zp,mc+hf)}Nl.rotate(Es+Gs.angle),Nl.offset($0,Up),Hp===0&&tc===0?Cu.h(Nl.x,Nl.y,0,0):Cu.Ye(Nl),Nl.offset(-$0,-Up),Nl.rotate(-Es-Gs.angle)}Tt.free(Nl),mh.graduatedBounds!==null&&mh.graduatedBounds.push(Cu),fo(Kh,Cu.x,Cu.y,Cu.width,Cu.height)}else if(Gs instanceof No){var zu=a,Y0=E;zu.temporaryTextBlock===null&&(zu.temporaryTextBlock=new No);var Zl=zu.temporaryTextBlock;S1(Zl,Gs);var Vh=Gs.alignmentFocus;Vh.Mc()&&(Vh=qa);for(var Hu=Gs.segmentOrientation,Gp=Gs.segmentOffset,Td=new _n,em=0,Wp=0,Dc=0,df=0,kd=0,Zp=hl.length,$h=0;$h<Zp;$h++){var eh=hl[$h];em=eh.$l.x,Wp=eh.$l.y,Dc=eh.angle,kd=df=Gs.angle,Hu!==ol&&(kd=Hu===Cg||Hu===n0?Dc+Gs.angle:Dc,df=$n.computeAngle(Hu,kd)),Zl.Kb=df,Zl.text=eh.text||"",Zl.measure(1/0,1/0,0,0);var Yh=Zl.measuredBounds,yh=Zl.naturalBounds,Xh=yh.width,ff=yh.height,vc=mr.alloc();vc.reset(),vc.translate(-Yh.x,-Yh.y),vc.scale(Zl.scale,Zl.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=_n.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 _n(em,Wp,Yh.width,Yh.height),tm=new _n(Yh.x,Yh.y,Yh.width,Yh.height),Wy=new _n(yh.x,yh.y,yh.width,yh.height);eh.Sz=df,eh.lineCount=Zl.lineCount,eh.lines=[Zl.Cb,Zl.Ih,Zl.df,Zl.Le,Zl.Qc,Zl.Qb,Zl.ze],eh.actualBounds=pf,eh.measuredBounds=tm,eh.naturalBounds=Wy,$h===0?Td.assign(pf):Td.ed(pf),Tt.free(Sh),Tt.free(Jh),_n.free(Zf),mr.free(vc)}zu.graduatedBounds!==null&&zu.graduatedBounds.push(Td),fo(Y0,Td.x,Td.y,Td.width,Td.height)}Qs(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 jl,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],ot=tt.length;if(Ye.visible&&Ye!==te&&tt.length!==0){if(Ye instanceof pr){if(!(2>a.graduatedTickUnit*Ye.interval*te.geometry.flattenedTotalLength/a.graduatedRange*ne&&Ye.graduatedSkip===null)){var ft=Ye.measuredBounds,It=Ye.strokeWidth*Ye.scale,Mt=Ye.alignmentFocus;Mt.Mc()&&(Mt=qa);for(var Ht=0;Ht<ot;Ht++){var Gt=tt[Ht].$l,Vt=tt[Ht].angle,Qt=Mt,fn=Ye.Ab;fn.reset(),fn.translate(Gt.x+ae.x,Gt.y+ae.y),fn.rotate(Vt+Ye.angle,0,0),fn.translate(-ft.width*Qt.x+Qt.offsetX+It/2,-ft.height*Qt.y+Qt.offsetY+It/2),fn.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 No)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new No),ft=a.temporaryTextBlock,S1(ft,Ye),It=0;It<ot;It++)Mt=tt[It],Mt.actualBounds&&Mt.measuredBounds&&Mt.naturalBounds&&(ft.ec=Mt.text||"",ft.Kb=Mt.Sz||0,ft.Gc=Mt.lineCount||0,Ht=Mt.lines,Ht!==void 0&&(ft.Cb=Ht[0],ft.Ih=Ht[1],ft.df=Ht[2],ft.Le=Ht[3],ft.Qc=Ht[4],ft.Qb=Ht[5],ft.ze=Ht[6]),Mt.naturalBounds&&(ft.dc=Mt.naturalBounds),Mt.actualBounds&&(Ht=Mt.actualBounds,ft.arrange(Ht.x,Ht.y,Ht.width,Ht.height)),Ht=Mt.actualBounds,ft.arrange(Ht.x,Ht.y,Ht.width,Ht.height),Gt=Mt.measuredBounds,Mt=Mt.naturalBounds,Vt=ft.Ab,Vt.reset(),Vt.translate(Ht.x+ae.x,Ht.y+ae.y),Vt.translate(-Gt.x,-Gt.y),ft.no(Vt,Mt.x,Mt.y,Mt.width,Mt.height),Iu(ft,!1),ft.wh.set(ft.Ab),ft.Kk=ft.scale,mu(ft,!1),ft.Ng=Ye.part,ft.Me=Ye.panel,ft.gc(y,x),ft.Me=null,ft.Ng=null,E&&(a.svg.appendChild(ft.svg),ft.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function Gn(a,y){if(en.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 ra?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 In,this.yb=ba,this.Tm=so,this.Uf=ar,this.$g=null,this.$e="",this.jg=new _n(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=vi,this.jn=Xo,this.kn=Ir,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}nt(Gn,en),Gn.prototype.cloneProtected=function(a){en.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){en.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=en.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].copy();E.wi(a),E.Ng=null;var te=a.O,ne=te.count;if(te.Gb(ne,E),te=a.part,te!==null){te.Rh=null,E.portId!==null&&te instanceof ii&&(te.Te=!0);var ae=a.diagram;ae!==null&&ae.undoManager.isUndoingRedoing||te.cb(vs,"elements",a,null,E,null,ne)}}return a}return null},st=Gn.prototype,st.toString=function(){return"Panel("+this.type.name+")#"+Ar(this)},st.Pn=function(a){en.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},st.hh=function(a,y){if(this.na===Gn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Gn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Gn.Table)if(a.yc(),a instanceof jl){var x=a.yd;a.yd=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){bs(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(),ot=Fe.separatorStrokeWidth;isNaN(ot)&&(ot=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ft=Fe.separatorStroke;ft===null&&(ft=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(ft===null||Fe.index===(x?fe:_e))&&(ot=0),tt-=ot,ot=Fe.position+ot,tt+=Fe.actual,ot+tt>Ye&&(tt=Ye-ot),0>=tt||(Ye=a.yb,bs(a,y,Fe.background,!0,!1,ae,ne),x?y.fillRect(Ye.left,ot+Ye.top,ne.width-(Ye.left+Ye.right),tt):y.fillRect(ot+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"}st.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},st.kk=function(a,y,x){if(!en.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},st.nk=function(){return!0},st.$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 en.prototype.$o.call(this,a,y,x,b)},st.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,on.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=on.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 ot=null,ft=this.isClipping&&this.na===Gn.Spot;ft&&(ot=Tt.alloc(),Ye=this.Pb(),(_e=Ye.Sj(ae,a,fe,x,ot))&&(y=(ae-ot.x)*(ae-ot.x)+(a-ot.y)*(a-ot.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 ft&&(y>b&&E.set(ot),Tt.free(ot)),Tt.free(Me),te&&E.transform(ne),_e},st.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();en.prototype.Gj.call(this)},st.v=function(a){if(!tu(this)){en.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 No||te!==Fn)&&E.v(!0)}}}},st.Uj=function(){if(!tu(this)){Qs(this,!0),Hc(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},st.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()}},st.Wu=function(){mu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},st.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),Cs(E,a,fe),Cs(this.naturalBounds,a,fe),this.Ge(0,0,a,fe)},st.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}st.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=Fn),a){case Fn:(y>x||te>b)&&(this.v(),this.measure(y>x?x:y,te>b?b:te,0,0));break;case Hn: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 zi:this.v(!0),this.measure(y+ae,b+ne,0,0)}}this.na.arrange(this,E,this.jg)}},st.gh=function(a){var y=this.naturalBounds,x=hh(this);if(Lr(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)&&(qi(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},st.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},st.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)}}st.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}st.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 pr&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}st.se=function(){return!(this.type===Gn.TableRow||this.type===Gn.TableColumn)};function Oh(a){return a.type===Gn.TableRow||a.type===Gn.TableColumn}st.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:qi(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),Lr(-(_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()?qi(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()?qi(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=Lr(0,0,b.width,b.height,ne.x,ne.y)?this:null,te||Tt.free(ne),a)}return te||Tt.free(ne),null},st.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:qi(Tt.allocAt(a.x,a.y),this.transform);if(E=Lr(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()?qi(_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},st.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=mr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&mr.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var ae=hh(this),fe=this.O.s,_e=fe.length;_e--;){var 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=mr.alloc(),Ye.set(ne),(Me!==null?Me.Cf(a,y,x,b,E,Ye):aa(Fe,a,b,Ye))&&(y!==null&&(Fe=y(Fe)),Fe===null||x!==null&&!x(Fe)||E.add(Fe)),mr.free(Ye))}}return te===void 0&&mr.free(ne),b}return te===void 0&&mr.free(ne),!1};function vv(a,y,x,b){for(var E=a.O.s,te=E.length;te--;){var ne=E[te];if(ne.visible){var ae=ne.actualBounds,fe=a.naturalBounds;ae.x>fe.width||ae.y>fe.height||0>ae.x+ae.width||0>ae.y+ae.height||(ne instanceof Gn&&vv(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}st.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:qi(Tt.allocAt(a.x,a.y),this.transform),_e=ae?y:qi(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 ot=Ye[tt];if(ot.visible||ot===Me){var ft=ot.actualBounds,It=this.naturalBounds;(!ae||!(ft.x>It.width||ft.y>It.height||0>ft.x+ft.width||0>ft.y+ft.height))&&(ot.se()?(ft=ot.transform,qi(fe.set(a),ft),qi(_e.set(y),ft)):(fe.set(a),_e.set(y)),ft=ot,ot=ot instanceof Gn?ot:null,(ot!==null?ot.og(fe,_e,x,b,E,te):ft.tx(fe,_e,E))&&(x!==null&&(ft=x(ft)),ft===null||b!==null&&!b(ft)||te.add(ft)))}}Tt.free(fe),Tt.free(_e)}return E?Fe:ne}return!1};function yv(a){var y=null;return a instanceof pr&&(y=a.spot1,y===so&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Ys),y}function Sv(a){var y=null;return a instanceof pr&&(y=a.spot2,y===so&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=ka),y}st.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},st.M=function(a){return this.O.M(a)},st.Gb=function(a,y){y instanceof ki&&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 pr||At("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Gn.Graduated||y instanceof pr||y instanceof No||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 fi),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),tu(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 ii&&(x.Te=!0),x.Te&&x instanceof ii&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(cs,"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}st.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)},st.mb=function(a){0<=a&&this.pc(a,!0)},st.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),Qs(this,!1),this.v(),this.$g===b&&(this.$g=null),this.graduatedIntervals=null;var te=this.part;te!==null&&(te.Rh=null,te.ag=NaN,te.Wb(),te instanceof ii&&(b instanceof 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(cs,"elements",this,b,null,a,null))},st.Fb=function(a){0>a&&Sn(a,">= 0",Gn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new ea;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(vs,"rowdefs",this,null,x,null,a)}return y[a]},st.oA=function(a){if(0>a&&Sn(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(cs,"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 ea?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}st.Eb=function(a){0>a&&Sn(a,">= 0",Gn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new ea;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(vs,"coldefs",this,null,x,null,a)}return y[a]},st.jA=function(a){if(0>a&&Sn(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(cs,"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 ea?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}st.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},st.Hy=function(a,y){return(a=this.Fb(a))&&Am(a,new ea(y)),this},st.By=function(a,y){return(a=this.Eb(a))&&Am(a,new ea(y)),this},st.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},st.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},st.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)},st.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 In;else if(y._isFrozen)return;var x=new In;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 In),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 ot=tt.be.iterator;ot.next();){var ft=ot.value;ft.xd=tt,ft.to=2,ft.wl=tt.index,y.add(ft)}}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();)ot=tt.value,ot.xd=Ye,ot.to=1,ot.wl=Ye.index,y.add(ot)}}});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 In),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):kn('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),te instanceof ea?(ne=Ar(te.panel),E.Ai=ne===void 0?-1:ne,te.panel.bindingId=E.Ai):te instanceof en?(ne=Ar(te),E.Ai=ne===void 0?-1:ne,te.bindingId=E.Ai):At("Unknown type of binding target: "+te)}y.freeze(),a instanceof ki&&a.Zc()&&a.Va()}st.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},st.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)}}},st.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 pr&&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}st.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),tu(a)||a.v(),a.graduatedIntervals=null,a.If()||km(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof ii&&(y.Te=!0),y.Te&&y instanceof ii&&(y.wc=null))}}function Tm(a,y,x,b){if(!(y==null||0>x)){var E=bv(a,y);if(E=Cv(a,E),E!==null){if(Ru(E),E=E.copy(),E.l&16777216){var te=a.ih();te!==null&&xv(te,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new fi),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,kn('No item template Panel found for category "'+y+'" on '+a),kn(" Using default item template."),a=new Gn,y=new No,y.bind(new Hs("text","",si)),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&&Sn(a,">= 0",Gn,"padding"),a=new Ci(a)):(0>a.left&&Sn(a.left,">= 0",Gn,"padding:value.left"),0>a.right&&Sn(a.right,">= 0",Gn,"padding:value.right"),0>a.top&&Sn(a.top,">= 0",Gn,"padding:value.top"),0>a.bottom&&Sn(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:ba},set:function(a){typeof a=="number"&&(a=new Ci(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new 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 vo)&&(a instanceof vo&&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 vo)&&(a instanceof vo&&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),Ea(this)&&(a=this.part,a!==null&&jo(this,a,"graduatedRange")))}},graduatedMax:{get:function(){return this.ra!==null?this.ra.F:100},set:function(a){var y=this.graduatedMax;y!==a&&(this.ra===null&&(this.ra=new dh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Ea(this)&&(a=this.part,a!==null&&jo(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 ki&&!(this instanceof Xr);Ru(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof $n?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof ki&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),b!==null&&b.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new Lf),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&Sx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&uy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&ly(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||p1(this,a)}}},itemTemplate:{get:function(){return this.itemTemplateMap===null?null:this.itemTemplateMap.I("")},set:function(a){if(this.itemTemplateMap===null){if(a===null)return;this.itemTemplateMap=new fi}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof ki||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(););xr(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&&(xr(this),this.A.Oc=a,this.g("itemCategoryProperty",y,a))}},isAtomic:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.g("isAtomic",y,a))}},isClipping:{get:function(){return(this.l&2097152)!==0},set:function(a){var y=(this.l&2097152)!==0;y!==a&&(this.l^=2097152,this instanceof sr&&(this.tb=null),this.v(),this.g("isClipping",y,a))}},isOpposite:{get:function(){return(this.l&33554432)!==0},set:function(a){var y=(this.l&33554432)!==0;y!==a&&(this.l^=33554432,this.v(),this.g("isOpposite",y,a))}},isEnabled:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;if(y!==a){var x=this.panel===null||this.panel.If();this.l^=4194304,this.g("isEnabled",y,a),y=this.diagram,y!==null&&y.undoManager.isUndoingRedoing||x&&km(this,this,a)}}},alignmentFocusName:{get:function(){return this.$e},set:function(a){var y=this.$e;y!==a&&(this.$e=a,this.v(),this.g("alignmentFocusName",y,a))}}}),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 fi;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=ba,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 ea(a){wr(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=so,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Pv,this.hg=ar,this.lo=this.dg=null,this.mo=NaN,this.Ma=this.tj=null,this.Pm=!1,a&&(Object.assign(this,a),a.column!==void 0?(this.isRow=!1,this.index=a.column):a.row!==void 0&&(this.isRow=!0,this.index=a.row))}ea.prototype.copy=function(){var a=new ea;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=Rn(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=Rn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}st=ea.prototype,st.qb=function(a){a.classType===ea&&(this.sizing=a)},st.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Ar(this)},st.wi=function(a){this.Me=a},st.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)},st.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)},st.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(Ko,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}st.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 In),this.be.add(E),this},Je.Object.defineProperties(ea.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&&Sn(a,">= 0",ea,"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&&Sn(a,">= 0",ea,"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))&&Sn(a,">= 0",ea,"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&&Sn(a,">= 0",ea,"maximum"),this.hj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("maximum",y,a))}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(this.Jb=a.J(),this.panel!==null&&this.panel.v(),this.Ob("alignment",y,a))}},stretch:{get:function(){return this.hg},set:function(a){var y=this.hg;y!==a&&(this.hg=a,this.panel!==null&&this.panel.v(),this.Ob("stretch",y,a))}},separatorPadding:{get:function(){return this.dg},set:function(a){typeof a=="number"&&(a=new Ci(a));var y=this.dg;a!==null&&y!==null&&y.D(a)||(a!==null&&(a=a.J()),this.dg=a,this.panel!==null&&this.panel.v(),this.Ob("separatorPadding",y,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var y=this.lo;y!==a&&(a!==null&&Tf(a,"RowColumnDefinition.separatorStroke"),a instanceof vo&&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 vo&&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}}}),ea.prototype.computeEffectiveSpacing=ea.prototype.Wc,ea.prototype.computeEffectiveSpacingTop=ea.prototype.Io;var Pv=new Pn(ea,"Default",0),pg=new Pn(ea,"None",1),Om=new Pn(ea,"ProportionalExtra",2);ea.className="RowColumnDefinition",ea.Default=Pv,ea.None=pg,ea.ProportionalExtra=Om;function pr(a,y){en.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(pr,en),pr.prototype.cloneProtected=function(a){en.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=Rn(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())}st=pr.prototype,st.th=function(){en.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},st.qb=function(a){a===Fn||a===vi||a===Br||a===ar?this.geometryStretch=a:en.prototype.qb.call(this,a)},st.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Ar(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,ot,ft=0,It=Un(),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),ot=Math.sqrt(Fe*Fe+ae*ae),It.push([Fe,tt,Ye,ot]),ft+=ot,ae=_e,fe=Me;ae=x[0],fe=x[1],Fe=b.measuredBounds.width,b instanceof pr&&(Fe-=b.strokeWidth),1>Fe&&(Fe=1),E=x=Fe,_e=ne/2,Me=_e!==0,Mt=0,ot=It[Mt],Fe=ot[0],tt=ot[1],Ye=ot[2],ot=ot[3];for(var Ht=0;.1<=ft;){if(Ht===0&&(Me?(E=x,E-=_e,ft-=_e,Me=!1):E=x,E===0&&(E=1)),E>ft){qn(It);return}E>ot?(Ht=E-ot,E=ot):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),ft-=E,ot-=E,Ht!==0){if(Mt++,Mt===It.length){qn(It);return}ot=It[Mt],Fe=ot[0],tt=ot[1],Ye=ot[2],ot=ot[3],E=Ht}}qn(It)}}st.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&&bs(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 Xr&&ae.category==="Selection"&&ae.adornedObject instanceof pr&&ae.adornedPart.Pb()===ae.adornedObject?ae.adornedObject.strokeWidth:0),fe===0&&(x=null),x!==null&&fe!==0&&(bs(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===Jn.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===Jn.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===Jn.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+on.wg*E,fe-Ye,_e+E,fe-on.wg*Ye,_e+E,fe),a.bezierCurveTo(_e+E,fe+on.wg*Ye,_e+on.wg*E,fe+Ye,_e,fe+Ye),a.bezierCurveTo(_e-on.wg*E,fe+Ye,_e-E,fe+on.wg*Ye,_e-E,fe),a.bezierCurveTo(_e-E,fe-on.wg*Ye,_e-on.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===Jn.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,ot=0;ot<Fe;ot++){var ft=Me[ot];switch(ft.type){case Ls:a.moveTo(ft.endX,ft.endY);break;case bo:a.lineTo(ft.endX,ft.endY);break;case da:a.bezierCurveTo(ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY);break;case dl:a.quadraticCurveTo(ft.point1X,ft.point1Y,ft.endX,ft.endY);break;case as:if(ft.radiusX===ft.radiusY){var It=Math.PI/180;a.arc(ft.point1X,ft.point1Y,ft.radiusX,ft.startAngle*It,(ft.startAngle+ft.sweepAngle)*It,0>ft.sweepAngle,tt!==null?tt.endX:_e.startX,tt!==null?tt.endY:_e.startY)}else if(tt=Ia(ft,_e),It=tt.length,It===0)a.lineTo(ft.centerX,ft.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 bl:if(Mt=It=0,tt!==null&&tt.type===as){if(tt=Ia(tt,_e),Ht=tt.length,Ht===0){a.lineTo(ft.endX,ft.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=Vs(ft,_e,It,Mt),It=tt.length,It===0){a.lineTo(ft.endX,ft.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: "+ft.type)}ft.isClosed&&a.closePath(),tt=ft}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=Un(),te.type===Jn.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===Jn.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(ot=_e[Fe],ot.type){case Ls:pp(a,y,b,x),b.length=0,b.push(ot.endX),b.push(ot.endY),ne=ot.endX,E=ot.endY,fe=ne,Ye=E;break;case bo:b.push(ot.endX),b.push(ot.endY),ne=ot.endX,E=ot.endY;break;case da:on.Qe(ne,E,ot.point1X,ot.point1Y,ot.point2X,ot.point2Y,ot.endX,ot.endY,.5,b),ne=ot.endX,E=ot.endY;break;case dl:on.ep(ne,E,ot.point1X,ot.point1Y,ot.endX,ot.endY,.5,b),ne=ot.endX,E=ot.endY;break;case as:if(ft=Ia(ot,ae),tt=ft.length,tt===0){b.push(ot.centerX),b.push(ot.centerY),ne=ot.centerX,E=ot.centerY;break}for(It=0;It<tt;It++)Mt=ft[It],on.Qe(ne,E,Mt[2],Mt[3],Mt[4],Mt[5],Mt[6],Mt[7],.5,b),ne=Mt[6],E=Mt[7];break;case bl:if(ft=Vs(ot,ae,ne,E),tt=ft.length,tt===0){b.push(ot.endX),b.push(ot.endY),ne=ot.endX,E=ot.endY;break}for(It=0;It<tt;It++)Mt=ft[It],on.Qe(ne,E,Mt[2],Mt[3],Mt[4],Mt[5],Mt[6],Mt[7],.5,b),ne=Mt[6],E=Mt[7];break;default:At("Segment not of valid type: "+ot.type)}ot.isClosed&&(b.push(fe),b.push(Ye),pp(a,y,b,x))}pp(a,y,b,x)}else if(te.type===Jn.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===Jn.F){if(E=new Ks,E.startX=te.endX,E.startY=(te.startY+te.endY)/2,ne=new Wr(as),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=Ia(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],on.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)}qn(b),a.restore(),a.Vc(!1)}}}},st.kk=function(a,y,x){return!en.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)},st.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:en.prototype.nk.call(this,a)},st.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)}},st.ga=function(a,y){if(y===void 0&&(y=new Tt),a instanceof yi){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},st.mi=function(a){a===void 0&&(a=new _n);var y=this.naturalBounds,x=this.oe;y=_n.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),fo(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),fo(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),fo(a,b.x,b.y,0,0),_n.free(y),Tt.free(b),a},st.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!==Jn.j||y||(E+=2);var te=_n.alloc();if(te.assign(b),te.Bc(E+2,E+2),!te.ca(a))return _n.free(te),!1;if(b=E+1e-4,x.type===Jn.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:(_n.free(te),on.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===Jn.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 _n.free(te),!1;te.Bc(b,b)}return this.stroke!==null&&te.Bc(E,E),a=te.ca(a),_n.free(te),a}if(x.type===Jn.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 _n.free(te),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),_n.free(te),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===Jn.o)return _n.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)},st.Wl=function(a,y,x,b){var E=this.desiredSize,te=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var ne=this.geometry.bounds;else{var ae=this.figure,fe=Ev[ae];if(fe===void 0){var _e=on.Ze[ae];typeof _e=="string"&&(_e=on.Ze[_e]),typeof _e=="function"?(fe=_e(null,100,100),Ev[ae]=fe):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 Fn:b=x=0;break;case Hn:_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 zi: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 Fn:break;case Hn:ae=_e,fe=Me;break;case vi: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&&on.$(this.ua.Sk,a-te)&&on.$(this.ua.Rk,y-te)||(this.ua=pr.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===ar?Hn:y:y===ar?Ev[a.figure].defaultStretch:y}st.eh=function(a,y,x,b){$a(this,a,y,x,b)},st.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},st.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===Jn.j)if(1.5>=this.strokeWidth)Me=on.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=Un(),a=new Tt,on.Ve(_e.startX+b,_e.startY+Me,_e.endX+b,_e.endY+Me,te,ne,ae,fe,a)&&y.push(a),a=new Tt,on.Ve(_e.startX-b,_e.startY-Me,_e.endX-b,_e.endY-Me,te,ne,ae,fe,a)&&y.push(a),a=new Tt,on.Ve(_e.startX+b,_e.startY+Me,_e.startX-b,_e.startY-Me,te,ne,ae,fe,a)&&y.push(a),a=new Tt,on.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 qn(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);qn(y)}else if(_e.type===Jn.u)Me=on.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===Jn.F){y=_n.allocAt(tt.x,tt.y,tt.width,tt.height).Bc(Fe,Fe);e:if(y.width===0)Me=on.Ve(y.x,y.y,y.x,y.y+y.height,te,ne,ae,fe,E);else if(y.height===0)Me=on.Ve(y.x,y.y,y.x+y.width,y.y,te,ne,ae,fe,E);else{if(a=y.width/2,_e=y.height/2,b=y.x+a,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}_n.free(y)}else if(_e.type===Jn.o){Ye=Tt.alloc();var ot=ae-te,ft=fe-ne,It=ot*ot+ft*ft,Mt=te,Ht=ne;if(0<It&&tt.contains(Mt,Ht)&&(Ye.x=Mt,Ye.y=Ht,this.ca(Ye)))for(ot!==0&&.5>Math.abs(ot)?(ft*=.5/ot,ot=.5):ft!==0&&.5>Math.abs(ft)&&(ot*=.5/ft,ft=.5),Mt-=ot,Ht-=ft;tt.contains(Mt,Ht);)Mt-=ot,Ht-=ft;for(E.x=ae,E.y=fe,ft=0;ft<_e.figures.count;ft++){var Gt=_e.figures.s[ft],Vt=Gt.isFilled?Mt:te,Qt=Gt.isFilled?Ht:ne,fn=Gt.segments;tt=Gt.startX,ot=Gt.startY;for(var ni=tt,di=ot,li=0;li<fn.count;li++){var Vn=fn.s[li],Dn=Vn.type,tr=Vn.endX,Vi=Vn.endY,qr=!1;switch(Dn){case Ls:ni=tr,di=Vi;break;case bo:qr=Dm(tt,ot,tr,Vi,Vt,Qt,ae,fe,Ye);break;case da:qr=on.Eo(tt,ot,Vn.point1X,Vn.point1Y,Vn.point2X,Vn.point2Y,tr,Vi,Vt,Qt,ae,fe,.6,Ye);break;case dl:qr=on.Eo(tt,ot,tt+2/3*(Vn.point1X-tt),ot+2/3*(Vn.point1Y-ot),tr+2/3*(Vn.point1X-tr),Vi+2/3*(Vn.point1Y-Vi),tr,Vi,Vt,Qt,ae,fe,.6,Ye);break;case as:case bl:Dn=Vn.type===as?Ia(Vn,Gt):Vs(Vn,Gt,tt,ot);var Mo=Dn.length;if(Mo===0){qr=Dm(tt,ot,Vn.type===as?Vn.centerX:Vn.endX,Vn.type===as?Vn.centerY:Vn.endY,Vt,Qt,ae,fe,Ye);break}for(Vi=null,tr=0;tr<Mo;tr++){if(Vi=Dn[tr],tr===0&&Dm(tt,ot,Vi[0],Vi[1],Vt,Qt,ae,fe,Ye)){var la=Im(Vt,Qt,Ye,It,E);la<It&&(It=la,Me=!0)}on.Eo(Vi[0],Vi[1],Vi[2],Vi[3],Vi[4],Vi[5],Vi[6],Vi[7],Vt,Qt,ae,fe,.6,Ye)&&(la=Im(Vt,Qt,Ye,It,E),la<It&&(It=la,Me=!0))}tr=Vi[6],Vi=Vi[7];break;default:At("Unknown Segment type: "+Dn)}tt=tr,ot=Vi,qr&&(qr=Im(Vt,Qt,Ye,It,E),qr<It&&(It=qr,Me=!0)),Vn.isClosed&&(tr=ni,Vi=di,Dm(tt,ot,tr,Vi,Vt,Qt,ae,fe,Ye)&&(Vn=Im(Vt,Qt,Ye,It,E),Vn<It&&(It=Vn,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(on.$(a,x)&&on.$(y,b)||on.$(E,ne)&&on.$(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||on.$(fe.y,a))&&(fe.y<y||on.$(fe.y,y))&&(_e=!0)):(y=a<x?a:x,a=a<x?x:a,(fe.x>y||on.$(fe.x,y))&&(fe.x<a||on.$(fe.x,a))&&(_e=!0)),_e)}st.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},st.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=mr.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,te=a.top;a=a.bottom;var ne=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),mr.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)}st.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,_o(a.x,a.y,ae,fe)<=E&&_o(a.x,a.y,_e,fe)<=E&&_o(a.x,a.y,ae,ne)<=E&&_o(a.x,a.y,_e,ne)<=E)return!0}if(ae=y.startX,fe=y.startY,_e=y.endX,ne=y.endY,y.type===Jn.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===Jn.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===Jn.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=on.$y(Me,Fe,y,te),a*a<=E)return!0}else return!(_o(y,te,-Me,0)>=E||_o(y,te,0,-Fe)>=E||_o(y,te,0,Fe)>=E||_o(y,te,Me,0)>=E)}else if(y.type===Jn.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 Ls:case bo:if(ne=Fe.endX,Me=Fe.endY,a.zd(ne,Me)>E)return!1;break;case da:var Ye=Un();if(on.Qe(ne,Me,Fe.point1X,Fe.point1Y,Fe.point2X,Fe.point2Y,Fe.endX,Fe.endY,.8,Ye),ne=b(Ye,a),qn(Ye),ne||(ne=Fe.endX,Me=Fe.endY,a.zd(ne,Me)>E))return!1;break;case dl:if(Ye=Un(),on.ep(ne,Me,Fe.point1X,Fe.point1Y,Fe.endX,Fe.endY,.8,Ye),ne=b(Ye,a),qn(Ye),ne||(ne=Fe.endX,Me=Fe.endY,a.zd(ne,Me)>E))return!1;break;case as:case bl:Ye=Fe.type===as?Ia(Fe,te):Vs(Fe,te,ne,Me);var tt=Ye.length;if(tt===0){if(ne=Fe.type===as?Fe.centerX:Fe.endX,Me=Fe.type===as?Fe.centerY:Fe.endY,a.zd(ne,Me)>E)return!1;break}Fe=null;for(var ot=Un(),ft=0;ft<tt;ft++)if(Fe=Ye[ft],ot.length=0,on.Qe(Fe[0],Fe[1],Fe[2],Fe[3],Fe[4],Fe[5],Fe[6],Fe[7],.8,ot),b(ot,a))return qn(ot),!1;qn(ot),Fe!==null&&(ne=Fe[6],Me=Fe[7]);break;default:At("Unknown Segment type: "+Fe.type)}}return!0}}}return!1},st.qc=function(){this.ua=null},st.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=Ws):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new yi(1-Ws.x,Ws.y)))}pr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=Wc[a.toArrow];else a.fromArrow!=="None"?b=Wc[a.fromArrow]:(b=on.Ze[a.figure],typeof b=="string"&&(b=on.Ze[b]),b===void 0&&At("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=on.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=Wc[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Wc[x],y===void 0){var b=null,E;for(E in on.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=Jn.parse(on.um[b],!1),Wc[b]=a,x!==b&&(Wc[x]=b),b}}return typeof y=="string"?y:y instanceof Jn?a:null}Je.Object.defineProperties(pr.prototype,{geometry:{get:function(){return this.ua!==null?this.ua:this.Rd},set:function(a){var y=this.ua,x=this.Rd;if(y!==a){a!==null?this.Rd=this.ua=a.freeze():this.Rd=this.ua=null;var b=this.part;b!==null&&(b.ag=NaN),this.v(),this.g("geometry",y||x,a),Ea(this)&&(a=this.part,a!==null&&jo(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Jn.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 vo&&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 vo&&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 Sn(a,"value >= 0",pr,"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"?Sn(a,'"butt", "round", or "square"',pr,"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"?Sn(a,'"miter", "bevel", or "round"',pr,"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=on.Ze[a];typeof x=="function"?x=a:(x=on.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:so},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:so},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),ef(this),this.Na.gg=a,this.v(),this.g("spot2",y,a))}},parameter1:{get:function(){return this.Un},set:function(a){var y=this.Un;y!==a&&(this.Un=a,this.qc(),this.v(),this.g("parameter1",y,a))}},parameter2:{get:function(){return this.Vn},set:function(a){var y=this.Vn;y!==a&&(this.Vn=a,this.qc(),this.v(),this.g("parameter2",y,a))}},naturalBounds:{get:function(){return this.dc}},pathPattern:{get:function(){return this.Na!==null?this.Na.br:null},set:function(a){var y=this.pathPattern;y!==a&&(ef(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:ar},set:function(a){var y=this.geometryStretch;y!==a&&(ef(this),this.Na.jq=a,this.v(),this.g("geometryStretch",y,a))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(a){var y=this.interval;if(a=Math.round(a),y!==a&&a!==0&&isFinite(a)){this.fa===null&&(this.fa=new Zc),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Lc(x),this.v(),x=this.panel,x!==null&&(x.graduatedIntervals=null),this.g("interval",y,a)}}},graduatedStart:{get:function(){return this.fa!==null?this.fa.u:0},set:function(a){var y=this.graduatedStart;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Zc),this.fa.u=a,this.v(),this.g("graduatedStart",y,a))}},graduatedEnd:{get:function(){return this.fa!==null?this.fa.j:1},set:function(a){var y=this.graduatedEnd;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Zc),this.fa.j=a,this.v(),this.g("graduatedEnd",y,a))}},graduatedSkip:{get:function(){return this.fa!==null?this.fa.o:null},set:function(a){var y=this.graduatedSkip;y!==a&&(this.fa===null&&(this.fa=new Zc),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),pr.prototype.intersectsRect=pr.prototype.Yc,pr.prototype.containedInRect=pr.prototype.fh,pr.prototype.getNearestIntersectionPoint=pr.prototype.rs,pr.prototype.getDocumentBounds=pr.prototype.mi,pr.prototype.getDocumentPoint=pr.prototype.ga;var Wc=new Ti,Ev=new Ti;pr.className="Shape",pr.getFigureGenerators=function(){var a=new fi,y;for(y in on.Ze)y!==y.toLowerCase()&&a.add(y,on.Ze[y]);return a.freeze(),a},pr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=on.Ze;b[a]=y,b[x]=a},pr.getArrowheadGeometries=function(){var a=new fi;for(b in on.um)if(Wc[b]===void 0){var y=Jn.parse(on.um[b],!1);Wc[b]=y,y=b.toLowerCase(),y!==b&&(Wc[y]=b)}for(var x in Wc)if(x!==x.toLowerCase()){var b=Wc[x];b instanceof Jn&&a.add(x,b)}return a.freeze(),a},pr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Jn.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=ar,this.gg=this.fg=so}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 No(a,y){return en.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(No,en),No.prototype.cloneProtected=function(a){en.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())}st=No.prototype,st.th=function(){en.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}st.qb=function(a){a.classType===No?this.wrap=a:en.prototype.qb.call(this,a)},st.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},st.v=function(){en.prototype.v.call(this)},st.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;bs(this,a,this.xc,!0,!1,x,b),(fe||_e)&&bs(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 jl&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Fe=this.spacingBelow,this.flip){case Gr:a.translate(E,0),a.scale(-1,1);break;case br:a.translate(0,te),a.scale(1,-1);break;case Co: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 Gr:a.scale(-1,1),a.translate(-E,0);break;case br:a.scale(1,-1),a.translate(0,-te);break;case Co:a.scale(-1,-1),a.translate(-E,-te)}}},st.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 jl&&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 jl&&y.ad.classList.add("gojs-td"))}},st.kk=function(a,y,x){if(!en.prototype.kk.call(this,a,y,x))return!1;if(bs(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},st.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:en.prototype.nk.call(this,a)},st.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)}},st.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),Cs(this.dc,te,ne),this.Ge(0,0,te,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},st.eh=function(a,y,x,b){$a(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=Xn.alloc();Mv(a,te,y,fe),E+=fe.height,Xn.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(No.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:Fn},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:na},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=Xn.alloc();Mv(this,this.ec,999999,a);var y=a.width;Xn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Cs(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 vo&&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&&Sn(a,"> 0",No,"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 Pn(No,"None",0),b1=new Pn(No,"WrapFit",1),kv=new Pn(No,"WrapDesiredSize",2),C1=new Pn(No,"WrapBreakAll",3),Av=new Pn(No,"OverflowClip",0),Fm=new Pn(No,"OverflowEllipsis",1),vg=new Pn(No,"FormatTrim",0),P1=new Pn(No,"FormatNone",0),xx=/[ \u200b\u00ad]/,Nv=new Ti,_1=0,jm=new Ti,Ov=0,yg="...",E1="",ml=null,zm=!1;No.className="TextBlock";function Iv(){this.nc=!1,this.Hd=null,this.Xf=Fn,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=na,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},No.getEllipsis=function(){return yg},No.setEllipsis=function(a){yg=a,jm=new Ti,Ov=0},No.getBaseline=function(){return Rm},No.setBaseline=function(a){Rm=a},No.getUnderline=function(){return Bm},No.setUnderline=function(a){Bm=a},No.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},No.FormatNone=P1,No.FormatTrim=vg,No.None=Tv,No.OverflowClip=Av,No.OverflowEllipsis=Fm,No.WrapBreakAll=C1,No.WrapDesiredSize=kv,No.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){en.call(this),this.Eg=null,this.qo="",this.Xg=to,this.Nk=Hn,this.Zg=this.Hd=null,this.Mk=Fr,this.Xf=Fn,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,en),vl.prototype.cloneProtected=function(a){en.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===Fn||a===vi||a===Br?this.imageStretch=a:en.prototype.qb.call(this,a)},vl.prototype.toString=function(){return"Picture("+this.source+")#"+Ar(this)};function vp(a){a===void 0&&(a=""),a!==""?mp[a]&&(delete mp[a],Hm--):(mp=new Ti,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()||(Qs(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=Un();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);qn(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 jl;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,ot=this.Mk;switch(tt){case Fn:if(this.sourceRect.w())break;Fe>=b.width&&(te=te+ot.offsetX+(Fe*ot.x-b.width*ot.x)),Ye>=b.height&&(ne=ne+ot.offsetY+(Ye*ot.y-b.height*ot.y)),fe=Math.min(b.width,Fe),ae=Math.min(b.height,Ye);break;case Hn:Fe=b.width,Ye=b.height;break;case vi:case Br:tt===vi?(tt=Math.min(b.height/Ye,b.width/Fe),Fe*=tt,Ye*=tt):tt===Br&&(tt=Math.max(b.height/Ye,b.width/Fe),Fe*=tt,Ye*=tt,Fe>=b.width&&(te=(te+ot.offsetX+(Fe*ot.x-b.width*ot.x)/Fe)*fe),Ye>=b.height&&(ne=(ne+ot.offsetY+(Ye*ot.y-b.height*ot.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 ft=Fe*tt*Ye*tt,It=fe*ae/ft,Mt=x.__goCache;tt=null;var Ht=wx;if(!E){if(x.sq&&Mt!==void 0&&4<ft&&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?ot.offsetX+(b.width*ot.x-Fe*ot.x):0,ot=Ye<b.height?ot.offsetY+(b.height*ot.y-Ye*ot.y):0,this.flip){case Gr:a.translate(Math.min(b.width,Fe),0),a.scale(-1,1);break;case br:a.translate(0,Math.min(b.height,Ye)),a.scale(1,-1);break;case Co: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,ot,Math.min(b.width,Fe),Math.min(b.height,Ye)),a instanceof jl&&(this.bt=[te/y,ne/y,Math.min(tt.source.width,fe/y),Math.min(tt.source.height,ae/y),E,ot,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,ot,Math.min(b.width,Fe),Math.min(b.height,Ye)),a instanceof jl&&(this.bt=[te,ne,fe,ae,E,ot,Math.min(b.width,Fe),Math.min(b.height,Ye)])}catch(Gt){this.en=!1}switch(this.flip){case Gr:a.scale(-1,1),a.translate(-Math.min(b.width,Fe),0);break;case br:a.scale(1,-1),a.translate(0,-Math.min(b.height,Ye));break;case Co: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===Hn||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===Hn||te===zi?(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)),Cs(this.dc,a,y),this.Ge(0,0,a,y)},vl.prototype.eh=function(a,y,x,b){$a(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 On),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()||(Qs(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=zn("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 Ti,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 Jn,this.mc=null}yp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Jn,this.mc=null};function Sp(a,y,x,b,E,te){a.mc=new Ks,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 Wr(Ls);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 Wr(bo);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function Ih(a,y,x,b,E,te,ne){var ae;ae===void 0&&(ae=!1);var fe=new Wr(da);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 Wr(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 Wr(as);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 Wr(bl,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 za(a,y){var x=a.toLowerCase(),b=on.Ze;b[a]=y,b[x]=a}za("Rectangle",function(a,y,x){a="r"+y+","+x;var b=on.Mf[a];return b!==void 0||(b=new Jn(Jn.u),b.endX=y,b.endY=x,on.Nf<on.vm&&(on.Mf[a]=b,on.Nf++)),b}),za("Square",function(a,y,x){a="s"+y+","+x;var b=on.Mf[a];return b!==void 0||(b=new Jn(Jn.u),b.endX=y,b.endY=x,b.defaultStretch=vi,on.Nf<on.vm&&(on.Mf[a]=b,on.Nf++)),b}),za("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var b="rr"+y+","+x+","+a,E=on.Mf[b];if(E!==void 0)return E;var te=a*on.wg;return E=new Jn().add(new Ks(a,0,!0).add(new Wr(bo,y-a,0)).add(new Wr(da,y,a,y-te,0,y,te)).add(new Wr(bo,y,x-a)).add(new Wr(da,y-a,x,y,x-te,y-te,x)).add(new Wr(bo,a,x)).add(new Wr(da,0,x-a,te,x,0,x-te)).add(new Wr(bo,0,a)).add(new Wr(da,a,0,0,te,te,0).close())),1<te&&(E.spot1=new yi(0,0,te,te),E.spot2=new yi(1,1,-te,-te)),on.Nf<on.vm&&(on.Mf[b]=E,on.Nf++),E}),za("Border","RoundedRectangle"),za("Ellipse",function(a,y,x){a="e"+y+","+x;var b=on.Mf[a];return b!==void 0||(b=new Jn(Jn.F),b.endX=y,b.endY=x,b.spot1=Vl,b.spot2=Dl,on.Nf<on.vm&&(on.Mf[a]=b,on.Nf++)),b}),za("Circle",function(a,y,x){a="c"+y+","+x;var b=on.Mf[a];return b!==void 0||(b=new Jn(Jn.F),b.endX=y,b.endY=x,b.spot1=Vl,b.spot2=Dl,b.defaultStretch=vi,on.Nf<on.vm&&(on.Mf[a]=b,on.Nf++)),b}),za("TriangleRight",function(a,y,x){return new Jn().add(new Ks(0,0).add(new Wr(bo,y,.5*x)).add(new Wr(bo,0,x).close())).pm(0,.25,.5,.75)}),za("TriangleDown",function(a,y,x){return new Jn().add(new Ks(0,0).add(new Wr(bo,y,0)).add(new Wr(bo,.5*y,x).close())).pm(.25,0,.75,.5)}),za("TriangleLeft",function(a,y,x){return new Jn().add(new Ks(y,x).add(new Wr(bo,0,.5*x)).add(new Wr(bo,y,0).close())).pm(.5,.25,1,.75)}),za("TriangleUp",function(a,y,x){return new Jn().add(new Ks(y,x).add(new Wr(bo,0,x)).add(new Wr(bo,.5*y,0).close())).pm(.25,.5,.75,1)}),za("Triangle","TriangleUp"),za("Diamond",function(a,y,x){return new Jn().add(new Ks(.5*y,0).add(new Wr(bo,0,.5*x)).add(new Wr(bo,.5*y,x)).add(new Wr(bo,y,.5*x).close())).pm(.25,.25,.75,.75)}),za("LineH",function(a,y,x){return a=new Jn(Jn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),za("LineV",function(a,y,x){return a=new Jn(Jn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),za("None","Rectangle"),za("BarH","Rectangle"),za("BarV","Rectangle"),za("MinusLine","LineH"),za("PlusLine",function(a,y,x){return new Jn().add(new Ks(0,x/2,!1).add(new Wr(bo,y,x/2)).add(new Wr(Ls,y/2,0)).add(new Wr(bo,y/2,x)))}),za("XLine",function(a,y,x){return new Jn().add(new Ks(0,x,!1).add(new Wr(bo,y,0)).add(new Wr(Ls,0,0)).add(new Wr(bo,y,x)))}),za("LineRight",function(a,y,x){return new Jn().add(new Ks(.25*y,0,!1).add(new Wr(bo,.75*y,.5*x)).add(new Wr(bo,.25*y,x)))}),za("LineDown",function(a,y,x){return new Jn().add(new Ks(0,.25*x,!1).add(new Wr(bo,.5*y,.75*x)).add(new Wr(bo,y,.25*x)))}),za("LineLeft",function(a,y,x){return new Jn().add(new Ks(.75*y,0,!1).add(new Wr(bo,.25*y,.5*x)).add(new Wr(bo,.75*y,x)))}),za("LineUp",function(a,y,x){return new Jn().add(new Ks(0,.75*x,!1).add(new Wr(bo,.5*y,.25*x)).add(new Wr(bo,y,.75*x)))}),on.um={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};function Dv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=os,this.ir=null,this.jr="",this.lr=so,this.Gq="",this.Hq=Ys,this.Pq=ho,this.Kq=Zo,this.Up=null,this.Cq=127,this.zr=Po,this.yr="gray",this.Vg=4}Dv.prototype.copy=function(){var a=new Dv;return a.zq=this.zq,a.Kp=this.Kp,a.tr=this.tr,a.vr=this.vr,a.ur=this.ur,a.oq=this.oq,a.fr=this.fr,a.hr=this.hr,a.gr=this.gr.J(),a.ir=this.ir,a.jr=this.jr,a.lr=this.lr.J(),a.Gq=this.Gq,a.Hq=this.Hq.J(),a.Pq=this.Pq.J(),a.Kq=this.Kq.J(),a.Up=this.Up,a.Cq=this.Cq,a.zr=this.zr.J(),a.yr=this.yr,a.Vg=this.Vg,a};function ki(a,y){a===void 0||a instanceof ra||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 _n,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}nt(ki,Gn),ki.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},st=ki.prototype,st.Af=function(a){Gn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},st.toString=function(){var a=Nn(this.constructor)+"#"+Ar(this);return this.data!==null&&(a+="("+si(this.data)+")"),a};function yl(a){a.P===null?a.P=new Dv:a.P.nc&&(a.P=a.P.copy())}st.th=function(){Gn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},st.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===cs&&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))},st.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)}},ki.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},ki.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},ki.prototype.bh=function(a,y){if(y!==null){var x=null,b=this.Qf;if(b!==null&&(x=b.I(a)),x!==y){if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}b===null&&(this.Qf=b=new fi),y.Tf!==a&&(y.category=a),b.add(a,y),a=this.diagram,a!==null&&(a.add(y),a=y.adornedObject,a!==null&&(a=a.ih(),a!==null&&(y.data=a.data)))}}},ki.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},ki.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Un();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);qn(y)}},ki.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}e:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof sr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Xr))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()}},ki.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Rv(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function Px(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function Wm(a){if(cd(a)===!1){Fv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function N1(a){if(a.G|=2097152,cd(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||D1(a,y,x),x=a.Ib;var b=_n.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),_n.free(b),Fv(a,!1)}}ki.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new mr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),this.Lb=te,te.ws()||te.pp(E)},ki.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=Fr;this.locationSpot.sb()&&(te=this.locationSpot);var ne=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)}},ki.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},ki.prototype.moveTo=function(a,y,x){a=Tt.allocAt(a,y),this.move(a,x),Tt.free(a)},ki.prototype.isVisible=function(){if(!this.visible)return!1;var a=this.layer;if(a!==null){if(!a.visible)return!1;if(a=a.diagram,a!==null&&a.animationManager.fv(this))return!0}return a=this.containingGroup,!!(a===null||a.isSubGraphExpanded&&a.isVisible())},ki.prototype.Zb=function(a){var y=this.diagram;a?(this.C(4),this.Wb(),y!==null&&y.De.add(this)):(this.C(8),this.Ej()),this.oh(),y!==null&&(y.Ya(),y.N())},ki.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new fi),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}ki.prototype.mi=function(a){return a===void 0&&(a=new _n),a.assign(this.actualBounds)},ki.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 pr?x.strokeWidth:0;if(y.yi(0,0,b.width+E,b.height+E,a.locationSpot),x!==a)for(y.offset(-E/2,-E/2),x.transform.Ga(y),x=x.panel;x!==null&&x!==a;)x.transform.Ga(y),x=x.panel;return a.Lb!==null&&a.Lb.Ga(y),y.offset(-a.uc.x,-a.uc.y),y}function nf(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=c1(a));var b=a.ag,E=2*b;if(!a.isShadowed)return x.h(y.x-1-b,y.y-1-b,y.width+2+E,y.height+2+E),x;b=y.x,E=y.y;var te=y.width;y=y.height;var ne=a.shadowBlur;return a=a.shadowOffset,te+=ne,y+=ne,b-=ne/2,E-=ne/2,0<a.x?te+=a.x:(b+=a.x,te-=a.x),0<a.y?y+=a.y:(E+=a.y,y-=a.y),x.h(b-1,E-1,te+2,y+2),x}ki.prototype.arrange=function(){if(nl(this)===!1)N1(this);else{Hc(this,!1);var a=this.Ib,y=_n.alloc();y.assign(a);var x=hd(this);this.eh(0,0,this.uc.width,this.uc.height);var b=this.position;D1(this,b,this.location),a.ka(),a.x=b.x,a.y=b.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||on.B(y.width,a.width)&&on.B(y.height,a.height)||0<=this.vw&&this.C(16),_n.free(y),Fv(this,!1)}},st=ki.prototype,st.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=_n.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),_n.free(E)}!(this.G&65536)&&a.D(y)||F1(this,b,x),x.N(),!a.w()&&!y.w()||ma(a,y)||(this instanceof ii&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},st.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 Xr||(y=y.animationManager,y.zb&&Cl(y,a,new Tt(b,E),x))}st.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)},st.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 Xr||Cl(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 ii&&Mh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?hd(a)?(au(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}st.si=function(){return!0},st.Zc=function(){return!0},st.ph=function(){return!1},st.Dd=function(){return!0};function Bv(a,y,x,b){y.constructor===a.constructor||H1||(H1=!0,kn('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),kn(" Old class: "+Nn(a.constructor)+", new class: "+Nn(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var te=a.isSelected,ne=a.isHighlighted,ae=!0,fe=!0,_e=!1;a instanceof ii&&(ae=a.isTreeLeaf,fe=a.isTreeExpanded,_e=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=b,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,b=!0,y!==null&&(b=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=E,a.G=te?a.G|4096:a.G&-4097,a.G=ne?a.G|524288:a.G&-524289,a instanceof ii&&(a.U=ae?a.U|4:a.U&-5,a.U=fe?a.U|1:a.U&-2,a.U=_e?a.U|2:a.U&-3),E!==null&&a.La(),E=a.layerName,E!==x&&(a.Jg=x,a.layerName=E),y!==null&&(y.skipsUndoManager=b),a.Zc()&&a.C(64)}ki.prototype.canCopy=function(){if(!this.copyable)return!1;var a=this.layer;return a===null?!0:a.allowCopy?(a=a.diagram,a===null?!0:!!a.allowCopy):!1},ki.prototype.canDelete=function(){if(!this.deletable)return!1;var a=this.layer;return a===null?!0:a.allowDelete?(a=a.diagram,a===null?!0:!!a.allowDelete):!1},ki.prototype.canEdit=function(){if(!this.textEditable)return!1;var a=this.layer;return a===null?!0:a.allowTextEdit?(a=a.diagram,a===null?!0:!!a.allowTextEdit):!1},ki.prototype.canGroup=function(){if(!this.groupable)return!1;var a=this.layer;return a===null?!0:a.allowGroup?(a=a.diagram,a===null?!0:!!a.allowGroup):!1},ki.prototype.canMove=function(){if(!this.movable)return!1;var a=this.layer;return a===null?!0:a.allowMove?(a=a.diagram,a===null?!0:!!a.allowMove):!1},ki.prototype.canReshape=function(){if(!this.reshapable)return!1;var a=this.layer;return a===null?!0:a.allowReshape?(a=a.diagram,a===null?!0:!!a.allowReshape):!1},ki.prototype.canResize=function(){if(!this.resizable)return!1;var a=this.layer;return a===null?!0:a.allowResize?(a=a.diagram,a===null?!0:!!a.allowResize):!1},ki.prototype.canRotate=function(){if(!this.rotatable)return!1;var a=this.layer;return a===null?!0:a.allowRotate?(a=a.diagram,a===null?!0:!!a.allowRotate):!1},ki.prototype.canSelect=function(){if(!this.selectable)return!1;var a=this.layer;return a===null?!0:a.allowSelect?(a=a.diagram,a===null?!0:!!a.allowSelect):!1};function cd(a){return(a.G&32768)!==0}function Fv(a,y){a.G=y?a.G|32768:a.G&-32769}function jv(a,y){a.G=y?a.G|65536:a.G&-65537}function hd(a){return(a.G&131072)!==0}st=ki.prototype,st.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}st.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},st.N=function(){var a=this.diagram;a!==null&&!nl(this)&&!cd(this)&&this.isVisible()&&this.Ib.w()&&a.N(nf(this,this.Ib))},st.v=function(){Gn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof ii&&this.labeledLink!==null&&tl(this.labeledLink),a.$b(!0))},st.Vo=function(a){a||(a=this.Ah,a!==null&&Zv(a,this))},st.Wo=function(a){a||(a=this.Ah,a!==null&&Kv(a,this))},st.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},st.oz=function(){return zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof ii&&(y=y.labeledLink,y!==null)?zv(a,y):0}st.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof ii&&(x=y.labeledLink,x!==null)?j1(a,x):y}st.Td=function(a){return a instanceof sr?Hv(this,this,a):!1};function Hv(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!Hv(a,b,x)?y instanceof ii&&(y=y.labeledLink,y!==null)?Hv(a,y,x):!1:!0}st.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof sr&&Zm(y,!0),y instanceof ii){var x=y.labeledLink;x!==null&&(y=x)}y=y.containingGroup}for(x=null,y=a;y!==null;){if(y.G&1048576){x=y;break}y instanceof ii&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof sr&&Zm(y,!1),y instanceof ii&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},ki.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof ii&&this.isLinkLabel)},ki.prototype.C=function(a){if(a===void 0&&(a=16777215),this.isLayoutPositioned&&a&this.layoutConditions){var y=this.layer;y!==null&&y.isTemporary||this instanceof ii&&this.isLinkLabel?y=!1:(y=this.diagram,y=!(y!==null&&y.undoManager.isUndoingRedoing))}else y=!1;if(y)if(y=this.Ah,y!==null){var x=y.layout;x!==null?x.C():y.C(a)}else a=this.diagram,a!==null&&(a=a.layout,a!==null&&a.C())};function z1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function dd(a,y,x,b,E,te){if(te===void 0&&(te=null),!(a.contains(y)||te!==null&&!te(y)||y instanceof Xr)){if(a.add(y),y instanceof ii){if(x&&y instanceof sr)for(var ne=y.memberParts;ne.next();)dd(a,ne.value,x,b,E,te);if(E!==!1)for(ne=y.linksConnected;ne.next();){var ae=ne.value;if(!a.contains(ae)){var fe=ae.fromNode,_e=ae.toNode;fe=fe===null||a.contains(fe),_e=_e===null||a.contains(_e),(E?fe&&_e:fe||_e)&&dd(a,ae,x,b,E,te)}}if(1<b)for(y=y.Ou();y.next();)dd(a,y.value,x,b-1,E,te)}else if(y instanceof $n)for(y=y.labelNodes;y.next();)dd(a,y.value,x,b,E,te)}}Je.Object.defineProperties(ki.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?ir: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(cs,"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 Xr?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:ho},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:Zo},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:Ys},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 Xr)){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 Xr?this instanceof Xr&&(E=this.adornedPart,E!==null&&(a=E.Qf,a!==null&&a.remove(y),E.bh(this.category,this))):(te=x.model,te.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(b,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(Ru(x),x=x.copy(),x!==null&&Bv(this,x,y,a))):(te!==null&&te.jm(b,a),x=dS(x.partManager,b,a),x!==null&&(Ru(x),x=x.copy(),x===null||x instanceof $n||(b=this.location.copy(),Bv(this,x,y,a),this.location.w()||(this.location=b)))),E!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",E,y))))}}},self:{get:function(){return this},set:function(a){Bv(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var b=!1;if(x!==null){b=x.skipsUndoManager,x.skipsUndoManager=!0;var E=x.selection;E.ka(),a?E.add(this):E.remove(this),E.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=b)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(yl(this),this.P.oq=a,this.g("highlightedChanged",y,a))}},selectionObjectName:{get:function(){return this.P!==null?this.P.vr:""},set:function(a){var y=this.selectionObjectName;y!==a&&(yl(this),this.P.vr=a,this.Ug=null,this.g("selectionObjectName",y,a))}},selectionAdornmentTemplate:{get:function(){return this.P!==null?this.P.tr:null},set:function(a){var y=this.selectionAdornmentTemplate;y!==a&&(yl(this),this.P.tr=a,this.g("selectionAdornmentTemplate",y,a))}},selectionObject:{get:function(){if(this.Ug===null){var a=this.selectionObjectName;a!==null&&a!==""?(a=this.fb(a),a!==null?this.Ug=a:this.Ug=this):this instanceof $n?(a=this.path,a!==null?this.Ug=a:this.Ug=this):this.Ug=this}return this.Ug}},selectionChanged:{get:function(){return this.P!==null?this.P.ur:null},set:function(a){var y=this.selectionChanged;y!==a&&(yl(this),this.P.ur=a,this.g("selectionChanged",y,a))}},resizeAdornmentTemplate:{get:function(){return this.P!==null?this.P.fr:null},set:function(a){var y=this.resizeAdornmentTemplate;y!==a&&(yl(this),this.P.fr=a,this.g("resizeAdornmentTemplate",y,a))}},resizeObjectName:{get:function(){return this.P!==null?this.P.hr:""},set:function(a){var y=this.resizeObjectName;y!==a&&(yl(this),this.P.hr=a,this.g("resizeObjectName",y,a))}},resizeObject:{get:function(){var a=this.resizeObjectName;return a!==""&&(a=this.fb(a),a!==null)?a:this}},resizeCellSize:{get:function(){return this.P!==null?this.P.gr:os},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:so},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 sr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Zv(a,this):this instanceof sr&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var b=this.data,E=x.model;if(b!==null&&E.Xj()){var te=E.wa(a!==null?a.data:null);E.mp(b,te)}}if(b=this.containingGroupChanged,b!==null&&(E=!0,x!==null&&(E=x.aa,x.aa=!0),b(this,y,a),x!==null&&(x.aa=E)),this instanceof sr){for(x=new On,dd(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof ii)for(b=b.linksConnected;b.next();)xp(b.value)}if(this instanceof ii){for(x=this.linksConnected;x.next();)xp(x.value);x=this.labeledLink,x!==null&&xp(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Nu(y,-1,a))}}else 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 ii&&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:Po},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))}}}),ki.prototype.invalidateLayout=ki.prototype.C,ki.prototype.findCommonContainingGroup=ki.prototype.px,ki.prototype.isMemberOf=ki.prototype.Td,ki.prototype.findTopLevelPart=ki.prototype.sz,ki.prototype.findSubGraphLevel=ki.prototype.oz,ki.prototype.ensureBounds=ki.prototype.Va,ki.prototype.getDocumentBounds=ki.prototype.mi,ki.prototype.findObject=ki.prototype.fb,ki.prototype.moveTo=ki.prototype.moveTo,ki.prototype.invalidateAdornments=ki.prototype.Wb,ki.prototype.clearAdornments=ki.prototype.Ej,ki.prototype.removeAdornment=ki.prototype.Jf,ki.prototype.addAdornment=ki.prototype.bh,ki.prototype.findAdornment=ki.prototype.Pj,ki.prototype.updateTargetBindings=ki.prototype.La;var H1=!1;ki.className="Part",ki.LayoutNone=0,ki.LayoutAdded=1,ki.LayoutRemoved=2,ki.LayoutShown=4,ki.LayoutHidden=8,ki.LayoutNodeSized=16,ki.LayoutGroupLayout=32,ki.LayoutNodeReplaced=64,ki.LayoutStandard=127,ki.LayoutAll=16777215;function Xr(a,y){a===void 0||a instanceof ra||typeof a=="string"?ki.call(this,a):(ki.call(this),a&&(y=a)),this.G&=-257,this.Jg="Adornment",this.ue=null,this.Aw=0,this.Uw=!1,this.j=this.$a=null,y&&Object.assign(this,y)}nt(Xr,ki),Xr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Xr.prototype.updateRelationshipsFromData=function(){},Xr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof $n&&y instanceof pr){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 pr&&(E.ua=a)}}},Xr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!nl(a))},Xr.prototype.Zc=function(){return!1},Xr.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===cs&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Gn&&this.$a.rg(b)&&(this.$a=null));ki.prototype.gk.call(this,a,y,x,b,E,te,ne)},Xr.prototype.updateAdornments=function(){},Xr.prototype.Lj=function(){},Je.Object.defineProperties(Xr.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}}}),Xr.className="Adornment";function Uv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Ha,this.er=$m,this.Kr=this.ij=this.Nq=this.Mq=null}Uv.prototype.copy=function(){var a=new Uv;return a.Dq=this.Dq,a.Eq=this.Eq,a.gj=this.gj,a.Vr=this.Vr,a.yp=this.yp.J(),a.er=this.er,a.Mq=this.Mq,a.Nq=this.Nq,a.ij=this.ij,a.Kr=this.Kr,a};function ii(a,y){a===void 0||a instanceof ra||typeof a=="string"?ki.call(this,a):(ki.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new In,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}nt(ii,ki),ii.prototype.cloneProtected=function(a){ki.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},st=ii.prototype,st.Af=function(a){ki.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Rh(a){a.Ba===null?a.Ba=new Uv:a.Ba.nc&&(a.Ba=a.Ba.copy())}st.th=function(){ki.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function U1(a,y){y!==null&&(a.af===null&&(a.af=new On),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}st.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=G1(this,a,y,x),a!==null&&a.Sl()},st.gk=function(a,y,x,b,E,te,ne){a===vs&&y==="elements"?this.wc=null:a===cs&&y==="elements"&&(this.wc=null),ki.prototype.gk.call(this,a,y,x,b,E,te,ne)},st.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(zl(x.fromPort),zl(x.toPort),x.bb())}};function W1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(zl(x.fromPort),zl(x.toPort),x.bb())}}function zl(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||zl(y.port)}}st.si=function(){return!0},ii.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},ii.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},ii.prototype.isVisible=function(){if(!ki.prototype.isVisible.call(this))return!1;var a=!0,y=kh,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===kh){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Js){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===op&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(b){return!b.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},ii.prototype.Zb=function(a){ki.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var b=x.To(this);b===null||b.Td(this.containingGroup)||x.bb()}x.Zb(a)}},ii.prototype.qx=function(){var a=new On,y=new On;return Z1(this,this,a,y),y.iterator};function Z1(a,y,x,b){if(y!==null&&!x.has(y)){x.add(y);var E=!0,te=a.diagram;te!==null&&(E=te.isTreePathToChildren),y.linksConnected.each(function(ne){ne.isTreeLink?(E?ne.fromNode===y:ne.toNode===y)&&Z1(a,E?ne.toNode:ne.fromNode,x,b):b.add(ne)})}}ii.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Wi(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},st=ii.prototype,st.Mo=function(a){a===void 0&&(a=null);var y=new Wi(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},st.Sd=function(a){a===void 0&&(a=null);var y=new Wi(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},st.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 On,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 On,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Fi(x):ir},st.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 On,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Fi(x):ir},st.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 On,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Fi(x):ir},st.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Wi(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},st.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new Wi(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){zl(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){zl(x);var b=a.jb.remove(y),E=null;if(b||y.toNode===y.fromNode){var te=a.linkDisconnected;if(E=a.diagram,te!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),te(a,y,x),E!==null&&(E.aa=ne)}}b&&y.isTreeLink&&(x=!0,E!==null&&(x=E.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,E!==null&&E.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):Sg(y)))}function Sg(a){if(a.ci=!1,a.jb.count!==0){var y=!0,x=a.diagram;if(x===null||!x.undoManager.isUndoingRedoing){for(x!==null&&(y=x.isTreePathToChildren),x=a.jb.iterator;x.next();){var b=x.value;if(b.isTreeLink){if(y){if(b.fromNode===a){a.isTreeLeaf=!1;return}}else if(b.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}ii.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},st=ii.prototype,st.Vo=function(a){ki.prototype.Vo.call(this,a),a||(Sg(this),a=this.Yk,a!==null&&eS(a,this))},st.Wo=function(a){ki.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},st.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var b=x.value;y?a.remove(b):(b.fromNode===this&&(b.fromNode=null),b.toNode===this&&(b.toNode=null))}}this.labeledLink=null,ki.prototype.Lj.call(this)},st.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 fi: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=Un()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);qn(x)}}}st.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},st.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}},st.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},st.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},st.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof ii)return a;a=this.diagram,a=a!==null?a.isTreePathToChildren:!0;for(var y=this.jb.iterator;y.next();){var x=y.value;if(x.isTreeLink&&(x=a?x.fromNode:x.toNode,x!==this))return this.ci=x}return this.ci=null},st.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 On;return a(this,y),y},st.uz=function(){return $1(this,this)};function $1(a,y){return y=y.pg(),y===null?0:1+$1(a,y)}st.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Wi(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},st.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 In,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 In,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Fi(x):ir},st.wz=function(a){a===void 0&&(a=1/0);var y=new On;return dd(y,this,!1,a,!0),y},ii.prototype.collapseTree=function(a){a===void 0&&(a=1),1>a&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new On;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}ii.prototype.expandTree=function(a){a===void 0&&(a=2),2>a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new On;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(ii.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:$m},set:function(a){var y=this.portSpreading;y!==a&&(Rh(this),this.Ba.er=a,this.g("portSpreading",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.Bd())}},avoidable:{get:function(){return(this.U&8)!==0},set:function(a){var y=(this.U&8)!==0;if(y!==a){this.U^=8;var x=this.diagram;x!==null&&Mh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Ha},set:function(a){typeof a=="number"&&(a=new Ci(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))}}}),ii.prototype.expandTree=ii.prototype.expandTree,ii.prototype.collapseTree=ii.prototype.collapseTree,ii.prototype.findTreeParts=ii.prototype.wz,ii.prototype.findTreeChildrenNodes=ii.prototype.Ou,ii.prototype.findTreeChildrenLinks=ii.prototype.Qo,ii.prototype.findTreeLevel=ii.prototype.uz,ii.prototype.findTreeParentChain=ii.prototype.vz,ii.prototype.findTreeParentNode=ii.prototype.pg,ii.prototype.findTreeParentLink=ii.prototype.kh,ii.prototype.findCommonTreeParent=ii.prototype.gz,ii.prototype.findTreeRoot=ii.prototype.xz,ii.prototype.isInTreeOf=ii.prototype.Nz,ii.prototype.findPort=ii.prototype.ns,ii.prototype.findLinksTo=ii.prototype.kz,ii.prototype.findLinksBetween=ii.prototype.jz,ii.prototype.findNodesInto=ii.prototype.Oo,ii.prototype.findNodesOutOf=ii.prototype.Po,ii.prototype.findNodesConnected=ii.prototype.Mu,ii.prototype.findLinksInto=ii.prototype.Sd,ii.prototype.findLinksOutOf=ii.prototype.Mo,ii.prototype.findExternalTreeLinksConnected=ii.prototype.qx,ii.prototype.invalidateConnectedLinks=ii.prototype.Bd,ii.prototype.invalidateLinkBundle=ii.prototype.Lz;var _x=new Pn(ii,"SpreadingNone",10),$m=new Pn(ii,"SpreadingEvenly",11),Wv=new Pn(ii,"SpreadingPacked",12);ii.className="Node",ii.SpreadingNone=_x,ii.SpreadingEvenly=$m,ii.SpreadingPacked=Wv;function sr(a,y){a===void 0||a instanceof ra||typeof a=="string"?ii.call(this,a):(ii.call(this),a&&(y=a)),this.U|=4608,this.Gn=new On,this.$a=null,this.Sc=new es,this.Sc.group=this,this.gl=new On,this.tb=this.$p=null,y&&Object.assign(this,y)}nt(sr,ii),sr.prototype.cloneProtected=function(a){ii.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof 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())},st=sr.prototype,st.Af=function(a){ii.prototype.Af.call(this,a);var y=a.Rj();for(a=a.memberParts;a.next();){var x=a.value;if(x.v(),x.C(8),x.Ej(),x instanceof ii)x.Bd(y);else if(x instanceof $n)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},st.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===cs&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Gn&&this.$a.rg(b)&&(this.$a=null));ii.prototype.gk.call(this,a,y,x,b,E,te,ne)},st.Xl=function(a,y){ii.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 _n),a.mi(this.tb),a instanceof pr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},st.eh=function(a,y,x,b){this.nf=this.$a,ii.prototype.eh.call(this,a,y,x,b)},st.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof $n||y.Va()}),ii.prototype.Va.call(this)},st.si=function(){if(!ii.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof ii){if(y.isVisible()&&nl(y))return!1}else if(y instanceof $n&&y.isVisible()&&nl(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Zv(a,y){if(a.Gn.add(y)){y instanceof sr&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof $n&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Kv(a,y){if(a.Gn.remove(y)){y instanceof sr&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof $n&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}st.Lj=function(){if(0<this.Gn.count){var a=this.diagram;if(a!==null)for(var y=this.Gn.copy().iterator;y.next();)a.remove(y.value)}ii.prototype.Lj.call(this)},sr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Cn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},sr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=Cn(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},sr.prototype.canUngroup=function(){if(!this.ungroupable)return!1;var a=this.layer;return a===null||!a.allowUngroup?!1:(a=a.diagram,!!(a===null||a.allowUngroup))},st=sr.prototype,st.Bd=function(a){var y=(this.U&65536)!==0;if(ii.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var b=x.fromNode;b!==null&&b!==this&&b.Td(this)&&!b.isVisible()?(zl(x.fromPort),zl(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(zl(x.fromPort),zl(x.toPort),x.bb()))}}},st.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 On,b=y.iterator;b.next();){var E=b.value;if(E instanceof ii)for(E=E.linksConnected;E.next();){var te=E.value;y.contains(te)||x.add(te)}}return a&&(this.$p=x),x.iterator},st.iz=function(){var a=this.Rj();a.add(this);for(var y=new On,x=a.iterator;x.next();){var b=x.value;if(b instanceof ii)for(b=b.linksConnected;b.next();){var E=b.value,te=E.fromNode;te===null||a.contains(te)&&te!==this||y.add(te),E=E.toNode,E===null||a.contains(E)&&E!==this||y.add(E)}}return y.iterator},st.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new On;return a(this,y),y},st.Rj=function(){var a=new On;return dd(a,this,!0,0,!0),a.remove(this),a},st.Zb=function(a){ii.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},sr.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();Q1(this,y,a,this),a.Ue=!1}};function Q1(a,y,x,b){for(var E=a.memberParts;E.next();){var te=E.value;if(te.Zb(!1),te instanceof sr&&te.isSubGraphExpanded&&(te.wasSubGraphExpanded=te.isSubGraphExpanded,Q1(te,y,x,b)),te instanceof ii)te.Bd(y),x.Aj(te,b);else if(te instanceof $n)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!1}sr.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();q1(this,y,a,this),a.Ue=!1}};function q1(a,y,x,b){for(var E=a.memberParts;E.next();){var te=E.value;if(te.Zb(!0),te instanceof sr&&te.wasSubGraphExpanded&&(te.wasSubGraphExpanded=!1,q1(te,y,x,b)),te instanceof ii)te.Bd(y),x.Cj(te,b);else if(te instanceof $n)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!0}sr.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,b=x.x;x=x.y;var E=a.x,te=a.y;if(!(b===E||isNaN(b)&&isNaN(E))||!(x===te||isNaN(x)&&isNaN(te))){for(b=E-(isNaN(b)?0:b),x=te-(isNaN(x)?0:x),te=Tt.alloc(),ii.prototype.move.call(this,a,y),a=new On,y=this.Rj().iterator;y.next();)E=y.value,E instanceof $n&&(E.suspendsRouting&&a.add(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(E.suspendsRouting=!0);for(y.reset();y.next();)if(E=y.value,!(E.ph()||E instanceof ii&&E.isLinkLabel)){var ne=E.position,ae=E.location;ne.w()?(te.x=ne.x+b,te.y=ne.y+x,E.position=te):ae.w()&&(te.x=ae.x+b,te.y=ae.y+x,E.location=te)}for(y.reset();y.next();)E=y.value,E instanceof $n&&(E.suspendsRouting=a.contains(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(ne=E.position,te.x=ne.x+b,te.y=ne.y+x,te.w()?E.move(te):E.bb(),$v(E)&&E.bb());Tt.free(te)}},Je.Object.defineProperties(sr.prototype,{placeholder:{get:function(){return this.$a}},computesBoundsAfterDrag:{get:function(){return(this.U&2048)!==0},set:function(a){var y=(this.U&2048)!==0;y!==a&&(this.U^=2048,this.g("computesBoundsAfterDrag",y,a))}},computesBoundsIncludingLinks:{get:function(){return(this.U&4096)!==0},set:function(a){var y=(this.U&4096)!==0;y!==a&&(this.U^=4096,this.g("computesBoundsIncludingLinks",y,a))}},computesBoundsIncludingLocation:{get:function(){return(this.U&8192)!==0},set:function(a){var y=(this.U&8192)!==0;y!==a&&(this.U^=8192,this.g("computesBoundsIncludingLocation",y,a))}},handlesDragDropForMembers:{get:function(){return(this.U&16384)!==0},set:function(a){var y=(this.U&16384)!==0;y!==a&&(this.U^=16384,this.g("handlesDragDropForMembers",y,a))}},memberParts:{get:function(){return this.Gn.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;if(y!==a){a!==null&&a.diagram!==null&&a.diagram.layout===a&&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)}}}),sr.prototype.expandSubGraph=sr.prototype.expandSubGraph,sr.prototype.collapseSubGraph=sr.prototype.collapseSubGraph,sr.prototype.findSubGraphParts=sr.prototype.Rj,sr.prototype.findContainingGroupChain=sr.prototype.hz,sr.prototype.findExternalNodesConnected=sr.prototype.iz,sr.prototype.findExternalLinksConnected=sr.prototype.Lu,sr.prototype.ensureBounds=sr.prototype.Va,sr.className="Group";function rl(a){en.call(this),this.yb=ba,this.ko=new _n(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}nt(rl,en),rl.prototype.cloneProtected=function(a){en.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 Lr(0,0,y.width,y.height,a.x,a.y)},rl.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof sr||a instanceof Xr)||At("Placeholder is not inside a Group or Adornment."),a instanceof sr){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Cs(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 pr&&(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"?Ys:a.locationSpot,Tt.alloc()),a.location=ae,Tt.free(ae)),isNaN(_e)||isNaN(ne)?(a=te.ga(Ys,Tt.alloc()),_e=_n.allocAt(a.x,a.y,0,0),_e.Ye(te.ga(ka,a)),_e.Ye(te.ga(xl,a)),_e.Ye(te.ga(Oa,a)),Cs(y,_e.width+b||0,_e.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),Tt.free(a),_n.free(_e)):(Cs(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 sr&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var E=x.toolManager.findTool("Dragging");if(E===x.currentTool&&(x=E.computeBorder(y,this.ko,a),x!==null))return x}x=_n.alloc(),E=this.computeMemberBounds(x);var te=this.yb;return y instanceof sr&&!y.isSubGraphExpanded?a.h(E.x-te.left,E.y-te.top,0,0):a.h(E.x-te.left,E.y-te.top,Math.max(E.width+te.left+te.right,0),Math.max(E.height+te.top+te.bottom,0)),_n.free(x),b&&y instanceof sr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},rl.prototype.computeMemberBounds=function(a){if(!(this.part instanceof sr))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,b=1/0,E=-1/0,te=-1/0,ne=y.memberParts;ne.next();){var ae=ne.value;if(ae.isVisible()){if(ae instanceof $n&&(!y.computesBoundsIncludingLinks||tu(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 Ci(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),rl.className="Placeholder";function $n(a){ki.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 In().freeze(),this.Tg=this.Mg=null,this.ml=new _n,this.ua=new Jn,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($n,ki),$n.prototype.cloneProtected=function(a){ki.prototype.cloneProtected.call(this,a),a.Qa=this.Qa&-113,a.ff=this.ff,a.gn=this.gn,a.vf=this.vf,a.uo=this.uo,a.qk=this.qk,a.Om=this.Om,a.Qm=this.Qm,a.Rm=this.Rm,a.qj=this.qj,a.po=this.po,this.ba!==null&&(a.ba=this.ba.copy())},st=$n.prototype,st.Af=function(a){ki.prototype.Af.call(this,a),this.ff=a.ff,this.vf=a.vf,a.Mg=null,a.bb(),a.Sf=this.Sf;var y=a.fromPort;y!==null&&zl(y),a=a.toPort,a!==null&&zl(a)},st.qb=function(a){a.classType===$n?(a.value&2)===2?this.routing=a:a===iu||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):ki.prototype.qb.call(this,a)},st.Xc=function(){this.ba===null&&(this.ba=new lg)},st.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)))},st.zv=function(){return!1},st.Av=function(){},st.Zc=function(){return!1},$n.prototype.computeAngle=function(a,y,x){return $n.computeAngle(y,x)},$n.computeAngle=function(a,y){switch(a){default:case ol:a=0;break;case Cg:a=y;break;case Pg:a=y+90;break;case _g:a=y-90;break;case Qv:a=y+180;break;case n0:a=on.bp(y),90<a&&270>a&&(a-=180);break;case Eg:a=on.bp(y+90),90<a&&270>a&&(a-=180);break;case Lg:a=on.bp(y-90),90<a&&270>a&&(a-=180);break;case i0:if(a=on.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return on.bp(a)};function xp(a){var y=a.fromNode,x=a.toNode,b=null;if(y!==null?b=x!==null?y.px(x):y.containingGroup:x!==null?b=x.containingGroup:b=null,y=b,x=a.Ah,x!==y){x!==null&&Kv(x,a),a.Ah=y,y!==null&&Zv(y,a);var E=a.containingGroupChanged;if(E!==null){var te=!0,ne=a.diagram;ne!==null&&(te=ne.aa,ne.aa=!0),E(a,x,y),ne!==null&&(ne.aa=te)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=b}st=$n.prototype,st.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&ki.prototype.oh.call(this)},st.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},st.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function eS(a,y){a.wd===null&&(a.wd=new On),a.wd.add(y),a.v()}st.Vo=function(a){if(ki.prototype.Vo.call(this,a),rf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Km(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Km(x,this,b)}xg(this)}},st.Wo=function(a){if(ki.prototype.Wo.call(this,a),rf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Vm(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Vm(x,this,b)}wg(this)}},st.Lj=function(){if(this.fd=!0,this.wd!==null){var a=this.diagram;if(a!==null)for(var y=this.wd.copy().iterator;y.next();)a.remove(y.value)}this.data!==null&&(a=this.diagram,a!==null&&a.partManager.removeDataForLink(this))},$n.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},$n.prototype.move=function(a,y){var x=y?this.location:this.position,b=x.x;isNaN(b)&&(b=0);var E=x.y;for(isNaN(E)&&(E=0),b=a.x-b,E=a.y-E,y===!0?ki.prototype.move.call(this,a,!1):(a=Tt.allocAt(x.x+b,x.y+E),ki.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)},$n.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},$n.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},$n.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign($o),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()===iu))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()===iu){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return on.ax(x.x,x.y,b.x,b.y,b.x,b.y,E.x,E.y,a),a}if(b=(y-1)/3|0,x=3*(b/2|0),b%2===1){b=this.i(x),E=this.i(x+1);var te=this.i(x+2);x=this.i(x+3),on.ax(b.x,b.y,E.x,E.y,te.x,te.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var ne=this.flattenedLengths;for(x=this.flattenedTotalLength,E=te=b=0;b<x/2&&te<y&&(E=ne[te],!(b+E>x/2));)b+=E,te++;return y=this.i(te),te=this.i(te+1),1>Math.abs(y.x-te.x)?y.y>te.y?a.h(y.x,y.y-(x/2-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-te.y)?y.x>te.x?a.h(y.x-(x/2-b),y.y):a.h(y.x+(x/2-b),y.y):(x=(x/2-b)/E,a.h(y.x+x*(te.x-y.x),y.y+x*(te.y-y.y))),a},$n.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(a===2)return this.i(0).ab(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===iu))return this.ua.wx(.5);if(this.computeCurve()===iu&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var b=this.i(x+2);return x=this.i(x+3),on.My(a.x,a.y,y.x,y.y,b.x,b.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,b=this.flattenedTotalLength;var E=0;x=0;for(var te;E<b/2&&x<a&&(te=y[x],!(E+te>b/2));)E+=te,x++;if(y=this.i(x),b=this.i(x+1),1>Math.abs(y.x-b.x)&&1>Math.abs(y.y-b.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-b.x))return y.y>b.y?270:90;if(1>Math.abs(y.y-b.y))return y.x>b.x?180:0}return y.ab(b)},st=$n.prototype,st.i=function(a){return this.Nb.s[a]},st.dd=function(a,y){this.Nb.cd(a,y)},st.L=function(a,y,x){this.Nb.cd(a,new Tt(y,x))},st.Kz=function(a,y){this.Nb.Gb(a,y)},st.m=function(a,y,x){this.Nb.Gb(a,new Tt(y,x))},st.ne=function(a){this.Nb.add(a)},st.yf=function(a,y){this.Nb.add(new Tt(a,y))},st.pv=function(a){this.Nb.mb(a)},st.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 In,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&&Fo(ne.animationManager,a,E),a.g("points",te,E)}}st.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},st.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&&Fo(x.animationManager,this,y),Ym(this),this.g("points",a,y)}},st.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))}st.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())}},st.vg=function(){if(!this.fd&&!this.computingPoints){var a=!0;try{this.computingPoints=!0,this.uh(),a=this.computePoints()}catch(y){this.computingPoints=!1,this.rv()}finally{this.computingPoints=!1,a?this.zf():this.rv()}}},$n.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Nf||(Nf=new ii,Nf.desiredSize=er,Nf.Va()),this.defaultFromPoint&&(Nf.location=this.defaultFromPoint,Nf.Va(),y=a=Nf)):y=this.fromPort,y!==null&&!a.isVisible()){var x=a.findVisibleNode();x!==null&&x!==a?(a=x,y=x.port):a=x}if(this.Lw=a,a===null||!a.location.w())return!1;for(;!(y===null||y.actualBounds.w()&&y.Ed());)y=y.panel;if(y===null)return!1;var b=this.toNode,E=null;if(b===null?(Of||(Of=new ii,Of.desiredSize=er,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===iu;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,ot=te.y+fe/3,ft=tt,It=ot;on.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),ft=(0>fe?-1:1)*Fe+tt,It=Me*(ft-tt)+ot),tt=te.x+2*ae/3,ot=te.y+2*fe/3;var Mt=tt,Ht=ot;on.B(fe,0)?Ht=0<ae?Ht-_e:Ht+_e:(Mt=(0>fe?-1:1)*Fe+tt,Ht=Me*(Mt-tt)+ot),this.Fj(),this.ne(te),this.yf(ft,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,on.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=_n.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))),_n.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=ft=ot=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?ot=It:tt===90?ft=It:tt===180?ot=-It:tt===270?ft=-It:(ot=It*Math.cos(tt*Math.PI/180),ft=It*Math.sin(tt*Math.PI/180)),ne.Mc()&&_e&&(It=y.ga(Fr,Tt.alloc()),Mt=Tt.allocAt(It.x+1e3*ot,It.y+1e3*ft),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 Vt=Ht=Mt=0;if(Me||!fe||_e){var Qt=this.computeEndSegmentLength(b,E,x,!1);Vt=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)&&(Vt+=Me?0:30,0>Gt&&(Vt+=180)),0>Vt?Vt+=360:360<=Vt&&(Vt-=360),_e&&(Qt+=Math.abs(Gt)*(Me?1:2)),Vt===0?Mt=Qt:Vt===90?Ht=Qt:Vt===180?Mt=-Qt:Vt===270?Ht=-Qt:(Mt=Qt*Math.cos(Vt*Math.PI/180),Ht=Qt*Math.sin(Vt*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+ot,Fe.y+ft)),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,Vt,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}$n.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)}$n.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 _n(y.ga(Ys,fe),y.ga(ka,_e)),Fe=this.computeSpot(!b,ne);a=this.getLinkPoint(te,ne,Fe,!b,E,a,y,_e),(x.Hf(_u)||x.Hf(Ga))&&a.y>=Me.y&&a.y<=Me.y+Me.height?ae.y=a.y:(x.Hf(Kl)||x.Hf(Wa))&&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},$n.prototype.getLinkDirection=function(a,y,x,b,E,te,ne,ae){e:if(b.sb())var fe=b.x>b.y?b.x>1-b.y?0:b.x<1-b.y?270:315:b.x<b.y?b.x>1-b.y?90:b.x<1-b.y?180:135:.5>b.x?225:.5<b.x?45:0;else{if(b.$c()&&(fe=Xm(this,y),fe!==null))switch(fe.Nc){case 1:fe=270;break e;case 2:fe=180;break e;default:case 4:fe=0;break e;case 8:fe=90;break e}fe=y.ga(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},$n.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Xm(this,y),a!==null)?a.Ju:(a=b?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=b?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},$n.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Fr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===so?ms:y)):(a=y||this.toPort,a===null?a=Fr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===so?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}$n.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))},$n.prototype.computeShortLength=function(a){if(a){if(a=this.fromShortLength,isNaN(a)){var y=this.fromPort;y!==null&&(a=y.fromShortLength)}return isNaN(a)?0:a}return a=this.toShortLength,isNaN(a)&&(y=this.toPort,y!==null&&(a=y.toShortLength)),isNaN(a)?0:a},$n.prototype.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=mr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&mr.free(ne),!0;if(this.Yc(a,ne)){var ae=!1;if(!this.isAtomic)for(var fe=this.O.s,_e=fe.length;_e--;){var 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=mr.alloc(),Fe.set(ne),Me instanceof Gn)ae=Me.Cf(a,y,x,b,E,Fe);else if(this.path===Me){if(Me instanceof pr)if(ae=a,Ye=b,Me.pickable===!1)ae=!1;else if(Fe.multiply(Me.transform),Ye)e:{var tt=ae,ot=Fe;if(Me.fh(tt,ot))ae=!0;else{if(ot===void 0&&(ot=Me.transform,tt.Re(Me.actualBounds))){ae=!0;break e}ae=tt.left,Ye=tt.right;var ft=tt.top;tt=tt.bottom;var It=Tt.alloc(),Mt=Tt.alloc(),Ht=Tt.alloc(),Gt=mr.alloc();Gt.set(ot),Gt.bv(Me.transform),Gt.Vj(),Mt.x=Ye,Mt.y=ft,Mt.transform(Gt),It.x=ae,It.y=ft,It.transform(Gt),ot=!1,tf(Me,It,Mt,Ht)?ot=!0:(It.x=Ye,It.y=tt,It.transform(Gt),tf(Me,It,Mt,Ht)?ot=!0:(Mt.x=ae,Mt.y=tt,Mt.transform(Gt),tf(Me,It,Mt,Ht)?ot=!0:(It.x=ae,It.y=ft,It.transform(Gt),tf(Me,It,Mt,Ht)&&(ot=!0)))),mr.free(Gt),Tt.free(It),Tt.free(Mt),Tt.free(Ht),ae=ot}}else ae=Me.fh(ae,Fe)}else ae=aa(Me,a,b,Fe);ae&&(Ye=Me,y!==null&&(Ye=y(Me)),Ye&&(x===null||x(Ye))&&E.add(Ye)),mr.free(Fe)}}}return te===void 0&&mr.free(ne),ae||this.background!==null||this.areaBackground!==null}return te===void 0&&mr.free(ne),!1},$n.prototype.computeCurve=function(){if(this.Wf===null){var a=this.fromPort,y=this.isOrthogonal;this.Wf=a!==null&&a===this.toPort&&!y}return this.Wf?iu:this.curve},$n.prototype.computeCorner=function(){if(this.curve===iu)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},$n.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if(E!==a&&!E.isPanelMain&&(E.segmentIndex===-1/0||isNaN(E.segmentIndex)))return E}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},$n.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=rS;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var b=this.findMidLabel();if(b!==null){var E=b.naturalBounds,te=b.margin,ne=isNaN(E.width)?30:E.width*b.scale+te.left+te.right;E=isNaN(E.height)?14:E.height*b.scale+te.top+te.bottom,b=b.segmentOrientation,b===Cg||b===n0||b===Qv?a=Math.max(a,E):b===_g||b===Lg||b===Pg||b===Eg?a=Math.max(a,ne):(y=y.ga(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===iu&&(a*=1.333)}}return a},$n.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===ol&&x.bb()}},$n.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=iS;var y=this.Sf;if(y!==null){for(var x=Un(),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),qn(x)}}return a},$n.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},$n.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},$n.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===e0)return!1;E===t0&&(E=bg)}switch(E){case e0:var te=this.i(a),ne=this.i(x);if(!te.Xa(y)||!ne.Xa(b)){E=te.x,te=te.y;var ae=ne.x-E,fe=ne.y-te,_e=Math.sqrt(ae*ae+fe*fe);if(!on.$(_e,0)){if(on.$(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),on.$(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),on.$(y,0)||(on.$(ae,0)?fe=0>fe?-Math.PI/2:Math.PI/2:(fe=Math.atan(fe/Math.abs(ae)),0>ae&&(fe=Math.PI-fe)),ae=fe+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 ot=(Ye-Me)/(fe-ae);tt=Math.sqrt(1+1/(ot*ot))}else ot=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var ft=y.x,It=y.y,Mt=.5;_e!==0&&(Mt=((E-ft)*(E-ne)+(te-It)*(te-Fe))/_e);var Ht=E+Mt*(ne-E),Gt=te+Mt*(Fe-te);y=Math.sqrt((ft-Ht)*(ft-Ht)+(It-Gt)*(It-Gt)),It<ot*(ft-Ht)+Gt&&(y=-y),0<ot&&(y=-y),ft=ae+Mt*(fe-ae),Mt=Me+Mt*(Ye-Me),ot!==0?(y=ft+y/tt,this.L(a,y,Mt-(y-ft)/ot)):this.L(a,ft,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,on.B(E.y,te.y)?on.B(te.x,ne.x)?Me=y.y:on.B(te.y,ne.y)&&(ae=y.x):on.B(E.x,te.x)&&(on.B(te.y,ne.y)?ae=y.x:on.B(te.x,ne.x)&&(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,on.B(E.y,te.y)?on.B(te.x,ne.x)?Me=b.y:on.B(te.y,ne.y)&&(ae=b.x):on.B(E.x,te.x)&&(on.B(te.y,ne.y)?ae=b.x:on.B(te.x,ne.x)&&(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}},$n.prototype.addOrthoPoints=function(a,y,x,b,E,te){0>y?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var ne=b;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;var ae=E.actualBounds.copy(),fe=te.actualBounds.copy();if(ae.w()&&fe.w()){ae.Bc(Mg,Mg),fe.Bc(Mg,Mg),ae.Ye(a),fe.Ye(x);var _e=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 ot=x=null;if(Ye.isVirtualized){Ye=tt.bounds.copy(),Ye.Bc(-tt.Ho,-tt.Go);var ft=Tt.alloc();Cp(tt,a.x,a.y)||(on.Ff(Ye.x,Ye.y,Ye.x+Ye.width,Ye.y+Ye.height,a.x,a.y,_e.x,_e.y,ft)?(x=a=ft.copy(),y=ft.ab(_e)):on.Ff(Ye.x,Ye.y,Ye.x+Ye.width,Ye.y+Ye.height,_e.x,_e.y,Me.x,Me.y,ft)?(x=a=ft.copy(),y=ft.ab(Me)):on.Ff(Ye.x,Ye.y,Ye.x+Ye.width,Ye.y+Ye.height,Me.x,Me.y,Fe.x,Fe.y,ft)&&(x=a=ft.copy(),y=ft.ab(Fe))),Cp(tt,Fe.x,Fe.y)||(on.Ff(Ye.x,Ye.y,Ye.x+Ye.width,Ye.y+Ye.height,Fe.x,Fe.y,Me.x,Me.y,ft)?(ot=Fe=ft.copy(),b=Me.ab(ft)):on.Ff(Ye.x,Ye.y,Ye.x+Ye.width,Ye.y+Ye.height,Me.x,Me.y,_e.x,_e.y,ft)?(ot=Fe=ft.copy(),b=_e.ab(ft)):on.Ff(Ye.x,Ye.y,Ye.x+Ye.width,Ye.y+Ye.height,_e.x,_e.y,a.x,a.y,ft)&&(ot=Fe=ft.copy(),b=a.ab(ft))),Tt.free(ft)}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?on.B(ae.x,ne.x)?(ae=y===0?Math.max(ae.x,a.x):Math.min(ae.x,a.x),this.L(2,ae,a.y),this.L(3,ae,ne.y)):on.B(ae.y,ne.y)?(Math.abs(a.y-ae.y)<=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)&&(on.B(ae.y,ne.y)?(ae=y===90?Math.max(ae.y,a.y):Math.min(ae.y,a.y),this.L(2,a.x,ae),this.L(3,ne.x,ae)):on.B(ae.x,ne.x)?(Math.abs(a.x-ae.x)<=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)),ot!==null&&(b===0||b===180?this.yf(te.x,ot.y):this.yf(ot.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)}},$n.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var te=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(te=this.computeCurviness()),E?(y+b)/2+te:(a+x)/2+te};function $v(a){if(a.diagram===null||!a.isAvoiding||!tp(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=np(a.diagram,!0,a.containingGroup,null);for(var b=1;b<x-2;b++){var E=y[b],te=y[b+1];if(!a.Yj(Math.min(E.x,te.x),Math.min(E.y,te.y),Math.abs(E.x-te.x),Math.abs(E.y-te.y)))return!0}return!1}function Yv(a,y,x,b,E,te,ne){var ae=y.Ho,fe=y.Go,_e=Kc(y,x,b),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)}$n.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},$n.prototype.qc=function(){this.lk=!1,this.v()},$n.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];E!==a&&E.isPanelMain&&E instanceof pr&&(E.ua=this.ua)}}},$n.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&rf(this)&&b.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(b.animationManager.isAnimating||b.currentTool!==b.toolManager)&&(x=!0);var E=this.i(0).copy(),te=E.copy();b=this.Nb.s;var ne=this.computeCurve();if(ne===iu&&3<=y&&!on.$(this.smoothness,0))if(y===3){var ae=this.i(1);b=Math.min(E.x,ae.x);var fe=Math.min(E.y,ae.y);ae=this.i(2),b=Math.min(b,ae.x),fe=Math.min(fe,ae.y)}else{if(this.isOrthogonal)for(fe=0;fe<y;fe++)ae=b[fe],te.x=Math.min(ae.x,te.x),te.y=Math.min(ae.y,te.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),fe=this.i(b),te.x=Math.min(fe.x,te.x),te.y=Math.min(fe.y,te.y);b=te.x,fe=te.y}else{for(fe=0;fe<y;fe++)ae=b[fe],te.x=Math.min(ae.x,te.x),te.y=Math.min(ae.y,te.y);b=te.x,fe=te.y}if(b-=this.su.x,fe-=this.su.y,E.x-=b,E.y-=fe,y!==2||rf(this)){if(a.type=Jn.o,ae=A1(a),this.computeShortLength(!0)!==0&&(E=kf(this,E,!0,te)),Sp(ae,E.x,E.y,!1),ne===iu&&3<=y&&!on.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-fe,E=this.i(2).copy(),E.x-=b,E.y-=fe,this.computeShortLength(!1)!==0&&(E=kf(this,E,!1,te)),Ih(ae,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=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,ot=this.i(Xv(this,_e,Fe,!1));if((!on.$(Ye.x,tt.x)||!on.$(tt.x,ot.x))&&(!on.$(Ye.y,tt.y)||!on.$(tt.y,ot.y))){var ft=Me;isNaN(ft)&&(ft=this.smoothness/3);var It=Ye.x;Ye=Ye.y;var Mt=tt.x;tt=tt.y;var Ht=ot.x;ot=ot.y;var Gt=ft*Qm(It,Ye,Mt,tt);ft*=Qm(Mt,tt,Ht,ot),on.$(Ye,tt)&&on.$(Mt,Ht)&&(Mt>It?ot>tt?(te.x=Mt-Gt,te.y=tt-Gt,E.x=Mt+ft,E.y=tt+ft):(te.x=Mt-Gt,te.y=tt+Gt,E.x=Mt+ft,E.y=tt-ft):ot>tt?(te.x=Mt+Gt,te.y=tt-Gt,E.x=Mt-ft,E.y=tt+ft):(te.x=Mt+Gt,te.y=tt+Gt,E.x=Mt-ft,E.y=tt-ft)),on.$(It,Mt)&&on.$(tt,ot)&&(tt>Ye?(Ht>Mt?(te.x=Mt-Gt,te.y=tt-Gt,E.x=Mt+ft):(te.x=Mt+Gt,te.y=tt-Gt,E.x=Mt-ft),E.y=tt+ft):(Ht>Mt?(te.x=Mt-Gt,te.y=tt+Gt,E.x=Mt+ft):(te.x=Mt+Gt,te.y=tt+Gt,E.x=Mt-ft),E.y=tt-ft)),(on.$(It,Mt)&&on.$(Mt,Ht)||on.$(Ye,tt)&&on.$(tt,ot))&&(It=.5*(It+Ht),Ye=.5*(Ye+ot),te.x=It,te.y=Ye,E.x=It,E.y=Ye),(Fe===1||Fe===2&&on.$(ne.x,this.i(0).x)&&on.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+_e.x),x.y=.5*(ne.y+_e.y)),Ih(ae,x.x-b,x.y-fe,te.x-b,te.y-fe,_e.x-b,_e.y-fe),y.set(te),x.set(E),ne=_e}}_e=ne.x,ne=ne.y,Me=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(Me=kf(this,Me.copy(),!1,Ir)),_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,Ir)),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,Ir)),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),ft=x,on.B(te.y,Ye.y)&&on.B(Ye.x,Mt.x))if(ot=Math.min(ne,Math.abs(Ye.x-E.x)/2),ot=Gt=Math.min(ot,Math.abs(Mt.y-Ye.y)/2),on.B(ot,0))Af(this,ae,Fe,It,te,Ye,ft),te.assign(Ye);else{var Vt=Ye.x,Qt=Ye.y;tt=Vt,Ht=Qt,Ye.x>te.x?Vt=Ye.x-ot:Vt=Ye.x+ot,Mt.y>Ye.y?Ht=Ye.y+Gt:Ht=Ye.y-Gt,Mt=Tt.allocAt(Vt,Qt),Af(this,ae,Fe,It,te,Mt,ft),Tt.free(Mt),Um(ae,Ye.x+Fe,Ye.y+It,tt+Fe,Ht+It),te.h(tt,Ht)}else on.B(te.x,Ye.x)&&on.B(Ye.y,Mt.y)?(ot=Math.min(ne,Math.abs(Ye.y-E.y)/2),ot=Gt=Math.min(ot,Math.abs(Mt.x-Ye.x)/2),on.B(Gt,0)?(Af(this,ae,Fe,It,te,Ye,ft),te.assign(Ye)):(Vt=Ye.x,Qt=Ye.y,tt=Vt,Ht=Qt,Ye.y>te.y?Qt=Ye.y-ot:Qt=Ye.y+ot,Mt.x>Ye.x?tt=Ye.x+Gt:tt=Ye.x-Gt,Mt=Tt.allocAt(Vt,Qt),Af(this,ae,Fe,It,te,Mt,ft),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,ft),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=Jn.j,a.startX=E.x,a.startY=E.y,a.endX=ae.x,a.endY=ae.y;return this.lk=!0,a};function Qm(a,y,x,b){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=b-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),on.$(a,0)?y:on.$(y,0)?a:Math.sqrt(a*a+y*y)))}function kf(a,y,x,b){var E=a.pointsCount;if(2>E)return y;if(x){var te=a.i(1);if(x=te.x-b.x,te=te.y-b.y,b=Qm(y.x,y.y,x,te),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!0),a>E&&(a=E),E=a*(te-y.y)/b,y.x+=a*(x-y.x)/b,y.y+=E}else{if(te=a.i(E-2),x=te.x-b.x,te=te.y-b.y,b=Qm(y.x,y.y,x,te),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!1),a>E&&(a=E),E=a*(y.y-te)/b,y.x-=a*(y.x-x)/b,y.y-=E}return y}function Xv(a,y,x,b){for(var E=a.pointsCount,te=y;on.$(y.x,te.x)&&on.$(y.y,te.y);){if(x>=E)return E-1;te=a.i(x++)}if(!on.$(y.x,te.x)&&!on.$(y.y,te.y))return x-1;for(var ne=te;on.$(y.x,te.x)&&on.$(te.x,ne.x)&&(!b||(y.y>=te.y?te.y>=ne.y:te.y<=ne.y))||on.$(y.y,te.y)&&on.$(te.y,ne.y)&&(!b||(y.x>=te.x?te.x>=ne.x:te.x<=ne.x));){if(x>=E)return E-1;ne=a.i(x++)}return x-2}$n.prototype.computeJumpLength=function(){return 10};function Af(a,y,x,b,E,te,ne){if(!ne&&rf(a)){ne=a.computeJumpLength();var ae=ne/2,fe=[],_e=0;if(a.isVisible()&&(_e=Ex(a,E,te,fe)),0<_e){if(on.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 ot=te.y+b;a.curve===Fh?Sp(y,tt,ot,!1):Ih(y,Ye,Fe,tt,Fe,tt,ot)}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(on.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,ot=te.x+x,Fe+=b,a.curve===Fh?Sp(y,ot,Fe,!1):Ih(y,tt,Ye,tt,Fe,ot,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 $n){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=on.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,ot=ne.x;ne=ne.y;var ft=_e.x,It=_e.y;if(on.B(Me,Ye)){if(!on.B(Fe,tt)&&on.B(ne,It)&&Math.min(Fe,tt)<ne&&Math.max(Fe,tt)>ne&&Math.min(ot,ft)<Me&&Math.max(ot,ft)>Me&&!on.B(ot,ft)){ae.x=Me,ae.y=ne,Me=!0;break e}}else if(on.B(Fe,tt)&&on.B(ot,ft)&&Math.min(Me,Ye)<ot&&Math.max(Me,Ye)>ot&&Math.min(ne,It)<Fe&&Math.max(ne,It)>Fe&&!on.B(ne,It)){ae.x=ot,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()))}$n.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var b=!1;for(x=x.layers;x.next();){var E=x.value;if(E.visible){if(E===y){b=!0;var te=!1;E=E.Pa.s;for(var ne=E.length,ae=0;ae<ne;ae++){var fe=E[ae];fe instanceof $n&&(fe===this?te=!0:te&&tS(this,fe,a))}}else if(b)for(te=E.Pa.s,E=te.length,ne=0;ne<E;ne++)ae=te[ne],ae instanceof $n&&tS(this,ae,a)}}}}};function tS(a,y,x){if(y!==null&&y.lk&&y.fd&&rf(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}$n.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var b=this.i(0),E=a.i(0);if(b.Xa(E)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||b.Xa(a)||y.Xa(E)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},$n.prototype.isVisible=function(){if(!ki.prototype.isVisible.call(this))return!1;var a=this.containingGroup,y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this.fromNode,x!==null){if(this.isTreeLink&&y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(var b=x;b!==null;){if(b.labeledLink===this)return!0;b=b.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},$n.prototype.Zb=function(a){if(ki.prototype.Zb.call(this,a),a&&qm(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},$n.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?bg:this.qk};function xg(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var b=a.ff,E=a.vf,te=a=null,ne=y.jb.s,ae=ne.length,fe=0;fe<ae;fe++){var _e=ne[fe];(_e.ef===y&&_e.ff===b&&_e.uf===x&&_e.vf===E||_e.ef===x&&_e.ff===E&&_e.uf===y&&_e.vf===b)&&(te===null?te=_e:(a===null&&(a=[],a.push(te)),a.push(_e)))}if(a!==null){for(te=G1(y,x,b,E),te===null&&(te=new r0(y,b,x,E),U1(y,te),U1(x,te)),te.links=a,y=0;y<a.length;y++)a[y].Sf=te;te.Sl()}}}}function wg(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(Qn(y.links,a),y.Sl()))}$n.prototype.ph=function(){return!0},Je.Object.defineProperties($n.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&Vm(y,this,x),wg(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setFromNodeForLink(this,a,y);var E=this.fromPort,te=this.fromPortChanged;if(te!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),te(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.uf!==a&&Km(a,this,E),xg(this),this.C(1)),this.g("fromNode",y,a),xp(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&zl(x),wg(this),this.ff=a;var b=this.fromPort;b!==null&&zl(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&&zl(x),wg(this),this.vf=a;var b=this.toPort;b!==null&&zl(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:so},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&&zl(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&&Sn(a,">= 0",$n,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),this.bb())}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:NaN},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.qc(),this.g("fromShortLength",y,a))}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:so},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&&zl(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&&Sn(a,">= 0",$n,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),this.bb())}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:NaN},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.qc(),this.g("toShortLength",y,a))}},isLabeledLink:{get:function(){return this.wd===null?!1:0<this.wd.count}},labelNodes:{get:function(){return this.wd===null?ir: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 pr?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()===iu&&3<=b&&!this.isOrthogonal)if(E=this.i(0),y=E.x,x=E.y,a.h(y,x,0,0),b===3){b=this.i(1),y=Math.min(b.x,y),x=Math.min(b.y,x);var te=this.i(2);y=Math.min(te.x,y),x=Math.min(te.y,x),on.Dl(E.x,E.y,b.x,b.y,b.x,b.y,te.x,te.y,.5,a)}else for(te=3;te<b;te+=3){var ne=this.i(te-2);te+3>=b&&(te=b-1);var ae=this.i(te-1),fe=this.i(te);on.Dl(E.x,E.y,ne.x,ne.y,ae.x,ae.y,fe.x,fe.y,.5,a),y=Math.min(fe.x,y),x=Math.min(fe.y,x),E=fe}else for(E=this.i(0),te=this.i(1),y=Math.min(E.x,te.x),x=Math.min(E.y,te.y),a.h(E.x,E.y,0,0),a.Ye(te),E=2;E<b;E++)te=this.i(E),y=Math.min(te.x,y),x=Math.min(te.y,x),a.Ye(te);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new 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);on.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):on.$(b.y,E.y)?(b=E.x-b.x,0>b&&(b=-b)):b=Math.sqrt(b.Bf(E)),a.push(b)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,b=a=0;b<x;b++)a+=y[b];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var b=a.length%2===0;if(b){for(var E=0;E<a.length;E++)if(typeof a[E]!="number"||isNaN(a[E])){b=!1;break}}if(b)for(x=new In,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(!Zt(te)||typeof te.x!="number"||isNaN(te.x)||typeof te.y!="number"||isNaN(te.y)){b=!1;break}}if(b)for(x=new In,b=0;b<a.length;b++)E=a[b],x.add(new Tt(E.x,E.y).freeze())}}else if(a instanceof In)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&&Fo(a.animationManager,this,x)),this.g("points",y,x)}}},pointsCount:{get:function(){return this.Nb.count}},fd:{get:function(){return(this.Qa&16)!==0},set:function(a){(this.Qa&16)!==0!==a&&(this.Qa^=16)}},suspendsRouting:{get:function(){return(this.Qa&32)!==0},set:function(a){(this.Qa&32)!==0!==a&&(this.Qa^=32)}},computingPoints:{get:function(){return(this.Qa&64)!==0},set:function(a){(this.Qa&64)!==0!==a&&(this.Qa^=64)}},defaultFromPoint:{get:function(){return this.o},set:function(a){this.o=a.copy()}},defaultToPoint:{get:function(){return this.u},set:function(a){this.u=a.copy()}},isOrthogonal:{get:function(){return(this.qj.value&2)===2}},isAvoiding:{get:function(){return(this.qj.value&4)===4}},lk:{get:function(){return(this.Qa&128)!==0},set:function(a){(this.Qa&128)!==0!==a&&(this.Qa^=128)}},geometry:{get:function(){if(!this.lk){if(this.vg(),2>this.pointsCount)return this.lk=!0,this.ua;this.ua=this.makeGeometry()}return this.ua}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!wp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!wp(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.qk},set:function(a){var y=this.qk;y!==a&&(this.qk=a,this.g("adjusting",y,a))}},corner:{get:function(){return this.Om},set:function(a){var y=this.Om;y!==a&&(this.Om=a,this.qc(),this.g("corner",y,a))}},curve:{get:function(){return this.Qm},set:function(a){var y=this.Qm;y!==a&&(this.Qm=a,this.bb(),this.qc(),qm(this,y===Fh||y===bp||a===Fh||a===bp),this.g("curve",y,a))}},curviness:{get:function(){return this.Rm},set:function(a){var y=this.Rm;y!==a&&(this.Rm=a,this.bb(),this.qc(),this.g("curviness",y,a))}},routing:{get:function(){return this.qj},set:function(a){var y=this.qj;y!==a&&(this.qj=a,this.Wf=null,this.bb(),qm(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),$n.prototype.invalidateOtherJumpOvers=$n.prototype.Xo,$n.prototype.findClosestSegment=$n.prototype.ez,$n.prototype.updateRoute=$n.prototype.vg,$n.prototype.invalidateRoute=$n.prototype.bb,$n.prototype.rollbackRoute=$n.prototype.rv,$n.prototype.commitRoute=$n.prototype.zf,$n.prototype.startRoute=$n.prototype.uh,$n.prototype.clearPoints=$n.prototype.Fj,$n.prototype.removePoint=$n.prototype.pv,$n.prototype.addPointAt=$n.prototype.yf,$n.prototype.addPoint=$n.prototype.ne,$n.prototype.insertPointAt=$n.prototype.m,$n.prototype.insertPoint=$n.prototype.Kz,$n.prototype.setPointAt=$n.prototype.L,$n.prototype.setPoint=$n.prototype.dd,$n.prototype.getPoint=$n.prototype.i,$n.prototype.getOtherPort=$n.prototype.Cz,$n.prototype.getOtherNode=$n.prototype.To;var Nf=null,Of=null,Jv=new Pn($n,"Normal",1),Mx=new Pn($n,"Orthogonal",2),Tx=new Pn($n,"AvoidsNodes",6),nS=new Pn($n,"AvoidsNodesStraight",7),ol=new Pn($n,"None",0),iu=new Pn($n,"Bezier",9),Fh=new Pn($n,"JumpGap",10),bp=new Pn($n,"JumpOver",11),bg=new Pn($n,"End",17),e0=new Pn($n,"Scale",18),t0=new Pn($n,"Stretch",19),Cg=new Pn($n,"OrientAlong",21),Pg=new Pn($n,"OrientPlus90",22),_g=new Pn($n,"OrientMinus90",23),Qv=new Pn($n,"OrientOpposite",24),n0=new Pn($n,"OrientUpright",25),Eg=new Pn($n,"OrientPlus90Upright",26),Lg=new Pn($n,"OrientMinus90Upright",27),i0=new Pn($n,"OrientUpright45",28),iS=16,rS=14,Mg=8;$n.className="Link",$n.Normal=Jv,$n.Orthogonal=Mx,$n.AvoidsNodes=Tx,$n.AvoidsNodesStraight=nS,$n.None=ol,$n.Bezier=iu,$n.JumpGap=Fh,$n.JumpOver=bp,$n.End=bg,$n.Scale=e0,$n.Stretch=t0,$n.OrientAlong=Cg,$n.OrientPlus90=Pg,$n.OrientMinus90=_g,$n.OrientOpposite=Qv,$n.OrientUpright=n0,$n.OrientPlus90Upright=Eg,$n.OrientMinus90Upright=Lg,$n.OrientUpright45=i0,$n.EndSegmentStep=8,$n.CurvinessStart=iS,$n.SpacingMin=rS,$n.OrthoShortCut=Mg;function r0(a,y,x,b){wr(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){wr(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=Un(),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);qn(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 _n(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(){wr(this),this.port=this.node=null,this.pe=[],this.ap=!1}If.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var b=a[x];b!==null&&(y+=`
|
|
|
`+b.toString())}return y};function kx(a,y,x,b){switch(y=y.offsetY,y){case 8:return 90;case 2:return 180;case 1:return 270;case 4:return 0}switch(y){case 9:return 180<x?270:90;case 6:return 90<x&&270>=x?180:0}switch(a=180*Math.atan2(a.height,a.width)/Math.PI,y){case 3:return x>a&&x<=180+a?180:270;case 5:return x>180-a&&x<=360-a?270:0;case 12:return x>a&&x<=180+a?90:0;case 10:return x>180-a&&x<=360-a?180:90;case 7:return 90<x&&x<=180+a?180:x>180+a&&x<=360-a?270:0;case 13:return 180<x&&x<=360-a?270:x>a&&180>=x?90:0;case 14:return x>a&&x<=180-a?90:x>180-a&&270>=x?180:0;case 11:return x>180-a&&x<=180+a?180:x>180+a?270:90}return b&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}If.prototype.Sl=function(){this.pe.length=0};function lS(a,y){var x=a.pe;if(x.length===0){e:if(!a.ap){x=a.ap,a.ap=!0;var b=null,E=a.node,te=E instanceof sr?E:null;if(te===null||te.isSubGraphExpanded)var ne=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!te.actualBounds.w()){a.ap=x;break e}b=te,ne=b.Lu()}te=a.pe.length=0;var ae=a.port.ga(Ys,Tt.alloc()),fe=a.port.ga(ka,Tt.alloc());for(E=_n.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(Ys,ae),Fe.ga(xl,fe),Fe.ga(ka,ne),Fe.ga(Oa,_e),tt=Ye=Me=Fe=0,b===Wv)for(var ot=0;ot<te.length;ot++){var ft=te[ot];if(ft!==null){var It=ft.link.computeThickness();switch(ft.Nc){case 8:Ye+=It;break;case 2:tt+=It;break;case 1:Fe+=It;break;default:case 4:Me+=It}}}var Mt=ot=0,Ht=1,Gt=ft=0;for(It=0;It<te.length;It++){var Vt=te[It];if(Vt!==null){if(ot!==Vt.Nc){switch(ot=Vt.Nc,ot){case 8:var Qt=ne;Mt=_e;break;case 2:Qt=_e,Mt=ae;break;case 1:Qt=ae,Mt=fe;break;default:case 4:Qt=fe,Mt=ne}switch(ft=Mt.x-Qt.x,Gt=Mt.y-Qt.y,ot){case 8:Ye>Math.abs(ft)?(Ht=Math.abs(ft)/Ye,Ye=Math.abs(ft)):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(ft)?(Ht=Math.abs(ft)/Fe,Fe=Math.abs(ft)):Ht=1;break;default:case 4:Me>Math.abs(Gt)?(Ht=Math.abs(Gt)/Me,Me=Math.abs(Gt)):Ht=1}Mt=0}var fn=Vt.Zo;if(b===Wv){switch(Vt=Vt.link.computeThickness(),Vt*=Ht,fn.set(Qt),ot){case 8:fn.x=Qt.x+ft/2+Ye/2-Mt-Vt/2;break;case 2:fn.y=Qt.y+Gt/2+tt/2-Mt-Vt/2;break;case 1:fn.x=Qt.x+ft/2-Fe/2+Mt+Vt/2;break;default:case 4:fn.y=Qt.y+Gt/2-Me/2+Mt+Vt/2}Mt+=Vt}else{var ni=.5;b===$m&&(ni=(Vt.Uo+1)/(Vt.Gl+1)),fn.x=Qt.x+ft*ni,fn.y=Qt.y+Gt*ni}}}for(Tt.free(ae),Tt.free(fe),Tt.free(ne),Tt.free(_e),Qt=a.pe,te=0;te<Qt.length;te++)b=Qt[te],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,_n.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){wr(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=Nn(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 Oo(this)},es.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof dn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof sr?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 On;a instanceof dn?(fd(this,y,a.nodes,!0,this.rh,!0,!1,!0),fd(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof sr?fd(this,y,a.memberParts,!1,this.rh,!0,!1,!0):y.addAll(a.iterator),0<y.count&&(a=this.diagram,a!==null&&a.Ea("Layout"),this.doMinimalNoNetworkLayout(y),a!==null&&a.eb("Layout")),this.isValidLayout=!0},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 sr&&(ae.rh=!1),b+=Math.max(_e,50)+20,ne=Math.max(ne,Math.max(fe,50)),te>=y-1?(te=0,b=x,E+=ne+20,ne=0):te++}},es.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,b=this.arrangementOrigin.y,E=0,te=0,ne=this.network.vertexes.iterator;ne.next();){var ae=ne.value.node;if(!(ae===null||ae instanceof $n)&&(kg(ae),this.rh(ae))){var fe=ae.measuredBounds,_e=fe.width;fe=fe.height,ae.moveTo(x,b),ae instanceof sr&&(ae.rh=!1),x+=Math.max(_e,50)+20,te=Math.max(te,Math.max(fe,50)),E>=a-1?(E=0,x=y,b+=te+20,te=0):E++}}},es.prototype.rh=function(a){return!!(!a.location.w()||a instanceof sr&&a.rh)};function fd(a,y,x,b,E,te,ne,ae){for(x=x.iterator;x.next();){var fe=x.value;b&&!fe.isTopLevel||E!==null&&!E(fe)||!fe.canLayout()||(te&&fe instanceof ii?fe.isLinkLabel||(fe instanceof sr&&fe.layout===null?fd(a,y,fe.memberParts,!1,E,te,ne,ae):(kg(fe),y.add(fe))):ne&&fe instanceof $n?y.add(fe):!ae||!fe.Zc()||fe instanceof ii||(kg(fe),y.add(fe)))}}function kg(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}es.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new _n),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},es.prototype.ex=function(a){var y=new On;return a instanceof dn?(fd(this,y,a.nodes,!0,null,!0,!0,!0),fd(this,y,a.links,!0,null,!0,!0,!0),fd(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof sr?fd(this,y,a.memberParts,!1,null,!0,!0,!0):fd(this,y,a.iterator,!1,null,!0,!0,!0),y},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(Ys),(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 Oo(a){wr(this),this.Sc=a,this.wf=new On,this.ye=new On,this.Es=new fi,this.zs=new fi}Oo.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 On,this.ye=new On,this.Es=new fi,this.zs=new fi},Oo.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},Oo.prototype.createVertex=function(){return new oa(this)},Oo.prototype.createEdge=function(){return new Hl(this)},Oo.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(ne){if(ne instanceof ii)return!ne.isLinkLabel;if(ne instanceof $n){var ae=ne.fromNode;return ae===null||ae.isLinkLabel?!1:(ne=ne.toNode,!(ne===null||ne.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof ii&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof sr&&b.layout===null)this.lg(b.memberParts,!1);else if(this.ki(b)===null){var E=this.createVertex();E.node=b,this.dh(E)}}}for(a.reset();a.next();)if(b=a.value,b instanceof $n&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)&&this.Lo(b)===null){var te=b.fromNode;E=b.toNode,te!==null&&E!==null&&te!==E&&(te=this.findGroupVertex(te),E=this.findGroupVertex(E),te!==null&&E!==null&&this.Zj(te,E,b))}}},Oo.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},st=Oo.prototype,st.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},st.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},st.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}st.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},st.ki=function(a){return a===null?null:this.Es.I(a)},st.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}}st.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},st.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))}st.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},st.Lo=function(a){return a===null?null:this.zs.I(a)},st.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},st.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))}},st.Ko=function(){for(var a=Un(),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]);qn(a)},Oo.prototype.deleteArtificialVertexes=function(){for(var a=Un(),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=Un(),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]);qn(a),qn(y)};function Ax(a){for(var y=Un(),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]);qn(y)}Oo.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new In;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))}}Oo.prototype.dz=function(){for(var a=new On,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(Oo.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}}}),Oo.prototype.findAllParts=Oo.prototype.dz,Oo.prototype.splitIntoSubNetworks=Oo.prototype.Zx,Oo.prototype.deleteSelfEdges=Oo.prototype.Ko,Oo.prototype.reverseEdge=Oo.prototype.gm,Oo.prototype.linkVertexes=Oo.prototype.Zj,Oo.prototype.findEdge=Oo.prototype.Lo,Oo.prototype.deleteLink=Oo.prototype.Yy,Oo.prototype.deleteEdge=Oo.prototype.Mj,Oo.prototype.addLink=Oo.prototype.Dy,Oo.prototype.addEdge=Oo.prototype.Bo,Oo.prototype.findVertex=Oo.prototype.ki,Oo.prototype.deleteNode=Oo.prototype.Zy,Oo.prototype.deleteVertex=Oo.prototype.Iu,Oo.prototype.addNode=Oo.prototype.Bl,Oo.prototype.addVertex=Oo.prototype.dh,Oo.prototype.addParts=Oo.prototype.lg,Oo.className="LayoutNetwork";function oa(a){wr(this),this.ob=a,this.j=new _n(0,0,10,10).freeze(),this.o=new Tt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new In,this.mg=new In}oa.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new In,this.mg=new In},oa.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Ar(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},oa.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Zt(x)?(x.x=y.x,x.y=y.y,x.width=y.width,x.height=y.height):a.bounds=y.copy()}else if(a=this.node,a!==null){if(y=this.bounds,!(a instanceof sr)){x=_n.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)),_n.free(x);return}_n.free(x)}a.moveTo(y.x,y.y)}},oa.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},oa.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},oa.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},oa.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(oa.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=_n.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),_n.free(x),!(a instanceof sr)&&(a=a.locationObject.ga(Fr),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(te/2,b/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new On,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new On,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new On,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 In,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}}}),oa.prototype.deleteDestinationEdge=oa.prototype.Jl,oa.prototype.addDestinationEdge=oa.prototype.zl,oa.prototype.deleteSourceEdge=oa.prototype.Kl,oa.prototype.addSourceEdge=oa.prototype.Cl,oa.className="LayoutVertex",oa.standardComparer=oy,oa.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 Hl(a){wr(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Hl.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Hl.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Ar(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},Hl.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Hl.prototype.commit=function(){},Hl.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Je.Object.defineProperties(Hl.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)}}}),Hl.prototype.getOtherVertex=Hl.prototype.Ax,Hl.className="LayoutEdge";function xa(a){es.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Xn(NaN,NaN).freeze(),this.tf=new Xn(10,10).freeze(),this.Jb=Ag,this.Rb=l0,this.nd=Ng,this.hd=cS,a&&Object.assign(this,a)}nt(xa,es),xa.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},xa.prototype.qb=function(a){a.classType===xa?a===Ng||a===c0||a===sy||a===u0?this.sorting=a:a===l0||a===uc?this.arrangement=a:a===Ag||a===a0?this.alignment=a:At("Unknown enum value: "+a):es.prototype.qb.call(this,a)},xa.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var b=x.value;if(!b.ph()||b.fromNode===null&&b.toNode===null){if(b.Va(),b instanceof sr)for(b=b.memberParts;b.next();)y.remove(b.value)}else y.remove(b)}var E=y.Fa();if(E.length!==0){switch(this.sorting){case u0:E.reverse();break;case Ng:E.sort(this.comparer);break;case c0:E.sort(this.comparer),E.reverse()}var te=this.wrappingColumn;isNaN(te)&&(te=0);var ne=this.wrappingWidth;switch(isNaN(ne)&&a!==null?(y=a.padding,ne=Math.max(a.viewportBounds.width-y.left-y.right,0)):ne=Math.max(this.wrappingWidth,0),0>=te&&0>=ne&&(te=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),b=[],this.alignment){case a0:var ae=y,fe=x,_e=_n.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 ot=tt=this.arrangementOrigin.x,ft=this.arrangementOrigin.y,It=0,Mt=0,Ht=0;Ht<E.length;Ht++){var Gt=E[Ht],Vt=this.ni(Gt,_e),Qt=Math.ceil((Vt.width+ae)/Me)*Me,fn=Math.ceil((Vt.height+fe)/Fe)*Fe;switch(Ye){case uc:var ni=Math.abs(ot-Vt.width);break;default:ni=ot+Vt.width}switch((0<te&&It>te-1||0<ne&&0<It&&ni-tt>ne)&&(b.push(new _n(0,ft,ne+ae,Mt)),It=0,ot=tt,ft+=Mt,Mt=0),Mt=Math.max(Mt,fn),Ye){case uc:Vt=-Vt.width;break;default:Vt=0}switch(Gt.moveTo(ot+Vt,ft),Ye){case uc:ot-=Qt;break;default:ot+=Qt}It++}b.push(new _n(0,ft,ne+ae,Mt)),_n.free(_e);break;case Ag:for(fe=ne,Me=te,Fe=y,Ye=x,ne=_n.alloc(),tt=Math.max(this.cellSize.width,1),te=ft=_e=0,ae=Tt.alloc(),ot=0;ot<E.length;ot++)Mt=E[ot],It=this.ni(Mt,ne),Mt=Dh(Mt,Mt.locationObject,Mt.locationSpot,ae),_e=Math.max(_e,Mt.x),ft=Math.max(ft,It.width-Mt.x),te=Math.max(te,Mt.y);switch(ot=this.arrangement,ot){case uc:_e+=Fe;break;default:ft+=Fe}tt=isFinite(tt)?Math.max(tt+Fe,1):Math.max(_e+ft,1);var di=Mt=this.arrangementOrigin.x;for(Ht=this.arrangementOrigin.y,ft=0,fe>=_e&&(fe-=_e),_e=Gt=0,Qt=Math.max(this.cellSize.height,1),Vt=te=0,fn=!0,It=Tt.alloc(),ni=0;ni<E.length;ni++){var li=E[ni],Vn=this.ni(li,ne),Dn=Dh(li,li.locationObject,li.locationSpot,ae);if(0<ft)switch(ot){case uc:di=(di-Mt-(Vn.width-Dn.x))/tt,di=on.$(Math.round(di),di)?Math.round(di):Math.floor(di),di=di*tt+Mt;break;default:di=(di-Mt+Dn.x)/tt,di=on.$(Math.round(di),di)?Math.round(di):Math.ceil(di),di=di*tt+Mt}else switch(ot){case uc:Gt=di+Dn.x+Vn.width;break;default:Gt=di-Dn.x}switch(ot){case uc:var tr=-(di+Dn.x)+Gt;break;default:tr=di+Vn.width-Dn.x-Gt}if(0<Me&&ft>Me-1||0<fe&&0<ft&&tr>fe){for(b.push(new _n(0,fn?Ht-te:Ht,fe+Fe,Vt+te+Ye)),di=0;di<ft&&ni!==ft;di++){tr=E[ni-ft+di];var Vi=Dh(tr,tr.locationObject,tr.locationSpot,It);tr.moveTo(tr.position.x,tr.position.y+te-Vi.y)}Vt+=Ye,Ht=fn?Ht+Vt:Ht+(Vt+te),ft=Vt=te=0,di=Mt,fn=!1}switch(di===Mt&&(_e=ot===uc?Math.max(_e,Vn.width-Dn.x):Math.min(_e,-Dn.x)),te=Math.max(te,Dn.y),Vt=Math.max(Vt,Vn.height-Dn.y),isFinite(Qt)&&(Vt=Math.max(Vt,Math.max(Vn.height,Qt)-Dn.y)),fn?li.moveTo(di-Dn.x,Ht-Dn.y):li.moveTo(di-Dn.x,Ht),ot){case uc:di-=Dn.x+Fe;break;default:di+=Vn.width-Dn.x+Fe}ft++}if(b.push(new _n(0,Ht,fe+Fe,(fn?Vt:Vt+te)+Ye)),E.length!==ft)for(fe=0;fe<ft;fe++)Me=E[E.length-ft+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),ot===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);_n.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}},xa.prototype.commitLayers=function(){};function cS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Je.Object.defineProperties(xa.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0<a||isNaN(a))&&(this.zo=a,this.isViewportSized=isNaN(a),this.C())}},wrappingColumn:{get:function(){return this.yo},set:function(a){this.yo!==a&&(0<a||isNaN(a))&&(this.yo=a,this.C())}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||(this.yg.assign(a),this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf.D(a)||(this.tf.assign(a),this.C())}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb===a||a!==Ag&&a!==a0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==l0&&a!==uc||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==sy&&a!==u0&&a!==Ng&&a!==c0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var a0=new Pn(xa,"Position",0),Ag=new Pn(xa,"Location",1),l0=new Pn(xa,"LeftToRight",2),uc=new Pn(xa,"RightToLeft",3),sy=new Pn(xa,"Forward",4),u0=new Pn(xa,"Reverse",5),Ng=new Pn(xa,"Ascending",6),c0=new Pn(xa,"Descending",7);xa.className="GridLayout",xa.standardComparer=cS,xa.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),y=y.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(var x=0;x<a.length;x++)if(y[x]!==""&&y[x]!==void 0){var b=parseFloat(a[x]),E=parseFloat(y[x]);if(isNaN(b))if(isNaN(E)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},xa.Position=a0,xa.Location=Ag,xa.LeftToRight=l0,xa.RightToLeft=uc,xa.Forward=sy,xa.Reverse=u0,xa.Ascending=Ng,xa.Descending=c0;function So(){this.On=new On,this.Dn=new On,this.Pa=new On,this.cf=new fi,this.bf=new fi,this.aj=new fi,this.H=null,this.tp=!1}st=So.prototype,st.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},st.Xe=function(a){this.H=a},st.oi=function(a){if(a instanceof ii){if(this.On.add(a),a instanceof sr){var y=a.containingGroup;y===null?this.H.ai.add(a):y.gl.add(a),y=a.layout,y!==null&&(y.diagram=this.H)}}else a instanceof $n?this.Dn.add(a):a instanceof Xr||this.Pa.add(a);y=a.data,y===null||a instanceof Xr||(a instanceof $n?this.bf.add(y,a):this.cf.add(y,a))},st.pc=function(a){if(a.Ej(),a instanceof ii){if(this.On.remove(a),a instanceof sr){var y=a.containingGroup;y===null?this.H.ai.remove(a):y.gl.remove(a),y=a.layout,y!==null&&(y.diagram=null)}}else a instanceof $n?this.Dn.remove(a):a instanceof Xr||this.Pa.remove(a);y=a.data,y===null||a instanceof Xr||(a instanceof $n?this.bf.remove(y):this.cf.remove(y))},st.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,b=y.key;(!x.Zc()||x instanceof sr)&&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 sr||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 $n||At('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Un(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=Un(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=Un(),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]);qn(y),qn(x),qn(a)}},So.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},So.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)}}So.prototype.insertLink=function(){return null},So.prototype.resolveReferencesForData=function(){},So.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,kn('No Group template found for category "'+x+'"'),kn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,kn('No Node template found for category "'+x+'"'),kn(" Using default node template")),y=a.ny))),y}So.prototype.getLinkCategoryForData=function(){return""},So.prototype.setLinkCategoryForData=function(){},So.prototype.setFromNodeForLink=function(){},So.prototype.setToNodeForLink=function(){},So.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,kn('No Link template found for category "'+a+'"'),kn(" Using default link template")),x=y.my)),x},So.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},So.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},So.prototype.ip=function(a){a=this.Lc(a),a!==null&&(rd(this.diagram,a,!1),this.unresolveReferencesForPart(a))},So.prototype.unresolveReferencesForPart=function(){},So.prototype.removeDataForLink=function(){},So.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},So.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof ii?a:null)},So.prototype.findLinkForKey=function(){return null},st=So.prototype,st.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},st.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof ii?a:null)},st.Kc=function(a){return a===null?null:this.bf.I(a)},st.ms=function(a){for(var y=0;y<arguments.length;++y);y=new On;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(Zt(ne)&&ay(this,E,ne)){y.add(b);break}}}return y.iterator},st.ls=function(a){for(var y=0;y<arguments.length;++y);y=new On;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(Zt(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(rn(te)){if(!rn(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(Zt(y)&&Zt(x)){if(!ay(a,y,x))return!1}else if(y!==x)return!1;return!0}So.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===Ko){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"&&Zt(ne)&&hS(this,ne),y.isModified=!0}else if(x===cs){var ae=a.oldValue;b==="nodeDataArray"&&Zt(ae)&&this.ip(ae),y.isModified=!0}else x===Za&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===Ko){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===cs){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 ot=tt[a];if(Me)Tm(ot,Ye,Fe,!0);else if(!(0>Fe)){var ft=Fe+fg(ot);ot.pc(ft,!0),wv(ot,ft,Fe)}}y.isModified=!0}}finally{y.aa=!0}}}}},So.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)},So.prototype.rp=function(){for(var a=this.H.model,y=new On,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()},So.prototype.refreshDataBoundLinks=function(){},So.prototype.updateRelationshipsFromData=function(){},So.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=Un()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);qn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(rn(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(rn(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}}}}So.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new fi;if(rn(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 On;for(var te=new fi,ne=b.iterator;ne.next();){var ae=ne.value;if(ae instanceof $n)a||ae.fromNode!==null&&ae.toNode!==null||E.add(ae);else if(ae instanceof ii&&ae.data!==null&&x.Tl()){var fe=ae;ae=ne.key;var _e=ae.pg();_e!==null&&(_e=b.I(_e),_e!==null?(x.qe(fe.data,x.wa(_e.data)),fe=y.Kc(fe.data),ae=ae.kh(),ae!==null&&fe!==null&&te.add(ae,fe)):x.qe(fe.data,void 0))}}if(0<E.count&&y.Is(E,!1),0<te.count)for(x=te.iterator;x.next();)b.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var Me=new fi;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 ki))return null;if(te.isSelected=!1,te.isHighlighted=!1,b.add(y,te),y instanceof ii){for(var ne=y.linksConnected;ne.next();){var ae=ne.value;if(ae.fromNode===y){var fe=b.I(ae);fe!==null&&(fe.fromNode=te)}ae.toNode===y&&(ae=b.I(ae),ae!==null&&(ae.toNode=te))}if(y instanceof sr&&te instanceof sr)for(y=y.memberParts;y.next();)ne=h0(a,y.value,x,b,E),ne instanceof $n||ne===null||(ne.containingGroup=te)}else if(y instanceof $n&&te instanceof $n)for(ne=y.fromNode,ne!==null&&(ne=b.I(ne),ne!==null&&(te.fromNode=ne)),ne=y.toNode,ne!==null&&(ne=b.I(ne),ne!==null&&(te.toNode=ne)),y=y.labelNodes;y.next();)ne=h0(a,y.value,x,b,E),ne!==null&&ne instanceof ii&&(ne.labeledLink=te);return te}So.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof $n||(b=E.copyNodeData(b),Zt(b)&&(E.xf(b),x=y.Lc(b)))}else Ru(a),x=a.copy(),x!==null&&(E=this.H,y!==null?y.add(x):b!==null&&E!==null&&E.commandHandler!==null&&E.commandHandler.copiesClipboardData&&(y=E.model,E=null,x instanceof $n||(E=y.copyNodeData(b)),Zt(E)&&(x.data=E)));return x},Je.Object.defineProperties(So.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}}}),So.prototype.updateAllRelationshipsFromData=So.prototype.rp,So.prototype.findLinksByExample=So.prototype.ls,So.prototype.findNodesByExample=So.prototype.ms,So.prototype.findLinkForData=So.prototype.Kc,So.prototype.findNodeForData=So.prototype.ii,So.prototype.findPartForData=So.prototype.Lc,So.prototype.findNodeForKey=So.prototype.Vb,So.prototype.removeModeledPart=So.prototype.ip,So.prototype.removeModeledParts=So.prototype.Gs,So.prototype.rebuildParts=So.prototype.Wd;var pS=!1,gS=!1,mS=!1;So.className="PartManager";function ca(a){So.apply(this,arguments)}nt(ca,So),ca.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},ca.prototype.addModeledParts=function(a){for(So.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=ru(x,y,!0),te!==void 0&&(te=a.Vb(te),te instanceof ii&&(E.fromNode=te)),te=g0(x,y,!1),te!==""&&(E.toPortId=te),te=ru(x,y,!1),te!==void 0&&(te=a.Vb(te),te instanceof ii&&(E.toNode=te)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(ne){ne=a.Vb(ne),ne!==null&&(ne.labeledLink=E)}),a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=b}}}}ca.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)})}ca.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},ca.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},ca.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},ca.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},ca.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},ca.prototype.findPartForKey=function(a){var y=So.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},ca.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},ca.prototype.doModelChanged=function(a){var y=this;if(So.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===Ko){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 ot=a.newValue;if(ot!==void 0){var ft=this.Vb(ot);ft instanceof sr?tt.containingGroup=ft: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(Dn){0<=Ht.indexOf(Dn)||(Dn=y.Vb(Dn),Dn!==null&&(Dn.labeledLink=null))}),Array.isArray(Ht)&&Ht.forEach(function(Dn){Dn=y.Vb(Dn),Dn!==null&&(Dn.labeledLink=It)})}}else if(E==="linkCategory"){var Gt=this.Kc(a.object),Vt=a.newValue;Gt!==null&&typeof Vt=="string"&&(Gt.category=Vt)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===vs){var Qt=a.newValue;if(E==="linkDataArray"&&typeof Qt=="object"&&Qt!==null)yS(this,Qt);else if(E==="linkLabelKeys"&&gd(Qt)){var fn=this.Kc(a.object),ni=this.Vb(Qt);fn!==null&&ni!==null&&(ni.labeledLink=fn)}x.isModified=!0}else if(b===cs){var di=a.oldValue;if(E==="linkDataArray"&&typeof di=="object"&&di!==null)this.ip(di);else if(E==="linkLabelKeys"&&gd(di)){var li=this.Vb(di);li!==null&&(li.labeledLink=null)}x.isModified=!0}}else if(b===Ko){var Vn=a.propertyName;a.object!==x.model||Vn!=="linkFromKeyProperty"&&Vn!=="linkToKeyProperty"&&Vn!=="linkFromPortIdProperty"&&Vn!=="linkToPortIdProperty"&&Vn!=="linkLabelKeysProperty"&&Vn!=="nodeIsGroupProperty"&&Vn!=="nodeGroupKeyProperty"&&Vn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},ca.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new On,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)})},ca.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;if(a instanceof $n){var E=ru(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=ru(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 On().addAll(y);var ne=new On;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 Xr)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof sr)&&(a.containingGroup=y)}}},ca.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=Og(y,x),E=this.Lc(a);if(b!==null&&E!==null){b=b.iterator;for(var te={};b.next();){var ne=b.value;y.lb(ne)?E instanceof sr&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(te.link=this.Kc(ne),te.link!==null&&E instanceof ii&&(ru(y,ne,!0)===x&&(te.link.fromNode=E),ru(y,ne,!1)===x&&(te.link.toNode=E),ne=y.Ef(ne),Array.isArray(ne)&&ne.some(function(ae){return function(fe){return fe===x?(E.labeledLink=ae.link,!0):!1}}(te)))),te={link:te.link}}hc(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof sr&&(E.containingGroup=a))}},ca.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof ii){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)cc(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&cc(y,x,b.data)),a instanceof sr)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&cc(y,x,b)}}},ca.prototype.copyPartData=function(a,y){var x=So.prototype.copyPartData.call(this,a,y);if(a instanceof $n)if(a=a.data,a!==null&&y!==null){var b=y.model;a=b.Jo(a),typeof a=="object"&&a!==null&&(b.fi(a),x=y.Kc(a))}else x!==null&&(y=this.diagram,a!==null&&y!==null&&y.commandHandler!==null&&y.commandHandler.copiesClipboardData&&(y=y.model.Jo(a),typeof y=="object"&&y!==null&&(x.data=y)));return x},ca.prototype.insertLink=function(a,y,x,b){var E=this.diagram,te=E.model,ne=E.toolManager.findTool("Linking"),ae="";if(a!==null&&(y===null&&(y=a),ae=y.portId,ae===null&&(ae="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=ne.archetypeLinkData,b instanceof $n){if(Ru(b),te=b.copy(),te!==null)return te.fromNode=a,te.fromPortId=ae,te.toNode=x,te.toPortId=y,E.add(te),a=ne.archetypeLabelNodeData,a instanceof ii&&(Ru(a),a=a.copy(),a!==null&&(a.labeledLink=te,E.add(a))),te}else if(b!==null&&(b=te.Jo(b),typeof b=="object"&&b!==null))return a!==null&&Ep(te,b,te.wa(a.data),!0),Lp(te,b,ae,!0),x!==null&&Ep(te,b,te.wa(x.data),!1),Lp(te,b,y,!1),te.fi(b),a=ne.archetypeLabelNodeData,a===null||a instanceof ii||(a=te.copyNodeData(a),typeof a=="object"&&a!==null&&(te.xf(a),a=te.wa(a),a!==void 0&&te.Bu(b,a))),E.Kc(b);return null},ca.prototype.findLinkForKey=ca.prototype.findLinkForKey,ca.prototype.findPartForKey=ca.prototype.findPartForKey,ca.prototype.removeAllModeledParts=ca.prototype.removeAllModeledParts,ca.prototype.addModeledParts=ca.prototype.addModeledParts,ca.prototype.addAllModeledParts=ca.prototype.addAllModeledParts,ca.className="GraphLinksPartManager";function xu(){So.apply(this,arguments),this.Sg=null}nt(xu,So);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||!cn(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(So.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===Ko){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===Ko){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 ii&&(y=b.mh(y),y=x.Vb(y),b=a.pg(),y!==b&&(b=a.kh(),y!==null?b!==null?x.isTreePathToChildren?b.fromNode=y:b.toNode=y:d0(this,y,a):b!==null&&rd(x,b,!1)))}}},xu.prototype.updateDataBindings=function(a,y){So.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 ii&&y.mh(te)===x&&d0(this,E,this.ii(te))}hc(y,x)}a=y.mh(a),a!==void 0&&E instanceof ii&&(a=this.Vb(a),d0(this,a,E))}},xu.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof ii){var x=y.wa(a.data),b=this.Kc(a.data);if(b!==null){b.isSelected=!1,b.isHighlighted=!1;var E=b.layer;if(E!==null){var te=E.pc(-1,b,!1);0<=te&&this.diagram.cb(cs,"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 On,this.il=new On,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,wr(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new fi,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 fi,this.Lt=new In,this.Wg=!1,this.o=null,this.undoManager=new Bo,a!==void 0&&(rn(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)+":"+si(E)}}return y},Si.prototype.xA=function(a){a.change!==Za&&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 On,te=new On,ne=new On,ae=this.vh;a.changes.each(function(Fe){Fe.model===x&&(Fe.modelChange==="nodeDataArray"?Fe.change===vs?E.add(Fe.newValue):Fe.change===cs&&ne.add(Fe.oldValue):x.lb(Fe.object)?te.add(Fe.object):Fe.change!==Ko||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=To++,b.set(Fe,Ye),E.set(Fe,y))}if(!Zt(y))return y;te||(te=[]);var ae=Object.isExtensible(y);if(b||(b=new fi),ae){var fe=b.get(y);if(fe)return fe}else for(E||(E=new fi),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 Xn||y instanceof _n||y instanceof Ci||y instanceof yi)fe=y.copy(),ne(y,fe);else{if(y instanceof vo||y instanceof Jn||y instanceof Pn)return y;if(y instanceof In)fe=new In().addAll(_p(a,y.Fa(),!1,b,E,te)),ne(y,fe);else if(y instanceof On)fe=new On().addAll(_p(a,y.Fa(),!1,b,E,te)),ne(y,fe);else if(y instanceof fi)fe=new fi().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}st=Si.prototype,st.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},st.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},st.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,Zt(y)&&(a.dm(y),a.modelData=y)}st.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)},st.kv=function(a){xS(this,a),a=a.nodeDataArray,rn(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 On,ne.add(te),b.add(E,ne)):ne.add(te)}}var b=a.vh;b===null&&(b=new fi,y.changes.each(function(E){if(E.diagram!==null){var te=E.change;te===Ko?(E=E.object.panel)&&(te=E.data)&&x(te,E):(te===vs||te===cs)&&(E=E.object,(te=E.itemArray)&&x(te,E))}}),a.vh=b)}function bS(a,y){for(var x=new On,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(Zt(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}st.Pv=function(a,y){var x=this,b=!1,E=new On,te=new On,ne=new On,ae=this.vh;a.changes.each(function(Me){Me.model===x&&(Me.modelChange==="nodeDataArray"?Me.change===vs?E.add(Me.newValue):Me.change===cs&&ne.add(Me.oldValue):x.lb(Me.object)?te.add(Me.object):Me.change!==Ko||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},st.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 fi;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)},st.$x=function(a,y){a.change!==Za&&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 }'},st.yA=function(a,y){return this.$x(a,y)},st.np=function(a){return a===void 0&&(a=Ig(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},st.toJSON=function(a){return this.np(a)},st.Zw=function(a){var y=null;if(typeof a=="string")try{y=_t.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"))},st.Ky=function(a){return this.Zw(a)},Si.constructGraphLinksModel=function(){return new Si},st=Si.prototype,st.dm=function(a){if(rn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(Zt(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(Zt(a)){for(y in a)if(x=a[y],Zt(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 In,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},st.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()):rn(a)?pd(this,a):Zt(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 Xn)y={class:"go.Size",width:sl(x.width),height:sl(x.height)};else if(x instanceof _n)y={class:"go.Rect",x:sl(x.x),y:sl(x.y),width:sl(x.width),height:sl(x.height)};else if(x instanceof Ci)y={class:"go.Margin",top:sl(x.top),right:sl(x.right),bottom:sl(x.bottom),left:sl(x.left)};else if(x instanceof yi)x.sb()?y={class:"go.Spot",x:sl(x.x),y:sl(x.y),offsetX:sl(x.offsetX),offsetY:sl(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof vo){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 Jn?(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(Ys)||(y.spot1=x.spot1),x.spot2.D(ka)||(y.spot2=x.spot2),x.type===Jn.o&&(y.path=Jn.ia(x))):x instanceof Pn&&(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 In){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 Xn(al(a.width),al(a.height));else if(y==="Rect")x=new _n(al(a.x),al(a.y),al(a.width),al(a.height));else if(y==="Margin")x=new Ci(al(a.top),al(a.right),al(a.bottom),al(a.left));else if(y==="Spot")typeof a.enum=="string"?x=xh(a.enum):x=new yi(al(a.x),al(a.y),al(a.offsetX),al(a.offsetY));else if(y==="Brush"){if(x=new vo,x.type=Yn(vo,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof yi&&(x.start=a.start),a.end instanceof yi&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=al(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=al(a.endRadius)),a=a.colorStops,Zt(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Jn.parse(a.path):x=new Jn,x.type=Yn(Jn,a.type),typeof a.startX=="number"&&(x.startX=al(a.startX)),typeof a.startY=="number"&&(x.startY=al(a.startY)),typeof a.endX=="number"&&(x.endX=al(a.endX)),typeof a.endY=="number"&&(x.endY=al(a.endY)),a.spot1 instanceof yi&&(x.spot1=a.spot1),a.spot2 instanceof yi&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=dy(b),typeof b=="function"&&(x=Yn(b,a.name)));return x}st.Pe=function(a){return this.Lt.add(a),this},st.ik=function(a){this.Lt.remove(a)},st.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)},st.cb=function(a,y,x,b,E,te,ne){ta(this,"",a,y,x,b,E,te,ne)},st.g=function(a,y,x,b,E){ta(this,"",Ko,a,this,y,x,b,E)},st.Fs=function(a,y,x,b,E,te){ta(this,"",Ko,y,a,x,b,E,te)};function ta(a,y,x,b,E,te,ne,ae,fe){ae===void 0&&(ae=null),fe===void 0&&(fe=null);var _e=new Ho;_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===Ko){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)),Vo(x,b,E)}else a.change===vs?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Zt(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&&An(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!rn(b)&&a.propertyName&&(b=Os(a.object,a.propertyName)),rn(b)&&typeof x=="number"&&(a=a.newValue,y?Qn(b,x):An(b,x,a))):At("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===cs?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Zt(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&An(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)&&!rn(b)&&a.propertyName&&(b=Os(a.object,a.propertyName)),rn(b)&&typeof x=="number"&&(a=a.oldValue,y?An(b,x,a):Qn(b,x))):At("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Za&&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}},st=Si.prototype,st.La=function(a,y){y===void 0&&(y=""),ta(this,"SourceChanged",Za,y,a,null,null)},st.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)}}},st.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&&(Vo(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),ta(this,"nodeKey",Ko,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else Vo(a,x,y)}};function gd(a){return typeof a=="number"||typeof a=="string"}st.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},st.hc=function(a){return a===null&&At("Model.findNodeDataForKey:key must not be null"),a!==void 0&&gd(a)?this.kb.I(a):null},st.$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))){Vo(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;Vo(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;Vo(a,y,x)}}}}},st.xf=function(a){a!==null&&(po(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,An(a.Tc,b,y)),ta(a,"nodeDataArray",vs,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}st.Fy=function(a){if(rn(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)},st.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)}ta(a,"nodeDataArray",cs,"nodeDataArray",a,y,null,b,null),a.qp(y)}st.nA=function(a){if(rn(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)},st.$z=function(a){if(a!==this.nodeDataArray&&rn(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()}},st.jp=function(a,y){y!==void 0&&(a=Og(this,a),a instanceof On&&this.Vf.add(y,a))},st.Lv=function(){},st.fm=function(){},st.em=function(){},st.qp=function(){};function cc(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new On,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 On&&(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 On?a:null)}st.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),Zt(a)&&wr(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 wr(b),b}if(x&&Zt(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 Bo||te instanceof Bs||te instanceof Ho||(te=p0(a,te,!1)),Vo(x,b,te)}return wr(x),x}return y instanceof Tt||y instanceof Xn||y instanceof _n||y instanceof yi||y instanceof Ci?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 en&&(ES=!0,kn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),kn(" Is that really your intent?"));var b=Os(a,y);b!==x&&(Vo(a,y,x),this.Fs(a,y,b,x))},st=Si.prototype,st.set=function(a,y,x){this.setDataProperty(a,y,x)},st.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])}},st.Ay=function(a,y){this.ts(a,-1,y)},st.ts=function(a,y,x){0>y&&(y=a.length),An(a,y,x),ta(this,"",vs,"",a,null,x,null,y)},st.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),ta(this,"",cs,"",a,x,null,y,null)},st.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)},st.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&&(Vo(a,x,y),ta(this,"nodeCategory",Ko,x,a,b,y))}else Vo(a,x,y)}},st.lm=function(a,y){this.jm(y,this.Ro(a))},st.Tl=function(){return!1},st.Wj=function(){return!1},st.ri=function(){return!1},st.xs=function(){return!1},st.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]:_t.go!==void 0&&_t.go[a]?_t.go[a]:null}function Os(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(b){}return x}function Vo(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];Zt(E)||At("Model.nodeDataArray must only contain Objects, not: "+E),po(E)}for(this.Tc=a,b=new In,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(ta(this,"nodeDataArray",Ko,"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=_t.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=_t[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=Vo,Xu.Brush=vo,Xu.ChangedEvent=Ho,Xu.Geometry=Jn,Xu.Margin=Ci,Xu.Panel=Gn,Xu.Point=Tt,Xu.Rect=_n,Xu.Size=Xn,Xu.Spot=yi,Xu.Transaction=Bs,Xu.UndoManager=Bo;function Hs(a,y,x,b){wr(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 On}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},st=Hs.prototype,st.qb=function(a){a.classType===Hs&&(this.mode=a)},st.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},st.freeze=function(){return this._isFrozen=!0,this},st.ka=function(){return this._isFrozen=!1,this},st.Kx=function(a){return a===void 0&&(a=null),this.mode=Dg,this.backConverter=a,this},st.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},st.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)}st.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==="")kn("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!==""&&Vo(a,x,te);else try{if(x!==""){var ne=E(te,a);Vo(a,x,ne)}else E(te,a)}catch(ae){}}}},st.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):Vo(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):Vo(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,ot=b.panel.itemArray;fe.ov(ot,tt),fe.ts(ot,tt,Ye)}}}catch(ft){}}finally{this.st.remove(a)}}}},Je.Object.defineProperties(Hs.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Kt(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Kt(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Kt(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Kt(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Kt(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Kt(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Kt(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Kt(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 Pn(Hs,"OneWay",1),Dg=new Pn(Hs,"TwoWay",2);Hs.className="Binding",Hs.parseEnum=function(a,y){return function(x){return x=Yn(a,x),x===null?y:x}},Hs.toString=si,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 On,this.wb=new fi,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&&(rn(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},st=jr.prototype,st.clear=function(){Si.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},st.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)+":"+si(E)}for(y+=`
|
|
|
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+ru(this,E,!0)+"-->"+ru(this,E,!1)}return y},st.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 On,te=new On,ne=new On,ae=this.vh;a.changes.each(function(Me){Me.model===b&&(Me.modelChange==="linkDataArray"?Me.change===vs?E.add(Me.newValue):Me.change===cs&&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},st.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},st.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)},st.Rv=function(){var a=Si.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+pd(this,this.linkDataArray,!0);return a+y},st.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 On,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];f0(a,y,E,E,x)}return x}st.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 On,te=new On,ne=new On,ae=this.vh;a.changes.each(function(Me){Me.model===b&&(Me.modelChange==="linkDataArray"?Me.change===vs?E.add(Me.newValue):Me.change===cs&&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},st.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===Ko){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),Vo(x,b,E);return}}else if(a.change===vs){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Zt(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===cs){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Zt(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)}},st=jr.prototype,st.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),Vo(x,this.nodeKeyProperty,a),this.xf(x))}return a}},st.yx=function(a){return ru(this,a,!0)},st.wv=function(a,y){Ep(this,a,y,!0)},st.Bx=function(a){return ru(this,a,!1)},st.Bv=function(a,y){Ep(this,a,y,!1)};function ru(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),Vo(y,E,x),a.hc(x)===null&&cc(a,x,y),ta(a,b?"linkFromKey":"linkToKey",Ko,E,y,te,x),typeof E=="string"&&a.La(y,E))}else Vo(y,E,x)}}st.zx=function(a){return g0(this,a,!0)},st.xv=function(a,y){Lp(this,a,y,!0)},st.Cx=function(a){return g0(this,a,!1)},st.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&&(Vo(y,E,x),ta(a,b?"linkFromPortId":"linkToPortId",Ko,E,y,te,x),typeof E=="string"&&a.La(y,E))}else Vo(y,E,x)}}st.Ef=function(a){if(a===null)return m0;var y=this.je;return y===""?m0:(a=Os(a,y),a===void 0?m0:a)},st.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(Vo(a,x,y),E=y.length,te=0;te<E;te++){var ne=y[te];this.hc(ne)===null&&cc(this,ne,a)}ta(this,"linkLabelKeys",Ko,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else Vo(a,x,y)}},st.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),ta(this,"linkLabelKeys",vs,x,a,null,y,null,E)))}else At(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},st.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),ta(this,"linkLabelKeys",cs,x,a,y,null,E,null)))}else b!==void 0&&At(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},st.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)}}},st.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&&(Vo(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),ta(this,"linkKey",Ko,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Vo(a,x,y)}},st.jh=function(a){return a===null&&At("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&gd(a)?this.wb.I(a):null},st.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))){Vo(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;Vo(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Vo(a,y,x)}}}}},st.Jc=function(a){return a===null?!1:this.$f.contains(a)},st.fi=function(a){a!==null&&(po(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)),ta(a,"linkDataArray",vs,"linkDataArray",a,null,y,null,b),fy(a,y)}st.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)},st.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(ta(a,"linkDataArray",cs,"linkDataArray",a,y,null,b,null),x=ru(a,y,!0),hc(a,x,y),x=ru(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)}st.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)},st.Zz=function(a){if(this.linkKeyProperty===""&&At("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&rn(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=ru(a,y,!0);x=a.Vl(x),a.hc(x)===null&&cc(a,x,y),x=ru(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)}st.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):p0(this,a,!0),Zt(a)&&(wr(a),this.lf!==""&&Vo(a,this.lf,void 0),this.mf!==""&&Vo(a,this.mf,void 0),this.je!==""&&Vo(a,this.je,[])),a},st.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Os(a,y)},st.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)}}},st.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),Vo(a,x,y),this.hc(y)===null&&cc(this,y,a),ta(this,"nodeGroupKey",Ko,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Vo(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||Vo(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&&(Vo(a,y,x),this.Fs(a,y,b,x))},st=jr.prototype,st.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])}},st.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(ru(this,b,!0)===E){var ne=this.lf;Vo(b,ne,te),ta(this,"linkFromKey",Ko,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)}if(ru(this,b,!1)===E&&(ne=this.mf,Vo(b,ne,te),ta(this,"linkToKey",Ko,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,ta(this,"linkLabelKeys",vs,fe,b,E,te,_e,_e))}},st.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;Vo(a,b,x),ta(this,"nodeGroupKey",Ko,b,a,y,x),typeof b=="string"&&this.La(a,b)}},st.Lv=function(){Si.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)fy(this,a[x])},st.fm=function(a){Si.prototype.fm.call(this,a),a=this.wa(a);var y=Og(this,a);if(y!==null){var x=Un();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;ta(this,"nodeGroupKey",Ko,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(ru(this,b,!0)===a&&(E=this.lf,ta(this,"linkFromKey",Ko,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),ru(this,b,!1)===a&&(E=this.mf,ta(this,"linkToKey",Ko,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&&(ta(this,"linkLabelKeys",vs,ne,b,a,a,ae,ae),x.push(b))}for(y=0;y<x.length;y++)hc(this,a,x[y]);qn(x)}},st.em=function(a){Si.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&cc(this,y,a)},st.qp=function(a){Si.prototype.qp.call(this,a);var y=this.lh(a);hc(this,y,a)},st.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&&(Vo(a,x,y),ta(this,"linkCategory",Ko,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Vo(a,x,y)}},jr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},st=jr.prototype,st.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))}st.Wj=function(){return!0},st.ri=function(){return!0},st.xs=function(){return!0},st.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];Zt(E)||At("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),po(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new In,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 On,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,ta(this,"linkDataArray",Ko,"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&&(rn(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},st=ll.prototype,st.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)+":"+si(E)}}return y},st.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},st.gp=function(a){Si.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},st.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&At("applyIncrementalJson cannot change Model properties"),Si.prototype.fp.call(this,a)},st.Vl=function(a){return a},st.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)}}},st.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),Vo(a,x,y),this.hc(y)===null&&cc(this,y,a),ta(this,"nodeParentKey",Ko,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Vo(a,x,y)}},st.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&&(Vo(a,x,y),ta(this,"parentLinkCategory",Ko,x,a,b,y),typeof x=="string"&&this.La(a,x))}else Vo(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||Vo(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&&(Vo(a,y,x),this.Fs(a,y,b,x))},st=ll.prototype,st.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)},st.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;Vo(a,b,x),ta(this,"nodeParentKey",Ko,b,a,y,x),typeof b=="string"&&this.La(a,b)}},st.fm=function(a){Si.prototype.fm.call(this,a),a=this.wa(a);var y=Og(this,a);if(y!==null){var x=Un();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;ta(this,"nodeParentKey",Ko,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]);qn(x)}},st.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)},st.qp=function(a){Si.prototype.qp.call(this,a);var y=this.mh(a);hc(this,y,a)},st.lm=function(a,y){Si.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},st.Tl=function(){return!0},st.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 ls(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(ls,es),ls.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},ls.prototype.qb=function(a){a.classType===ls?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)},ls.prototype.createNetwork=function(){return new kp(this)},ls.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 In;y.addAll(a.iterator),a=new In;var x=new In,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 In,b.addAll(a),b.addAll(x)):(this.arrangement===Qu&&x.reverse(),b=new In,b.addAll(x),b.addAll(a))}fe=b.length;for(var tt=te=E=0;tt<b.length;tt++){var ot=Fe+Ye*te*(this.direction===ul?1:-1)/fe,ft=b.M(tt).diameter;isNaN(ft)&&(ft=yd(b.M(tt),ot)),360>Ye&&(tt===0||tt===b.length-1)&&(ft/=2),E+=ft,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++)ot=b.M(E),ft=b.M(E===fe-1?0:E+1),isNaN(ot.diameter)&&yd(ot,0),isNaN(ft.diameter)&&yd(ft,0),ne=Math.max(ne,(ot.diameter+ft.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}ls.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},ls.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))},ls.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}}ls.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 In;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}ls.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 In;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=[],ot=0;ot<x.length;ot++)0>y[x[ot]].indexOf(x[ot===x.length-1?0:ot+1])&&tt.push(ot===x.length-1?0:ot+1);if(tt.length===0)for(ot=0;ot<x.length;ot++)tt.push(ot);for(ot=0;ot<tt.length;ot++){for(var ft=tt[ot],It=y[_e],Mt=0,Ht=0;Ht<ne.length;Ht++){var Gt=te[ne[Ht]],Vt=te[ae[Ht]];if(Gt<Vt){var Qt=Gt;Gt=Vt}else Qt=Vt;if(Qt<ft&&ft<=Gt)for(Vt=0;Vt<It.length;Vt++){var fn=It[Vt];0>x.indexOf(fn)||Qt<te[fn]&&te[fn]<Gt||Qt===te[fn]||Gt===te[fn]||Mt++}else for(Vt=0;Vt<It.length;Vt++)fn=It[Vt],0>x.indexOf(fn)||Qt<te[fn]&&te[fn]<Gt&&Qt!==te[fn]&&Gt!==te[fn]&&Mt++}for(It=Mt,Ht=Mt=0;Ht<y[_e].length;Ht++)Qt=x.indexOf(y[_e][Ht]),0<=Qt&&(Qt=Math.abs(ft-(Qt>=ft?Qt+1:Qt)),Mt+=Qt<x.length+1-Qt?Qt:x.length+1-Qt);for(Ht=0;Ht<ne.length;Ht++)Qt=te[ne[Ht]],Gt=te[ae[Ht]],Qt>=ft&&Qt++,Gt>=ft&&Gt++,Qt>Gt&&(Vt=Gt,Gt=Qt,Qt=Vt),Gt-Qt<(x.length+2)/2==(Qt<ft&&ft<=Gt)&&Mt++;(It<Me||It===Me&&Mt<Fe)&&(Me=It,Fe=Mt,Ye=ft)}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||(ot=tt>Me?tt-Me:Me-tt,Fe+=tt<Me!=ot>ne-ot?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(ls.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 Pn(ls,"ConstantSpacing",0),md=new Pn(ls,"ConstantDistance",1),zh=new Pn(ls,"ConstantAngle",2),Qu=new Pn(ls,"Packed",3),ul=new Pn(ls,"Clockwise",4),vd=new Pn(ls,"Counterclockwise",5),sf=new Pn(ls,"BidirectionalLeft",6),Mp=new Pn(ls,"BidirectionalRight",7),S0=new Pn(ls,"Forwards",8),x0=new Pn(ls,"Reverse",9),w0=new Pn(ls,"Ascending",10),b0=new Pn(ls,"Descending",11),Tp=new Pn(ls,"Optimized",12),C0=new Pn(ls,"Pythagorean",13),Df=new Pn(ls,"Circular",14);ls.className="CircularLayout",ls.ConstantSpacing=Ju,ls.ConstantDistance=md,ls.ConstantAngle=zh,ls.Packed=Qu,ls.Clockwise=ul,ls.Counterclockwise=vd,ls.BidirectionalLeft=sf,ls.BidirectionalRight=Mp,ls.Forwards=S0,ls.Reverse=x0,ls.Ascending=w0,ls.Descending=b0,ls.Optimized=Tp,ls.Pythagorean=C0,ls.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){Oo.call(this,a)}nt(kp,Oo),kp.prototype.createVertex=function(){return new zg(this)},kp.prototype.createEdge=function(){return new P0(this)},kp.className="CircularNetwork";function zg(a){oa.call(this,a),this.u=this.Si=NaN}nt(zg,oa);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){Hl.call(this,a)}nt(P0,Hl),P0.className="CircularEdge";function Ta(a){es.call(this),this.ah=null,this.An=0,this.$d=new Xn(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(Ta,es),Ta.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},Ta.prototype.createNetwork=function(){return new Rf(this)},Ta.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=Un(),Me=0;Me<ae+y.vertexes.count+2;Me++)_e[Me]=null;ae=0,ne.reset();for(var Fe=_n.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],ot=new Tt(tt.x+Fe.width+b.width,tt.y),ft=new Tt(tt.x,tt.y+Fe.height+b.height);for(Ye+1<ae&&_e.splice(Ye+1,0,null),_e[Ye]=ot,_e[Ye+1]=ft,ae++,Ye=tt.x-Fe.x,tt=tt.y-Fe.y,Me=Me.vertexes.iterator;Me.next();)ot=Me.value,ot.centerX+=Ye,ot.centerY+=tt}for(_n.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(qn(_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},Ta.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},Ta.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 In),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 In,E.Hj=ae),ae.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(ae=ne.Hj,ae===null&&(ae=new In,ne.Hj=ae),ae.add(E),ne.Vd--,ne.sh+=E.sh)}for(E=b.edges.iterator;E.next();)te=E.value,te.length*=Math.max(1,on.sqrt((te.fromVertex.sh+te.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var fe=E.Hj;if(fe!==null&&0<fe.count&&(ne=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=ne))){for(var _e=ae=0,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=on.sqrt((ae+tt+_e*_e*4/(ne*ne))/tt),ne=(ae-1)*Me/2,ae=(ae-1)*Fe/2,E.bounds=new _n(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 _n(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=on.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,ot){return tt===null||ot===null||tt===ot?0:ot.width*ot.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=on.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}Ta.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ta.prototype.addComments=function(a){var y=a.node;if(y!==null)for(y=y.Mu();y.next();){var x=y.value;if(x.category==="Comment"&&x.isVisible()){var b=this.network.ki(x);b===null&&(b=this.network.Bl(x)),b.charge=this.defaultCommentElectricalCharge,x=null;for(var E=b.destinationEdges;E.next();){var te=E.value;if(te.toVertex===a){x=te;break}}if(x===null){for(E=b.sourceEdges;E.next();)if(te=E.value,te.fromVertex===a){x=te;break}}x===null&&(x=this.network.Zj(a,b,null)),x.length=this.defaultCommentSpringLength}}};function zS(a,y){var x=a.bounds,b=x.x;a=x.y;var E=x.width;x=x.height;var te=y.bounds,ne=te.x;y=te.y;var ae=te.width;return te=te.height,b+E<ne?a>y+te?(x=b+E-ne,a=a-y-te,on.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,on.sqrt(b*b+a*a)):ne-(b+E):b>ne+ae?a>y+te?(x=b-ne-ae,a=a-y-te,on.sqrt(x*x+a*a)):a+x<y?(b=b-ne-ae,a=a+x-y,on.sqrt(b*b+a*a)):b-(ne+ae):a>y+te?a-(y+te):a+x<y?y-(a+x):.1}function HS(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,jx(a)););a.ah=null}function jx(a){a.ah===null&&(a.ah=a.network.vertexes.Fa());var y=a.ah;if(0>=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var b=x.centerX,E=b,te=x=x.centerY,ne=1;ne<y.length;ne++){var ae=y[ne];ae.forceX=0,ae.forceY=0;var fe=ae.centerX;ae=ae.centerY,b=Math.min(b,fe),E=Math.max(E,fe),x=Math.min(x,ae),te=Math.max(te,ae)}(E=E-b>te-x)?y.sort(function(ft,It){return ft===null||It===null||ft===It?0:ft.centerX-It.centerX}):y.sort(function(ft,It){return ft===null||It===null||ft===It?0:ft.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 ot=zS(ne,Ye);1>ot?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new _0),ot=b.random(),ae=b.random(),fe>_e?(b=Math.abs(Ye.bounds.right-ne.bounds.x),b=(1+b)*ot):fe<_e?(b=Math.abs(Ye.bounds.x-ne.bounds.right),b=-(1+b)*ot):(b=Math.max(Ye.width,ne.width),b=(1+b)*ot-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)/(ot*ot),b=(_e-fe)/ot*ae,_e=(tt-Me)/ot*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}Ta.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},Ta.prototype.moveFixedVertex=function(){},Ta.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Ta.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=so,y.toSpot=so)}},Ta.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=_n.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,_n.free(x)}x=_n.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()}_n.free(x)},Ta.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ta.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Ta.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Ta.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Ta.prototype.electricalFieldX=function(){return 0},Ta.prototype.electricalFieldY=function(){return 0},Ta.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Ta.prototype.gravitationalFieldX=function(){return 0},Ta.prototype.gravitationalFieldY=function(){return 0},Ta.prototype.isFixed=function(a){return a.isFixed},Je.Object.defineProperties(Ta.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())}}}),Ta.className="ForceDirectedLayout";function US(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}US.className="ForceDirectedSubnet";function Rf(a){Oo.call(this,a)}nt(Rf,Oo),Rf.prototype.createVertex=function(){return new Hg(this)},Rf.prototype.createEdge=function(){return new Ug(this)},Rf.className="ForceDirectedNetwork";function Hg(a){oa.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,oa),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){Hl.call(this,a),this.j=this.o=NaN}nt(Ug,Hl),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 xo(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(xo,es),xo.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},xo.prototype.qb=function(a){a.classType===xo?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)},xo.prototype.createNetwork=function(){return new Np(this)},xo.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 ot=E.focus;_e=te.focus;var ft=b.rev?te.bounds:E.bounds;tt=Tt.alloc(),Me!==Fe?ft.w()&&Fe.isVisible()?Fe.actualBounds.w()?(Dh(Fe,Ye,Fr,tt),tt.x+=Fe.actualBounds.x-ft.x,tt.y+=Fe.actualBounds.y-ft.y):(Dh(Fe,Ye,Fr,tt),tt.w()||tt.assign(ot)):tt.assign(ot):ft.w()?(Dh(Fe,Ye,Fr,tt),tt.w()||tt.assign(ot)):tt.assign(ot),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-ot.x)/this.kc),fe=tt.x,ae=Math.round((Me.x-_e.x)/this.kc),_e=Me.x):(ne=Math.round((tt.y-ot.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,ft=b.link,ft!==null){var It=ft.fromPort,Mt=ft.toPort;if(It!==null&&Mt!==null){var Ht=ft.fromNode;if(Ye=ft.toNode,Ht!==null&&Ye!==null){var Gt=T0(this,!0),Vt=T0(this,!1),Qt=this.setsPortSpots?Gt:ft.computeSpot(!0,It);ot=this.setsPortSpots?Vt:ft.computeSpot(!1,Mt);var fn=ft.isOrthogonal;Qt.$c()&&Qt.Hf(Vt)&&ot.$c()&&ot.Hf(Gt)?Fe=0:(Gt=ft.getLinkPoint(Ht,It,Qt,!0,fn,Ye,Mt,Tt.alloc()),Vt=ft.getLinkDirection(Ht,It,Gt,Qt,!0,fn,Ye,Mt),Tt.free(Gt),Qt.ys()||Vt!==JS(this,b,!0)?this.setsPortSpots&&Ht!==null&&Ht.ports.count===1&&b.rev&&(Fe+=1):Fe+=1,Qt=ft.getLinkPoint(Ye,Mt,ot,!1,fn,Ht,It,Tt.alloc()),ft=ft.getLinkDirection(Ye,Mt,Qt,ot,!1,fn,Ht,It),Tt.free(Qt),ot.ys()||ft!==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)&&(ot=a.createVertex(),ot.node=null,ot.Dj=1,ot.layer=tt,ot.near=E,a.dh(ot),E=a.Zj(E,ot,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=fe,E.portToPos=0,E=ot),ft=1,Fe&&ft--,tt-Me>ft&&0<tt){for(b.valid=!1,ot=a.createVertex(),ot.node=null,ot.Dj=2,ot.layer=tt-1,a.dh(ot),E=a.Zj(E,ot,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=ot,tt--;tt-Me>ft&&0<tt;)ot=a.createVertex(),ot.node=null,ot.Dj=3,ot.layer=tt-1,a.dh(ot),E=a.Zj(E,ot,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=ot,tt--;E=a.Zj(ot,te,b.link),E.valid=!Fe,Fe&&(ot.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},xo.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}xo.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},xo.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 ot=fe[Ye];if(ot.valid&&ot.fromVertex.layer!==y){var ft=ot.fromVertex.index,It=ot.portToPos;ot=ot.portFromPos,Me<It&&(Fe>ft||Fe===ft&&tt>ot)&&ae++,It<Me&&(ft>Fe||ft===Fe&&ot>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++)ot=fe[Ye],ot.valid&&ot.toVertex.layer!==y&&(ft=ot.toVertex.index,It=ot.portToPos,ot=ot.portFromPos,tt<ot&&(Fe>ft||Fe===ft&&Me>It)&&ae++,ot<tt&&(ft>Fe||ft===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++)ot=Gt[Ye],ot.valid&&ot.fromVertex.layer!==y&&(ft=ot.fromVertex.index,ot=ot.portFromPos,(Fe<ft||Fe===ft&&tt<ot)&&Ht++,(ft<Fe||ft===Fe&&ot<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++)ot=Gt[Ye],ot.valid&&ot.toVertex.layer!==y&&(ft=ot.toVertex.index,It=ot.portToPos,(Fe<ft||Fe===ft&&Me<It)&&Ht++,(ft<Fe||ft===Fe&&It<Me)&&Mt++)}te[ne*E+fe]=Mt,te[fe*E+ne]=Ht}}return xd(a,y,b),te}xo.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}xo.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(ot,ft){return ot-ft}),_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)}}xo.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++}xo.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 ot=Ye[tt],ft=ot.fromVertex;Me+=1,ft.component!==1&&(te+=1,ft=ft.layer-_e.layer,ot=a.linkMinLength(ot),b=Math.min(b,ft-ot))}for(Ye=_e.destinationEdgesArrayAccess,E=Ye.length,tt=0;tt<E;tt++)ot=Ye[tt].toVertex,--Me,ot.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++)ot=Ye[tt].fromVertex,_e+=1,ot.component!==1?b+=1:Me=!0;for(Ye=ne.destinationEdgesArrayAccess,Fe=Ye.length,tt=0;tt<Fe;tt++)ot=Ye[tt],ft=ot.toVertex,--_e,ft.component!==1&&(--b,ft=ne.layer-ft.layer,ot=a.linkMinLength(ot),E=Math.min(E,ft-ot));(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}xo.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))}xo.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,ot=b[te].column,ft=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=ot-It+Ht,Mt=ft-Mt+Gt;var Vt=b[te].sourceEdges.iterator;for(Vt.reset();Vt.next();)if(Ht=Vt.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(Vt=b[te].destinationEdges.iterator,Vt.reset();Vt.next();)if(Ht=Vt.value,Gt=Ht.toVertex,Ht.valid&&Gt.layer===y){for(Ht=0;b[Ht]!==Gt;)Ht++;Ht===te+1&&(tt+=1)}for(Vt=b[te+1].sourceEdges.iterator,Vt.reset();Vt.next();)if(Ht=Vt.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(Vt=b[te+1].destinationEdges.iterator,Vt.reset();Vt.next();)if(Ht=Vt.value,Gt=Ht.toVertex,Ht.valid&&Gt.layer===y){for(Ht=0;b[Ht]!==Gt;)Ht++;Ht===te&&(Ye+=1)}Ht=Gt=0,Vt=ne[b[te].index];var Qt=ae[b[te].index],fn=ne[b[te+1].index],ni=ae[b[te+1].index];Vt!==-1&&(Gt+=Math.abs(Vt-ot),Ht+=Math.abs(Vt-Mt)),Qt!==-1&&(Gt+=Math.abs(Qt-ot),Ht+=Math.abs(Qt-Mt)),fn!==-1&&(Gt+=Math.abs(fn-ft),Ht+=Math.abs(fn-It)),ni!==-1&&(Gt+=Math.abs(ni-ft),Ht+=Math.abs(ni-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}xo.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 ot=Ye=0,ft=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),Vt=Mt.portFromColOffset;Mt=Mt.portToColOffset,Ht=Ht.column,Ye+=(Math.abs(Me+Mt-(Ht+Vt))+1)*Gt,ot+=(Math.abs(tt+Mt-(Ht+Vt))+1)*Gt,ft+=(Math.abs(Fe+Mt-(Ht+Vt))+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),Vt=Mt.portFromColOffset,Mt=Mt.portToColOffset,Ht=Ht.column,Ye+=(Math.abs(Me+Vt-(Ht+Mt))+1)*Gt,ot+=(Math.abs(tt+Vt-(Ht+Mt))+1)*Gt,ft+=(Math.abs(Fe+Vt-(Ht+Mt))+1)*Gt);Mt=Vt=Gt=0,It=ne[E[b].index],Ht=ae[E[b].index],It!==-1&&(Gt+=Math.abs(It-Me),Vt+=Math.abs(It-tt),Mt+=Math.abs(It-Fe)),Ht!==-1&&(Gt+=Math.abs(Ht-Me),Vt+=Math.abs(Ht-tt),Mt+=Math.abs(Ht-Fe)),ot<Ye||ot===Ye&&Vt<Gt?(_e=fe=!0,E[b].column=tt):(ft<Ye||ft===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=Un(),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 On,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=Er(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)),qn(y),a.u(te,ne,ae,fe),a.network.vertexes.each(function(tt){var ot=Un();_e&&ot.push(te.get(tt)),Me&&ot.push(ne.get(tt)),Fe&&ot.push(ae.get(tt)),Ye&&ot.push(fe.get(tt)),ot.sort(function(It,Mt){return It-Mt});var ft=ot.length;ft=(ot[Math.floor((ft-1)/2)]+ot[Math.ceil((ft-1)/2)])/2,qn(ot),tt.zc=ft})}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=Er(_e.sourceEdgesArrayAccess),tt=Ye.next();!tt.done;tt=Ye.next())tt=tt.value,tt.valid&&Fe.push(tt);_e.bo=Fe}for(_e=Er(_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}}}xo.prototype.verticalAlignment=function(a,y,x){Kx(a),a=Er(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Er(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=Er(y),ne=te.next();!ne.done;ne=te.next()){var ae=Er(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=Er(y),ae=te.next();!ae.done;ae=te.next()){ae=Er(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 ot=I0(Me,Fe),ft=ot.portFromPos,It=ot.portToPos;ot.link!==null&&(Me.node&&Me.node!==ot.link.fromNode&&(ft=ne?Me.focusX:Me.focusY),Fe.node&&Fe.node!==ot.link.toNode&&(It=ne?Fe.focusX:Fe.focusY))}else ot=I0(Fe,Me),ft=ot.portToPos,It=ot.portFromPos,ot.link!==null&&(Me.node&&Me.node!==ot.link.toNode&&(ft=ne?Me.focusX:Me.focusY),Fe.node&&Fe.node!==ot.link.fromNode&&(It=ne?Fe.focusX:Fe.focusY));Ye=b?Me.qg+(Ye-ft)-(tt-It):Me.qg+ft-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=Er(y),ne=x.next();!ne.done;ne=x.next())for(te=Er(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 fi,y=Er(y),ne=y.next();!ne.done;ne=y.next())for(x=Er(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]}xo.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=Un(),E=Un(),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)));qn(b),qn(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}xo.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?Ps:Zs:a.K===90?y?Zs:Ps:a.K===180?y?ks:Ws:y?Ws:ks}xo.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()},xo.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 _n(0,0,x,Math.abs(this.Ta[0]))):y.push(new _n(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new _n(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new _n(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new _n(0,0,Math.abs(this.Ta[0]),x)):y.push(new _n(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new _n(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new _n(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},xo.prototype.commitLayers=function(){},xo.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===iu&&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,ot=this.ie,ft=y.firstPickIndex+1;if(y.isOrthogonal){tt=!0;var It=y.pointsCount;4<It&&y.points.removeRange(2,It-3)}else if(y.curve===iu)Ye=!0,It=y.pointsCount,4<It&&y.points.removeRange(2,It-3),It===4&&(ft=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(ft-1).x,Ht=y.i(ft-1).y;var Vt=It.centerX,Qt=It.centerY;if(tt)this.K===180||this.K===0?ft===y.firstPickIndex+1?(y.m(ft++,Mt,Ht),y.m(ft++,Mt,Qt)):(Gt!==null?Gt.centerY:Ht)!==Qt&&(Gt=this.Ta[It.layer-1]+this.Rf.x,y.m(ft++,Gt,Ht),y.m(ft++,Gt,Qt)):ft===y.firstPickIndex+1?(y.m(ft++,Mt,Ht),y.m(ft++,Vt,Ht)):(Gt!==null?Gt.centerX:Mt)!==Vt&&(Gt=this.Ta[It.layer-1]+this.Rf.y,y.m(ft++,Mt,Gt),y.m(ft++,Vt,Gt));else if(ft===y.firstPickIndex+1){Gt=Math.max(10,this.he[Fe.layer]);var fn=Math.max(10,this.Ld[Fe.layer]);if(Ye)this.K===180?Vt<=Fe.bounds.x?(Fe=Fe.bounds.x,y.m(ft++,Fe-Gt,Qt),y.m(ft++,Fe,Qt),y.m(ft++,Fe+fn,Qt)):(y.m(ft++,Vt-Gt,Qt),y.m(ft++,Vt,Qt),y.m(ft++,Vt+fn,Qt)):this.K===90?Qt>=Fe.bounds.bottom?(Fe=Fe.bounds.y+Fe.bounds.height,y.m(ft++,Vt,Fe+fn),y.m(ft++,Vt,Fe),y.m(ft++,Vt,Fe-Gt)):(y.m(ft++,Vt,Qt+fn),y.m(ft++,Vt,Qt),y.m(ft++,Vt,Qt-Gt)):this.K===270?Qt<=Fe.bounds.y?(Fe=Fe.bounds.y,y.m(ft++,Vt,Fe-Gt),y.m(ft++,Vt,Fe),y.m(ft++,Vt,Fe+fn)):(y.m(ft++,Vt,Qt-Gt),y.m(ft++,Vt,Qt),y.m(ft++,Vt,Qt+fn)):this.K===0&&(Vt>=Fe.bounds.right?(Fe=Fe.bounds.x+Fe.bounds.width,y.m(ft++,Fe+fn,Qt),y.m(ft++,Fe,Qt),y.m(ft++,Fe-Gt,Qt)):(y.m(ft++,Vt+fn,Qt),y.m(ft++,Vt,Qt),y.m(ft++,Vt-Gt,Qt)));else{y.m(ft++,Mt,Ht);var ni=0;this.K===180||this.K===0?((this.K===180?Vt>=Fe.bounds.right:Vt<=Fe.bounds.x)&&(ni=(this.K===0?-Gt:fn)/2),y.m(ft++,Mt+ni,Qt)):((this.K===270?Qt>=Fe.bounds.bottom:Qt<=Fe.bounds.y)&&(ni=(this.K===90?-Gt:fn)/2),y.m(ft++,Vt,Ht+ni)),y.m(ft++,Vt,Qt)}}else Gt=Math.max(10,this.he[It.layer]),fn=Math.max(10,this.Ld[It.layer]),Ye?this.K===180?(y.m(ft++,Vt-Gt-ot,Qt),y.m(ft++,Math.min(Vt-Gt+ot/2,Vt),Qt),y.m(ft++,Vt,Qt),y.m(ft++,Vt,Qt),y.m(ft++,Math.max(Vt+fn-ot/2,Vt),Qt),y.m(ft++,Vt+fn+ot,Qt)):this.K===90?(y.m(ft++,Vt,Qt+fn+ot),y.m(ft++,Vt,Math.max(Qt+fn-ot/2,Qt)),y.m(ft++,Vt,Qt),y.m(ft++,Vt,Qt),y.m(ft++,Vt,Math.min(Qt-Gt+ot/2,Qt)),y.m(ft++,Vt,Qt-Gt-ot)):this.K===270?(y.m(ft++,Vt,Qt-Gt-ot),y.m(ft++,Vt,Math.min(Qt-Gt+ot/2,Qt)),y.m(ft++,Vt,Qt),y.m(ft++,Vt,Qt),y.m(ft++,Vt,Math.max(Qt+fn-ot/2,Qt)),y.m(ft++,Vt,Qt+fn+ot)):(y.m(ft++,Vt+fn+ot,Qt),y.m(ft++,Math.max(Vt+fn-ot/2,Vt),Qt),y.m(ft++,Vt,Qt),y.m(ft++,Vt,Qt),y.m(ft++,Math.min(Vt-Gt+ot/2,Vt),Qt),y.m(ft++,Vt-Gt-ot,Qt)):y.m(ft++,Vt,Qt)}Fe=It}(ae===null||_e!==ms||tt)&&(Mt=y.i(ft-1).x,Ht=y.i(ft-1).y,Vt=y.i(ft).x,Qt=y.i(ft).y,tt?(ot=this.Ld[Me.layer],this.K===180||this.K===0?(tt=Ht,tt>=Me.bounds.y&&tt<=Me.bounds.bottom&&(this.K===180?Vt>=Me.bounds.x:Vt<=Me.bounds.right)&&(Fe=Me.centerX+(this.K===180?-ot:ot),tt<Me.bounds.y+Me.bounds.height/2?tt=Me.bounds.y-this.kc/2:tt=Me.bounds.bottom+this.kc/2,y.m(ft++,Fe,Ht),y.m(ft++,Fe,tt)),y.m(ft++,Vt,tt)):(tt=Mt,tt>=Me.bounds.x&&tt<=Me.bounds.right&&(this.K===270?Qt>=Me.bounds.y:Qt<=Me.bounds.bottom)&&(Fe=Me.centerY+(this.K===270?-ot:ot),tt<Me.bounds.x+Me.bounds.width/2?tt=Me.bounds.x-this.kc/2:tt=Me.bounds.right+this.kc/2,y.m(ft++,Mt,Fe),y.m(ft++,tt,Fe)),y.m(ft++,tt,Qt)),y.m(ft++,Vt,Qt)):Ye?(Gt=Math.max(10,this.he[Me.layer]),fn=Math.max(10,this.Ld[Me.layer]),this.K===180&&Vt>=Me.bounds.x?(Fe=Me.bounds.x+Me.bounds.width,y.L(ft-2,Fe,Ht),y.L(ft-1,Fe+fn,Ht)):this.K===90&&Qt<=Me.bounds.bottom?(Fe=Me.bounds.y,y.L(ft-2,Mt,Fe),y.L(ft-1,Mt,Fe-Gt)):this.K===270&&Qt>=Me.bounds.y?(Fe=Me.bounds.y+Me.bounds.height,y.L(ft-2,Mt,Fe),y.L(ft-1,Mt,Fe+fn)):this.K===0&&Vt<=Me.bounds.right&&(Fe=Me.bounds.x,y.L(ft-2,Fe,Ht),y.L(ft-1,Fe-Gt,Ht))):(Gt=Math.max(10,this.he[Me.layer]),fn=Math.max(10,this.Ld[Me.layer]),tt=0,this.K===180||this.K===0?((this.K===180?Vt<=Me.bounds.x:Vt>=Me.bounds.right)&&(tt=(this.K===0?fn:-Gt)/2),y.m(ft++,Vt+tt,Ht)):((this.K===270?Qt<=Me.bounds.y:Qt>=Me.bounds.bottom)&&(tt=(this.K===90?fn:-Gt)/2),y.m(ft++,Mt,Qt+tt)),y.m(ft++,Vt,Qt)))}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(ft-1).x,Ht=y.i(ft-1).y,Vt=It.centerX,Qt=It.centerY,tt?this.K===180||this.K===0?(Gt!==null?Gt.centerY:Ht)!==Qt&&(Gt=this.Ta[It.layer]+this.Rf.x,ft===y.firstPickIndex+1&&(Gt=this.K===0?Math.max(Gt,Mt):Math.min(Gt,Mt)),y.m(ft++,Gt,Ht),y.m(ft++,Gt,Qt)):(Gt!==null?Gt.centerX:Mt)!==Vt&&(Gt=this.Ta[It.layer]+this.Rf.y,ft===y.firstPickIndex+1&&(Gt=this.K===90?Math.max(Gt,Ht):Math.min(Gt,Ht)),y.m(ft++,Mt,Gt),y.m(ft++,Vt,Gt)):(Gt=Math.max(10,this.he[It.layer]),fn=Math.max(10,this.Ld[It.layer]),Ye?this.K===180?(y.m(ft++,Vt+fn+ot,Qt),y.m(ft++,Math.max(Vt+fn-ot/2,Vt),Qt),y.m(ft++,Vt,Qt),y.m(ft++,Vt,Qt),y.m(ft++,Math.min(Vt-Gt+ot/2,Vt),Qt),y.m(ft++,Vt-Gt-ot,Qt)):this.K===90?(y.m(ft++,Vt,Qt-Gt-ot),y.m(ft++,Vt,Math.min(Qt-Gt+ot/2,Qt)),y.m(ft++,Vt,Qt),y.m(ft++,Vt,Qt),y.m(ft++,Vt,Math.max(Qt+fn-ot/2,Qt)),y.m(ft++,Vt,Qt+fn+ot)):this.K===270?(y.m(ft++,Vt,Qt+fn+ot),y.m(ft++,Vt,Math.max(Qt+fn-ot/2,Qt)),y.m(ft++,Vt,Qt),y.m(ft++,Vt,Qt),y.m(ft++,Vt,Math.min(Qt-Gt+ot/2,Qt)),y.m(ft++,Vt,Qt-Gt-ot)):(y.m(ft++,Vt-Gt-ot,Qt),y.m(ft++,Math.min(Vt-Gt+ot/2,Vt),Qt),y.m(ft++,Vt,Qt),y.m(ft++,Vt,Qt),y.m(ft++,Math.max(Vt+fn-ot/2,Vt),Qt),y.m(ft++,Vt+fn+ot,Qt)):this.K===180?(y.m(ft++,Vt+fn,Qt),y.m(ft++,Vt-Gt,Qt)):this.K===90?(y.m(ft++,Vt,Qt-Gt),y.m(ft++,Vt,Qt+fn)):this.K===270?(y.m(ft++,Vt,Qt+fn),y.m(ft++,Vt,Qt-Gt)):(y.m(ft++,Vt-Gt,Qt),y.m(ft++,Vt+fn,Qt)))),Me=It}tt&&(Mt=y.i(ft-1).x,Ht=y.i(ft-1).y,Vt=y.i(ft).x,Qt=y.i(ft).y,this.K===180||this.K===0?Ht!==Qt&&(Gt=this.K===0?Math.min(Math.max((Vt+Mt)/2,this.Ta[Fe.layer]+this.Rf.x),Vt):Math.max(Math.min((Vt+Mt)/2,this.Ta[Fe.layer]+this.Rf.x),Vt),y.m(ft++,Gt,Ht),y.m(ft++,Gt,Qt)):Mt!==Vt&&(Gt=this.K===90?Math.min(Math.max((Qt+Ht)/2,this.Ta[Fe.layer]+this.Rf.y),Qt):Math.max(Math.min((Qt+Ht)/2,this.Ta[Fe.layer]+this.Rf.y),Qt),y.m(ft++,Mt,Gt),y.m(ft++,Vt,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()},xo.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new In,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 ot=this.linkSpacing*(Me-(_e-1)/2);y++,tt.uh(),tt.L(Ye.index,te.x,te.y+ot),tt.L(Ye.index+1,ne.x,ne.y+ot),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),ot=this.linkSpacing*(Me-(_e-1)/2),y++,tt.uh(),tt.L(Ye.index,te.x+ot,te.y),tt.L(Ye.index+1,ne.x+ot,ne.y),tt.zf()}te=E}a=b}}}},st=xo.prototype,st.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},st.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},st.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},st.B=function(a,y){return a-=y,-1<a&&1>a},st.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(xo.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 Pn(xo,"CycleDepthFirst",0),xy=new Pn(xo,"CycleGreedy",1),Wg=new Pn(xo,"CycleFromLayers",2),A0=new Pn(xo,"LayerOptimalLinkLength",0),wy=new Pn(xo,"LayerLongestPathSink",1),by=new Pn(xo,"LayerLongestPathSource",2),N0=new Pn(xo,"InitDepthFirstOut",0),Cy=new Pn(xo,"InitDepthFirstIn",1),Py=new Pn(xo,"InitNaive",2),_y=new Pn(xo,"AggressiveNone",0),O0=new Pn(xo,"AggressiveLess",1),Ey=new Pn(xo,"AggressiveMore",2),$x=8;xo.className="LayeredDigraphLayout",xo.CycleDepthFirst=k0,xo.CycleGreedy=xy,xo.CycleFromLayers=Wg,xo.LayerOptimalLinkLength=A0,xo.LayerLongestPathSink=wy,xo.LayerLongestPathSource=by,xo.InitDepthFirstOut=N0,xo.InitDepthFirstIn=Cy,xo.InitNaive=Py,xo.AggressiveNone=_y,xo.AggressiveLess=O0,xo.AggressiveMore=Ey,xo.PackNone=0,xo.PackExpand=1,xo.PackStraighten=2,xo.PackMedian=4,xo.PackAll=15,xo.AlignNone=0,xo.AlignUpperLeft=1,xo.AlignUpperRight=2,xo.AlignLowerLeft=4,xo.AlignLowerRight=8,xo.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){Oo.call(this,a)}nt(Np,Oo),Np.prototype.createVertex=function(){return new bu(this)},Np.prototype.createEdge=function(){return new Zg(this)},Np.className="LayeredDigraphNetwork";function bu(a){oa.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,oa);function rx(a,y){return a.index-y.index}function I0(a,y){if(!a.$n){for(var x=[],b=Er(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Er(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=Er(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=Er(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){oa.prototype.Cl.call(this,a),this.bo=this.co=null},bu.prototype.Kl=function(a){oa.prototype.Kl.call(this,a),this.bo=this.co=null},bu.prototype.zl=function(a){oa.prototype.zl.call(this,a),this.$n=this.ao=null},bu.prototype.Jl=function(a){oa.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){Hl.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}nt(Zg,Hl),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 Or(a){es.call(this),this.Ub=new On,this.Wn=F0,this.ud=$c,this.vo=z0,this.Bq=Fy,this.$v=[],this.td=!0,this.Rb=H0,this.$d=new Xn(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(Or,es),Or.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)},Or.prototype.qb=function(a){a.classType===Or?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)},Or.prototype.createNetwork=function(){return new zf(this)},Or.prototype.makeNetwork=function(a){function y(b){if(b instanceof ii)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof $n){var E=b.fromNode;return E===null||E.isLinkLabel||E.category==="Comment"?!1:(b=b.toNode,!(b===null||b.isLinkLabel||b.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof dn?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof sr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Or.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 dn&&(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 On,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof ii?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Fu&&a.add(x)}this.Ub=a}for(this.Ub.count===0&&this.findRoots(),a=this.Ub.copy().iterator;a.next();)y=a.value,y.initialized||(y.initialized=!0,My(this,y));for(y=this.network.vertexes,a=null;a=Xx(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,My(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Fu&&ax(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Fu&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Fu&&ux(this,y);if(this.Cu(),this.layerStyle===G0){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var b=x.parent;b===null&&(b=x),b=b.angle===0||b.angle===180;var E=a[x.level];E===void 0&&(E=0),a[x.level]=Math.max(E,b?x.width:x.height)}for(y=0;y<a.length;y++)a[y]===void 0&&(a[y]=0);for(this.$v=a,y=this.network.vertexes.iterator;y.next();)x=y.value,b=x.parent,b===null&&(b=x),b.angle===0||b.angle===180?(b.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(b.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===jy)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,b=-1,E=0;E<y.children.length;E++){var te=y.children[E];b=Math.max(b,x?te.width:te.height)}if(0<=b)for(E=0;E<y.children.length;E++)te=y.children[E],x?(y.angle===180&&(te.focusX+=b-te.width),te.width=b):(y.angle===270&&(te.focusY+=b-te.height),te.height=b)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Fu&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new On,this.isValidLayout=!0};function Xx(a){var y=new On;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Or.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 In,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 In,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}Or.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}}Or.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])}}Or.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])}}Or.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())}},Or.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Or.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=_n.allocAt(0,0,a.bounds.width+te,a.bounds.height+ne),a.bounds=E,_n.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}Or.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],ot=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-ot.width,a.bounds.y+fe),tt.move(Fe),tt=tt.Sd();tt.next();){var ft=tt.value;ft.fromSpot=ks,ft.toSpot=Ws}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();)ft=tt.value,ft.fromSpot=Ws,ft.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();)ft=tt.value,ft.fromSpot=Ws,ft.toSpot=ks;else for(Fe.h(a.bounds.x+a.commentMargin-ot.width,a.bounds.y+fe),tt.move(Fe),tt=tt.Sd();tt.next();)ft=tt.value,ft.fromSpot=ks,ft.toSpot=Ws;fe=0<=a.commentSpacing?fe+(ot.height+a.commentSpacing):fe+(a.commentSpacing-ot.height)}else{if(135<E&&!te||!x&&ae)if(0<=a.commentMargin)for(Fe.h(a.bounds.x+fe,a.bounds.y-a.commentMargin-ot.height),tt.move(Fe),tt=tt.Sd();tt.next();)ft=tt.value,ft.fromSpot=Ps,ft.toSpot=Zs;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();)ft=tt.value,ft.fromSpot=Zs,ft.toSpot=Ps;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();)ft=tt.value,ft.fromSpot=Zs,ft.toSpot=Ps;else for(Fe.h(a.bounds.x+fe,a.bounds.y+a.commentMargin-ot.height),tt.move(Fe),tt=tt.Sd();tt.next();)ft=tt.value,ft.fromSpot=Ps,ft.toSpot=Zs;fe=0<=a.commentSpacing?fe+(ot.width+a.commentSpacing):fe+(a.commentSpacing-ot.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)}},Or.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),ot=a.rowSpacing,ft=0;(b||_e||a.hm||a.im&&a.maxGenerationCount===1)&&(ft=Math.max(0,a.rowIndent)),b=a.width;var It=a.height,Mt=0,Ht=0,Gt=0,Vt=null,Qt=null,fn=0,ni=0,di=0,li=0,Vn=0,Dn=0,tr=0,Vi=0;if(Me&&!Kg(fe)&&135<E&&ne.reverse(),Kg(fe))if(1<ae)for(var qr=0;qr<ae;qr++)qr%2===0&&qr!==ae-1&&(Vi=Math.max(Vi,y?ne[qr].Da.width:ne[qr].Da.height));else ae===1&&(Vi=y?ne[0].Da.width:ne[0].Da.height);if(Me){switch(fe){case Hh:Ht=135>E?hx(this,a,ne,Vi,Mt,Ht):dx(this,a,ne,Vi,Mt,Ht),Vi=Ht.x,Mt=Ht.width,Ht=Ht.height;break;case Uh:for(Vt=0;Vt<ae;Vt++)Qt=ne[Vt],Fe=Qt.Da,Gt=Dn===0?0:ot,y?(Qt.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):(Qt.S.h(di+Gt,te-Fe.height),Mt=Math.max(Mt,di+Gt+Fe.width),Ht=Math.max(Ht,Fe.height),di+=Gt+Fe.width),Dn++;break;case fh:for(Vt=0;Vt<ae;Vt++)Qt=ne[Vt],te=Qt.Da,Fe=Dn===0?0:ot,y?(Qt.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):(Qt.S.h(di+Fe,Ye/2+a.focus.y),Mt=Math.max(Mt,di+Fe+te.width),Ht=Math.max(Ht,te.height),di+=Fe+te.width),Dn++}Vt=Ml(this,2),Qt=Ml(this,2),y?(Vt[0].h(0,0),Vt[1].h(0,Ht),Qt[0].h(Mt,0)):(Vt[0].h(0,0),Vt[1].h(Mt,0),Qt[0].h(0,Ht)),Qt[1].h(Mt,Ht)}else for(qr=0;qr<ae;qr++){var Mo=ne[qr],la=Mo.Da;if(y){0<Fe&&0<Dn&&di+Ye+la.width>Fe&&(di<te&&af(a,fe,te-di,0,tr,qr-1),Vn++,Dn=0,tr=qr,Gt=Ht,di=0,li=135<E?-Ht-ot:Ht+ot),R0(this,Mo,0,li);var ha=0;if(Dn===0)Vt=Mo.Yo,Qt=Mo.kp,fn=la.width,ni=la.height,(Vt===null||Qt===null||E!==qu(Mo))&&(Vt=Ml(this,2),Qt=Ml(this,2),Vt[0].h(0,0),Vt[1].h(0,ni),Qt[0].h(fn,0),Qt[1].h(fn,ni));else{var Ya=Un();ni=fx(this,a,Mo,Vt,Qt,fn,ni,Ya),ha=ni.x,Vt=Ya[0],Qt=Ya[1],fn=ni.width,ni=ni.height,qn(Ya),di<la.width&&0>ha&&(Bf(a,-ha,0,tr,qr-1),B0(Vt,-ha,0),B0(Qt,-ha,0),ha=0)}Mo.S.h(ha,li),Mt=Math.max(Mt,fn),Ht=Math.max(Ht,Gt+(Vn===0?0:ot)+la.height),di=fn}else 0<Fe&&0<Dn&&li+Ye+la.height>Fe&&(li<te&&af(a,fe,0,te-li,tr,qr-1),Vn++,Dn=0,tr=qr,Gt=Mt,li=0,di=135<E?-Mt-ot:Mt+ot),R0(this,Mo,di,0),ha=0,Dn===0?(Vt=Mo.Yo,Qt=Mo.kp,fn=la.width,ni=la.height,(Vt===null||Qt===null||E!==qu(Mo))&&(Vt=Ml(this,2),Qt=Ml(this,2),Vt[0].h(0,0),Vt[1].h(fn,0),Qt[0].h(0,ni),Qt[1].h(fn,ni))):(Ya=Un(),ni=fx(this,a,Mo,Vt,Qt,fn,ni,Ya),ha=ni.x,Vt=Ya[0],Qt=Ya[1],fn=ni.width,ni=ni.height,qn(Ya),li<la.height&&0>ha&&(Bf(a,0,-ha,tr,qr-1),B0(Vt,0,-ha),B0(Qt,0,-ha),ha=0)),Mo.S.h(di,ha),Ht=Math.max(Ht,ni),Mt=Math.max(Mt,Gt+(Vn===0?0:ot)+la.width),li=ni;Dn++}switch(0<Vn&&(y?(Ht+=Math.max(0,x),di<Mt&&af(a,fe,Mt-di,0,tr,ae-1),0<ft&&(_e||Bf(a,ft,0,0,ae-1),Mt+=ft)):(Mt+=Math.max(0,x),li<Ht&&af(a,fe,0,Ht-li,tr,ae-1),0<ft&&(_e||Bf(a,0,ft,0,ae-1),Ht+=ft))),ft=_e=0,fe){case Ip:y?_e+=Mt/2-a.focus.x-tt/2:ft+=Ht/2-a.focus.y-tt/2;break;case jf:0<Vn?y?_e+=Mt/2-a.focus.x-tt/2:ft+=Ht/2-a.focus.y-tt/2:y?(Vi=ne[0].S.x+ne[0].la.x,_e+=Vi+(ne[ae-1].S.x+ne[ae-1].la.x+2*ne[ae-1].focus.x-Vi)/2-a.focus.x-tt/2):(Vi=ne[0].S.y+ne[0].la.y,ft+=Vi+(ne[ae-1].S.y+ne[ae-1].la.y+2*ne[ae-1].focus.y-Vi)/2-a.focus.y-tt/2);break;case Yc:y?(_e-=tt,Mt+=tt):(ft-=tt,Ht+=tt);break;case Xc:y?(_e+=Mt-a.width+tt,Mt+=tt):(ft+=Ht-a.height+tt,Ht+=tt);break;case Hh:y?1<ae?_e+=Vi+Ye/2-a.focus.x:_e+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<ae?ft+=Vi+Ye/2-a.focus.y:ft+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Uh:y?_e+=Mt+Ye/2-a.focus.x:ft+=Ht+Ye/2-a.focus.y;break;case fh:break;default:Ht=this.customAlignment(a,_e,ft,Mt,Ht),_e=Ht[0],ft=Ht[1],Mt=Ht[2],Ht=Ht[3]}for(tt=0;tt<ae;tt++)Vi=ne[tt],y?Vi.S.h(Vi.S.x+Vi.la.x-_e,Vi.S.y+(135<E?(Me?-Ht:-Vi.Da.height)+Vi.la.y-x:It+x+Vi.la.y)):Vi.S.h(Vi.S.x+(135<E?(Me?-Mt:-Vi.Da.width)+Vi.la.x-x:b+x+Vi.la.x),Vi.S.y+Vi.la.y-ft);if(ae=ne=0,Me?y?(Mt=ky(a,Mt,_e),0>_e&&(_e=0),135<E&&(ft+=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,ft),0>ft&&(ft=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&&(ft+=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,ft=0):Ht=Ay(a,Ht,ft),0>ft&&(ae-=ft,ft=0),ne+=b+x),0<Vn)E=Ml(this,4),Vn=Ml(this,4),y?(E[2].h(0,It+x),E[3].h(E[2].x,Ht),Vn[2].h(Mt,E[2].y),Vn[3].h(Vn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(Mt,E[2].y),Vn[2].h(E[2].x,Ht),Vn[3].h(E[3].x,Vn[2].y));else{for(E=Ml(this,Vt.length+2),Vn=Ml(this,Qt.length+2),fe=0;fe<Vt.length;fe++)Me=Vt[fe],E[fe+2].h(Me.x+ne,Me.y+ae);for(fe=0;fe<Qt.length;fe++)Me=Qt[fe],Vn[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])),Vn[0].h(_e+b,0),Vn[1].h(Vn[0].x,It),Vn[2].y<Vn[1].y&&(Vn[2].x<Vn[0].x?Vn[2].assign(Vn[1]):Vn[1].assign(Vn[2])),Vn[3].y<Vn[2].y&&(Vn[3].x<Vn[0].x?Vn[3].assign(Vn[2]):Vn[2].assign(Vn[3])),E[2].y-=x/2,Vn[2].y-=x/2):(E[0].h(0,ft),E[1].h(b,E[0].y),E[2].x<E[1].x&&(E[2].y>E[0].y?E[2].assign(E[1]):E[1].assign(E[2])),E[3].x<E[2].x&&(E[3].y>E[0].y?E[3].assign(E[2]):E[2].assign(E[3])),Vn[0].h(0,ft+It),Vn[1].h(b,Vn[0].y),Vn[2].x<Vn[1].x&&(Vn[2].y<Vn[0].y?Vn[2].assign(Vn[1]):Vn[1].assign(Vn[2])),Vn[3].x<Vn[2].x&&(Vn[3].y<Vn[0].y?Vn[3].assign(Vn[2]):Vn[2].assign(Vn[3])),E[2].x-=x/2,Vn[2].x-=x/2),dc(this,Vt),dc(this,Qt),a.Yo=E,a.kp=Vn,a.la.h(_e,ft),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,ot=a.computeNodeIndent(y),ft=Me||Fe?0:ot/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,Vt=0,Qt=0,fn=0,ni=0,di=0,li=0,Vn=0,Dn=0,tr=0;if(ae&&!Kg(_e)&&135<b&&E.reverse(),Kg(_e))if(1<ne)for(var Vi=0;Vi<ne;Vi++){var qr=E[Vi],Mo=qr.Da;Vi%2===0&&Vi!==ne-1?Dn=Math.max(Dn,(x?Mo.width:Mo.height)+a.computeBusNodeSpacing(qr)-tt):Vi%2!==0&&(tr=Math.max(tr,(x?Mo.width:Mo.height)+a.computeBusNodeSpacing(qr)-tt))}else ne===1&&(Dn=x?E[0].Da.width:E[0].Da.height);if(ae)switch(_e){case Hh:case Jc:Vt=135>b?hx(a,y,E,Dn,Gt,Vt):dx(a,y,E,Dn,Gt,Vt),Dn=Vt.x,Gt=Vt.width,Vt=Vt.height;break;case Uh:for(Ye=0;Ye<ne;Ye++)ft=E[Ye],Qt=ft.Da,tr=li===0?0:It,x?(ft.S.h(te-Qt.width,ni+tr),Gt=Math.max(Gt,Qt.width),Vt=Math.max(Vt,ni+tr+Qt.height),ni+=tr+Qt.height):(ft.S.h(fn+tr,te-Qt.height),Gt=Math.max(Gt,fn+tr+Qt.width),Vt=Math.max(Vt,Qt.height),fn+=tr+Qt.width),li++;break;case fh:for(te=0;te<ne;te++)Ye=E[te],ft=Ye.Da,Qt=li===0?0:It,x?(Ye.S.h(tt/2+y.focus.x,ni+Qt),Gt=Math.max(Gt,ft.width),Vt=Math.max(Vt,ni+Qt+ft.height),ni+=Qt+ft.height):(Ye.S.h(fn+Qt,tt/2+y.focus.y),Gt=Math.max(Gt,fn+Qt+ft.width),Vt=Math.max(Vt,ft.height),fn+=Qt+ft.width),li++}else for(tr=0;tr<ne;tr++)Vi=E[tr],qr=Vi.Da,x?(0<Ye&&0<li&&fn+tt+qr.width>Ye&&(fn<te&&af(y,_e,te-fn,0,Vn,tr-1),di++,li=0,Vn=tr,Qt=Vt,fn=0,ni=135<b?-Vt-It:Vt+It),Mo=li===0?ft:tt,R0(a,Vi,0,ni),Vi.S.h(fn+Mo,ni),Gt=Math.max(Gt,fn+Mo+qr.width),Vt=Math.max(Vt,Qt+(di===0?0:It)+qr.height),fn+=Mo+qr.width):(0<Ye&&0<li&&ni+tt+qr.height>Ye&&(ni<te&&af(y,_e,0,te-ni,Vn,tr-1),di++,li=0,Vn=tr,Qt=Gt,ni=0,fn=135<b?-Gt-It:Gt+It),Mo=li===0?ft:tt,R0(a,Vi,fn,0),Vi.S.h(fn,ni+Mo),Vt=Math.max(Vt,ni+Mo+qr.height),Gt=Math.max(Gt,Qt+(di===0?0:It)+qr.width),ni+=Mo+qr.height),li++;switch(0<di&&(x?(Vt+=Math.max(0,fe),fn<Gt&&af(y,_e,Gt-fn,0,Vn,ne-1),0<Mt&&(Fe||Bf(y,Mt,0,0,ne-1),Gt+=Mt)):(Gt+=Math.max(0,fe),ni<Vt&&af(y,_e,0,Vt-ni,Vn,ne-1),0<Mt&&(Fe||Bf(y,0,Mt,0,ne-1),Vt+=Mt))),Mt=Fe=0,_e){case Ip:x?Fe+=Gt/2-y.focus.x-ot/2:Mt+=Vt/2-y.focus.y-ot/2;break;case jf:0<di?x?Fe+=Gt/2-y.focus.x-ot/2:Mt+=Vt/2-y.focus.y-ot/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-ot/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-ot/2);break;case Yc:x?(Fe-=ot,Gt+=ot):(Mt-=ot,Vt+=ot);break;case Xc:x?(Fe+=Gt-y.width+ot,Gt+=ot):(Mt+=Vt-y.height+ot,Vt+=ot);break;case Hh:case Jc:x?1<ne?Fe+=Dn+tt/2-y.focus.x:Fe+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?Mt+=Dn+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+=Vt+tt/2-y.focus.y;break;case fh:break;default:a=a.customAlignment(y,Fe,Mt,Gt,Vt),Fe=a[0],Mt=a[1],Gt=a[2],Vt=a[3]}for(a=0;a<ne;a++)ot=E[a],x?ot.S.h(ot.S.x+ot.la.x-Fe,ot.S.y+(135<b?(ae?-Vt:-ot.Da.height)+ot.la.y-fe:Ht+fe+ot.la.y)):ot.S.h(ot.S.x+(135<b?(ae?-Gt:-ot.Da.width)+ot.la.x-fe:Me+fe+ot.la.x),ot.S.y+ot.la.y-Mt);x?(Gt=ky(y,Gt,Fe),0>Fe&&(Fe=0),135<b&&(Mt+=Vt+fe),Vt=Math.max(Math.max(Vt,Ht),Vt+Ht+fe)):(135<b&&(Fe+=Gt+fe),Gt=Math.max(Math.max(Gt,Me),Gt+Me+fe),Vt=Ay(y,Vt,Mt),0>Mt&&(Mt=0)),y.la.h(Fe,Mt),y.Da.h(Gt,Vt)}}Or.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 _n(b,0,E,te);if(ne===1)return y=x[0],E=y.Da.width,te=y.Da.height,new _n(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 ot=x[tt],ft=ot.Da,It=Me===0?0:fe;if(_e){var Mt=a.computeBusNodeSpacing(ot)-ae;ot.S.h(b-(ft.width+Mt),Ye+It),E=Math.max(E,ft.width+Mt),te=Math.max(te,Ye+It+ft.height),Ye+=It+ft.height}else Mt=a.computeBusNodeSpacing(ot)-ae,ot.S.h(Fe+It,b-(ft.height+Mt)),te=Math.max(te,ft.height+Mt),E=Math.max(E,Fe+It+ft.width),Fe+=It+ft.width;Me++}for(Me=0,ot=Fe,tt=Ye,_e?(Fe=b+ae,Ye=0):(Fe=0,Ye=b+ae),ft=0;ft<ne;ft++)if(ft%2!==0){It=x[ft],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(ot),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(ot,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 _n(b,0,E,te)}function dx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new _n(b,0,E,te);if(ne===1)return x=x[0],E=x.Da.width,te=x.Da.height,new _n(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 ot=x[tt],ft=ot.Da,It=Me===0?0:fe;if(_e){var Mt=a.computeBusNodeSpacing(ot)-ae;Ye-=It+ft.height,ot.S.h(b-(ft.width+Mt),Ye),E=Math.max(E,ft.width+Mt),te=Math.max(te,Math.abs(Ye))}else Mt=a.computeBusNodeSpacing(ot)-ae,Fe-=It+ft.width,ot.S.h(Fe,b-(ft.height+Mt)),te=Math.max(te,ft.height+Mt),E=Math.max(E,Math.abs(Fe));Me++}for(Me=0,ot=Fe,tt=Ye,_e?(Fe=b+ae,Ye=0):(Fe=0,Ye=b+ae),ft=0;ft<ne;ft++)if(ft%2!==0){It=x[ft],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(ot),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(ot,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 _n(b,0,E,te)}Or.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Or.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,ot=x.kp;ne=x.Da;var ft=_e?Math.max(Ye,ne.height):Math.max(b,ne.width);if((tt===null||fe!==qu(x))&&(tt=Ml(a,2),ot=Ml(a,2),_e?(tt[0].h(0,0),tt[1].h(0,ne.height),ot[0].h(ne.width,0),ot[1].h(ot[0].x,tt[1].y)):(tt[0].h(0,0),tt[1].h(ne.width,0),ot[0].h(0,ne.height),ot[1].h(tt[1].x,ot[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=Ml(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=Ml(a,b),fe=0;fe<b;fe++)x[fe].assign(Me[fe]);dc(a,Me),b=x}if(te=ot,fe=Ye,Fe===null||2>Fe.length||te===null||2>te.length)E=null;else{for(Me=Ml(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=Ml(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=ft,dc(a,y),dc(a,tt),dc(a,Fe),dc(a,ot),ae[0]=b,ae[1]=E,new _n(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=Ml(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=Ml(a,b),fe=0;fe<b;fe++)x[fe].assign(Me[fe]);dc(a,Me),b=x}if(te=ot,fe=Ye,Fe===null||2>Fe.length||te===null||2>te.length)E=null;else{for(Me=Ml(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=Ml(a,E),x=0;x<E;x++)te[x].assign(Me[x]);dc(a,Me),E=te}return te=ft,ne=Math.max(0,Ye)+ne.height,dc(a,y),dc(a,tt),dc(a,Fe),dc(a,ot),ae[0]=b,ae[1]=E,new _n(Ye,0,te,ne)}function Ml(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)}Or.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)}}}Or.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Or.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Or.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 _n(0,te,x,ae))):this.angle===90?(E.push(new _n(0,te,x,ae)),te+=ae):this.angle===180?(te-=ae,E.push(new _n(te,0,ae,x))):(E.push(new _n(te,0,ae,x)),te+=ae)}this.commitLayers(E,b)}},Or.prototype.commitLayers=function(){},Or.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Or.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])}}Or.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=Ws;break;case 90:E=Zs;break;case 180:E=ks;break;default:E=Ps}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:Ps;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:fe=ks;break;case 90:fe=Ps;break;case 180:fe=Ws;break;default:fe=Zs}else y%2===0&&(fe=b===90||b===270?Ws:Zs);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?Ws:Zs,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:Ps,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=Ws;break;case 90:b.fromSpot=Zs;break;case 180:b.fromSpot=ks;break;default:b.fromSpot=Ps}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=ks;break;case 90:b.toSpot=Ps;break;case 180:b.toSpot=Ws;break;default:b.toSpot=Zs}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=Ws;break;case 90:b.toSpot=Zs;break;case 180:b.toSpot=ks;break;default:b.toSpot=Ps}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=ks;break;case 90:b.fromSpot=Ps;break;case 180:b.fromSpot=Ws;break;default:b.fromSpot=Zs}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}Or.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},Or.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(Or.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 Pn(Or,"PathDefault",-1),$c=new Pn(Or,"PathDestination",0),Ff=new Pn(Or,"PathSource",1),Op=new Pn(Or,"SortingForwards",10),Vg=new Pn(Or,"SortingReverse",11),$g=new Pn(Or,"SortingAscending",12),Yg=new Pn(Or,"SortingDescending",13),Ip=new Pn(Or,"AlignmentCenterSubtrees",20),jf=new Pn(Or,"AlignmentCenterChildren",21),Yc=new Pn(Or,"AlignmentStart",22),Xc=new Pn(Or,"AlignmentEnd",23),Hh=new Pn(Or,"AlignmentBus",24),Jc=new Pn(Or,"AlignmentBusBranching",25),Uh=new Pn(Or,"AlignmentTopLeftBus",26),fh=new Pn(Or,"AlignmentBottomRightBus",27),j0=new Pn(Or,"CompactionNone",30),Xg=new Pn(Or,"CompactionBlock",31),z0=new Pn(Or,"StyleLayered",40),Iy=new Pn(Or,"StyleLastParents",41),Dy=new Pn(Or,"StyleAlternating",42),Ry=new Pn(Or,"StyleRootOnly",43),H0=new Pn(Or,"ArrangementVertical",50),By=new Pn(Or,"ArrangementHorizontal",51),U0=new Pn(Or,"ArrangementFixedRoots",52),Fy=new Pn(Or,"LayerIndividual",60),jy=new Pn(Or,"LayerSiblings",61),G0=new Pn(Or,"LayerUniform",62);Or.className="TreeLayout",Or.PathDefault=F0,Or.PathDestination=$c,Or.PathSource=Ff,Or.SortingForwards=Op,Or.SortingReverse=Vg,Or.SortingAscending=$g,Or.SortingDescending=Yg,Or.AlignmentCenterSubtrees=Ip,Or.AlignmentCenterChildren=jf,Or.AlignmentStart=Yc,Or.AlignmentEnd=Xc,Or.AlignmentBus=Hh,Or.AlignmentBusBranching=Jc,Or.AlignmentTopLeftBus=Uh,Or.AlignmentBottomRightBus=fh,Or.CompactionNone=j0,Or.CompactionBlock=Xg,Or.StyleLayered=z0,Or.StyleLastParents=Iy,Or.StyleAlternating=Dy,Or.StyleRootOnly=Ry,Or.ArrangementVertical=H0,Or.ArrangementHorizontal=By,Or.ArrangementFixedRoots=U0,Or.LayerIndividual=Fy,Or.LayerSiblings=jy,Or.LayerUniform=G0;function zf(a){Oo.call(this,a)}nt(zf,Oo),zf.prototype.createVertex=function(){return new Fu(this)},zf.prototype.createEdge=function(){return new Dp(this)},zf.className="TreeNetwork";function Fu(a){oa.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 Xn(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=so,this.wr=!0,this.Dp=so}nt(Fu,oa),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){Hl.call(this,a),this.$t=new Tt(0,0)}nt(Dp,Hl),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===iu,_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===iu,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",Uo.prototype.initializeStandardTools=function(){this.gb("Action",new ei,this.mouseDownTools),this.gb("Relinking",new Zn,this.mouseDownTools),this.gb("LinkReshaping",new Kn,this.mouseDownTools),this.gb("Rotating",new Ni,this.mouseDownTools),this.gb("Resizing",new Ai,this.mouseDownTools),this.gb("Linking",new mn,this.mouseMoveTools),this.gb("Dragging",new ts,this.mouseMoveTools),this.gb("DragSelecting",new Ei,this.mouseMoveTools),this.gb("Panning",new wi,this.mouseMoveTools),this.gb("ContextMenu",new dr,this.mouseUpTools),this.gb("TextEditing",new Nr,this.mouseUpTools),this.gb("ClickCreating",new Gi,this.mouseUpTools),this.gb("ClickSelecting",new ur,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",ca),rp.add("TreeModel",xu);var W0=_t.go,zy={get licenseKey(){return dn.licenseKey},set licenseKey(a){dn.licenseKey=a},get version(){return dn.version},Group:sr,EnumValue:Pn,List:In,Set:On,Map:fi,Point:Tt,Size:Xn,Rect:_n,Margin:Ci,Spot:yi,Geometry:Jn,PathFigure:Ks,PathSegment:Wr,InputEvent:Ca,DiagramEvent:Pc,ChangedEvent:Ho,Model:Si,GraphLinksModel:jr,TreeModel:ll,Binding:Hs,Transaction:Bs,UndoManager:Bo,CommandHandler:Ot,Tool:Hr,DraggingTool:ts,DraggingInfo:ah,DraggingOptions:pe,LinkingBaseTool:Lt,LinkingTool:mn,RelinkingTool:Zn,LinkReshapingTool:Kn,ResizingTool:Ai,RotatingTool:Ni,ClickSelectingTool:ur,ActionTool:ei,ClickCreatingTool:Gi,HTMLInfo:Yi,ContextMenuTool:dr,DragSelectingTool:Ei,PanningTool:wi,TextEditingTool:Nr,ToolManager:Uo,Animation:fs,AnimationManager:Ao,AnimationTrigger:Fl,Layer:rs,Diagram:dn,Palette:De,Overview:He,Brush:vo,GraphObject:en,Panel:Gn,RowColumnDefinition:ea,Shape:pr,TextBlock:No,Picture:vl,Part:ki,Adornment:Xr,Node:ii,Link:$n,Placeholder:rl,Layout:es,LayoutNetwork:Oo,LayoutVertex:oa,LayoutEdge:Hl,GridLayout:xa,PanelLayout:ra,CircularLayout:ls,CircularNetwork:kp,CircularVertex:zg,CircularEdge:P0,ForceDirectedLayout:Ta,ForceDirectedNetwork:Rf,ForceDirectedVertex:Hg,ForceDirectedEdge:Ug,LayeredDigraphLayout:xo,LayeredDigraphNetwork:Np,LayeredDigraphVertex:bu,LayeredDigraphEdge:Zg,TreeLayout:Or,TreeNetwork:zf,TreeVertex:Fu,TreeEdge:Dp};typeof W0=="object"&&W0.version&&kn("WARNING: a `go` object on the root object is already defined. "+("Debug"in W0?"debug ":"")+"version: "+W0.version+", replaced with version: "+zy.version),dn.prototype.go=zy,_t.go=zy,typeof bn.exports=="object"&&(bn.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,We=me.LinkingBaseTool,gt=me.LinkingTool,ct=me.RelinkingTool,Ct=me.LinkReshapingTool,it=me.ResizingTool,yt=me.RotatingTool,ut=me.ClickSelectingTool,Ft=me.ActionTool,ht=me.ClickCreatingTool,rt=me.HTMLInfo,dt=me.ContextMenuTool,St=me.DragSelectingTool,Et=me.PanningTool,vt=me.TextEditingTool,Bt=me.ToolManager,jt=me.Animation,ln=me.AnimationManager,$t=me.AnimationTrigger,yn=me.Layer,Ut=me.Diagram,Wt=me.Palette,Xt=me.Overview,mt=me.Brush,ze=me.GraphObject,Be=me.Panel,et=me.RowColumnDefinition,qe=me.Shape,Ue=me.TextBlock,Xe=me.TextBlockMetrics,Re=me.Picture,Ae=me.Part,Ge=me.Adornment,Ke=me.Node,Ze=me.Link,at=me.Placeholder,xt=me.Layout,tn=me.LayoutNetwork,nn=me.LayoutVertex,Jt=me.LayoutEdge,pn=me.GridLayout,Mn=me.PanelLayout,hn=me.CircularLayout,En=me.CircularNetwork,Wn=me.CircularVertex,Tn=me.CircularEdge,ci=me.ForceDirectedLayout,ri=me.ForceDirectedNetwork,Ii=me.ForceDirectedVertex,bi=me.ForceDirectedEdge,nr=me.LayeredDigraphLayout,Ji=me.LayeredDigraphNetwork,gr=me.LayeredDigraphVertex,cr=me.LayeredDigraphEdge,eo=me.TreeLayout,ro=me.TreeNetwork,hi=me.TreeVertex,Pr=me.TreeEdge,Hi=me.version},24334:function(bn,qt,Ee){var Le,me;(function(Ie,Te){bn.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,yt=ct.length;it<yt;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),yt=[Pe.charAt(it>>>18),Pe.charAt(it>>>12&63),Ct>=2?"=":Pe.charAt(it>>>6&63),Ct>=1?"=":Pe.charAt(it&63)];return yt.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="",yt=0,ut=ct.length;yt<ut;yt+=3){var Ft=ct[yt],ht=ct[yt+1],rt=ct[yt+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,yt=(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(yt>>>16),Se(yt>>>8&255),Se(yt&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 We=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:We,fromUint8Array:ie,toUint8Array:Qe},typeof Object.defineProperty=="function"){var gt=function(ct){return{value:ct,enumerable:!1,writable:!0,configurable:!0}};Ie.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",gt(function(){return Ve(this)})),Object.defineProperty(String.prototype,"toBase64",gt(function(ct){return ee(this,ct)})),Object.defineProperty(String.prototype,"toBase64URI",gt(function(){return ee(this,!0)}))}}return Ie.Meteor&&(Base64=Ie.Base64),bn.exports?bn.exports.Base64=Ie.Base64:(Le=[],me=function(){return Ie.Base64}.apply(qt,Le),me!==void 0&&(bn.exports=me)),{Base64:Ie.Base64}})},2859:function(bn,qt,Ee){"use strict";Ee.d(qt,{hP:function(){return Xt}});var Le=function(mt,ze){return(Le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Be,et){Be.__proto__=et}||function(Be,et){for(var qe in et)Object.prototype.hasOwnProperty.call(et,qe)&&(Be[qe]=et[qe])})(mt,ze)};function me(mt,ze){function Be(){this.constructor=mt}Le(mt,ze),mt.prototype=ze===null?Object.create(ze):(Be.prototype=ze.prototype,new Be)}function Ie(mt,ze,Be,et){return new(Be||(Be=Promise))(function(qe,Ue){function Xe(Ge){try{Ae(et.next(Ge))}catch(Ke){Ue(Ke)}}function Re(Ge){try{Ae(et.throw(Ge))}catch(Ke){Ue(Ke)}}function Ae(Ge){var Ke;Ge.done?qe(Ge.value):(Ke=Ge.value,Ke instanceof Be?Ke:new Be(function(Ze){Ze(Ke)})).then(Xe,Re)}Ae((et=et.apply(mt,ze||[])).next())})}function Te(mt,ze){var Be,et,qe,Ue,Xe={label:0,sent:function(){if(1&qe[0])throw qe[1];return qe[1]},trys:[],ops:[]};return Ue={next:Re(0),throw:Re(1),return:Re(2)},typeof Symbol=="function"&&(Ue[Symbol.iterator]=function(){return this}),Ue;function Re(Ae){return function(Ge){return function(Ke){if(Be)throw new TypeError("Generator is already executing.");for(;Xe;)try{if(Be=1,et&&(qe=2&Ke[0]?et.return:Ke[0]?et.throw||((qe=et.return)&&qe.call(et),0):et.next)&&!(qe=qe.call(et,Ke[1])).done)return qe;switch(et=0,qe&&(Ke=[2&Ke[0],qe.value]),Ke[0]){case 0:case 1:qe=Ke;break;case 4:return Xe.label++,{value:Ke[1],done:!1};case 5:Xe.label++,et=Ke[1],Ke=[0];continue;case 7:Ke=Xe.ops.pop(),Xe.trys.pop();continue;default:if(qe=Xe.trys,!((qe=qe.length>0&&qe[qe.length-1])||Ke[0]!==6&&Ke[0]!==2)){Xe=0;continue}if(Ke[0]===3&&(!qe||Ke[1]>qe[0]&&Ke[1]<qe[3])){Xe.label=Ke[1];break}if(Ke[0]===6&&Xe.label<qe[1]){Xe.label=qe[1],qe=Ke;break}if(qe&&Xe.label<qe[2]){Xe.label=qe[2],Xe.ops.push(Ke);break}qe[2]&&Xe.ops.pop(),Xe.trys.pop();continue}Ke=ze.call(mt,Xe)}catch(Ze){Ke=[6,Ze],et=0}finally{Be=qe=0}if(5&Ke[0])throw Ke[1];return{value:Ke[0]?Ke[1]:void 0,done:!0}}([Ae,Ge])}}}function be(){for(var mt=0,ze=0,Be=arguments.length;ze<Be;ze++)mt+=arguments[ze].length;var et=Array(mt),qe=0;for(ze=0;ze<Be;ze++)for(var Ue=arguments[ze],Xe=0,Re=Ue.length;Xe<Re;Xe++,qe++)et[qe]=Ue[Xe];return et}var Pe=function(){function mt(){}return mt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},mt.setAttributes=function(ze,Be){for(var et=0,qe=Be;et<qe.length;et++){var Ue=qe[et],Xe=Ue[0],Re=Ue[1];ze.setAttribute(Xe,Re)}},mt.createRect=function(ze,Be,et){var qe=document.createElementNS("http://www.w3.org/2000/svg","rect");return qe.setAttribute("width",ze.toString()),qe.setAttribute("height",Be.toString()),et&&mt.setAttributes(qe,et),qe},mt.createLine=function(ze,Be,et,qe,Ue){var Xe=document.createElementNS("http://www.w3.org/2000/svg","line");return Xe.setAttribute("x1",ze.toString()),Xe.setAttribute("y1",Be.toString()),Xe.setAttribute("x2",et.toString()),Xe.setAttribute("y2",qe.toString()),Ue&&mt.setAttributes(Xe,Ue),Xe},mt.createPolygon=function(ze,Be){var et=document.createElementNS("http://www.w3.org/2000/svg","polygon");return et.setAttribute("points",ze),Be&&mt.setAttributes(et,Be),et},mt.createCircle=function(ze,Be){var et=document.createElementNS("http://www.w3.org/2000/svg","circle");return et.setAttribute("cx",(ze/2).toString()),et.setAttribute("cy",(ze/2).toString()),et.setAttribute("r",ze.toString()),Be&&mt.setAttributes(et,Be),et},mt.createEllipse=function(ze,Be,et){var qe=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return qe.setAttribute("cx",(ze/2).toString()),qe.setAttribute("cy",(Be/2).toString()),qe.setAttribute("rx",(ze/2).toString()),qe.setAttribute("ry",(Be/2).toString()),et&&mt.setAttributes(qe,et),qe},mt.createGroup=function(ze){var Be=document.createElementNS("http://www.w3.org/2000/svg","g");return ze&&mt.setAttributes(Be,ze),Be},mt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},mt.createMarker=function(ze,Be,et,qe,Ue,Xe,Re){var Ae=document.createElementNS("http://www.w3.org/2000/svg","marker");return mt.setAttributes(Ae,[["id",ze],["orient",Be],["markerWidth",et.toString()],["markerHeight",qe.toString()],["refX",Ue.toString()],["refY",Xe.toString()]]),Ae.appendChild(Re),Ae},mt.createText=function(ze){var Be=document.createElementNS("http://www.w3.org/2000/svg","text");return Be.setAttribute("x","0"),Be.setAttribute("y","0"),ze&&mt.setAttributes(Be,ze),Be},mt.createTSpan=function(ze,Be){var et=document.createElementNS("http://www.w3.org/2000/svg","tspan");return et.textContent=ze,Be&&mt.setAttributes(et,Be),et},mt.createImage=function(ze){var Be=document.createElementNS("http://www.w3.org/2000/svg","image");return ze&&mt.setAttributes(Be,ze),Be},mt.createPoint=function(ze,Be){var et=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return et.x=ze,et.y=Be,et},mt.createPath=function(ze,Be){var et=document.createElementNS("http://www.w3.org/2000/svg","path");return et.setAttribute("d",ze),Be&&mt.setAttributes(et,Be),et},mt}(),he=function(){function mt(){}return mt.addKey=function(ze){mt.key=ze},Object.defineProperty(mt,"isLicensed",{get:function(){return!!mt.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(mt.key)},enumerable:!1,configurable:!0}),mt}(),Se=function(){function mt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return mt.prototype.rasterize=function(ze,Be,et){var qe=this;return new Promise(function(Ue){var Xe=et!==void 0?et:document.createElement("canvas");ze===null&&(qe.markersOnly=!0,qe.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,qe.naturalSize===!0?(Re.width.baseVal.value=ze.naturalWidth,Re.height.baseVal.value=ze.naturalHeight):qe.width!==void 0&&qe.height!==void 0&&(Re.width.baseVal.value=qe.width,Re.height.baseVal.value=qe.height),Xe.width=Re.width.baseVal.value,Xe.height=Re.height.baseVal.value;var Ae=Re.outerHTML,Ge=Xe.getContext("2d");qe.markersOnly!==!0&&Ge.drawImage(ze,0,0,Xe.width,Xe.height);var Ke=window.URL,Ze=new Image(Xe.width,Xe.height);Ze.setAttribute("crossOrigin","anonymous");var at=new Blob([Ae],{type:"image/svg+xml"}),xt=Ke.createObjectURL(at);Ze.onload=function(){Ge.drawImage(Ze,0,0),Ke.revokeObjectURL(xt);var tn=Xe.toDataURL(qe.imageType,qe.imageQuality);Ue(tn)},Ze.src=xt})},mt}(),xe=function(){},ge=function(){function mt(ze){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ze+"_"}return Object.defineProperty(mt.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(mt.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(mt.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),mt.prototype.addClass=function(ze){return this.styleSheet===void 0&&this.addStyleSheet(),ze.name=""+this.classNamePrefix+ze.localName,this.classes.push(ze),this.styleSheet.sheet.insertRule("."+ze.name+" {"+ze.style+"}",this.styleSheet.sheet.cssRules.length),ze},mt.prototype.addRule=function(ze){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ze),this.styleSheet.sheet.insertRule(ze.selector+" {"+ze.style+"}",this.styleSheet.sheet.cssRules.length)},mt.prototype.addStyleSheet=function(){var ze;this.styleSheet=document.createElement("style"),((ze=this.styleSheetRoot)!==null&&ze!==void 0?ze: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;
|
|
|
`))},mt.prototype.removeStyleSheet=function(){var ze;this.styleSheet&&(((ze=this.styleSheetRoot)!==null&&ze!==void 0?ze:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},mt}(),ce=function(mt,ze){this.selector=mt,this.style=ze},ve=function(mt,ze){this.localName=mt,this.style=ze},de=function(){function mt(ze,Be,et,qe,Ue){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=ze,this.displayMode=Be,this.markerItems=et,this.uiStyleSettings=qe,this.styles=Ue,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return mt.prototype.show=function(ze){var Be=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ze,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var et=document.createElement("div");et.className=this.toolbarBlockStyleClass.name,et.style.whiteSpace="nowrap",this.uiContainer.appendChild(et),this.addActionButton(et,'<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(et,'<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(et,'<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(et,'<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(et,'<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(et,'<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(et,'<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(et,'<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(Ue){var Xe=document.createElement("div");Xe.className=""+Be.toolbarButtonStyleClass.name,Xe.setAttribute("data-type-name",Ue.typeName),Xe.innerHTML=Ue.icon,Xe.addEventListener("click",function(){Be.markerToolbarButtonClicked(Xe,Ue)}),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 qe=document.createElement("div");qe.className=this.toolbarBlockStyleClass.name,qe.style.whiteSpace="nowrap",qe.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(qe),this.addActionButton(qe,'<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(qe,'<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()},mt.prototype.addButtonClickListener=function(ze){this.buttonClickListeners.push(ze)},mt.prototype.removeButtonClickListener=function(ze){this.buttonClickListeners.indexOf(ze)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ze),1)},mt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},mt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var ze=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<ze||Be===ze&&this.markerButtons.length-1===ze?this.markerButtonBlock.appendChild(this.markerButtons[Be]):(Be===ze&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Be]))}},mt.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")},mt.prototype.resetButtonStyles=function(){var ze=this;this.buttons.forEach(function(Be){Be.className=Be.className.replace(ze.uiStyleSettings.toolbarButtonStyleColorsClassName?ze.uiStyleSettings.toolbarButtonStyleColorsClassName:ze.toolbarButtonStyleColorsClass.name,"").trim(),Be.className=Be.className.replace(ze.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?ze.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:ze.toolbarActiveButtonStyleColorsClass.name,"").trim(),Be.className+=" "+(ze.uiStyleSettings.toolbarButtonStyleColorsClassName?ze.uiStyleSettings.toolbarButtonStyleColorsClassName:ze.toolbarButtonStyleColorsClass.name)})},mt.prototype.addActionButton=function(ze,Be,et){var qe=this,Ue=document.createElement("div");switch(Ue.className=""+this.toolbarButtonStyleClass.name,Ue.innerHTML=Be,Ue.setAttribute("data-action",et),Ue.addEventListener("click",function(){qe.actionToolbarButtonClicked(Ue,et)}),et){case"select":Ue.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Ue.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Ue.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Ue.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Ue.style.fill=this.uiStyleSettings.closeButtonColor}ze.appendChild(Ue),this.buttons.push(Ue)},mt.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 ze=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ve("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*ze)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*ze)+`px;
|
|
|
padding: `+ze+`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+`
|
|
|
`))},mt.prototype.markerToolbarButtonClicked=function(ze,Be){this.setActiveButton(ze),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(et){return et("marker",Be)}),this.markerButtonOverflowBlock.style.display="none"},mt.prototype.actionToolbarButtonClicked=function(ze,Be){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(et){return et("action",Be)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},mt.prototype.setActiveButton=function(ze){this.resetButtonStyles(),ze.className=ze.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),ze.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},mt.prototype.setActiveMarkerButton=function(ze){var Be=this.markerButtons.find(function(et){return et.getAttribute("data-type-name")===ze});Be&&this.setActiveButton(Be)},mt.prototype.setCurrentMarker=function(ze){var Be=this;this.currentMarker=ze,this.buttons.filter(function(et){return/delete|notes/.test(et.getAttribute("data-action"))}).forEach(function(et){Be.currentMarker===void 0?(et.style.fillOpacity="0.4",et.style.pointerEvents="none"):(et.style.fillOpacity="1",et.style.pointerEvents="all")})},mt}(),ue=function(){function mt(ze,Be,et,qe){this.panels=[],this.panelButtons=[],this.markerjsContainer=ze,this.displayMode=Be,this.uiStyleSettings=et,this.styles=qe,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return mt.prototype.addStyles=function(){var ze;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: `+((ze=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ze!==void 0?ze: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;
|
|
|
`))},mt.prototype.show=function(ze){var Be;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ze,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Be=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Be!==void 0?Be:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},mt.prototype.setPanelButtons=function(ze){var Be,et,qe=this;this.panels=ze,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+" "+((et=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&et!==void 0?et:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Ue){var Xe;Ue.uiStyleSettings=qe.uiStyleSettings;var Re=document.createElement("div");Re.className=qe.toolboxButtonStyleClass.name+" "+((Xe=qe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Xe!==void 0?Xe:qe.toolboxButtonStyleColorsClass.name),Re.innerHTML=Ue.icon,Re.title=Ue.title,Re.addEventListener("click",function(){qe.panelButtonClick(Ue)}),qe.panelButtons.push(Re),qe.buttonRow.appendChild(Re)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},mt.prototype.panelButtonClick=function(ze){var Be=this,et=-1;if(ze!==this.activePanel){et=this.panels.indexOf(ze),this.panelRow.innerHTML="";var qe=ze.getUi();qe.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(qe),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=ze}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(Ue,Xe){var Re,Ae;Ue.className=Be.toolboxButtonStyleClass.name+" "+(Xe===et?""+((Re=Be.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Re!==void 0?Re:Be.toolboxActiveButtonStyleColorsClass.name):""+((Ae=Be.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ae!==void 0?Ae:Be.toolboxButtonStyleColorsClass.name))})},mt}(),z=function(mt,ze){this.title=mt,this.icon=ze},ee=function(mt){function ze(Be,et,qe,Ue){var Xe=mt.call(this,Be,Ue||'<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=et,Xe.currentColor=qe,Xe.setCurrentColor=Xe.setCurrentColor.bind(Xe),Xe.getColorBox=Xe.getColorBox.bind(Xe),Xe}return me(ze,mt),ze.prototype.getUi=function(){var Be=this,et=document.createElement("div");return et.style.overflow="hidden",et.style.whiteSpace="nowrap",this.colors.forEach(function(qe){var Ue=Be.getColorBox(qe);et.appendChild(Ue),Be.colorBoxes.push(Ue)}),et},ze.prototype.getColorBox=function(Be){var et=this,qe=this.uiStyleSettings.toolbarHeight/4,Ue=this.uiStyleSettings.toolbarHeight-qe,Xe=document.createElement("div");Xe.style.display="inline-block",Xe.style.boxSizing="content-box",Xe.style.width=Ue-2+"px",Xe.style.height=Ue-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=(Ue+2)/2+"px",Xe.style.borderColor=Be===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Xe.addEventListener("click",function(){et.setCurrentColor(Be,Xe)});var Re=document.createElement("div");return Re.style.display="inline-block",Re.style.width=Ue-2+"px",Re.style.height=Ue-2+"px",Re.style.backgroundColor=Be,Re.style.borderRadius=Ue/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},ze.prototype.setCurrentColor=function(Be,et){var qe=this;this.currentColor=Be,this.colorBoxes.forEach(function(Ue){Ue.style.borderColor=Ue===et?qe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Be)},ze}(z),oe=function(){function mt(ze,Be,et){this._state="new",this._isSelected=!1,this._container=ze,this._overlayContainer=Be,this.globalSettings=et,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(mt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),mt.prototype.ownsTarget=function(ze){return!1},Object.defineProperty(mt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),mt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},mt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},mt.prototype.pointerDown=function(ze,Be){},mt.prototype.dblClick=function(ze,Be){},mt.prototype.manipulate=function(ze){},mt.prototype.pointerUp=function(ze){this.stateChanged()},mt.prototype.dispose=function(){},mt.prototype.addMarkerVisualToContainer=function(ze){this.container.childNodes.length>0?this.container.insertBefore(ze,this.container.childNodes[0]):this.container.appendChild(ze)},mt.prototype.getState=function(){return{typeName:mt.typeName,state:this.state,notes:this.notes}},mt.prototype.restoreState=function(ze){this._state=ze.state,this.notes=ze.notes},mt.prototype.scale=function(ze,Be){},mt.prototype.colorChanged=function(ze){this.onColorChanged&&this.onColorChanged(ze),this.stateChanged()},mt.prototype.fillColorChanged=function(ze){this.onFillColorChanged&&this.onFillColorChanged(ze),this.stateChanged()},mt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var ze=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),ze.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(ze)&&this.onStateChanged(this)}},mt.typeName="MarkerBase",mt}(),ie=function(){function mt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return mt.prototype.findGripByVisual=function(ze){return this.topLeft.ownsTarget(ze)?this.topLeft:this.topCenter.ownsTarget(ze)?this.topCenter:this.topRight.ownsTarget(ze)?this.topRight:this.centerLeft.ownsTarget(ze)?this.centerLeft:this.centerRight.ownsTarget(ze)?this.centerRight:this.bottomLeft.ownsTarget(ze)?this.bottomLeft:this.bottomCenter.ownsTarget(ze)?this.bottomCenter:this.bottomRight.ownsTarget(ze)?this.bottomRight:void 0},mt}(),se=function(){function mt(){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 mt.prototype.ownsTarget=function(ze){return ze===this.visual||ze===this.visual.childNodes[0]||ze===this.visual.childNodes[1]},mt}(),le=function(){function mt(){}return mt.toITransformMatrix=function(ze){return{a:ze.a,b:ze.b,c:ze.c,d:ze.d,e:ze.e,f:ze.f}},mt.toSVGMatrix=function(ze,Be){return ze.a=Be.a,ze.b=Be.b,ze.c=Be.c,ze.d=Be.d,ze.e=Be.e,ze.f=Be.f,ze},mt}(),ye=function(mt){function ze(Be,et,qe){var Ue=mt.call(this,Be,et,qe)||this;return Ue.left=0,Ue.top=0,Ue.width=0,Ue.height=0,Ue.defaultSize={x:50,y:20},Ue.offsetX=0,Ue.offsetY=0,Ue.rotationAngle=0,Ue.CB_DISTANCE=10,Ue._suppressMarkerCreateEvent=!1,Ue.container.transform.baseVal.appendItem(Pe.createTransform()),Ue.setupControlBox(),Ue}return me(ze,mt),Object.defineProperty(ze.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"visual",{get:function(){return this._visual},set:function(Be){this._visual=Be;var et=Pe.createTransform();this._visual.transform.baseVal.appendItem(et)},enumerable:!1,configurable:!0}),ze.prototype.ownsTarget=function(Be){return!!mt.prototype.ownsTarget.call(this,Be)||!!(this.controlGrips.findGripByVisual(Be)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Be))},ze.prototype.pointerDown=function(Be,et){mt.prototype.pointerDown.call(this,Be,et),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 qe=this.unrotatePoint(Be);if(this.manipulationStartX=qe.x,this.manipulationStartY=qe.y,this.offsetX=qe.x-this.left,this.offsetY=qe.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(et),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(et)){this.activeGrip=this.rotatorGrip;var Ue=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Ue.x-this.width/2,this.top=Ue.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"},ze.prototype.pointerUp=function(Be){var et=this.state;mt.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",et==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},ze.prototype.moveVisual=function(Be){this.visual.style.transform="translate("+Be.x+"px, "+Be.y+"px)"},ze.prototype.manipulate=function(Be){var et=this.unrotatePoint(Be);this.state==="creating"?this.resize(Be):this.state==="move"?(this.left=this.manipulationStartLeft+(et.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(et.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(et):this.state==="rotate"&&this.rotate(Be)},ze.prototype.resize=function(Be){var et=this.manipulationStartLeft,qe=this.manipulationStartWidth,Ue=this.manipulationStartTop,Xe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:et=this.manipulationStartLeft+Be.x-this.manipulationStartX,qe=this.manipulationStartWidth+this.manipulationStartLeft-et;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:qe=this.manipulationStartWidth+Be.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Ue=this.manipulationStartTop+Be.y-this.manipulationStartY,Xe=this.manipulationStartHeight+this.manipulationStartTop-Ue;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Xe=this.manipulationStartHeight+Be.y-this.manipulationStartY}qe>=0?(this.left=et,this.width=qe):(this.left=et+qe,this.width=-qe),Xe>=0?(this.top=Ue,this.height=Xe):(this.top=Ue+Xe,this.height=-Xe),this.setSize()},ze.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},ze.prototype.rotate=function(Be){if(Math.abs(Be.x-this.centerX)>.1){var et=Math.sign(Be.x-this.centerX);this.rotationAngle=180*Math.atan((Be.y-this.centerY)/(Be.x-this.centerX))/Math.PI+90*et,this.applyRotation()}},ze.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)},ze.prototype.rotatePoint=function(Be){if(this.rotationAngle===0)return Be;var et=this.container.getCTM(),qe=Pe.createPoint(Be.x,Be.y);return{x:(qe=qe.matrixTransform(et)).x,y:qe.y}},ze.prototype.unrotatePoint=function(Be){if(this.rotationAngle===0)return Be;var et=this.container.getCTM();et=et.inverse();var qe=Pe.createPoint(Be.x,Be.y);return{x:(qe=qe.matrixTransform(et)).x,y:qe.y}},ze.prototype.select=function(){mt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ze.prototype.deselect=function(){mt.prototype.deselect.call(this),this.controlBox.style.display="none"},ze.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"},ze.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()},ze.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()},ze.prototype.createGrip=function(){var Be=new se;return Be.visual.transform.baseVal.appendItem(Pe.createTransform()),this.controlBox.appendChild(Be.visual),Be},ze.prototype.positionGrips=function(){var Be=this.controlGrips.topLeft.GRIP_SIZE,et=-Be/2,qe=et,Ue=(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,et,qe),this.positionGrip(this.controlGrips.topCenter.visual,Ue,qe),this.positionGrip(this.controlGrips.topRight.visual,Ae,qe),this.positionGrip(this.controlGrips.centerLeft.visual,et,Xe),this.positionGrip(this.controlGrips.centerRight.visual,Ae,Xe),this.positionGrip(this.controlGrips.bottomLeft.visual,et,Re),this.positionGrip(this.controlGrips.bottomCenter.visual,Ue,Re),this.positionGrip(this.controlGrips.bottomRight.visual,Ae,Re),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Ue,qe-3*this.CB_DISTANCE)},ze.prototype.positionGrip=function(Be,et,qe){var Ue=Be.transform.baseVal.getItem(0);Ue.setTranslate(et,qe),Be.transform.baseVal.replaceItem(Ue,0)},ze.prototype.hideControlBox=function(){this.controlBox.style.display="none"},ze.prototype.showControlBox=function(){this.controlBox.style.display=""},ze.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)},mt.prototype.getState.call(this))},ze.prototype.restoreState=function(Be){mt.prototype.restoreState.call(this,Be);var et=Be;this.left=et.left,this.top=et.top,this.width=et.width,this.height=et.height,this.rotationAngle=et.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(le.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,et.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(le.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,et.containerTransformMatrix))},ze.prototype.scale=function(Be,et){mt.prototype.scale.call(this,Be,et);var qe=this.rotatePoint({x:this.left,y:this.top}),Ue=this.unrotatePoint({x:qe.x*Be,y:qe.y*et});this.left=Ue.x,this.top=Ue.y,this.width=this.width*Be,this.height=this.height*et,this.adjustControlBox()},ze}(oe),we=function(mt){function ze(Be,et,qe){var Ue=mt.call(this,Be,et,qe)||this;return Ue.fillColor="transparent",Ue.strokeColor="transparent",Ue.strokeWidth=0,Ue.strokeDasharray="",Ue.opacity=1,Ue.setStrokeColor=Ue.setStrokeColor.bind(Ue),Ue.setFillColor=Ue.setFillColor.bind(Ue),Ue.setStrokeWidth=Ue.setStrokeWidth.bind(Ue),Ue.setStrokeDasharray=Ue.setStrokeDasharray.bind(Ue),Ue.createVisual=Ue.createVisual.bind(Ue),Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){return!(!mt.prototype.ownsTarget.call(this,Be)&&Be!==this.visual)},ze.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)},ze.prototype.pointerDown=function(Be,et){mt.prototype.pointerDown.call(this,Be,et),this.state==="new"&&(this.createVisual(),this.moveVisual(Be),this._state="creating")},ze.prototype.manipulate=function(Be){mt.prototype.manipulate.call(this,Be)},ze.prototype.resize=function(Be){mt.prototype.resize.call(this,Be),this.setSize()},ze.prototype.setSize=function(){mt.prototype.setSize.call(this),Pe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ze.prototype.pointerUp=function(Be){mt.prototype.pointerUp.call(this,Be),this.setSize()},ze.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.visual&&Pe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Be),this.stateChanged()},ze.prototype.setFillColor=function(Be){this.fillColor=Be,this.visual&&Pe.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ze.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.visual&&Pe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ze.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.visual&&Pe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ze.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},mt.prototype.getState.call(this))},ze.prototype.restoreState=function(Be){var et=Be;this.fillColor=et.fillColor,this.strokeColor=et.strokeColor,this.strokeWidth=et.strokeWidth,this.strokeDasharray=et.strokeDasharray,this.opacity=et.opacity,this.createVisual(),mt.prototype.restoreState.call(this,Be),this.setSize()},ze.prototype.scale=function(Be,et){mt.prototype.scale.call(this,Be,et),this.setSize()},ze.title="Rectangle marker",ze}(ye),Ce=function(mt){function ze(Be,et,qe,Ue){var Xe=mt.call(this,Be,Ue||'<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=et,Xe.currentWidth=qe,Xe.setCurrentWidth=Xe.setCurrentWidth.bind(Xe),Xe}return me(ze,mt),ze.prototype.getUi=function(){var Be=this,et=document.createElement("div");return et.style.display="flex",et.style.overflow="hidden",et.style.flexGrow="2",this.widths.forEach(function(qe){var Ue=document.createElement("div");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=qe===Be.currentWidth?Be.uiStyleSettings.toolboxAccentColor:"transparent",Ue.addEventListener("click",function(){Be.setCurrentWidth(qe,Ue)}),et.appendChild(Ue);var Xe=document.createElement("div");Xe.innerText=qe.toString(),Xe.style.marginRight="5px",Ue.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=qe+"px solid "+Be.uiStyleSettings.toolboxColor,Ae.style.flexGrow="2",Re.appendChild(Ae),Ue.appendChild(Re),Be.widthBoxes.push(Ue)}),et},ze.prototype.setCurrentWidth=function(Be,et){var qe=this;this.currentWidth=Be,this.widthBoxes.forEach(function(Ue){Ue.style.borderColor=Ue===et?qe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ze}(z),ke=function(mt){function ze(Be,et,qe,Ue){var Xe=mt.call(this,Be,Ue||'<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=et,Xe.currentStyle=qe,Xe.setCurrentStyle=Xe.setCurrentStyle.bind(Xe),Xe}return me(ze,mt),ze.prototype.getUi=function(){var Be=this,et=document.createElement("div");return et.style.display="flex",et.style.overflow="hidden",et.style.flexGrow="2",this.styles.forEach(function(qe){var Ue=document.createElement("div");Ue.style.display="flex",Ue.style.alignItems="center",Ue.style.justifyContent="space-between",Ue.style.padding="5px",Ue.style.borderWidth="2px",Ue.style.borderStyle="solid",Ue.style.overflow="hidden",Ue.style.maxWidth=100/Be.styles.length-5+"%",Ue.style.borderColor=qe===Be.currentStyle?Be.uiStyleSettings.toolboxAccentColor:"transparent",Ue.addEventListener("click",function(){Be.setCurrentStyle(qe,Ue)}),et.appendChild(Ue);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" '+(qe!==""?'stroke-dasharray="'+qe+'"':"")+` />
|
|
|
</svg>`;Xe.innerHTML=Re,Ue.appendChild(Xe),Be.styleBoxes.push(Ue)}),et},ze.prototype.setCurrentStyle=function(Be,et){var qe=this;this.currentStyle=Be,this.styleBoxes.forEach(function(Ue){Ue.style.borderColor=Ue===et?qe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ze}(z),Ne=function(mt){function ze(Be,et,qe){var Ue=mt.call(this,Be,et,qe)||this;return Ue.strokeColor=qe.defaultColor,Ue.strokeWidth=qe.defaultStrokeWidth,Ue.strokeDasharray=qe.defaultStrokeDasharray,Ue.strokePanel=new ee("Line color",qe.defaultColorSet,qe.defaultColor),Ue.strokePanel.onColorChanged=Ue.setStrokeColor,Ue.strokeWidthPanel=new Ce("Line width",qe.defaultStrokeWidths,qe.defaultStrokeWidth),Ue.strokeWidthPanel.onWidthChanged=Ue.setStrokeWidth,Ue.strokeStylePanel=new ke("Line style",qe.defaultStrokeDasharrays,qe.defaultStrokeDasharray),Ue.strokeStylePanel.onStyleChanged=Ue.setStrokeDasharray,Ue}return me(ze,mt),Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=mt.prototype.getState.call(this);return Be.typeName=ze.typeName,Be},ze.typeName="FrameMarker",ze.title="Frame marker",ze.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',ze}(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(mt){function ze(Be,et,qe){var Ue=mt.call(this,Be,et,qe)||this;return Ue.x1=0,Ue.y1=0,Ue.x2=0,Ue.y2=0,Ue.defaultLength=50,Ue.manipulationStartX=0,Ue.manipulationStartY=0,Ue.manipulationStartX1=0,Ue.manipulationStartY1=0,Ue.manipulationStartX2=0,Ue.manipulationStartY2=0,Ue.setupControlBox(),Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){return!!mt.prototype.ownsTarget.call(this,Be)||!(!this.grip1.ownsTarget(Be)&&!this.grip2.ownsTarget(Be))},ze.prototype.pointerDown=function(Be,et){mt.prototype.pointerDown.call(this,Be,et),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(et)?this.activeGrip=this.grip1:this.grip2.ownsTarget(et)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ze.prototype.pointerUp=function(Be){var et=this.state;mt.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",et==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},ze.prototype.adjustVisual=function(){},ze.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)},ze.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()},ze.prototype.select=function(){mt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ze.prototype.deselect=function(){mt.prototype.deselect.call(this),this.controlBox.style.display="none"},ze.prototype.setupControlBox=function(){this.controlBox=Pe.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},ze.prototype.adjustControlBox=function(){this.positionGrips()},ze.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},ze.prototype.createGrip=function(){var Be=new se;return Be.visual.transform.baseVal.appendItem(Pe.createTransform()),this.controlBox.appendChild(Be.visual),Be},ze.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)},ze.prototype.positionGrip=function(Be,et,qe){var Ue=Be.transform.baseVal.getItem(0);Ue.setTranslate(et,qe),Be.transform.baseVal.replaceItem(Ue,0)},ze.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},mt.prototype.getState.call(this))},ze.prototype.restoreState=function(Be){mt.prototype.restoreState.call(this,Be);var et=Be;this.x1=et.x1,this.y1=et.y1,this.x2=et.x2,this.y2=et.y2},ze.prototype.scale=function(Be,et){mt.prototype.scale.call(this,Be,et),this.x1=this.x1*Be,this.y1=this.y1*et,this.x2=this.x2*Be,this.y2=this.y2*et,this.adjustVisual(),this.adjustControlBox()},ze}(oe),Qe=function(mt){function ze(Be,et,qe){var Ue=mt.call(this,Be,et,qe)||this;return Ue.strokeColor="transparent",Ue.strokeWidth=0,Ue.strokeDasharray="",Ue.setStrokeColor=Ue.setStrokeColor.bind(Ue),Ue.setStrokeWidth=Ue.setStrokeWidth.bind(Ue),Ue.setStrokeDasharray=Ue.setStrokeDasharray.bind(Ue),Ue.strokeColor=qe.defaultColor,Ue.strokeWidth=qe.defaultStrokeWidth,Ue.strokeDasharray=qe.defaultStrokeDasharray,Ue.strokePanel=new ee("Line color",qe.defaultColorSet,qe.defaultColor),Ue.strokePanel.onColorChanged=Ue.setStrokeColor,Ue.strokeWidthPanel=new Ce("Line width",qe.defaultStrokeWidths,qe.defaultStrokeWidth),Ue.strokeWidthPanel.onWidthChanged=Ue.setStrokeWidth,Ue.strokeStylePanel=new ke("Line style",qe.defaultStrokeDasharrays,qe.defaultStrokeDasharray),Ue.strokeStylePanel.onStyleChanged=Ue.setStrokeDasharray,Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){return!(!mt.prototype.ownsTarget.call(this,Be)&&Be!==this.visual&&Be!==this.selectorLine&&Be!==this.visibleLine)},ze.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)},ze.prototype.pointerDown=function(Be,et){mt.prototype.pointerDown.call(this,Be,et),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},ze.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()]]))},ze.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.adjustVisual(),this.colorChanged(Be)},ze.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.adjustVisual()},ze.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},mt.prototype.getState.call(this));return Be.typeName=ze.typeName,Be},ze.prototype.restoreState=function(Be){mt.prototype.restoreState.call(this,Be);var et=Be;this.strokeColor=et.strokeColor,this.strokeWidth=et.strokeWidth,this.strokeDasharray=et.strokeDasharray,this.createVisual(),this.adjustVisual()},ze.typeName="LineMarker",ze.title="Line marker",ze.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',ze}(Ve),We=function(mt){function ze(Be,et,qe,Ue){var Xe=mt.call(this,Be,Ue||'<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=et,Xe.currentFont=qe,Xe.setCurrentFont=Xe.setCurrentFont.bind(Xe),Xe}return me(ze,mt),ze.prototype.getUi=function(){var Be=this,et=document.createElement("div");return et.style.overflow="hidden",et.style.flexGrow="2",this.fonts.forEach(function(qe){var Ue=document.createElement("div");Ue.style.display="inline-block",Ue.style.alignItems="center",Ue.style.justifyContent="space-between",Ue.style.padding="5px",Ue.style.borderWidth="2px",Ue.style.borderStyle="solid",Ue.style.overflow="hidden",Ue.style.maxWidth=100/Be.fonts.length-5+"%",Ue.style.borderColor=qe===Be.currentFont?Be.uiStyleSettings.toolboxAccentColor:"transparent",Ue.addEventListener("click",function(){Be.setCurrentFont(qe,Ue)}),et.appendChild(Ue);var Xe=document.createElement("div");Xe.style.display="flex",Xe.style.minHeight="20px",Xe.style.flexGrow="2",Xe.style.fontFamily=qe,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),Ue.appendChild(Xe),Be.fontBoxes.push(Ue)}),et},ze.prototype.setCurrentFont=function(Be,et){var qe=this;this.currentFont=Be,this.fontBoxes.forEach(function(Ue){Ue.style.borderColor=Ue===et?qe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ze}(z),gt=function(mt){function ze(Be,et,qe){var Ue=mt.call(this,Be,et,qe)||this;return Ue.color="transparent",Ue.padding=5,Ue.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Ue.text=Ue.DEFAULT_TEXT,Ue.isMoved=!1,Ue.color=qe.defaultColor,Ue.fontFamily=qe.defaultFontFamily,Ue.defaultSize={x:100,y:30},Ue.setColor=Ue.setColor.bind(Ue),Ue.setFont=Ue.setFont.bind(Ue),Ue.renderText=Ue.renderText.bind(Ue),Ue.sizeText=Ue.sizeText.bind(Ue),Ue.textEditDivClicked=Ue.textEditDivClicked.bind(Ue),Ue.showTextEditor=Ue.showTextEditor.bind(Ue),Ue.setSize=Ue.setSize.bind(Ue),Ue.positionTextEditor=Ue.positionTextEditor.bind(Ue),Ue.colorPanel=new ee("Color",qe.defaultColorSet,qe.defaultColor),Ue.colorPanel.onColorChanged=Ue.setColor,Ue.fontFamilyPanel=new We("Font",qe.defaultFontFamilies,qe.defaultFontFamily),Ue.fontFamilyPanel.onFontChanged=Ue.setFont,Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){if(mt.prototype.ownsTarget.call(this,Be)||Be===this.visual||Be===this.textElement||Be===this.bgRectangle)return!0;var et=!1;return this.textElement.childNodes.forEach(function(qe){qe===Be&&(et=!0)}),et},ze.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()},ze.prototype.pointerDown=function(Be,et){mt.prototype.pointerDown.call(this,Be,et),this.isMoved=!1,this.pointerDownPoint=Be,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Be),this._state="creating")},ze.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(et){Be.textElement.appendChild(Pe.createTSpan(et.trim()===""?" ":et.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ze.prototype.getTextScale=function(){var Be=this.textElement.getBBox(),et=1;if(Be.width>0&&Be.height>0){var qe=(1*this.width-this.width*this.padding*2/100)/Be.width,Ue=(1*this.height-this.height*this.padding*2/100)/Be.height;et=Math.min(qe,Ue)}return et},ze.prototype.getTextPosition=function(Be){var et=this.textElement.getBBox(),qe=0,Ue=0;return et.width>0&&et.height>0&&(qe=(this.width-et.width*Be)/2,Ue=this.height/2-et.height*Be/2),{x:qe,y:Ue}},ze.prototype.sizeText=function(){var Be=this.textElement.getBBox(),et=this.getTextScale(),qe=this.getTextPosition(et);qe.y-=Be.y*et,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+qe.x+"px, "+qe.y+"px) scale("+et+", "+et+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(qe.x,qe.y),this.textElement.transform.baseVal.getItem(1).setScale(et,et))},ze.prototype.manipulate=function(Be){mt.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)},ze.prototype.resize=function(Be){mt.prototype.resize.call(this,Be),this.isMoved=!0,this.setSize(),this.sizeText()},ze.prototype.setSize=function(){mt.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()]]))},ze.prototype.pointerUp=function(Be){var et=this.state;et==="creating"&&(this._suppressMarkerCreateEvent=!0),mt.prototype.pointerUp.call(this,Be),this.setSize(),(et==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},ze.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(et){et.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var et=Number.parseFloat(Be.textEditor.style.fontSize);Be.textEditor.clientWidth>=Number.parseInt(Be.textEditor.style.maxWidth)&&et>.9;)et-=.1,Be.textEditor.style.fontSize=Math.max(et,.9)+"em"}),this.textEditor.addEventListener("keyup",function(et){et.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(et){if(et.clipboardData){var qe=et.clipboardData.getData("text"),Ue=window.getSelection();if(!Ue.rangeCount)return!1;Ue.deleteFromDocument(),Ue.getRangeAt(0).insertNode(document.createTextNode(qe)),et.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")},ze.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Be=this.getTextScale(),et=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),qe=this.textElement.getBBox(),Ue={x:qe.width*Be,y:qe.height*Be};et.x-=Ue.x/2,et.y-=Ue.y/2,this.textEditor.style.top=et.y+"px",this.textEditor.style.left=et.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-et.x+"px",this.textEditor.style.fontSize=Math.max(16*Be,12)+"px",this.textElement.style.display="none"}},ze.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()},ze.prototype.select=function(){mt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ze.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),mt.prototype.deselect.call(this)},ze.prototype.dblClick=function(Be,et){mt.prototype.dblClick.call(this,Be,et),this.showTextEditor()},ze.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)},ze.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()},ze.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},ze.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},mt.prototype.getState.call(this));return Be.typeName=ze.typeName,Be},ze.prototype.restoreState=function(Be){var et=Be;this.color=et.color,this.fontFamily=et.fontFamily,this.padding=et.padding,this.text=et.text,this.createVisual(),mt.prototype.restoreState.call(this,Be),this.setSize()},ze.prototype.scale=function(Be,et){mt.prototype.scale.call(this,Be,et),this.setSize(),this.sizeText(),this.positionTextEditor()},ze.typeName="TextMarker",ze.title="Text marker",ze.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>',ze}(ye),ct=function(mt){function ze(Be,et,qe){var Ue=mt.call(this,Be,et,qe)||this;return Ue.color="transparent",Ue.lineWidth=3,Ue.drawing=!1,Ue.pixelRatio=1,Ue.color=qe.defaultColor,Ue.lineWidth=qe.defaultStrokeWidth,Ue.pixelRatio=qe.freehandPixelRatio,Ue.setColor=Ue.setColor.bind(Ue),Ue.addCanvas=Ue.addCanvas.bind(Ue),Ue.finishCreation=Ue.finishCreation.bind(Ue),Ue.setLineWidth=Ue.setLineWidth.bind(Ue),Ue.colorPanel=new ee("Color",qe.defaultColorSet,qe.defaultColor),Ue.colorPanel.onColorChanged=Ue.setColor,Ue.lineWidthPanel=new Ce("Line width",qe.defaultStrokeWidths,qe.defaultStrokeWidth),Ue.lineWidthPanel.onWidthChanged=Ue.setLineWidth,Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){return!(!mt.prototype.ownsTarget.call(this,Be)&&Be!==this.visual&&Be!==this.drawingImage)},ze.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)},ze.prototype.pointerDown=function(Be,et){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):mt.prototype.pointerDown.call(this,Be,et)},ze.prototype.manipulate=function(Be){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Be.x,Be.y),this.canvasContext.stroke()):mt.prototype.manipulate.call(this,Be)},ze.prototype.resize=function(Be){mt.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()]])},ze.prototype.pointerUp=function(Be){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):mt.prototype.pointerUp.call(this,Be)},ze.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)},ze.prototype.select=function(){this.state==="creating"&&this.finishCreation(),mt.prototype.select.call(this)},ze.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),mt.prototype.deselect.call(this)},ze.prototype.finishCreation=function(){for(var Be=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),et=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],qe=et[0],Ue=et[1],Xe=et[2],Re=et[3],Ae=!1,Ge=0;Ge<this.canvasElement.height;Ge++)for(var Ke=0;Ke<this.canvasElement.width;Ke++)Be.data[Ge*this.canvasElement.width*4+4*Ke+3]>0&&(Ae=!0,Ge<Ue&&(Ue=Ge),Ke<qe&&(qe=Ke),Ge>Re&&(Re=Ge),Ke>Xe&&(Xe=Ke));if(Ae){this.left=qe/this.pixelRatio,this.top=Ue/this.pixelRatio,this.width=(Xe-qe)/this.pixelRatio,this.height=(Re-Ue)/this.pixelRatio;var Ze=document.createElement("canvas");Ze.width=Xe-qe,Ze.height=Re-Ue,Ze.getContext("2d").putImageData(this.canvasContext.getImageData(qe,Ue,Xe-qe,Re-Ue),0,0),this.drawingImgUrl=Ze.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ze.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})},ze.prototype.setColor=function(Be){this.color=Be,this.colorChanged(Be)},ze.prototype.setLineWidth=function(Be){this.lineWidth=Be},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=Object.assign({drawingImgUrl:this.drawingImgUrl},mt.prototype.getState.call(this));return Be.typeName=ze.typeName,Be},ze.prototype.restoreState=function(Be){this.createVisual(),mt.prototype.restoreState.call(this,Be),this.drawingImgUrl=Be.drawingImgUrl,this.setDrawingImage()},ze.prototype.scale=function(Be,et){mt.prototype.scale.call(this,Be,et),this.setDrawingImage()},ze.typeName="FreehandMarker",ze.title="Freehand marker",ze.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>',ze}(ye),Ct=function(mt){function ze(Be,et,qe){var Ue=mt.call(this,Be,qe||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Ue.typeBoxes=[],Ue.currentType=et,Ue.setCurrentType=Ue.setCurrentType.bind(Ue),Ue}return me(ze,mt),ze.prototype.getUi=function(){var Be=this,et=document.createElement("div");et.style.display="flex",et.style.overflow="hidden",et.style.flexGrow="2";for(var qe=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 Ge=document.createElement("div");if(Ge.style.display="flex",Ge.style.flexGrow="2",Ge.style.alignItems="center",Ge.style.justifyContent="space-between",Ge.style.padding="5px",Ge.style.borderWidth="2px",Ge.style.borderStyle="solid",Ge.style.borderColor=Ae===Ue.currentType?Ue.uiStyleSettings.toolboxAccentColor:"transparent",Ge.addEventListener("click",function(){Be.setCurrentType(Ae,Ge)}),et.appendChild(Ge),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="`+(Ue.uiStyleSettings!==void 0?Ue.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Ke.style.marginLeft="5px",Ge.appendChild(Ke)}var Ze=document.createElement("div");Ze.style.display="flex",Ze.style.alignItems="center",Ze.style.minHeight="20px",Ze.style.flexGrow="2";var at=document.createElement("hr");if(at.style.minWidth="20px",at.style.border="0px",at.style.borderTop="3px solid "+(Ue.uiStyleSettings!==void 0?Ue.uiStyleSettings.toolboxColor:"#eeeeee"),at.style.flexGrow="2",Ze.appendChild(at),Ge.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="`+(Ue.uiStyleSettings!==void 0?Ue.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,xt.style.marginRight="5px",Ge.appendChild(xt)}Ue.typeBoxes.push(Ge)},Ue=this,Xe=0;Xe<4;Xe++)qe(Xe);return et},ze.prototype.setCurrentType=function(Be,et){var qe=this;this.currentType=Be,this.typeBoxes.forEach(function(Ue){Ue.style.borderColor=Ue===et?qe.uiStyleSettings!==void 0?qe.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ze}(z),it=function(mt){function ze(Be,et,qe){var Ue=mt.call(this,Be,et,qe)||this;return Ue.arrowType="end",Ue.arrowBaseHeight=10,Ue.arrowBaseWidth=10,Ue.getArrowPoints=Ue.getArrowPoints.bind(Ue),Ue.setArrowType=Ue.setArrowType.bind(Ue),Ue.arrowTypePanel=new Ct("Arrow type","end"),Ue.arrowTypePanel.onArrowTypeChanged=Ue.setArrowType,Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){return!(!mt.prototype.ownsTarget.call(this,Be)&&Be!==this.arrow1&&Be!==this.arrow2)},ze.prototype.getArrowPoints=function(Be,et){var qe=this.arrowBaseWidth+2*this.strokeWidth,Ue=this.arrowBaseHeight+2*this.strokeWidth;return Be-qe/2+","+(et+Ue/2)+" "+Be+","+(et-Ue/2)+" "+(Be+qe/2)+","+(et+Ue/2)},ze.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)},ze.prototype.pointerDown=function(Be,et){mt.prototype.pointerDown.call(this,Be,et),this.state==="creating"&&this.createTips()},ze.prototype.adjustVisual=function(){if(mt.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 et=this.arrow1.transform.baseVal.getItem(0);et.setRotate(Be,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(et,0);var qe=this.arrow2.transform.baseVal.getItem(0);qe.setRotate(Be+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(qe,0)}},ze.prototype.setArrowType=function(Be){this.arrowType=Be,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=Object.assign({arrowType:this.arrowType},mt.prototype.getState.call(this));return Be.typeName=ze.typeName,Be},ze.prototype.restoreState=function(Be){mt.prototype.restoreState.call(this,Be);var et=Be;this.arrowType=et.arrowType,this.createTips(),this.adjustVisual()},ze.typeName="ArrowMarker",ze.title="Arrow marker",ze.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',ze}(Qe),yt=function(mt){function ze(Be,et,qe){var Ue=mt.call(this,Be,et,qe)||this;return Ue.fillColor=qe.defaultFillColor,Ue.strokeWidth=0,Ue.fillPanel=new ee("Color",qe.defaultColorSet,qe.defaultFillColor),Ue.fillPanel.onColorChanged=Ue.setFillColor,Ue}return me(ze,mt),Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=mt.prototype.getState.call(this);return Be.typeName=ze.typeName,Be},ze.typeName="CoverMarker",ze.title="Cover marker",ze.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',ze}(we),ut=function(mt){function ze(Be,et,qe,Ue){var Xe=mt.call(this,Be,Ue||'<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=et,Xe.currentOpacity=qe,Xe.setCurrentOpacity=Xe.setCurrentOpacity.bind(Xe),Xe}return me(ze,mt),ze.prototype.getUi=function(){var Be=this,et=document.createElement("div");return et.style.display="flex",et.style.overflow="hidden",et.style.flexGrow="2",et.style.justifyContent="space-between",this.opacities.forEach(function(qe){var Ue=document.createElement("div");Ue.style.display="flex",Ue.style.alignItems="center",Ue.style.justifyContent="center",Ue.style.padding="5px",Ue.style.borderWidth="2px",Ue.style.borderStyle="solid",Ue.style.borderColor=qe===Be.currentOpacity?Be.uiStyleSettings.toolboxAccentColor:"transparent",Ue.addEventListener("click",function(){Be.setCurrentOpacity(qe,Ue)}),et.appendChild(Ue);var Xe=document.createElement("div");Xe.innerText=100*qe+"%",Ue.appendChild(Xe),Be.opacityBoxes.push(Ue)}),et},ze.prototype.setCurrentOpacity=function(Be,et){var qe=this;this.currentOpacity=Be,this.opacityBoxes.forEach(function(Ue){Ue.style.borderColor=Ue===et?qe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ze}(z),Ft=function(mt){function ze(Be,et,qe){var Ue=mt.call(this,Be,et,qe)||this;return Ue.setOpacity=Ue.setOpacity.bind(Ue),Ue.fillColor=qe.defaultHighlightColor,Ue.strokeWidth=0,Ue.opacity=qe.defaultHighlightOpacity,Ue.fillPanel=new ee("Color",qe.defaultColorSet,Ue.fillColor),Ue.fillPanel.onColorChanged=Ue.setFillColor,Ue.opacityPanel=new ut("Opacity",qe.defaultOpacitySteps,Ue.opacity),Ue.opacityPanel.onOpacityChanged=Ue.setOpacity,Ue}return me(ze,mt),ze.prototype.setOpacity=function(Be){this.opacity=Be,this.visual&&Pe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=mt.prototype.getState.call(this);return Be.typeName=ze.typeName,Be},ze.typeName="HighlightMarker",ze.title="Highlight marker",ze.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>',ze}(yt),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(mt){function ze(Be,et,qe){var Ue=mt.call(this,Be,et,qe)||this;return Ue.bgColor="transparent",Ue.tipPosition={x:0,y:0},Ue.tipBase1Position={x:0,y:0},Ue.tipBase2Position={x:0,y:0},Ue.tipMoving=!1,Ue.color=qe.defaultStrokeColor,Ue.bgColor=qe.defaultFillColor,Ue.fontFamily=qe.defaultFontFamily,Ue.defaultSize={x:100,y:30},Ue.setBgColor=Ue.setBgColor.bind(Ue),Ue.getTipPoints=Ue.getTipPoints.bind(Ue),Ue.positionTip=Ue.positionTip.bind(Ue),Ue.setTipPoints=Ue.setTipPoints.bind(Ue),Ue.colorPanel=new ee("Text color",qe.defaultColorSet,Ue.color,ht),Ue.colorPanel.onColorChanged=Ue.setColor,Ue.bgColorPanel=new ee("Fill color",qe.defaultColorSet,Ue.bgColor,rt),Ue.bgColorPanel.onColorChanged=Ue.setBgColor,Ue.fontFamilyPanel=new We("Font",qe.defaultFontFamilies,qe.defaultFontFamily),Ue.fontFamilyPanel.onFontChanged=Ue.setFont,Ue.tipGrip=new se,Ue.tipGrip.visual.transform.baseVal.appendItem(Pe.createTransform()),Ue.controlBox.appendChild(Ue.tipGrip.visual),Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){return mt.prototype.ownsTarget.call(this,Be)||this.tipGrip.ownsTarget(Be)||this.tip===Be},ze.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)},ze.prototype.pointerDown=function(Be,et){this.state==="new"&&mt.prototype.pointerDown.call(this,Be,et),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(et)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):mt.prototype.pointerDown.call(this,Be,et)},ze.prototype.pointerUp=function(Be){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,mt.prototype.pointerUp.call(this,Be);else{var et=this.state==="creating";mt.prototype.pointerUp.call(this,Be),this.setTipPoints(et),this.positionTip()}},ze.prototype.manipulate=function(Be){if(this.tipMoving){var et=this.unrotatePoint(Be);this.tipPosition={x:et.x-this.manipulationStartLeft,y:et.y-this.manipulationStartTop},this.positionTip()}else mt.prototype.manipulate.call(this,Be)},ze.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)},ze.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},ze.prototype.setTipPoints=function(Be){Be===void 0&&(Be=!1);var et=Math.min(this.height/2,15),qe=this.height/5;Be&&(this.tipPosition={x:et+qe/2,y:this.height+20});var Ue=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Ue<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(qe=this.width/5,et=Math.min(this.width/2,15),this.tipBase1Position={x:et,y:0},this.tipBase2Position={x:et+qe,y:0}):(this.tipBase1Position={x:0,y:et},this.tipBase2Position={x:0,y:et+qe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Ue<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(qe=this.width/5,et=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-et-qe,y:0},this.tipBase2Position={x:this.width-et,y:0}):(this.tipBase1Position={x:this.width,y:et},this.tipBase2Position={x:this.width,y:et+qe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Ue<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(qe=this.width/5,et=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-et-qe,y:this.height},this.tipBase2Position={x:this.width-et,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-et-qe},this.tipBase2Position={x:this.width,y:this.height-et}):Ue<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(qe=this.width/5,et=Math.min(this.width/2,15),this.tipBase1Position={x:et,y:this.height},this.tipBase2Position={x:et+qe,y:this.height}):(this.tipBase1Position={x:0,y:this.height-et},this.tipBase2Position={x:0,y:this.height-et-qe})},ze.prototype.resize=function(Be){mt.prototype.resize.call(this,Be),this.positionTip()},ze.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(ze.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ze.prototype.select=function(){this.positionTip(),mt.prototype.select.call(this)},ze.prototype.getState=function(){var Be=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},mt.prototype.getState.call(this));return Be.typeName=ze.typeName,Be},ze.prototype.restoreState=function(Be){var et=Be;this.bgColor=et.bgColor,this.tipPosition=et.tipPosition,mt.prototype.restoreState.call(this,Be),this.createTip(),this.setTipPoints()},ze.prototype.scale=function(Be,et){mt.prototype.scale.call(this,Be,et),this.tipPosition={x:this.tipPosition.x*Be,y:this.tipPosition.y*et},this.positionTip()},ze.typeName="CalloutMarker",ze.title="Callout marker",ze.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>',ze}(gt),St=function(mt){function ze(Be,et,qe){var Ue=mt.call(this,Be,et,qe)||this;return Ue.fillColor="transparent",Ue.strokeColor="transparent",Ue.strokeWidth=0,Ue.strokeDasharray="",Ue.opacity=1,Ue.strokeColor=qe.defaultColor,Ue.strokeWidth=qe.defaultStrokeWidth,Ue.strokeDasharray=qe.defaultStrokeDasharray,Ue.fillColor=qe.defaultFillColor,Ue.setStrokeColor=Ue.setStrokeColor.bind(Ue),Ue.setFillColor=Ue.setFillColor.bind(Ue),Ue.setStrokeWidth=Ue.setStrokeWidth.bind(Ue),Ue.setStrokeDasharray=Ue.setStrokeDasharray.bind(Ue),Ue.setOpacity=Ue.setOpacity.bind(Ue),Ue.createVisual=Ue.createVisual.bind(Ue),Ue.strokePanel=new ee("Line color",be(qe.defaultColorSet,["transparent"]),qe.defaultColor),Ue.strokePanel.onColorChanged=Ue.setStrokeColor,Ue.fillPanel=new ee("Fill color",be(qe.defaultColorSet,["transparent"]),Ue.fillColor,rt),Ue.fillPanel.onColorChanged=Ue.setFillColor,Ue.strokeWidthPanel=new Ce("Line width",qe.defaultStrokeWidths,qe.defaultStrokeWidth),Ue.strokeWidthPanel.onWidthChanged=Ue.setStrokeWidth,Ue.strokeStylePanel=new ke("Line style",qe.defaultStrokeDasharrays,qe.defaultStrokeDasharray),Ue.strokeStylePanel.onStyleChanged=Ue.setStrokeDasharray,Ue.opacityPanel=new ut("Opacity",qe.defaultOpacitySteps,Ue.opacity),Ue.opacityPanel.onOpacityChanged=Ue.setOpacity,Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){return!(!mt.prototype.ownsTarget.call(this,Be)&&Be!==this.visual)},ze.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)},ze.prototype.pointerDown=function(Be,et){mt.prototype.pointerDown.call(this,Be,et),this.state==="new"&&(this.createVisual(),this.moveVisual(Be),this._state="creating")},ze.prototype.manipulate=function(Be){mt.prototype.manipulate.call(this,Be)},ze.prototype.resize=function(Be){mt.prototype.resize.call(this,Be),this.setSize()},ze.prototype.setSize=function(){mt.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()]])},ze.prototype.pointerUp=function(Be){mt.prototype.pointerUp.call(this,Be),this.setSize()},ze.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.visual&&Pe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Be),this.stateChanged()},ze.prototype.setFillColor=function(Be){this.fillColor=Be,this.visual&&Pe.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Be),this.stateChanged()},ze.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.visual&&Pe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ze.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.visual&&Pe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ze.prototype.setOpacity=function(Be){this.opacity=Be,this.visual&&Pe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},mt.prototype.getState.call(this));return Be.typeName=ze.typeName,Be},ze.prototype.restoreState=function(Be){var et=Be;this.fillColor=et.fillColor,this.strokeColor=et.strokeColor,this.strokeWidth=et.strokeWidth,this.strokeDasharray=et.strokeDasharray,this.opacity=et.opacity,this.createVisual(),mt.prototype.restoreState.call(this,Be),this.setSize()},ze.prototype.scale=function(Be,et){mt.prototype.scale.call(this,Be,et),this.setSize()},ze.typeName="EllipseMarker",ze.title="Ellipse marker",ze.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>',ze}(ye),Et=function(mt){function ze(Be,et,qe){return mt.call(this,Be,et,qe)||this}return me(ze,mt),Object.defineProperty(ze.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),ze.prototype.ownsTarget=function(Be){return!(!mt.prototype.ownsTarget.call(this,Be)&&Be!==this.tip1&&Be!==this.tip2)},ze.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)},ze.prototype.pointerDown=function(Be,et){mt.prototype.pointerDown.call(this,Be,et),this.state==="creating"&&this.createTips()},ze.prototype.adjustVisual=function(){if(mt.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),et=this.tip1.transform.baseVal.getItem(0);et.setRotate(Be,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(et,0);var qe=this.tip2.transform.baseVal.getItem(0);qe.setRotate(Be+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(qe,0)}},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=mt.prototype.getState.call(this);return Be.typeName=ze.typeName,Be},ze.prototype.restoreState=function(Be){mt.prototype.restoreState.call(this,Be),this.createTips(),this.adjustVisual()},ze.typeName="MeasurementMarker",ze.title="Measurement marker",ze.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>',ze}(Qe),vt=function(mt){function ze(Be,et,qe){var Ue=mt.call(this,Be,et,qe)||this;return Ue.strokePanel.colors=qe.defaultColorSet,Ue.fillColor="transparent",Ue}return me(ze,mt),Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=mt.prototype.getState.call(this);return Be.typeName=ze.typeName,Be},ze.typeName="EllipseFrameMarker",ze.title="Ellipse frame marker",ze.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>',ze}(St),Bt=function(){function mt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(mt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),mt.prototype.addUndoStep=function(ze){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(ze)||(this.undoStack.push(ze),JSON.stringify(this.lastRedoStep)!==JSON.stringify(ze)&&this.redoStack.splice(0,this.redoStack.length))},mt.prototype.replaceLastUndoStep=function(ze){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ze)},mt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},mt.prototype.undo=function(){if(this.undoStack.length>1){var ze=this.undoStack.pop();return ze!==void 0&&this.redoStack.push(ze),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},mt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},mt}(),jt=function(mt){function ze(Be,et,qe){var Ue=mt.call(this,Be,et,qe)||this;return Ue.strokeColor="transparent",Ue.strokeWidth=0,Ue.strokeDasharray="",Ue.curveX=0,Ue.curveY=0,Ue.manipulationStartCurveX=0,Ue.manipulationStartCurveY=0,Ue.setStrokeColor=Ue.setStrokeColor.bind(Ue),Ue.setStrokeWidth=Ue.setStrokeWidth.bind(Ue),Ue.setStrokeDasharray=Ue.setStrokeDasharray.bind(Ue),Ue.positionGrips=Ue.positionGrips.bind(Ue),Ue.addControlGrips=Ue.addControlGrips.bind(Ue),Ue.adjustVisual=Ue.adjustVisual.bind(Ue),Ue.setupControlBox=Ue.setupControlBox.bind(Ue),Ue.resize=Ue.resize.bind(Ue),Ue.strokeColor=qe.defaultColor,Ue.strokeWidth=qe.defaultStrokeWidth,Ue.strokeDasharray=qe.defaultStrokeDasharray,Ue.strokePanel=new ee("Line color",qe.defaultColorSet,qe.defaultColor),Ue.strokePanel.onColorChanged=Ue.setStrokeColor,Ue.strokeWidthPanel=new Ce("Line width",qe.defaultStrokeWidths,qe.defaultStrokeWidth),Ue.strokeWidthPanel.onWidthChanged=Ue.setStrokeWidth,Ue.strokeStylePanel=new ke("Line style",qe.defaultStrokeDasharrays,qe.defaultStrokeDasharray),Ue.strokeStylePanel.onStyleChanged=Ue.setStrokeDasharray,Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){return!(!mt.prototype.ownsTarget.call(this,Be)&&Be!==this.visual&&Be!==this.selectorCurve&&Be!==this.visibleCurve&&!this.curveGrip.ownsTarget(Be))},ze.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},ze.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)},ze.prototype.pointerDown=function(Be,et){mt.prototype.pointerDown.call(this,Be,et),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(et)&&(this.activeGrip=this.curveGrip,this._state="resize")},ze.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()]]))},ze.prototype.setupControlBox=function(){mt.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)},ze.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,mt.prototype.addControlGrips.call(this)},ze.prototype.positionGrips=function(){mt.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()))},ze.prototype.manipulate=function(Be){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Be.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Be.y-this.manipulationStartY),mt.prototype.manipulate.call(this,Be)},ze.prototype.resize=function(Be){this.activeGrip===this.curveGrip&&(this.curveX=Be.x,this.curveY=Be.y),mt.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)},ze.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.adjustVisual(),this.colorChanged(Be)},ze.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.adjustVisual()},ze.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.adjustVisual()},ze.prototype.scale=function(Be,et){this.curveX=this.curveX*Be,this.curveY=this.curveY*et,mt.prototype.scale.call(this,Be,et)},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ze.prototype.getState=function(){var Be=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},mt.prototype.getState.call(this));return Be.typeName=ze.typeName,Be},ze.prototype.restoreState=function(Be){mt.prototype.restoreState.call(this,Be);var et=Be;this.strokeColor=et.strokeColor,this.strokeWidth=et.strokeWidth,this.strokeDasharray=et.strokeDasharray,this.curveX=et.curveX,this.curveY=et.curveY,this.createVisual(),this.adjustVisual()},ze.typeName="CurveMarker",ze.title="Curve marker",ze.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>',ze}(Ve),ln=function(mt){function ze(Be,et,qe){var Ue=mt.call(this,Be,et,qe)||this;return Ue.fillColor="transparent",Ue.strokeColor="transparent",Ue.strokeWidth=0,Ue.strokeDasharray="",Ue.textColor="transparent",Ue.fontSize="1rem",Ue.isMoved=!1,Ue.captionText="Caption",Ue.PADDING=5,Ue.captionBoxWidth=0,Ue.captionBoxHeight=0,Ue.strokeColor=qe.defaultColor,Ue.strokeWidth=qe.defaultStrokeWidth,Ue.strokeDasharray=qe.defaultStrokeDasharray,Ue.fillColor=qe.defaultFillColor,Ue.textColor=qe.defaultStrokeColor,Ue.fontFamily=qe.defaultFontFamily,Ue.fontSize=qe.defaultCaptionFontSize,Ue.captionText=qe.defaultCaptionText,Ue.setStrokeColor=Ue.setStrokeColor.bind(Ue),Ue.setFillColor=Ue.setFillColor.bind(Ue),Ue.setStrokeWidth=Ue.setStrokeWidth.bind(Ue),Ue.setStrokeDasharray=Ue.setStrokeDasharray.bind(Ue),Ue.createVisual=Ue.createVisual.bind(Ue),Ue.sizeCaption=Ue.sizeCaption.bind(Ue),Ue.setCaptionText=Ue.setCaptionText.bind(Ue),Ue.showTextEditor=Ue.showTextEditor.bind(Ue),Ue.positionTextEditor=Ue.positionTextEditor.bind(Ue),Ue.finishTextEditing=Ue.finishTextEditing.bind(Ue),Ue.setFont=Ue.setFont.bind(Ue),Ue.setTextColor=Ue.setTextColor.bind(Ue),Ue.strokePanel=new ee("Line color",be(qe.defaultColorSet,["transparent"]),Ue.strokeColor),Ue.strokePanel.onColorChanged=Ue.setStrokeColor,Ue.fillPanel=new ee("Fill color",be(qe.defaultColorSet,["transparent"]),Ue.fillColor,rt),Ue.fillPanel.onColorChanged=Ue.setFillColor,Ue.strokeWidthPanel=new Ce("Line width",qe.defaultStrokeWidths,qe.defaultStrokeWidth),Ue.strokeWidthPanel.onWidthChanged=Ue.setStrokeWidth,Ue.strokeStylePanel=new ke("Line style",qe.defaultStrokeDasharrays,qe.defaultStrokeDasharray),Ue.strokeStylePanel.onStyleChanged=Ue.setStrokeDasharray,Ue.fontFamilyPanel=new We("Font",qe.defaultFontFamilies,qe.defaultFontFamily),Ue.fontFamilyPanel.onFontChanged=Ue.setFont,Ue.textColorPanel=new ee("Text color",qe.defaultColorSet,Ue.textColor,ht),Ue.textColorPanel.onColorChanged=Ue.setTextColor,Ue}return me(ze,mt),ze.prototype.ownsTarget=function(Be){return!(!mt.prototype.ownsTarget.call(this,Be)&&Be!==this.visual&&Be!==this.frame&&Be!==this.captionBg&&Be!==this.captionElement)},ze.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()},ze.prototype.setCaptionText=function(Be){this.captionText=Be,this.captionElement.textContent=this.captionText,this.sizeCaption()},ze.prototype.pointerDown=function(Be,et){mt.prototype.pointerDown.call(this,Be,et),this.isMoved=!1,this.pointerDownPoint=Be,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Be),this._state="creating")},ze.prototype.manipulate=function(Be){mt.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)},ze.prototype.resize=function(Be){mt.prototype.resize.call(this,Be),this.setSize()},ze.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')"]])},ze.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(et){et.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(et){et.key==="Enter"&&Be.finishTextEditing(Be.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(et){et.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()},ze.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"))},ze.prototype.finishTextEditing=function(Be){this.setCaptionText(Be.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},ze.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()},ze.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()},ze.prototype.setSize=function(){mt.prototype.setSize.call(this),Pe.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ze.prototype.pointerUp=function(Be){mt.prototype.pointerUp.call(this,Be),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},ze.prototype.dblClick=function(Be,et){mt.prototype.dblClick.call(this,Be,et),this.showTextEditor()},ze.prototype.setStrokeColor=function(Be){this.strokeColor=Be,this.frame&&Pe.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Be),this.stateChanged()},ze.prototype.setFillColor=function(Be){this.fillColor=Be,this.captionBg&&Pe.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Be),this.stateChanged()},ze.prototype.setStrokeWidth=function(Be){this.strokeWidth=Be,this.frame&&Pe.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ze.prototype.setStrokeDasharray=function(Be){this.strokeDasharray=Be,this.frame&&Pe.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),ze.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},mt.prototype.getState.call(this));return Be.typeName=this.typeName,Be},ze.prototype.restoreState=function(Be){var et=Be;this.fillColor=et.fillColor,this.strokeColor=et.strokeColor,this.strokeWidth=et.strokeWidth,this.strokeDasharray=et.strokeDasharray,this.textColor=et.textColor,this.fontFamily=et.fontFamily,this.captionText=et.captionText,this.fontSize=et.fontSize,this.createVisual(),mt.prototype.restoreState.call(this,Be),this.setSize()},ze.prototype.scale=function(Be,et){mt.prototype.scale.call(this,Be,et),this.setSize()},ze.typeName="CaptionFrameMarker",ze.title="Caption frame marker",ze.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>',ze}(ye),$t=function(){function mt(ze,Be){Be===void 0&&(Be=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ze,this.cancelable=Be}return Object.defineProperty(mt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),mt.prototype.preventDefault=function(){this._defaultPrevented=!0},mt}(),yn=function(mt){function ze(Be,et,qe){var Ue=mt.call(this,Be,!1)||this;return Ue.dataUrl=et,Ue.state=qe,Ue}return me(ze,mt),ze}($t),Ut=function(mt){function ze(Be,et,qe){qe===void 0&&(qe=!1);var Ue=mt.call(this,Be,qe)||this;return Ue.marker=et,Ue}return me(ze,mt),ze}($t),Wt=function(){function mt(){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 mt.prototype.addEventListener=function(ze,Be){this[ze].push(Be)},mt.prototype.removeEventListener=function(ze,Be){var et=this[ze].indexOf(Be);et>-1&&this[ze].splice(et,1)},mt}(),Xt=function(){function mt(ze){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=mt.instanceCounter++,this.styles=new ge(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ze,this.targetRoot=document.body,this.width=ze.clientWidth,this.height=ze.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(mt.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ne,ct,it,gt,vt,St,Ft,dt,Et,yt,Qe,jt,ln]},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ne,ct,it,gt,St,Ft,dt]},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ne,ct,it,gt,Ft]},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ze){var Be=this;this._availableMarkerTypes.splice(0),ze.forEach(function(et){if(typeof et=="string"){var qe=Be.ALL_MARKER_TYPES.find(function(Ue){return Ue.typeName===et});qe!==void 0&&Be._availableMarkerTypes.push(qe)}else Be._availableMarkerTypes.push(et)})},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(mt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(ze){this._zoomLevel=ze,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(mt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),mt.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},mt.prototype.show=function(){var ze=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 $t(ze))})},mt.prototype.render=function(){return Ie(this,void 0,void 0,function(){var ze;return Te(this,function(Be){switch(Be.label){case 0:return this.setCurrentMarker(),(ze=new Se).naturalSize=this.renderAtNaturalSize,ze.imageType=this.renderImageType,ze.imageQuality=this.renderImageQuality,ze.markersOnly=this.renderMarkersOnly,ze.width=this.renderWidth,ze.height=this.renderHeight,[4,ze.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Be.sent(),[4,ze.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Be.sent()]}})})},mt.prototype.close=function(ze){var Be=this;if(ze===void 0&&(ze=!1),this.isOpen){var et=!1;ze||this.eventListeners.beforeclose.forEach(function(qe){var Ue=new $t(Be,!0);qe(Ue),Ue.defaultPrevented&&(et=!0)}),et||(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(qe){return qe(new $t(Be))}),this.detachEvents(),this._isOpen=!1)}},mt.prototype.addMarkersToToolbar=function(){for(var ze,Be=[],et=0;et<arguments.length;et++)Be[et]=arguments[et];(ze=this._availableMarkerTypes).push.apply(ze,Be)},mt.prototype.addRenderEventListener=function(ze){this.addEventListener("render",function(Be){ze(Be.dataUrl,Be.state)})},mt.prototype.removeRenderEventListener=function(ze){},mt.prototype.addCloseEventListener=function(ze){this.addEventListener("close",function(){ze()})},mt.prototype.removeCloseEventListener=function(ze){},mt.prototype.setupResizeObserver=function(){var ze=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ze.resize(ze.target.clientWidth,ze.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return ze.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},mt.prototype.onPopupTargetResize=function(){var ze=1*this.target.clientWidth/this.target.clientHeight,Be=this.editorCanvas.clientWidth/ze>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*ze:this.editorCanvas.clientWidth,et=Be<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/ze;this.resize(Be,et)},mt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},mt.prototype.resize=function(ze,Be){this._isResizing=!0;var et=ze/this.imageWidth,qe=Be/this.imageHeight;this.imageWidth=Math.round(ze),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(et,qe),this._isResizing=!1},mt.prototype.scaleMarkers=function(ze,Be){var et,qe=this;this._currentMarker&&this._currentMarker instanceof gt?this._currentMarker.scale(ze,Be):(et=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Ue){Ue!==qe._currentMarker&&Ue.scale(ze,Be)}),et!==void 0&&this.setCurrentMarker(et)},mt.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"},mt.prototype.setTopLeft=function(){var ze=this.editingTarget.getBoundingClientRect(),Be=this.editorCanvas.getBoundingClientRect();this.left=ze.left-Be.left,this.top=ze.top-Be.top},mt.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)},mt.prototype.addDefs=function(){for(var ze,Be=[],et=0;et<arguments.length;et++)Be[et]=arguments[et];this.defs=Pe.createDefs(),this.addDefsToImage(),(ze=this.defs).append.apply(ze,Be)},mt.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},mt.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)},mt.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},mt.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},mt.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)},mt.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},mt.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)},mt.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 ze=document.createElement("a");ze.href="https://markerjs.com/",ze.target="_blank",ze.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>',ze.title="Powered by marker.js",ze.style.display="grid",ze.style.alignItems="center",ze.style.justifyItems="center",ze.style.padding="3px",ze.style.width="20px",ze.style.height="20px",this.logoUI.appendChild(ze),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},mt.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")},mt.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"},mt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},mt.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 ze=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=ze+"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")},mt.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},mt.prototype.removeMarker=function(ze){this.markerImage.removeChild(ze.container),this.markers.indexOf(ze)>-1&&this.markers.splice(this.markers.indexOf(ze),1),ze.dispose()},mt.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())},mt.prototype.toolbarButtonClicked=function(ze,Be){if(ze==="marker"&&Be!==void 0)this.createNewMarker(Be);else if(ze==="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()}},mt.prototype.deleteSelectedMarker=function(){var ze=this;if(this._currentMarker!==void 0){var Be=!1;if(this.eventListeners.markerbeforedelete.forEach(function(qe){var Ue=new Ut(ze,ze._currentMarker,!0);qe(Ue),Ue.defaultPrevented&&(Be=!0)}),!Be){var et=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(qe){return qe(new Ut(ze,et))})}}},mt.prototype.clear=function(){var ze=this,Be=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Xe){var Re=new Ut(ze,void 0,!0);Xe(Re),Re.defaultPrevented&&(Be=!0)}),!Be)){this.setCurrentMarker();for(var et=function(Xe){var Re=qe.markers[Xe];qe.setCurrentMarker(qe.markers[Xe]),qe._currentMarker.dispose(),qe.markerImage.removeChild(qe._currentMarker.container),qe.markers.splice(qe.markers.indexOf(qe._currentMarker),1),qe.eventListeners.markerdelete.forEach(function(Ae){return Ae(new Ut(ze,Re))})},qe=this,Ue=this.markers.length-1;Ue>=0;Ue--)et(Ue);this.addUndoStep()}},Object.defineProperty(mt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),mt.prototype.showNotesEditor=function(){var ze;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=(ze=this._currentMarker.notes)!==null&&ze!==void 0?ze:"",this.overlayContainer.appendChild(this.notesArea))},mt.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)},mt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},mt.prototype.addUndoStep=function(){var ze=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Be=this.getState(),et=this.undoRedoManager.getLastUndoStep();if(!et||et.width===Be.width&&et.height===Be.height){var qe=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Be),qe<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Ue){return Ue(new $t(ze))})}else this.undoRedoManager.replaceLastUndoStep(Be),this.eventListeners.statechange.forEach(function(Ue){return Ue(new $t(ze))})}},mt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},mt.prototype.undoStep=function(){var ze=this,Be=this.undoRedoManager.undo();Be!==void 0&&(this.restoreState(Be),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(et){return et(new $t(ze))}))},mt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},mt.prototype.redoStep=function(){var ze=this,Be=this.undoRedoManager.redo();Be!==void 0&&(this.restoreState(Be),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(et){return et(new $t(ze))}))},mt.prototype.stepZoom=function(){var ze=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=ze<this.zoomSteps.length-1?this.zoomSteps[ze+1]:this.zoomSteps[0]},mt.prototype.panTo=function(ze){this.contentDiv.scrollBy({left:this.prevPanPoint.x-ze.x,top:this.prevPanPoint.y-ze.y}),this.prevPanPoint=ze},mt.prototype.startRenderAndClose=function(){return Ie(this,void 0,void 0,function(){var ze,Be,et=this;return Te(this,function(qe){switch(qe.label){case 0:return[4,this.render()];case 1:return ze=qe.sent(),Be=this.getState(),this.eventListeners.render.forEach(function(Ue){return Ue(new yn(et,ze,Be))}),this.close(!0),[2]}})})},mt.prototype.getState=function(ze){ze===!0&&this.setCurrentMarker();var Be={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(et){return Be.markers.push(et.getState())}),Be},mt.prototype.restoreState=function(ze){var Be=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);ze.markers.forEach(function(et){var qe=Be._availableMarkerTypes.find(function(Xe){return Xe.typeName===et.typeName});if(qe!==void 0){var Ue=Be.addNewMarker(qe);Ue.restoreState(et),Be.markers.push(Ue)}}),ze.width&&ze.height&&(ze.width!==this.imageWidth||ze.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/ze.width,this.imageHeight/ze.height),this.eventListeners.restorestate.forEach(function(et){return et(new $t(Be))})},mt.prototype.addNewMarker=function(ze){var Be=Pe.createGroup();return this.markerImage.appendChild(Be),new ze(Be,this.overlayContainer,this.settings)},mt.prototype.createNewMarker=function(ze){var Be,et=this;(Be=typeof ze=="string"?this._availableMarkerTypes.find(function(qe){return qe.typeName===ze}):ze)&&(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(qe){return qe(new Ut(et,et._currentMarker))}))},mt.prototype.markerCreated=function(ze){var Be=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(ze),this.setCurrentMarker(ze),ze instanceof ct&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(ct):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(et){return et(new Ut(Be,Be._currentMarker))})},mt.prototype.colorChanged=function(ze){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=ze,this.settings.defaultStrokeColor=ze)},mt.prototype.fillColorChanged=function(ze){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=ze)},mt.prototype.markerStateChanged=function(ze){var Be=this;this.eventListeners.markerchange.forEach(function(et){return et(new Ut(Be,ze))})},mt.prototype.setCurrentMarker=function(ze){var Be=this;this._currentMarker!==ze&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(et){return et(new Ut(Be,Be._currentMarker))})),this._currentMarker=ze,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(et){return et(new Ut(Be,Be._currentMarker))}))},mt.prototype.onPointerDown=function(ze){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||ze.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(et){return et.ownsTarget(ze.target)});Be!==void 0?(this.setCurrentMarker(Be),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ze.clientX,ze.clientY),ze.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:ze.clientX,y:ze.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(ze.clientX,ze.clientY))},mt.prototype.onDblClick=function(ze){if(this._isFocused||this.focus(),this.mode==="select"){var Be=this.markers.find(function(et){return et.ownsTarget(ze.target)});Be!==void 0&&Be!==this._currentMarker&&this.setCurrentMarker(Be),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(ze.clientX,ze.clientY),ze.target):this.setCurrentMarker()}},mt.prototype.onPointerMove=function(ze){this.touchPoints!==1&&ze.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||ze.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(ze.clientX,ze.clientY)):this.zoomLevel>1&&this.panTo({x:ze.clientX,y:ze.clientY}))},mt.prototype.onPointerUp=function(ze){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(ze.clientX,ze.clientY)),this.isDragging=!1,this.addUndoStep()},mt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},mt.prototype.onKeyUp=function(ze){this._currentMarker===void 0||this.notesArea!==void 0||ze.key!=="Delete"&&ze.key!=="Backspace"||this.deleteSelectedMarker()},mt.prototype.clientToLocalCoordinates=function(ze,Be){var et=this.markerImage.getBoundingClientRect();return{x:(ze-et.left)/this.zoomLevel,y:(Be-et.top)/this.zoomLevel}},mt.prototype.onWindowResize=function(){this.positionUI()},mt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var ze=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ze+"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()},mt.prototype.addLicenseKey=function(ze){he.addKey(ze)},mt.prototype.addEventListener=function(ze,Be){this.eventListeners.addEventListener(ze,Be)},mt.prototype.removeEventListener=function(ze,Be){this.eventListeners.removeEventListener(ze,Be)},mt.prototype.renderState=function(ze){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(ze),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(mt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),mt.prototype.focus=function(){var ze=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 $t(ze))}))},mt.prototype.blur=function(){var ze=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Be){return Be(new $t(ze))}))},mt.instanceCounter=0,mt}()},17115:function(bn,qt,Ee){"use strict";Ee.d(qt,{ZP:function(){return he}});var Le=Ee(33606),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(bn,qt,Ee){"use strict";Ee.d(qt,{Ac:function(){return xt},Xo:function(){return bi},Wx:function(){return Ji},ZP:function(){return Nt},lk:function(){return ye}});var Le=Ee(92413),me=Ee(26407),Ie=Ee(400),Te=Ee(33708),be=Ee(33606),Pe=Ee(37061),he=Ee(39559),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(_t){var un=_t.className,wn=_t.customizeIcon,Bn=_t.customizeIconProps,zn=_t.onMouseDown,At=_t.onClick,Kt=_t.children,Sn;return typeof wn=="function"?Sn=wn(Bn):Sn=wn,ge.createElement("span",{className:un,onMouseDown:function(Zt){Zt.preventDefault(),zn&&zn(Zt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:At,"aria-hidden":!0},Sn!==void 0?Sn:ge.createElement("span",{className:ve()(un.split(/\s+/).map(function(kn){return"".concat(kn,"-icon")}))},Kt))},ie=oe;function se(kt,_t,un,wn,Bn){var zn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,At=arguments.length>6?arguments[6]:void 0,Kt=arguments.length>7?arguments[7]:void 0,Sn=ge.useMemo(function(){if((0,he.Z)(wn)==="object")return wn.clearIcon;if(Bn)return Bn},[wn,Bn]),kn=ge.useMemo(function(){return!!(!zn&&wn&&(un.length||At)&&!(Kt==="combobox"&&At===""))},[wn,zn,un.length,At,Kt]);return{allowClear:kn,clearIcon:ge.createElement(ie,{className:"".concat(kt,"-clear"),onMouseDown:_t,customizeIcon:Sn},"\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,_t=ge.useState(!1),un=(0,be.Z)(_t,2),wn=un[0],Bn=un[1],zn=ge.useRef(null),At=function(){window.clearTimeout(zn.current)};ge.useEffect(function(){return At},[]);var Kt=function(kn,Zt){At(),zn.current=window.setTimeout(function(){Bn(kn),Zt&&Zt()},kt)};return[wn,Kt,At]}function Ce(){var kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,_t=ge.useRef(null),un=ge.useRef(null);ge.useEffect(function(){return function(){window.clearTimeout(un.current)}},[]);function wn(Bn){(Bn||_t.current===null)&&(_t.current=Bn),window.clearTimeout(un.current),un.current=window.setTimeout(function(){_t.current=null},kt)}return[function(){return _t.current},wn]}function ke(kt,_t,un,wn){var Bn=ge.useRef(null);Bn.current={open:_t,triggerOpen:un,customizedTrigger:wn},ge.useEffect(function(){function zn(At){var Kt;if(!((Kt=Bn.current)!==null&&Kt!==void 0&&Kt.customizedTrigger)){var Sn=At.target;Sn.shadowRoot&&At.composed&&(Sn=At.composedPath()[0]||Sn),Bn.current.open&&kt().filter(function(kn){return kn}).every(function(kn){return!kn.contains(Sn)&&kn!==Sn})&&Bn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",zn),function(){return window.removeEventListener("mousedown",zn)}},[])}var Ne=Ee(26112),je=Ee(11780),Ve=function(_t,un){var wn,Bn,zn=_t.prefixCls,At=_t.id,Kt=_t.inputElement,Sn=_t.disabled,kn=_t.tabIndex,Zt=_t.autoFocus,rn=_t.autoComplete,Rn=_t.editable,An=_t.activeDescendantId,Qn=_t.value,Un=_t.maxLength,qn=_t.onKeyDown,Nn=_t.onMouseDown,si=_t.onChange,Li=_t.onPaste,Bi=_t.onCompositionStart,Ln=_t.onCompositionEnd,Ui=_t.open,lr=_t.attrs,Di=Kt||ge.createElement("input",null),Pn=Di,Yn=Pn.ref,ui=Pn.props,Ti=ui.onKeyDown,pi=ui.onChange,Mi=ui.onMouseDown,ir=ui.onCompositionStart,Fi=ui.onCompositionEnd,Wi=ui.style;return(0,xe.Kp)(!("maxLength"in Di.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Di=ge.cloneElement(Di,(0,Te.Z)((0,Te.Z)((0,Te.Z)({type:"search"},ui),{},{id:At,ref:(0,ee.sQ)(un,Yn),disabled:Sn,tabIndex:kn,autoComplete:rn||"off",autoFocus:Zt,className:ve()("".concat(zn,"-selection-search-input"),(wn=Di)===null||wn===void 0||(Bn=wn.props)===null||Bn===void 0?void 0:Bn.className),role:"combobox","aria-label":"Search","aria-expanded":Ui||!1,"aria-haspopup":"listbox","aria-owns":"".concat(At,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(At,"_list"),"aria-activedescendant":Ui?An:void 0},lr),{},{value:Rn?Qn:"",maxLength:Un,readOnly:!Rn,unselectable:Rn?null:"on",style:(0,Te.Z)((0,Te.Z)({},Wi),{},{opacity:Rn?null:0}),onKeyDown:function(In){qn(In),Ti&&Ti(In)},onMouseDown:function(In){Nn(In),Mi&&Mi(In)},onChange:function(In){si(In),pi&&pi(In)},onCompositionStart:function(In){Bi(In),ir&&ir(In)},onCompositionEnd:function(In){Ln(In),Fi&&Fi(In)},onPaste:Li})),Di},Qe=ge.forwardRef(Ve);Qe.displayName="Input";var We=Qe;function gt(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 yt(kt){return!kt&&kt!==0}function ut(kt){return["string","number"].includes((0,he.Z)(kt))}function Ft(kt){var _t=void 0;return kt&&(ut(kt.title)?_t=kt.title.toString():ut(kt.label)&&(_t=kt.label.toString())),_t}function ht(kt,_t){Ct?ge.useLayoutEffect(kt,_t):ge.useEffect(kt,_t)}function rt(kt){var _t;return(_t=kt.key)!==null&&_t!==void 0?_t:kt.value}var dt=function(_t){_t.preventDefault(),_t.stopPropagation()},St=function(_t){var un=_t.id,wn=_t.prefixCls,Bn=_t.values,zn=_t.open,At=_t.searchValue,Kt=_t.autoClearSearchValue,Sn=_t.inputRef,kn=_t.placeholder,Zt=_t.disabled,rn=_t.mode,Rn=_t.showSearch,An=_t.autoFocus,Qn=_t.autoComplete,Un=_t.activeDescendantId,qn=_t.tabIndex,Nn=_t.removeIcon,si=_t.maxTagCount,Li=_t.maxTagTextLength,Bi=_t.maxTagPlaceholder,Ln=Bi===void 0?function(Ir){return"+ ".concat(Ir.length," ...")}:Bi,Ui=_t.tagRender,lr=_t.onToggleOpen,Di=_t.onRemove,Pn=_t.onInputChange,Yn=_t.onInputPaste,ui=_t.onInputKeyDown,Ti=_t.onInputMouseDown,pi=_t.onInputCompositionStart,Mi=_t.onInputCompositionEnd,ir=ge.useRef(null),Fi=(0,ge.useState)(0),Wi=(0,be.Z)(Fi,2),hr=Wi[0],In=Wi[1],zr=(0,ge.useState)(!1),On=(0,be.Z)(zr,2),wr=On[0],po=On[1],Ar="".concat(wn,"-selection"),To=zn||rn==="multiple"&&Kt===!1||rn==="tags"?At:"",oo=rn==="tags"||rn==="multiple"&&Kt===!1||Rn&&(zn||wr);ht(function(){In(ir.current.scrollWidth)},[To]);function $i(Ir,ho,Zo,Po,$o){return ge.createElement("span",{className:ve()("".concat(Ar,"-item"),(0,Ie.Z)({},"".concat(Ar,"-item-disabled"),Zo)),title:Ft(Ir)},ge.createElement("span",{className:"".concat(Ar,"-item-content")},ho),Po&&ge.createElement(ie,{className:"".concat(Ar,"-item-remove"),onMouseDown:dt,onClick:$o,customizeIcon:Nn},"\xD7"))}function Qi(Ir,ho,Zo,Po,$o){var Yo=function(yr){dt(yr),lr(!zn)};return ge.createElement("span",{onMouseDown:Yo},Ui({label:ho,value:Ir,disabled:Zo,closable:Po,onClose:$o}))}function fr(Ir){var ho=Ir.disabled,Zo=Ir.label,Po=Ir.value,$o=!Zt&&!ho,Yo=Zo;if(typeof Li=="number"&&(typeof Zo=="string"||typeof Zo=="number")){var Sr=String(Yo);Sr.length>Li&&(Yo="".concat(Sr.slice(0,Li),"..."))}var yr=function(Qr){Qr&&Qr.stopPropagation(),Di(Ir)};return typeof Ui=="function"?Qi(Po,Yo,ho,$o,yr):$i(Ir,Yo,ho,$o,yr)}function Mr(Ir){var ho=typeof Ln=="function"?Ln(Ir):Ln;return $i({title:ho},ho,!1)}var fi=ge.createElement("div",{className:"".concat(Ar,"-search"),style:{width:hr},onFocus:function(){po(!0)},onBlur:function(){po(!1)}},ge.createElement(We,{ref:Sn,open:zn,prefixCls:wn,id:un,inputElement:null,disabled:Zt,autoFocus:An,autoComplete:Qn,editable:oo,activeDescendantId:Un,value:To,onKeyDown:ui,onMouseDown:Ti,onChange:Pn,onPaste:Yn,onCompositionStart:pi,onCompositionEnd:Mi,tabIndex:qn,attrs:(0,Ne.Z)(_t,!0)}),ge.createElement("span",{ref:ir,className:"".concat(Ar,"-search-mirror"),"aria-hidden":!0},To,"\xA0")),Tt=ge.createElement(je.Z,{prefixCls:"".concat(Ar,"-overflow"),data:Bn,renderItem:fr,renderRest:Mr,suffix:fi,itemKey:rt,maxCount:si});return ge.createElement(ge.Fragment,null,Tt,!Bn.length&&!To&&ge.createElement("span",{className:"".concat(Ar,"-placeholder")},kn))},Et=St,vt=function(_t){var un=_t.inputElement,wn=_t.prefixCls,Bn=_t.id,zn=_t.inputRef,At=_t.disabled,Kt=_t.autoFocus,Sn=_t.autoComplete,kn=_t.activeDescendantId,Zt=_t.mode,rn=_t.open,Rn=_t.values,An=_t.placeholder,Qn=_t.tabIndex,Un=_t.showSearch,qn=_t.searchValue,Nn=_t.activeValue,si=_t.maxLength,Li=_t.onInputKeyDown,Bi=_t.onInputMouseDown,Ln=_t.onInputChange,Ui=_t.onInputPaste,lr=_t.onInputCompositionStart,Di=_t.onInputCompositionEnd,Pn=_t.title,Yn=ge.useState(!1),ui=(0,be.Z)(Yn,2),Ti=ui[0],pi=ui[1],Mi=Zt==="combobox",ir=Mi||Un,Fi=Rn[0],Wi=qn||"";Mi&&Nn&&!Ti&&(Wi=Nn),ge.useEffect(function(){Mi&&pi(!1)},[Mi,Nn]);var hr=Zt!=="combobox"&&!rn&&!Un?!1:!!Wi,In=Pn===void 0?Ft(Fi):Pn,zr=function(){if(Fi)return null;var wr=hr?{visibility:"hidden"}:void 0;return ge.createElement("span",{className:"".concat(wn,"-selection-placeholder"),style:wr},An)};return ge.createElement(ge.Fragment,null,ge.createElement("span",{className:"".concat(wn,"-selection-search")},ge.createElement(We,{ref:zn,prefixCls:wn,id:Bn,open:rn,inputElement:un,disabled:At,autoFocus:Kt,autoComplete:Sn,editable:ir,activeDescendantId:kn,value:Wi,onKeyDown:Li,onMouseDown:Bi,onChange:function(wr){pi(!0),Ln(wr)},onPaste:Ui,onCompositionStart:lr,onCompositionEnd:Di,tabIndex:Qn,attrs:(0,Ne.Z)(_t,!0),maxLength:Mi?si:void 0})),!Mi&&Fi?ge.createElement("span",{className:"".concat(wn,"-selection-item"),title:In,style:hr?{visibility:"hidden"}:void 0},Fi.label):null,zr())},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 ln=function(_t,un){var wn=(0,ge.useRef)(null),Bn=(0,ge.useRef)(!1),zn=_t.prefixCls,At=_t.open,Kt=_t.mode,Sn=_t.showSearch,kn=_t.tokenWithEnter,Zt=_t.autoClearSearchValue,rn=_t.onSearch,Rn=_t.onSearchSubmit,An=_t.onToggleOpen,Qn=_t.onInputKeyDown,Un=_t.domRef;ge.useImperativeHandle(un,function(){return{focus:function(){wn.current.focus()},blur:function(){wn.current.blur()}}});var qn=Ce(0),Nn=(0,be.Z)(qn,2),si=Nn[0],Li=Nn[1],Bi=function(Wi){var hr=Wi.which;(hr===z.Z.UP||hr===z.Z.DOWN)&&Wi.preventDefault(),Qn&&Qn(Wi),hr===z.Z.ENTER&&Kt==="tags"&&!Bn.current&&!At&&(Rn==null||Rn(Wi.target.value)),jt(hr)&&An(!0)},Ln=function(){Li(!0)},Ui=(0,ge.useRef)(null),lr=function(Wi){rn(Wi,!0,Bn.current)!==!1&&An(!0)},Di=function(){Bn.current=!0},Pn=function(Wi){Bn.current=!1,Kt!=="combobox"&&lr(Wi.target.value)},Yn=function(Wi){var hr=Wi.target.value;if(kn&&Ui.current&&/[\r\n]/.test(Ui.current)){var In=Ui.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");hr=hr.replace(In,Ui.current)}Ui.current=null,lr(hr)},ui=function(Wi){var hr=Wi.clipboardData,In=hr.getData("text");Ui.current=In},Ti=function(Wi){var hr=Wi.target;if(hr!==wn.current){var In=document.body.style.msTouchAction!==void 0;In?setTimeout(function(){wn.current.focus()}):wn.current.focus()}},pi=function(Wi){var hr=si();Wi.target!==wn.current&&!hr&&Kt!=="combobox"&&Wi.preventDefault(),(Kt!=="combobox"&&(!Sn||!hr)||!At)&&(At&&Zt!==!1&&rn("",!0,!1),An())},Mi={inputRef:wn,onInputKeyDown:Bi,onInputMouseDown:Ln,onInputChange:Yn,onInputPaste:ui,onInputCompositionStart:Di,onInputCompositionEnd:Pn},ir=Kt==="multiple"||Kt==="tags"?ge.createElement(Et,(0,Le.Z)({},_t,Mi)):ge.createElement(Bt,(0,Le.Z)({},_t,Mi));return ge.createElement("div",{ref:Un,className:"".concat(zn,"-selector"),onClick:Ti,onMouseDown:pi},ir)},$t=ge.forwardRef(ln);$t.displayName="Selector";var yn=$t,Ut=Ee(35593),Wt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Xt=function(_t){var un=_t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:un,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:un,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:un,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:un,adjustY:1},htmlRegion:"scroll"}}},mt=function(_t,un){var wn=_t.prefixCls,Bn=_t.disabled,zn=_t.visible,At=_t.children,Kt=_t.popupElement,Sn=_t.animation,kn=_t.transitionName,Zt=_t.dropdownStyle,rn=_t.dropdownClassName,Rn=_t.direction,An=Rn===void 0?"ltr":Rn,Qn=_t.placement,Un=_t.builtinPlacements,qn=_t.dropdownMatchSelectWidth,Nn=_t.dropdownRender,si=_t.dropdownAlign,Li=_t.getPopupContainer,Bi=_t.empty,Ln=_t.getTriggerDOMNode,Ui=_t.onPopupVisibleChange,lr=_t.onPopupMouseEnter,Di=(0,Pe.Z)(_t,Wt),Pn="".concat(wn,"-dropdown"),Yn=Kt;Nn&&(Yn=Nn(Kt));var ui=ge.useMemo(function(){return Un||Xt(qn)},[Un,qn]),Ti=Sn?"".concat(Pn,"-").concat(Sn):kn,pi=typeof qn=="number",Mi=ge.useMemo(function(){return pi?null:qn===!1?"minWidth":"width"},[qn,pi]),ir=Zt;pi&&(ir=(0,Te.Z)((0,Te.Z)({},ir),{},{width:qn}));var Fi=ge.useRef(null);return ge.useImperativeHandle(un,function(){return{getPopupElement:function(){return Fi.current}}}),ge.createElement(Ut.Z,(0,Le.Z)({},Di,{showAction:Ui?["click"]:[],hideAction:Ui?["click"]:[],popupPlacement:Qn||(An==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:ui,prefixCls:Pn,popupTransitionName:Ti,popup:ge.createElement("div",{ref:Fi,onMouseEnter:lr},Yn),stretch:Mi,popupAlign:si,popupVisible:zn,getPopupContainer:Li,popupClassName:ve()(rn,(0,Ie.Z)({},"".concat(Pn,"-empty"),Bi)),popupStyle:ir,getTriggerDOMNode:Ln,onPopupVisibleChange:Ui}),At)},ze=ge.forwardRef(mt);ze.displayName="SelectTrigger";var Be=ze,et=Ee(34589);function qe(kt,_t){var un=kt.key,wn;return"value"in kt&&(wn=kt.value),un!=null?un:wn!==void 0?wn:"rc-index-key-".concat(_t)}function Ue(kt,_t){var un=kt||{},wn=un.label,Bn=un.value,zn=un.options,At=un.groupLabel,Kt=wn||(_t?"children":"label");return{label:Kt,value:Bn||"value",options:zn||"options",groupLabel:At||Kt}}function Xe(kt){var _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},un=_t.fieldNames,wn=_t.childrenAsData,Bn=[],zn=Ue(un,!1),At=zn.label,Kt=zn.value,Sn=zn.options,kn=zn.groupLabel;function Zt(rn,Rn){rn.forEach(function(An){if(Rn||!(Sn in An)){var Qn=An[Kt];Bn.push({key:qe(An,Bn.length),groupOption:Rn,data:An,label:An[At],value:Qn})}else{var Un=An[kn];Un===void 0&&wn&&(Un=An.label),Bn.push({key:qe(An,Bn.length),group:!0,data:An,label:Un}),Zt(An[Sn],!0)}})}return Zt(kt,!1),Bn}function Re(kt){var _t=(0,Te.Z)({},kt);return"props"in _t||Object.defineProperty(_t,"props",{get:function(){return(0,xe.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),_t}}),_t}function Ae(kt,_t){if(!_t||!_t.length)return null;var un=!1;function wn(zn,At){var Kt=(0,et.Z)(At),Sn=Kt[0],kn=Kt.slice(1);if(!Sn)return[zn];var Zt=zn.split(Sn);return un=un||Zt.length>1,Zt.reduce(function(rn,Rn){return[].concat((0,me.Z)(rn),(0,me.Z)(wn(Rn,kn)))},[]).filter(function(rn){return rn})}var Bn=wn(kt,_t);return un?Bn:null}var Ge=["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 at=ge.forwardRef(function(kt,_t){var un,wn,Bn=kt.id,zn=kt.prefixCls,At=kt.className,Kt=kt.showSearch,Sn=kt.tagRender,kn=kt.direction,Zt=kt.omitDomProps,rn=kt.displayValues,Rn=kt.onDisplayValuesChange,An=kt.emptyOptions,Qn=kt.notFoundContent,Un=Qn===void 0?"Not Found":Qn,qn=kt.onClear,Nn=kt.mode,si=kt.disabled,Li=kt.loading,Bi=kt.getInputElement,Ln=kt.getRawInputElement,Ui=kt.open,lr=kt.defaultOpen,Di=kt.onDropdownVisibleChange,Pn=kt.activeValue,Yn=kt.onActiveValueChange,ui=kt.activeDescendantId,Ti=kt.searchValue,pi=kt.autoClearSearchValue,Mi=kt.onSearch,ir=kt.onSearchSplit,Fi=kt.tokenSeparators,Wi=kt.allowClear,hr=kt.suffixIcon,In=kt.clearIcon,zr=kt.OptionList,On=kt.animation,wr=kt.transitionName,po=kt.dropdownStyle,Ar=kt.dropdownClassName,To=kt.dropdownMatchSelectWidth,oo=kt.dropdownRender,$i=kt.dropdownAlign,Qi=kt.placement,fr=kt.builtinPlacements,Mr=kt.getPopupContainer,fi=kt.showAction,Tt=fi===void 0?[]:fi,Ir=kt.onFocus,ho=kt.onBlur,Zo=kt.onKeyUp,Po=kt.onKeyDown,$o=kt.onMouseDown,Yo=(0,Pe.Z)(kt,Ge),Sr=Ze(Nn),yr=(Kt!==void 0?Kt:Sr)||Nn==="combobox",qi=(0,Te.Z)({},Yo);Ke.forEach(function(so){delete qi[so]}),Zt==null||Zt.forEach(function(so){delete qi[so]});var Qr=ge.useState(!1),_o=(0,be.Z)(Qr,2),rr=_o[0],ji=_o[1];ge.useEffect(function(){ji((0,ue.Z)())},[]);var Xn=ge.useRef(null),er=ge.useRef(null),no=ge.useRef(null),Lo=ge.useRef(null),ko=ge.useRef(null),Xo=we(),Ss=(0,be.Z)(Xo,3),os=Ss[0],Is=Ss[1],ps=Ss[2];ge.useImperativeHandle(_t,function(){var so,zo;return{focus:(so=Lo.current)===null||so===void 0?void 0:so.focus,blur:(zo=Lo.current)===null||zo===void 0?void 0:zo.blur,scrollTo:function(na){var Ds;return(Ds=ko.current)===null||Ds===void 0?void 0:Ds.scrollTo(na)}}});var sa=ge.useMemo(function(){var so;if(Nn!=="combobox")return Ti;var zo=(so=rn[0])===null||so===void 0?void 0:so.value;return typeof zo=="string"||typeof zo=="number"?String(zo):""},[Ti,Nn,rn]),_n=Nn==="combobox"&&typeof Bi=="function"&&Bi()||null,Cs=typeof Ln=="function"&&Ln(),Pu=(0,ee.x1)(er,Cs==null||(un=Cs.props)===null||un===void 0?void 0:un.ref),Na=ge.useState(!1),ma=(0,be.Z)(Na,2),gs=ma[0],su=ma[1];(0,de.Z)(function(){su(!0)},[]);var au=(0,Se.Z)(!1,{defaultValue:lr,value:Ui}),fo=(0,be.Z)(au,2),Lr=fo[0],La=fo[1],Cr=gs?Lr:!1,to=!Un&&An;(si||to&&Cr&&Nn==="combobox")&&(Cr=!1);var Kr=to?!1:Cr,Ci=ge.useCallback(function(so){var zo=so!==void 0?so:!Cr;si||(La(zo),Cr!==zo&&(Di==null||Di(zo)))},[si,Cr,La,Di]),us=ge.useMemo(function(){return(Fi||[]).some(function(so){return[`
|
|
|
`,`\r
|
|
|
`].includes(so)})},[Fi]),Ts=function(zo,Ma,na){var Ds=!0,Ps=zo;Yn==null||Yn(null);var ks=na?null:Ae(zo,Fi);return Nn!=="combobox"&&ks&&(Ps="",ir==null||ir(ks),Ci(!1),Ds=!1),Mi&&sa!==Ps&&Mi(Ps,{source:Ma?"typing":"effect"}),Ds},ba=function(zo){!zo||!zo.trim()||Mi(zo,{source:"submit"})};ge.useEffect(function(){!Cr&&!Sr&&Nn!=="combobox"&&Ts("",!1,!1)},[Cr]),ge.useEffect(function(){Lr&&si&&La(!1),si&&Is(!1)},[si]);var Ha=Ce(),Qa=(0,be.Z)(Ha,2),yi=Qa[0],ms=Qa[1],Ys=function(zo){var Ma=yi(),na=zo.which;if(na===z.Z.ENTER&&(Nn!=="combobox"&&zo.preventDefault(),Cr||Ci(!0)),ms(!!sa),na===z.Z.BACKSPACE&&!Ma&&Sr&&!sa&&rn.length){for(var Ds=(0,me.Z)(rn),Ps=null,ks=Ds.length-1;ks>=0;ks-=1){var Ws=Ds[ks];if(!Ws.disabled){Ds.splice(ks,1),Ps=Ws;break}}Ps&&Rn(Ds,{type:"remove",values:[Ps]})}for(var Zs=arguments.length,Vl=new Array(Zs>1?Zs-1:0),Dl=1;Dl<Zs;Dl++)Vl[Dl-1]=arguments[Dl];if(Cr&&ko.current){var Rs;(Rs=ko.current).onKeyDown.apply(Rs,[zo].concat(Vl))}Po==null||Po.apply(void 0,[zo].concat(Vl))},qa=function(zo){for(var Ma=arguments.length,na=new Array(Ma>1?Ma-1:0),Ds=1;Ds<Ma;Ds++)na[Ds-1]=arguments[Ds];if(Cr&&ko.current){var Ps;(Ps=ko.current).onKeyUp.apply(Ps,[zo].concat(na))}Zo==null||Zo.apply(void 0,[zo].concat(na))},xl=function(zo){var Ma=rn.filter(function(na){return na!==zo});Rn(Ma,{type:"remove",values:[zo]})},Ol=ge.useRef(!1),Fr=function(){Is(!0),si||(Ir&&!Ol.current&&Ir.apply(void 0,arguments),Tt.includes("focus")&&Ci(!0)),Ol.current=!0},nc=function(){Is(!1,function(){Ol.current=!1,Ci(!1)}),!si&&(sa&&(Nn==="tags"?Mi(sa,{source:"submit"}):Nn==="multiple"&&Mi("",{source:"blur"})),ho&&ho.apply(void 0,arguments))},Oa=[];ge.useEffect(function(){return function(){Oa.forEach(function(so){return clearTimeout(so)}),Oa.splice(0,Oa.length)}},[]);var Ua=function(zo){var Ma,na=zo.target,Ds=(Ma=no.current)===null||Ma===void 0?void 0:Ma.getPopupElement();if(Ds&&Ds.contains(na)){var Ps=setTimeout(function(){var Vl=Oa.indexOf(Ps);if(Vl!==-1&&Oa.splice(Vl,1),ps(),!rr&&!Ds.contains(document.activeElement)){var Dl;(Dl=Lo.current)===null||Dl===void 0||Dl.focus()}});Oa.push(Ps)}for(var ks=arguments.length,Ws=new Array(ks>1?ks-1:0),Zs=1;Zs<ks;Zs++)Ws[Zs-1]=arguments[Zs];$o==null||$o.apply(void 0,[zo].concat(Ws))},ka=ge.useState({}),Kl=(0,be.Z)(ka,2),_u=Kl[1];function Ga(){_u({})}var Wa;Cs&&(Wa=function(zo){Ci(zo)}),ke(function(){var so;return[Xn.current,(so=no.current)===null||so===void 0?void 0:so.getPopupElement()]},Kr,Ci,!!Cs);var Uu=ge.useMemo(function(){return(0,Te.Z)((0,Te.Z)({},kt),{},{notFoundContent:Un,open:Cr,triggerOpen:Kr,id:Bn,showSearch:yr,multiple:Sr,toggleOpen:Ci})},[kt,Un,Kr,Cr,Bn,yr,Sr,Ci]),yc=!!hr||Li,Eu;yc&&(Eu=ge.createElement(ie,{className:ve()("".concat(zn,"-arrow"),(0,Ie.Z)({},"".concat(zn,"-arrow-loading"),Li)),customizeIcon:hr,customizeIconProps:{loading:Li,searchValue:sa,open:Cr,focused:os,showSearch:yr}}));var Il=function(){var zo;qn==null||qn(),(zo=Lo.current)===null||zo===void 0||zo.focus(),Rn([],{type:"clear",values:rn}),Ts("",!1,!1)},Sc=se(zn,Il,rn,Wi,In,si,sa,Nn),Gu=Sc.allowClear,Lu=Sc.clearIcon,wl=ge.createElement(zr,{ref:ko}),th=ve()(zn,At,(wn={},(0,Ie.Z)(wn,"".concat(zn,"-focused"),os),(0,Ie.Z)(wn,"".concat(zn,"-multiple"),Sr),(0,Ie.Z)(wn,"".concat(zn,"-single"),!Sr),(0,Ie.Z)(wn,"".concat(zn,"-allow-clear"),Wi),(0,Ie.Z)(wn,"".concat(zn,"-show-arrow"),yc),(0,Ie.Z)(wn,"".concat(zn,"-disabled"),si),(0,Ie.Z)(wn,"".concat(zn,"-loading"),Li),(0,Ie.Z)(wn,"".concat(zn,"-open"),Cr),(0,Ie.Z)(wn,"".concat(zn,"-customize-input"),_n),(0,Ie.Z)(wn,"".concat(zn,"-show-search"),yr),wn)),xc=ge.createElement(Be,{ref:no,disabled:si,prefixCls:zn,visible:Kr,popupElement:wl,animation:On,transitionName:wr,dropdownStyle:po,dropdownClassName:Ar,direction:kn,dropdownMatchSelectWidth:To,dropdownRender:oo,dropdownAlign:$i,placement:Qi,builtinPlacements:fr,getPopupContainer:Mr,empty:An,getTriggerDOMNode:function(){return er.current},onPopupVisibleChange:Wa,onPopupMouseEnter:Ga},Cs?ge.cloneElement(Cs,{ref:Pu}):ge.createElement(yn,(0,Le.Z)({},kt,{domRef:er,prefixCls:zn,inputElement:_n,ref:Lo,id:Bn,showSearch:yr,autoClearSearchValue:pi,mode:Nn,activeDescendantId:ui,tagRender:Sn,values:rn,open:Cr,onToggleOpen:Ci,activeValue:Pn,searchValue:sa,onSearch:Ts,onSearchSubmit:ba,onRemove:xl,tokenWithEnter:us}))),lu;return Cs?lu=xc:lu=ge.createElement("div",(0,Le.Z)({className:th},qi,{ref:Xn,onMouseDown:Ua,onKeyDown:Ys,onKeyUp:qa,onFocus:Fr,onBlur:nc}),os&&!Cr&&ge.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(rn.map(function(so){var zo=so.label,Ma=so.value;return["number","string"].includes((0,he.Z)(zo))?zo:Ma}).join(", "))),xc,Eu,Gu&&Lu),ge.createElement(le.Provider,{value:Uu},lu)}),xt=at,tn=function(kt,_t){var un=ge.useRef({values:new Map,options:new Map}),wn=ge.useMemo(function(){var zn=un.current,At=zn.values,Kt=zn.options,Sn=kt.map(function(rn){if(rn.label===void 0){var Rn;return(0,Te.Z)((0,Te.Z)({},rn),{},{label:(Rn=At.get(rn.value))===null||Rn===void 0?void 0:Rn.label})}return rn}),kn=new Map,Zt=new Map;return Sn.forEach(function(rn){kn.set(rn.value,rn),Zt.set(rn.value,_t.get(rn.value)||Kt.get(rn.value))}),un.current.values=kn,un.current.options=Zt,Sn},[kt,_t]),Bn=ge.useCallback(function(zn){return _t.get(zn)||un.current.options.get(zn)},[_t]);return[wn,Bn]};function nn(kt,_t){return gt(kt).join("").toUpperCase().includes(_t)}var Jt=function(kt,_t,un,wn,Bn){return ge.useMemo(function(){if(!un||wn===!1)return kt;var zn=_t.options,At=_t.label,Kt=_t.value,Sn=[],kn=typeof wn=="function",Zt=un.toUpperCase(),rn=kn?wn:function(An,Qn){return Bn?nn(Qn[Bn],Zt):Qn[zn]?nn(Qn[At!=="children"?At:"label"],Zt):nn(Qn[Kt],Zt)},Rn=kn?function(An){return Re(An)}:function(An){return An};return kt.forEach(function(An){if(An[zn]){var Qn=rn(un,Rn(An));if(Qn)Sn.push(An);else{var Un=An[zn].filter(function(qn){return rn(un,Rn(qn))});Un.length&&Sn.push((0,Te.Z)((0,Te.Z)({},An),{},(0,Ie.Z)({},zn,Un)))}return}rn(un,Rn(An))&&Sn.push(An)}),Sn},[kt,wn,Bn,un,_t])},pn=Ee(17115),Mn=Ee(11592),hn=["children","value"],En=["children"];function Wn(kt){var _t=kt,un=_t.key,wn=_t.props,Bn=wn.children,zn=wn.value,At=(0,Pe.Z)(wn,hn);return(0,Te.Z)({key:un,value:zn!==void 0?zn:un,children:Bn},At)}function Tn(kt){var _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Mn.Z)(kt).map(function(un,wn){if(!ge.isValidElement(un)||!un.type)return null;var Bn=un,zn=Bn.type.isSelectOptGroup,At=Bn.key,Kt=Bn.props,Sn=Kt.children,kn=(0,Pe.Z)(Kt,En);return _t||!zn?Wn(un):(0,Te.Z)((0,Te.Z)({key:"__RC_SELECT_GRP__".concat(At===null?wn:At,"__"),label:At},kn),{},{options:Tn(Sn)})}).filter(function(un){return un})}function ci(kt,_t,un,wn,Bn){return ge.useMemo(function(){var zn=kt,At=!kt;At&&(zn=Tn(_t));var Kt=new Map,Sn=new Map,kn=function(Rn,An,Qn){Qn&&typeof Qn=="string"&&Rn.set(An[Qn],An)};function Zt(rn){for(var Rn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,An=0;An<rn.length;An+=1){var Qn=rn[An];!Qn[un.options]||Rn?(Kt.set(Qn[un.value],Qn),kn(Sn,Qn,un.label),kn(Sn,Qn,wn),kn(Sn,Qn,Bn)):Zt(Qn[un.options],!0)}}return Zt(zn),{options:zn,valueOptions:Kt,labelOptions:Sn}},[kt,_t,un,wn,Bn])}function ri(kt){var _t=ge.useRef();_t.current=kt;var un=ge.useCallback(function(){return _t.current.apply(_t,arguments)},[]);return un}var Ii=function(){return null};Ii.isSelectOptGroup=!0;var bi=Ii,nr=function(){return null};nr.isSelectOption=!0;var Ji=nr,gr=Ee(80547),cr=Ee(2738),eo=Ee(4409),ro=ge.createContext(null),hi=ro;function Pr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Hi=["disabled","title","children","style","className"];function st(kt){return typeof kt=="string"||typeof kt=="number"}var Rr=function(_t,un){var wn=ye(),Bn=wn.prefixCls,zn=wn.id,At=wn.open,Kt=wn.multiple,Sn=wn.mode,kn=wn.searchValue,Zt=wn.toggleOpen,rn=wn.notFoundContent,Rn=wn.onPopupScroll,An=ge.useContext(hi),Qn=An.flattenOptions,Un=An.onActiveValue,qn=An.defaultActiveFirstOption,Nn=An.onSelect,si=An.menuItemSelectedIcon,Li=An.rawValues,Bi=An.fieldNames,Ln=An.virtual,Ui=An.direction,lr=An.listHeight,Di=An.listItemHeight,Pn="".concat(Bn,"-item"),Yn=(0,gr.Z)(function(){return Qn},[At,Qn],function($i,Qi){return Qi[0]&&$i[1]!==Qi[1]}),ui=ge.useRef(null),Ti=function(Qi){Qi.preventDefault()},pi=function(Qi){ui.current&&ui.current.scrollTo(typeof Qi=="number"?{index:Qi}:Qi)},Mi=function(Qi){for(var fr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Mr=Yn.length,fi=0;fi<Mr;fi+=1){var Tt=(Qi+fi*fr+Mr)%Mr,Ir=Yn[Tt],ho=Ir.group,Zo=Ir.data;if(!ho&&!Zo.disabled)return Tt}return-1},ir=ge.useState(function(){return Mi(0)}),Fi=(0,be.Z)(ir,2),Wi=Fi[0],hr=Fi[1],In=function(Qi){var fr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;hr(Qi);var Mr={source:fr?"keyboard":"mouse"},fi=Yn[Qi];if(!fi){Un(null,-1,Mr);return}Un(fi.value,Qi,Mr)};(0,ge.useEffect)(function(){In(qn!==!1?Mi(0):-1)},[Yn.length,kn]);var zr=ge.useCallback(function($i){return Li.has($i)&&Sn!=="combobox"},[Sn,(0,me.Z)(Li).toString(),Li.size]);(0,ge.useEffect)(function(){var $i=setTimeout(function(){if(!Kt&&At&&Li.size===1){var fr=Array.from(Li)[0],Mr=Yn.findIndex(function(fi){var Tt=fi.data;return Tt.value===fr});Mr!==-1&&(In(Mr),pi(Mr))}});if(At){var Qi;(Qi=ui.current)===null||Qi===void 0||Qi.scrollTo(void 0)}return function(){return clearTimeout($i)}},[At,kn,Qn.length]);var On=function(Qi){Qi!==void 0&&Nn(Qi,{selected:!Li.has(Qi)}),Kt||Zt(!1)};if(ge.useImperativeHandle(un,function(){return{onKeyDown:function(Qi){var fr=Qi.which,Mr=Qi.ctrlKey;switch(fr){case z.Z.N:case z.Z.P:case z.Z.UP:case z.Z.DOWN:{var fi=0;if(fr===z.Z.UP?fi=-1:fr===z.Z.DOWN?fi=1:Pr()&&Mr&&(fr===z.Z.N?fi=1:fr===z.Z.P&&(fi=-1)),fi!==0){var Tt=Mi(Wi+fi,fi);pi(Tt),In(Tt,!0)}break}case z.Z.ENTER:{var Ir=Yn[Wi];Ir&&!Ir.data.disabled?On(Ir.value):On(void 0),At&&Qi.preventDefault();break}case z.Z.ESC:Zt(!1),At&&Qi.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Qi){pi(Qi)}}}),Yn.length===0)return ge.createElement("div",{role:"listbox",id:"".concat(zn,"_list"),className:"".concat(Pn,"-empty"),onMouseDown:Ti},rn);var wr=Object.keys(Bi).map(function($i){return Bi[$i]}),po=function(Qi){return Qi.label};function Ar($i,Qi){var fr=$i.group;return{role:fr?"presentation":"option",id:"".concat(zn,"_list_").concat(Qi)}}var To=function(Qi){var fr=Yn[Qi];if(!fr)return null;var Mr=fr.data||{},fi=Mr.value,Tt=fr.group,Ir=(0,Ne.Z)(Mr,!0),ho=po(fr);return fr?ge.createElement("div",(0,Le.Z)({"aria-label":typeof ho=="string"&&!Tt?ho:null},Ir,{key:Qi},Ar(fr,Qi),{"aria-selected":zr(fi)}),fi):null},oo={role:"listbox",id:"".concat(zn,"_list")};return ge.createElement(ge.Fragment,null,Ln&&ge.createElement("div",(0,Le.Z)({},oo,{style:{height:0,width:0,overflow:"hidden"}}),To(Wi-1),To(Wi),To(Wi+1)),ge.createElement(eo.Z,{itemKey:"key",ref:ui,data:Yn,height:lr,itemHeight:Di,fullHeight:!1,onMouseDown:Ti,onScroll:Rn,virtual:Ln,direction:Ui,innerProps:Ln?null:oo},function($i,Qi){var fr,Mr=$i.group,fi=$i.groupOption,Tt=$i.data,Ir=$i.label,ho=$i.value,Zo=Tt.key;if(Mr){var Po,$o=(Po=Tt.title)!==null&&Po!==void 0?Po:st(Ir)?Ir.toString():void 0;return ge.createElement("div",{className:ve()(Pn,"".concat(Pn,"-group")),title:$o},Ir!==void 0?Ir:Zo)}var Yo=Tt.disabled,Sr=Tt.title,yr=Tt.children,qi=Tt.style,Qr=Tt.className,_o=(0,Pe.Z)(Tt,Hi),rr=(0,cr.Z)(_o,wr),ji=zr(ho),Xn="".concat(Pn,"-option"),er=ve()(Pn,Xn,Qr,(fr={},(0,Ie.Z)(fr,"".concat(Xn,"-grouped"),fi),(0,Ie.Z)(fr,"".concat(Xn,"-active"),Wi===Qi&&!Yo),(0,Ie.Z)(fr,"".concat(Xn,"-disabled"),Yo),(0,Ie.Z)(fr,"".concat(Xn,"-selected"),ji),fr)),no=po($i),Lo=!si||typeof si=="function"||ji,ko=typeof no=="number"?no:no||ho,Xo=st(ko)?ko.toString():void 0;return Sr!==void 0&&(Xo=Sr),ge.createElement("div",(0,Le.Z)({},(0,Ne.Z)(rr),Ln?{}:Ar($i,Qi),{"aria-selected":ji,className:er,title:Xo,onMouseMove:function(){Wi===Qi||Yo||In(Qi)},onClick:function(){Yo||On(ho)},style:qi}),ge.createElement("div",{className:"".concat(Xn,"-content")},ko),ge.isValidElement(si)||ji,Lo&&ge.createElement(ie,{className:"".concat(Pn,"-option-state"),customizeIcon:si,customizeIconProps:{isSelected:ji}},ji?"\u2713":null))}))},Er=ge.forwardRef(Rr);Er.displayName="OptionList";var yo=Er;function Zr(kt){var _t=kt.mode,un=kt.options,wn=kt.children,Bn=kt.backfill,zn=kt.allowClear,At=kt.placeholder,Kt=kt.getInputElement,Sn=kt.showSearch,kn=kt.onSearch,Zt=kt.defaultOpen,rn=kt.autoFocus,Rn=kt.labelInValue,An=kt.value,Qn=kt.inputValue,Un=kt.optionLabelProp,qn=isMultiple(_t),Nn=Sn!==void 0?Sn:qn||_t==="combobox",si=un||convertChildrenToData(wn);if(warning(_t!=="tags"||si.every(function(Ui){return!Ui.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),_t==="tags"||_t==="combobox"){var Li=si.some(function(Ui){return Ui.options?Ui.options.some(function(lr){return typeof("value"in lr?lr.value:lr.key)=="number"}):typeof("value"in Ui?Ui.value:Ui.key)=="number"});warning(!Li,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(_t!=="combobox"||!Un,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(_t==="combobox"||!Bn,"`backfill` only works with `combobox` mode."),warning(_t==="combobox"||!Kt,"`getInputElement` only work with `combobox` mode."),noteOnce(_t!=="combobox"||!Kt||!zn||!At,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),kn&&!Nn&&_t!=="combobox"&&_t!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Zt||rn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),An!=null){var Bi=toArray(An);warning(!Rn||Bi.every(function(Ui){return _typeof(Ui)==="object"&&("key"in Ui||"value"in Ui)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!qn||Array.isArray(An),"`value` should be array when `mode` is `multiple` or `tags`")}if(wn){var Ln=null;toNodeArray(wn).some(function(Ui){if(!React.isValidElement(Ui)||!Ui.type)return!1;var lr=Ui,Di=lr.type;if(Di.isSelectOption)return!1;if(Di.isSelectOptGroup){var Pn=toNodeArray(Ui.props.children).every(function(Yn){return!React.isValidElement(Yn)||!Ui.type||Yn.type.isSelectOption?!0:(Ln=Yn.type,!1)});return!Pn}return Ln=Di,!0}),Ln&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ln.displayName||Ln.name||Ln,"`.")),warning(Qn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function ao(kt,_t){if(kt){var un=function wn(Bn){for(var zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,At=0;At<Bn.length;At++){var Kt=Bn[At];if(Kt[_t==null?void 0:_t.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!zn&&Array.isArray(Kt[_t==null?void 0:_t.options])&&wn(Kt[_t==null?void 0:_t.options],!0))break}};un(kt)}}var Jr=null,lo=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],oi=["inputValue"];function $e(kt){return!kt||(0,he.Z)(kt)!=="object"}var nt=ge.forwardRef(function(kt,_t){var un=kt.id,wn=kt.mode,Bn=kt.prefixCls,zn=Bn===void 0?"rc-select":Bn,At=kt.backfill,Kt=kt.fieldNames,Sn=kt.inputValue,kn=kt.searchValue,Zt=kt.onSearch,rn=kt.autoClearSearchValue,Rn=rn===void 0?!0:rn,An=kt.onSelect,Qn=kt.onDeselect,Un=kt.dropdownMatchSelectWidth,qn=Un===void 0?!0:Un,Nn=kt.filterOption,si=kt.filterSort,Li=kt.optionFilterProp,Bi=kt.optionLabelProp,Ln=kt.options,Ui=kt.children,lr=kt.defaultActiveFirstOption,Di=kt.menuItemSelectedIcon,Pn=kt.virtual,Yn=kt.direction,ui=kt.listHeight,Ti=ui===void 0?200:ui,pi=kt.listItemHeight,Mi=pi===void 0?20:pi,ir=kt.value,Fi=kt.defaultValue,Wi=kt.labelInValue,hr=kt.onChange,In=(0,Pe.Z)(kt,lo),zr=(0,pn.ZP)(un),On=Ze(wn),wr=!!(!Ln&&Ui),po=ge.useMemo(function(){return Nn===void 0&&wn==="combobox"?!1:Nn},[Nn,wn]),Ar=ge.useMemo(function(){return Ue(Kt,wr)},[JSON.stringify(Kt),wr]),To=(0,Se.Z)("",{value:kn!==void 0?kn:Sn,postState:function(to){return to||""}}),oo=(0,be.Z)(To,2),$i=oo[0],Qi=oo[1],fr=ci(Ln,Ui,Ar,Li,Bi),Mr=fr.valueOptions,fi=fr.labelOptions,Tt=fr.options,Ir=ge.useCallback(function(Cr){var to=gt(Cr);return to.map(function(Kr){var Ci,us,Ts,ba,Ha;if($e(Kr))Ci=Kr;else{var Qa;Ts=Kr.key,us=Kr.label,Ci=(Qa=Kr.value)!==null&&Qa!==void 0?Qa:Ts}var yi=Mr.get(Ci);if(yi){var ms;if(us===void 0&&(us=yi==null?void 0:yi[Bi||Ar.label]),Ts===void 0&&(Ts=(ms=yi==null?void 0:yi.key)!==null&&ms!==void 0?ms:Ci),ba=yi==null?void 0:yi.disabled,Ha=yi==null?void 0:yi.title,0)var Ys}return{label:us,value:Ci,key:Ts,disabled:ba,title:Ha}})},[Ar,Bi,Mr]),ho=(0,Se.Z)(Fi,{value:ir}),Zo=(0,be.Z)(ho,2),Po=Zo[0],$o=Zo[1],Yo=ge.useMemo(function(){var Cr,to=Ir(Po);return wn==="combobox"&&yt((Cr=to[0])===null||Cr===void 0?void 0:Cr.value)?[]:to},[Po,Ir,wn]),Sr=tn(Yo,Mr),yr=(0,be.Z)(Sr,2),qi=yr[0],Qr=yr[1],_o=ge.useMemo(function(){if(!wn&&qi.length===1){var Cr=qi[0];if(Cr.value===null&&(Cr.label===null||Cr.label===void 0))return[]}return qi.map(function(to){var Kr;return(0,Te.Z)((0,Te.Z)({},to),{},{label:(Kr=to.label)!==null&&Kr!==void 0?Kr:to.value})})},[wn,qi]),rr=ge.useMemo(function(){return new Set(qi.map(function(Cr){return Cr.value}))},[qi]);ge.useEffect(function(){if(wn==="combobox"){var Cr,to=(Cr=qi[0])===null||Cr===void 0?void 0:Cr.value;Qi(it(to)?String(to):"")}},[qi]);var ji=ri(function(Cr,to){var Kr,Ci=to!=null?to:Cr;return Kr={},(0,Ie.Z)(Kr,Ar.value,Cr),(0,Ie.Z)(Kr,Ar.label,Ci),Kr}),Xn=ge.useMemo(function(){if(wn!=="tags")return Tt;var Cr=(0,me.Z)(Tt),to=function(Ci){return Mr.has(Ci)};return(0,me.Z)(qi).sort(function(Kr,Ci){return Kr.value<Ci.value?-1:1}).forEach(function(Kr){var Ci=Kr.value;to(Ci)||Cr.push(ji(Ci,Kr.label))}),Cr},[ji,Tt,Mr,qi,wn]),er=Jt(Xn,Ar,$i,po,Li),no=ge.useMemo(function(){return wn!=="tags"||!$i||er.some(function(Cr){return Cr[Li||"value"]===$i})||er.some(function(Cr){return Cr[Ar.value]===$i})?er:[ji($i)].concat((0,me.Z)(er))},[ji,Li,wn,er,$i,Ar]),Lo=ge.useMemo(function(){return si?(0,me.Z)(no).sort(function(Cr,to){return si(Cr,to)}):no},[no,si]),ko=ge.useMemo(function(){return Xe(Lo,{fieldNames:Ar,childrenAsData:wr})},[Lo,Ar,wr]),Xo=function(to){var Kr=Ir(to);if($o(Kr),hr&&(Kr.length!==qi.length||Kr.some(function(Ts,ba){var Ha;return((Ha=qi[ba])===null||Ha===void 0?void 0:Ha.value)!==(Ts==null?void 0:Ts.value)}))){var Ci=Wi?Kr:Kr.map(function(Ts){return Ts.value}),us=Kr.map(function(Ts){return Re(Qr(Ts.value))});hr(On?Ci:Ci[0],On?us:us[0])}},Ss=ge.useState(null),os=(0,be.Z)(Ss,2),Is=os[0],ps=os[1],sa=ge.useState(0),_n=(0,be.Z)(sa,2),Cs=_n[0],Pu=_n[1],Na=lr!==void 0?lr:wn!=="combobox",ma=ge.useCallback(function(Cr,to){var Kr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ci=Kr.source,us=Ci===void 0?"keyboard":Ci;Pu(to),At&&wn==="combobox"&&Cr!==null&&us==="keyboard"&&ps(String(Cr))},[At,wn]),gs=function(to,Kr,Ci){var us=function(){var Ol,Fr=Qr(to);return[Wi?{label:Fr==null?void 0:Fr[Ar.label],value:to,key:(Ol=Fr==null?void 0:Fr.key)!==null&&Ol!==void 0?Ol:to}:to,Re(Fr)]};if(Kr&&An){var Ts=us(),ba=(0,be.Z)(Ts,2),Ha=ba[0],Qa=ba[1];An(Ha,Qa)}else if(!Kr&&Qn&&Ci!=="clear"){var yi=us(),ms=(0,be.Z)(yi,2),Ys=ms[0],qa=ms[1];Qn(Ys,qa)}},su=ri(function(Cr,to){var Kr,Ci=On?to.selected:!0;Ci?Kr=On?[].concat((0,me.Z)(qi),[Cr]):[Cr]:Kr=qi.filter(function(us){return us.value!==Cr}),Xo(Kr),gs(Cr,Ci),wn==="combobox"?ps(""):(!Ze||Rn)&&(Qi(""),ps(""))}),au=function(to,Kr){Xo(to);var Ci=Kr.type,us=Kr.values;(Ci==="remove"||Ci==="clear")&&us.forEach(function(Ts){gs(Ts.value,!1,Ci)})},fo=function(to,Kr){if(Qi(to),ps(null),Kr.source==="submit"){var Ci=(to||"").trim();if(Ci){var us=Array.from(new Set([].concat((0,me.Z)(rr),[Ci])));Xo(us),gs(Ci,!0),Qi("")}return}Kr.source!=="blur"&&(wn==="combobox"&&Xo(to),Zt==null||Zt(to))},Lr=function(to){var Kr=to;wn!=="tags"&&(Kr=to.map(function(us){var Ts=fi.get(us);return Ts==null?void 0:Ts.value}).filter(function(us){return us!==void 0}));var Ci=Array.from(new Set([].concat((0,me.Z)(rr),(0,me.Z)(Kr))));Xo(Ci),Ci.forEach(function(us){gs(us,!0)})},La=ge.useMemo(function(){var Cr=Pn!==!1&&qn!==!1;return(0,Te.Z)((0,Te.Z)({},fr),{},{flattenOptions:ko,onActiveValue:ma,defaultActiveFirstOption:Na,onSelect:su,menuItemSelectedIcon:Di,rawValues:rr,fieldNames:Ar,virtual:Cr,direction:Yn,listHeight:Ti,listItemHeight:Mi,childrenAsData:wr})},[fr,ko,ma,Na,su,Di,rr,Ar,Pn,qn,Ti,Mi,wr]);return ge.createElement(hi.Provider,{value:La},ge.createElement(xt,(0,Le.Z)({},In,{id:zr,prefixCls:zn,ref:_t,omitDomProps:oi,mode:wn,displayValues:_o,onDisplayValuesChange:au,direction:Yn,searchValue:$i,onSearch:fo,autoClearSearchValue:Rn,onSearchSplit:Lr,dropdownMatchSelectWidth:qn,OptionList:yo,emptyOptions:!ko.length,activeValue:Is,activeDescendantId:"".concat(zr,"_list_").concat(Cs)})))}),Je=nt;Je.Option=Ji,Je.OptGroup=bi;var wt=Je,Nt=wt},9296:function(bn,qt,Ee){"use strict";Ee.r(qt),Ee.d(qt,{ResizableTextArea:function(){return Qe},default:function(){return yt}});var Le=Ee(92413),me=Ee(33708),Ie=Ee(400),Te=Ee(39559),be=Ee(33606),Pe=Ee(37061),he=Ee(26407),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"),St=parseFloat(rt.getPropertyValue("padding-bottom"))+parseFloat(rt.getPropertyValue("padding-top")),Et=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:St,borderSize:Et,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),St=dt.paddingSize,Et=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,ln=void 0,$t,yn=le.scrollHeight;if(vt==="border-box"?yn+=Et:vt==="content-box"&&(yn-=St),ht!==null||rt!==null){le.value=" ";var Ut=le.scrollHeight-St;ht!==null&&(jt=Ut*ht,vt==="border-box"&&(jt=jt+St+Et),yn=Math.max(jt,yn)),rt!==null&&(ln=Ut*rt,vt==="border-box"&&(ln=ln+St+Et),$t=yn>ln?"":"hidden",yn=Math.min(ln,yn))}var Wt={height:yn,overflowY:$t,resize:"none"};return jt&&(Wt.minHeight=jt),ln&&(Wt.maxHeight=ln),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,St=ht.defaultValue,Et=ht.value,vt=ht.autoSize,Bt=ht.onResize,jt=ht.className,ln=ht.style,$t=ht.disabled,yn=ht.onChange,Ut=ht.onInternalAutoSize,Wt=(0,Pe.Z)(ht,Ce),Xt=(0,ve.Z)(St,{value:Et,postState:function(bi){return bi!=null?bi:""}}),mt=(0,be.Z)(Xt,2),ze=mt[0],Be=mt[1],et=function(bi){Be(bi.target.value),yn==null||yn(bi)},qe=de.useRef();de.useImperativeHandle(Ft,function(){return{textArea:qe.current}});var Ue=de.useMemo(function(){return vt&&(0,Te.Z)(vt)==="object"?[vt.minRows,vt.maxRows]:[]},[vt]),Xe=(0,be.Z)(Ue,2),Re=Xe[0],Ae=Xe[1],Ge=!!vt,Ke=function(){try{if(document.activeElement===qe.current){var bi=qe.current,nr=bi.selectionStart,Ji=bi.selectionEnd,gr=bi.scrollTop;qe.current.setSelectionRange(nr,Ji),qe.current.scrollTop=gr}}catch(cr){}},Ze=de.useState(je),at=(0,be.Z)(Ze,2),xt=at[0],tn=at[1],nn=de.useState(),Jt=(0,be.Z)(nn,2),pn=Jt[0],Mn=Jt[1],hn=function(){tn(ke)};(0,z.Z)(function(){Ge&&hn()},[Et,Re,Ae,Ge]),(0,z.Z)(function(){if(xt===ke)tn(Ne);else if(xt===Ne){var Ii=we(qe.current,!1,Re,Ae);tn(je),Mn(Ii)}else Ke()},[xt]);var En=de.useRef(),Wn=function(){ee.Z.cancel(En.current)},Tn=function(bi){xt===je&&(Bt==null||Bt(bi),vt&&(Wn(),En.current=(0,ee.Z)(function(){hn()})))};de.useEffect(function(){return Wn},[]);var ci=Ge?pn:null,ri=(0,me.Z)((0,me.Z)({},ln),ci);return(xt===ke||xt===Ne)&&(ri.overflowY="hidden",ri.overflowX="hidden"),de.createElement(ue.Z,{onResize:Tn,disabled:!(vt||Bt)},de.createElement("textarea",(0,Le.Z)({},Wt,{ref:qe,style:ri,className:xe()(rt,jt,(0,Ie.Z)({},"".concat(rt,"-disabled"),$t)),disabled:$t,value:ze,onChange:et})))}),Qe=Ve,We=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function gt(ut,Ft){return(0,he.Z)(ut||"").slice(0,Ft).join("")}function ct(ut,Ft,ht,rt){var dt=ht;return ut?dt=gt(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,St=ut.onFocus,Et=ut.onBlur,vt=ut.onChange,Bt=ut.allowClear,jt=ut.maxLength,ln=ut.onCompositionStart,$t=ut.onCompositionEnd,yn=ut.suffix,Ut=ut.prefixCls,Wt=Ut===void 0?"rc-textarea":Ut,Xt=ut.classes,mt=ut.showCount,ze=ut.className,Be=ut.style,et=ut.disabled,qe=ut.hidden,Ue=ut.classNames,Xe=ut.styles,Re=ut.onResize,Ae=(0,Pe.Z)(ut,We),Ge=(0,ve.Z)(rt,{value:dt,defaultValue:rt}),Ke=(0,be.Z)(Ge,2),Ze=Ke[0],at=Ke[1],xt=(0,de.useRef)(null),tn=de.useState(!1),nn=(0,be.Z)(tn,2),Jt=nn[0],pn=nn[1],Mn=de.useState(!1),hn=(0,be.Z)(Mn,2),En=hn[0],Wn=hn[1],Tn=de.useRef(),ci=de.useRef(0),ri=de.useState(null),Ii=(0,be.Z)(ri,2),bi=Ii[0],nr=Ii[1],Ji=function(){var $e;($e=xt.current)===null||$e===void 0||$e.textArea.focus()};(0,de.useImperativeHandle)(Ft,function(){return{resizableTextArea:xt.current,focus:Ji,blur:function(){var $e;($e=xt.current)===null||$e===void 0||$e.textArea.blur()}}}),(0,de.useEffect)(function(){pn(function(oi){return!et&&oi})},[et]);var gr=Number(jt)>0,cr=function($e){Wn(!0),Tn.current=Ze,ci.current=$e.currentTarget.selectionStart,ln==null||ln($e)},eo=function($e){Wn(!1);var nt=$e.currentTarget.value;if(gr){var Je,wt=ci.current>=jt+1||ci.current===((Je=Tn.current)===null||Je===void 0?void 0:Je.length);nt=ct(wt,Tn.current,nt,jt)}nt!==Ze&&(at(nt),(0,ce.rJ)($e.currentTarget,$e,vt,nt)),$t==null||$t($e)},ro=function($e){var nt=$e.target.value;if(!En&&gr){var Je=$e.target.selectionStart>=jt+1||$e.target.selectionStart===nt.length||!$e.target.selectionStart;nt=ct(Je,Ze,nt,jt)}at(nt),(0,ce.rJ)($e.currentTarget,$e,vt,nt)},hi=function($e){var nt=Ae.onPressEnter,Je=Ae.onKeyDown;$e.key==="Enter"&&nt&&nt($e),Je==null||Je($e)},Pr=function($e){pn(!0),St==null||St($e)},Hi=function($e){pn(!1),Et==null||Et($e)},st=function($e){var nt;at(""),Ji(),(0,ce.rJ)((nt=xt.current)===null||nt===void 0?void 0:nt.textArea,$e,vt)},Rr=(0,ce.D7)(Ze);!En&&gr&&dt==null&&(Rr=gt(Rr,jt));var Er=yn,yo;if(mt){var Zr=(0,he.Z)(Rr).length;(0,Te.Z)(mt)==="object"?yo=mt.formatter({value:Rr,count:Zr,maxLength:jt}):yo="".concat(Zr).concat(gr?" / ".concat(jt):""),Er=de.createElement(de.Fragment,null,Er,de.createElement("span",{className:xe()("".concat(Wt,"-data-count"),Ue==null?void 0:Ue.count),style:Xe==null?void 0:Xe.count},yo))}var ao=function($e){var nt;Re==null||Re($e),(nt=xt.current)!==null&&nt!==void 0&&nt.textArea.style.height&&nr(!0)},Jr=!Ae.autoSize&&!mt&&!Bt,lo=de.createElement(ge.BaseInput,{value:Rr,allowClear:Bt,handleReset:st,suffix:Er,prefixCls:Wt,classes:{affixWrapper:xe()(Xt==null?void 0:Xt.affixWrapper,(ht={},(0,Ie.Z)(ht,"".concat(Wt,"-show-count"),mt),(0,Ie.Z)(ht,"".concat(Wt,"-textarea-allow-clear"),Bt),ht))},disabled:et,focused:Jt,className:ze,style:(0,me.Z)((0,me.Z)({},Be),bi&&!Jr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof yo=="string"?yo:void 0}},hidden:qe,inputElement:de.createElement(Qe,(0,Le.Z)({},Ae,{onKeyDown:hi,onChange:ro,onFocus:Pr,onBlur:Hi,onCompositionStart:cr,onCompositionEnd:eo,className:Ue==null?void 0:Ue.textarea,style:(0,me.Z)((0,me.Z)({},Xe==null?void 0:Xe.textarea),{},{resize:Be==null?void 0:Be.resize}),disabled:et,prefixCls:Wt,onResize:ao,ref:xt}))});return lo}),it=Ct,yt=it},39417:function(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Ne}});var Le=Ee(92413),me=Ee(400),Ie=Ee(37061),Te=Ee(33708),be=Ee(6909),Pe=Ee(4771),he=Ee(25314),Se=Ee(9427),xe=Ee(25440),ge=Ee(92310),ce=Ee.n(ge),ve=Ee(26112),de=Ee(59301),ue=Ee(39378),z=function(Ve){for(var Qe=Ve.prefixCls,We=Ve.level,gt=Ve.isStart,ct=Ve.isEnd,Ct="".concat(Qe,"-indent-unit"),it=[],yt=0;yt<We;yt+=1){var ut;it.push(de.createElement("span",{key:yt,className:ce()(Ct,(ut={},(0,me.Z)(ut,"".concat(Ct,"-start"),gt[yt]),(0,me.Z)(ut,"".concat(Ct,"-end"),ct[yt]),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 We;(0,be.Z)(this,Qe);for(var gt=arguments.length,ct=new Array(gt),Ct=0;Ct<gt;Ct++)ct[Ct]=arguments[Ct];return We=Ve.call.apply(Ve,[this].concat(ct)),We.state={dragNodeHighlight:!1},We.selectHandle=void 0,We.cacheIndent=void 0,We.onSelectorClick=function(it){var yt=We.props.context.onNodeClick;yt(it,(0,ie.F)(We.props)),We.isSelectable()?We.onSelect(it):We.onCheck(it)},We.onSelectorDoubleClick=function(it){var yt=We.props.context.onNodeDoubleClick;yt(it,(0,ie.F)(We.props))},We.onSelect=function(it){if(!We.isDisabled()){var yt=We.props.context.onNodeSelect;yt(it,(0,ie.F)(We.props))}},We.onCheck=function(it){if(!We.isDisabled()){var yt=We.props,ut=yt.disableCheckbox,Ft=yt.checked,ht=We.props.context.onNodeCheck;if(!(!We.isCheckable()||ut)){var rt=!Ft;ht(it,(0,ie.F)(We.props),rt)}}},We.onMouseEnter=function(it){var yt=We.props.context.onNodeMouseEnter;yt(it,(0,ie.F)(We.props))},We.onMouseLeave=function(it){var yt=We.props.context.onNodeMouseLeave;yt(it,(0,ie.F)(We.props))},We.onContextMenu=function(it){var yt=We.props.context.onNodeContextMenu;yt(it,(0,ie.F)(We.props))},We.onDragStart=function(it){var yt=We.props.context.onNodeDragStart;it.stopPropagation(),We.setState({dragNodeHighlight:!0}),yt(it,(0,he.Z)(We));try{it.dataTransfer.setData("text/plain","")}catch(ut){}},We.onDragEnter=function(it){var yt=We.props.context.onNodeDragEnter;it.preventDefault(),it.stopPropagation(),yt(it,(0,he.Z)(We))},We.onDragOver=function(it){var yt=We.props.context.onNodeDragOver;it.preventDefault(),it.stopPropagation(),yt(it,(0,he.Z)(We))},We.onDragLeave=function(it){var yt=We.props.context.onNodeDragLeave;it.stopPropagation(),yt(it,(0,he.Z)(We))},We.onDragEnd=function(it){var yt=We.props.context.onNodeDragEnd;it.stopPropagation(),We.setState({dragNodeHighlight:!1}),yt(it,(0,he.Z)(We))},We.onDrop=function(it){var yt=We.props.context.onNodeDrop;it.preventDefault(),it.stopPropagation(),We.setState({dragNodeHighlight:!1}),yt(it,(0,he.Z)(We))},We.onExpand=function(it){var yt=We.props,ut=yt.loading,Ft=yt.context.onNodeExpand;ut||Ft(it,(0,ie.F)(We.props))},We.setSelectHandle=function(it){We.selectHandle=it},We.getNodeState=function(){var it=We.props.expanded;return We.isLeaf()?null:it?le:ye},We.hasChildren=function(){var it=We.props.eventKey,yt=We.props.context.keyEntities,ut=(0,oe.Z)(yt,it)||{},Ft=ut.children;return!!(Ft||[]).length},We.isLeaf=function(){var it=We.props,yt=it.isLeaf,ut=it.loaded,Ft=We.props.context.loadData,ht=We.hasChildren();return yt===!1?!1:yt||!Ft&&!ht||Ft&&ut&&!ht},We.isDisabled=function(){var it=We.props.disabled,yt=We.props.context.disabled;return!!(yt||it)},We.isCheckable=function(){var it=We.props.checkable,yt=We.props.context.checkable;return!yt||it===!1?!1:yt},We.syncLoadData=function(it){var yt=it.expanded,ut=it.loading,Ft=it.loaded,ht=We.props.context,rt=ht.loadData,dt=ht.onNodeLoad;ut||rt&&yt&&!We.isLeaf()&&!We.hasChildren()&&!Ft&&dt((0,ie.F)(We.props))},We.isDraggable=function(){var it=We.props,yt=it.data,ut=it.context.draggable;return!!(ut&&(!ut.nodeDraggable||ut.nodeDraggable(yt)))},We.renderDragHandler=function(){var it=We.props.context,yt=it.draggable,ut=it.prefixCls;return yt!=null&&yt.icon?de.createElement("span",{className:"".concat(ut,"-draggable-icon")},yt.icon):null},We.renderSwitcherIconDom=function(it){var yt=We.props.switcherIcon,ut=We.props.context.switcherIcon,Ft=yt||ut;return typeof Ft=="function"?Ft((0,Te.Z)((0,Te.Z)({},We.props),{},{isLeaf:it})):Ft},We.renderSwitcher=function(){var it=We.props.expanded,yt=We.props.context.prefixCls;if(We.isLeaf()){var ut=We.renderSwitcherIconDom(!0);return ut!==!1?de.createElement("span",{className:ce()("".concat(yt,"-switcher"),"".concat(yt,"-switcher-noop"))},ut):null}var Ft=ce()("".concat(yt,"-switcher"),"".concat(yt,"-switcher_").concat(it?le:ye)),ht=We.renderSwitcherIconDom(!1);return ht!==!1?de.createElement("span",{onClick:We.onExpand,className:Ft},ht):null},We.renderCheckbox=function(){var it=We.props,yt=it.checked,ut=it.halfChecked,Ft=it.disableCheckbox,ht=We.props.context.prefixCls,rt=We.isDisabled(),dt=We.isCheckable();if(!dt)return null;var St=typeof dt!="boolean"?dt:null;return de.createElement("span",{className:ce()("".concat(ht,"-checkbox"),yt&&"".concat(ht,"-checkbox-checked"),!yt&&ut&&"".concat(ht,"-checkbox-indeterminate"),(rt||Ft)&&"".concat(ht,"-checkbox-disabled")),onClick:We.onCheck},St)},We.renderIcon=function(){var it=We.props.loading,yt=We.props.context.prefixCls;return de.createElement("span",{className:ce()("".concat(yt,"-iconEle"),"".concat(yt,"-icon__").concat(We.getNodeState()||"docu"),it&&"".concat(yt,"-icon_loading"))})},We.renderSelector=function(){var it=We.state.dragNodeHighlight,yt=We.props,ut=yt.title,Ft=ut===void 0?we:ut,ht=yt.selected,rt=yt.icon,dt=yt.loading,St=yt.data,Et=We.props.context,vt=Et.prefixCls,Bt=Et.showIcon,jt=Et.icon,ln=Et.loadData,$t=Et.titleRender,yn=We.isDisabled(),Ut="".concat(vt,"-node-content-wrapper"),Wt;if(Bt){var Xt=rt||jt;Wt=Xt?de.createElement("span",{className:ce()("".concat(vt,"-iconEle"),"".concat(vt,"-icon__customize"))},typeof Xt=="function"?Xt(We.props):Xt):We.renderIcon()}else ln&&dt&&(Wt=We.renderIcon());var mt;typeof Ft=="function"?mt=Ft(St):$t?mt=$t(St):mt=Ft;var ze=de.createElement("span",{className:"".concat(vt,"-title")},mt);return de.createElement("span",{ref:We.setSelectHandle,title:typeof Ft=="string"?Ft:"",className:ce()("".concat(Ut),"".concat(Ut,"-").concat(We.getNodeState()||"normal"),!yn&&(ht||it)&&"".concat(vt,"-node-selected")),onMouseEnter:We.onMouseEnter,onMouseLeave:We.onMouseLeave,onContextMenu:We.onContextMenu,onClick:We.onSelectorClick,onDoubleClick:We.onSelectorDoubleClick},Wt,ze,We.renderDropIndicator())},We.renderDropIndicator=function(){var it=We.props,yt=it.disabled,ut=it.eventKey,Ft=We.props.context,ht=Ft.draggable,rt=Ft.dropLevelOffset,dt=Ft.dropPosition,St=Ft.prefixCls,Et=Ft.indent,vt=Ft.dropIndicatorRender,Bt=Ft.dragOverNodeKey,jt=Ft.direction,ln=!!ht,$t=!yt&&ln&&Bt===ut,yn=Et!=null?Et:We.cacheIndent;return We.cacheIndent=Et,$t?vt({dropPosition:dt,dropLevelOffset:rt,indent:yn,prefixCls:St,direction:jt}):null},We}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 gt=this.props.selectable,ct=this.props.context.selectable;return typeof gt=="boolean"?gt:ct}},{key:"render",value:function(){var gt,ct=this.props,Ct=ct.eventKey,it=ct.className,yt=ct.style,ut=ct.dragOver,Ft=ct.dragOverGapTop,ht=ct.dragOverGapBottom,rt=ct.isLeaf,dt=ct.isStart,St=ct.isEnd,Et=ct.expanded,vt=ct.selected,Bt=ct.checked,jt=ct.halfChecked,ln=ct.loading,$t=ct.domRef,yn=ct.active,Ut=ct.data,Wt=ct.onMouseMove,Xt=ct.selectable,mt=(0,Ie.Z)(ct,se),ze=this.props.context,Be=ze.prefixCls,et=ze.filterTreeNode,qe=ze.keyEntities,Ue=ze.dropContainerKey,Xe=ze.dropTargetKey,Re=ze.draggingNodeKey,Ae=this.isDisabled(),Ge=(0,ve.Z)(mt,{aria:!0,data:!0}),Ke=(0,oe.Z)(qe,Ct)||{},Ze=Ke.level,at=St[St.length-1],xt=this.isDraggable(),tn=!Ae&&xt,nn=Re===Ct,Jt=Xt!==void 0?{"aria-selected":!!Xt}:void 0;return de.createElement("div",(0,Le.Z)({ref:$t,className:ce()(it,"".concat(Be,"-treenode"),(gt={},(0,me.Z)(gt,"".concat(Be,"-treenode-disabled"),Ae),(0,me.Z)(gt,"".concat(Be,"-treenode-switcher-").concat(Et?"open":"close"),!rt),(0,me.Z)(gt,"".concat(Be,"-treenode-checkbox-checked"),Bt),(0,me.Z)(gt,"".concat(Be,"-treenode-checkbox-indeterminate"),jt),(0,me.Z)(gt,"".concat(Be,"-treenode-selected"),vt),(0,me.Z)(gt,"".concat(Be,"-treenode-loading"),ln),(0,me.Z)(gt,"".concat(Be,"-treenode-active"),yn),(0,me.Z)(gt,"".concat(Be,"-treenode-leaf-last"),at),(0,me.Z)(gt,"".concat(Be,"-treenode-draggable"),xt),(0,me.Z)(gt,"dragging",nn),(0,me.Z)(gt,"drop-target",Xe===Ct),(0,me.Z)(gt,"drop-container",Ue===Ct),(0,me.Z)(gt,"drag-over",!Ae&&ut),(0,me.Z)(gt,"drag-over-gap-top",!Ae&&Ft),(0,me.Z)(gt,"drag-over-gap-bottom",!Ae&&ht),(0,me.Z)(gt,"filter-node",et&&et((0,ie.F)(this.props))),gt)),style:yt,draggable:tn,"aria-grabbed":nn,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,Ge),de.createElement(ee,{prefixCls:Be,level:Ze,isStart:dt,isEnd:St}),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(bn,qt,Ee){"use strict";Ee.d(qt,{k:function(){return me}});var Le=Ee(59301),me=Le.createContext(null)},23130:function(bn,qt,Ee){"use strict";Ee.d(qt,{O:function(){return Ne.Z},Z:function(){return ze}});var Le=Ee(92413),me=Ee(400),Ie=Ee(39559),Te=Ee(33708),be=Ee(26407),Pe=Ee(6909),he=Ee(4771),Se=Ee(25314),xe=Ee(9427),ge=Ee(25440),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 et=Be.dropPosition,qe=Be.dropLevelOffset,Ue=Be.indent,Xe={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(et){case-1:Xe.top=0,Xe.left=-qe*Ue;break;case 1:Xe.bottom=0,Xe.left=-qe*Ue;break;case 0:Xe.bottom=0,Xe.left=Ue;break}return ee.createElement("div",{style:Xe})}function se(Be){if(Be==null)throw new TypeError("Cannot destructure "+Be)}var le=Ee(33606),ye=Ee(37061),we=Ee(34280),Ce=Ee(4409),ke=Ee(77900),Ne=Ee(39417);function je(Be,et){var qe=ee.useState(!1),Ue=(0,le.Z)(qe,2),Xe=Ue[0],Re=Ue[1];ee.useLayoutEffect(function(){if(Xe)return Be(),function(){et()}},[Xe]),ee.useLayoutEffect(function(){return Re(!0),function(){Re(!1)}},[])}var Ve=Ee(71430),Qe=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],We=function(et,qe){var Ue=et.className,Xe=et.style,Re=et.motion,Ae=et.motionNodes,Ge=et.motionType,Ke=et.onMotionStart,Ze=et.onMotionEnd,at=et.active,xt=et.treeNodeRequiredProps,tn=(0,ye.Z)(et,Qe),nn=ee.useState(!0),Jt=(0,le.Z)(nn,2),pn=Jt[0],Mn=Jt[1],hn=ee.useContext(oe.k),En=hn.prefixCls,Wn=Ae&&Ge!=="hide";(0,we.Z)(function(){Ae&&Wn!==pn&&Mn(Wn)},[Ae]);var Tn=function(){Ae&&Ke()},ci=ee.useRef(!1),ri=function(){Ae&&!ci.current&&(ci.current=!0,Ze())};je(Tn,ri);var Ii=function(nr){Wn===nr&&ri()};return Ae?ee.createElement(ke.default,(0,Le.Z)({ref:qe,visible:pn},Re,{motionAppear:Ge==="show",onVisibleChanged:Ii}),function(bi,nr){var Ji=bi.className,gr=bi.style;return ee.createElement("div",{ref:nr,className:ve()("".concat(En,"-treenode-motion"),Ji),style:gr},Ae.map(function(cr){var eo=(0,Le.Z)({},(se(cr.data),cr.data)),ro=cr.title,hi=cr.key,Pr=cr.isStart,Hi=cr.isEnd;delete eo.children;var st=(0,Ve.H8)(hi,xt);return ee.createElement(Ne.Z,(0,Le.Z)({},eo,st,{title:ro,active:at,data:cr.data,key:hi,isStart:Pr,isEnd:Hi}))}))}):ee.createElement(Ne.Z,(0,Le.Z)({domRef:qe,className:Ue,style:Xe},tn,{active:at}))};We.displayName="MotionTreeNode";var gt=ee.forwardRef(We),ct=gt;function Ct(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],qe=Be.length,Ue=et.length;if(Math.abs(qe-Ue)!==1)return{add:!1,key:null};function Xe(Re,Ae){var Ge=new Map;Re.forEach(function(Ze){Ge.set(Ze,!0)});var Ke=Ae.filter(function(Ze){return!Ge.has(Ze)});return Ke.length===1?Ke[0]:null}return qe<Ue?{add:!0,key:Xe(Be,et)}:{add:!1,key:Xe(et,Be)}}function it(Be,et,qe){var Ue=Be.findIndex(function(Ge){return Ge.key===qe}),Xe=Be[Ue+1],Re=et.findIndex(function(Ge){return Ge.key===qe});if(Xe){var Ae=et.findIndex(function(Ge){return Ge.key===Xe.key});return et.slice(Re+1,Ae)}return et.slice(Re+1)}var yt=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],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]},St={parent:null,children:[],pos:dt.pos,data:rt,title:null,key:ht,isStart:[],isEnd:[]};function Et(Be,et,qe,Ue){return et===!1||!qe?Be:Be.slice(0,Math.ceil(qe/Ue)+1)}function vt(Be){var et=Be.key,qe=Be.pos;return(0,Ve.km)(et,qe)}function Bt(Be){for(var et=String(Be.data.key),qe=Be;qe.parent;)qe=qe.parent,et="".concat(qe.data.key," > ").concat(et);return et}var jt=ee.forwardRef(function(Be,et){var qe=Be.prefixCls,Ue=Be.data,Xe=Be.selectable,Re=Be.checkable,Ae=Be.expandedKeys,Ge=Be.selectedKeys,Ke=Be.checkedKeys,Ze=Be.loadedKeys,at=Be.loadingKeys,xt=Be.halfCheckedKeys,tn=Be.keyEntities,nn=Be.disabled,Jt=Be.dragging,pn=Be.dragOverNodeKey,Mn=Be.dropPosition,hn=Be.motion,En=Be.height,Wn=Be.itemHeight,Tn=Be.virtual,ci=Be.focusable,ri=Be.activeItem,Ii=Be.focused,bi=Be.tabIndex,nr=Be.onKeyDown,Ji=Be.onFocus,gr=Be.onBlur,cr=Be.onActiveChange,eo=Be.onListChangeStart,ro=Be.onListChangeEnd,hi=(0,ye.Z)(Be,yt),Pr=ee.useRef(null),Hi=ee.useRef(null);ee.useImperativeHandle(et,function(){return{scrollTo:function(rn){Pr.current.scrollTo(rn)},getIndentWidth:function(){return Hi.current.offsetWidth}}});var st=ee.useState(Ae),Rr=(0,le.Z)(st,2),Er=Rr[0],yo=Rr[1],Zr=ee.useState(Ue),ao=(0,le.Z)(Zr,2),Jr=ao[0],lo=ao[1],oi=ee.useState(Ue),$e=(0,le.Z)(oi,2),nt=$e[0],Je=$e[1],wt=ee.useState([]),Nt=(0,le.Z)(wt,2),kt=Nt[0],_t=Nt[1],un=ee.useState(null),wn=(0,le.Z)(un,2),Bn=wn[0],zn=wn[1],At=ee.useRef(Ue);At.current=Ue;function Kt(){var Zt=At.current;lo(Zt),Je(Zt),_t([]),zn(null),ro()}(0,we.Z)(function(){yo(Ae);var Zt=Ct(Er,Ae);if(Zt.key!==null)if(Zt.add){var rn=Jr.findIndex(function(Nn){var si=Nn.key;return si===Zt.key}),Rn=Et(it(Jr,Ue,Zt.key),Tn,En,Wn),An=Jr.slice();An.splice(rn+1,0,St),Je(An),_t(Rn),zn("show")}else{var Qn=Ue.findIndex(function(Nn){var si=Nn.key;return si===Zt.key}),Un=Et(it(Ue,Jr,Zt.key),Tn,En,Wn),qn=Ue.slice();qn.splice(Qn+1,0,St),Je(qn),_t(Un),zn("hide")}else Jr!==Ue&&(lo(Ue),Je(Ue))},[Ae,Ue]),ee.useEffect(function(){Jt||Kt()},[Jt]);var Sn=hn?nt:Ue,kn={expandedKeys:Ae,selectedKeys:Ge,loadedKeys:Ze,loadingKeys:at,checkedKeys:Ke,halfCheckedKeys:xt,dragOverNodeKey:pn,dropPosition:Mn,keyEntities:tn};return ee.createElement(ee.Fragment,null,Ii&&ri&&ee.createElement("span",{style:ut,"aria-live":"assertive"},Bt(ri)),ee.createElement("div",null,ee.createElement("input",{style:ut,disabled:ci===!1||nn,tabIndex:ci!==!1?bi:null,onKeyDown:nr,onFocus:Ji,onBlur:gr,value:"",onChange:Ft,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(qe,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(qe,"-indent")},ee.createElement("div",{ref:Hi,className:"".concat(qe,"-indent-unit")}))),ee.createElement(Ce.Z,(0,Le.Z)({},hi,{data:Sn,itemKey:vt,height:En,fullHeight:!1,virtual:Tn,itemHeight:Wn,prefixCls:"".concat(qe,"-list"),ref:Pr,onVisibleChange:function(rn,Rn){var An=new Set(rn),Qn=Rn.filter(function(Un){return!An.has(Un)});Qn.some(function(Un){return vt(Un)===ht})&&Kt()}}),function(Zt){var rn=Zt.pos,Rn=(0,Le.Z)({},(se(Zt.data),Zt.data)),An=Zt.title,Qn=Zt.key,Un=Zt.isStart,qn=Zt.isEnd,Nn=(0,Ve.km)(Qn,rn);delete Rn.key,delete Rn.children;var si=(0,Ve.H8)(Nn,kn);return ee.createElement(ct,(0,Le.Z)({},Rn,si,{title:An,active:!!ri&&Qn===ri.key,pos:rn,data:Zt.data,isStart:Un,isEnd:qn,motion:hn,motionNodes:Qn===ht?kt:null,motionType:Bn,onMotionStart:eo,onMotionEnd:Kt,treeNodeRequiredProps:kn,onMouseMove:function(){cr(null)}}))}))});jt.displayName="NodeList";var ln=jt,$t=Ee(35654),yn=Ee(90782),Ut=Ee(67841),Wt=10,Xt=function(Be){(0,xe.Z)(qe,Be);var et=(0,ge.Z)(qe);function qe(){var Ue;(0,Pe.Z)(this,qe);for(var Xe=arguments.length,Re=new Array(Xe),Ae=0;Ae<Xe;Ae++)Re[Ae]=arguments[Ae];return Ue=et.call.apply(et,[this].concat(Re)),Ue.destroyed=!1,Ue.delayedDragEnterLogic=void 0,Ue.loadingRetryTimes={},Ue.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$)()},Ue.dragStartMousePosition=null,Ue.dragNode=void 0,Ue.currentMouseOverDroppableNodeKey=null,Ue.listRef=ee.createRef(),Ue.onNodeDragStart=function(Ge,Ke){var Ze=Ue.state,at=Ze.expandedKeys,xt=Ze.keyEntities,tn=Ue.props.onDragStart,nn=Ke.props.eventKey;Ue.dragNode=Ke,Ue.dragStartMousePosition={x:Ge.clientX,y:Ge.clientY};var Jt=(0,$t._5)(at,nn);Ue.setState({draggingNodeKey:nn,dragChildrenKeys:(0,$t.wA)(nn,xt),indent:Ue.listRef.current.getIndentWidth()}),Ue.setExpandedKeys(Jt),window.addEventListener("dragend",Ue.onWindowDragEnd),tn==null||tn({event:Ge,node:(0,Ve.F)(Ke.props)})},Ue.onNodeDragEnter=function(Ge,Ke){var Ze=Ue.state,at=Ze.expandedKeys,xt=Ze.keyEntities,tn=Ze.dragChildrenKeys,nn=Ze.flattenNodes,Jt=Ze.indent,pn=Ue.props,Mn=pn.onDragEnter,hn=pn.onExpand,En=pn.allowDrop,Wn=pn.direction,Tn=Ke.props,ci=Tn.pos,ri=Tn.eventKey,Ii=(0,Se.Z)(Ue),bi=Ii.dragNode;if(Ue.currentMouseOverDroppableNodeKey!==ri&&(Ue.currentMouseOverDroppableNodeKey=ri),!bi){Ue.resetDragState();return}var nr=(0,$t.OM)(Ge,bi,Ke,Jt,Ue.dragStartMousePosition,En,nn,xt,at,Wn),Ji=nr.dropPosition,gr=nr.dropLevelOffset,cr=nr.dropTargetKey,eo=nr.dropContainerKey,ro=nr.dropTargetPos,hi=nr.dropAllowed,Pr=nr.dragOverNodeKey;if(tn.indexOf(cr)!==-1||!hi){Ue.resetDragState();return}if(Ue.delayedDragEnterLogic||(Ue.delayedDragEnterLogic={}),Object.keys(Ue.delayedDragEnterLogic).forEach(function(Hi){clearTimeout(Ue.delayedDragEnterLogic[Hi])}),bi.props.eventKey!==Ke.props.eventKey&&(Ge.persist(),Ue.delayedDragEnterLogic[ci]=window.setTimeout(function(){if(Ue.state.draggingNodeKey!==null){var Hi=(0,be.Z)(at),st=(0,Ut.Z)(xt,Ke.props.eventKey);st&&(st.children||[]).length&&(Hi=(0,$t.L0)(at,Ke.props.eventKey)),"expandedKeys"in Ue.props||Ue.setExpandedKeys(Hi),hn==null||hn(Hi,{node:(0,Ve.F)(Ke.props),expanded:!0,nativeEvent:Ge.nativeEvent})}},800)),bi.props.eventKey===cr&&gr===0){Ue.resetDragState();return}Ue.setState({dragOverNodeKey:Pr,dropPosition:Ji,dropLevelOffset:gr,dropTargetKey:cr,dropContainerKey:eo,dropTargetPos:ro,dropAllowed:hi}),Mn==null||Mn({event:Ge,node:(0,Ve.F)(Ke.props),expandedKeys:at})},Ue.onNodeDragOver=function(Ge,Ke){var Ze=Ue.state,at=Ze.dragChildrenKeys,xt=Ze.flattenNodes,tn=Ze.keyEntities,nn=Ze.expandedKeys,Jt=Ze.indent,pn=Ue.props,Mn=pn.onDragOver,hn=pn.allowDrop,En=pn.direction,Wn=(0,Se.Z)(Ue),Tn=Wn.dragNode;if(Tn){var ci=(0,$t.OM)(Ge,Tn,Ke,Jt,Ue.dragStartMousePosition,hn,xt,tn,nn,En),ri=ci.dropPosition,Ii=ci.dropLevelOffset,bi=ci.dropTargetKey,nr=ci.dropContainerKey,Ji=ci.dropAllowed,gr=ci.dropTargetPos,cr=ci.dragOverNodeKey;at.indexOf(bi)!==-1||!Ji||(Tn.props.eventKey===bi&&Ii===0?Ue.state.dropPosition===null&&Ue.state.dropLevelOffset===null&&Ue.state.dropTargetKey===null&&Ue.state.dropContainerKey===null&&Ue.state.dropTargetPos===null&&Ue.state.dropAllowed===!1&&Ue.state.dragOverNodeKey===null||Ue.resetDragState():ri===Ue.state.dropPosition&&Ii===Ue.state.dropLevelOffset&&bi===Ue.state.dropTargetKey&&nr===Ue.state.dropContainerKey&&gr===Ue.state.dropTargetPos&&Ji===Ue.state.dropAllowed&&cr===Ue.state.dragOverNodeKey||Ue.setState({dropPosition:ri,dropLevelOffset:Ii,dropTargetKey:bi,dropContainerKey:nr,dropTargetPos:gr,dropAllowed:Ji,dragOverNodeKey:cr}),Mn==null||Mn({event:Ge,node:(0,Ve.F)(Ke.props)}))}},Ue.onNodeDragLeave=function(Ge,Ke){Ue.currentMouseOverDroppableNodeKey===Ke.props.eventKey&&!Ge.currentTarget.contains(Ge.relatedTarget)&&(Ue.resetDragState(),Ue.currentMouseOverDroppableNodeKey=null);var Ze=Ue.props.onDragLeave;Ze==null||Ze({event:Ge,node:(0,Ve.F)(Ke.props)})},Ue.onWindowDragEnd=function(Ge){Ue.onNodeDragEnd(Ge,null,!0),window.removeEventListener("dragend",Ue.onWindowDragEnd)},Ue.onNodeDragEnd=function(Ge,Ke){var Ze=Ue.props.onDragEnd;Ue.setState({dragOverNodeKey:null}),Ue.cleanDragState(),Ze==null||Ze({event:Ge,node:(0,Ve.F)(Ke.props)}),Ue.dragNode=null,window.removeEventListener("dragend",Ue.onWindowDragEnd)},Ue.onNodeDrop=function(Ge,Ke){var Ze,at=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,xt=Ue.state,tn=xt.dragChildrenKeys,nn=xt.dropPosition,Jt=xt.dropTargetKey,pn=xt.dropTargetPos,Mn=xt.dropAllowed;if(Mn){var hn=Ue.props.onDrop;if(Ue.setState({dragOverNodeKey:null}),Ue.cleanDragState(),Jt!==null){var En=(0,Te.Z)((0,Te.Z)({},(0,Ve.H8)(Jt,Ue.getTreeNodeRequiredProps())),{},{active:((Ze=Ue.getActiveItem())===null||Ze===void 0?void 0:Ze.key)===Jt,data:(0,Ut.Z)(Ue.state.keyEntities,Jt).node}),Wn=tn.indexOf(Jt)!==-1;(0,z.ZP)(!Wn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Tn=(0,$t.yx)(pn),ci={event:Ge,node:(0,Ve.F)(En),dragNode:Ue.dragNode?(0,Ve.F)(Ue.dragNode.props):null,dragNodesKeys:[Ue.dragNode.props.eventKey].concat(tn),dropToGap:nn!==0,dropPosition:nn+Number(Tn[Tn.length-1])};at||hn==null||hn(ci),Ue.dragNode=null}}},Ue.cleanDragState=function(){var Ge=Ue.state.draggingNodeKey;Ge!==null&&Ue.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Ue.dragStartMousePosition=null,Ue.currentMouseOverDroppableNodeKey=null},Ue.triggerExpandActionExpand=function(Ge,Ke){var Ze=Ue.state,at=Ze.expandedKeys,xt=Ze.flattenNodes,tn=Ke.expanded,nn=Ke.key,Jt=Ke.isLeaf;if(!(Jt||Ge.shiftKey||Ge.metaKey||Ge.ctrlKey)){var pn=xt.filter(function(hn){return hn.key===nn})[0],Mn=(0,Ve.F)((0,Te.Z)((0,Te.Z)({},(0,Ve.H8)(nn,Ue.getTreeNodeRequiredProps())),{},{data:pn.data}));Ue.setExpandedKeys(tn?(0,$t._5)(at,nn):(0,$t.L0)(at,nn)),Ue.onNodeExpand(Ge,Mn)}},Ue.onNodeClick=function(Ge,Ke){var Ze=Ue.props,at=Ze.onClick,xt=Ze.expandAction;xt==="click"&&Ue.triggerExpandActionExpand(Ge,Ke),at==null||at(Ge,Ke)},Ue.onNodeDoubleClick=function(Ge,Ke){var Ze=Ue.props,at=Ze.onDoubleClick,xt=Ze.expandAction;xt==="doubleClick"&&Ue.triggerExpandActionExpand(Ge,Ke),at==null||at(Ge,Ke)},Ue.onNodeSelect=function(Ge,Ke){var Ze=Ue.state.selectedKeys,at=Ue.state,xt=at.keyEntities,tn=at.fieldNames,nn=Ue.props,Jt=nn.onSelect,pn=nn.multiple,Mn=Ke.selected,hn=Ke[tn.key],En=!Mn;En?pn?Ze=(0,$t.L0)(Ze,hn):Ze=[hn]:Ze=(0,$t._5)(Ze,hn);var Wn=Ze.map(function(Tn){var ci=(0,Ut.Z)(xt,Tn);return ci?ci.node:null}).filter(function(Tn){return Tn});Ue.setUncontrolledState({selectedKeys:Ze}),Jt==null||Jt(Ze,{event:"select",selected:En,node:Ke,selectedNodes:Wn,nativeEvent:Ge.nativeEvent})},Ue.onNodeCheck=function(Ge,Ke,Ze){var at=Ue.state,xt=at.keyEntities,tn=at.checkedKeys,nn=at.halfCheckedKeys,Jt=Ue.props,pn=Jt.checkStrictly,Mn=Jt.onCheck,hn=Ke.key,En,Wn={event:"check",node:Ke,checked:Ze,nativeEvent:Ge.nativeEvent};if(pn){var Tn=Ze?(0,$t.L0)(tn,hn):(0,$t._5)(tn,hn),ci=(0,$t._5)(nn,hn);En={checked:Tn,halfChecked:ci},Wn.checkedNodes=Tn.map(function(gr){return(0,Ut.Z)(xt,gr)}).filter(function(gr){return gr}).map(function(gr){return gr.node}),Ue.setUncontrolledState({checkedKeys:Tn})}else{var ri=(0,yn.S)([].concat((0,be.Z)(tn),[hn]),!0,xt),Ii=ri.checkedKeys,bi=ri.halfCheckedKeys;if(!Ze){var nr=new Set(Ii);nr.delete(hn);var Ji=(0,yn.S)(Array.from(nr),{checked:!1,halfCheckedKeys:bi},xt);Ii=Ji.checkedKeys,bi=Ji.halfCheckedKeys}En=Ii,Wn.checkedNodes=[],Wn.checkedNodesPositions=[],Wn.halfCheckedKeys=bi,Ii.forEach(function(gr){var cr=(0,Ut.Z)(xt,gr);if(cr){var eo=cr.node,ro=cr.pos;Wn.checkedNodes.push(eo),Wn.checkedNodesPositions.push({node:eo,pos:ro})}}),Ue.setUncontrolledState({checkedKeys:Ii},!1,{halfCheckedKeys:bi})}Mn==null||Mn(En,Wn)},Ue.onNodeLoad=function(Ge){var Ke=Ge.key,Ze=new Promise(function(at,xt){Ue.setState(function(tn){var nn=tn.loadedKeys,Jt=nn===void 0?[]:nn,pn=tn.loadingKeys,Mn=pn===void 0?[]:pn,hn=Ue.props,En=hn.loadData,Wn=hn.onLoad;if(!En||Jt.indexOf(Ke)!==-1||Mn.indexOf(Ke)!==-1)return null;var Tn=En(Ge);return Tn.then(function(){var ci=Ue.state.loadedKeys,ri=(0,$t.L0)(ci,Ke);Wn==null||Wn(ri,{event:"load",node:Ge}),Ue.setUncontrolledState({loadedKeys:ri}),Ue.setState(function(Ii){return{loadingKeys:(0,$t._5)(Ii.loadingKeys,Ke)}}),at()}).catch(function(ci){if(Ue.setState(function(Ii){return{loadingKeys:(0,$t._5)(Ii.loadingKeys,Ke)}}),Ue.loadingRetryTimes[Ke]=(Ue.loadingRetryTimes[Ke]||0)+1,Ue.loadingRetryTimes[Ke]>=Wt){var ri=Ue.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Ue.setUncontrolledState({loadedKeys:(0,$t.L0)(ri,Ke)}),at()}xt(ci)}),{loadingKeys:(0,$t.L0)(Mn,Ke)}})});return Ze.catch(function(){}),Ze},Ue.onNodeMouseEnter=function(Ge,Ke){var Ze=Ue.props.onMouseEnter;Ze==null||Ze({event:Ge,node:Ke})},Ue.onNodeMouseLeave=function(Ge,Ke){var Ze=Ue.props.onMouseLeave;Ze==null||Ze({event:Ge,node:Ke})},Ue.onNodeContextMenu=function(Ge,Ke){var Ze=Ue.props.onRightClick;Ze&&(Ge.preventDefault(),Ze({event:Ge,node:Ke}))},Ue.onFocus=function(){var Ge=Ue.props.onFocus;Ue.setState({focused:!0});for(var Ke=arguments.length,Ze=new Array(Ke),at=0;at<Ke;at++)Ze[at]=arguments[at];Ge==null||Ge.apply(void 0,Ze)},Ue.onBlur=function(){var Ge=Ue.props.onBlur;Ue.setState({focused:!1}),Ue.onActiveChange(null);for(var Ke=arguments.length,Ze=new Array(Ke),at=0;at<Ke;at++)Ze[at]=arguments[at];Ge==null||Ge.apply(void 0,Ze)},Ue.getTreeNodeRequiredProps=function(){var Ge=Ue.state,Ke=Ge.expandedKeys,Ze=Ge.selectedKeys,at=Ge.loadedKeys,xt=Ge.loadingKeys,tn=Ge.checkedKeys,nn=Ge.halfCheckedKeys,Jt=Ge.dragOverNodeKey,pn=Ge.dropPosition,Mn=Ge.keyEntities;return{expandedKeys:Ke||[],selectedKeys:Ze||[],loadedKeys:at||[],loadingKeys:xt||[],checkedKeys:tn||[],halfCheckedKeys:nn||[],dragOverNodeKey:Jt,dropPosition:pn,keyEntities:Mn}},Ue.setExpandedKeys=function(Ge){var Ke=Ue.state,Ze=Ke.treeData,at=Ke.fieldNames,xt=(0,Ve.oH)(Ze,Ge,at);Ue.setUncontrolledState({expandedKeys:Ge,flattenNodes:xt},!0)},Ue.onNodeExpand=function(Ge,Ke){var Ze=Ue.state.expandedKeys,at=Ue.state,xt=at.listChanging,tn=at.fieldNames,nn=Ue.props,Jt=nn.onExpand,pn=nn.loadData,Mn=Ke.expanded,hn=Ke[tn.key];if(!xt){var En=Ze.indexOf(hn),Wn=!Mn;if((0,z.ZP)(Mn&&En!==-1||!Mn&&En===-1,"Expand state not sync with index check"),Wn?Ze=(0,$t.L0)(Ze,hn):Ze=(0,$t._5)(Ze,hn),Ue.setExpandedKeys(Ze),Jt==null||Jt(Ze,{node:Ke,expanded:Wn,nativeEvent:Ge.nativeEvent}),Wn&&pn){var Tn=Ue.onNodeLoad(Ke);Tn&&Tn.then(function(){var ci=(0,Ve.oH)(Ue.state.treeData,Ze,tn);Ue.setUncontrolledState({flattenNodes:ci})}).catch(function(){var ci=Ue.state.expandedKeys,ri=(0,$t._5)(ci,hn);Ue.setExpandedKeys(ri)})}}},Ue.onListChangeStart=function(){Ue.setUncontrolledState({listChanging:!0})},Ue.onListChangeEnd=function(){setTimeout(function(){Ue.setUncontrolledState({listChanging:!1})})},Ue.onActiveChange=function(Ge){var Ke=Ue.state.activeKey,Ze=Ue.props.onActiveChange;Ke!==Ge&&(Ue.setState({activeKey:Ge}),Ge!==null&&Ue.scrollTo({key:Ge}),Ze==null||Ze(Ge))},Ue.getActiveItem=function(){var Ge=Ue.state,Ke=Ge.activeKey,Ze=Ge.flattenNodes;return Ke===null?null:Ze.find(function(at){var xt=at.key;return xt===Ke})||null},Ue.offsetActiveKey=function(Ge){var Ke=Ue.state,Ze=Ke.flattenNodes,at=Ke.activeKey,xt=Ze.findIndex(function(Jt){var pn=Jt.key;return pn===at});xt===-1&&Ge<0&&(xt=Ze.length),xt=(xt+Ge+Ze.length)%Ze.length;var tn=Ze[xt];if(tn){var nn=tn.key;Ue.onActiveChange(nn)}else Ue.onActiveChange(null)},Ue.onKeyDown=function(Ge){var Ke=Ue.state,Ze=Ke.activeKey,at=Ke.expandedKeys,xt=Ke.checkedKeys,tn=Ke.fieldNames,nn=Ue.props,Jt=nn.onKeyDown,pn=nn.checkable,Mn=nn.selectable;switch(Ge.which){case de.Z.UP:{Ue.offsetActiveKey(-1),Ge.preventDefault();break}case de.Z.DOWN:{Ue.offsetActiveKey(1),Ge.preventDefault();break}}var hn=Ue.getActiveItem();if(hn&&hn.data){var En=Ue.getTreeNodeRequiredProps(),Wn=hn.data.isLeaf===!1||!!(hn.data[tn.children]||[]).length,Tn=(0,Ve.F)((0,Te.Z)((0,Te.Z)({},(0,Ve.H8)(Ze,En)),{},{data:hn.data,active:!0}));switch(Ge.which){case de.Z.LEFT:{Wn&&at.includes(Ze)?Ue.onNodeExpand({},Tn):hn.parent&&Ue.onActiveChange(hn.parent.key),Ge.preventDefault();break}case de.Z.RIGHT:{Wn&&!at.includes(Ze)?Ue.onNodeExpand({},Tn):hn.children&&hn.children.length&&Ue.onActiveChange(hn.children[0].key),Ge.preventDefault();break}case de.Z.ENTER:case de.Z.SPACE:{pn&&!Tn.disabled&&Tn.checkable!==!1&&!Tn.disableCheckbox?Ue.onNodeCheck({},Tn,!xt.includes(Ze)):!pn&&Mn&&!Tn.disabled&&Tn.selectable!==!1&&Ue.onNodeSelect({},Tn);break}}}Jt==null||Jt(Ge)},Ue.setUncontrolledState=function(Ge){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Ue.destroyed){var at=!1,xt=!0,tn={};Object.keys(Ge).forEach(function(nn){if(nn in Ue.props){xt=!1;return}at=!0,tn[nn]=Ge[nn]}),at&&(!Ke||xt)&&Ue.setState((0,Te.Z)((0,Te.Z)({},tn),Ze))}},Ue.scrollTo=function(Ge){Ue.listRef.current.scrollTo(Ge)},Ue}return(0,he.Z)(qe,[{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,Ge=Re.flattenNodes,Ke=Re.keyEntities,Ze=Re.draggingNodeKey,at=Re.activeKey,xt=Re.dropLevelOffset,tn=Re.dropContainerKey,nn=Re.dropTargetKey,Jt=Re.dropPosition,pn=Re.dragOverNodeKey,Mn=Re.indent,hn=this.props,En=hn.prefixCls,Wn=hn.className,Tn=hn.style,ci=hn.showLine,ri=hn.focusable,Ii=hn.tabIndex,bi=Ii===void 0?0:Ii,nr=hn.selectable,Ji=hn.showIcon,gr=hn.icon,cr=hn.switcherIcon,eo=hn.draggable,ro=hn.checkable,hi=hn.checkStrictly,Pr=hn.disabled,Hi=hn.motion,st=hn.loadData,Rr=hn.filterTreeNode,Er=hn.height,yo=hn.itemHeight,Zr=hn.virtual,ao=hn.titleRender,Jr=hn.dropIndicatorRender,lo=hn.onContextMenu,oi=hn.onScroll,$e=hn.direction,nt=hn.rootClassName,Je=hn.rootStyle,wt=(0,ue.Z)(this.props,{aria:!0,data:!0}),Nt;return eo&&((0,Ie.Z)(eo)==="object"?Nt=eo:typeof eo=="function"?Nt={nodeDraggable:eo}:Nt={}),ee.createElement(oe.k.Provider,{value:{prefixCls:En,selectable:nr,showIcon:Ji,icon:gr,switcherIcon:cr,draggable:Nt,draggingNodeKey:Ze,checkable:ro,checkStrictly:hi,disabled:Pr,keyEntities:Ke,dropLevelOffset:xt,dropContainerKey:tn,dropTargetKey:nn,dropPosition:Jt,dragOverNodeKey:pn,indent:Mn,direction:$e,dropIndicatorRender:Jr,loadData:st,filterTreeNode:Rr,titleRender:ao,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()(En,Wn,nt,(Xe={},(0,me.Z)(Xe,"".concat(En,"-show-line"),ci),(0,me.Z)(Xe,"".concat(En,"-focused"),Ae),(0,me.Z)(Xe,"".concat(En,"-active-focused"),at!==null),Xe)),style:Je},ee.createElement(ln,(0,Le.Z)({ref:this.listRef,prefixCls:En,style:Tn,data:Ge,disabled:Pr,selectable:nr,checkable:!!ro,motion:Hi,dragging:Ze!==null,height:Er,itemHeight:yo,virtual:Zr,focusable:ri,focused:Ae,tabIndex:bi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:lo,onScroll:oi},this.getTreeNodeRequiredProps(),wt))))}}],[{key:"getDerivedStateFromProps",value:function(Xe,Re){var Ae=Re.prevProps,Ge={prevProps:Xe};function Ke(ri){return!Ae&&ri in Xe||Ae&&Ae[ri]!==Xe[ri]}var Ze,at=Re.fieldNames;if(Ke("fieldNames")&&(at=(0,Ve.w$)(Xe.fieldNames),Ge.fieldNames=at),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){Ge.treeData=Ze;var xt=(0,Ve.I8)(Ze,{fieldNames:at});Ge.keyEntities=(0,Te.Z)((0,me.Z)({},ht,dt),xt.keyEntities)}var tn=Ge.keyEntities||Re.keyEntities;if(Ke("expandedKeys")||Ae&&Ke("autoExpandParent"))Ge.expandedKeys=Xe.autoExpandParent||!Ae&&Xe.defaultExpandParent?(0,$t.r7)(Xe.expandedKeys,tn):Xe.expandedKeys;else if(!Ae&&Xe.defaultExpandAll){var nn=(0,Te.Z)({},tn);delete nn[ht],Ge.expandedKeys=Object.keys(nn).map(function(ri){return nn[ri].key})}else!Ae&&Xe.defaultExpandedKeys&&(Ge.expandedKeys=Xe.autoExpandParent||Xe.defaultExpandParent?(0,$t.r7)(Xe.defaultExpandedKeys,tn):Xe.defaultExpandedKeys);if(Ge.expandedKeys||delete Ge.expandedKeys,Ze||Ge.expandedKeys){var Jt=(0,Ve.oH)(Ze||Re.treeData,Ge.expandedKeys||Re.expandedKeys,at);Ge.flattenNodes=Jt}if(Xe.selectable&&(Ke("selectedKeys")?Ge.selectedKeys=(0,$t.BT)(Xe.selectedKeys,Xe):!Ae&&Xe.defaultSelectedKeys&&(Ge.selectedKeys=(0,$t.BT)(Xe.defaultSelectedKeys,Xe))),Xe.checkable){var pn;if(Ke("checkedKeys")?pn=(0,$t.E6)(Xe.checkedKeys)||{}:!Ae&&Xe.defaultCheckedKeys?pn=(0,$t.E6)(Xe.defaultCheckedKeys)||{}:Ze&&(pn=(0,$t.E6)(Xe.checkedKeys)||{checkedKeys:Re.checkedKeys,halfCheckedKeys:Re.halfCheckedKeys}),pn){var Mn=pn,hn=Mn.checkedKeys,En=hn===void 0?[]:hn,Wn=Mn.halfCheckedKeys,Tn=Wn===void 0?[]:Wn;if(!Xe.checkStrictly){var ci=(0,yn.S)(En,!0,tn);En=ci.checkedKeys,Tn=ci.halfCheckedKeys}Ge.checkedKeys=En,Ge.halfCheckedKeys=Tn}}return Ke("loadedKeys")&&(Ge.loadedKeys=Xe.loadedKeys),Ge}}]),qe}(ee.Component);Xt.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:ie,allowDrop:function(){return!0},expandAction:!1},Xt.TreeNode=Ne.Z;var mt=Xt,ze=mt},35654:function(bn,qt,Ee){"use strict";Ee.d(qt,{BT:function(){return ee},E6:function(){return se},L0:function(){return ge},OM:function(){return z},_5:function(){return xe},r7:function(){return le},wA:function(){return ve},yx:function(){return ce}});var Le=Ee(26407),me=Ee(39559),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,We=Ve.children;Ce.push(Qe),Ne(We)})}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,We,gt){var ct,Ct=ye.clientX,it=ye.clientY,yt=ye.target.getBoundingClientRect(),ut=yt.top,Ft=yt.height,ht=(gt==="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 St=Ve.findIndex(function(ze){return ze.key===dt.key}),Et=St<=0?0:St-1,vt=Ve[Et].key;dt=(0,Pe.Z)(Qe,vt)}var Bt=dt.key,jt=dt,ln=dt.key,$t=0,yn=0;if(!We.includes(Bt))for(var Ut=0;Ut<rt&&de(dt);Ut+=1)dt=dt.parent,yn+=1;var Wt=we.props.data,Xt=dt.node,mt=!0;return ue(dt)&&dt.level===0&&it<ut+Ft/2&&je({dragNode:Wt,dropNode:Xt,dropPosition:-1})&&dt.key===Ce.props.eventKey?$t=-1:(jt.children||[]).length&&We.includes(ln)?je({dragNode:Wt,dropNode:Xt,dropPosition:0})?$t=0:mt=!1:yn===0?rt>-1.5?je({dragNode:Wt,dropNode:Xt,dropPosition:1})?$t=1:mt=!1:je({dragNode:Wt,dropNode:Xt,dropPosition:0})?$t=0:je({dragNode:Wt,dropNode:Xt,dropPosition:1})?$t=1:mt=!1:je({dragNode:Wt,dropNode:Xt,dropPosition:1})?$t=1:mt=!1,{dropPosition:$t,dropLevelOffset:yn,dropTargetKey:dt.key,dropTargetPos:dt.pos,dragOverNodeKey:ln,dropContainerKey:$t===0?null:((ct=dt.parent)===null||ct===void 0?void 0:ct.key)||null,dropAllowed:mt}}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,We=_objectWithoutProperties(Ve,Se),gt=ie(Qe,we);return React.createElement(TreeNode,_extends({key:We.key},Ne(We)),gt)})}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(bn,qt,Ee){"use strict";Ee.d(qt,{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(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return Le}});function Le(me,Ie){return me[Ie]}},71430:function(bn,qt,Ee){"use strict";Ee.d(qt,{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(39559),me=Ee(26407),Ie=Ee(33708),Te=Ee(37061),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],We=Ve[we.children];warning(Qe!=null,"Tree node must have a certain key: [".concat(je).concat(Qe,"]"));var gt=String(Qe);warning(!Ce.has(gt)||Qe===null||Qe===void 0,"Same 'key' exist in the Tree: ".concat(gt)),Ce.set(gt,!0),ke(We,"".concat(je).concat(gt," > "))})}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,We=(0,Te.Z)(Ve,xe),gt=(0,Ie.Z)({key:je},We),ct=we(Qe);return ct.length&&(gt.children=ct),gt}).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),We=[];function gt(ct){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return ct.map(function(it,yt){for(var ut=ge(Ct?Ct.pos:"0",yt),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 St=(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:[]),[yt===0]),isEnd:[].concat((0,me.Z)(Ct?Ct.isEnd:[]),[yt===ct.length-1])});return We.push(St),we===!0||Qe.has(Ft)?St.children=gt(it[Ve]||[],St):St.children=[],St})}return gt(ye),We}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,We=de(Qe),gt=We.key,ct=We.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[gt],ht)};function yt(ut,Ft,ht,rt){var dt=ut?ut[Ct]:ye,St=ut?ge(ht.pos,Ft):"0",Et=ut?[].concat((0,me.Z)(rt),[ut]):[];if(ut){var vt=it(ut,St),Bt={node:ut,index:Ft,pos:St,key:vt,parentPos:ht.node?ht.pos:null,level:ht.level+1,nodes:Et};we(Bt)}dt&&dt.forEach(function(jt,ln){yt(jt,ln,{node:ut,pos:St,level:ht?ht.level+1:-1},Et)})}yt(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,We=arguments.length>2?arguments[2]:void 0,gt=je||We,ct={},Ct={},it={posEntities:ct,keyEntities:Ct};return Ce&&(it=Ce(it)||it),oe(ye,function(yt){var ut=yt.node,Ft=yt.index,ht=yt.pos,rt=yt.key,dt=yt.parentPos,St=yt.level,Et=yt.nodes,vt={node:ut,nodes:Et,index:Ft,key:rt,pos:ht,level:St},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:gt,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,We=we.dragOverNodeKey,gt=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:We===ye&>===0,dragOverGapTop:We===ye&>===-1,dragOverGapBottom:We===ye&>===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,We=ye.dragOver,gt=ye.dragOverGapTop,ct=ye.dragOverGapBottom,Ct=ye.pos,it=ye.active,yt=ye.eventKey,ut=(0,Ie.Z)((0,Ie.Z)({},we),{},{expanded:Ce,selected:ke,checked:Ne,loaded:je,loading:Ve,halfChecked:Qe,dragOver:We,dragOverGapTop:gt,dragOverGapBottom:ct,pos:Ct,active:it,key:yt});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(bn,qt,Ee){"use strict";Ee.d(qt,{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(bn,qt,Ee){"use strict";Ee.d(qt,{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(bn,qt,Ee){"use strict";Ee.d(qt,{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)}},4409:function(bn,qt,Ee){"use strict";Ee.d(qt,{Z:function(){return mt}});var Le=Ee(92413),me=Ee(39559),Ie=Ee(33708),Te=Ee(400),be=Ee(33606),Pe=Ee(37061),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(ze,Be){var et=ze.height,qe=ze.offsetY,Ue=ze.offsetX,Xe=ze.children,Re=ze.prefixCls,Ae=ze.onInnerResize,Ge=ze.innerProps,Ke=ze.rtl,Ze=ze.extra,at={},xt={display:"flex",flexDirection:"column"};return qe!==void 0&&(at={height:et,position:"relative",overflow:"hidden"},xt=(0,Ie.Z)((0,Ie.Z)({},xt),{},(0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)((0,Te.Z)({transform:"translateY(".concat(qe,"px)")},Ke?"marginRight":"marginLeft",-Ue),"position","absolute"),"left",0),"right",0),"top",0))),ve.createElement("div",{style:at},ve.createElement(xe.Z,{onResize:function(nn){var Jt=nn.offsetHeight;Jt&&Ae&&Ae()}},ve.createElement("div",(0,Le.Z)({style:xt,className:Se()((0,Te.Z)({},"".concat(Re,"-holder-inner"),Re)),ref:Be},Ge),Xe,Ze)))});ue.displayName="Filler";var z=ue;function ee(ze){var Be=ze.children,et=ze.setRef,qe=ve.useCallback(function(Ue){et(Ue)},[]);return ve.cloneElement(Be,{ref:qe})}function oe(ze,Be,et,qe,Ue,Xe,Re,Ae){var Ge=Ae.getKey;return ze.slice(Be,et+1).map(function(Ke,Ze){var at=Be+Ze,xt=Re(Ke,at,{style:{width:qe},offsetX:Ue}),tn=Ge(Ke);return ve.createElement(ee,{key:tn,setRef:function(Jt){return Xe(Ke,Jt)}},xt)})}function ie(ze,Be,et,qe){var Ue=et-ze,Xe=Be-et,Re=Math.min(Ue,Xe)*2;if(qe<=Re){var Ae=Math.floor(qe/2);return qe%2?et+Ae+1:et-Ae}return Ue>Xe?et-(qe-Xe):et+(qe-Ue)}function se(ze,Be,et){var qe=ze.length,Ue=Be.length,Xe,Re;if(qe===0&&Ue===0)return null;qe<Ue?(Xe=ze,Re=Be):(Xe=Be,Re=ze);var Ae={__EMPTY_ITEM__:!0};function Ge(nn){return nn!==void 0?et(nn):Ae}for(var Ke=null,Ze=Math.abs(qe-Ue)!==1,at=0;at<Re.length;at+=1){var xt=Ge(Xe[at]),tn=Ge(Re[at]);if(xt!==tn){Ke=at,Ze=Ze||xt!==Ge(Re[at+1]);break}}return Ke===null?null:{index:Ke,multiple:Ze}}function le(ze,Be,et){var qe=ve.useState(ze),Ue=(0,be.Z)(qe,2),Xe=Ue[0],Re=Ue[1],Ae=ve.useState(null),Ge=(0,be.Z)(Ae,2),Ke=Ge[0],Ze=Ge[1];return ve.useEffect(function(){var at=se(Xe||[],ze||[],Be);(at==null?void 0:at.index)!==void 0&&(et==null||et(at.index),Ze(ze[at.index])),Re(ze)},[ze]),[Ke]}var ye=Ee(16089),we=(typeof navigator=="undefined"?"undefined":(0,me.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Ce=we,ke=function(ze,Be,et,qe){var Ue=(0,ve.useRef)(!1),Xe=(0,ve.useRef)(null);function Re(){clearTimeout(Xe.current),Ue.current=!0,Xe.current=setTimeout(function(){Ue.current=!1},50)}var Ae=(0,ve.useRef)({top:ze,bottom:Be,left:et,right:qe});return Ae.current.top=ze,Ae.current.bottom=Be,Ae.current.left=et,Ae.current.right=qe,function(Ge,Ke){var Ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,at=Ge?Ke<0&&Ae.current.left||Ke>0&&Ae.current.right:Ke<0&&Ae.current.top||Ke>0&&Ae.current.bottom;return Ze&&at?(clearTimeout(Xe.current),Ue.current=!1):(!at||Ue.current)&&Re(),!Ue.current&&at}};function Ne(ze,Be,et,qe,Ue,Xe,Re){var Ae=(0,ve.useRef)(0),Ge=(0,ve.useRef)(null),Ke=(0,ve.useRef)(null),Ze=(0,ve.useRef)(!1),at=ke(Be,et,qe,Ue);function xt(hn,En){if(ye.Z.cancel(Ge.current),!at(!1,En)){var Wn=hn;if(!Wn._virtualHandled)Wn._virtualHandled=!0;else return;Ae.current+=En,Ke.current=En,Ce||Wn.preventDefault(),Ge.current=(0,ye.Z)(function(){var Tn=Ze.current?10:1;Re(Ae.current*Tn,!1),Ae.current=0})}}function tn(hn,En){Re(En,!0),Ce||hn.preventDefault()}var nn=(0,ve.useRef)(null),Jt=(0,ve.useRef)(null);function pn(hn){if(ze){ye.Z.cancel(Jt.current),Jt.current=(0,ye.Z)(function(){nn.current=null},2);var En=hn.deltaX,Wn=hn.deltaY,Tn=hn.shiftKey,ci=En,ri=Wn;(nn.current==="sx"||!nn.current&&Tn&&Wn&&!En)&&(ci=Wn,ri=0,nn.current="sx");var Ii=Math.abs(ci),bi=Math.abs(ri);nn.current===null&&(nn.current=Xe&&Ii>bi?"x":"y"),nn.current==="y"?xt(hn,ri):tn(hn,ci)}}function Mn(hn){ze&&(Ze.current=hn.detail===Ke.current)}return[pn,Mn]}function je(ze,Be,et,qe){var Ue=ve.useMemo(function(){return[new Map,[]]},[ze,et.id,qe]),Xe=(0,be.Z)(Ue,2),Re=Xe[0],Ae=Xe[1],Ge=function(Ze){var at=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ze,xt=Re.get(Ze),tn=Re.get(at);if(xt===void 0||tn===void 0)for(var nn=ze.length,Jt=Ae.length;Jt<nn;Jt+=1){var pn,Mn=ze[Jt],hn=Be(Mn);Re.set(hn,Jt);var En=(pn=et.get(hn))!==null&&pn!==void 0?pn:qe;if(Ae[Jt]=(Ae[Jt-1]||0)+En,hn===Ze&&(xt=Jt),hn===at&&(tn=Jt),xt!==void 0&&tn!==void 0)break}return{top:Ae[xt-1]||0,bottom:Ae[tn]}};return Ge}var Ve=Ee(76846),Qe=Ee(6909),We=Ee(4771),gt=function(){function ze(){(0,Qe.Z)(this,ze),(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,We.Z)(ze,[{key:"set",value:function(et,qe){this.maps[et]=qe,this.id+=1,this.diffKeys.add(et)}},{key:"get",value:function(et){return this.maps[et]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),ze}(),ct=gt;function Ct(ze){var Be=parseFloat(ze);return isNaN(Be)?0:Be}function it(ze,Be,et){var qe=ve.useState(0),Ue=(0,be.Z)(qe,2),Xe=Ue[0],Re=Ue[1],Ae=(0,ve.useRef)(new Map),Ge=(0,ve.useRef)(new ct),Ke=(0,ve.useRef)(0);function Ze(){Ke.current+=1}function at(){var tn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ze();var nn=function(){var Mn=!1;Ae.current.forEach(function(hn,En){if(hn&&hn.offsetParent){var Wn=(0,Ve.ZP)(hn),Tn=Wn.offsetHeight,ci=getComputedStyle(Wn),ri=ci.marginTop,Ii=ci.marginBottom,bi=Ct(ri),nr=Ct(Ii),Ji=Tn+bi+nr;Ge.current.get(En)!==Ji&&(Ge.current.set(En,Ji),Mn=!0)}}),Mn&&Re(function(hn){return hn+1})};if(tn)nn();else{Ke.current+=1;var Jt=Ke.current;Promise.resolve().then(function(){Jt===Ke.current&&nn()})}}function xt(tn,nn){var Jt=ze(tn),pn=Ae.current.get(Jt);nn?(Ae.current.set(Jt,nn),at()):Ae.current.delete(Jt),!pn!=!nn&&(nn?Be==null||Be(tn):et==null||et(tn))}return(0,ve.useEffect)(function(){return Ze},[]),[xt,at,Ge.current,Xe]}var yt=14/15;function ut(ze,Be,et){var qe=(0,ve.useRef)(!1),Ue=(0,ve.useRef)(0),Xe=(0,ve.useRef)(0),Re=(0,ve.useRef)(null),Ae=(0,ve.useRef)(null),Ge,Ke=function(tn){if(qe.current){var nn=Math.ceil(tn.touches[0].pageX),Jt=Math.ceil(tn.touches[0].pageY),pn=Ue.current-nn,Mn=Xe.current-Jt,hn=Math.abs(pn)>Math.abs(Mn);hn?Ue.current=nn:Xe.current=Jt;var En=et(hn,hn?pn:Mn,!1,tn);En&&tn.preventDefault(),clearInterval(Ae.current),En&&(Ae.current=setInterval(function(){hn?pn*=yt:Mn*=yt;var Wn=Math.floor(hn?pn:Mn);(!et(hn,Wn,!0)||Math.abs(Wn)<=.1)&&clearInterval(Ae.current)},16))}},Ze=function(){qe.current=!1,Ge()},at=function(tn){Ge(),tn.touches.length===1&&!qe.current&&(qe.current=!0,Ue.current=Math.ceil(tn.touches[0].pageX),Xe.current=Math.ceil(tn.touches[0].pageY),Re.current=tn.target,Re.current.addEventListener("touchmove",Ke,{passive:!1}),Re.current.addEventListener("touchend",Ze,{passive:!0}))};Ge=function(){Re.current&&(Re.current.removeEventListener("touchmove",Ke),Re.current.removeEventListener("touchend",Ze))},(0,ce.Z)(function(){return ze&&Be.current.addEventListener("touchstart",at,{passive:!0}),function(){var xt;(xt=Be.current)===null||xt===void 0||xt.removeEventListener("touchstart",at),Ge(),clearInterval(Ae.current)}},[ze])}function Ft(ze){return Math.floor(Math.pow(ze,.5))}function ht(ze,Be){var et="touches"in ze?ze.touches[0]:ze;return et[Be?"pageX":"pageY"]-window[Be?"scrollX":"scrollY"]}function rt(ze,Be,et){ve.useEffect(function(){var qe=Be.current;if(ze&&qe){var Ue=!1,Xe,Re,Ae=function(){ye.Z.cancel(Xe)},Ge=function xt(){Ae(),Xe=(0,ye.Z)(function(){et(Re),xt()})},Ke=function(tn){if(!tn.target.draggable){var nn=tn;nn._virtualHandled||(nn._virtualHandled=!0,Ue=!0)}},Ze=function(){Ue=!1,Ae()},at=function(tn){if(Ue){var nn=ht(tn,!1),Jt=qe.getBoundingClientRect(),pn=Jt.top,Mn=Jt.bottom;if(nn<=pn){var hn=pn-nn;Re=-Ft(hn),Ge()}else if(nn>=Mn){var En=nn-Mn;Re=Ft(En),Ge()}else Ae()}};return qe.addEventListener("mousedown",Ke),qe.ownerDocument.addEventListener("mouseup",Ze),qe.ownerDocument.addEventListener("mousemove",at),function(){qe.removeEventListener("mousedown",Ke),qe.ownerDocument.removeEventListener("mouseup",Ze),qe.ownerDocument.removeEventListener("mousemove",at),Ae()}}},[ze])}var dt=10;function St(ze,Be,et,qe,Ue,Xe,Re,Ae){var Ge=ve.useRef(),Ke=ve.useState(null),Ze=(0,be.Z)(Ke,2),at=Ze[0],xt=Ze[1];return(0,ce.Z)(function(){if(at&&at.times<dt){if(!ze.current){xt(function(st){return(0,Ie.Z)({},st)});return}Xe();var tn=at.targetAlign,nn=at.originAlign,Jt=at.index,pn=at.offset,Mn=ze.current.clientHeight,hn=!1,En=tn,Wn=null;if(Mn){for(var Tn=tn||nn,ci=0,ri=0,Ii=0,bi=Math.min(Be.length-1,Jt),nr=0;nr<=bi;nr+=1){var Ji=Ue(Be[nr]);ri=ci;var gr=et.get(Ji);Ii=ri+(gr===void 0?qe:gr),ci=Ii}for(var cr=Tn==="top"?pn:Mn-pn,eo=bi;eo>=0;eo-=1){var ro=Ue(Be[eo]),hi=et.get(ro);if(hi===void 0){hn=!0;break}if(cr-=hi,cr<=0)break}switch(Tn){case"top":Wn=ri-pn;break;case"bottom":Wn=Ii-Mn+pn;break;default:{var Pr=ze.current.scrollTop,Hi=Pr+Mn;ri<Pr?En="top":Ii>Hi&&(En="bottom")}}Wn!==null&&Re(Wn),Wn!==at.lastTop&&(hn=!0)}hn&&xt((0,Ie.Z)((0,Ie.Z)({},at),{},{times:at.times+1,targetAlign:En,lastTop:Wn}))}},[at,ze.current]),function(tn){if(tn==null){Ae();return}if(ye.Z.cancel(Ge.current),typeof tn=="number")Re(tn);else if(tn&&(0,me.Z)(tn)==="object"){var nn,Jt=tn.align;"index"in tn?nn=tn.index:nn=Be.findIndex(function(hn){return Ue(hn)===tn.key});var pn=tn.offset,Mn=pn===void 0?0:pn;xt({times:0,index:nn,offset:Mn,originAlign:Jt})}}}var Et=ve.forwardRef(function(ze,Be){var et=ze.prefixCls,qe=ze.rtl,Ue=ze.scrollOffset,Xe=ze.scrollRange,Re=ze.onStartMove,Ae=ze.onStopMove,Ge=ze.onScroll,Ke=ze.horizontal,Ze=ze.spinSize,at=ze.containerSize,xt=ze.style,tn=ze.thumbStyle,nn=ze.showScrollBar,Jt=ve.useState(!1),pn=(0,be.Z)(Jt,2),Mn=pn[0],hn=pn[1],En=ve.useState(null),Wn=(0,be.Z)(En,2),Tn=Wn[0],ci=Wn[1],ri=ve.useState(null),Ii=(0,be.Z)(ri,2),bi=Ii[0],nr=Ii[1],Ji=!qe,gr=ve.useRef(),cr=ve.useRef(),eo=ve.useState(nn),ro=(0,be.Z)(eo,2),hi=ro[0],Pr=ro[1],Hi=ve.useRef(),st=function(){nn===!0||nn===!1||(clearTimeout(Hi.current),Pr(!0),Hi.current=setTimeout(function(){Pr(!1)},3e3))},Rr=Xe-at||0,Er=at-Ze||0,yo=ve.useMemo(function(){if(Ue===0||Rr===0)return 0;var wt=Ue/Rr;return wt*Er},[Ue,Rr,Er]),Zr=function(Nt){Nt.stopPropagation(),Nt.preventDefault()},ao=ve.useRef({top:yo,dragging:Mn,pageY:Tn,startTop:bi});ao.current={top:yo,dragging:Mn,pageY:Tn,startTop:bi};var Jr=function(Nt){hn(!0),ci(ht(Nt,Ke)),nr(ao.current.top),Re(),Nt.stopPropagation(),Nt.preventDefault()};ve.useEffect(function(){var wt=function(un){un.preventDefault()},Nt=gr.current,kt=cr.current;return Nt.addEventListener("touchstart",wt,{passive:!1}),kt.addEventListener("touchstart",Jr,{passive:!1}),function(){Nt.removeEventListener("touchstart",wt),kt.removeEventListener("touchstart",Jr)}},[]);var lo=ve.useRef();lo.current=Rr;var oi=ve.useRef();oi.current=Er,ve.useEffect(function(){if(Mn){var wt,Nt=function(un){var wn=ao.current,Bn=wn.dragging,zn=wn.pageY,At=wn.startTop;ye.Z.cancel(wt);var Kt=gr.current.getBoundingClientRect(),Sn=at/(Ke?Kt.width:Kt.height);if(Bn){var kn=(ht(un,Ke)-zn)*Sn,Zt=At;!Ji&&Ke?Zt-=kn:Zt+=kn;var rn=lo.current,Rn=oi.current,An=Rn?Zt/Rn:0,Qn=Math.ceil(An*rn);Qn=Math.max(Qn,0),Qn=Math.min(Qn,rn),wt=(0,ye.Z)(function(){Ge(Qn,Ke)})}},kt=function(){hn(!1),Ae()};return window.addEventListener("mousemove",Nt,{passive:!0}),window.addEventListener("touchmove",Nt,{passive:!0}),window.addEventListener("mouseup",kt,{passive:!0}),window.addEventListener("touchend",kt,{passive:!0}),function(){window.removeEventListener("mousemove",Nt),window.removeEventListener("touchmove",Nt),window.removeEventListener("mouseup",kt),window.removeEventListener("touchend",kt),ye.Z.cancel(wt)}}},[Mn]),ve.useEffect(function(){return st(),function(){clearTimeout(Hi.current)}},[Ue]),ve.useImperativeHandle(Be,function(){return{delayHidden:st}});var $e="".concat(et,"-scrollbar"),nt={position:"absolute",visibility:hi?null:"hidden"},Je={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Ke?(nt.height=8,nt.left=0,nt.right=0,nt.bottom=0,Je.height="100%",Je.width=Ze,Ji?Je.left=yo:Je.right=yo):(nt.width=8,nt.top=0,nt.bottom=0,Ji?nt.right=0:nt.left=0,Je.width="100%",Je.height=Ze,Je.top=yo),ve.createElement("div",{ref:gr,className:Se()($e,(0,Te.Z)((0,Te.Z)((0,Te.Z)({},"".concat($e,"-horizontal"),Ke),"".concat($e,"-vertical"),!Ke),"".concat($e,"-visible"),hi)),style:(0,Ie.Z)((0,Ie.Z)({},nt),xt),onMouseDown:Zr,onMouseMove:st},ve.createElement("div",{ref:cr,className:Se()("".concat($e,"-thumb"),(0,Te.Z)({},"".concat($e,"-thumb-moving"),Mn)),style:(0,Ie.Z)((0,Ie.Z)({},Je),tn),onMouseDown:Jr}))}),vt=Et,Bt=20;function jt(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,et=ze/Be*ze;return isNaN(et)&&(et=0),et=Math.max(et,Bt),Math.floor(et)}var ln=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],$t=[],yn={overflowY:"auto",overflowAnchor:"none"};function Ut(ze,Be){var et=ze.prefixCls,qe=et===void 0?"rc-virtual-list":et,Ue=ze.className,Xe=ze.height,Re=ze.itemHeight,Ae=ze.fullHeight,Ge=Ae===void 0?!0:Ae,Ke=ze.style,Ze=ze.data,at=ze.children,xt=ze.itemKey,tn=ze.virtual,nn=ze.direction,Jt=ze.scrollWidth,pn=ze.component,Mn=pn===void 0?"div":pn,hn=ze.onScroll,En=ze.onVirtualScroll,Wn=ze.onVisibleChange,Tn=ze.innerProps,ci=ze.extraRender,ri=ze.styles,Ii=ze.showScrollBar,bi=Ii===void 0?"optional":Ii,nr=(0,Pe.Z)(ze,ln),Ji=ve.useCallback(function(Sr){return typeof xt=="function"?xt(Sr):Sr==null?void 0:Sr[xt]},[xt]),gr=it(Ji,null,null),cr=(0,be.Z)(gr,4),eo=cr[0],ro=cr[1],hi=cr[2],Pr=cr[3],Hi=!!(tn!==!1&&Xe&&Re),st=ve.useMemo(function(){return Object.values(hi.maps).reduce(function(Sr,yr){return Sr+yr},0)},[hi.id,hi.maps]),Rr=Hi&&Ze&&(Math.max(Re*Ze.length,st)>Xe||!!Jt),Er=nn==="rtl",yo=Se()(qe,(0,Te.Z)({},"".concat(qe,"-rtl"),Er),Ue),Zr=Ze||$t,ao=(0,ve.useRef)(),Jr=(0,ve.useRef)(),lo=(0,ve.useRef)(),oi=(0,ve.useState)(0),$e=(0,be.Z)(oi,2),nt=$e[0],Je=$e[1],wt=(0,ve.useState)(0),Nt=(0,be.Z)(wt,2),kt=Nt[0],_t=Nt[1],un=(0,ve.useState)(!1),wn=(0,be.Z)(un,2),Bn=wn[0],zn=wn[1],At=function(){zn(!0)},Kt=function(){zn(!1)},Sn={getKey:Ji};function kn(Sr){Je(function(yr){var qi;typeof Sr=="function"?qi=Sr(yr):qi=Sr;var Qr=ir(qi);return ao.current.scrollTop=Qr,Qr})}var Zt=(0,ve.useRef)({start:0,end:Zr.length}),rn=(0,ve.useRef)(),Rn=le(Zr,Ji),An=(0,be.Z)(Rn,1),Qn=An[0];rn.current=Qn;var Un=ve.useMemo(function(){if(!Hi)return{scrollHeight:void 0,start:0,end:Zr.length-1,offset:void 0};if(!Rr){var Sr;return{scrollHeight:((Sr=Jr.current)===null||Sr===void 0?void 0:Sr.offsetHeight)||0,start:0,end:Zr.length-1,offset:void 0}}for(var yr=0,qi,Qr,_o,rr=Zr.length,ji=0;ji<rr;ji+=1){var Xn=Zr[ji],er=Ji(Xn),no=hi.get(er),Lo=yr+(no===void 0?Re:no);Lo>=nt&&qi===void 0&&(qi=ji,Qr=yr),Lo>nt+Xe&&_o===void 0&&(_o=ji),yr=Lo}return qi===void 0&&(qi=0,Qr=0,_o=Math.ceil(Xe/Re)),_o===void 0&&(_o=Zr.length-1),_o=Math.min(_o+1,Zr.length-1),{scrollHeight:yr,start:qi,end:_o,offset:Qr}},[Rr,Hi,nt,Zr,Pr,Xe]),qn=Un.scrollHeight,Nn=Un.start,si=Un.end,Li=Un.offset;Zt.current.start=Nn,Zt.current.end=si,ve.useLayoutEffect(function(){var Sr=hi.getRecord();if(Sr.size===1){var yr=Array.from(Sr)[0],qi=Ji(Zr[Nn]);if(qi===yr){var Qr=hi.get(yr),_o=Qr-Re;kn(function(rr){return rr+_o})}}hi.resetRecord()},[qn]);var Bi=ve.useState({width:0,height:Xe}),Ln=(0,be.Z)(Bi,2),Ui=Ln[0],lr=Ln[1],Di=function(yr){lr({width:yr.offsetWidth,height:yr.offsetHeight})},Pn=(0,ve.useRef)(),Yn=(0,ve.useRef)(),ui=ve.useMemo(function(){return jt(Ui.width,Jt)},[Ui.width,Jt]),Ti=ve.useMemo(function(){return jt(Ui.height,qn)},[Ui.height,qn]),pi=qn-Xe,Mi=(0,ve.useRef)(pi);Mi.current=pi;function ir(Sr){var yr=Sr;return Number.isNaN(Mi.current)||(yr=Math.min(yr,Mi.current)),yr=Math.max(yr,0),yr}var Fi=nt<=0,Wi=nt>=pi,hr=kt<=0,In=kt>=Jt,zr=ke(Fi,Wi,hr,In),On=function(){return{x:Er?-kt:kt,y:nt}},wr=(0,ve.useRef)(On()),po=(0,ge.useEvent)(function(Sr){if(En){var yr=(0,Ie.Z)((0,Ie.Z)({},On()),Sr);(wr.current.x!==yr.x||wr.current.y!==yr.y)&&(En(yr),wr.current=yr)}});function Ar(Sr,yr){var qi=Sr;yr?((0,de.flushSync)(function(){_t(qi)}),po()):kn(qi)}function To(Sr){var yr=Sr.currentTarget.scrollTop;yr!==nt&&kn(yr),hn==null||hn(Sr),po()}var oo=function(yr){var qi=yr,Qr=Jt?Jt-Ui.width:0;return qi=Math.max(qi,0),qi=Math.min(qi,Qr),qi},$i=(0,ge.useEvent)(function(Sr,yr){yr?((0,de.flushSync)(function(){_t(function(qi){var Qr=qi+(Er?-Sr:Sr);return oo(Qr)})}),po()):kn(function(qi){var Qr=qi+Sr;return Qr})}),Qi=Ne(Hi,Fi,Wi,hr,In,!!Jt,$i),fr=(0,be.Z)(Qi,2),Mr=fr[0],fi=fr[1];ut(Hi,ao,function(Sr,yr,qi,Qr){var _o=Qr;return zr(Sr,yr,qi)?!1:!_o||!_o._virtualHandled?(_o&&(_o._virtualHandled=!0),Mr({preventDefault:function(){},deltaX:Sr?yr:0,deltaY:Sr?0:yr}),!0):!1}),rt(Rr,ao,function(Sr){kn(function(yr){return yr+Sr})}),(0,ce.Z)(function(){function Sr(qi){var Qr=Fi&&qi.detail<0,_o=Wi&&qi.detail>0;Hi&&!Qr&&!_o&&qi.preventDefault()}var yr=ao.current;return yr.addEventListener("wheel",Mr,{passive:!1}),yr.addEventListener("DOMMouseScroll",fi,{passive:!0}),yr.addEventListener("MozMousePixelScroll",Sr,{passive:!1}),function(){yr.removeEventListener("wheel",Mr),yr.removeEventListener("DOMMouseScroll",fi),yr.removeEventListener("MozMousePixelScroll",Sr)}},[Hi,Fi,Wi]),(0,ce.Z)(function(){if(Jt){var Sr=oo(kt);_t(Sr),po({x:Sr})}},[Ui.width,Jt]);var Tt=function(){var yr,qi;(yr=Pn.current)===null||yr===void 0||yr.delayHidden(),(qi=Yn.current)===null||qi===void 0||qi.delayHidden()},Ir=St(ao,Zr,hi,Re,Ji,function(){return ro(!0)},kn,Tt);ve.useImperativeHandle(Be,function(){return{nativeElement:lo.current,getScrollInfo:On,scrollTo:function(yr){function qi(Qr){return Qr&&(0,me.Z)(Qr)==="object"&&("left"in Qr||"top"in Qr)}qi(yr)?(yr.left!==void 0&&_t(oo(yr.left)),Ir(yr.top)):Ir(yr)}}}),(0,ce.Z)(function(){if(Wn){var Sr=Zr.slice(Nn,si+1);Wn(Sr,Zr)}},[Nn,si,Zr]);var ho=je(Zr,Ji,hi,Re),Zo=ci==null?void 0:ci({start:Nn,end:si,virtual:Rr,offsetX:kt,offsetY:Li,rtl:Er,getSize:ho}),Po=oe(Zr,Nn,si,Jt,kt,eo,at,Sn),$o=null;Xe&&($o=(0,Ie.Z)((0,Te.Z)({},Ge?"height":"maxHeight",Xe),yn),Hi&&($o.overflowY="hidden",Jt&&($o.overflowX="hidden"),Bn&&($o.pointerEvents="none")));var Yo={};return Er&&(Yo.dir="rtl"),ve.createElement("div",(0,Le.Z)({ref:lo,style:(0,Ie.Z)((0,Ie.Z)({},Ke),{},{position:"relative"}),className:yo},Yo,nr),ve.createElement(xe.Z,{onResize:Di},ve.createElement(Mn,{className:"".concat(qe,"-holder"),style:$o,ref:ao,onScroll:To,onMouseEnter:Tt},ve.createElement(z,{prefixCls:qe,height:qn,offsetX:kt,offsetY:Li,scrollWidth:Jt,onInnerResize:ro,ref:Jr,innerProps:Tn,rtl:Er,extra:Zo},Po))),Rr&&qn>Xe&&ve.createElement(vt,{ref:Pn,prefixCls:qe,scrollOffset:nt,scrollRange:qn,rtl:Er,onScroll:Ar,onStartMove:At,onStopMove:Kt,spinSize:Ti,containerSize:Ui.height,style:ri==null?void 0:ri.verticalScrollBar,thumbStyle:ri==null?void 0:ri.verticalScrollBarThumb,showScrollBar:bi}),Rr&&Jt>Ui.width&&ve.createElement(vt,{ref:Yn,prefixCls:qe,scrollOffset:kt,scrollRange:Jt,rtl:Er,onScroll:Ar,onStartMove:At,onStopMove:Kt,spinSize:ui,containerSize:Ui.width,horizontal:!0,style:ri==null?void 0:ri.horizontalScrollBar,thumbStyle:ri==null?void 0:ri.horizontalScrollBarThumb,showScrollBar:bi}))}var Wt=ve.forwardRef(Ut);Wt.displayName="List";var Xt=Wt,mt=Xt},7062:function(bn,qt,Ee){var Le=Ee(19637),me=Ee(97573),Ie=[Ee(96627)];bn.exports=Le.createStore(me,Ie)},96627:function(bn,qt,Ee){bn.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(bn){return bn<10?"0"+bn:bn}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(bn){return rx_escapable.lastIndex=0,rx_escapable.test(bn)?'"'+bn.replace(rx_escapable,function(qt){var Ee=meta[qt];return typeof Ee=="string"?Ee:"\\u"+("0000"+qt.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+bn+'"'}function str(bn,qt){var Ee,Le,me,Ie,Te=gap,be,Pe=qt[bn];switch(Pe&&typeof Pe=="object"&&typeof Pe.toJSON=="function"&&(Pe=Pe.toJSON(bn)),typeof rep=="function"&&(Pe=rep.call(qt,bn,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(bn,qt,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=qt,qt&&typeof qt!="function"&&(typeof qt!="object"||typeof qt.length!="number"))throw new Error("JSON.stringify");return str("",{"":bn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(bn,qt){var Ee,Le,me=bn[qt];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(bn,qt,me)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(bn){return"\\u"+("0000"+bn.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(bn,qt,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;bn.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(We,gt){Ne[gt]=We}),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(bn,qt,Ee){var Le=be(),me=Pe(),Ie=he(),Te=typeof window!="undefined"?window:Ee.g;bn.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(bn,qt,Ee){bn.exports=[Ee(52496),Ee(16436),Ee(76673),Ee(35701),Ee(65578),Ee(65300)]},35701:function(bn,qt,Ee){var Le=Ee(67039),me=Le.Global,Ie=Le.trim;bn.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(bn,qt,Ee){var Le=Ee(67039),me=Le.Global;bn.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(bn){bn.exports={name:"memoryStorage",read:Ee,write:Le,each:me,remove:Ie,clearAll:Te};var qt={};function Ee(be){return qt[be]}function Le(be,Pe){qt[be]=Pe}function me(be){for(var Pe in qt)qt.hasOwnProperty(Pe)&&be(qt[Pe],Pe)}function Ie(be){delete qt[be]}function Te(be){qt={}}},16436:function(bn,qt,Ee){var Le=Ee(67039),me=Le.Global;bn.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(bn,qt,Ee){var Le=Ee(67039),me=Le.Global;bn.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(bn,qt,Ee){var Le=Ee(67039),me=Le.Global;bn.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(bn){var qt=arguments[3],Ee=arguments[4],Le=arguments[5],me=JSON.stringify;bn.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="("+qt+")({"+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(bn){(function(qt,Ee){if(1)bn.exports=Ee();else var Le,me})(window,function(){return function(qt){var Ee={};function Le(me){if(Ee[me])return Ee[me].exports;var Ie=Ee[me]={i:me,l:!1,exports:{}};return qt[me].call(Ie.exports,Ie,Ie.exports,Le),Ie.l=!0,Ie.exports}return Le.m=qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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,We,gt,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=We,it._coreMouseService=gt,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 yt=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)yt(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 We=Qe+131072<ke.length?Qe+131072:ke.length,gt=typeof ke=="string"?this._stringDecoder.decode(ke.substring(Qe,We),this._parseBuffer):this._utf8Decoder.decode(ke.subarray(Qe,We),this._parseBuffer);this._parser.parse(this._parseBuffer,gt)}else gt=typeof ke=="string"?this._stringDecoder.decode(ke,this._parseBuffer):this._utf8Decoder.decode(ke,this._parseBuffer),this._parser.parse(this._parseBuffer,gt);(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,We=this._bufferService.buffer,gt=this._charsetService.charset,ct=this._optionsService.options.screenReaderMode,Ct=this._bufferService.cols,it=this._coreService.decPrivateModes.wraparound,yt=this._coreService.modes.insertMode,ut=this._curAttrData,Ft=We.lines.get(We.ybase+We.y);this._dirtyRowService.markDirty(We.y),We.x&&je-Ne>0&&Ft.getWidth(We.x-1)===2&&Ft.setCellFromCodePoint(We.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&>){var rt=gt[String.fromCharCode(Ve)];rt&&(Ve=rt.charCodeAt(0))}if(ct&&this._onA11yChar.fire(ge.stringFromCodePoint(Ve)),Qe||!We.x){if(We.x+Qe-1>=Ct){if(it){for(;We.x<Ct;)Ft.setCellFromCodePoint(We.x++,0,1,ut.fg,ut.bg,ut.extended);We.x=0,We.y++,We.y===We.scrollBottom+1?(We.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(We.y>=this._bufferService.rows&&(We.y=this._bufferService.rows-1),We.lines.get(We.ybase+We.y).isWrapped=!0),Ft=We.lines.get(We.ybase+We.y)}else if(We.x=Ct-1,Qe===2)continue}if(yt&&(Ft.insertCells(We.x,Qe,We.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(We.x++,Ve,Qe,ut.fg,ut.bg,ut.extended),Qe>0)for(;--Qe;)Ft.setCellFromCodePoint(We.x++,0,0,ut.fg,ut.bg,ut.extended)}else Ft.getWidth(We.x-1)?Ft.addCodepointToCell(We.x-1,Ve):Ft.addCodepointToCell(We.x-2,Ve)}je-Ne>0&&(Ft.loadCell(We.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),We.x<Ct&&je-Ne>0&&Ft.getWidth(We.x)===0&&!Ft.hasContent(We.x)&&Ft.setCellFromCodePoint(We.x,0,1,ut.fg,ut.bg,ut.extended),this._dirtyRowService.markDirty(We.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,We=this._bufferService.rows-1+je.ybase-Qe+1;Ne--;)je.lines.splice(We-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,We=0;do{if(Ve[We+Qe]=ke.params[Ne+We],ke.hasSubParams(Ne+We)){var gt=ke.getSubParams(Ne+We),ct=0;do Ve[1]===5&&(Qe=1),Ve[We+ct+1+Qe]=gt[ct];while(++ct<gt.length&&ct+We+1+Qe<Ve.length);break}if(Ve[1]===5&&We+Qe>=2||Ve[1]===2&&We+Qe>=5)break;Ve[1]&&(Qe=1)}while(++We+Ne<ke.length&&We+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 We},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(qt,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(qt,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(qt,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(qt,Ee,Le){"use strict";Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.PAYLOAD_LIMIT=void 0,Ee.PAYLOAD_LIMIT=1e7},function(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,Ee,Le){"use strict";var me,Ie=this&&this.__extends||(me=function(Ct,it){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(yt,ut){yt.__proto__=ut}||function(yt,ut){for(var Ft in ut)ut.hasOwnProperty(Ft)&&(yt[Ft]=ut[Ft])})(Ct,it)},function(Ct,it){function yt(){this.constructor=Ct}me(Ct,it),Ct.prototype=it===null?Object.create(it):(yt.prototype=it.prototype,new yt)});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),We=Le(65),gt=typeof window!="undefined"?window.document:null,ct=function(Ct){function it(yt){yt===void 0&&(yt={});var ut=Ct.call(this,yt)||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 yt,ut,Ft;this._isDisposed||(Ct.prototype.dispose.call(this),(yt=this._renderService)===null||yt===void 0||yt.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(yt){var ut,Ft,ht,rt;switch(Ct.prototype._updateOptions.call(this,yt),yt){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(yt){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(he.C0.ESC+"[I"),this.updateCursorStyle(yt),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},it.prototype.blur=function(){var yt;return(yt=this.textarea)===null||yt===void 0?void 0:yt.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 yt=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),ut=this._bufferService.buffer.y*yt,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=yt+"px",this.textarea.style.lineHeight=yt+"px",this.textarea.style.zIndex="-5"}},it.prototype._initGlobal=function(){var yt=this;this._bindKeys(),this.register(de.addDisposableDomListener(this.element,"copy",function(Ft){yt.hasSelection()&&Pe.copyHandler(Ft,yt._selectionService)}));var ut=function(Ft){return Pe.handlePasteEvent(Ft,yt.textarea,yt._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,yt.textarea,yt.screenElement,yt._selectionService,yt.options.rightClickSelectsWord)})):this.register(de.addDisposableDomListener(this.element,"contextmenu",function(Ft){Pe.rightClickHandler(Ft,yt.textarea,yt.screenElement,yt._selectionService,yt.options.rightClickSelectsWord)})),ve.isLinux&&this.register(de.addDisposableDomListener(this.element,"auxclick",function(Ft){Ft.button===1&&Pe.moveTextAreaUnderMouseCursor(Ft,yt.textarea,yt.screenElement)}))},it.prototype._bindKeys=function(){var yt=this;this.register(de.addDisposableDomListener(this.textarea,"keyup",function(ut){return yt._keyUp(ut)},!0)),this.register(de.addDisposableDomListener(this.textarea,"keydown",function(ut){return yt._keyDown(ut)},!0)),this.register(de.addDisposableDomListener(this.textarea,"keypress",function(ut){return yt._keyPress(ut)},!0)),this.register(de.addDisposableDomListener(this.textarea,"compositionstart",function(){return yt._compositionHelper.compositionstart()})),this.register(de.addDisposableDomListener(this.textarea,"compositionupdate",function(ut){return yt._compositionHelper.compositionupdate(ut)})),this.register(de.addDisposableDomListener(this.textarea,"compositionend",function(){return yt._compositionHelper.compositionend()})),this.register(this.onRender(function(){return yt._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(ut){return yt._queueLinkification(ut.start,ut.end)}))},it.prototype.open=function(yt){var ut=this;if(!yt)throw new Error("Terminal requires a parent element.");gt.body.contains(yt)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=yt.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),yt.appendChild(this.element);var Ft=gt.createDocumentFragment();this._viewportElement=gt.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Ft.appendChild(this._viewportElement),this._viewportScrollArea=gt.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=gt.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=gt.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Ft.appendChild(this.screenElement),this.textarea=gt.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=gt.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(gt,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,St){return ut.scrollLines(dt,St)},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(yt){var ut,Ft,ht;this._theme=yt,(ut=this._colorManager)===null||ut===void 0||ut.setTheme(yt),(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 yt=this,ut=this,Ft=this.element;function ht(Bt){var jt,ln,$t=ut._mouseService.getRawByteCoords(Bt,ut.screenElement,ut.cols,ut.rows);if(!$t)return!1;switch(Bt.overrideType||Bt.type){case"mousemove":ln=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":ln=0,jt=Bt.button<3?Bt.button:3;break;case"mousedown":ln=1,jt=Bt.button<3?Bt.button:3;break;case"wheel":Bt.deltaY!==0&&(ln=Bt.deltaY<0?0:1),jt=4;break;default:return!1}return!(ln===void 0||jt===void 0||jt>4)&&ut._coreMouseService.triggerMouseEvent({col:$t.x-33,row:$t.y-33,button:jt,action:ln,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||(yt._document.removeEventListener("mouseup",rt.mouseup),rt.mousedrag&&yt._document.removeEventListener("mousemove",rt.mousedrag)),yt.cancel(Bt)},St=function(Bt){return ht(Bt),Bt.preventDefault(),yt.cancel(Bt)},Et=function(Bt){Bt.buttons&&ht(Bt)},vt=function(Bt){Bt.buttons||ht(Bt)};this.register(this._coreMouseService.onProtocolChange(function(Bt){Bt?(yt.optionsService.options.logLevel==="debug"&&yt._logService.debug("Binding to mouse events:",yt._coreMouseService.explainEvents(Bt)),yt.element.classList.add("enable-mouse-events"),yt._selectionService.disable()):(yt._logService.debug("Unbinding from mouse events."),yt.element.classList.remove("enable-mouse-events"),yt._selectionService.enable()),8&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",St,{passive:!1}),rt.wheel=St):(Ft.removeEventListener("wheel",rt.wheel),rt.wheel=null),2&Bt?rt.mouseup||(rt.mouseup=dt):(yt._document.removeEventListener("mouseup",rt.mouseup),rt.mouseup=null),4&Bt?rt.mousedrag||(rt.mousedrag=Et):(yt._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(),yt.focus(),yt._coreMouseService.areMouseEventsActive&&!yt._selectionService.shouldForceSelection(Bt))return ht(Bt),rt.mouseup&&yt._document.addEventListener("mouseup",rt.mouseup),rt.mousedrag&&yt._document.addEventListener("mousemove",rt.mousedrag),yt.cancel(Bt)})),this.register(de.addDisposableDomListener(Ft,"wheel",function(Bt){if(!rt.wheel){if(!yt.buffer.hasScrollback){var jt=yt.viewport.getLinesScrolled(Bt);if(jt===0)return;for(var ln=he.C0.ESC+(yt._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Bt.deltaY<0?"A":"B"),$t="",yn=0;yn<Math.abs(jt);yn++)$t+=ln;yt._coreService.triggerDataEvent($t,!0)}}},{passive:!0})),this.register(de.addDisposableDomListener(Ft,"wheel",function(Bt){if(!rt.wheel)return yt.viewport.onWheel(Bt)?void 0:yt.cancel(Bt)},{passive:!1})),this.register(de.addDisposableDomListener(Ft,"touchstart",function(Bt){if(!yt._coreMouseService.areMouseEventsActive)return yt.viewport.onTouchStart(Bt),yt.cancel(Bt)},{passive:!0})),this.register(de.addDisposableDomListener(Ft,"touchmove",function(Bt){if(!yt._coreMouseService.areMouseEventsActive)return yt.viewport.onTouchMove(Bt)?void 0:yt.cancel(Bt)},{passive:!1}))},it.prototype.refresh=function(yt,ut){var Ft;(Ft=this._renderService)===null||Ft===void 0||Ft.refreshRows(yt,ut)},it.prototype._queueLinkification=function(yt,ut){var Ft;(Ft=this.linkifier)===null||Ft===void 0||Ft.linkifyRows(yt,ut)},it.prototype.updateCursorStyle=function(yt){this._selectionService&&this._selectionService.shouldColumnSelect(yt)?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(yt,ut){Ct.prototype.scrollLines.call(this,yt,ut),this.refresh(0,this.rows-1)},it.prototype.paste=function(yt){Pe.paste(yt,this.textarea,this._coreService)},it.prototype.attachCustomKeyEventHandler=function(yt){this._customKeyEventHandler=yt},it.prototype.registerLinkMatcher=function(yt,ut,Ft){var ht=this.linkifier.registerLinkMatcher(yt,ut,Ft);return this.refresh(0,this.rows-1),ht},it.prototype.deregisterLinkMatcher=function(yt){this.linkifier.deregisterLinkMatcher(yt)&&this.refresh(0,this.rows-1)},it.prototype.registerLinkProvider=function(yt){return this.linkifier2.registerLinkProvider(yt)},it.prototype.registerCharacterJoiner=function(yt){var ut=this._renderService.registerCharacterJoiner(yt);return this.refresh(0,this.rows-1),ut},it.prototype.deregisterCharacterJoiner=function(yt){this._renderService.deregisterCharacterJoiner(yt)&&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(yt){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+yt)},it.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},it.prototype.select=function(yt,ut,Ft){this._selectionService.setSelection(yt,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 yt;(yt=this._selectionService)===null||yt===void 0||yt.clearSelection()},it.prototype.selectAll=function(){var yt;(yt=this._selectionService)===null||yt===void 0||yt.selectAll()},it.prototype.selectLines=function(yt,ut){var Ft;(Ft=this._selectionService)===null||Ft===void 0||Ft.selectLines(yt,ut)},it.prototype._keyDown=function(yt){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(yt)===!1)return!1;if(!this._compositionHelper.keydown(yt))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var ut=se.evaluateKeyboardEvent(yt,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(yt),ut.type===3||ut.type===2){var Ft=this.rows-1;return this.scrollLines(ut.type===2?-Ft:Ft),this.cancel(yt,!0)}return ut.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,yt)||(ut.cancel&&this.cancel(yt,!0),!ut.key||(ut.key!==he.C0.ETX&&ut.key!==he.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ut.key,domEvent:yt}),this._showCursor(),this._coreService.triggerDataEvent(ut.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(yt,!0)))},it.prototype._isThirdLevelShift=function(yt,ut){var Ft=yt.isMac&&!this.options.macOptionIsMeta&&ut.altKey&&!ut.ctrlKey&&!ut.metaKey||yt.isWindows&&ut.altKey&&ut.ctrlKey&&!ut.metaKey;return ut.type==="keypress"?Ft:Ft&&(!ut.keyCode||ut.keyCode>47)},it.prototype._keyUp=function(yt){this._customKeyEventHandler&&this._customKeyEventHandler(yt)===!1||(function(ut){return ut.keyCode===16||ut.keyCode===17||ut.keyCode===18}(yt)||this.focus(),this.updateCursorStyle(yt))},it.prototype._keyPress=function(yt){var ut;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(yt)===!1)return!1;if(this.cancel(yt),yt.charCode)ut=yt.charCode;else if(yt.which===null||yt.which===void 0)ut=yt.keyCode;else{if(yt.which===0||yt.charCode===0)return!1;ut=yt.which}return!(!ut||(yt.altKey||yt.ctrlKey||yt.metaKey)&&!this._isThirdLevelShift(this.browser,yt))&&(ut=String.fromCharCode(ut),this._onKey.fire({key:ut,domEvent:yt}),this._showCursor(),this._coreService.triggerDataEvent(ut,!0),!0)},it.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},it.prototype.resize=function(yt,ut){yt!==this.cols||ut!==this.rows?Ct.prototype.resize.call(this,yt,ut):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},it.prototype._afterResize=function(yt,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 yt=1;yt<this.rows;yt++)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 yt,ut;this.options.rows=this.rows,this.options.cols=this.cols;var Ft=this._customKeyEventHandler;this._setup(),Ct.prototype.reset.call(this),(yt=this._selectionService)===null||yt===void 0||yt.reset(),this._customKeyEventHandler=Ft,this.refresh(0,this.rows-1),(ut=this.viewport)===null||ut===void 0||ut.syncScrollArea()},it.prototype._reportWindowsOptions=function(yt){if(this._renderService)switch(yt){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(yt,ut){if(this.options.cancelEvents||ut)return yt.preventDefault(),yt.stopPropagation(),!1},it.prototype._visualBell=function(){return!1},it.prototype._soundBell=function(){return this.options.bellStyle==="sound"},it}(We.CoreTerminal);Ee.Terminal=ct},function(qt,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(qt,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(qt,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(qt,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 We=Ce+1;;++We)if(We>=ue||(z=de[We])===24||z===26||z===27||z>127&&z<160){se.put(de,Ce,We),Ce=We-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 gt=Ce+1;;gt++)if(gt>=ue||(z=de[gt])<32||z>127&&z<=159){ie.put(de,Ce,gt),Ce=gt-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(qt,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 We=ie.call(this)||this;We._colors=le,We._screenElement=ye,We._bufferService=ke,We._charSizeService=Ne,We._optionsService=je,We._id=ee++,We._onRequestRedraw=new z.EventEmitter;var gt=We._optionsService.options.allowTransparency;return We._characterJoinerRegistry=new ge.CharacterJoinerRegistry(We._bufferService),We._renderLayers=[new Pe.TextRenderLayer(We._screenElement,0,We._colors,We._characterJoinerRegistry,gt,We._id,We._bufferService,je),new he.SelectionRenderLayer(We._screenElement,1,We._colors,We._id,We._bufferService,je),new xe.LinkRenderLayer(We._screenElement,2,We._colors,We._id,we,Ce,We._bufferService,je),new Se.CursorRenderLayer(We._screenElement,3,We._colors,We._id,We._onRequestRedraw,We._bufferService,je,Ve,Qe)],We.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},We._devicePixelRatio=window.devicePixelRatio,We._updateDimensions(),We.onOptionsChanged(),We}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(qt,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(qt,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(qt,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 We=!0,gt=Qe.rgba>>>24,ct=Qe.rgba>>>16&255,Ct=Qe.rgba>>>8&255,it=0;it<Ve.data.length;it+=4)Ve.data[it]===gt&&Ve.data[it+1]===ct&&Ve.data[it+2]===Ct?Ve.data[it+3]=0:We=!1;return We}(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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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,We=le[0]-Ve,gt=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 yt=le[0],ut=le[0];Ne.getWidth(yt)===0&&(gt++,yt--),Ne.getWidth(ut)===2&&(ct++,ut++);var Ft=Ne.getString(ut).length;for(Ft>1&&(it+=Ft-1,Qe+=Ft-1);yt>0&&Ve>0&&!this._isCharWordSeparator(Ne.loadCell(yt-1,this._workCell));){Ne.loadCell(yt-1,this._workCell);var ht=this._workCell.getChars().length;this._workCell.getWidth()===0?(gt++,yt--):ht>1&&(Ct+=ht-1,Ve-=ht-1),Ve--,yt--}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+We-gt+Ct,St=Math.min(this._bufferService.cols,Qe-Ve+gt+ct-Ct-it);if(ye||je.slice(Ve,Qe).trim()!==""){if(we&&dt===0&&Ne.getCodePoint(0)!==32){var Et=ke.lines.get(le[1]-1);if(Et&&Ne.isWrapped&&Et.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,St+=Bt}}}if(Ce&&dt+St===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 ln=this._getWordAt([0,le[1]+1],!1,!1,!0);ln&&(St+=ln.length)}}return{start:dt,length:St}}}}},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(qt,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(qt,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,We,gt,ct){var Ct;return Ct=Ie(Qe,We,gt,ct).length>0?We-Te(gt,We):Ve,je<Qe&&Ct<=We||je>=Qe&&Ct<We?"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(qt,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(qt,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(qt,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(qt,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 We=we===ke?se[0]:this._bufferService.cols;Ne.appendChild(this._createSelectionElement(ke,0,We))}}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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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 We=Ve-je+1;Ne.lines.shiftElements(je+1,We-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(qt,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(qt,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(qt,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(qt,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(qt,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 We=Ce.length-1,gt=Ce[We];gt===0&&(gt=Ce[--We]);for(var ct=le.length-ke-1,Ct=we;ct>=0;){var it=Math.min(Ct,gt);if(le[We].copyCellsFrom(le[ct],Ct-it,gt-it,it,!0),(gt-=it)===0&&(gt=Ce[--We]),(Ct-=it)===0){ct--;var yt=Math.max(ct,0);Ct=Pe.getWrappedLineTrimmedLength(le,yt,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,St=0,Et=ee[St];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(Et&&Et.start>dt+vt){for(var Bt=Et.newLines.length-1;Bt>=0;Bt--)this.lines.set(Ve--,Et.newLines[Bt]);Ve++,Ft.push({index:dt+1,amount:Et.newLines.length}),vt+=Et.newLines.length,Et=ee[++St]}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 ln=Math.max(0,rt+oe-this.lines.maxLength);ln>0&&this.lines.onTrimEmitter.fire(ln)}},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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(qt,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(bn){"use strict";bn.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(bn){"use strict";bn.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(bn,qt,Ee){"use strict";Ee.d(qt,{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:Et=>Et!==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:We,top:gt,right:ct,bottom:Ct,left:it}=xe.getBoundingClientRect(),{top:yt,right:ut,bottom:Ft,left:ht}=(Et=>{const vt=window.getComputedStyle(Et);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"?gt-yt:ee==="end"?Ct+Ft:gt+Qe/2-yt+Ft,dt=oe==="center"?it+We/2-ht+ut:oe==="end"?ct+ut:it-ht;const St=[];for(let Et=0;Et<we.length;Et++){const vt=we[Et],{height:Bt,width:jt,top:ln,right:$t,bottom:yn,left:Ut}=vt.getBoundingClientRect();if(z==="if-needed"&>>=0&&it>=0&&Ct<=Ne&&ct<=ke&&(vt===ye&&!Ie(vt)||gt>=ln&&Ct<=yn&&it>=Ut&&ct<=$t))return St;const Wt=getComputedStyle(vt),Xt=parseInt(Wt.borderLeftWidth,10),mt=parseInt(Wt.borderTopWidth,10),ze=parseInt(Wt.borderRightWidth,10),Be=parseInt(Wt.borderBottomWidth,10);let et=0,qe=0;const Ue="offsetWidth"in vt?vt.offsetWidth-vt.clientWidth-Xt-ze:0,Xe="offsetHeight"in vt?vt.offsetHeight-vt.clientHeight-mt-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)et=ee==="start"?rt:ee==="end"?rt-Ne:ee==="nearest"?Te(Ve,Ve+Ne,Ne,mt,Be,Ve+rt,Ve+rt+Qe,Qe):rt-Ne/2,qe=oe==="start"?dt:oe==="center"?dt-ke/2:oe==="end"?dt-ke:Te(je,je+ke,ke,Xt,ze,je+dt,je+dt+We,We),et=Math.max(0,et+Ve),qe=Math.max(0,qe+je);else{et=ee==="start"?rt-ln-mt:ee==="end"?rt-yn+Be+Xe:ee==="nearest"?Te(ln,yn,Bt,mt,Be+Xe,rt,rt+Qe,Qe):rt-(ln+Bt/2)+Xe/2,qe=oe==="start"?dt-Ut-Xt:oe==="center"?dt-(Ut+jt/2)+Ue/2:oe==="end"?dt-$t+ze+Ue:Te(Ut,$t,jt,Xt,ze+Ue,dt,dt+We,We);const{scrollLeft:Ge,scrollTop:Ke}=vt;et=Ae===0?0:Math.max(0,Math.min(Ke+et/Ae,vt.scrollHeight-Bt/Ae+Xe)),qe=Re===0?0:Math.max(0,Math.min(Ge+qe/Re,vt.scrollWidth-jt/Re+Ue)),rt+=Ke-et,dt+=Ge-qe}St.push({el:vt,top:et,left:qe})}return St},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})}}}}]);
|