|
|
(self.webpackChunk=self.webpackChunk||[]).push([[5816],{35323:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},ot=Ze,We=me(88853),lt=function(Ye,st){return Re.createElement(We.Z,(0,ue.Z)({},Ye,{ref:st,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me},19155:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},ot=Ze,We=me(88853),lt=function(Ye,st){return Re.createElement(We.Z,(0,ue.Z)({},Ye,{ref:st,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me},10402:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},ot=Ze,We=me(88853),lt=function(Ye,st){return Re.createElement(We.Z,(0,ue.Z)({},Ye,{ref:st,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me},93343:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},ot=Ze,We=me(88853),lt=function(Ye,st){return Re.createElement(We.Z,(0,ue.Z)({},Ye,{ref:st,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me},80205:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},ot=Ze,We=me(88853),lt=function(Ye,st){return Re.createElement(We.Z,(0,ue.Z)({},Ye,{ref:st,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me},61441:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},ot=Ze,We=me(88853),lt=function(Ye,st){return Re.createElement(We.Z,(0,ue.Z)({},Ye,{ref:st,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me},30631:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},ot=Ze,We=me(88853),lt=function(Ye,st){return Re.createElement(We.Z,(0,ue.Z)({},Ye,{ref:st,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me},43971:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},ot=Ze,We=me(88853),lt=function(Ye,st){return Re.createElement(We.Z,(0,ue.Z)({},Ye,{ref:st,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me},58358:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},ot=Ze,We=me(88853),lt=function(Ye,st){return Re.createElement(We.Z,(0,ue.Z)({},Ye,{ref:st,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me},44757:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},ot=Ze,We=me(88853),lt=function(Ye,st){return Re.createElement(We.Z,(0,ue.Z)({},Ye,{ref:st,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me},16537:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},ot=Ze,We=me(88853),lt=function(Ye,st){return Re.createElement(We.Z,(0,ue.Z)({},Ye,{ref:st,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me},89378:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},ot=Ze,We=me(88853),lt=function(Ye,st){return Re.createElement(We.Z,(0,ue.Z)({},Ye,{ref:st,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me},77042:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},ot=Ze,We=me(88853),lt=function(Ye,st){return Re.createElement(We.Z,(0,ue.Z)({},Ye,{ref:st,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me},37520:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"},ot=Ze,We=me(88853),lt=function(Ye,st){return Re.createElement(We.Z,(0,ue.Z)({},Ye,{ref:st,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me},5527:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},ot=Ze,We=me(88853),lt=function(Ye,st){return Re.createElement(We.Z,(0,ue.Z)({},Ye,{ref:st,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me},86902:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},ot=Ze,We=me(88853),lt=function(Ye,st){return Re.createElement(We.Z,(0,ue.Z)({},Ye,{ref:st,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me},53878:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},ot=Ze,We=me(88853),lt=function(Ye,st){return Re.createElement(We.Z,(0,ue.Z)({},Ye,{ref:st,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me},21970:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},ot=Ze,We=me(88853),lt=function(Ye,st){return Re.createElement(We.Z,(0,ue.Z)({},Ye,{ref:st,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me},79906:function(){"use strict"},93938:function(zn,En){"use strict";En.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},11037:function(zn,En){"use strict";En.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},13021:function(zn,En,me){"use strict";var ue=me(59301),Re=Object.defineProperty,Ze=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,lt=(Ct,Ye,st)=>Ye in Ct?Re(Ct,Ye,{enumerable:!0,configurable:!0,writable:!0,value:st}):Ct[Ye]=st,Me=(Ct,Ye)=>{for(var st in Ye||(Ye={}))ot.call(Ye,st)&<(Ct,st,Ye[st]);if(Ze)for(var st of Ze(Ye))We.call(Ye,st)&<(Ct,st,Ye[st]);return Ct};const Mt=Ct=>React.createElement("svg",Me({width:14,height:14,xmlns:"http://www.w3.org/2000/svg"},Ct),React.createElement("title",null,"\u7F16\u7EC4 18"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("circle",{fill:"#FCB041",cx:7,cy:7,r:7}),React.createElement("path",{d:"M7.531 9.638a.616.616 0 1 1-1.231 0v-.02a.616.616 0 1 1 1.231 0v.02Zm0-2.25a.616.616 0 1 1-1.231 0V4.117a.616.616 0 1 1 1.231 0v3.273Z",fill:"#FFF",fillRule:"nonzero"})));En.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiNGQ0IwNDEiIGN4PSI3IiBjeT0iNyIgcj0iNyIvPjxwYXRoIGQ9Ik03LjUzMSA5LjYzOGEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwdi0uMDJhLjYxNi42MTYgMCAxIDEgMS4yMzEgMHYuMDJabTAtMi4yNWEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwVjQuMTE3YS42MTYuNjE2IDAgMSAxIDEuMjMxIDB2My4yNzNaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+"},37404:function(){"use strict";function zn(Ie,te,ee,de){ee===void 0&&(ee=0),de===void 0&&(de=1/0),this._name=Ie,this._defaultValue=te,this._minimum=ee,this._maximum=de}Object.defineProperty(zn.prototype,"name",{get:function(){return this._name},set:function(Ie){if(typeof Ie!="string"||Ie==="")throw new Error("Shape name must be a valid string.");this._name=Ie}}),Object.defineProperty(zn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Ie){if(typeof Ie!="number"||isNaN(Ie))throw new Error("The default value must be a real number, not: "+Ie);this._defaultValue=Ie}}),Object.defineProperty(zn.prototype,"minimum",{get:function(){return this._minimum},set:function(Ie){if(typeof Ie!="number"||isNaN(Ie))throw new Error("Minimum must be a real number, not: "+Ie);this._minimum=Ie}}),Object.defineProperty(zn.prototype,"maximum",{get:function(){return this._maximum},set:function(Ie){if(typeof Ie!="number"||isNaN(Ie))throw new Error("Maximum must be a real number, not: "+Ie);this._maximum=Ie}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Ie,te){var ee=go.Shape._FigureParameters[Ie];return ee?ee[te]:null},go.Shape.setFigureParameter=function(Ie,te,ee){if(!(ee instanceof zn))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 de=go.Shape._FigureParameters[Ie];de||(de=[],go.Shape._FigureParameters[Ie]=de),de[te]=ee};var En=[];function me(Ie,te){var ee=En.pop();return ee===void 0?new go.Point(Ie,te):(ee.x=Ie,ee.y=te,ee)}function ue(){var Ie=En.pop();return Ie===void 0?new go.Point:Ie}function Re(Ie){En.push(Ie)}function Ze(Ie,te,ee,de,se,he,ve,be,Ne){Ne||(Ne=new go.Point);var Fe=Ie-ee,je=se-ve,ze=NaN,Xe=NaN;if(Fe===0)if(je===0)Ie===ee&&(ze=Ie,Xe=te);else{var Je=(he-be)/je,dt=he-Je*se;ze=Ie,Xe=Je*ze+dt}else if(je===0){var He=(te-de)/Fe,bt=te-He*Ie;ze=se,Xe=He*ze+bt}else{var He=(te-de)/Fe,Je=(he-be)/je,bt=te-He*Ie,dt=he-Je*se;ze=(dt-bt)/(He-Je),Xe=He*ze+bt}return Ne.x=ze,Ne.y=Xe,Ne}function ot(Ie,te,ee,de,se,he,ve,be,Ne,Fe,je,ze,Xe,Je){var dt=1-Ne,He=Ne,bt=Ie*dt+ee*He,et=te*dt+de*He,It=ee*dt+se*He,xt=de*dt+he*He,Bt=se*dt+ve*He,Ut=he*dt+be*He,Nt=bt*dt+It*He,qe=et*dt+xt*He,Ke=It*dt+Bt*He,Tt=xt*dt+Ut*He,Ln=Nt*dt+Ke*He,Mn=qe*dt+Tt*He;Fe.x=bt,Fe.y=et,je.x=Nt,je.y=qe,ze.x=Ln,ze.y=Mn,Xe.x=Ke,Xe.y=Tt,Je.x=Bt,Je.y=Ut}var We=new go.Spot(.156,.156),lt=new go.Spot(.844,.844),Me=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new zn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;(isNaN(de)||de<0)&&(de=5),de=Math.min(de,te/3),de=Math.min(de,ee/3);var se=de*Me,he=new go.Geometry().add(new go.PathFigure(de,0,!0).add(new go.PathSegment(go.PathSegment.Line,te-de,0)).add(new go.PathSegment(go.PathSegment.Bezier,te,de,te-se,0,te,se)).add(new go.PathSegment(go.PathSegment.Line,te,ee-de)).add(new go.PathSegment(go.PathSegment.Bezier,te-de,ee,te,ee-se,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,de,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee-de,se,ee,0,ee-se)).add(new go.PathSegment(go.PathSegment.Line,0,de)).add(new go.PathSegment(go.PathSegment.Bezier,de,0,0,se,se,0).close()));return se>1&&(he.spot1=new go.Spot(0,0,se,se),he.spot2=new go.Spot(1,1,-se,-se)),he}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(te,ee).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(te,ee).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Ie,te,ee){var de=new go.Geometry(go.Geometry.Line);return de.startX=0,de.startY=ee/2,de.endX=te,de.endY=ee/2,de}),go.Shape.defineFigureGenerator("LineV",function(Ie,te,ee){var de=new go.Geometry(go.Geometry.Line);return de.startX=te/2,de.startY=0,de.endX=te/2,de.endY=ee,de}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee/2,!1).add(new go.PathSegment(go.PathSegment.Line,te,ee/2)).add(new go.PathSegment(go.PathSegment.Move,te/2,0)).add(new go.PathSegment(go.PathSegment.Line,te/2,ee)))}),go.Shape.defineFigureGenerator("XLine",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)))}),go.Shape.defineFigureGenerator("LineRight",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(.25*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*te,ee)))}),go.Shape.defineFigureGenerator("LineDown",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,.25*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,.75*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)))}),go.Shape.defineFigureGenerator("LineLeft",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(.75*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*te,ee)))}),go.Shape.defineFigureGenerator("LineUp",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,.75*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Ie,te,ee){var de=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(de*te,(1-de)*ee,!1).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,de*ee)).add(new go.PathSegment(go.PathSegment.Move,de*te,de*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,(1-de)*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee/2)).add(new go.PathSegment(go.PathSegment.Line,te,ee/2)).add(new go.PathSegment(go.PathSegment.Move,te/2,0)).add(new go.PathSegment(go.PathSegment.Line,te/2,ee)))}),go.Shape.defineFigureGenerator("CircleLine",function(Ie,te,ee){var de=te/2,se=new go.Geometry().add(new go.PathFigure(te,te/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,de,de,de,de).close()));return se.spot1=We,se.spot2=lt,se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Line1",function(Ie,te,ee){var de=new go.Geometry(go.Geometry.Line);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}),go.Shape.defineFigureGenerator("Line2",function(Ie,te,ee){var de=new go.Geometry(go.Geometry.Line);return de.startX=te,de.startY=0,de.endX=0,de.endY=ee,de}),go.Shape.defineFigureGenerator("Curve1",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,te,ee,Me*te,0,te,(1-Me)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,te,ee,0,Me*ee,(1-Me)*te,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,Me*ee,Me*te,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-Me)*te,0,0,(1-Me)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new zn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)?de=.1:de<-1?de=-1:de>1&&(de=1);var se=Math.abs(de)*te;if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&he.setSpots(se/te,0,(te-se)/te,1),he}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new zn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)?de=10:de<-te?de=-te:de>te&&(de=te);var se=Math.abs(de);if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&he.setSpots(se/te,0,(te-se)/te,1),he}}),go.Shape.setFigureParameter("Trapezoid1",0,new zn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)?de=.2:de<.5?de=-.5:de>.5&&(de=.5);var se=Math.abs(de)*te;if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&he.setSpots(se/te,0,(te-se)/te,1),he}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new zn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)?de=20:de<-te?de=-te/2:de>te&&(de=te/2);var se=Math.abs(de);if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&he.setSpots(se/te,0,(te-se)/te,1),he}}),go.Shape.setFigureParameter("ManualOperation",0,new zn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)?de=10:de<-te?de=-te/2:de>te&&(de=te/2);var se=Math.abs(de);if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())):he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())),se<te/2&&he.setSpots(se/te,0,(te-se)/te,1),he}});var Mt=[];function Ct(){var Ie=Mt.pop();return Ie===void 0?[]:Ie}function Ye(Ie){Ie.length=0,Mt.push(Ie)}function st(Ie){for(var te=Ct(),ee=.5,de=.5,se=Math.PI*1.5,he=0,ve=0;ve<Ie;ve++)he=2*Math.PI/Ie*ve+se,te[ve]=new go.Point(de+ee*Math.cos(he),de+ee*Math.sin(he));return te.push(te[0]),te}function pt(Ie){var te=wt(Ie),ee=Ct();ee[0]=te[0];for(var de=1,se=1;de<te.length;de+=2,se+=3)ee[se]=te[de],ee[se+1]=te[de],ee[se+2]=te[de+1];return Ye(te),ee}function wt(Ie){for(var te=st(Ie),ee=Ct(),de=Math.floor(te.length/2),se=te.length-1,he=Ie%2===0?2:1,ve=0;ve<se;ve++){var be=te[ve],Ne=te[ve+1],Fe=te[(de+ve-1)%se],je=te[(de+ve+he)%se];ee[ve*2]=be,ee[ve*2+1]=Ze(be.x,be.y,Fe.x,Fe.y,Ne.x,Ne.y,je.x,je.y,new go.Point)}return ee[ee.length]=ee[0],Ye(te),ee}go.Shape.defineFigureGenerator("Pentagon",function(Ie,te,ee){var de=st(5),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<5;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ye(de),se.spot1=new go.Spot(.2,.22),se.spot2=new go.Spot(.8,.9),se}),go.Shape.defineFigureGenerator("Hexagon",function(Ie,te,ee){var de=st(6),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<6;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ye(de),se.spot1=new go.Spot(.07,.25),se.spot2=new go.Spot(.93,.75),se}),go.Shape.defineFigureGenerator("Heptagon",function(Ie,te,ee){var de=st(7),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<7;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ye(de),se.spot1=new go.Spot(.2,.15),se.spot2=new go.Spot(.8,.85),se}),go.Shape.defineFigureGenerator("Octagon",function(Ie,te,ee){var de=st(8),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<8;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ye(de),se.spot1=new go.Spot(.15,.15),se.spot2=new go.Spot(.85,.85),se}),go.Shape.defineFigureGenerator("Nonagon",function(Ie,te,ee){var de=st(9),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<9;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ye(de),se.spot1=new go.Spot(.17,.13),se.spot2=new go.Spot(.82,.82),se}),go.Shape.defineFigureGenerator("Decagon",function(Ie,te,ee){var de=st(10),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<10;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ye(de),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("Dodecagon",function(Ie,te,ee){var de=st(12),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<12;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ye(de),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("FivePointedStar",function(Ie,te,ee){var de=wt(5),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<10;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ye(de),se.spot1=new go.Spot(.266,.333),se.spot2=new go.Spot(.733,.733),se}),go.Shape.defineFigureGenerator("SixPointedStar",function(Ie,te,ee){var de=wt(6),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<12;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ye(de),se.spot1=new go.Spot(.17,.25),se.spot2=new go.Spot(.83,.75),se}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Ie,te,ee){var de=wt(7),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<14;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ye(de),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("EightPointedStar",function(Ie,te,ee){var de=wt(8),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<16;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ye(de),se.spot1=new go.Spot(.25,.25),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("NinePointedStar",function(Ie,te,ee){var de=wt(9),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<18;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ye(de),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("TenPointedStar",function(Ie,te,ee){var de=wt(10),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<20;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ye(de),se.spot1=new go.Spot(.281,.261),se.spot2=new go.Spot(.723,.748),se}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Ie,te,ee){var de=pt(5),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),Ye(de),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Ie,te,ee){var de=pt(6),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),Ye(de),se.spot1=new go.Spot(.17,.222),se.spot2=new go.Spot(.833,.777),se}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Ie,te,ee){var de=pt(7),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),Ye(de),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Ie,te,ee){var de=pt(8),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),Ye(de),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Ie,te,ee){var de=pt(9),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),Ye(de),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Ie,te,ee){var de=pt(10),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),Ye(de),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.setFigureParameter("FramedRectangle",0,new zn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new zn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN,se=Ie?Ie.parameter2:NaN;isNaN(de)&&(de=8),isNaN(se)&&(se=8);var he=new go.Geometry,ve=new go.PathFigure(0,0,!0);return he.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de<te/2&&se<ee/2&&(ve.add(new go.PathSegment(go.PathSegment.Move,de,se)),ve.add(new go.PathSegment(go.PathSegment.Line,de,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Line,te-de,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Line,te-de,se).close())),he.setSpots(0,0,1,1,de,se,-de,-se),he}),go.Shape.setFigureParameter("Ring",0,new zn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;(isNaN(de)||de<0)&&(de=8);var se=te/2,he=new go.Geometry,ve=new go.PathFigure(te,te/2,!0);he.add(ve),ve.add(new go.PathSegment(go.PathSegment.Arc,0,360,se,se,se,se).close());var be=Math.max(se-de,0);return be>0&&(ve.add(new go.PathSegment(go.PathSegment.Move,te/2+be,te/2)),ve.add(new go.PathSegment(go.PathSegment.Arc,0,-360,se,se,be,be).close())),he.spot1=We,he.spot2=lt,he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("Cloud",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(.08034461*te,.1944299*ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*te,.05349299*ee,-.09239631*te,.07836421*ee,.1406031*te,-.0542823*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*te,.074219*ee,.2450511*te,-.00697547*ee,.3776197*te,-.01112067*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*te,.07004196*ee,.4539471*te,0,.6066018*te,-.02526587*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*te,.08370865*ee,.6914277*te,-.01904177*ee,.8921095*te,-.01220843*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*te,.3194596*ee,1.036446*te,.04105738*ee,1.020377*te,.3022052*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*te,.562044*ee,1.04448*te,.360238*ee,.992256*te,.5219009*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*te,.8217117*ee,1.032337*te,.5771781*ee,1.018411*te,.8120651*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*te,.9156953*ee,1.028411*te,.9571472*ee,.8556702*te,1.052487*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*te,.9310455*ee,.7431877*te,1.009325*ee,.5624123*te,1.021761*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*te,.9344623*ee,.4820677*te,1.031761*ee,.3030112*te,1.002796*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*te,.870098*ee,.2329994*te,1.01518*ee,.03213784*te,1.01518*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*te,.6545475*ee,-.02812061*te,.9032597*ee,-.01205169*te,.6835638*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*te,.4265613*ee,-.01812061*te,.6089503*ee,-.00606892*te,.4555777*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*te,.1944299*ee,-.01606892*te,.3892545*ee,-.01205169*te,.1944299*ee))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Ie,te,ee){var de=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(de*te,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,de*ee)).add(new go.PathSegment(go.PathSegment.Line,te,(1-de)*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,ee)).add(new go.PathSegment(go.PathSegment.Line,de*te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,(1-de)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,de*ee).close())).setSpots(de/2,de/2,1-de/2,1-de/2)}),go.Shape.setFigureParameter("Pie",0,new zn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new zn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN,se=Ie?Ie.parameter2:NaN;isNaN(de)&&(de=0),isNaN(se)&&(se=315);var he=de%360;he<0&&(he+=360);var ve=se%360,be=Math.min(te,ee)/2;return new go.Geometry().add(new go.PathFigure(be,be).add(new go.PathSegment(go.PathSegment.Arc,he,ve,be,be,be,be).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Ie,te,ee){var de=Me/Math.SQRT2*.5,se=Math.SQRT2/2,he=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(te,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,se*te,he*ee,te,(1-de)*ee,(se+de)*te,(he+de)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()))}),go.Shape.setFigureParameter("ThickCross",0,new zn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;(isNaN(de)||de<0)&&(de=30);var se=Math.min(de,te)/2,he=te/2,ve=ee/2;return new go.Geometry().add(new go.PathFigure(he-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,he+se,0)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve-se)).add(new go.PathSegment(go.PathSegment.Line,te,ve-se)).add(new go.PathSegment(go.PathSegment.Line,te,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve-se)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve-se).close()))}),go.Shape.setFigureParameter("ThinCross",0,new zn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;(isNaN(de)||de<0)&&(de=10);var se=Math.min(de,te)/2,he=te/2,ve=ee/2;return new go.Geometry().add(new go.PathFigure(he-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,he+se,0)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve-se)).add(new go.PathSegment(go.PathSegment.Line,te,ve-se)).add(new go.PathSegment(go.PathSegment.Line,te,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve-se)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve-se).close()))}),go.Shape.setFigureParameter("ThickX",0,new zn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;if((isNaN(de)||de<0)&&(de=30),te===0||ee===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=te,se.endY=ee,se}else{var he=te/2,ve=ee/2,be=Math.atan2(ee,te),Ne=de-Math.min(Math.cos(be)*de/2,he),Fe=de-Math.min(Math.sin(be)*de/2,ve),se=new go.Geometry,je=new go.PathFigure(Ne,0,!0);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Line,he,.2*ee)),je.add(new go.PathSegment(go.PathSegment.Line,te-Ne,0)),je.add(new go.PathSegment(go.PathSegment.Line,te,Fe)),je.add(new go.PathSegment(go.PathSegment.Line,.8*te,ve)),je.add(new go.PathSegment(go.PathSegment.Line,te,ee-Fe)),je.add(new go.PathSegment(go.PathSegment.Line,te-Ne,ee)),je.add(new go.PathSegment(go.PathSegment.Line,he,.8*ee)),je.add(new go.PathSegment(go.PathSegment.Line,Ne,ee)),je.add(new go.PathSegment(go.PathSegment.Line,0,ee-Fe)),je.add(new go.PathSegment(go.PathSegment.Line,.2*te,ve)),je.add(new go.PathSegment(go.PathSegment.Line,0,Fe).close()),se}}),go.Shape.setFigureParameter("ThinX",0,new zn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;(isNaN(de)||de<0)&&(de=10);var se=new go.Geometry,he=new go.PathFigure(.1*te,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee).close()),se}),go.Shape.setFigureParameter("SquareIBeam",0,new zn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.2);var se=new go.Geometry,he=new go.PathFigure(0,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,de*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5+de/2)*te,de*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5+de/2)*te,(1-de)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,(1-de)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,(1-de)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5-de/2)*te,(1-de)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5-de/2)*te,de*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,de*ee).close()),se}),go.Shape.setFigureParameter("RoundedIBeam",0,new zn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.5);var se=new go.Geometry,he=new go.PathFigure(0,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Bezier,te,ee,Math.abs(1-de)*te,.25*ee,Math.abs(1-de)*te,.75*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,0,de*te,.75*ee,de*te,.25*ee).close()),se}),go.Shape.defineFigureGenerator("HalfEllipse",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,Me*te,0,te,(.5-Me/2)*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,(.5+Me/2)*ee,Me*te,ee).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,0,te,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*te,.75*ee,.5*te,.25*ee).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,.1*te,.8*ee,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,0,0,.45*te,0)).add(new go.PathSegment(go.PathSegment.Bezier,te,.3*ee,.55*te,0,te,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,.5*ee,.9*te,.8*ee).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*te,.01*ee)).add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.6*te,.2*ee,te,.25*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.55*te,.7*ee,te,.8*ee,.6*te,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.75*te,ee,.5*te,.75*ee,.55*te,.95*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*te,ee)).add(new go.PathSegment(go.PathSegment.Bezier,.45*te,.7*ee,.45*te,.95*ee,.5*te,.75*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.4*te,.8*ee,0,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.49*te,.01*ee,0,.25*ee,.4*te,.2*ee).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.4*te,.6*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.15*te,ee,.5*te,.75*ee,.45*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*te,.6*ee,.55*te,.95*ee,.5*te,.75*ee));var he=.2,ve=.3,be=0,Ne=he*Me;return se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5+he+be)*ee,(.5-he+ve)*te,(.5+Ne+be)*ee,(.5-Ne+ve)*te,(.5+he+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+he+ve)*te,(.5+be)*ee,(.5+Ne+ve)*te,(.5+he+be)*ee,(.5+he+ve)*te,(.5+Ne+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5-he+be)*ee,(1-.5+he+ve)*te,(.5-Ne+be)*ee,(.5+Ne+ve)*te,(.5-he+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.65*te,.36771243*ee,(.5-Ne+ve)*te,(.5-he+be)*ee,(.5-he+ve+.05)*te,(.5-Ne+be-.02)*ee)),he=.2,ve=0,be=-.3,Ne=he*Me,se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+he+ve)*te,(.5+be)*ee,(.5+Ne+ve)*te,(.5+he+be)*ee,(.5+he+ve)*te,(.5+Ne+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5-he+be)*ee,(1-.5+he+ve)*te,(.5-Ne+be)*ee,(.5+Ne+ve)*te,(.5-he+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-he+ve)*te,(.5+be)*ee,(.5-Ne+ve)*te,(.5-he+be)*ee,(.5-he+ve)*te,(.5-Ne+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Ne+ve)*te,(.5+he+be)*ee,(.5-he+ve)*te,(.5+Ne+be)*ee,(.5-Ne+ve)*te,(.5+he+be)*ee)),he=.2,ve=-.3,be=0,Ne=he*Me,se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5-he+be)*ee,(1-.5+he+ve-.05)*te,(.5-Ne+be-.02)*ee,(.5+Ne+ve)*te,(.5-he+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-he+ve)*te,(.5+be)*ee,(.5-Ne+ve)*te,(.5-he+be)*ee,(.5-he+ve)*te,(.5-Ne+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5+he+be)*ee,(.5-he+ve)*te,(.5+Ne+be)*ee,(.5-Ne+ve)*te,(.5+he+be)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,.6*ee,(.5+Ne+ve)*te,(.5+he+be)*ee,(.5+he+ve)*te,(.5+Ne+be)*ee).close()),de.setSpots(.06,.33,.93,.68),de}),go.Shape.defineFigureGenerator("YinYang",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*.5,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,te*.5,te*.5,te*.5,te*.5)),se.add(new go.PathSegment(go.PathSegment.Arc,90,-180,te*.5,te*.75,te*.25,te*.25)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,te*.5,te*.25,te*.25,te*.25));var he=.1,ve=.5,be=.25;return se.add(new go.PathSegment(go.PathSegment.Move,(ve+he)*te,be*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,0,-360,te*ve,ee*be,he*te,he*te).close()),se=new go.PathFigure(te*.5,0,!1),de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,-180,te*.5,te*.5,te*.5,te*.5)),be=.75,se=new go.PathFigure((ve+he)*te,be*ee,!0),de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,0,360,te*ve,ee*be,he*te,he*te).close()),de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("Peace",function(Ie,te,ee){var de=.8535533905932737,se=.5*te,he=.5*ee;return new go.Geometry().add(new go.PathFigure(se,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,se,he,se,he)).add(new go.PathSegment(go.PathSegment.Line,se,ee)).add(new go.PathSegment(go.PathSegment.Move,se,he)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,de*ee)).add(new go.PathSegment(go.PathSegment.Move,se,he)).add(new go.PathSegment(go.PathSegment.Line,de*te,de*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=.5,ve=.5,be=.5,Ne=new go.PathFigure(ve*te,(be-he)*ee);de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,be*ee,(ve-se)*te,(be-he)*ee,(ve-he)*te,(be-se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be+he)*ee,(ve-he)*te,(be+se)*ee,(ve-se)*te,(be+he)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,be*ee,(ve+se)*te,(be+he)*ee,(ve+he)*te,(be+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be-he)*ee,(ve+he)*te,(be-se)*ee,(ve+se)*te,(be-he)*ee)),he=.4,se=Me*.4;var Fe=ue(),je=ue(),ze=ue(),Xe=ue();ot(ve,be-he,ve+se,be-he,ve+he,be-se,ve+he,be,.42,Fe,je,ze,Xe,Xe);var Je=ue(),dt=ue(),He=ue();ot(ve,be-he,ve+se,be-he,ve+he,be-se,ve+he,be,.58,Xe,Xe,He,Je,dt);var bt=ue(),et=ue(),It=ue();ot(ve,be+he,ve-se,be+he,ve-he,be+se,ve-he,be,.42,bt,et,It,Xe,Xe);var xt=ue(),Bt=ue(),Ut=ue();return ot(ve,be+he,ve-se,be+he,ve-he,be+se,ve-he,be,.58,Xe,Xe,Ut,xt,Bt),Ne.add(new go.PathSegment(go.PathSegment.Move,Ut.x*te,Ut.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,be*ee,xt.x*te,xt.y*ee,Bt.x*te,Bt.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be-he)*ee,(ve-he)*te,(be-se)*ee,(ve-se)*te,(be-he)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ze.x*te,ze.y*ee,Fe.x*te,Fe.y*ee,je.x*te,je.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,Ut.x*te,Ut.y*ee).close()),Ne.add(new go.PathSegment(go.PathSegment.Move,It.x*te,It.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,He.x*te,He.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,be*ee,Je.x*te,Je.y*ee,dt.x*te,dt.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be+he)*ee,(ve+he)*te,(be+se)*ee,(ve+se)*te,(be+he)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,It.x*te,It.y*ee,bt.x*te,bt.y*ee,et.x*te,et.y*ee).close()),Re(Fe),Re(je),Re(ze),Re(Xe),Re(Je),Re(dt),Re(He),Re(bt),Re(et),Re(It),Re(xt),Re(Bt),Re(Ut),de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("Fragile",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*te,0)).add(new go.PathSegment(go.PathSegment.Line,.2*te,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.29*te,.33*ee)).add(new go.PathSegment(go.PathSegment.Line,.35*te,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*te,.5*ee,te,.25*ee,.75*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.55*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.5*ee,0,.25*ee).close()))}),go.Shape.setFigureParameter("HourGlass",0,new zn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;(isNaN(de)||de<0)&&(de=30),de>te&&(de=te);var se=(te-de)/2,he=se+de;return new go.Geometry().add(new go.PathFigure(he,.5*ee).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,se,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,te,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,.55*ee).add(new go.PathSegment(go.PathSegment.Line,.6*te,0)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.55*ee).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Ie,te,ee){var de=new go.Geometry,se=Me*.4,he=.4,ve=.5,be=.5,Ne=ue(),Fe=ue(),je=ue(),ze=ue(),Xe=new go.PathFigure((ve-he)*te,be*ee,!1);de.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be-he)*ee,(ve-he)*te,(be-se)*ee,(ve-se)*te,(be-he)*ee)),ot(ve,be-he,ve+se,be-he,ve+he,be-se,ve+he,be,.44,je,ze,Fe,Ne,Ne),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Fe.x*te,Fe.y*ee,je.x*te,je.y*ee,ze.x*te,ze.y*ee));var Je=me(Fe.x,Fe.y);ot(ve,be-he,ve+se,be-he,ve+he,be-se,ve+he,be,.56,Ne,Ne,Fe,je,ze);var dt=me(Fe.x,Fe.y);Xe.add(new go.PathSegment(go.PathSegment.Line,(Je.x*.1+.95*.9)*te,Je.y*.1*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.85*te,Je.y*.1*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.85*te,0)),Xe.add(new go.PathSegment(go.PathSegment.Line,te,0)),Xe.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,(dt.x*.1+.9)*te,.15*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,(dt.x*.1+.9)*te,(dt.y*.1+.05*.9)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,dt.x*te,dt.y*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,be*ee,je.x*te,je.y*ee,ze.x*te,ze.y*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be+he)*ee,(ve+he)*te,(be+se)*ee,(ve+se)*te,(be+he)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,be*ee,(ve-se)*te,(be+he)*ee,(ve-he)*te,(be+se)*ee)),he=.35,se=Me*.35;var He=new go.PathFigure(ve*te,(be-he)*ee,!1);de.add(He),He.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,be*ee,(ve-se)*te,(be-he)*ee,(ve-he)*te,(be-se)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be+he)*ee,(ve-he)*te,(be+se)*ee,(ve-se)*te,(be+he)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,be*ee,(ve+se)*te,(be+he)*ee,(ve+he)*te,(be+se)*ee)),He.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be-he)*ee,(ve+he)*te,(be-se)*ee,(ve+se)*te,(be-he)*ee));var bt=new go.PathFigure((ve-he)*te,be*ee,!1);return de.add(bt),Re(Ne),Re(Fe),Re(je),Re(ze),Re(Je),Re(dt),de.spot1=new go.Spot(.202,.257),de.spot2=new go.Spot(.792,.739),de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("GenderFemale",function(Ie,te,ee){var de=new go.Geometry,se=.375,he=0,ve=-.125,be=se*Me,Ne=new go.PathFigure((.525+he)*te,(.5+se+ve)*ee,!1);de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+he)*te,(.5+ve)*ee,(.5+be+he)*te,(.5+se+ve)*ee,(.5+se+he)*te,(.5+be+ve)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*te,(.5-se+ve)*ee,(1-.5+se+he)*te,(.5-be+ve)*ee,(.5+be+he)*te,(.5-se+ve)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+he)*te,(.5+ve)*ee,(.5-be+he)*te,(.5-se+ve)*ee,(.5-se+he)*te,(.5-be+ve)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(.475+he)*te,(.5+se+ve)*ee,(.5-se+he)*te,(.5+be+ve)*ee,(.5-be+he)*te,(.5+se+ve)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.475*te,.85*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.425*te,.85*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.425*te,.9*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.475*te,.9*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.475*te,ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.525*te,ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.525*te,.9*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.575*te,.9*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.575*te,.85*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.525*te,.85*ee).close()),se=.325,he=0,ve=-.125,be=se*Me;var Ne=new go.PathFigure((1-.5+se+he)*te,(.5+ve)*ee,!1);de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*te,(.5+se+ve)*ee,(.5+se+he)*te,(.5+be+ve)*ee,(.5+be+he)*te,(.5+se+ve)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+he)*te,(.5+ve)*ee,(.5-be+he)*te,(.5+se+ve)*ee,(.5-se+he)*te,(.5+be+ve)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*te,(.5-se+ve)*ee,(.5-se+he)*te,(.5-be+ve)*ee,(.5-be+he)*te,(.5-se+ve)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+he)*te,(.5+ve)*ee,(.5+be+he)*te,(.5-se+ve)*ee,(1-.5+se+he)*te,(.5-be+ve)*ee));var Ne=new go.PathFigure((.525+he)*te,(.5+se+ve)*ee,!1);return de.add(Ne),de.spot1=new go.Spot(.232,.136),de.spot2=new go.Spot(.682,.611),de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("LogicImplies",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;return isNaN(de)&&(de=.2),new go.Geometry().add(new go.PathFigure((1-de)*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;return isNaN(de)&&(de=.2),new go.Geometry().add(new go.PathFigure((1-de)*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,de*te,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,de*te,ee))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,te,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Ie,te,ee){var de=new go.Geometry().add(new go.PathFigure(.5*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*te,.5*ee,.5*te,.5*ee)));return de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("LogicTruth",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,.5*te,0)).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,.25*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*te,.5*ee))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Ie,te,ee){var de=.5;return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,0,de*ee)).add(new go.PathSegment(go.PathSegment.Arc,180,180,de*te,de*ee,de*te,de*ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Ie,te,ee){var de=.5;return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,de*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,180,de*te,de*ee,de*te,de*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new zn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new zn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.3);var se=Ie?Ie.parameter2:NaN;isNaN(se)&&(se=.3);var he=(1-de)*te,ve=(.5-se/2)*ee,be=(.5+se/2)*ee,Ne=new go.Geometry,Fe=new go.PathFigure(0,ve,!0);Ne.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Line,he,ve)),Fe.add(new go.PathSegment(go.PathSegment.Line,he,0)),Fe.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),Fe.add(new go.PathSegment(go.PathSegment.Line,he,ee)),Fe.add(new go.PathSegment(go.PathSegment.Line,he,be)),Fe.add(new go.PathSegment(go.PathSegment.Line,0,be).close()),Ne.spot1=new go.Spot(0,ve/ee);var je=Ze(0,be/ee,1,be/ee,he/te,1,1,.5,ue());return Ne.spot2=new go.Spot(je.x,je.y),Re(je),Ne}),go.Shape.setFigureParameter("Arrow2",0,new zn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new zn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=30),de>te&&(de=te);var se=Ie?Ie.parameter2:NaN;isNaN(se)&&(se=30),se=Math.min(se,ee/2);var he=te-de,ve=(ee-se)/2,be=ve+se,Ne=new go.Geometry,Fe=new go.PathFigure(0,ve,!0);Ne.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Line,he,ve)),Fe.add(new go.PathSegment(go.PathSegment.Line,he,0)),Fe.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),Fe.add(new go.PathSegment(go.PathSegment.Line,he,ee)),Fe.add(new go.PathSegment(go.PathSegment.Line,he,be)),Fe.add(new go.PathSegment(go.PathSegment.Line,0,be).close()),Ne.spot1=new go.Spot(0,ve/ee);var je=Ze(0,be/ee,1,be/ee,he/te,1,1,.5,ue());return Ne.spot2=new go.Spot(je.x,je.y),Re(je),Ne}),go.Shape.defineFigureGenerator("Chevron",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee).close()),de}),go.Shape.defineFigureGenerator("DoubleArrow",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.214*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,1*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.786*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,1*ee).close()),de}),go.Shape.setFigureParameter("DoubleEndArrow",0,new zn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.3);var se=(.5-de/2)*ee,he=(.5+de/2)*ee,ve=new go.Geometry,be=new go.PathFigure(te,.5*ee,!0);ve.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),be.add(new go.PathSegment(go.PathSegment.Line,.3*te,he)),be.add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)),be.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),be.add(new go.PathSegment(go.PathSegment.Line,.3*te,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close());var Ne=Ze(0,.5,.3,0,0,se/ee,.1,se/ee,ue());return ve.spot1=new go.Spot(Ne.x,Ne.y),Ne=Ze(.7,1,1,.5,0,he/ee,1,he/ee,Ne),ve.spot2=new go.Spot(Ne.x,Ne.y),Re(Ne),ve}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new zn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new zn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=40);var se=Ie?Ie.parameter2:NaN;isNaN(se)&&(se=100);var he=(ee-de)/2,ve=he+de,be=(ee-se)/2,Ne=be+se;(de>ee||se>ee)&&(se>de?(de=de*ee/se,he=(ee-de)/2,ve=he+de,be=0,Ne=ee):(he=0,ve=ee,be=0,Ne=ee));var Fe=new go.Geometry,je=new go.PathFigure(te,.5*ee,!0);Fe.add(je),je.add(new go.PathSegment(go.PathSegment.Line,.7*te,Ne)),je.add(new go.PathSegment(go.PathSegment.Line,.7*te,ve)),je.add(new go.PathSegment(go.PathSegment.Line,.3*te,ve)),je.add(new go.PathSegment(go.PathSegment.Line,.3*te,Ne)),je.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),je.add(new go.PathSegment(go.PathSegment.Line,.3*te,be)),je.add(new go.PathSegment(go.PathSegment.Line,.3*te,he)),je.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),je.add(new go.PathSegment(go.PathSegment.Line,.7*te,be).close());var ze=Ze(0,.5,.3,be/ee,0,he/ee,1,he/ee,ue());return Fe.spot1=new go.Spot(ze.x,ze.y),ze=Ze(.7,Ne/ee,1,.5,0,ve/ee,1,ve/ee,ze),Fe.spot2=new go.Spot(ze.x,ze.y),Re(ze),Fe}),go.Shape.setFigureParameter("IBeamArrow",0,new zn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.3);var se=(.5-de/2)*ee,he=(.5+de/2)*ee,ve=new go.Geometry,be=new go.PathFigure(te,.5*ee,!0);ve.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),be.add(new go.PathSegment(go.PathSegment.Line,.2*te,he)),be.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),be.add(new go.PathSegment(go.PathSegment.Line,0,ee)),be.add(new go.PathSegment(go.PathSegment.Line,0,0)),be.add(new go.PathSegment(go.PathSegment.Line,.2*te,0)),be.add(new go.PathSegment(go.PathSegment.Line,.2*te,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),ve.spot1=new go.Spot(0,se/ee);var Ne=Ze(.7,1,1,.5,0,he/ee,1,he/ee,ue());return ve.spot2=new go.Spot(Ne.x,Ne.y),Re(Ne),ve}),go.Shape.setFigureParameter("IBeamArrow2",0,new zn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new zn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=40);var se=Ie?Ie.parameter2:NaN;isNaN(se)&&(se=100);var he=(ee-de)/2,ve=he+de,be=(ee-se)/2,Ne=be+se;(de>ee||se>ee)&&(se>de?(de=de*ee/se,he=(ee-de)/2,ve=he+de,be=0,Ne=ee):(he=0,ve=ee,be=0,Ne=ee));var Fe=new go.Geometry,je=new go.PathFigure(te,.5*ee,!0);Fe.add(je),je.add(new go.PathSegment(go.PathSegment.Line,.7*te,Ne)),je.add(new go.PathSegment(go.PathSegment.Line,.7*te,ve)),je.add(new go.PathSegment(go.PathSegment.Line,.2*te,ve)),je.add(new go.PathSegment(go.PathSegment.Line,.2*te,Ne)),je.add(new go.PathSegment(go.PathSegment.Line,0,Ne)),je.add(new go.PathSegment(go.PathSegment.Line,0,be)),je.add(new go.PathSegment(go.PathSegment.Line,.2*te,be)),je.add(new go.PathSegment(go.PathSegment.Line,.2*te,he)),je.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),je.add(new go.PathSegment(go.PathSegment.Line,.7*te,be).close()),Fe.spot1=new go.Spot(0,he/ee);var ze=Ze(.7,Ne/ee,1,.5,0,ve/ee,1,ve/ee,ue());return Fe.spot2=new go.Spot(ze.x,ze.y),Re(ze),Fe}),go.Shape.setFigureParameter("Pointer",0,new zn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.1);var se=new go.Geometry,he=new go.PathFigure(te,.5*ee,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,de*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),se.spot1=new go.Spot(de,.35);var ve=Ze(.2,.65,1,.65,0,1,1,.5,ue());return se.spot2=new go.Spot(ve.x,ve.y),Re(ve),se}),go.Shape.setFigureParameter("RoundedPointer",0,new zn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.3);var se=new go.Geometry,he=new go.PathFigure(te,.5*ee,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,0,de*te,.75*ee,de*te,.25*ee).close()),se.spot1=new go.Spot(de,.35);var ve=Ze(0,.65,1,.65,0,1,1,.5,ue());return se.spot2=new go.Spot(ve.x,ve.y),Re(ve),se}),go.Shape.setFigureParameter("SplitEndArrow",0,new zn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.4);var se=(.5-de/2)*ee,he=(.5+de/2)*ee,ve=new go.Geometry,be=new go.PathFigure(te,.5*ee,!0);ve.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),be.add(new go.PathSegment(go.PathSegment.Line,0,he)),be.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,0,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),ve.spot1=new go.Spot(.2,.3);var Ne=Ze(.7,1,1,.5,0,he/ee,1,he/ee,ue());return ve.spot2=new go.Spot(Ne.x,Ne.y),Re(Ne),ve}),go.Shape.setFigureParameter("SplitEndArrow2",0,new zn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=50);var se=(ee-de)/2,he=se+de;de>ee&&(se=0,he=ee);var ve=new go.Geometry,be=new go.PathFigure(te,.5*ee,!0);ve.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),be.add(new go.PathSegment(go.PathSegment.Line,0,he)),be.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,0,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),be.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),ve.spot1=new go.Spot(.2,se/ee);var Ne=Ze(.7,1,1,.5,0,he/ee,1,he/ee,ue());return ve.spot2=new go.Spot(Ne.x,Ne.y),Re(Ne),ve}),go.Shape.setFigureParameter("SquareArrow",0,new zn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.7);var se=new go.Geometry,he=new go.PathFigure(te,.5*ee,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,de*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,0)),he.add(new go.PathSegment(go.PathSegment.Line,de*te,0).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(de,1),se}),go.Shape.defineFigureGenerator("Cone1",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=Me*.1,ve=new go.PathFigure(0,.9*ee,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+he)*ee,(.5+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+he)*ee).close()),de.spot1=new go.Spot(.25,.5),de.spot2=new go.Spot(.75,.97),de}),go.Shape.defineFigureGenerator("Cone2",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.9*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.9*ee,(1-.85/.9)*te,ee,.85/.9*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee).close());var he=new go.PathFigure(0,.9*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,te,.9*ee,(1-.85/.9)*te,.8*ee,.85/.9*te,.8*ee)),de.spot1=new go.Spot(.25,.5),de.spot2=new go.Spot(.75,.82),de}),go.Shape.defineFigureGenerator("Cube1",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var he=new go.PathFigure(.5*te,ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.5*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),de.spot1=new go.Spot(0,.3),de.spot2=new go.Spot(.5,.85),de}),go.Shape.defineFigureGenerator("Cube2",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.3*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,0).close());var he=new go.PathFigure(0,.3*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.7*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Move,.7*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),de.spot1=new go.Spot(0,.3),de.spot2=new go.Spot(.7,1),de}),go.Shape.defineFigureGenerator("Cylinder1",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=5),de=Math.min(de,ee/3);var se=new go.Geometry,he=Me*.5,ve=new go.PathFigure(0,de,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,Me*de,(.5-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,1*te,de,(.5+he)*te,0,1*te,Me*de)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee-de)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,1*ee,1*te,ee-Me*de,(.5+he)*te,1*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-de,(.5-he)*te,1*ee,0,ee-Me*de)),ve.add(new go.PathSegment(go.PathSegment.Line,0,de));var be=new go.PathFigure(te,de,!1);return se.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,2*de,1*te,2*de-Me*de,(.5+he)*te,2*de)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,de,(.5-he)*te,2*de,0,2*de-Me*de)),se.spot1=new go.Spot(0,0,0,2*de),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder2",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=5),de=Math.min(de,ee/3);var se=new go.Geometry,he=Me*.5,ve=new go.PathFigure(0,ee-de,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,0,de)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,Me*de,(.5-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,de,(.5+he)*te,0,te,Me*de)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee-de)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,ee-Me*de,(.5+he)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-de,(.5-he)*te,ee,0,ee-Me*de));var be=new go.PathFigure(0,ee-de,!1);return se.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee-2*de,0,ee-de-Me*de,(.5-he)*te,ee-2*de)),be.add(new go.PathSegment(go.PathSegment.Bezier,te,ee-de,(.5+he)*te,ee-2*de,te,ee-de-Me*de)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,0,-2*de),se}),go.Shape.defineFigureGenerator("Cylinder3",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=5),de=Math.min(de,te/3);var se=new go.Geometry,he=Me*.5,ve=new go.PathFigure(de,0,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te-de,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,te-Me*de,0,te,(.5-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te-de,ee,te,(.5+he)*ee,te-Me*de,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,de,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Me*de,ee,0,(.5+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,de,0,0,(.5-he)*ee,Me*de,0));var be=new go.PathFigure(de,0,!1);return se.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,2*de,.5*ee,de+Me*de,0,2*de,(.5-he)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,de,ee,2*de,(.5+he)*ee,de+Me*de,ee)),se.spot1=new go.Spot(0,0,2*de,0),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder4",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=5),de=Math.min(de,te/3);var se=new go.Geometry,he=Me*.5,ve=new go.PathFigure(te-de,0,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,te-Me*de,0,te,(.5-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te-de,ee,te,(.5+he)*ee,te-Me*de,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,de,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Me*de,ee,0,(.5+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,de,0,0,(.5-he)*ee,Me*de,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te-de,0));var be=new go.PathFigure(te-de,0,!1);return se.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,te-2*de,.5*ee,te-de-Me*de,0,te-2*de,(.5-he)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,te-de,ee,te-2*de,(.5+he)*ee,te-de-Me*de,ee)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,-2*de,0),se}),go.Shape.defineFigureGenerator("Prism1",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.25*te,.25*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var he=new go.PathFigure(.25*te,.25*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),de.spot1=new go.Spot(.408,.172),de.spot2=new go.Spot(.833,.662),de}),go.Shape.defineFigureGenerator("Prism2",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.25*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var he=new go.PathFigure(0,ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),he.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)),de.spot1=new go.Spot(.25,.5),de.spot2=new go.Spot(.75,.75),de}),go.Shape.defineFigureGenerator("Pyramid1",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee).close());var he=new go.PathFigure(.5*te,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),de.spot1=new go.Spot(.25,.367),de.spot2=new go.Spot(.75,.875),de}),go.Shape.defineFigureGenerator("Pyramid2",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var he=new go.PathFigure(.5*te,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.7*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.5*te,.7*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),de.spot1=new go.Spot(.25,.367),de.spot2=new go.Spot(.75,.875),de}),go.Shape.defineFigureGenerator("Actor",function(Ie,te,ee){var de=new go.Geometry,se=.2,he=.1,ve=Me*se,be=Me*he,Ne=.5,Fe=.1,je=new go.PathFigure(Ne*te,(Fe+he)*ee,!0);de.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-se)*te,Fe*ee,(Ne-ve)*te,(Fe+he)*ee,(Ne-se)*te,(Fe+be)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe-he)*ee,(Ne-se)*te,(Fe-be)*ee,(Ne-ve)*te,(Fe-he)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+se)*te,Fe*ee,(Ne+ve)*te,(Fe-he)*ee,(Ne+se)*te,(Fe-be)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe+he)*ee,(Ne+se)*te,(Fe+be)*ee,(Ne+ve)*te,(Fe+he)*ee));var ze=.05,Xe=Me*ze;Ne=.05,Fe=.25;var Je=new go.PathFigure(.5*te,.2*ee,!0);return de.add(Je),Je.add(new go.PathSegment(go.PathSegment.Line,.95*te,.2*ee)),Ne=.95,Fe=.25,Je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+ze)*te,Fe*ee,(Ne+Xe)*te,(Fe-ze)*ee,(Ne+ze)*te,(Fe-Xe)*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.85*te,.35*ee)),ze=.025,Xe=Me*ze,Ne=.825,Fe=.35,Je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe-ze)*ee,(Ne+ze)*te,(Fe-Xe)*ee,(Ne+Xe)*te,(Fe-ze)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-ze)*te,Fe*ee,(Ne-Xe)*te,(Fe-ze)*ee,(Ne-ze)*te,(Fe-Xe)*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.55*te,ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.55*te,.7*ee)),ze=.05,Xe=Me*ze,Ne=.5,Fe=.7,Je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe-ze)*ee,(Ne+ze)*te,(Fe-Xe)*ee,(Ne+Xe)*te,(Fe-ze)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-ze)*te,Fe*ee,(Ne-Xe)*te,(Fe-ze)*ee,(Ne-ze)*te,(Fe-Xe)*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.45*te,ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.2*te,.35*ee)),ze=.025,Xe=Me*ze,Ne=.175,Fe=.35,Je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe-ze)*ee,(Ne+ze)*te,(Fe-Xe)*ee,(Ne+Xe)*te,(Fe-ze)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-ze)*te,Fe*ee,(Ne-Xe)*te,(Fe-ze)*ee,(Ne-ze)*te,(Fe-Xe)*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ze=.05,Xe=Me*ze,Ne=.05,Fe=.25,Je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe-ze)*ee,(Ne-ze)*te,(Fe-Xe)*ee,(Ne-Xe)*te,(Fe-ze)*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.5*te,.2*ee)),de.spot1=new go.Spot(.2,.2),de.spot2=new go.Spot(.8,.65),de}),go.Shape.setFigureParameter("Card",0,new zn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;isNaN(de)&&(de=.2);var se=new go.Geometry,he=new go.PathFigure(te,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,de*ee)),he.add(new go.PathSegment(go.PathSegment.Line,de*te,0).close()),se.spot1=new go.Spot(0,de),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("Collate",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,.5*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee));var he=new go.PathFigure(.5*te,.5*ee,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),de.spot1=new go.Spot(.25,0),de.spot2=new go.Spot(.75,.25),de}),go.Shape.defineFigureGenerator("CreateRequest",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(0,se*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),ve.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,(1-se)*ee)),de}),go.Shape.defineFigureGenerator("Database",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=Me*.1,ve=new go.PathFigure(te,.1*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+he)*ee,(.5+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,(.1-he)*ee,(.5-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,(.5+se)*te,0,te,(.1-he)*ee));var be=new go.PathFigure(te,.1*ee,!1);return de.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,te,(.1+he)*ee,(.5+se)*te,.2*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*te,.2*ee,0,(.1+he)*ee)),be.add(new go.PathSegment(go.PathSegment.Move,te,.2*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,te,(.2+he)*ee,(.5+se)*te,.3*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*te,.3*ee,0,(.2+he)*ee)),be.add(new go.PathSegment(go.PathSegment.Move,te,.3*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.4*ee,te,(.3+he)*ee,(.5+se)*te,.4*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,(.5-se)*te,.4*ee,0,(.3+he)*ee)),de.spot1=new go.Spot(0,.4),de.spot2=new go.Spot(1,.9),de}),go.Shape.defineFigureGenerator("DataStorage",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*te,ee,te,0,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.9*ee,.25*te,.1*ee).close()),de.spot1=new go.Spot(.226,0),de.spot2=new go.Spot(.81,1),de}),go.Shape.defineFigureGenerator("DiskStorage",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=Me*.1,ve=new go.PathFigure(te,.1*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+he)*ee,(.5+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,(.1-he)*ee,(.5-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,(.5+se)*te,0,te,(.1-he)*ee));var be=new go.PathFigure(te,.1*ee,!1);return de.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,te,(.1+he)*ee,(.5+se)*te,.2*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*te,.2*ee,0,(.1+he)*ee)),be.add(new go.PathSegment(go.PathSegment.Move,te,.2*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,te,(.2+he)*ee,(.5+se)*te,.3*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*te,.3*ee,0,(.2+he)*ee)),de.spot1=new go.Spot(0,.3),de.spot2=new go.Spot(1,.9),de}),go.Shape.defineFigureGenerator("Display",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.25*te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*te,ee,te,0,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close()),de.spot1=new go.Spot(.25,0),de.spot2=new go.Spot(.75,1),de}),go.Shape.defineFigureGenerator("DividedEvent",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;isNaN(se)?se=.2:se<.15&&(se=.15);var he=Me*.2,ve=new go.PathFigure(0,.2*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,0,(.2-he)*ee,(.2-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.2*ee,(.8+he)*te,0,te,(.2-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,ee,te,(.8+he)*ee,(.8+he)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-he)*te,ee,0,(.8+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee));var be=new go.PathFigure(0,se*ee,!1);return de.add(be),be.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),de}),go.Shape.defineFigureGenerator("DividedProcess",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;(isNaN(se)||se<.1)&&(se=.1);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(0,se*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),de}),go.Shape.defineFigureGenerator("Document",function(Ie,te,ee){var de=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*te,.4*ee,.5*te,ee).close()),de.spot1=go.Spot.TopLeft,de.spot2=new go.Spot(1,.6),de}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;(isNaN(se)||se<.2)&&(se=.2);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(se*te,0,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,0,se*ee)),ve.add(new go.PathSegment(go.PathSegment.Move,te,se*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Move,(1-se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,(1-se)*ee)),de}),go.Shape.defineFigureGenerator("ExternalProcess",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var he=new go.PathFigure(.1*te,.4*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.9*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.6*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.4*te,.9*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,.9*ee)),de.spot1=new go.Spot(.25,.25),de.spot2=new go.Spot(.75,.75),de}),go.Shape.defineFigureGenerator("File",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var he=new go.PathFigure(.75*te,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.75*te,.25*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),de.spot1=new go.Spot(0,.25),de.spot2=go.Spot.BottomRight,de}),go.Shape.defineFigureGenerator("Interrupt",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,.5*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee));var he=new go.PathFigure(te,.5*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,ee));var ve=new go.PathFigure(te,.5*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.5,.75),de}),go.Shape.defineFigureGenerator("InternalStorage",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN,he=Ie?Ie.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.1);var ve=new go.PathFigure(0,0,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var be=new go.PathFigure(se*te,0,!1);return de.add(be),be.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),be.add(new go.PathSegment(go.PathSegment.Move,0,he*ee)),be.add(new go.PathSegment(go.PathSegment.Line,te,he*ee)),de}),go.Shape.defineFigureGenerator("Junction",function(Ie,te,ee){var de=new go.Geometry,se=1/Math.SQRT2,he=(1-1/Math.SQRT2)/2,ve=Me*.5,be=.5,Ne=new go.PathFigure(te,be*ee,!0);de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,be*te,ee,te,(be+ve)*ee,(be+ve)*te,ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,0,be*ee,(be-ve)*te,ee,0,(be+ve)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,be*te,0,0,(be-ve)*ee,(be-ve)*te,0)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,te,be*ee,(be+ve)*te,0,te,(be-ve)*ee));var Fe=new go.PathFigure((he+se)*te,(he+se)*ee,!1);return de.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Line,he*te,he*ee)),Fe.add(new go.PathSegment(go.PathSegment.Move,he*te,(he+se)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Line,(he+se)*te,he*ee)),de}),go.Shape.defineFigureGenerator("LinedDocument",function(Ie,te,ee){var de=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*te,.4*ee,.5*te,ee).close());var he=new go.PathFigure(.1*te,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,.75*ee)),de.spot1=new go.Spot(.1,0),de.spot2=new go.Spot(1,.6),de}),go.Shape.defineFigureGenerator("LoopLimit",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),de.spot1=new go.Spot(0,.25),de.spot2=go.Spot.BottomRight,de}),go.Shape.defineFigureGenerator("MagneticTape",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=.5,ve=new go.PathFigure(.5*te,ee,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,he*ee,(he-se)*te,ee,0,(he+se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,0,0,(he-se)*ee,(he-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,he*ee,(he+se)*te,0,te,(he-se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(he+.1)*te,.9*ee,te,(he+se)*ee,(he+se)*te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),de.spot1=new go.Spot(.15,.15),de.spot2=new go.Spot(.85,.8),de}),go.Shape.defineFigureGenerator("ManualInput",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee).close()),de.spot1=new go.Spot(0,.25),de.spot2=go.Spot.BottomRight,de}),go.Shape.defineFigureGenerator("MessageFromUser",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;isNaN(se)&&(se=.7);var he=new go.PathFigure(0,0,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,se*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de.spot1=go.Spot.TopLeft,de}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;isNaN(se)&&(se=.25);var he=new go.PathFigure(0,0,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,se*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,(1-se)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de}),go.Shape.defineFigureGenerator("MicroformRecording",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(1,.75),de}),go.Shape.defineFigureGenerator("MultiDocument",function(Ie,te,ee){var de=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,.44*ee,.96*te,.47*ee,.93*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.54*ee,.86*te,.57*ee,.83*te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.4*te,.4*ee,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,0).close());var he=new go.PathFigure(.1*te,.2*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.54*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.44*ee)),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.8,.77),de}),go.Shape.defineFigureGenerator("MultiProcess",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.1*te,.1*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.2*ee).close());var he=new go.PathFigure(.2*te,.1*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.1*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.9*ee)),de.spot1=new go.Spot(0,.2),de.spot2=new go.Spot(.8,1),de}),go.Shape.defineFigureGenerator("OfflineStorage",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;isNaN(se)&&(se=.1);var he=1-se,ve=new go.PathFigure(0,0,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close());var be=new go.PathFigure(.5*se*te,se*ee,!1);return de.add(be),be.add(new go.PathSegment(go.PathSegment.Line,(1-.5*se)*te,se*ee)),de}),go.Shape.defineFigureGenerator("OffPageConnector",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de.spot1=go.Spot.TopLeft,de.spot2=new go.Spot(.75,1),de}),go.Shape.defineFigureGenerator("Or",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=.5,ve=new go.PathFigure(te,he*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,ee,te,(he+se)*ee,(he+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,he*ee,(he-se)*te,ee,0,(he+se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,0,0,(he-se)*ee,(he-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,he*ee,(he+se)*te,0,te,(he-se)*ee));var be=new go.PathFigure(te,.5*ee,!1);return de.add(be),be.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)),be.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),de}),go.Shape.defineFigureGenerator("PaperTape",function(Ie,te,ee){var de=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.3*ee,.5*te,.6*ee,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*te,.4*ee,.5*te,ee).close()),de.spot1=new go.Spot(0,.49),de.spot2=new go.Spot(1,.75),de}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN,he=Ie?Ie.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.3);var ve=new go.PathFigure(0,0,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN,he=Ie?Ie.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.3);var ve=new go.PathFigure(0,0,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de}),go.Shape.defineFigureGenerator("Procedure",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure((1-se)*te,0,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Move,se*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),de}),go.Shape.defineFigureGenerator("Process",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(se*te,0,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),de.spot2=go.Spot.BottomRight,de}),go.Shape.defineFigureGenerator("Sort",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var he=new go.PathFigure(0,.5*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),de.spot1=new go.Spot(.25,.25),de.spot2=new go.Spot(.75,.5),de}),go.Shape.defineFigureGenerator("Start",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;isNaN(se)&&(se=.25);var he=new go.PathFigure(se*te,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*te,.5*ee,.25*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*te,.5*ee,.25*te,.5*ee));var ve=new go.PathFigure(se*te,0,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Move,(1-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,ee)),de.spot1=new go.Spot(se,0),de.spot2=new go.Spot(1-se,1),de}),go.Shape.defineFigureGenerator("Terminator",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.25*te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*te,.5*ee,.25*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*te,.5*ee,.25*te,.5*ee)),de.spot1=new go.Spot(.23,0),de.spot2=new go.Spot(.77,1),de}),go.Shape.defineFigureGenerator("TransmittalTape",function(Ie,te,ee){var de=new go.Geometry,se=Ie?Ie.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.75*te,(1-se)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,(1-se)*ee).close()),de.spot1=go.Spot.TopLeft,de}),go.Shape.defineFigureGenerator("AndGate",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=new go.PathFigure(0,0,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),he.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(.5+se)*te,0,te,(.5-se)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.5+se)*ee,(.5+se)*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de.spot1=go.Spot.TopLeft,de.spot2=new go.Spot(.55,1),de}),go.Shape.defineFigureGenerator("Buffer",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.5,.75),de}),go.Shape.defineFigureGenerator("Clock",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=.5,ve=new go.PathFigure(te,he*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,ee,te,(he+se)*ee,(he+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,he*ee,(he-se)*te,ee,0,(he+se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,0,0,(he-se)*ee,(he-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,he*ee,(he+se)*te,0,te,(he-se)*ee));var be=new go.PathFigure(te,he*ee,!1);de.add(be),be.add(new go.PathSegment(go.PathSegment.Line,te,he*ee));var Ne=new go.PathFigure(.8*te,.75*ee,!1);return de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,.8*te,.25*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.6*te,.25*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.6*te,.75*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.4*te,.75*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.4*te,.25*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.2*te,.25*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.2*te,.75*ee)),de}),go.Shape.defineFigureGenerator("Ground",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.3*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee)),de}),go.Shape.defineFigureGenerator("Inverter",function(Ie,te,ee){var de=new go.Geometry,se=Me*.1,he=.1,ve=.9,be=.5,Ne=new go.PathFigure(.8*te,.5*ee,!0);de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ne.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee));var Fe=new go.PathFigure((ve+he)*te,be*ee,!0);return de.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be+he)*ee,(ve+he)*te,(be+se)*ee,(ve+se)*te,(be+he)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,be*ee,(ve-se)*te,(be+he)*ee,(ve-he)*te,(be+se)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be-he)*ee,(ve-he)*te,(be-se)*ee,(ve-se)*te,(be-he)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,be*ee,(ve+se)*te,(be-he)*ee,(ve+he)*te,(be-se)*ee)),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.4,.75),de}),go.Shape.defineFigureGenerator("NandGate",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=Me*.4,ve=Me*.1,be=.1,Ne=.9,Fe=.5,je=new go.PathFigure(.8*te,.5*ee,!0);de.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,ee,.8*te,(.5+he)*ee,(.4+se)*te,ee)),je.add(new go.PathSegment(go.PathSegment.Line,0,ee)),je.add(new go.PathSegment(go.PathSegment.Line,0,0)),je.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),je.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(.4+se)*te,0,.8*te,(.5-he)*ee));var ze=new go.PathFigure((Ne+be)*te,Fe*ee,!0);return de.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe+be)*ee,(Ne+be)*te,(Fe+ve)*ee,(Ne+ve)*te,(Fe+be)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-be)*te,Fe*ee,(Ne-ve)*te,(Fe+be)*ee,(Ne-be)*te,(Fe+ve)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe-be)*ee,(Ne-be)*te,(Fe-ve)*ee,(Ne-ve)*te,(Fe-be)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+be)*te,Fe*ee,(Ne+ve)*te,(Fe-be)*ee,(Ne+be)*te,(Fe-ve)*ee)),de.spot1=new go.Spot(0,.05),de.spot2=new go.Spot(.55,.95),de}),go.Shape.defineFigureGenerator("NorGate",function(Ie,te,ee){var de=new go.Geometry,se=.5,he=Me*se,ve=0,be=.5,Ne=new go.PathFigure(.8*te,.5*ee,!0);de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*te,(be+he)*ee,(ve+he)*te,(be+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.75*ee,.25*te,.25*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(ve+he)*te,(be-se)*ee,.7*te,(be-he)*ee)),se=.1,he=Me*.1,ve=.9,be=.5;var Fe=new go.PathFigure((ve-se)*te,be*ee,!0);return de.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be-se)*ee,(ve-se)*te,(be-he)*ee,(ve-he)*te,(be-se)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,be*ee,(ve+he)*te,(be-se)*ee,(ve+se)*te,(be-he)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be+se)*ee,(ve+se)*te,(be+he)*ee,(ve+he)*te,(be+se)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,be*ee,(ve-he)*te,(be+se)*ee,(ve-se)*te,(be+he)*ee)),de.spot1=new go.Spot(.2,.25),de.spot2=new go.Spot(.6,.75),de}),go.Shape.defineFigureGenerator("OrGate",function(Ie,te,ee){var de=new go.Geometry,se=.5,he=Me*se,ve=0,be=.5,Ne=new go.PathFigure(0,0,!0);return de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(ve+he+he)*te,(be-se)*ee,.8*te,(be-he)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*te,(be+he)*ee,(ve+he+he)*te,(be+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.75*ee,.25*te,.25*ee).close()),de.spot1=new go.Spot(.2,.25),de.spot2=new go.Spot(.75,.75),de}),go.Shape.defineFigureGenerator("XnorGate",function(Ie,te,ee){var de=new go.Geometry,se=.5,he=Me*se,ve=.2,be=.5,Ne=new go.PathFigure(.1*te,0,!1);de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,ee,.35*te,.25*ee,.35*te,.75*ee));var Fe=new go.PathFigure(.8*te,.5*ee,!0);de.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,ee,.7*te,(be+he)*ee,(ve+he)*te,(be+se)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,.45*te,.75*ee,.45*te,.25*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(ve+he)*te,(be-se)*ee,.7*te,(be-he)*ee)),se=.1,he=Me*.1,ve=.9,be=.5;var je=new go.PathFigure((ve-se)*te,be*ee,!0);return de.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be-se)*ee,(ve-se)*te,(be-he)*ee,(ve-he)*te,(be-se)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,be*ee,(ve+he)*te,(be-se)*ee,(ve+se)*te,(be-he)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be+se)*ee,(ve+se)*te,(be+he)*ee,(ve+he)*te,(be+se)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,be*ee,(ve-he)*te,(be+se)*ee,(ve-se)*te,(be+he)*ee)),de.spot1=new go.Spot(.4,.25),de.spot2=new go.Spot(.65,.75),de}),go.Shape.defineFigureGenerator("XorGate",function(Ie,te,ee){var de=new go.Geometry,se=.5,he=Me*se,ve=.2,be=.5,Ne=new go.PathFigure(.1*te,0,!1);de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,ee,.35*te,.25*ee,.35*te,.75*ee));var Fe=new go.PathFigure(.2*te,0,!0);return de.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(ve+he)*te,(be-se)*ee,.9*te,(be-he)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,ee,.9*te,(be+he)*ee,(ve+he)*te,(be+se)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,.45*te,.75*ee,.45*te,.25*ee).close()),de.spot1=new go.Spot(.4,.25),de.spot2=new go.Spot(.8,.75),de}),go.Shape.defineFigureGenerator("Capacitor",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de}),go.Shape.defineFigureGenerator("Resistor",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.5*ee)),de}),go.Shape.defineFigureGenerator("Inductor",function(Ie,te,ee){var de=new go.Geometry,se=Me*.1,he=.1,ve=.1,be=.5,Ne=new go.PathFigure((ve-se*.5)*te,ee,!1);return de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.3,Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.5,Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.7,Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.9,Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se*.5)*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),de}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Ie,te,ee){var de=new go.Geometry,se=Me*.5,he=.5,ve=.5,be=.5,Ne=new go.PathFigure((ve-he)*te,be*ee,!1);return de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be-he)*ee,(ve-he)*te,(be-se)*ee,(ve-se)*te,(be-he)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,be*ee,(ve+se)*te,(be-he)*ee,(ve+he)*te,(be-se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be+he)*ee,(ve+he)*te,(be+se)*ee,(ve+se)*te,(be+he)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,be*ee,(ve-se)*te,(be+he)*ee,(ve-he)*te,(be+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Move,(ve-he+.1)*te,be*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he-.1)*te,be*ee,ve*te,(be-he)*ee,ve*te,(be+he)*ee)),de}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de}),go.Shape.defineFigureGenerator("Diode",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.5,.75),de}),go.Shape.defineFigureGenerator("Wifi",function(Ie,te,ee){var de=new go.Geometry,se=te,he=ee;te=te*.38,ee=ee*.6;var ve=Me*.8,be=.8,Ne=0,Fe=.5,je=(se-te)/2,ze=(he-ee)/2,Xe=new go.PathFigure(Ne*te+je,(Fe+be)*ee+ze,!0);de.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-be)*te+je,Fe*ee+ze,(Ne-ve)*te+je,(Fe+be)*ee+ze,(Ne-be)*te+je,(Fe+ve)*ee+ze)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+je,(Fe-be)*ee+ze,(Ne-be)*te+je,(Fe-ve)*ee+ze,(Ne-ve)*te+je,(Fe-be)*ee+ze)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-be+ve*.5)*te+je,Fe*ee+ze,Ne*te+je,(Fe-be)*ee+ze,(Ne-be+ve*.5)*te+je,(Fe-ve)*ee+ze)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+je,(Fe+be)*ee+ze,(Ne-be+ve*.5)*te+je,(Fe+ve)*ee+ze,Ne*te+je,(Fe+be)*ee+ze).close()),ve=Me*.4,be=.4,Ne=.2,Fe=.5;var Je=new go.PathFigure(Ne*te+je,(Fe+be)*ee+ze,!0);de.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-be)*te+je,Fe*ee+ze,(Ne-ve)*te+je,(Fe+be)*ee+ze,(Ne-be)*te+je,(Fe+ve)*ee+ze)),Je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+je,(Fe-be)*ee+ze,(Ne-be)*te+je,(Fe-ve)*ee+ze,(Ne-ve)*te+je,(Fe-be)*ee+ze)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-be+ve*.5)*te+je,Fe*ee+ze,Ne*te+je,(Fe-be)*ee+ze,(Ne-be+ve*.5)*te+je,(Fe-ve)*ee+ze)),Je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+je,(Fe+be)*ee+ze,(Ne-be+ve*.5)*te+je,(Fe+ve)*ee+ze,Ne*te+je,(Fe+be)*ee+ze).close()),ve=Me*.2,be=.2,Ne=.5,Fe=.5;var dt=new go.PathFigure((Ne-be)*te+je,Fe*ee+ze,!0);de.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+je,(Fe-be)*ee+ze,(Ne-be)*te+je,(Fe-ve)*ee+ze,(Ne-ve)*te+je,(Fe-be)*ee+ze)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+be)*te+je,Fe*ee+ze,(Ne+ve)*te+je,(Fe-be)*ee+ze,(Ne+be)*te+je,(Fe-ve)*ee+ze)),dt.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+je,(Fe+be)*ee+ze,(Ne+be)*te+je,(Fe+ve)*ee+ze,(Ne+ve)*te+je,(Fe+be)*ee+ze)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-be)*te+je,Fe*ee+ze,(Ne-ve)*te+je,(Fe+be)*ee+ze,(Ne-be)*te+je,(Fe+ve)*ee+ze)),ve=Me*.4,be=.4,Ne=.8,Fe=.5;var He=new go.PathFigure(Ne*te+je,(Fe-be)*ee+ze,!0);de.add(He),He.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+be)*te+je,Fe*ee+ze,(Ne+ve)*te+je,(Fe-be)*ee+ze,(Ne+be)*te+je,(Fe-ve)*ee+ze)),He.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+je,(Fe+be)*ee+ze,(Ne+be)*te+je,(Fe+ve)*ee+ze,(Ne+ve)*te+je,(Fe+be)*ee+ze)),He.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+be-ve*.5)*te+je,Fe*ee+ze,Ne*te+je,(Fe+be)*ee+ze,(Ne+be-ve*.5)*te+je,(Fe+ve)*ee+ze)),He.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+je,(Fe-be)*ee+ze,(Ne+be-ve*.5)*te+je,(Fe-ve)*ee+ze,Ne*te+je,(Fe-be)*ee+ze).close()),ve=Me*.8,be=.8,Ne=1,Fe=.5;var bt=new go.PathFigure(Ne*te+je,(Fe-be)*ee+ze,!0);return de.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+be)*te+je,Fe*ee+ze,(Ne+ve)*te+je,(Fe-be)*ee+ze,(Ne+be)*te+je,(Fe-ve)*ee+ze)),bt.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+je,(Fe+be)*ee+ze,(Ne+be)*te+je,(Fe+ve)*ee+ze,(Ne+ve)*te+je,(Fe+be)*ee+ze)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+be-ve*.5)*te+je,Fe*ee+ze,Ne*te+je,(Fe+be)*ee+ze,(Ne+be-ve*.5)*te+je,(Fe+ve)*ee+ze)),bt.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te+je,(Fe-be)*ee+ze,(Ne+be-ve*.5)*te+je,(Fe-ve)*ee+ze,Ne*te+je,(Fe-be)*ee+ze).close()),de}),go.Shape.defineFigureGenerator("Email",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var he=new go.PathFigure(0,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Move,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.45*te,.54*ee)),he.add(new go.PathSegment(go.PathSegment.Move,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.55*te,.54*ee)),de}),go.Shape.defineFigureGenerator("Ethernet",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.35*te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,0).close());var he=new go.PathFigure(.1*te,ee,!0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee).close());var ve=new go.PathFigure(.6*te,ee,!0,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,.6*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.6*te,.6*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee).close());var be=new go.PathFigure(0,.5*ee,!1);return de.add(be),be.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Move,.5*te,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),be.add(new go.PathSegment(go.PathSegment.Move,.75*te,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.75*te,.6*ee)),be.add(new go.PathSegment(go.PathSegment.Move,.25*te,.5*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.25*te,.6*ee)),de}),go.Shape.defineFigureGenerator("Power",function(Ie,te,ee){var de=new go.Geometry,se=Me*.4,he=.4,ve=.5,be=.5,Ne=ue(),Fe=ue(),je=ue(),ze=ue();ot(ve,be-he,ve+se,be-he,ve+he,be-se,ve+he,be,.5,Ne,Ne,Fe,je,ze);var Xe=me(Fe.x,Fe.y),Je=new go.PathFigure(Fe.x*te,Fe.y*ee,!0);de.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,be*ee,je.x*te,je.y*ee,ze.x*te,ze.y*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be+he)*ee,(ve+he)*te,(be+se)*ee,(ve+se)*te,(be+he)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,be*ee,(ve-se)*te,(be+he)*ee,(ve-he)*te,(be+se)*ee)),ot(ve-he,be,ve-he,be-se,ve-se,be-he,ve,be-he,.5,je,ze,Fe,Ne,Ne),Je.add(new go.PathSegment(go.PathSegment.Bezier,Fe.x*te,Fe.y*ee,je.x*te,je.y*ee,ze.x*te,ze.y*ee)),se=Me*.3,he=.3,ot(ve-he,be,ve-he,be-se,ve-se,be-he,ve,be-he,.5,je,ze,Fe,Ne,Ne),Je.add(new go.PathSegment(go.PathSegment.Line,Fe.x*te,Fe.y*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,be*ee,ze.x*te,ze.y*ee,je.x*te,je.y*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be+he)*ee,(ve-he)*te,(be+se)*ee,(ve-se)*te,(be+he)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,be*ee,(ve+se)*te,(be+he)*ee,(ve+he)*te,(be+se)*ee)),ot(ve,be-he,ve+se,be-he,ve+he,be-se,ve+he,be,.5,Ne,Ne,Fe,je,ze),Je.add(new go.PathSegment(go.PathSegment.Bezier,Fe.x*te,Fe.y*ee,ze.x*te,ze.y*ee,je.x*te,je.y*ee).close());var Je=new go.PathFigure(.45*te,0,!0);return de.add(Je),Je.add(new go.PathSegment(go.PathSegment.Line,.45*te,.5*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.55*te,.5*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.55*te,0).close()),Re(Ne),Re(Fe),Re(je),Re(ze),Re(Xe),de.spot1=new go.Spot(.25,.45),de.spot2=new go.Spot(.75,.8),de}),go.Shape.defineFigureGenerator("Fallout",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee/2,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,180,360,te/2,ee/2,te/2,ee/2));function he(ve,be,Ne){ve.add(new go.PathSegment(go.PathSegment.Move,(.3+be)*te,(.8+Ne)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.5+be)*te,(.5+Ne)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.1+be)*te,(.5+Ne)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.3+be)*te,(.8+Ne)*ee).close())}return he(se,0,0),he(se,.4,0),he(se,.2,-.3),de}),go.Shape.defineFigureGenerator("IrritationHazard",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.2*te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close()),de.spot1=new go.Spot(.3,.3),de.spot2=new go.Spot(.7,.7),de}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.37*te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.11*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.77*te,.04*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,.49*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.37*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.63*te,.86*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.77*te,.91*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.34*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.34*te,.78*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.44*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,.56*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee).close()),de}),go.Shape.defineFigureGenerator("FireHazard",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.1*te,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.29*te,0,-.25*te,.63*ee,.45*te,.44*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.51*te,.42*ee,.48*te,.17*ee,.54*te,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.59*te,.18*ee,.59*te,.29*ee,.58*te,.28*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*te,.6*ee,.8*te,.34*ee,.88*te,.43*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.88*te,.31*ee,.87*te,.48*ee,.88*te,.43*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,ee,1.17*te,.76*ee,.82*te,.8*ee).close()),de.spot1=new go.Spot(.07,.445),de.spot2=new go.Spot(.884,.958),de}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Ie,te,ee){var de=new go.Geometry,se=.5,he=0,ve=0,be=se*Me,Ne=.4*Math.SQRT2/2+.5,Fe=.5-.5*Math.SQRT2/2,je=1,ze=.5,Xe=.5,Je=0,dt=new go.PathFigure(Ne*te,(1-Fe)*ee,!1);return de.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,je*te,ze*ee,je*te,.7*ee,je*te,ze*ee)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(Xe+he)*te,(Je+he)*ee,(.5+se+he)*te,(.5-be+he)*ee,(.5+be+he)*te,(.5-se+he)*ee)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+he)*te,(.5+ve)*ee,(.5-be+he)*te,(.5-se+ve)*ee,(.5-se+he)*te,(.5-be+ve)*ee)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(.35+he)*te,.9*ee,(.5-se+he)*te,(.5+be+ve)*ee,(.5-be+he)*te,.9*ee)),dt.add(new go.PathSegment(go.PathSegment.Move,(.25+he)*te,.8*ee)),dt.add(new go.PathSegment(go.PathSegment.Line,(.35+he)*te,.9*ee)),dt.add(new go.PathSegment(go.PathSegment.Line,(.2+he)*te,.95*ee)),de}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);de.add(se);var he=new go.PathFigure(te,ee,!1);de.add(he);var ve=new go.PathFigure(0,.5*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.5*ee,.2*te,.35*ee,.3*te,.35*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.7*te,.65*ee,.8*te,.65*ee)),de}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close()),de}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee).close());var se=new go.PathFigure(0,.2*ee,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),de}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.7*te,ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,0,.6*te,.5*ee,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*te,ee,.4*te,.5*ee,te,.5*ee).close());var he=new go.PathFigure(.45*te,.73*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.7*te,.73*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.38*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.63*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.31*te,.27*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.56*te,.27*ee)),de}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);de.add(se);var he=new go.PathFigure(.335*te,(1-.555)*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.335*te,(1-.405)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.405)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.555)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,te,.68*ee,(1-.12)*te,.46*ee,(1-.02)*te,.54*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.335*te,(1-.555)*ee,.02*te,.54*ee,.12*te,.46*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.365*te,(1-.595)*ee));var ve=.5-.285,be=.5,Ne=ve,Fe=Math.PI/4,je=4*(1-Math.cos(Fe))/(3*Math.sin(Fe)),ze=je*.5,Xe=ve,Je=ve,dt=je*Xe,He=je*Je;he.add(new go.PathSegment(go.PathSegment.Bezier,(be-Xe)*te,Ne*ee,(be-(dt+Xe)/2)*te,(Ne+(Je+He)/2)*ee,(be-Xe)*te,(Ne+He)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,be*te,(Ne-Je)*ee,(be-Xe)*te,(Ne-He)*ee,(be-dt)*te,(Ne-Je)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,(be+Xe)*te,Ne*ee,(be+dt)*te,(Ne-Je)*ee,(be+Xe)*te,(Ne-He)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*te,(1-.595)*ee,(be+Xe)*te,(Ne+He)*ee,(be+(dt+Xe)/2)*te,(Ne+(Je+He)/2)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*te,(1-.595)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.555)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.405)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.335*te,(1-.405)*ee));var bt=new go.PathFigure(.2*te,ee,!1);de.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,.2*te,.8*ee));var et=new go.PathFigure(.8*te,ee,!1);return de.add(et),et.add(new go.PathSegment(go.PathSegment.Line,.8*te,.8*ee)),de}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.1*te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee).close());var he=new go.PathFigure(.2*te,.2*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.8*ee)),de}),go.Shape.defineFigureGenerator("BpmnEventError",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,.5*ee).close()),de}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);de.add(se);var he=new go.PathFigure(te,ee,!1);de.add(he);var ve=new go.PathFigure(.1*te,ee,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee).close()),de}),go.Shape.defineFigureGenerator("Caution",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.05*te,ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,.8*ee,0,ee,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.55*te,.1*ee,.5*te,0,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.95*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,ee,te,ee,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*te,ee));var he=.05;return se.add(new go.PathSegment(go.PathSegment.Move,(.5-he)*te,.875*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*te,.875*ee,he*te,he*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.325*ee,.575*te,.725*ee,.625*te,.375*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.75*ee,.375*te,.375*ee,.425*te,.725*ee)),de}),go.Shape.defineFigureGenerator("Recycle",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.45*te,.95*ee,!1);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.185*te,.85*ee,.17*te,.95*ee,.15*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.235*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.625*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.275*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*te,.575*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.1875*te,.95*ee,0,.675*ee,0,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.45*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.775*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.22*te,.775*ee));var he=new go.PathFigure(.475*te,.2*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.225*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.275*te,.175*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.325*te,.05*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,.05*ee,.35*te,0,.375*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.575*te,.375*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.525*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.75*te,.475*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.85*te,.315*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.32*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.65*te,.05*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.575*te,0,.65*te,.05*ee,.625*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.38*te,.0105*ee));var ve=new go.PathFigure(.675*te,.575*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.875*te,.525*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.85*te,.95*ee,te,.8*ee,te,.85*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*te,.95*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.85*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*te,.725*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*te,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.7*te,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Move,.675*te,.575*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.775*te,.775*ee)),de}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Ie,te,ee){var de=new go.Geometry,se=.5,he=Me*.5,ve=new go.PathFigure(te,se*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,se*te,ee,te,(se+he)*ee,(se+he)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-he)*te,ee,0,(se+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,se*te,0,0,(se-he)*ee,(se-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,se*ee,(se+he)*te,0,te,(se-he)*ee));var be=new go.PathFigure(se*te,0,!1);return de.add(be),be.add(new go.PathSegment(go.PathSegment.Line,se*te,.15*ee)),be.add(new go.PathSegment(go.PathSegment.Move,se*te,ee)),be.add(new go.PathSegment(go.PathSegment.Line,se*te,.85*ee)),be.add(new go.PathSegment(go.PathSegment.Move,0,se*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.15*te,se*ee)),be.add(new go.PathSegment(go.PathSegment.Move,te,se*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.85*te,se*ee)),be.add(new go.PathSegment(go.PathSegment.Move,se*te,se*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.58*te,.1*ee)),be.add(new go.PathSegment(go.PathSegment.Move,se*te,se*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.78*te,.54*ee)),de}),go.Shape.defineFigureGenerator("Package",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.15*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var he=new go.PathFigure(0,.15*ee,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,0)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.65*te,.15*ee).close()),de.spot1=new go.Spot(0,.1),de.spot2=new go.Spot(1,1),de}),go.Shape.defineFigureGenerator("Class",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var he=new go.PathFigure(0,.2*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee).close());var ve=new go.PathFigure(0,.5*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee).close()),de}),go.Shape.defineFigureGenerator("Component",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee).close());var he=new go.PathFigure(0,.2*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.45*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.45*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close());var ve=new go.PathFigure(0,.6*ee,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.45*te,.6*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.45*te,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee).close()),de}),go.Shape.defineFigureGenerator("Boat Shipment",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.15*te,.6*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee));var he=new go.PathFigure(.15*te,.6*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),de}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),de}),go.Shape.defineFigureGenerator("Workcell",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de}),go.Shape.defineFigureGenerator("Supermarket",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de}),go.Shape.defineFigureGenerator("TruckShipment",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var he=new go.PathFigure(te,.8*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee).close());var ve=.1,be=Me*.1,Ne=.2,Fe=.9,je=new go.PathFigure((Ne-ve)*te,Fe*ee,!0);de.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe-ve)*ee,(Ne-ve)*te,(Fe-be)*ee,(Ne-be)*te,(Fe-ve)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+ve)*te,Fe*ee,(Ne+be)*te,(Fe-ve)*ee,(Ne+ve)*te,(Fe-be)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe+ve)*ee,(Ne+ve)*te,(Fe+be)*ee,(Ne+be)*te,(Fe+ve)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-ve)*te,Fe*ee,(Ne-be)*te,(Fe+ve)*ee,(Ne-ve)*te,(Fe+be)*ee).close()),ve=.1,be=Me*.1,Ne=.8,Fe=.9;var ze=new go.PathFigure((Ne-ve)*te,Fe*ee,!0);return de.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe-ve)*ee,(Ne-ve)*te,(Fe-be)*ee,(Ne-be)*te,(Fe-ve)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+ve)*te,Fe*ee,(Ne+be)*te,(Fe-ve)*ee,(Ne+ve)*te,(Fe-be)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(Fe+ve)*ee,(Ne+ve)*te,(Fe+be)*ee,(Ne+be)*te,(Fe+ve)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-ve)*te,Fe*ee,(Ne-be)*te,(Fe+ve)*ee,(Ne-ve)*te,(Fe+be)*ee).close()),de}),go.Shape.defineFigureGenerator("KanbanPost",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.2*te,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),de}),go.Shape.defineFigureGenerator("Forklift",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0));var he=new go.PathFigure(0,.5*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var ve=new go.PathFigure(.5*te,.8*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,.8*ee));var be=new go.PathFigure(.5*te,.7*ee,!1);de.add(be),be.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee));var Ne=.1,Fe=Me*.1,je=.1,ze=.9,Xe=new go.PathFigure((je-Ne)*te,ze*ee,!0);de.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,je*te,(ze-Ne)*ee,(je-Ne)*te,(ze-Fe)*ee,(je-Fe)*te,(ze-Ne)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(je+Ne)*te,ze*ee,(je+Fe)*te,(ze-Ne)*ee,(je+Ne)*te,(ze-Fe)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,je*te,(ze+Ne)*ee,(je+Ne)*te,(ze+Fe)*ee,(je+Fe)*te,(ze+Ne)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(je-Ne)*te,ze*ee,(je-Fe)*te,(ze+Ne)*ee,(je-Ne)*te,(ze+Fe)*ee)),Ne=.1,Fe=Me*.1,je=.4,ze=.9;var Je=new go.PathFigure((je-Ne)*te,ze*ee,!0);return de.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,je*te,(ze-Ne)*ee,(je-Ne)*te,(ze-Fe)*ee,(je-Fe)*te,(ze-Ne)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(je+Ne)*te,ze*ee,(je+Fe)*te,(ze-Ne)*ee,(je+Ne)*te,(ze-Fe)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,je*te,(ze+Ne)*ee,(je+Ne)*te,(ze+Fe)*ee,(je+Fe)*te,(ze+Ne)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(je-Ne)*te,ze*ee,(je-Fe)*te,(ze+Ne)*ee,(je-Ne)*te,(ze+Fe)*ee)),de}),go.Shape.defineFigureGenerator("RailShipment",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.1*te,.4*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.4*ee).close());var he=new go.PathFigure(.45*te,.7*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.55*te,.7*ee));var ve=new go.PathFigure(.55*te,.4*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.4*ee).close());var je=.05,ze=Me*.05,Xe=.175,Je=.95,be=new go.PathFigure((Xe-je)*te,Je*ee,!0);de.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Je-je)*ee,(Xe-je)*te,(Je-ze)*ee,(Xe-ze)*te,(Je-je)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(Xe+je)*te,Je*ee,(Xe+ze)*te,(Je-je)*ee,(Xe+je)*te,(Je-ze)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Je+je)*ee,(Xe+je)*te,(Je+ze)*ee,(Xe+ze)*te,(Je+je)*ee)),be.add(new go.PathSegment(go.PathSegment.Bezier,(Xe-je)*te,Je*ee,(Xe-ze)*te,(Je+je)*ee,(Xe-je)*te,(Je+ze)*ee));var je=.05,ze=Me*.05,Xe=.375,Je=.95,Ne=new go.PathFigure((Xe-je)*te,Je*ee,!0);de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Je-je)*ee,(Xe-je)*te,(Je-ze)*ee,(Xe-ze)*te,(Je-je)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Xe+je)*te,Je*ee,(Xe+ze)*te,(Je-je)*ee,(Xe+je)*te,(Je-ze)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Je+je)*ee,(Xe+je)*te,(Je+ze)*ee,(Xe+ze)*te,(Je+je)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Xe-je)*te,Je*ee,(Xe-ze)*te,(Je+je)*ee,(Xe-je)*te,(Je+ze)*ee));var je=.05,ze=Me*.05,Xe=.625,Je=.95,Fe=new go.PathFigure((Xe-je)*te,Je*ee,!0);de.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Je-je)*ee,(Xe-je)*te,(Je-ze)*ee,(Xe-ze)*te,(Je-je)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Xe+je)*te,Je*ee,(Xe+ze)*te,(Je-je)*ee,(Xe+je)*te,(Je-ze)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Je+je)*ee,(Xe+je)*te,(Je+ze)*ee,(Xe+ze)*te,(Je+je)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Xe-je)*te,Je*ee,(Xe-ze)*te,(Je+je)*ee,(Xe-je)*te,(Je+ze)*ee));var je=.05,ze=Me*.05,Xe=.825,Je=.95,dt=new go.PathFigure((Xe-je)*te,Je*ee,!0);de.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Je-je)*ee,(Xe-je)*te,(Je-ze)*ee,(Xe-ze)*te,(Je-je)*ee)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(Xe+je)*te,Je*ee,(Xe+ze)*te,(Je-je)*ee,(Xe+je)*te,(Je-ze)*ee)),dt.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Je+je)*ee,(Xe+je)*te,(Je+ze)*ee,(Xe+ze)*te,(Je+je)*ee)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(Xe-je)*te,Je*ee,(Xe-ze)*te,(Je+je)*ee,(Xe-je)*te,(Je+ze)*ee).close());var He=new go.PathFigure(0,ee,!1);return de.add(He),He.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),de}),go.Shape.defineFigureGenerator("Warehouse",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var he=new go.PathFigure(0,.2*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee).close());var ve=new go.PathFigure(.15*te,ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.15*te,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.4*te,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee).close());var be=.05,Ne=Me*.05,Fe=.35,je=.775,ze=new go.PathFigure((Fe-be)*te,je*ee,!0);return de.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,Fe*te,(je-be)*ee,(Fe-be)*te,(je-Ne)*ee,(Fe-Ne)*te,(je-be)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Fe+be)*te,je*ee,(Fe+Ne)*te,(je-be)*ee,(Fe+be)*te,(je-Ne)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Fe*te,(je+be)*ee,(Fe+be)*te,(je+Ne)*ee,(Fe+Ne)*te,(je+be)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Fe-be)*te,je*ee,(Fe-Ne)*te,(je+be)*ee,(Fe-be)*te,(je+Ne)*ee).close()),de}),go.Shape.defineFigureGenerator("ControlCenter",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee).close()),de}),go.Shape.defineFigureGenerator("Bluetooth",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),de}),go.Shape.defineFigureGenerator("Bookmark",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),de}),go.Shape.defineFigureGenerator("Bookmark",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),de}),go.Shape.defineFigureGenerator("Globe",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.75*te,0,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,.75*ee,.75*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.25*te,ee,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,.25*ee,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,.15*te,.25*ee,.15*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,.85*te,.75*ee,.85*te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*te,.15*ee,.35*te,.3*ee,.65*te,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*te,.85*ee,.35*te,.7*ee,.65*te,.7*ee)),de}),go.Shape.defineFigureGenerator("Wave",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.25*ee,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.25*ee,.1*te,0,.2*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*te,.25*ee,.425*te,.5*ee,.575*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.25*ee,.8*te,0,.9*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.75*ee,.1*te,.5*ee,.2*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*te,.75*ee,.425*te,ee,.575*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.75*ee,.8*te,.5*ee,.9*te,.5*ee)),de}),go.Shape.defineFigureGenerator("Operator",function(Ie,te,ee){var de=new go.Geometry,se=.3,he=Me*.3,ve=.5,be=.7,Ne=new go.PathFigure((ve-se)*te,be*ee,!0);de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be-se)*ee,(ve-se)*te,(be-he)*ee,(ve-he)*te,(be-se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,be*ee,(ve+he)*te,(be-se)*ee,(ve+se)*te,(be-he)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be+se)*ee,(ve+se)*te,(be+he)*ee,(ve+he)*te,(be+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,be*ee,(ve-he)*te,(be+se)*ee,(ve-se)*te,(be+he)*ee));var Fe=new go.PathFigure(0,.7*ee,!1);return de.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,te,.7*ee,0,0,te,0)),de}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.65*ee,.65*te,.3*ee,.65*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,.35*te,.5*ee,.35*te,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.3*te,.6*ee,.1*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.65*ee,.2*te,ee,.35*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,ee,.7*te,.6*ee,.9*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.65*ee,.8*te,ee,.65*te,.95*ee)),de}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,0,.075*ee,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,ee,0,ee,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.4*ee,.8*te,ee,.85*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),de}),go.Shape.defineFigureGenerator("Battery",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.4*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.1*ee));var he=new go.PathFigure(0,.6*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),de}),go.Shape.defineFigureGenerator("Delete",function(Ie,te,ee){var de=new go.Geometry,se=.5,he=Me*.5,ve=.5,be=.5,Ne=new go.PathFigure((ve-se)*te,be*ee,!0);de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be-se)*ee,(ve-se)*te,(be-he)*ee,(ve-he)*te,(be-se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,be*ee,(ve+he)*te,(be-se)*ee,(ve+se)*te,(be-he)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be+se)*ee,(ve+se)*te,(be+he)*ee,(ve+he)*te,(be+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,be*ee,(ve-he)*te,(be+se)*ee,(ve-se)*te,(be+he)*ee));var Fe=new go.PathFigure(.15*te,.5*ee,!1);return de.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Line,.85*te,.5*ee)),de}),go.Shape.defineFigureGenerator("Flag",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.1*ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.1*ee,.15*te,0,.35*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,.65*te,.2*ee,.85*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.5*ee,.85*te,.6*ee,.65*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.35*te,.4*ee,.15*te,.4*ee).close()),de}),go.Shape.defineFigureGenerator("Help",function(Ie,te,ee){var de=new go.Geometry,se=.5,he=Me*.5,ve=.5,be=.5,Ne=new go.PathFigure((ve-se)*te,be*ee,!1);de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be-se)*ee,(ve-se)*te,(be-he)*ee,(ve-he)*te,(be-se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,be*ee,(ve+he)*te,(be-se)*ee,(ve+se)*te,(be-he)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be+se)*ee,(ve+se)*te,(be+he)*ee,(ve+he)*te,(be+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,be*ee,(ve-he)*te,(be+se)*ee,(ve-se)*te,(be+he)*ee).close()),se=.05,he=Me*.05,ve=.5,be=.8;var Fe=new go.PathFigure((ve-se)*te,be*ee,!1);return de.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be-se)*ee,(ve-se)*te,(be-he)*ee,(ve-he)*te,(be-se)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,be*ee,(ve+he)*te,(be-se)*ee,(ve+se)*te,(be-he)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(be+se)*ee,(ve+se)*te,(be+he)*ee,(ve+he)*te,(be+se)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,be*ee,(ve-he)*te,(be+se)*ee,(ve-se)*te,(be+he)*ee).close()),Fe.add(new go.PathSegment(go.PathSegment.Move,.5*te,.7*ee)),Fe.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,.75*te,.475*ee,.75*te,.225*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.35*ee,.4*te,.2*ee,.3*te,.25*ee)),de}),go.Shape.defineFigureGenerator("Location",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,ee,!0).add(new go.PathSegment(go.PathSegment.Line,.75*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,.975*te,.025*ee,.5*te,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*te,.5*ee,.5*te,0,.025*te,.025*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*te,.2*ee)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*te,.3*ee,.1*te,.1*ee).close()))}),go.Shape.defineFigureGenerator("Lock",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var he=new go.PathFigure(.2*te,.5*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.2*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.3*ee,.25*te,0,.75*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.3*ee)),de}),go.Shape.defineFigureGenerator("Unlocked",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var he=new go.PathFigure(.2*te,.5*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.2*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.3*ee,.25*te,0,.75*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.35*ee)),de}),go.Shape.defineFigureGenerator("Gear",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(.9375*te,.56246875*ee,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*te,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.80621875*te,.4375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.763*te,.3316875*ee,.79840625*te,.39915625*ee,.7834375*te,.3635*ee)).add(new go.PathSegment(go.PathSegment.Line,.8566875*te,.23796875*ee)).add(new go.PathSegment(go.PathSegment.Line,.76825*te,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.67596875*te,.24184375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*te,.19378125*ee,.64228125*te,.2188125*ee,.603875*te,.2021875*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*te,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*te,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*te,.19378125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*te,.239375*ee,.39759375*te,.20190625*ee,.36053125*te,.2176875*ee)).add(new go.PathSegment(go.PathSegment.Line,.2379375*te,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.14953125*te,.2379375*ee)).add(new go.PathSegment(go.PathSegment.Line,.23934375*te,.3278125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*te,.4375*ee,.21765625*te,.36059375*ee,.201875*te,.397625*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*te,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*te,.5625*ee)).add(new go.PathSegment(go.PathSegment.Line,.1938125*te,.5625*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*te,.67596875*ee,.20221875*te,.603875*ee,.21884375*te,.64228125*ee)).add(new go.PathSegment(go.PathSegment.Line,.1495625*te,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.238*te,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.3316875*te,.76296875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*te,.80621875*ee,.36353125*te,.78340625*ee,.3991875*te,.79840625*ee)).add(new go.PathSegment(go.PathSegment.Line,.43753125*te,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*te,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*te,.80621875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*te,.760625*ee,.602375*te,.79809375*ee,.63946875*te,.78234375*ee)).add(new go.PathSegment(go.PathSegment.Line,.76828125*te,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.85671875*te,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.76065625*te,.67221875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*te,.56246875*ee,.78234375*te,.63940625*ee,.798125*te,.602375*ee)).add(new go.PathSegment(go.PathSegment.Line,.9375*te,.56246875*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*te,.5*ee,.1*te,.1*ee).close()))}),go.Shape.defineFigureGenerator("Hand",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,.3*ee,0,.375*ee,.05*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.45*te,.075*ee,.3*te,.225*ee,.4*te,.175*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.525*te,.075*ee,.46*te,.05*ee,.525*te,.05*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.4*ee,.525*te,.275*ee,.475*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,.55*ee,te,.4*ee,te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.425*te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*te,.7*ee,.675*te,.55*ee,.675*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.575*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.575*te,.85*ee,.65*te,.7*ee,.65*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.525*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.535*te,ee,.61*te,.85*ee,.61*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,.435*te,ee,0,ee).close()),de}),go.Shape.defineFigureGenerator("Map",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),se.add(new go.PathSegment(go.PathSegment.Move,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.8*ee)),de}),go.Shape.defineFigureGenerator("Eject",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.7)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.7).close());var he=new go.PathFigure(0,ee*.6,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,0).close()),de}),go.Shape.defineFigureGenerator("Pencil",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*te,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.1*te,.2*ee).close()))}),go.Shape.defineFigureGenerator("Building",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*1,ee*1,!1);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*te,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*te,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.046*te,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*te,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*te,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*te,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.85).close());var he=new go.PathFigure(.126*te,.85*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.126*te,.45*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.322*te,.45*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.322*te,.85*ee).close());var ve=new go.PathFigure(.402*te,.85*ee,!1);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.402*te,.45*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.598*te,.45*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.598*te,.85*ee).close());var be=new go.PathFigure(.678*te,.85*ee,!1);de.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.678*te,.45*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.874*te,.45*ee)),be.add(new go.PathSegment(go.PathSegment.Line,.874*te,.85*ee).close());var Ne=new go.PathFigure(.5*te,.1*ee,!1);return de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*te,.3*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*te,.3*ee).close()),de}),go.Shape.defineFigureGenerator("Staircase",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*.8)),se.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.8)),se.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.6)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.6)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.4)),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.4)),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.2)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.2)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.15)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.15)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.95).close()),de}),go.Shape.defineFigureGenerator("5Bars",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.184,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.184,ee*(1-.184)).close());var he=new go.PathFigure(te*.204,ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.204,ee*(1-.184))),he.add(new go.PathSegment(go.PathSegment.Line,te*.388,ee*(1-.184*2))),he.add(new go.PathSegment(go.PathSegment.Line,te*.388,ee*1).close());var ve=new go.PathFigure(te*.408,ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.408,ee*(1-.184*2))),ve.add(new go.PathSegment(go.PathSegment.Line,te*.592,ee*(1-.184*3))),ve.add(new go.PathSegment(go.PathSegment.Line,te*.592,ee*1).close());var be=new go.PathFigure(te*.612,ee,!0);de.add(be),be.add(new go.PathSegment(go.PathSegment.Line,te*.612,ee*(1-.184*3))),be.add(new go.PathSegment(go.PathSegment.Line,te*.796,ee*(1-.184*4))),be.add(new go.PathSegment(go.PathSegment.Line,te*.796,ee*1).close());var Ne=new go.PathFigure(te*.816,ee,!0);return de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,te*.816,ee*(1-.184*4))),Ne.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-.184*5))),Ne.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1).close()),de}),go.Shape.defineFigureGenerator("PC",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,0).close());var he=new go.PathFigure(te*.055,.07*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.07)),he.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.1)),he.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.1).close());var ve=new go.PathFigure(te*.055,.13*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.13)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.16)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.16).close());var be=new go.PathFigure(te*.055,.18*ee,!0);de.add(be),be.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.18)),be.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.21)),be.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.21).close());var Ne=new go.PathFigure(te*1,0,!0);return de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,te*.4,0)),Ne.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.65)),Ne.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.65).close()),de}),go.Shape.defineFigureGenerator("Plane",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(.55*te,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.475*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.35*te,.525*ee,0,.4*ee,.225*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.475*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,.2*ee,.975*te,0,te,.08*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.55*te,ee).close()),de}),go.Shape.defineFigureGenerator("Key",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*1,ee*.5,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.9,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.7,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.85,.575*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.9,.6*ee).close()),se.add(new go.PathSegment(go.PathSegment.Move,.17*te,.425*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*te,.5*ee,.075*te,.075*ee).close()),de}),go.Shape.defineFigureGenerator("FilmTape",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,te*0,te*.3,te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.08,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.08,ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*1),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*1),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*2),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*2),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*3),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*3),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*4),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*4),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*5),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*5),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*6),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*6),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*7),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*7),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*8),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*8),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*9),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*9),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*10),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*10),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*11),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*11),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*12),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*12),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*13),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*13),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*14),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*14),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*15),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*15),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1));var he=new go.PathFigure(0,0,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*0)),he.add(new go.PathSegment(go.PathSegment.Arc,270,-180,te*1,te*.3,te*.055)),he.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1));var ve=new go.PathFigure(te*.11,ee*.1,!1);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*0),ee*.1)),ve.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*0),ee*.8)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.11,ee*.8).close());var be=new go.PathFigure(te*(.11+.24133333*1+.028*1),ee*.1,!1);de.add(be),be.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*1),ee*.1)),be.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*1),ee*.8)),be.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*1),ee*.8).close());var Ne=new go.PathFigure(te*(.11+.24133333*2+.028*2),ee*.1,!1);return de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*3+.028*2),ee*.1)),Ne.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*3+.028*2),ee*.8)),Ne.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*2),ee*.8).close()),de}),go.Shape.defineFigureGenerator("FloppyDisk",function(Ie,te,ee){var de=new go.Geometry,se=8,he=se*Me,ve=new go.PathFigure(se,0,!1);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.86,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.14)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te-se,ee,te,ee-he,te-he,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,se,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-se,he,ee,0,ee-he)),ve.add(new go.PathSegment(go.PathSegment.Line,0,se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,he,he,0).close());var be=new go.PathFigure(te*.83,0,!1);de.add(be),be.add(new go.PathSegment(go.PathSegment.Line,te*.83,ee*.3)),be.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*.3)),be.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*0).close());var Ne=new go.PathFigure(te*.83,ee*1,!1);de.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,te*.83,ee*.5)),Ne.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*.5)),Ne.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*1).close());var Fe=new go.PathFigure(te*.78,ee*.05,!1);return de.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.05)),Fe.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.25)),Fe.add(new go.PathSegment(go.PathSegment.Line,te*.78,ee*.25).close()),de}),go.Shape.defineFigureGenerator("SpeechBubble",function(Ie,te,ee){var de=Ie?Ie.parameter1:NaN;(isNaN(de)||de<0)&&(de=15),de=Math.min(de,te/3),de=Math.min(de,ee/3);var se=de*Me,he=ee*.8,ve=new go.Geometry,be=new go.PathFigure(de,0,!0);return ve.add(be),be.add(new go.PathSegment(go.PathSegment.Line,te-de,0)),be.add(new go.PathSegment(go.PathSegment.Bezier,te,de,te-se,0,te,se)),be.add(new go.PathSegment(go.PathSegment.Line,te,he-de)),be.add(new go.PathSegment(go.PathSegment.Bezier,te-de,he,te,he-se,te-se,he)),be.add(new go.PathSegment(go.PathSegment.Line,te*.7,he)),be.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee)),be.add(new go.PathSegment(go.PathSegment.Line,te*.55,he)),be.add(new go.PathSegment(go.PathSegment.Line,de,he)),be.add(new go.PathSegment(go.PathSegment.Bezier,0,he-de,se,he,0,he-se)),be.add(new go.PathSegment(go.PathSegment.Line,0,de)),be.add(new go.PathSegment(go.PathSegment.Bezier,de,0,0,se,se,0).close()),se>1?(ve.spot1=new go.Spot(0,0,se,se),ve.spot2=new go.Spot(1,.8,-se,-se)):(ve.spot1=go.Spot.TopLeft,ve.spot2=new go.Spot(1,.8)),ve}),go.Shape.defineFigureGenerator("Repeat",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*.45,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*.45).close());var he=new go.PathFigure(te*1,ee*.55,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*1)),he.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.55)),he.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*.55)),he.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*.1)),he.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.1)),he.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*0)),he.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),he.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.55).close()),de}),go.Shape.defineFigureGenerator("Windows",function(Ie,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()).add(new go.PathSegment(go.PathSegment.Move,.4*te,.4*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*te,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.2*te,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,.2*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.1*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.1*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.1*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*.1,!1);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*.9).close());var he=new go.PathFigure(te*.1,ee*.2,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.25)),he.add(new go.PathSegment(go.PathSegment.Line,te*.22,ee*.285)),he.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.32)),he.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.37)),he.add(new go.PathSegment(go.PathSegment.Line,te*.275,ee*.32)),he.add(new go.PathSegment(go.PathSegment.Line,te*.275,ee*.25).close());var ve=new go.PathFigure(te*.28,ee*.37,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.37)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.41)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.28,ee*.41).close()),de}),go.Shape.defineFigureGenerator("Beaker",function(Ie,te,ee){var de=new go.Geometry,se=15,he=se*Me,ve=new go.PathFigure(te*.62,ee*.475,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te-se,ee,te,ee-he,te-he,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,se,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-se,he,ee,0,ee-he)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.38,ee*.475)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.38,ee*.03)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*0)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*0)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.62,ee*.03).close()),he>1?(de.spot1=new go.Spot(0,0,he,he),de.spot2=new go.Spot(1,1,-he,-he)):(de.spot1=go.Spot.TopLeft,de.spot2=go.Spot.BottomRight),de}),go.Shape.defineFigureGenerator("Download",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);de.add(se);var he=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.93,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*(1-he)).close());var ve=new go.PathFigure(te*.4,ee*0,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.26,ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.66)),ve.add(new go.PathSegment(go.PathSegment.Line,te*(1-.26),ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*0).close()),de}),go.Shape.defineFigureGenerator("Bin",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);de.add(se);var he=.1/.3;return se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.93,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*(1-he)).close()),de}),go.Shape.defineFigureGenerator("Upload",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);de.add(se);var he=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.93,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*(1-he)).close());var ve=new go.PathFigure(te*.5,ee*0,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.26,ee*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.63)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.63)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.74,ee*.25).close()),de}),go.Shape.defineFigureGenerator("EmptyDrink",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*.15,ee*0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.85,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*1).close()),de}),go.Shape.defineFigureGenerator("Drink",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*.15,ee*0,!1);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.85,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*1).close());var he=new go.PathFigure(te*.235,ee*.28,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.765,ee*.28)),he.add(new go.PathSegment(go.PathSegment.Line,te*.655,ee*.97)),he.add(new go.PathSegment(go.PathSegment.Line,te*.345,ee*.97).close()),de}),go.Shape.defineFigureGenerator("4Arrows",function(Ie,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*.5,ee*0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.5)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.65)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.65)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*.5)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.25).close()),de}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},98598:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var zn={},En="5.0",me={},ue=null,Re=!1,Ze=!1,ot=null,We=!1,lt=null,Me=null,Mt=0;Mt<arguments.length;Mt++){var Ct=arguments[Mt];if(Ct!==null)switch(typeof Ct){case"number":En=Ct.toFixed(1);break;case"string":Ct.match(new RegExp("^[0-9]\\.[0-9]+$"))?En=Ct:ot=Ct;break;case"object":typeof Ct.is3D!="undefined"?ue=Ct:me=Ct;break;case"boolean":Re=Ct,Ze=!0;break}}ue===null&&(ue={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},me.material_id!==void 0&&!Ze&&(Re=!0)),ot!==null&&me.id===void 0&&(me.id=ot);var Ye="",st="",pt=!1,wt=null,Ie=null,te=null,ee=!1,de=null,se=null,he=null,ve=null,be=null;me.height!==void 0&&(me.height=Math.round(me.height)),me.width!==void 0&&(me.width=Math.round(me.width));var Ne=function(zt){return parseFloat(zt)>4?parseFloat(zt):5};zn.setHTML5Codebase=function(zt,rn){Me=zt,Tt(zt,rn)},zn.setJavaCodebase=zn.setJavaCodebaseVersion=zn.isCompiledInstalled=zn.setPreCompiledScriptPath=zn.setPreCompiledResourcePath=function(){},zn.setHTML5CodebaseVersion=function(zt,rn){var xn=parseFloat(zt);if(xn!==NaN&&xn<5){console.log("The GeoGebra HTML5 codebase version "+xn+" is deprecated. Using version latest instead.");return}lt=zt,Ke(zt,rn)},zn.getHTML5CodebaseVersion=function(){return Ie},zn.getParameters=function(){return me},zn.setFontsCSSURL=function(zt){ve=zt},zn.setGiacJSURL=function(zt){},zn.setJNLPFile=function(zt){Ye=zt},zn.setJNLPBaseDir=function(zt){},zn.inject=function(){function zt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var rn="auto",xn=me.id,Un,yn=!1,sn=0;sn<arguments.length;sn++){var Lt=arguments[sn];typeof Lt=="string"?(Lt=Lt.toLowerCase(),Lt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?rn=Lt:xn=arguments[sn]):typeof Lt=="boolean"?yn=Lt:Lt instanceof HTMLElement&&(Un=Lt)}ti();function ti(){if(!We){setTimeout(ti,200);return}rn=Nt(rn);var gi=Un||document.getElementById(xn);if(!gi){console.log("possibly bug on ajax loading? ");return}if(zn.removeExistingApplet(gi,!1),me.width===void 0&&gi.clientWidth&&(me.width=gi.clientWidth),me.height===void 0&&gi.clientHeight&&(me.height=gi.clientHeight),!(me.width&&me.height)&&rn==="html5"&&(delete me.width,delete me.height),wt=rn,rn==="screenshot")et(gi,me);else{var Pn=!1;me.hasOwnProperty("playButton")&&me.playButton||me.hasOwnProperty("clickToLoad")&&me.clickToLoad?Pn=!0:me.hasOwnProperty("playButtonAutoDecide")&&me.playButtonAutoDecide&&(Pn=(!Fe()||zt())&&je()),Pn?(wt="screenshot",xt(gi,me,yn,rn)):bt(gi,me,yn)}}};function Fe(){try{return window.self!==window.top}catch(zt){return!0}}function je(){return me.hasOwnProperty("screenshotGenerator")&&me.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}zn.getViews=function(){return ue},zn.isJavaInstalled=function(){return!1};var ze=function(zt){var rn=function(sn){var Lt=JSON.parse(sn),ti=function(Xt){return Xt.type=="G"||Xt.type=="E"},gi=Lt.elements?Lt.elements.filter(ti)[0]:Lt;if(!gi||!gi.url){xn();return}me.fileName=gi.url,Xe(gi.settings||{}),ue.is3D=!0;var Pn="https://www.geogebra.org/images/";zn.setPreviewImage(de||gi.previewUrl,Pn+"GeoGebra_loading.png",Pn+"applet_play.png"),zt()},xn=function(){me.onError&&me.onError(),Ln("Error: Fetching material (id "+me.material_id+") failed.",me)},Un=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",yn="/materials/"+me.material_id+"?scope=basic";Je("https://"+Un+"/api/proxy.php?path="+encodeURIComponent(yn),rn,xn)};function Xe(zt){var rn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(xn){zt[xn]=!!zt[xn]}),rn.forEach(function(xn){me[xn]===void 0&&zt[xn]!==void 0&&(me[xn]=zt[xn])}),me.showToolBarHelp===void 0&&(me.showToolBarHelp=me.showToolBar)}function Je(zt,rn,xn){var Un=new XMLHttpRequest;Un.open("GET",zt),Un.onload=function(){rn(Un.responseText)},Un.onerror=xn,Un.send()}zn.isHTML5Installed=function(){return!0},zn.getLoadedAppletType=function(){return wt},zn.setPreviewImage=function(zt,rn,xn){de=zt,se=rn,he=xn},zn.removeExistingApplet=function(zt,rn){var xn;typeof zt=="string"&&(zt=document.getElementById(zt)),wt=null;var Un=null;for(xn=0;xn<zt.childNodes.length;xn++){var yn=zt.childNodes[xn],sn=yn.className;sn==="applet_screenshot"?rn?(yn.style.display="block",wt="screenshot"):yn.style.display="none":sn!=="applet_scaler prerender"&&(zt.removeChild(yn),Un=sn&&sn.indexOf("appletParameters")!=-1?yn.id:null,xn--)}var Lt=me.id!==void 0?me.id:Un,ti=window[Lt];ti&&typeof ti.getBase64=="function"&&(ti.remove(),window[Lt]=null)},zn.refreshHitPoints=function(){if(Ne(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var zt=zn.getAppletObject();return zt&&typeof zt.recalculateEnvironments=="function"?(zt.recalculateEnvironments(),!0):!1},zn.startAnimation=function(){var zt=zn.getAppletObject();return zt&&typeof zt.startAnimation=="function"?(zt.startAnimation(),!0):!1},zn.stopAnimation=function(){var zt=zn.getAppletObject();return zt&&typeof zt.stopAnimation=="function"?(zt.stopAnimation(),!0):!1},zn.getAppletObject=function(){var zt=me.id!==void 0?me.id:"ggbApplet";return window[zt]},zn.resize=function(){};var dt=function(zt,rn,xn){var Un=document.createElement("param");Un.setAttribute("name",rn),Un.setAttribute("value",xn),zt.appendChild(Un)},He=function(zt){return zt&&zt!=="false"},bt=function(zt,rn,xn){Ne(Ie)<=4.2&&(xn=!0);var Un=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Ie||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(Un=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var yn=document.createElement("div");yn.classList.add("appletParameters","notranslate");var sn=rn.width,Lt=rn.height;if(rn.disableAutoScale=rn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():rn.disableAutoScale,rn.width!==void 0)if(Ne(Ie)<=4.4)He(rn.showToolBar)&&(rn.height-=7),He(rn.showAlgebraInput)&&(rn.height-=37),rn.width<605&&He(rn.showToolBar)&&(rn.width=605,sn=605);else{var ti=100;(He(rn.showToolBar)||He(rn.showMenuBar))&&(rn.hasOwnProperty("customToolBar")&&(rn.customToolbar=rn.customToolBar),ti=He(rn.showMenuBar)?245:155),sn<ti&&(rn.width=ti,sn=ti)}yn.style.border="none",yn.style.display="inline-block";for(var gi in rn)rn.hasOwnProperty(gi)&&gi!=="appletOnLoad"&&yn.setAttribute("data-param-"+gi,rn[gi]);ve&&yn.setAttribute("data-param-fontscssurl",ve),zn.resize=function(){GGBAppletUtils.responsiveResize(zt,rn)},window.addEventListener("resize",function(ye){zn.resize()});var Pn=typeof rn.appletOnLoad=="function"?rn.appletOnLoad:function(){};if(!xn&&rn.width!==void 0){rn.hasOwnProperty("showSplash")||yn.setAttribute("data-param-showSplash","false");var Xt=zt.querySelector(".applet_scaler.prerender"),Kt=Xt!==null;if(Kt)var Ot=Xt.querySelector(".ggb_preview");else{var Ot=Ut(sn,Lt,rn.borderColor,!1);Xt=document.createElement("div"),Xt.className="applet_scaler",Xt.style.position="relative",Xt.style.display="block",Xt.style.width=sn+"px",Xt.style.height=Lt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Xt,"66%"),Ne(Ie)>=5?(rn.appletOnLoad=function(ye){var ke=zt.querySelector(".ggb_preview");ke&&ke.parentNode.removeChild(ke),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Xt),window.GGBT_wsf_view&&$(window).trigger("resize"),Pn(ye)},Kt||Xt.appendChild(Ot)):yn.appendChild(Ot),Xt.appendChild(yn),Kt||zt.appendChild(Xt),setTimeout(function(){zn.resize()},1)}else{var rt=document.createElement("div");rt.className="applet_scaler",rt.style.position="relative",rt.style.display="block",rt.appendChild(yn),zt.appendChild(rt),rn.appletOnLoad=function(ye){zn.resize(),Pn(ye)}}function Ue(ye,ke){ke&&typeof ke.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(ye,ke.appletOnLoad):renderGGBElement(ye),Ln("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",ke)}function $t(ye,ke){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:ye,params:ke}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function($e){Ue($e.article,$e.params)}),html5AppletsToProcess=null)},Ne(Ie)<5&&(ye.className+=" geogebraweb")):Ue(ye,ke)}if(Un){scriptLoadStarted=!0;for(var Gt=0;Gt<yn.childNodes.length;Gt++){var it=yn.childNodes[Gt].tagName;it==="TABLE"&&(yn.removeChild(yn.childNodes[Gt]),Gt--)}if(ggbHTML5LoadedScript!==null){var at=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');at!=null&&at.parentNode.removeChild(at)}var Te=document.createElement("script"),Pe=function(){$t(yn,rn)};Te.src=st+te,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=Ie,ggbHTML5LoadedScript=Te.src,Ln("GeoGebra HTML5 codebase loaded: '"+st+"'.",rn),!Me&&(!lt||lt=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Pe()):st.requirejs?__webpack_require__.e(7374).then(function(){var ye=[__webpack_require__(97374)];Pe.apply(null,ye)}.bind(this)).catch(__webpack_require__.oe):(Te.onload=Pe,zt.appendChild(Te))}else $t(yn,rn);rn.height=Lt,rn.width=sn},et=function(zt,rn,xn){var Un=Ut(rn.width,rn.height,rn.borderColor,xn),yn=document.createElement("div");yn.style.position="relative",yn.style.display="block",yn.style.width=rn.width+"px",yn.style.height=rn.height+"px",yn.className="applet_screenshot applet_scaler"+(xn?" applet_screenshot_play":""),yn.appendChild(Un);var sn=GGBAppletUtils.getScale(rn,zt,xn);xn?(zt.appendChild(Bt()),window.GGBT_wsf_view||(zt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(yn,"66%"),zt.appendChild(yn),sn!==1&&!isNaN(sn)&&(GGBAppletUtils.scaleElement(yn,sn),yn.style.width=rn.width+"px",yn.style.height=rn.height+"px",yn.parentNode.style.width=rn.width*sn+"px",yn.parentNode.style.height=rn.height*sn+"px"),zn.resize=function(){It(zt,Un,yn,xn)},window.addEventListener("resize",function(Lt){zn.resize()}),zn.resize()};function It(zt,rn,xn,Un){if(zt.contains(rn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(zt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(zt)}var yn=GGBAppletUtils.getScale(me,zt,Un);xn.parentNode!==null&&(!isNaN(yn)&&yn!==1?(GGBAppletUtils.scaleElement(xn,yn),xn.parentNode.style.width=me.width*yn+"px",xn.parentNode.style.height=me.height*yn+"px"):(GGBAppletUtils.scaleElement(xn,1),xn.parentNode.style.width=me.width+"px",xn.parentNode.style.height=me.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(zt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}zn.onExitFullscreen=function(zt,rn){rn.appendChild(zt)};var xt=function(zt,rn,xn,Un){et(zt,rn,!0);for(var yn=function(){var ti=[];for(Lt=0;Lt<zt.childNodes.length;Lt++)ti.push(zt.childNodes[Lt]);if(window.GGBT_wsf_view){var gi=window.GGBT_wsf_view.renderFullScreen(zt,rn.id),Pn=document.getElementById("fullscreencontainer"),Xt=jQuery(zt).find(".fullscreencontent");Xt.length>0?(gi.remove(),Xt.attr("id","fullscreencontent").show(),jQuery(Pn).append(Xt),window.dispatchEvent(new Event("resize"))):bt(gi,rn,!1),window.GGBT_wsf_view.launchFullScreen(Pn)}else wt=Un,bt(zt,rn,!1);if(!window.GGBT_wsf_view)for(Lt=0;Lt<ti.length;Lt++)zt.removeChild(ti[Lt])},sn=zt.getElementsByClassName("ggb_preview_play"),Lt=0;Lt<sn.length;Lt++)sn[Lt].addEventListener("click",yn,!1),sn[Lt].addEventListener("ontouchstart",yn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(zt),je()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Bt=function(){var zt=document.createElement("div");if(zt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var rn='.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");}',xn=document.createElement("style");xn.styleSheet?xn.styleSheet.cssText=rn:xn.appendChild(document.createTextNode(rn)),document.getElementsByTagName("head")[0].appendChild(xn)}return zt},Ut=function(zt,rn,xn,Un){var yn=document.createElement("div");yn.className="ggb_preview",yn.style.position="absolute",yn.style.zIndex="90",yn.style.width=zt-2+"px",yn.style.height=rn-2+"px",yn.style.top="0px",yn.style.left="0px",yn.style.overflow="hidden",yn.style.backgroundColor="white";var sn="lightgrey";xn!==void 0&&(xn==="none"?sn="transparent":sn=xn),yn.style.border="1px solid "+sn;var Lt=document.createElement("img");if(Lt.style.position="relative",Lt.style.zIndex="1000",Lt.style.top="-1px",Lt.style.left="-1px",de!==null&&Lt.setAttribute("src",de),Lt.style.opacity=.7,se!==null){var ti,gi,Pn;if(!Un){ti=document.createElement("img"),ti.style.position="absolute",ti.style.zIndex="1001",ti.style.opacity=1,Lt.style.opacity=.3,gi=360,gi>zt/4*3&&(gi=zt/4*3),Pn=gi/5.8,ti.setAttribute("src",se),ti.setAttribute("width",gi),ti.setAttribute("height",Pn);var Xt=(zt-gi)/2,Kt=(rn-Pn)/2;ti.style.left=Xt+"px",ti.style.top=Kt+"px",yn.appendChild(ti)}}return yn.appendChild(Lt),yn},Nt=function(zt){return zt=zt.toLowerCase(),zt==="html5"||zt==="screenshot"?zt:"html5"},qe=["web","webSimple","web3d","tablet","tablet3d","phone"],Ke=function(zt,rn){if(Ie=zt,rn){Tt(Ie,!0);return}var xn=!Re;if(xn){var Un=Ne(Ie);!isNaN(Un)&&Un<4.4&&(xn=!1)}var yn,sn;window.location.protocol.substr(0,4)==="http"?yn=window.location.protocol:yn="http:";var Lt=Ie.indexOf("//");Lt>0?sn=Ie:Lt===0?sn=yn+Ie:sn="https://www.geogebra.org/apps/5.2.814.0/";for(var ti in qe)if(Ie.slice(qe[ti].length*-1)===qe[ti]||Ie.slice((qe[ti].length+1)*-1)===qe[ti]+"/"){Tt(sn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&xn&&!ue.is3D&&!ue.AV&&!ue.SV&&!ue.CV&&!ue.EV2&&!ue.CP&&!ue.PC&&!ue.DA&&!ue.FI&&!ue.PV&&!He(me.showToolBar)&&!He(me.showMenuBar)&&!He(me.showAlgebraInput)&&!He(me.enableRightClick)&&(!me.appName||me.appName=="classic")?sn+="webSimple/":sn+="web3d/",Tt(sn,!1)},Tt=function(zt,rn){if(zt.requirejs){st=zt;return}zt.slice(-1)!=="/"&&(zt+="/"),st=zt,rn===null&&(rn=zt.indexOf("http")===-1),pt=rn,te="web.nocache.js",ee=!1;var xn=st.split("/");xn.length>1&&(!rn&&xn[xn.length-2]==="webSimple"?(te="webSimple.nocache.js",ee=!0):qe.indexOf(xn[xn.length-2])>=0&&(te=xn[xn.length-2]+".nocache.js")),xn=zt.split("/"),Ie=xn[xn.length-3],Ie.substr(0,4)==="test"?Ie=Ie.substr(4,1)+"."+Ie.substr(5,1):(Ie.substr(0,3)==="war"||Ie.substr(0,4)==="beta")&&(Ie="5.0");var Un=parseFloat(Ie);Un!==NaN&&Un<5&&zt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Un+" is deprecated. Using version latest instead."),Ke("5.0",rn))},Ln=function(zt,rn){window.console&&window.console.log&&(!rn||typeof rn.showLogging=="undefined"||rn.showLogging&&rn.showLogging!=="false")&&console.log(zt)};me.material_id!==void 0?ze(Mn):Mn();function Mn(){var zt=En;lt!==null?zt=lt:parseFloat(zt)<5&&(zt="5.0"),Ke(zt,!1),Me!==null&&Tt(Me,pt),We=!0}return zn},GGBAppletUtils=function(){"use strict";function zn(){return window.GGBT_wsf_edit!==void 0}function En(We,lt){lt!=1?(We.style.transformOrigin="0% 0% 0px",We.style.webkitTransformOrigin="0% 0% 0px",We.style.transform="scale("+lt+","+lt+")",We.style.webkitTransform="scale("+lt+","+lt+")",We.style.maxWidth="initial",We.querySelector(".ggb_preview")!==null&&(We.querySelector(".ggb_preview").style.maxWidth="initial"),We.querySelectorAll(".ggb_preview img")[0]!==void 0&&(We.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),We.querySelectorAll(".ggb_preview img")[1]!==void 0&&(We.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(We.style.transform="none",We.style.webkitTransform="none")}function me(We,lt,Me,Mt,Ct,Ye){var st=null;if(Ye!=null&&Ye!="")for(var pt=We.parentNode;pt!=null;)if((" "+pt.className+" ").indexOf(" "+Ye+" ")>-1){st=pt;break}else pt=pt.parentNode;var wt=0,Ie=0,te=0,ee=0,de=0,se=0,he=0;if(st)wt=st.offsetWidth,Ie=Math.max(Mt?st.offsetWidth:0,st.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(wt=Math.min(window.innerWidth,document.documentElement.clientWidth),Ie=Math.min(window.innerHeight,document.documentElement.clientHeight),te=wt):(wt=window.innerWidth,Ie=window.innerHeight,te=window.innerWidth),We){var ve=We.getBoundingClientRect();ve.left>0&&ve.left<=wt&&(Ct===void 0||!Ct)&&(document.dir==="rtl"?(de=wt-ve.width-ve.left,se=te<=480?10:30):(se=ve.left,de=te<=480?10:30),ee=se+de)}if(We&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var be=We.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,he=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,he=40)}}return We&&((Me===void 0||!Me)&<>0&<+ee<wt?wt=lt:wt-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Me===void 0||!Me)&&(Ie-=he)),{width:wt,height:Ie}}function ue(We,lt,Me,Mt,Ct){if(We.isScreenshoGenerator)return 1;var Ye=Mt!==void 0&&Mt,st=We.noScaleMargin!=null&&We.noScaleMargin,pt=function(be){return be&&be!=="false"},wt=pt(We.autoHeight),Ie=me(lt,We.width,Me,wt,Ye&&window.GGBT_wsf_view||st,Ct),te=parseInt(Ie.width),ee=We.width,de=We.height;if(ee===void 0){var se=lt.querySelector(".appletParameters");se&&(ee=se.offsetWidth,de=se.offsetHeight)}var he=te/ee,ve=Ye?1:Ie.height/de;return Me!==void 0&&!Me&&(he=Math.min(1,he),ve=Math.min(1,ve)),Math.min(he,ve)}function Re(We,lt,Me){var Mt=1,Ct,Ye=!1;if(We.hasOwnProperty("allowUpscale")&&(Ye=We.allowUpscale),We.hasOwnProperty("scale")&&(Mt=parseFloat(We.scale),(isNaN(Mt)||Mt===null||Mt===0)&&(Mt=1),Mt>1&&(Ye=!0)),lt&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ye=!0),!(We.hasOwnProperty("disableAutoScale")&&We.disableAutoScale))Ct=ue(We,lt,Ye,Me,We.scaleContainerClass);else return Mt;return Ye&&(!We.hasOwnProperty("scale")||Mt===1)?Ct:Math.min(Mt,Ct)}function Ze(We){var lt=Math.min(window.innerWidth,document.documentElement.clientWidth),Me=Math.min(window.innerHeight,document.documentElement.clientHeight),Mt=We.getBoundingClientRect(),Ct=(lt-Mt.width)/2,Ye=(Me-Mt.height)/2;Ye<0&&(Ye=0),We.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ct<40?We.style.left="40px":We.style.left=Ct+"px",We.style.top=Ye+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Ye<40?We.style.top="40px":We.style.top=Ye+"px",We.style.left=Ct+"px")}function ot(We,lt){var Me=We.querySelector(".appletParameters");if(Me){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(lt.id!==Me.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(We)}if(Me.parentElement&&/fullscreen/.test(Me.parentElement.className))return;var Mt=Re(lt,We);zn()&&Me.setAttribute("data-param-scale",Mt);for(var Ct=null,Ye=0;Ye<We.childNodes.length;Ye++)if(We.childNodes[Ye].className!==void 0&&We.childNodes[Ye].className.match(/^applet_scaler/)){Ct=We.childNodes[Ye];break}if(Ct!==null&&Ct.querySelector(".noscale")!==null)return;var st=lt.id!==void 0?lt.id:"ggbApplet",pt=window[st];(pt==null||!pt.recalculateEnvironments)&&Ct!==null&&!Ct.className.match(/fullscreen/)&&(Ct.parentNode.style.transform="",!isNaN(Mt)&&Mt!==1?(Ct.parentNode.style.width=lt.width*Mt+"px",Ct.parentNode.style.height=lt.height*Mt+"px",En(Ct,Mt)):(En(Ct,1),Ct.parentNode.style.width=lt.width+"px",Ct.parentNode.style.height=lt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ze(We),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Me).parents(".content-added-content"))}}return{responsiveResize:ot,isFlexibleWorksheetEditor:zn,positionCenter:Ze,getScale:Re,scaleElement:En}}();__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 zn=n.location.search;return zn.indexOf(J)!=-1||zn.indexOf(K)!=-1}function q(zn,En){}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(zn){var En=s[L].bindings;s[L].bindings=function(){for(var me=En?En():{},ue=zn[webModule.__softPermutationId],Re=O;Re<ue.length;Re++){var Ze=ue[Re];me[Ze[O]]=Ze[P]}return me}};var t;function u(){return v(),t}function v(){if(!t){var zn=o.createElement(Q);if(zn.id=L,zn.style.cssText=R+S,zn.tabIndex=-1,o.body.appendChild(zn),t=zn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var En=document.compatMode==U?V:W;t.write(En+X),t.close()}}}function w(zn){function En(ue){function Re(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ze=Re();if(Ze){ue();return}function ot(){if(!Ze){if(!Re())return;Ze=!0,ue(),o.removeEventListener&&o.removeEventListener(Z,ot,!1),We&&clearInterval(We)}}o.addEventListener&&o.addEventListener(Z,ot,!1);var We=setInterval(function(){ot()},$)}function me(ue){var Re=u(),Ze=Re.body,ot=Re.createElement(_);ot.language=ab,ot.crossOrigin=W,ot.src=ue,webModule.__errFn&&(ot.onerror=function(){webModule.__errFn(L,new Error(bb+ue))}),Ze.appendChild(ot)}En(function(){me(zn)})}webModule.__startLoadingFragment=function(zn){return C(zn)},webModule.__installRunAsyncCode=function(zn){var En=u(),me=En.body,ue=En.createElement(_);ue.language=ab,ue.text=zn,me.appendChild(ue),me.removeChild(ue)};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(zn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(zn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(zn){var En=c[zn];return En==null?null:En},r=d,webModule.__errFn=e}function B(){function zn(We){var lt=We.lastIndexOf(rb);lt==-1&&(lt=We.length);var Me=We.indexOf(sb);Me==-1&&(Me=We.length);var Mt=We.lastIndexOf(tb,Math.min(Me,lt));return Mt>=O?We.substring(O,Mt+P):W}function En(We){if(!We.match(/^\w+:\/\//)){var lt=o.createElement(ub);lt.src=We+vb,We=zn(lt.src)}return We}function me(){var We=__gwt_getMetaProperty(wb);return We!=null?We:W}function ue(){for(var We=o.getElementsByTagName(_),lt=O;lt<We.length;++lt)if(We[lt].src.indexOf(xb)!=-1)return zn(We[lt].src);return W}function Re(){var We=o.getElementsByTagName(yb);return We.length>O?We[We.length-P].href:W}function Ze(){var We=o.location;return We.href==We.protocol+zb+We.host+We.pathname+We.search+We.hash}var ot=me();return ot==W&&(ot=ue()),ot==W&&(ot=Re()),ot==W&&Ze()&&(ot=zn(o.location.href)),ot=En(ot),ot}function C(zn){return zn.match(/^\//)||zn.match(/^[a-zA-Z]+:\/\//)?zn:webModule.__moduleBase+zn}function D(){var zn=[],En=O,me=[],ue=[];function Re(We){var lt=ue[We](),Me=me[We];if(lt in Me)return lt;var Mt=[];for(var Ct in Me)Mt[Me[Ct]]=Ct;throw r&&r(We,Mt,lt),null}if(__gwt_isKnownPropertyValue=function(We,lt){return lt in me[We]},webModule.__getPropMap=function(){var We={};for(var lt in me)me.hasOwnProperty(lt)&&(We[lt]=Re(lt));return We},webModule.__computePropValue=Re,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ze;try{Ze=Cb;var ot=Ze.indexOf(Db);ot!=-1&&(En=parseInt(Ze.substring(ot+P),$),Ze=Ze.substring(O,ot))}catch(We){}return webModule.__softPermutationId=En,C(Ze+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},58788:function(zn,En,me){"use strict";me.d(En,{Ax:function(){return ot},Ds:function(){return We},KI:function(){return Me},SI:function(){return Ze},f1:function(){return Re}});var ue=me(10148);function Re(Mt){let Ct=!0;if(Mt.length>0){for(let Ye=0;Ye<Mt.length;Ye++)if(Mt[Ye].compile_success==0||!Mt[Ye].compile_success){Ct=!1;break}}else Ct=!1;return Ct}function Ze(Mt,Ct=""){let Ye=[];for(let st=0;st<Mt.length;st++){let pt=Mt[st],wt=Ct?`${Ct}/${pt.name}`:`${pt.name}`;Ye.push({title:pt.name,type:pt.type,isLeaf:pt.type!=="tree",key:wt})}return Ye}function ot(Mt,Ct,Ye){for(let st=0;st<Mt.length;st++){let pt=Mt[st];if(pt.key===Ct){pt.children=Ye;break}pt.children&&ot(pt.children,Ct,Ye)}return Mt}function We(Mt,Ct,Ye){let st;return function(){let pt=this,wt=arguments,Ie=function(){st=null,Ye||Mt.apply(pt,wt)},te=Ye&&!st;clearTimeout(st),st=setTimeout(Ie,Ct),te&&Mt.apply(pt,wt)}}const lt=!0,Me=ue.Z.API_SERVER},88477:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Ie}});var ue=me(3113),Re=me(59301),Ze=Object.defineProperty,ot=Object.defineProperties,We=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Mt=Object.prototype.propertyIsEnumerable,Ct=(te,ee,de)=>ee in te?Ze(te,ee,{enumerable:!0,configurable:!0,writable:!0,value:de}):te[ee]=de,Ye=(te,ee)=>{for(var de in ee||(ee={}))Me.call(ee,de)&&Ct(te,de,ee[de]);if(lt)for(var de of lt(ee))Mt.call(ee,de)&&Ct(te,de,ee[de]);return te},st=(te,ee)=>ot(te,We(ee)),pt=(te,ee)=>{var de={};for(var se in te)Me.call(te,se)&&ee.indexOf(se)<0&&(de[se]=te[se]);if(te!=null&<)for(var se of lt(te))ee.indexOf(se)<0&&Mt.call(te,se)&&(de[se]=te[se]);return de},wt=(te,ee,de)=>new Promise((se,he)=>{var ve=Fe=>{try{Ne(de.next(Fe))}catch(je){he(je)}},be=Fe=>{try{Ne(de.throw(Fe))}catch(je){he(je)}},Ne=Fe=>Fe.done?se(Fe.value):Promise.resolve(Fe.value).then(ve,be);Ne((de=de.apply(te,ee)).next())});const Ie=te=>{var ee=te,{children:de}=ee,se=pt(ee,["children"]);const[he,ve]=(0,Re.useState)(!1);return Re.createElement(ue.ZP,st(Ye({},se),{loading:he,onClick:be=>wt(void 0,null,function*(){try{ve(!0),yield se.onClick(be),ve(!1)}catch(Ne){console.error(Ne),ve(!1)}})}),de)}},86377:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Ct}});var ue=me(59301),Re=me(92832),Ze=me(12563),ot=me(8591),We={flex:"flex___eLcnP",flex1:"flex1___yUTT7",color666:"color666___TiUhG",error:"error___gTTtv",deleteIcon:"deleteIcon___mnZW1",addIcon:"addIcon___JC5NS"},lt=me(72528);const{TextArea:Me}=Re.default;class Mt extends ue.Component{constructor(st){super(st),this.state={inputVisible:!1,EditInputIndex:-1}}render(){let{index:st,onAnswerChange:pt,addChildAnswer:wt,exerciseIsPublish:Ie,answers:te,activeOptionErrorIndex:ee,flex:de="0 0 1000px"}=this.props;console.log("----",te);let{inputVisible:se,EditInputIndex:he}=this.state;return ue.createElement("div",{className:We.flex},ue.createElement("div",{className:`${We.color666} mb5 mt6`,style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",st+1,"):"),ue.createElement("div",{style:{border:"1px solid #f6f6f6",flex:1,padding:10}},te==null?void 0:te.map((ve,be)=>ue.createElement(ue.Fragment,null,he!==be?(ve==null?void 0:ve.length)>0?ue.createElement(Ze.default,{className:"edit-tag",key:ve,closable:!((te==null?void 0:te.length)===1&&be===0),onClose:Ne=>{Ne.preventDefault(),(te==null?void 0:te.length)===1&&be===0?this.props.deleteChildAnswermain(st,be):this.props.deleteChildAnswer(st,be)}},ue.createElement("span",{onDoubleClick:Ne=>{this.setState({EditInputIndex:be}),Ne.preventDefault()}},ve)):ue.createElement(Re.default,{defaultValue:ve,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Ne=>{if(Ne.target.value.replaceAll(" ","").length<=0){ot.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}pt(st,be,Ne.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}):ue.createElement(Re.default,{defaultValue:ve,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Ne=>{if(Ne.target.value.replaceAll(" ","").length<=0){ot.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}pt(st,be,Ne.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}))),!se&&ue.createElement(Ze.default,{className:"site-tag-plus",onClick:()=>{wt(st),this.setState({inputVisible:!0})}},ue.createElement(lt.Z,null)," \u65B0\u589E\u7B54\u6848")))}}var Ct=Mt},49985:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Ie}});var ue=me(59301),Re=me(23469),Ze=Object.defineProperty,ot=Object.defineProperties,We=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Mt=Object.prototype.propertyIsEnumerable,Ct=(te,ee,de)=>ee in te?Ze(te,ee,{enumerable:!0,configurable:!0,writable:!0,value:de}):te[ee]=de,Ye=(te,ee)=>{for(var de in ee||(ee={}))Me.call(ee,de)&&Ct(te,de,ee[de]);if(lt)for(var de of lt(ee))Mt.call(ee,de)&&Ct(te,de,ee[de]);return te},st=(te,ee)=>ot(te,We(ee)),pt=(te,ee,de)=>Ct(te,typeof ee!="symbol"?ee+"":ee,de);const wt="\u2581";class Ie extends ue.Component{constructor(){super(...arguments),pt(this,"getChCountBeforeCursor",(ee,de)=>{const se=de.line;let he=0;for(let be=0;be<se;be++)he+=ee.getLine(be).split(wt).length-1;const ve=ee.getLine(se).substring(0,de.ch);return he+=ve.split(wt).length-1,he}),pt(this,"onCMBeforeChange",(ee,de)=>{const se=ee.getRange(de.from,de.to);let he=0;if(de.text.forEach(ve=>{he+=ve.split(wt).length-1}),se&&se.indexOf(wt)!=-1){const ve=se.split(wt).length-1,be=this.getChCountBeforeCursor(ee,de.from);console.log(`\u5220\u9664${ve}\u4E2A\uFF0C \u4E4B\u524D\u6709${be}\u4E2A\uFF0C\u65B0\u589E${he}\u4E2A`),this.props.deleteEmptyDisabled?de.cancel():this.props.onPlaceholderChange&&this.props.onPlaceholderChange(be,ve,he)}else if(he){const ve=this.getChCountBeforeCursor(ee,de.from);console.log(`\u65B0\u589E${he}\u4E2A\uFF0C\u4E4B\u524D\u6709${ve}\u4E2A`),this.props.onPlaceholderChange&&this.props.onPlaceholderChange(ve,0,he)}})}render(){return ue.createElement(Re.Z,st(Ye({},this.props),{onCMBeforeChange:this.onCMBeforeChange}))}}},15519:function(zn,En,me){"use strict";me.d(En,{d4:function(){return wt},VP:function(){return Ct}});var ue=me(59301),Re={digitalLabel:"digitalLabel___hkWuZ",active:"active___jawU1",titleEditor:"titleEditor___wX1lW",title:"title___SuT2h",editIcon:"editIcon___XrTIi",paperTab:"paperTab___GUxeB",tabItem:"tabItem___or0fY",dottedLine:"dottedLine___Ln0Xr"};const Ze=({number:Ie,active:te,className:ee})=>ue.createElement("div",{className:`${Re.digitalLabel} ${te?Re.active:""} ${ee}`},Ie);var ot=me(6848),We=me(92832),lt=me(8591),Me=me(59301),Mt=(Ie,te,ee)=>new Promise((de,se)=>{var he=Ne=>{try{be(ee.next(Ne))}catch(Fe){se(Fe)}},ve=Ne=>{try{be(ee.throw(Ne))}catch(Fe){se(Fe)}},be=Ne=>Ne.done?de(Ne.value):Promise.resolve(Ne.value).then(he,ve);be((ee=ee.apply(Ie,te)).next())});const Ct=({defaultValue:Ie,onFinish:te})=>{const[ee,de]=(0,ue.useState)(!1),[se,he]=(0,ue.useState)(Ie);return(0,ue.useEffect)(()=>{he(Ie)},[Ie]),Me.createElement("div",{className:Re.titleEditor},ee?Me.createElement(We.default,{autoFocus:!0,maxLength:60,style:{textAlign:"center",marginTop:20,marginBottom:20},value:se,onChange:ve=>{he(ve.target.value)},onBlur:()=>Mt(void 0,null,function*(){var ve;if(((ve=se==null?void 0:se.replaceAll(" ",""))==null?void 0:ve.length)<=0){lt.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield te(se))&&de(!1)}),onPressEnter:()=>Mt(void 0,null,function*(){var ve;if(((ve=se==null?void 0:se.replaceAll(" ",""))==null?void 0:ve.length)<=0){lt.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield te(se))&&de(!1)})}):Me.createElement("div",{className:Re.title,onDoubleClick:()=>de(!0)},se,Me.createElement(ot.Z,{title:"\u7F16\u8F91\u8BD5\u5377\u540D\u79F0"},Me.createElement("i",{className:`${Re.editIcon} iconfont icon-bianji_Hover`,onClick:()=>de(!0)}))))};var Ye=me(95237),st=me(43604),pt=(Ie,te,ee)=>new Promise((de,se)=>{var he=Ne=>{try{be(ee.next(Ne))}catch(Fe){se(Fe)}},ve=Ne=>{try{be(ee.throw(Ne))}catch(Fe){se(Fe)}},be=Ne=>Ne.done?de(Ne.value):Promise.resolve(Ne.value).then(he,ve);be((ee=ee.apply(Ie,te)).next())});const wt=({onChange:Ie=()=>pt(void 0,null,function*(){}),tabs:te,activeKey:ee,defaultActiveKey:de,className:se=""})=>{var he,ve,be,Ne,Fe,je,ze;const[Xe,Je]=(0,ue.useState)(de===void 0?(he=te[0])==null?void 0:he.key:de);return(0,ue.useEffect)(()=>{ee!==void 0&&Je(ee)},[ee]),ue.createElement(Ye.Z,{justify:"center",align:"middle",className:`${Re.paperTab} ${se}`},ue.createElement(st.Z,{className:`${Re.tabItem} ${Xe===((ve=te[0])==null?void 0:ve.key)?Re.active:""}`,onClick:()=>pt(void 0,null,function*(){var dt;yield Ie(te[0].key),Je((dt=te[0])==null?void 0:dt.key)})},ue.createElement(Ze,{number:1,active:Xe===((be=te[0])==null?void 0:be.key),className:"mr10"}),ue.createElement("span",null,(Ne=te[0])==null?void 0:Ne.label)),ue.createElement(st.Z,{flex:"188px",className:`${Re.dottedLine} ml30 mr30`}),ue.createElement(st.Z,{className:`${Re.tabItem} ${Xe===((Fe=te[1])==null?void 0:Fe.key)?Re.active:""}`,onClick:()=>pt(void 0,null,function*(){var dt,He;yield Ie((dt=te[1])==null?void 0:dt.key),Je((He=te[1])==null?void 0:He.key)})},ue.createElement(Ze,{number:2,active:Xe===((je=te[1])==null?void 0:je.key),className:"mr10"}),ue.createElement("span",null,(ze=te[1])==null?void 0:ze.label)))}},72194:function(zn,En,me){"use strict";me.d(En,{Z:function(){return lt}});var ue=me(60324),Re={text:"text___FxbAX",wrap:"wrap___UlBQ1",contact:"contact____pUDq",img:"img___BapAv"},Ze=me(32637),ot=me(59301),lt=({type:Me,style:Mt})=>{const Ct=ot.createElement("div",{className:Re.wrap,onClick:Ye=>{Ye.preventDefault(),Ye.stopPropagation()}},ot.createElement("p",null,Me==="shixun"||Me==="paths"?"\u5F53\u524D\u5B9E\u8DF5\u9879\u76EE\u662F\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002":"\u5F53\u524D\u8BD5\u5377\u5305\u542B\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002",ot.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002",Me==="paths"?"\u53D1\u9001\u5230\u8BFE\u5802":"\u53D1\u5E03","\u4F7F\u7528\u4E4B\u524D\uFF0C\u8BF7\u5148\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u83B7\u53D6\u6388\u6743\u7801\u3002"),ot.createElement("div",{className:Re.contact},ot.createElement("div",{className:Re.img},ot.createElement("img",{src:Ze,width:"124px",height:"124px"})),ot.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")));return ot.createElement(ue.Z,{content:Ct},ot.createElement("span",{className:Re.text,style:Mt},"\u9AD8\u6D88\u8017"))}},65983:function(zn,En,me){"use strict";me.d(En,{Z:function(){return at}});var ue=me(59301),Re={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ze=me(92310),ot=me.n(Ze),We=me(71418);var lt=function(Te,Pe){return(lt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ye,ke){ye.__proto__=ke}||function(ye,ke){for(var $e in ke)Object.prototype.hasOwnProperty.call(ke,$e)&&(ye[$e]=ke[$e])})(Te,Pe)};function Me(Te,Pe){function ye(){this.constructor=Te}lt(Te,Pe),Te.prototype=Pe===null?Object.create(Pe):(ye.prototype=Pe.prototype,new ye)}function Mt(Te,Pe,ye,ke){return new(ye||(ye=Promise))(function($e,Le){function vt(en){try{bn(ke.next(en))}catch(wn){Le(wn)}}function an(en){try{bn(ke.throw(en))}catch(wn){Le(wn)}}function bn(en){var wn;en.done?$e(en.value):(wn=en.value,wn instanceof ye?wn:new ye(function(ai){ai(wn)})).then(vt,an)}bn((ke=ke.apply(Te,Pe||[])).next())})}function Ct(Te,Pe){var ye,ke,$e,Le,vt={label:0,sent:function(){if(1&$e[0])throw $e[1];return $e[1]},trys:[],ops:[]};return Le={next:an(0),throw:an(1),return:an(2)},typeof Symbol=="function"&&(Le[Symbol.iterator]=function(){return this}),Le;function an(bn){return function(en){return function(wn){if(ye)throw new TypeError("Generator is already executing.");for(;vt;)try{if(ye=1,ke&&($e=2&wn[0]?ke.return:wn[0]?ke.throw||(($e=ke.return)&&$e.call(ke),0):ke.next)&&!($e=$e.call(ke,wn[1])).done)return $e;switch(ke=0,$e&&(wn=[2&wn[0],$e.value]),wn[0]){case 0:case 1:$e=wn;break;case 4:return vt.label++,{value:wn[1],done:!1};case 5:vt.label++,ke=wn[1],wn=[0];continue;case 7:wn=vt.ops.pop(),vt.trys.pop();continue;default:if($e=vt.trys,!(($e=$e.length>0&&$e[$e.length-1])||wn[0]!==6&&wn[0]!==2)){vt=0;continue}if(wn[0]===3&&(!$e||wn[1]>$e[0]&&wn[1]<$e[3])){vt.label=wn[1];break}if(wn[0]===6&&vt.label<$e[1]){vt.label=$e[1],$e=wn;break}if($e&&vt.label<$e[2]){vt.label=$e[2],vt.ops.push(wn);break}$e[2]&&vt.ops.pop(),vt.trys.pop();continue}wn=Pe.call(Te,vt)}catch(ai){wn=[6,ai],ke=0}finally{ye=$e=0}if(5&wn[0])throw wn[1];return{value:wn[0]?wn[1]:void 0,done:!0}}([bn,en])}}}function Ye(){for(var Te=0,Pe=0,ye=arguments.length;Pe<ye;Pe++)Te+=arguments[Pe].length;var ke=Array(Te),$e=0;for(Pe=0;Pe<ye;Pe++)for(var Le=arguments[Pe],vt=0,an=Le.length;vt<an;vt++,$e++)ke[$e]=Le[vt];return ke}var st=function(){function Te(){}return Te.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Te.setAttributes=function(Pe,ye){for(var ke=0,$e=ye;ke<$e.length;ke++){var Le=$e[ke],vt=Le[0],an=Le[1];Pe.setAttribute(vt,an)}},Te.createRect=function(Pe,ye,ke){var $e=document.createElementNS("http://www.w3.org/2000/svg","rect");return $e.setAttribute("width",Pe.toString()),$e.setAttribute("height",ye.toString()),ke&&Te.setAttributes($e,ke),$e},Te.createLine=function(Pe,ye,ke,$e,Le){var vt=document.createElementNS("http://www.w3.org/2000/svg","line");return vt.setAttribute("x1",Pe.toString()),vt.setAttribute("y1",ye.toString()),vt.setAttribute("x2",ke.toString()),vt.setAttribute("y2",$e.toString()),Le&&Te.setAttributes(vt,Le),vt},Te.createPolygon=function(Pe,ye){var ke=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ke.setAttribute("points",Pe),ye&&Te.setAttributes(ke,ye),ke},Te.createCircle=function(Pe,ye){var ke=document.createElementNS("http://www.w3.org/2000/svg","circle");return ke.setAttribute("cx",(Pe/2).toString()),ke.setAttribute("cy",(Pe/2).toString()),ke.setAttribute("r",Pe.toString()),ye&&Te.setAttributes(ke,ye),ke},Te.createEllipse=function(Pe,ye,ke){var $e=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return $e.setAttribute("cx",(Pe/2).toString()),$e.setAttribute("cy",(ye/2).toString()),$e.setAttribute("rx",(Pe/2).toString()),$e.setAttribute("ry",(ye/2).toString()),ke&&Te.setAttributes($e,ke),$e},Te.createGroup=function(Pe){var ye=document.createElementNS("http://www.w3.org/2000/svg","g");return Pe&&Te.setAttributes(ye,Pe),ye},Te.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Te.createMarker=function(Pe,ye,ke,$e,Le,vt,an){var bn=document.createElementNS("http://www.w3.org/2000/svg","marker");return Te.setAttributes(bn,[["id",Pe],["orient",ye],["markerWidth",ke.toString()],["markerHeight",$e.toString()],["refX",Le.toString()],["refY",vt.toString()]]),bn.appendChild(an),bn},Te.createText=function(Pe){var ye=document.createElementNS("http://www.w3.org/2000/svg","text");return ye.setAttribute("x","0"),ye.setAttribute("y","0"),Pe&&Te.setAttributes(ye,Pe),ye},Te.createTSpan=function(Pe,ye){var ke=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ke.textContent=Pe,ye&&Te.setAttributes(ke,ye),ke},Te.createImage=function(Pe){var ye=document.createElementNS("http://www.w3.org/2000/svg","image");return Pe&&Te.setAttributes(ye,Pe),ye},Te.createPoint=function(Pe,ye){var ke=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ke.x=Pe,ke.y=ye,ke},Te.createPath=function(Pe,ye){var ke=document.createElementNS("http://www.w3.org/2000/svg","path");return ke.setAttribute("d",Pe),ye&&Te.setAttributes(ke,ye),ke},Te}(),pt=function(){function Te(){}return Te.addKey=function(Pe){Te.key=Pe},Object.defineProperty(Te,"isLicensed",{get:function(){return!!Te.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Te.key)},enumerable:!1,configurable:!0}),Te}(),wt=function(){function Te(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Te.prototype.rasterize=function(Pe,ye,ke){var $e=this;return new Promise(function(Le){var vt=ke!==void 0?ke:document.createElement("canvas");Pe===null&&($e.markersOnly=!0,$e.naturalSize=!1);var an=document.createElementNS("http://www.w3.org/2000/svg","svg");an.setAttribute("xmlns","http://www.w3.org/2000/svg"),an.setAttribute("width",ye.width.baseVal.valueAsString),an.setAttribute("height",ye.height.baseVal.valueAsString),an.setAttribute("viewBox","0 0 "+ye.viewBox.baseVal.width.toString()+" "+ye.viewBox.baseVal.height.toString()),an.innerHTML=ye.innerHTML,$e.naturalSize===!0?(an.width.baseVal.value=Pe.naturalWidth,an.height.baseVal.value=Pe.naturalHeight):$e.width!==void 0&&$e.height!==void 0&&(an.width.baseVal.value=$e.width,an.height.baseVal.value=$e.height),vt.width=an.width.baseVal.value,vt.height=an.height.baseVal.value;var bn=an.outerHTML,en=vt.getContext("2d");$e.markersOnly!==!0&&en.drawImage(Pe,0,0,vt.width,vt.height);var wn=window.URL,ai=new Image(vt.width,vt.height);ai.setAttribute("crossOrigin","anonymous");var _n=new Blob([bn],{type:"image/svg+xml"}),Hn=wn.createObjectURL(_n);ai.onload=function(){en.drawImage(ai,0,0),wn.revokeObjectURL(Hn);var wi=vt.toDataURL($e.imageType,$e.imageQuality);Le(wi)},ai.src=Hn})},Te}(),Ie=function(){},te=function(){function Te(Pe){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Pe+"_"}return Object.defineProperty(Te.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Te.prototype.addClass=function(Pe){return this.styleSheet===void 0&&this.addStyleSheet(),Pe.name=""+this.classNamePrefix+Pe.localName,this.classes.push(Pe),this.styleSheet.sheet.insertRule("."+Pe.name+" {"+Pe.style+"}",this.styleSheet.sheet.cssRules.length),Pe},Te.prototype.addRule=function(Pe){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Pe),this.styleSheet.sheet.insertRule(Pe.selector+" {"+Pe.style+"}",this.styleSheet.sheet.cssRules.length)},Te.prototype.addStyleSheet=function(){var Pe;this.styleSheet=document.createElement("style"),((Pe=this.styleSheetRoot)!==null&&Pe!==void 0?Pe:document.head).appendChild(this.styleSheet),this.addRule(new ee("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ee("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new ee("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new de("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new de("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},Te.prototype.removeStyleSheet=function(){var Pe;this.styleSheet&&(((Pe=this.styleSheetRoot)!==null&&Pe!==void 0?Pe:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Te}(),ee=function(Te,Pe){this.selector=Te,this.style=Pe},de=function(Te,Pe){this.localName=Te,this.style=Pe},se=function(){function Te(Pe,ye,ke,$e,Le){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Pe,this.displayMode=ye,this.markerItems=ke,this.uiStyleSettings=$e,this.styles=Le,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Te.prototype.show=function(Pe){var ye=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Pe,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var ke=document.createElement("div");ke.className=this.toolbarBlockStyleClass.name,ke.style.whiteSpace="nowrap",this.uiContainer.appendChild(ke),this.addActionButton(ke,'<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(ke,'<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(ke,'<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(ke,'<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(ke,'<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(ke,'<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(ke,'<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(ke,'<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(Le){var vt=document.createElement("div");vt.className=""+ye.toolbarButtonStyleClass.name,vt.setAttribute("data-type-name",Le.typeName),vt.innerHTML=Le.icon,vt.addEventListener("click",function(){ye.markerToolbarButtonClicked(vt,Le)}),ye.buttons.push(vt),ye.markerButtons.push(vt)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var $e=document.createElement("div");$e.className=this.toolbarBlockStyleClass.name,$e.style.whiteSpace="nowrap",$e.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild($e),this.addActionButton($e,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton($e,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Te.prototype.addButtonClickListener=function(Pe){this.buttonClickListeners.push(Pe)},Te.prototype.removeButtonClickListener=function(Pe){this.buttonClickListeners.indexOf(Pe)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Pe),1)},Te.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Te.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Pe=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var ye=0;ye<this.markerButtons.length;ye++)ye<Pe||ye===Pe&&this.markerButtons.length-1===Pe?this.markerButtonBlock.appendChild(this.markerButtons[ye]):(ye===Pe&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[ye]))}},Te.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},Te.prototype.resetButtonStyles=function(){var Pe=this;this.buttons.forEach(function(ye){ye.className=ye.className.replace(Pe.uiStyleSettings.toolbarButtonStyleColorsClassName?Pe.uiStyleSettings.toolbarButtonStyleColorsClassName:Pe.toolbarButtonStyleColorsClass.name,"").trim(),ye.className=ye.className.replace(Pe.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Pe.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Pe.toolbarActiveButtonStyleColorsClass.name,"").trim(),ye.className+=" "+(Pe.uiStyleSettings.toolbarButtonStyleColorsClassName?Pe.uiStyleSettings.toolbarButtonStyleColorsClassName:Pe.toolbarButtonStyleColorsClass.name)})},Te.prototype.addActionButton=function(Pe,ye,ke){var $e=this,Le=document.createElement("div");switch(Le.className=""+this.toolbarButtonStyleClass.name,Le.innerHTML=ye,Le.setAttribute("data-action",ke),Le.addEventListener("click",function(){$e.actionToolbarButtonClicked(Le,ke)}),ke){case"select":Le.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Le.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Le.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Le.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Le.style.fill=this.uiStyleSettings.closeButtonColor}Pe.appendChild(Le),this.buttons.push(Le)},Te.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new de("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 de("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new de("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new de("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 de("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var Pe=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new de("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Pe)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Pe)+`px;
|
|
|
padding: `+Pe+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new de("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new de("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ee("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new ee("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},Te.prototype.markerToolbarButtonClicked=function(Pe,ye){this.setActiveButton(Pe),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ke){return ke("marker",ye)}),this.markerButtonOverflowBlock.style.display="none"},Te.prototype.actionToolbarButtonClicked=function(Pe,ye){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ke){return ke("action",ye)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Te.prototype.setActiveButton=function(Pe){this.resetButtonStyles(),Pe.className=Pe.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Pe.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Te.prototype.setActiveMarkerButton=function(Pe){var ye=this.markerButtons.find(function(ke){return ke.getAttribute("data-type-name")===Pe});ye&&this.setActiveButton(ye)},Te.prototype.setCurrentMarker=function(Pe){var ye=this;this.currentMarker=Pe,this.buttons.filter(function(ke){return/delete|notes/.test(ke.getAttribute("data-action"))}).forEach(function(ke){ye.currentMarker===void 0?(ke.style.fillOpacity="0.4",ke.style.pointerEvents="none"):(ke.style.fillOpacity="1",ke.style.pointerEvents="all")})},Te}(),he=function(){function Te(Pe,ye,ke,$e){this.panels=[],this.panelButtons=[],this.markerjsContainer=Pe,this.displayMode=ye,this.uiStyleSettings=ke,this.styles=$e,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Te.prototype.addStyles=function(){var Pe;this.toolboxStyleClass=this.styles.addClass(new de("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 de("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var ye=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new de("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new de("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new de("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 de("toolbox-panel-row_colors",`
|
|
|
background-color: `+((Pe=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Pe!==void 0?Pe:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new de("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*ye)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*ye)+`px;
|
|
|
padding: `+ye+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new de("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new de("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new ee("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new ee("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},Te.prototype.show=function(Pe){var ye;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Pe,this.uiContainer.className=this.toolboxStyleClass.name+" "+((ye=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&ye!==void 0?ye:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Te.prototype.setPanelButtons=function(Pe){var ye,ke,$e=this;this.panels=Pe,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((ye=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&ye!==void 0?ye:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ke=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ke!==void 0?ke:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Le){var vt;Le.uiStyleSettings=$e.uiStyleSettings;var an=document.createElement("div");an.className=$e.toolboxButtonStyleClass.name+" "+((vt=$e.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&vt!==void 0?vt:$e.toolboxButtonStyleColorsClass.name),an.innerHTML=Le.icon,an.title=Le.title,an.addEventListener("click",function(){$e.panelButtonClick(Le)}),$e.panelButtons.push(an),$e.buttonRow.appendChild(an)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Te.prototype.panelButtonClick=function(Pe){var ye=this,ke=-1;if(Pe!==this.activePanel){ke=this.panels.indexOf(Pe),this.panelRow.innerHTML="";var $e=Pe.getUi();$e.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild($e),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=Pe}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){ye.displayMode==="inline"?ye.panelRow.style.display="none":ye.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Le,vt){var an,bn;Le.className=ye.toolboxButtonStyleClass.name+" "+(vt===ke?""+((an=ye.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&an!==void 0?an:ye.toolboxActiveButtonStyleColorsClass.name):""+((bn=ye.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&bn!==void 0?bn:ye.toolboxButtonStyleColorsClass.name))})},Te}(),ve=function(Te,Pe){this.title=Te,this.icon=Pe},be=function(Te){function Pe(ye,ke,$e,Le){var vt=Te.call(this,ye,Le||'<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 vt.colors=[],vt.addTransparent=!1,vt.colorBoxes=[],vt.colors=ke,vt.currentColor=$e,vt.setCurrentColor=vt.setCurrentColor.bind(vt),vt.getColorBox=vt.getColorBox.bind(vt),vt}return Me(Pe,Te),Pe.prototype.getUi=function(){var ye=this,ke=document.createElement("div");return ke.style.overflow="hidden",ke.style.whiteSpace="nowrap",this.colors.forEach(function($e){var Le=ye.getColorBox($e);ke.appendChild(Le),ye.colorBoxes.push(Le)}),ke},Pe.prototype.getColorBox=function(ye){var ke=this,$e=this.uiStyleSettings.toolbarHeight/4,Le=this.uiStyleSettings.toolbarHeight-$e,vt=document.createElement("div");vt.style.display="inline-block",vt.style.boxSizing="content-box",vt.style.width=Le-2+"px",vt.style.height=Le-2+"px",vt.style.padding="1px",vt.style.marginRight="2px",vt.style.marginBottom="2px",vt.style.borderWidth="2px",vt.style.borderStyle="solid",vt.style.borderRadius=(Le+2)/2+"px",vt.style.borderColor=ye===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",vt.addEventListener("click",function(){ke.setCurrentColor(ye,vt)});var an=document.createElement("div");return an.style.display="inline-block",an.style.width=Le-2+"px",an.style.height=Le-2+"px",an.style.backgroundColor=ye,an.style.borderRadius=Le/2+"px",ye==="transparent"&&(an.style.fill=this.uiStyleSettings.toolboxAccentColor,an.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>`),vt.appendChild(an),vt},Pe.prototype.setCurrentColor=function(ye,ke){var $e=this;this.currentColor=ye,this.colorBoxes.forEach(function(Le){Le.style.borderColor=Le===ke?$e.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(ye)},Pe}(ve),Ne=function(){function Te(Pe,ye,ke){this._state="new",this._isSelected=!1,this._container=Pe,this._overlayContainer=ye,this.globalSettings=ke,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Te.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Te.prototype.ownsTarget=function(Pe){return!1},Object.defineProperty(Te.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Te.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Te.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Te.prototype.pointerDown=function(Pe,ye){},Te.prototype.dblClick=function(Pe,ye){},Te.prototype.manipulate=function(Pe){},Te.prototype.pointerUp=function(Pe){this.stateChanged()},Te.prototype.dispose=function(){},Te.prototype.addMarkerVisualToContainer=function(Pe){this.container.childNodes.length>0?this.container.insertBefore(Pe,this.container.childNodes[0]):this.container.appendChild(Pe)},Te.prototype.getState=function(){return{typeName:Te.typeName,state:this.state,notes:this.notes}},Te.prototype.restoreState=function(Pe){this._state=Pe.state,this.notes=Pe.notes},Te.prototype.scale=function(Pe,ye){},Te.prototype.colorChanged=function(Pe){this.onColorChanged&&this.onColorChanged(Pe),this.stateChanged()},Te.prototype.fillColorChanged=function(Pe){this.onFillColorChanged&&this.onFillColorChanged(Pe),this.stateChanged()},Te.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Pe=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Pe.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Pe)&&this.onStateChanged(this)}},Te.typeName="MarkerBase",Te}(),Fe=function(){function Te(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Te.prototype.findGripByVisual=function(Pe){return this.topLeft.ownsTarget(Pe)?this.topLeft:this.topCenter.ownsTarget(Pe)?this.topCenter:this.topRight.ownsTarget(Pe)?this.topRight:this.centerLeft.ownsTarget(Pe)?this.centerLeft:this.centerRight.ownsTarget(Pe)?this.centerRight:this.bottomLeft.ownsTarget(Pe)?this.bottomLeft:this.bottomCenter.ownsTarget(Pe)?this.bottomCenter:this.bottomRight.ownsTarget(Pe)?this.bottomRight:void 0},Te}(),je=function(){function Te(){this.GRIP_SIZE=10,this.visual=st.createGroup(),this.visual.appendChild(st.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(st.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Te.prototype.ownsTarget=function(Pe){return Pe===this.visual||Pe===this.visual.childNodes[0]||Pe===this.visual.childNodes[1]},Te}(),ze=function(){function Te(){}return Te.toITransformMatrix=function(Pe){return{a:Pe.a,b:Pe.b,c:Pe.c,d:Pe.d,e:Pe.e,f:Pe.f}},Te.toSVGMatrix=function(Pe,ye){return Pe.a=ye.a,Pe.b=ye.b,Pe.c=ye.c,Pe.d=ye.d,Pe.e=ye.e,Pe.f=ye.f,Pe},Te}(),Xe=function(Te){function Pe(ye,ke,$e){var Le=Te.call(this,ye,ke,$e)||this;return Le.left=0,Le.top=0,Le.width=0,Le.height=0,Le.defaultSize={x:50,y:20},Le.offsetX=0,Le.offsetY=0,Le.rotationAngle=0,Le.CB_DISTANCE=10,Le._suppressMarkerCreateEvent=!1,Le.container.transform.baseVal.appendItem(st.createTransform()),Le.setupControlBox(),Le}return Me(Pe,Te),Object.defineProperty(Pe.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"visual",{get:function(){return this._visual},set:function(ye){this._visual=ye;var ke=st.createTransform();this._visual.transform.baseVal.appendItem(ke)},enumerable:!1,configurable:!0}),Pe.prototype.ownsTarget=function(ye){return!!Te.prototype.ownsTarget.call(this,ye)||!!(this.controlGrips.findGripByVisual(ye)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ye))},Pe.prototype.pointerDown=function(ye,ke){Te.prototype.pointerDown.call(this,ye,ke),this.state==="new"&&(this.left=ye.x,this.top=ye.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var $e=this.unrotatePoint(ye);if(this.manipulationStartX=$e.x,this.manipulationStartY=$e.y,this.offsetX=$e.x-this.left,this.offsetY=$e.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ke),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ke)){this.activeGrip=this.rotatorGrip;var Le=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Le.x-this.width/2,this.top=Le.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var vt=this.container.transform.baseVal.getItem(0);vt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(vt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Pe.prototype.pointerUp=function(ye){var ke=this.state;Te.prototype.pointerUp.call(this,ye),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(ye),this._state="select",ke==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Pe.prototype.moveVisual=function(ye){this.visual.style.transform="translate("+ye.x+"px, "+ye.y+"px)"},Pe.prototype.manipulate=function(ye){var ke=this.unrotatePoint(ye);this.state==="creating"?this.resize(ye):this.state==="move"?(this.left=this.manipulationStartLeft+(ke.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ke.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ke):this.state==="rotate"&&this.rotate(ye)},Pe.prototype.resize=function(ye){var ke=this.manipulationStartLeft,$e=this.manipulationStartWidth,Le=this.manipulationStartTop,vt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ke=this.manipulationStartLeft+ye.x-this.manipulationStartX,$e=this.manipulationStartWidth+this.manipulationStartLeft-ke;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:$e=this.manipulationStartWidth+ye.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Le=this.manipulationStartTop+ye.y-this.manipulationStartY,vt=this.manipulationStartHeight+this.manipulationStartTop-Le;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:vt=this.manipulationStartHeight+ye.y-this.manipulationStartY}$e>=0?(this.left=ke,this.width=$e):(this.left=ke+$e,this.width=-$e),vt>=0?(this.top=Le,this.height=vt):(this.top=Le+vt,this.height=-vt),this.setSize()},Pe.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Pe.prototype.rotate=function(ye){if(Math.abs(ye.x-this.centerX)>.1){var ke=Math.sign(ye.x-this.centerX);this.rotationAngle=180*Math.atan((ye.y-this.centerY)/(ye.x-this.centerX))/Math.PI+90*ke,this.applyRotation()}},Pe.prototype.applyRotation=function(){var ye=this.container.transform.baseVal.getItem(0);ye.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ye,0)},Pe.prototype.rotatePoint=function(ye){if(this.rotationAngle===0)return ye;var ke=this.container.getCTM(),$e=st.createPoint(ye.x,ye.y);return{x:($e=$e.matrixTransform(ke)).x,y:$e.y}},Pe.prototype.unrotatePoint=function(ye){if(this.rotationAngle===0)return ye;var ke=this.container.getCTM();ke=ke.inverse();var $e=st.createPoint(ye.x,ye.y);return{x:($e=$e.matrixTransform(ke)).x,y:$e.y}},Pe.prototype.select=function(){Te.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Pe.prototype.deselect=function(){Te.prototype.deselect.call(this),this.controlBox.style.display="none"},Pe.prototype.setupControlBox=function(){this.controlBox=st.createGroup();var ye=st.createTransform();ye.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(ye),this.container.appendChild(this.controlBox),this.controlRect=st.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=st.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Fe,this.addControlGrips(),this.controlBox.style.display="none"},Pe.prototype.adjustControlBox=function(){var ye=this.controlBox.transform.baseVal.getItem(0);ye.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(ye,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()},Pe.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()},Pe.prototype.createGrip=function(){var ye=new je;return ye.visual.transform.baseVal.appendItem(st.createTransform()),this.controlBox.appendChild(ye.visual),ye},Pe.prototype.positionGrips=function(){var ye=this.controlGrips.topLeft.GRIP_SIZE,ke=-ye/2,$e=ke,Le=(this.width+this.CB_DISTANCE)/2-ye/2,vt=(this.height+this.CB_DISTANCE)/2-ye/2,an=this.height+this.CB_DISTANCE-ye/2,bn=this.width+this.CB_DISTANCE-ye/2;this.positionGrip(this.controlGrips.topLeft.visual,ke,$e),this.positionGrip(this.controlGrips.topCenter.visual,Le,$e),this.positionGrip(this.controlGrips.topRight.visual,bn,$e),this.positionGrip(this.controlGrips.centerLeft.visual,ke,vt),this.positionGrip(this.controlGrips.centerRight.visual,bn,vt),this.positionGrip(this.controlGrips.bottomLeft.visual,ke,an),this.positionGrip(this.controlGrips.bottomCenter.visual,Le,an),this.positionGrip(this.controlGrips.bottomRight.visual,bn,an),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Le,$e-3*this.CB_DISTANCE)},Pe.prototype.positionGrip=function(ye,ke,$e){var Le=ye.transform.baseVal.getItem(0);Le.setTranslate(ke,$e),ye.transform.baseVal.replaceItem(Le,0)},Pe.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Pe.prototype.showControlBox=function(){this.controlBox.style.display=""},Pe.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ze.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ze.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Te.prototype.getState.call(this))},Pe.prototype.restoreState=function(ye){Te.prototype.restoreState.call(this,ye);var ke=ye;this.left=ke.left,this.top=ke.top,this.width=ke.width,this.height=ke.height,this.rotationAngle=ke.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ze.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ke.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ze.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ke.containerTransformMatrix))},Pe.prototype.scale=function(ye,ke){Te.prototype.scale.call(this,ye,ke);var $e=this.rotatePoint({x:this.left,y:this.top}),Le=this.unrotatePoint({x:$e.x*ye,y:$e.y*ke});this.left=Le.x,this.top=Le.y,this.width=this.width*ye,this.height=this.height*ke,this.adjustControlBox()},Pe}(Ne),Je=function(Te){function Pe(ye,ke,$e){var Le=Te.call(this,ye,ke,$e)||this;return Le.fillColor="transparent",Le.strokeColor="transparent",Le.strokeWidth=0,Le.strokeDasharray="",Le.opacity=1,Le.setStrokeColor=Le.setStrokeColor.bind(Le),Le.setFillColor=Le.setFillColor.bind(Le),Le.setStrokeWidth=Le.setStrokeWidth.bind(Le),Le.setStrokeDasharray=Le.setStrokeDasharray.bind(Le),Le.createVisual=Le.createVisual.bind(Le),Le}return Me(Pe,Te),Pe.prototype.ownsTarget=function(ye){return!(!Te.prototype.ownsTarget.call(this,ye)&&ye!==this.visual)},Pe.prototype.createVisual=function(){this.visual=st.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},Pe.prototype.pointerDown=function(ye,ke){Te.prototype.pointerDown.call(this,ye,ke),this.state==="new"&&(this.createVisual(),this.moveVisual(ye),this._state="creating")},Pe.prototype.manipulate=function(ye){Te.prototype.manipulate.call(this,ye)},Pe.prototype.resize=function(ye){Te.prototype.resize.call(this,ye),this.setSize()},Pe.prototype.setSize=function(){Te.prototype.setSize.call(this),st.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Pe.prototype.pointerUp=function(ye){Te.prototype.pointerUp.call(this,ye),this.setSize()},Pe.prototype.setStrokeColor=function(ye){this.strokeColor=ye,this.visual&&st.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ye),this.stateChanged()},Pe.prototype.setFillColor=function(ye){this.fillColor=ye,this.visual&&st.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Pe.prototype.setStrokeWidth=function(ye){this.strokeWidth=ye,this.visual&&st.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Pe.prototype.setStrokeDasharray=function(ye){this.strokeDasharray=ye,this.visual&&st.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Pe.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Te.prototype.getState.call(this))},Pe.prototype.restoreState=function(ye){var ke=ye;this.fillColor=ke.fillColor,this.strokeColor=ke.strokeColor,this.strokeWidth=ke.strokeWidth,this.strokeDasharray=ke.strokeDasharray,this.opacity=ke.opacity,this.createVisual(),Te.prototype.restoreState.call(this,ye),this.setSize()},Pe.prototype.scale=function(ye,ke){Te.prototype.scale.call(this,ye,ke),this.setSize()},Pe.title="Rectangle marker",Pe}(Xe),dt=function(Te){function Pe(ye,ke,$e,Le){var vt=Te.call(this,ye,Le||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return vt.widths=[],vt.widthBoxes=[],vt.widths=ke,vt.currentWidth=$e,vt.setCurrentWidth=vt.setCurrentWidth.bind(vt),vt}return Me(Pe,Te),Pe.prototype.getUi=function(){var ye=this,ke=document.createElement("div");return ke.style.display="flex",ke.style.overflow="hidden",ke.style.flexGrow="2",this.widths.forEach(function($e){var Le=document.createElement("div");Le.style.display="flex",Le.style.flexGrow="2",Le.style.alignItems="center",Le.style.justifyContent="space-between",Le.style.padding="5px",Le.style.borderWidth="2px",Le.style.borderStyle="solid",Le.style.borderColor=$e===ye.currentWidth?ye.uiStyleSettings.toolboxAccentColor:"transparent",Le.addEventListener("click",function(){ye.setCurrentWidth($e,Le)}),ke.appendChild(Le);var vt=document.createElement("div");vt.innerText=$e.toString(),vt.style.marginRight="5px",Le.appendChild(vt);var an=document.createElement("div");an.style.minHeight="20px",an.style.flexGrow="2",an.style.display="flex",an.style.alignItems="center";var bn=document.createElement("hr");bn.style.minWidth="20px",bn.style.border="0px",bn.style.borderTop=$e+"px solid "+ye.uiStyleSettings.toolboxColor,bn.style.flexGrow="2",an.appendChild(bn),Le.appendChild(an),ye.widthBoxes.push(Le)}),ke},Pe.prototype.setCurrentWidth=function(ye,ke){var $e=this;this.currentWidth=ye,this.widthBoxes.forEach(function(Le){Le.style.borderColor=Le===ke?$e.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Pe}(ve),He=function(Te){function Pe(ye,ke,$e,Le){var vt=Te.call(this,ye,Le||'<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 vt.styles=[],vt.styleBoxes=[],vt.styles=ke,vt.currentStyle=$e,vt.setCurrentStyle=vt.setCurrentStyle.bind(vt),vt}return Me(Pe,Te),Pe.prototype.getUi=function(){var ye=this,ke=document.createElement("div");return ke.style.display="flex",ke.style.overflow="hidden",ke.style.flexGrow="2",this.styles.forEach(function($e){var Le=document.createElement("div");Le.style.display="flex",Le.style.alignItems="center",Le.style.justifyContent="space-between",Le.style.padding="5px",Le.style.borderWidth="2px",Le.style.borderStyle="solid",Le.style.overflow="hidden",Le.style.maxWidth=100/ye.styles.length-5+"%",Le.style.borderColor=$e===ye.currentStyle?ye.uiStyleSettings.toolboxAccentColor:"transparent",Le.addEventListener("click",function(){ye.setCurrentStyle($e,Le)}),ke.appendChild(Le);var vt=document.createElement("div");vt.style.minHeight="20px",vt.style.flexGrow="2",vt.style.overflow="hidden";var an=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+ye.uiStyleSettings.toolboxColor+'" stroke-width="3" '+($e!==""?'stroke-dasharray="'+$e+'"':"")+` />
|
|
|
</svg>`;vt.innerHTML=an,Le.appendChild(vt),ye.styleBoxes.push(Le)}),ke},Pe.prototype.setCurrentStyle=function(ye,ke){var $e=this;this.currentStyle=ye,this.styleBoxes.forEach(function(Le){Le.style.borderColor=Le===ke?$e.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Pe}(ve),bt=function(Te){function Pe(ye,ke,$e){var Le=Te.call(this,ye,ke,$e)||this;return Le.strokeColor=$e.defaultColor,Le.strokeWidth=$e.defaultStrokeWidth,Le.strokeDasharray=$e.defaultStrokeDasharray,Le.strokePanel=new be("Line color",$e.defaultColorSet,$e.defaultColor),Le.strokePanel.onColorChanged=Le.setStrokeColor,Le.strokeWidthPanel=new dt("Line width",$e.defaultStrokeWidths,$e.defaultStrokeWidth),Le.strokeWidthPanel.onWidthChanged=Le.setStrokeWidth,Le.strokeStylePanel=new He("Line style",$e.defaultStrokeDasharrays,$e.defaultStrokeDasharray),Le.strokeStylePanel.onStyleChanged=Le.setStrokeDasharray,Le}return Me(Pe,Te),Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Te.prototype.getState.call(this);return ye.typeName=Pe.typeName,ye},Pe.typeName="FrameMarker",Pe.title="Frame marker",Pe.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Pe}(Je),et=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"},It=function(Te){function Pe(ye,ke,$e){var Le=Te.call(this,ye,ke,$e)||this;return Le.x1=0,Le.y1=0,Le.x2=0,Le.y2=0,Le.defaultLength=50,Le.manipulationStartX=0,Le.manipulationStartY=0,Le.manipulationStartX1=0,Le.manipulationStartY1=0,Le.manipulationStartX2=0,Le.manipulationStartY2=0,Le.setupControlBox(),Le}return Me(Pe,Te),Pe.prototype.ownsTarget=function(ye){return!!Te.prototype.ownsTarget.call(this,ye)||!(!this.grip1.ownsTarget(ye)&&!this.grip2.ownsTarget(ye))},Pe.prototype.pointerDown=function(ye,ke){Te.prototype.pointerDown.call(this,ye,ke),this.manipulationStartX=ye.x,this.manipulationStartY=ye.y,this.state==="new"&&(this.x1=ye.x,this.y1=ye.y,this.x2=ye.x,this.y2=ye.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(ke)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ke)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Pe.prototype.pointerUp=function(ye){var ke=this.state;Te.prototype.pointerUp.call(this,ye),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(ye),this._state="select",ke==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Pe.prototype.adjustVisual=function(){},Pe.prototype.manipulate=function(ye){this.state==="creating"?this.resize(ye):this.state==="move"?(this.x1=this.manipulationStartX1+ye.x-this.manipulationStartX,this.y1=this.manipulationStartY1+ye.y-this.manipulationStartY,this.x2=this.manipulationStartX2+ye.x-this.manipulationStartX,this.y2=this.manipulationStartY2+ye.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(ye)},Pe.prototype.resize=function(ye){switch(this.activeGrip){case this.grip1:this.x1=ye.x,this.y1=ye.y;break;case this.grip2:case void 0:this.x2=ye.x,this.y2=ye.y}this.adjustVisual(),this.adjustControlBox()},Pe.prototype.select=function(){Te.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Pe.prototype.deselect=function(){Te.prototype.deselect.call(this),this.controlBox.style.display="none"},Pe.prototype.setupControlBox=function(){this.controlBox=st.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Pe.prototype.adjustControlBox=function(){this.positionGrips()},Pe.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Pe.prototype.createGrip=function(){var ye=new je;return ye.visual.transform.baseVal.appendItem(st.createTransform()),this.controlBox.appendChild(ye.visual),ye},Pe.prototype.positionGrips=function(){var ye=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-ye/2,this.y1-ye/2),this.positionGrip(this.grip2.visual,this.x2-ye/2,this.y2-ye/2)},Pe.prototype.positionGrip=function(ye,ke,$e){var Le=ye.transform.baseVal.getItem(0);Le.setTranslate(ke,$e),ye.transform.baseVal.replaceItem(Le,0)},Pe.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Te.prototype.getState.call(this))},Pe.prototype.restoreState=function(ye){Te.prototype.restoreState.call(this,ye);var ke=ye;this.x1=ke.x1,this.y1=ke.y1,this.x2=ke.x2,this.y2=ke.y2},Pe.prototype.scale=function(ye,ke){Te.prototype.scale.call(this,ye,ke),this.x1=this.x1*ye,this.y1=this.y1*ke,this.x2=this.x2*ye,this.y2=this.y2*ke,this.adjustVisual(),this.adjustControlBox()},Pe}(Ne),xt=function(Te){function Pe(ye,ke,$e){var Le=Te.call(this,ye,ke,$e)||this;return Le.strokeColor="transparent",Le.strokeWidth=0,Le.strokeDasharray="",Le.setStrokeColor=Le.setStrokeColor.bind(Le),Le.setStrokeWidth=Le.setStrokeWidth.bind(Le),Le.setStrokeDasharray=Le.setStrokeDasharray.bind(Le),Le.strokeColor=$e.defaultColor,Le.strokeWidth=$e.defaultStrokeWidth,Le.strokeDasharray=$e.defaultStrokeDasharray,Le.strokePanel=new be("Line color",$e.defaultColorSet,$e.defaultColor),Le.strokePanel.onColorChanged=Le.setStrokeColor,Le.strokeWidthPanel=new dt("Line width",$e.defaultStrokeWidths,$e.defaultStrokeWidth),Le.strokeWidthPanel.onWidthChanged=Le.setStrokeWidth,Le.strokeStylePanel=new He("Line style",$e.defaultStrokeDasharrays,$e.defaultStrokeDasharray),Le.strokeStylePanel.onStyleChanged=Le.setStrokeDasharray,Le}return Me(Pe,Te),Pe.prototype.ownsTarget=function(ye){return!(!Te.prototype.ownsTarget.call(this,ye)&&ye!==this.visual&&ye!==this.selectorLine&&ye!==this.visibleLine)},Pe.prototype.createVisual=function(){this.visual=st.createGroup(),this.selectorLine=st.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=st.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},Pe.prototype.pointerDown=function(ye,ke){Te.prototype.pointerDown.call(this,ye,ke),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Pe.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),st.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),st.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),st.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Pe.prototype.setStrokeColor=function(ye){this.strokeColor=ye,this.adjustVisual(),this.colorChanged(ye)},Pe.prototype.setStrokeWidth=function(ye){this.strokeWidth=ye,this.adjustVisual()},Pe.prototype.setStrokeDasharray=function(ye){this.strokeDasharray=ye,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Te.prototype.getState.call(this));return ye.typeName=Pe.typeName,ye},Pe.prototype.restoreState=function(ye){Te.prototype.restoreState.call(this,ye);var ke=ye;this.strokeColor=ke.strokeColor,this.strokeWidth=ke.strokeWidth,this.strokeDasharray=ke.strokeDasharray,this.createVisual(),this.adjustVisual()},Pe.typeName="LineMarker",Pe.title="Line marker",Pe.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Pe}(It),Bt=function(Te){function Pe(ye,ke,$e,Le){var vt=Te.call(this,ye,Le||'<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 vt.fonts=[],vt.fontBoxes=[],vt.fonts=ke,vt.currentFont=$e,vt.setCurrentFont=vt.setCurrentFont.bind(vt),vt}return Me(Pe,Te),Pe.prototype.getUi=function(){var ye=this,ke=document.createElement("div");return ke.style.overflow="hidden",ke.style.flexGrow="2",this.fonts.forEach(function($e){var Le=document.createElement("div");Le.style.display="inline-block",Le.style.alignItems="center",Le.style.justifyContent="space-between",Le.style.padding="5px",Le.style.borderWidth="2px",Le.style.borderStyle="solid",Le.style.overflow="hidden",Le.style.maxWidth=100/ye.fonts.length-5+"%",Le.style.borderColor=$e===ye.currentFont?ye.uiStyleSettings.toolboxAccentColor:"transparent",Le.addEventListener("click",function(){ye.setCurrentFont($e,Le)}),ke.appendChild(Le);var vt=document.createElement("div");vt.style.display="flex",vt.style.minHeight="20px",vt.style.flexGrow="2",vt.style.fontFamily=$e,vt.style.overflow="hidden";var an=document.createElement("div");an.style.whiteSpace="nowrap",an.style.overflow="hidden",an.style.textOverflow="ellipsis",an.innerHTML="The quick brown fox jumps over the lazy dog",vt.appendChild(an),Le.appendChild(vt),ye.fontBoxes.push(Le)}),ke},Pe.prototype.setCurrentFont=function(ye,ke){var $e=this;this.currentFont=ye,this.fontBoxes.forEach(function(Le){Le.style.borderColor=Le===ke?$e.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Pe}(ve),Ut=function(Te){function Pe(ye,ke,$e){var Le=Te.call(this,ye,ke,$e)||this;return Le.color="transparent",Le.padding=5,Le.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Le.text=Le.DEFAULT_TEXT,Le.isMoved=!1,Le.color=$e.defaultColor,Le.fontFamily=$e.defaultFontFamily,Le.defaultSize={x:100,y:30},Le.setColor=Le.setColor.bind(Le),Le.setFont=Le.setFont.bind(Le),Le.renderText=Le.renderText.bind(Le),Le.sizeText=Le.sizeText.bind(Le),Le.textEditDivClicked=Le.textEditDivClicked.bind(Le),Le.showTextEditor=Le.showTextEditor.bind(Le),Le.setSize=Le.setSize.bind(Le),Le.positionTextEditor=Le.positionTextEditor.bind(Le),Le.colorPanel=new be("Color",$e.defaultColorSet,$e.defaultColor),Le.colorPanel.onColorChanged=Le.setColor,Le.fontFamilyPanel=new Bt("Font",$e.defaultFontFamilies,$e.defaultFontFamily),Le.fontFamilyPanel.onFontChanged=Le.setFont,Le}return Me(Pe,Te),Pe.prototype.ownsTarget=function(ye){if(Te.prototype.ownsTarget.call(this,ye)||ye===this.visual||ye===this.textElement||ye===this.bgRectangle)return!0;var ke=!1;return this.textElement.childNodes.forEach(function($e){$e===ye&&(ke=!0)}),ke},Pe.prototype.createVisual=function(){this.visual=st.createGroup(),this.bgRectangle=st.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=st.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(st.createTransform()),this.textElement.transform.baseVal.appendItem(st.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Pe.prototype.pointerDown=function(ye,ke){Te.prototype.pointerDown.call(this,ye,ke),this.isMoved=!1,this.pointerDownPoint=ye,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ye),this._state="creating")},Pe.prototype.renderText=function(){var ye=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(ke){ye.textElement.appendChild(st.createTSpan(ke.trim()===""?" ":ke.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Pe.prototype.getTextScale=function(){var ye=this.textElement.getBBox(),ke=1;if(ye.width>0&&ye.height>0){var $e=(1*this.width-this.width*this.padding*2/100)/ye.width,Le=(1*this.height-this.height*this.padding*2/100)/ye.height;ke=Math.min($e,Le)}return ke},Pe.prototype.getTextPosition=function(ye){var ke=this.textElement.getBBox(),$e=0,Le=0;return ke.width>0&&ke.height>0&&($e=(this.width-ke.width*ye)/2,Le=this.height/2-ke.height*ye/2),{x:$e,y:Le}},Pe.prototype.sizeText=function(){var ye=this.textElement.getBBox(),ke=this.getTextScale(),$e=this.getTextPosition(ke);$e.y-=ye.y*ke,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+$e.x+"px, "+$e.y+"px) scale("+ke+", "+ke+")":(this.textElement.transform.baseVal.getItem(0).setTranslate($e.x,$e.y),this.textElement.transform.baseVal.getItem(1).setScale(ke,ke))},Pe.prototype.manipulate=function(ye){Te.prototype.manipulate.call(this,ye),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ye.x-this.pointerDownPoint.x)>5||Math.abs(ye.y-this.pointerDownPoint.y)>5)},Pe.prototype.resize=function(ye){Te.prototype.resize.call(this,ye),this.isMoved=!0,this.setSize(),this.sizeText()},Pe.prototype.setSize=function(){Te.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(st.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),st.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Pe.prototype.pointerUp=function(ye){var ke=this.state;ke==="creating"&&(this._suppressMarkerCreateEvent=!0),Te.prototype.pointerUp.call(this,ye),this.setSize(),(ke==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Pe.prototype.showTextEditor=function(){var ye=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(ke){ke.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ke=Number.parseFloat(ye.textEditor.style.fontSize);ye.textEditor.clientWidth>=Number.parseInt(ye.textEditor.style.maxWidth)&&ke>.9;)ke-=.1,ye.textEditor.style.fontSize=Math.max(ke,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ke){ke.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ke){if(ke.clipboardData){var $e=ke.clipboardData.getData("text"),Le=window.getSelection();if(!Le.rangeCount)return!1;Le.deleteFromDocument(),Le.getRangeAt(0).insertNode(document.createTextNode($e)),ke.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){ye.textEditDivClicked(ye.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Pe.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var ye=this.getTextScale(),ke=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),$e=this.textElement.getBBox(),Le={x:$e.width*ye,y:$e.height*ye};ke.x-=Le.x/2,ke.y-=Le.y/2,this.textEditor.style.top=ke.y+"px",this.textEditor.style.left=ke.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ke.x+"px",this.textEditor.style.fontSize=Math.max(16*ye,12)+"px",this.textElement.style.display="none"}},Pe.prototype.textEditDivClicked=function(ye){this.text=ye.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Pe.prototype.select=function(){Te.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Pe.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Te.prototype.deselect.call(this)},Pe.prototype.dblClick=function(ye,ke){Te.prototype.dblClick.call(this,ye,ke),this.showTextEditor()},Pe.prototype.setColor=function(ye){this.textElement&&st.setAttributes(this.textElement,[["fill",ye]]),this.color=ye,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(ye)},Pe.prototype.setFont=function(ye){this.textElement&&st.setAttributes(this.textElement,[["font-family",ye]]),this.fontFamily=ye,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Pe.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Pe.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Te.prototype.getState.call(this));return ye.typeName=Pe.typeName,ye},Pe.prototype.restoreState=function(ye){var ke=ye;this.color=ke.color,this.fontFamily=ke.fontFamily,this.padding=ke.padding,this.text=ke.text,this.createVisual(),Te.prototype.restoreState.call(this,ye),this.setSize()},Pe.prototype.scale=function(ye,ke){Te.prototype.scale.call(this,ye,ke),this.setSize(),this.sizeText(),this.positionTextEditor()},Pe.typeName="TextMarker",Pe.title="Text marker",Pe.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>',Pe}(Xe),Nt=function(Te){function Pe(ye,ke,$e){var Le=Te.call(this,ye,ke,$e)||this;return Le.color="transparent",Le.lineWidth=3,Le.drawing=!1,Le.pixelRatio=1,Le.color=$e.defaultColor,Le.lineWidth=$e.defaultStrokeWidth,Le.pixelRatio=$e.freehandPixelRatio,Le.setColor=Le.setColor.bind(Le),Le.addCanvas=Le.addCanvas.bind(Le),Le.finishCreation=Le.finishCreation.bind(Le),Le.setLineWidth=Le.setLineWidth.bind(Le),Le.colorPanel=new be("Color",$e.defaultColorSet,$e.defaultColor),Le.colorPanel.onColorChanged=Le.setColor,Le.lineWidthPanel=new dt("Line width",$e.defaultStrokeWidths,$e.defaultStrokeWidth),Le.lineWidthPanel.onWidthChanged=Le.setLineWidth,Le}return Me(Pe,Te),Pe.prototype.ownsTarget=function(ye){return!(!Te.prototype.ownsTarget.call(this,ye)&&ye!==this.visual&&ye!==this.drawingImage)},Pe.prototype.createVisual=function(){this.visual=st.createGroup(),this.drawingImage=st.createImage(),this.visual.appendChild(this.drawingImage);var ye=st.createTransform();this.visual.transform.baseVal.appendItem(ye),this.addMarkerVisualToContainer(this.visual)},Pe.prototype.pointerDown=function(ye,ke){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(ye.x,ye.y),this.drawing=!0):Te.prototype.pointerDown.call(this,ye,ke)},Pe.prototype.manipulate=function(ye){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(ye.x,ye.y),this.canvasContext.stroke()):Te.prototype.manipulate.call(this,ye)},Pe.prototype.resize=function(ye){Te.prototype.resize.call(this,ye),st.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),st.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Pe.prototype.pointerUp=function(ye){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Te.prototype.pointerUp.call(this,ye)},Pe.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)},Pe.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Te.prototype.select.call(this)},Pe.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Te.prototype.deselect.call(this)},Pe.prototype.finishCreation=function(){for(var ye=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ke=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],$e=ke[0],Le=ke[1],vt=ke[2],an=ke[3],bn=!1,en=0;en<this.canvasElement.height;en++)for(var wn=0;wn<this.canvasElement.width;wn++)ye.data[en*this.canvasElement.width*4+4*wn+3]>0&&(bn=!0,en<Le&&(Le=en),wn<$e&&($e=wn),en>an&&(an=en),wn>vt&&(vt=wn));if(bn){this.left=$e/this.pixelRatio,this.top=Le/this.pixelRatio,this.width=(vt-$e)/this.pixelRatio,this.height=(an-Le)/this.pixelRatio;var ai=document.createElement("canvas");ai.width=vt-$e,ai.height=an-Le,ai.getContext("2d").putImageData(this.canvasContext.getImageData($e,Le,vt-$e,an-Le),0,0),this.drawingImgUrl=ai.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Pe.prototype.setDrawingImage=function(){st.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),st.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Pe.prototype.setColor=function(ye){this.color=ye,this.colorChanged(ye)},Pe.prototype.setLineWidth=function(ye){this.lineWidth=ye},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Object.assign({drawingImgUrl:this.drawingImgUrl},Te.prototype.getState.call(this));return ye.typeName=Pe.typeName,ye},Pe.prototype.restoreState=function(ye){this.createVisual(),Te.prototype.restoreState.call(this,ye),this.drawingImgUrl=ye.drawingImgUrl,this.setDrawingImage()},Pe.prototype.scale=function(ye,ke){Te.prototype.scale.call(this,ye,ke),this.setDrawingImage()},Pe.typeName="FreehandMarker",Pe.title="Freehand marker",Pe.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>',Pe}(Xe),qe=function(Te){function Pe(ye,ke,$e){var Le=Te.call(this,ye,$e||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Le.typeBoxes=[],Le.currentType=ke,Le.setCurrentType=Le.setCurrentType.bind(Le),Le}return Me(Pe,Te),Pe.prototype.getUi=function(){var ye=this,ke=document.createElement("div");ke.style.display="flex",ke.style.overflow="hidden",ke.style.flexGrow="2";for(var $e=function(an){var bn="both";switch(an){case 0:bn="both";break;case 1:bn="start";break;case 2:bn="end";break;case 3:bn="none"}var en=document.createElement("div");if(en.style.display="flex",en.style.flexGrow="2",en.style.alignItems="center",en.style.justifyContent="space-between",en.style.padding="5px",en.style.borderWidth="2px",en.style.borderStyle="solid",en.style.borderColor=bn===Le.currentType?Le.uiStyleSettings.toolboxAccentColor:"transparent",en.addEventListener("click",function(){ye.setCurrentType(bn,en)}),ke.appendChild(en),bn==="both"||bn==="start"){var wn=document.createElement("div");wn.style.display="flex",wn.style.alignItems="center",wn.style.minHeight="20px",wn.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="`+(Le.uiStyleSettings!==void 0?Le.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,wn.style.marginLeft="5px",en.appendChild(wn)}var ai=document.createElement("div");ai.style.display="flex",ai.style.alignItems="center",ai.style.minHeight="20px",ai.style.flexGrow="2";var _n=document.createElement("hr");if(_n.style.minWidth="20px",_n.style.border="0px",_n.style.borderTop="3px solid "+(Le.uiStyleSettings!==void 0?Le.uiStyleSettings.toolboxColor:"#eeeeee"),_n.style.flexGrow="2",ai.appendChild(_n),en.appendChild(ai),bn==="both"||bn==="end"){var Hn=document.createElement("div");Hn.style.display="flex",Hn.style.alignItems="center",Hn.style.minHeight="20px",Hn.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="`+(Le.uiStyleSettings!==void 0?Le.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Hn.style.marginRight="5px",en.appendChild(Hn)}Le.typeBoxes.push(en)},Le=this,vt=0;vt<4;vt++)$e(vt);return ke},Pe.prototype.setCurrentType=function(ye,ke){var $e=this;this.currentType=ye,this.typeBoxes.forEach(function(Le){Le.style.borderColor=Le===ke?$e.uiStyleSettings!==void 0?$e.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Pe}(ve),Ke=function(Te){function Pe(ye,ke,$e){var Le=Te.call(this,ye,ke,$e)||this;return Le.arrowType="end",Le.arrowBaseHeight=10,Le.arrowBaseWidth=10,Le.getArrowPoints=Le.getArrowPoints.bind(Le),Le.setArrowType=Le.setArrowType.bind(Le),Le.arrowTypePanel=new qe("Arrow type","end"),Le.arrowTypePanel.onArrowTypeChanged=Le.setArrowType,Le}return Me(Pe,Te),Pe.prototype.ownsTarget=function(ye){return!(!Te.prototype.ownsTarget.call(this,ye)&&ye!==this.arrow1&&ye!==this.arrow2)},Pe.prototype.getArrowPoints=function(ye,ke){var $e=this.arrowBaseWidth+2*this.strokeWidth,Le=this.arrowBaseHeight+2*this.strokeWidth;return ye-$e/2+","+(ke+Le/2)+" "+ye+","+(ke-Le/2)+" "+(ye+$e/2)+","+(ke+Le/2)},Pe.prototype.createTips=function(){this.arrow1=st.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(st.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=st.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(st.createTransform()),this.visual.appendChild(this.arrow2)},Pe.prototype.pointerDown=function(ye,ke){Te.prototype.pointerDown.call(this,ye,ke),this.state==="creating"&&this.createTips()},Pe.prototype.adjustVisual=function(){if(Te.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",st.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),st.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var ye=0;Math.abs(this.x1-this.x2)>.1&&(ye=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var ke=this.arrow1.transform.baseVal.getItem(0);ke.setRotate(ye,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ke,0);var $e=this.arrow2.transform.baseVal.getItem(0);$e.setRotate(ye+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem($e,0)}},Pe.prototype.setArrowType=function(ye){this.arrowType=ye,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Object.assign({arrowType:this.arrowType},Te.prototype.getState.call(this));return ye.typeName=Pe.typeName,ye},Pe.prototype.restoreState=function(ye){Te.prototype.restoreState.call(this,ye);var ke=ye;this.arrowType=ke.arrowType,this.createTips(),this.adjustVisual()},Pe.typeName="ArrowMarker",Pe.title="Arrow marker",Pe.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Pe}(xt),Tt=function(Te){function Pe(ye,ke,$e){var Le=Te.call(this,ye,ke,$e)||this;return Le.fillColor=$e.defaultFillColor,Le.strokeWidth=0,Le.fillPanel=new be("Color",$e.defaultColorSet,$e.defaultFillColor),Le.fillPanel.onColorChanged=Le.setFillColor,Le}return Me(Pe,Te),Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Te.prototype.getState.call(this);return ye.typeName=Pe.typeName,ye},Pe.typeName="CoverMarker",Pe.title="Cover marker",Pe.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Pe}(Je),Ln=function(Te){function Pe(ye,ke,$e,Le){var vt=Te.call(this,ye,Le||'<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 vt.opacities=[],vt.opacityBoxes=[],vt.opacities=ke,vt.currentOpacity=$e,vt.setCurrentOpacity=vt.setCurrentOpacity.bind(vt),vt}return Me(Pe,Te),Pe.prototype.getUi=function(){var ye=this,ke=document.createElement("div");return ke.style.display="flex",ke.style.overflow="hidden",ke.style.flexGrow="2",ke.style.justifyContent="space-between",this.opacities.forEach(function($e){var Le=document.createElement("div");Le.style.display="flex",Le.style.alignItems="center",Le.style.justifyContent="center",Le.style.padding="5px",Le.style.borderWidth="2px",Le.style.borderStyle="solid",Le.style.borderColor=$e===ye.currentOpacity?ye.uiStyleSettings.toolboxAccentColor:"transparent",Le.addEventListener("click",function(){ye.setCurrentOpacity($e,Le)}),ke.appendChild(Le);var vt=document.createElement("div");vt.innerText=100*$e+"%",Le.appendChild(vt),ye.opacityBoxes.push(Le)}),ke},Pe.prototype.setCurrentOpacity=function(ye,ke){var $e=this;this.currentOpacity=ye,this.opacityBoxes.forEach(function(Le){Le.style.borderColor=Le===ke?$e.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Pe}(ve),Mn=function(Te){function Pe(ye,ke,$e){var Le=Te.call(this,ye,ke,$e)||this;return Le.setOpacity=Le.setOpacity.bind(Le),Le.fillColor=$e.defaultHighlightColor,Le.strokeWidth=0,Le.opacity=$e.defaultHighlightOpacity,Le.fillPanel=new be("Color",$e.defaultColorSet,Le.fillColor),Le.fillPanel.onColorChanged=Le.setFillColor,Le.opacityPanel=new Ln("Opacity",$e.defaultOpacitySteps,Le.opacity),Le.opacityPanel.onOpacityChanged=Le.setOpacity,Le}return Me(Pe,Te),Pe.prototype.setOpacity=function(ye){this.opacity=ye,this.visual&&st.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Te.prototype.getState.call(this);return ye.typeName=Pe.typeName,ye},Pe.typeName="HighlightMarker",Pe.title="Highlight marker",Pe.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>',Pe}(Tt),zt='<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>',rn='<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>',xn=function(Te){function Pe(ye,ke,$e){var Le=Te.call(this,ye,ke,$e)||this;return Le.bgColor="transparent",Le.tipPosition={x:0,y:0},Le.tipBase1Position={x:0,y:0},Le.tipBase2Position={x:0,y:0},Le.tipMoving=!1,Le.color=$e.defaultStrokeColor,Le.bgColor=$e.defaultFillColor,Le.fontFamily=$e.defaultFontFamily,Le.defaultSize={x:100,y:30},Le.setBgColor=Le.setBgColor.bind(Le),Le.getTipPoints=Le.getTipPoints.bind(Le),Le.positionTip=Le.positionTip.bind(Le),Le.setTipPoints=Le.setTipPoints.bind(Le),Le.colorPanel=new be("Text color",$e.defaultColorSet,Le.color,zt),Le.colorPanel.onColorChanged=Le.setColor,Le.bgColorPanel=new be("Fill color",$e.defaultColorSet,Le.bgColor,rn),Le.bgColorPanel.onColorChanged=Le.setBgColor,Le.fontFamilyPanel=new Bt("Font",$e.defaultFontFamilies,$e.defaultFontFamily),Le.fontFamilyPanel.onFontChanged=Le.setFont,Le.tipGrip=new je,Le.tipGrip.visual.transform.baseVal.appendItem(st.createTransform()),Le.controlBox.appendChild(Le.tipGrip.visual),Le}return Me(Pe,Te),Pe.prototype.ownsTarget=function(ye){return Te.prototype.ownsTarget.call(this,ye)||this.tipGrip.ownsTarget(ye)||this.tip===ye},Pe.prototype.createTip=function(){st.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=st.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Pe.prototype.pointerDown=function(ye,ke){this.state==="new"&&Te.prototype.pointerDown.call(this,ye,ke),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ke)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Te.prototype.pointerDown.call(this,ye,ke)},Pe.prototype.pointerUp=function(ye){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Te.prototype.pointerUp.call(this,ye);else{var ke=this.state==="creating";Te.prototype.pointerUp.call(this,ye),this.setTipPoints(ke),this.positionTip()}},Pe.prototype.manipulate=function(ye){if(this.tipMoving){var ke=this.unrotatePoint(ye);this.tipPosition={x:ke.x-this.manipulationStartLeft,y:ke.y-this.manipulationStartTop},this.positionTip()}else Te.prototype.manipulate.call(this,ye)},Pe.prototype.setBgColor=function(ye){this.bgRectangle&&this.tip&&(st.setAttributes(this.bgRectangle,[["fill",ye]]),st.setAttributes(this.tip,[["fill",ye]])),this.bgColor=ye,this.fillColorChanged(ye)},Pe.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},Pe.prototype.setTipPoints=function(ye){ye===void 0&&(ye=!1);var ke=Math.min(this.height/2,15),$e=this.height/5;ye&&(this.tipPosition={x:ke+$e/2,y:this.height+20});var Le=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Le<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?($e=this.width/5,ke=Math.min(this.width/2,15),this.tipBase1Position={x:ke,y:0},this.tipBase2Position={x:ke+$e,y:0}):(this.tipBase1Position={x:0,y:ke},this.tipBase2Position={x:0,y:ke+$e}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Le<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?($e=this.width/5,ke=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ke-$e,y:0},this.tipBase2Position={x:this.width-ke,y:0}):(this.tipBase1Position={x:this.width,y:ke},this.tipBase2Position={x:this.width,y:ke+$e}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Le<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?($e=this.width/5,ke=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ke-$e,y:this.height},this.tipBase2Position={x:this.width-ke,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ke-$e},this.tipBase2Position={x:this.width,y:this.height-ke}):Le<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?($e=this.width/5,ke=Math.min(this.width/2,15),this.tipBase1Position={x:ke,y:this.height},this.tipBase2Position={x:ke+$e,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ke},this.tipBase2Position={x:0,y:this.height-ke-$e})},Pe.prototype.resize=function(ye){Te.prototype.resize.call(this,ye),this.positionTip()},Pe.prototype.positionTip=function(){st.setAttributes(this.tip,[["points",this.getTipPoints()]]);var ye=this.tipGrip.visual.transform.baseVal.getItem(0);ye.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(ye,0)},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Pe.prototype.select=function(){this.positionTip(),Te.prototype.select.call(this)},Pe.prototype.getState=function(){var ye=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Te.prototype.getState.call(this));return ye.typeName=Pe.typeName,ye},Pe.prototype.restoreState=function(ye){var ke=ye;this.bgColor=ke.bgColor,this.tipPosition=ke.tipPosition,Te.prototype.restoreState.call(this,ye),this.createTip(),this.setTipPoints()},Pe.prototype.scale=function(ye,ke){Te.prototype.scale.call(this,ye,ke),this.tipPosition={x:this.tipPosition.x*ye,y:this.tipPosition.y*ke},this.positionTip()},Pe.typeName="CalloutMarker",Pe.title="Callout marker",Pe.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>',Pe}(Ut),Un=function(Te){function Pe(ye,ke,$e){var Le=Te.call(this,ye,ke,$e)||this;return Le.fillColor="transparent",Le.strokeColor="transparent",Le.strokeWidth=0,Le.strokeDasharray="",Le.opacity=1,Le.strokeColor=$e.defaultColor,Le.strokeWidth=$e.defaultStrokeWidth,Le.strokeDasharray=$e.defaultStrokeDasharray,Le.fillColor=$e.defaultFillColor,Le.setStrokeColor=Le.setStrokeColor.bind(Le),Le.setFillColor=Le.setFillColor.bind(Le),Le.setStrokeWidth=Le.setStrokeWidth.bind(Le),Le.setStrokeDasharray=Le.setStrokeDasharray.bind(Le),Le.setOpacity=Le.setOpacity.bind(Le),Le.createVisual=Le.createVisual.bind(Le),Le.strokePanel=new be("Line color",Ye($e.defaultColorSet,["transparent"]),$e.defaultColor),Le.strokePanel.onColorChanged=Le.setStrokeColor,Le.fillPanel=new be("Fill color",Ye($e.defaultColorSet,["transparent"]),Le.fillColor,rn),Le.fillPanel.onColorChanged=Le.setFillColor,Le.strokeWidthPanel=new dt("Line width",$e.defaultStrokeWidths,$e.defaultStrokeWidth),Le.strokeWidthPanel.onWidthChanged=Le.setStrokeWidth,Le.strokeStylePanel=new He("Line style",$e.defaultStrokeDasharrays,$e.defaultStrokeDasharray),Le.strokeStylePanel.onStyleChanged=Le.setStrokeDasharray,Le.opacityPanel=new Ln("Opacity",$e.defaultOpacitySteps,Le.opacity),Le.opacityPanel.onOpacityChanged=Le.setOpacity,Le}return Me(Pe,Te),Pe.prototype.ownsTarget=function(ye){return!(!Te.prototype.ownsTarget.call(this,ye)&&ye!==this.visual)},Pe.prototype.createVisual=function(){this.visual=st.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},Pe.prototype.pointerDown=function(ye,ke){Te.prototype.pointerDown.call(this,ye,ke),this.state==="new"&&(this.createVisual(),this.moveVisual(ye),this._state="creating")},Pe.prototype.manipulate=function(ye){Te.prototype.manipulate.call(this,ye)},Pe.prototype.resize=function(ye){Te.prototype.resize.call(this,ye),this.setSize()},Pe.prototype.setSize=function(){Te.prototype.setSize.call(this),st.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Pe.prototype.pointerUp=function(ye){Te.prototype.pointerUp.call(this,ye),this.setSize()},Pe.prototype.setStrokeColor=function(ye){this.strokeColor=ye,this.visual&&st.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ye),this.stateChanged()},Pe.prototype.setFillColor=function(ye){this.fillColor=ye,this.visual&&st.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(ye),this.stateChanged()},Pe.prototype.setStrokeWidth=function(ye){this.strokeWidth=ye,this.visual&&st.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Pe.prototype.setStrokeDasharray=function(ye){this.strokeDasharray=ye,this.visual&&st.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Pe.prototype.setOpacity=function(ye){this.opacity=ye,this.visual&&st.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Te.prototype.getState.call(this));return ye.typeName=Pe.typeName,ye},Pe.prototype.restoreState=function(ye){var ke=ye;this.fillColor=ke.fillColor,this.strokeColor=ke.strokeColor,this.strokeWidth=ke.strokeWidth,this.strokeDasharray=ke.strokeDasharray,this.opacity=ke.opacity,this.createVisual(),Te.prototype.restoreState.call(this,ye),this.setSize()},Pe.prototype.scale=function(ye,ke){Te.prototype.scale.call(this,ye,ke),this.setSize()},Pe.typeName="EllipseMarker",Pe.title="Ellipse marker",Pe.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>',Pe}(Xe),yn=function(Te){function Pe(ye,ke,$e){return Te.call(this,ye,ke,$e)||this}return Me(Pe,Te),Object.defineProperty(Pe.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Pe.prototype.ownsTarget=function(ye){return!(!Te.prototype.ownsTarget.call(this,ye)&&ye!==this.tip1&&ye!==this.tip2)},Pe.prototype.createTips=function(){this.tip1=st.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(st.createTransform()),this.visual.appendChild(this.tip1),this.tip2=st.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(st.createTransform()),this.visual.appendChild(this.tip2)},Pe.prototype.pointerDown=function(ye,ke){Te.prototype.pointerDown.call(this,ye,ke),this.state==="creating"&&this.createTips()},Pe.prototype.adjustVisual=function(){if(Te.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(st.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),st.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var ye=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ke=this.tip1.transform.baseVal.getItem(0);ke.setRotate(ye,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ke,0);var $e=this.tip2.transform.baseVal.getItem(0);$e.setRotate(ye+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem($e,0)}},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Te.prototype.getState.call(this);return ye.typeName=Pe.typeName,ye},Pe.prototype.restoreState=function(ye){Te.prototype.restoreState.call(this,ye),this.createTips(),this.adjustVisual()},Pe.typeName="MeasurementMarker",Pe.title="Measurement marker",Pe.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>',Pe}(xt),sn=function(Te){function Pe(ye,ke,$e){var Le=Te.call(this,ye,ke,$e)||this;return Le.strokePanel.colors=$e.defaultColorSet,Le.fillColor="transparent",Le}return Me(Pe,Te),Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Te.prototype.getState.call(this);return ye.typeName=Pe.typeName,ye},Pe.typeName="EllipseFrameMarker",Pe.title="Ellipse frame marker",Pe.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>',Pe}(Un),Lt=function(){function Te(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Te.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Te.prototype.addUndoStep=function(Pe){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Pe)||(this.undoStack.push(Pe),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Pe)&&this.redoStack.splice(0,this.redoStack.length))},Te.prototype.replaceLastUndoStep=function(Pe){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Pe)},Te.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Te.prototype.undo=function(){if(this.undoStack.length>1){var Pe=this.undoStack.pop();return Pe!==void 0&&this.redoStack.push(Pe),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Te.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Te}(),ti=function(Te){function Pe(ye,ke,$e){var Le=Te.call(this,ye,ke,$e)||this;return Le.strokeColor="transparent",Le.strokeWidth=0,Le.strokeDasharray="",Le.curveX=0,Le.curveY=0,Le.manipulationStartCurveX=0,Le.manipulationStartCurveY=0,Le.setStrokeColor=Le.setStrokeColor.bind(Le),Le.setStrokeWidth=Le.setStrokeWidth.bind(Le),Le.setStrokeDasharray=Le.setStrokeDasharray.bind(Le),Le.positionGrips=Le.positionGrips.bind(Le),Le.addControlGrips=Le.addControlGrips.bind(Le),Le.adjustVisual=Le.adjustVisual.bind(Le),Le.setupControlBox=Le.setupControlBox.bind(Le),Le.resize=Le.resize.bind(Le),Le.strokeColor=$e.defaultColor,Le.strokeWidth=$e.defaultStrokeWidth,Le.strokeDasharray=$e.defaultStrokeDasharray,Le.strokePanel=new be("Line color",$e.defaultColorSet,$e.defaultColor),Le.strokePanel.onColorChanged=Le.setStrokeColor,Le.strokeWidthPanel=new dt("Line width",$e.defaultStrokeWidths,$e.defaultStrokeWidth),Le.strokeWidthPanel.onWidthChanged=Le.setStrokeWidth,Le.strokeStylePanel=new He("Line style",$e.defaultStrokeDasharrays,$e.defaultStrokeDasharray),Le.strokeStylePanel.onStyleChanged=Le.setStrokeDasharray,Le}return Me(Pe,Te),Pe.prototype.ownsTarget=function(ye){return!(!Te.prototype.ownsTarget.call(this,ye)&&ye!==this.visual&&ye!==this.selectorCurve&&ye!==this.visibleCurve&&!this.curveGrip.ownsTarget(ye))},Pe.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Pe.prototype.createVisual=function(){this.visual=st.createGroup(),this.selectorCurve=st.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=st.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},Pe.prototype.pointerDown=function(ye,ke){Te.prototype.pointerDown.call(this,ye,ke),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=ye.x,this.curveY=ye.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ke)&&(this.activeGrip=this.curveGrip,this._state="resize")},Pe.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),st.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),st.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),st.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Pe.prototype.setupControlBox=function(){Te.prototype.setupControlBox.call(this),this.curveControlLine1=st.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=st.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},Pe.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Te.prototype.addControlGrips.call(this)},Pe.prototype.positionGrips=function(){Te.prototype.positionGrips.call(this);var ye=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-ye/2,this.curveY-ye/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()))},Pe.prototype.manipulate=function(ye){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+ye.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+ye.y-this.manipulationStartY),Te.prototype.manipulate.call(this,ye)},Pe.prototype.resize=function(ye){this.activeGrip===this.curveGrip&&(this.curveX=ye.x,this.curveY=ye.y),Te.prototype.resize.call(this,ye),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Pe.prototype.setStrokeColor=function(ye){this.strokeColor=ye,this.adjustVisual(),this.colorChanged(ye)},Pe.prototype.setStrokeWidth=function(ye){this.strokeWidth=ye,this.adjustVisual()},Pe.prototype.setStrokeDasharray=function(ye){this.strokeDasharray=ye,this.adjustVisual()},Pe.prototype.scale=function(ye,ke){this.curveX=this.curveX*ye,this.curveY=this.curveY*ke,Te.prototype.scale.call(this,ye,ke)},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Te.prototype.getState.call(this));return ye.typeName=Pe.typeName,ye},Pe.prototype.restoreState=function(ye){Te.prototype.restoreState.call(this,ye);var ke=ye;this.strokeColor=ke.strokeColor,this.strokeWidth=ke.strokeWidth,this.strokeDasharray=ke.strokeDasharray,this.curveX=ke.curveX,this.curveY=ke.curveY,this.createVisual(),this.adjustVisual()},Pe.typeName="CurveMarker",Pe.title="Curve marker",Pe.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>',Pe}(It),gi=function(Te){function Pe(ye,ke,$e){var Le=Te.call(this,ye,ke,$e)||this;return Le.fillColor="transparent",Le.strokeColor="transparent",Le.strokeWidth=0,Le.strokeDasharray="",Le.textColor="transparent",Le.fontSize="1rem",Le.isMoved=!1,Le.captionText="Caption",Le.PADDING=5,Le.captionBoxWidth=0,Le.captionBoxHeight=0,Le.strokeColor=$e.defaultColor,Le.strokeWidth=$e.defaultStrokeWidth,Le.strokeDasharray=$e.defaultStrokeDasharray,Le.fillColor=$e.defaultFillColor,Le.textColor=$e.defaultStrokeColor,Le.fontFamily=$e.defaultFontFamily,Le.fontSize=$e.defaultCaptionFontSize,Le.captionText=$e.defaultCaptionText,Le.setStrokeColor=Le.setStrokeColor.bind(Le),Le.setFillColor=Le.setFillColor.bind(Le),Le.setStrokeWidth=Le.setStrokeWidth.bind(Le),Le.setStrokeDasharray=Le.setStrokeDasharray.bind(Le),Le.createVisual=Le.createVisual.bind(Le),Le.sizeCaption=Le.sizeCaption.bind(Le),Le.setCaptionText=Le.setCaptionText.bind(Le),Le.showTextEditor=Le.showTextEditor.bind(Le),Le.positionTextEditor=Le.positionTextEditor.bind(Le),Le.finishTextEditing=Le.finishTextEditing.bind(Le),Le.setFont=Le.setFont.bind(Le),Le.setTextColor=Le.setTextColor.bind(Le),Le.strokePanel=new be("Line color",Ye($e.defaultColorSet,["transparent"]),Le.strokeColor),Le.strokePanel.onColorChanged=Le.setStrokeColor,Le.fillPanel=new be("Fill color",Ye($e.defaultColorSet,["transparent"]),Le.fillColor,rn),Le.fillPanel.onColorChanged=Le.setFillColor,Le.strokeWidthPanel=new dt("Line width",$e.defaultStrokeWidths,$e.defaultStrokeWidth),Le.strokeWidthPanel.onWidthChanged=Le.setStrokeWidth,Le.strokeStylePanel=new He("Line style",$e.defaultStrokeDasharrays,$e.defaultStrokeDasharray),Le.strokeStylePanel.onStyleChanged=Le.setStrokeDasharray,Le.fontFamilyPanel=new Bt("Font",$e.defaultFontFamilies,$e.defaultFontFamily),Le.fontFamilyPanel.onFontChanged=Le.setFont,Le.textColorPanel=new be("Text color",$e.defaultColorSet,Le.textColor,zt),Le.textColorPanel.onColorChanged=Le.setTextColor,Le}return Me(Pe,Te),Pe.prototype.ownsTarget=function(ye){return!(!Te.prototype.ownsTarget.call(this,ye)&&ye!==this.visual&&ye!==this.frame&&ye!==this.captionBg&&ye!==this.captionElement)},Pe.prototype.createVisual=function(){this.visual=st.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=st.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=st.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=st.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},Pe.prototype.setCaptionText=function(ye){this.captionText=ye,this.captionElement.textContent=this.captionText,this.sizeCaption()},Pe.prototype.pointerDown=function(ye,ke){Te.prototype.pointerDown.call(this,ye,ke),this.isMoved=!1,this.pointerDownPoint=ye,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ye),this._state="creating")},Pe.prototype.manipulate=function(ye){Te.prototype.manipulate.call(this,ye),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ye.x-this.pointerDownPoint.x)>5||Math.abs(ye.y-this.pointerDownPoint.y)>5)},Pe.prototype.resize=function(ye){Te.prototype.resize.call(this,ye),this.setSize()},Pe.prototype.sizeCaption=function(){var ye=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=ye.width+2*this.PADDING,this.captionBoxHeight=ye.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),st.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),st.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},Pe.prototype.showTextEditor=function(){var ye=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(ke){ke.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(ke){ke.key==="Enter"&&ye.finishTextEditing(ye.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(ke){ke.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){ye.finishTextEditing(ye.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){ye.finishTextEditing(ye.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Pe.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"))},Pe.prototype.finishTextEditing=function(ye){this.setCaptionText(ye.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Pe.prototype.setFont=function(ye){this.captionElement&&st.setAttributes(this.captionElement,[["font-family",ye]]),this.fontFamily=ye,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Pe.prototype.setTextColor=function(ye){this.captionElement&&st.setAttributes(this.captionElement,[["fill",ye]]),this.textColor=ye,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Pe.prototype.setSize=function(){Te.prototype.setSize.call(this),st.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Pe.prototype.pointerUp=function(ye){Te.prototype.pointerUp.call(this,ye),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Pe.prototype.dblClick=function(ye,ke){Te.prototype.dblClick.call(this,ye,ke),this.showTextEditor()},Pe.prototype.setStrokeColor=function(ye){this.strokeColor=ye,this.frame&&st.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(ye),this.stateChanged()},Pe.prototype.setFillColor=function(ye){this.fillColor=ye,this.captionBg&&st.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(ye),this.stateChanged()},Pe.prototype.setStrokeWidth=function(ye){this.strokeWidth=ye,this.frame&&st.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Pe.prototype.setStrokeDasharray=function(ye){this.strokeDasharray=ye,this.frame&&st.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},Te.prototype.getState.call(this));return ye.typeName=this.typeName,ye},Pe.prototype.restoreState=function(ye){var ke=ye;this.fillColor=ke.fillColor,this.strokeColor=ke.strokeColor,this.strokeWidth=ke.strokeWidth,this.strokeDasharray=ke.strokeDasharray,this.textColor=ke.textColor,this.fontFamily=ke.fontFamily,this.captionText=ke.captionText,this.fontSize=ke.fontSize,this.createVisual(),Te.prototype.restoreState.call(this,ye),this.setSize()},Pe.prototype.scale=function(ye,ke){Te.prototype.scale.call(this,ye,ke),this.setSize()},Pe.typeName="CaptionFrameMarker",Pe.title="Caption frame marker",Pe.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>',Pe}(Xe),Pn=function(){function Te(Pe,ye){ye===void 0&&(ye=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Pe,this.cancelable=ye}return Object.defineProperty(Te.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Te.prototype.preventDefault=function(){this._defaultPrevented=!0},Te}(),Xt=function(Te){function Pe(ye,ke,$e){var Le=Te.call(this,ye,!1)||this;return Le.dataUrl=ke,Le.state=$e,Le}return Me(Pe,Te),Pe}(Pn),Kt=function(Te){function Pe(ye,ke,$e){$e===void 0&&($e=!1);var Le=Te.call(this,ye,$e)||this;return Le.marker=ke,Le}return Me(Pe,Te),Pe}(Pn),Ot=function(){function Te(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return Te.prototype.addEventListener=function(Pe,ye){this[Pe].push(ye)},Te.prototype.removeEventListener=function(Pe,ye){var ke=this[Pe].indexOf(ye);ke>-1&&this[Pe].splice(ke,1)},Te}(),rt=function(){function Te(Pe){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new et,this._isOpen=!1,this.undoRedoManager=new Lt,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 Ot,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Te.instanceCounter++,this.styles=new te(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Pe,this.targetRoot=document.body,this.width=Pe.clientWidth,this.height=Pe.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(Te.prototype,"ALL_MARKER_TYPES",{get:function(){return[bt,Nt,Ke,Ut,sn,Un,Mn,xn,yn,Tt,xt,ti,gi]},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[bt,Nt,Ke,Ut,Un,Mn,xn]},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"BASIC_MARKER_TYPES",{get:function(){return[bt,Nt,Ke,Ut,Mn]},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Pe){var ye=this;this._availableMarkerTypes.splice(0),Pe.forEach(function(ke){if(typeof ke=="string"){var $e=ye.ALL_MARKER_TYPES.find(function(Le){return Le.typeName===ke});$e!==void 0&&ye._availableMarkerTypes.push($e)}else ye._availableMarkerTypes.push(ke)})},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Pe){this._zoomLevel=Pe,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(Te.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Te.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),pt.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Te.prototype.show=function(){var Pe=this;this.styles.styleSheetRoot===void 0&&Ie.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ie.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(ye){return ye(new Pn(Pe))})},Te.prototype.render=function(){return Mt(this,void 0,void 0,function(){var Pe;return Ct(this,function(ye){switch(ye.label){case 0:return this.setCurrentMarker(),(Pe=new wt).naturalSize=this.renderAtNaturalSize,Pe.imageType=this.renderImageType,Pe.imageQuality=this.renderImageQuality,Pe.markersOnly=this.renderMarkersOnly,Pe.width=this.renderWidth,Pe.height=this.renderHeight,[4,Pe.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return ye.sent(),[4,Pe.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,ye.sent()]}})})},Te.prototype.close=function(Pe){var ye=this;if(Pe===void 0&&(Pe=!1),this.isOpen){var ke=!1;Pe||this.eventListeners.beforeclose.forEach(function($e){var Le=new Pn(ye,!0);$e(Le),Le.defaultPrevented&&(ke=!0)}),ke||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function($e){return $e(new Pn(ye))}),this.detachEvents(),this._isOpen=!1)}},Te.prototype.addMarkersToToolbar=function(){for(var Pe,ye=[],ke=0;ke<arguments.length;ke++)ye[ke]=arguments[ke];(Pe=this._availableMarkerTypes).push.apply(Pe,ye)},Te.prototype.addRenderEventListener=function(Pe){this.addEventListener("render",function(ye){Pe(ye.dataUrl,ye.state)})},Te.prototype.removeRenderEventListener=function(Pe){},Te.prototype.addCloseEventListener=function(Pe){this.addEventListener("close",function(){Pe()})},Te.prototype.removeCloseEventListener=function(Pe){},Te.prototype.setupResizeObserver=function(){var Pe=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Pe.resize(Pe.target.clientWidth,Pe.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Pe.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Te.prototype.onPopupTargetResize=function(){var Pe=1*this.target.clientWidth/this.target.clientHeight,ye=this.editorCanvas.clientWidth/Pe>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Pe:this.editorCanvas.clientWidth,ke=ye<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Pe;this.resize(ye,ke)},Te.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Te.prototype.resize=function(Pe,ye){this._isResizing=!0;var ke=Pe/this.imageWidth,$e=ye/this.imageHeight;this.imageWidth=Math.round(Pe),this.imageHeight=Math.round(ye),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(ke,$e),this._isResizing=!1},Te.prototype.scaleMarkers=function(Pe,ye){var ke,$e=this;this._currentMarker&&this._currentMarker instanceof Ut?this._currentMarker.scale(Pe,ye):(ke=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Le){Le!==$e._currentMarker&&Le.scale(Pe,ye)}),ke!==void 0&&this.setCurrentMarker(ke)},Te.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},Te.prototype.setTopLeft=function(){var Pe=this.editingTarget.getBoundingClientRect(),ye=this.editorCanvas.getBoundingClientRect();this.left=Pe.left-ye.left,this.top=Pe.top-ye.top},Te.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},Te.prototype.addDefs=function(){for(var Pe,ye=[],ke=0;ke<arguments.length;ke++)ye[ke]=arguments[ke];this.defs=st.createDefs(),this.addDefsToImage(),(Pe=this.defs).append.apply(Pe,ye)},Te.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Te.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},Te.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Te.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Te.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},Te.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Te.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},Te.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var Pe=document.createElement("a");Pe.href="https://markerjs.com/",Pe.target="_blank",Pe.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>',Pe.title="Powered by marker.js",Pe.style.display="grid",Pe.style.alignItems="center",Pe.style.justifyItems="center",Pe.style.padding="3px",Pe.style.width="20px",Pe.style.height="20px",this.logoUI.appendChild(Pe),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Te.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},Te.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},Te.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Te.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var Pe=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=Pe+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new se(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new he(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Te.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Te.prototype.removeMarker=function(Pe){this.markerImage.removeChild(Pe.container),this.markers.indexOf(Pe)>-1&&this.markers.splice(this.markers.indexOf(Pe),1),Pe.dispose()},Te.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},Te.prototype.toolbarButtonClicked=function(Pe,ye){if(Pe==="marker"&&ye!==void 0)this.createNewMarker(ye);else if(Pe==="action")switch(ye){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},Te.prototype.deleteSelectedMarker=function(){var Pe=this;if(this._currentMarker!==void 0){var ye=!1;if(this.eventListeners.markerbeforedelete.forEach(function($e){var Le=new Kt(Pe,Pe._currentMarker,!0);$e(Le),Le.defaultPrevented&&(ye=!0)}),!ye){var ke=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function($e){return $e(new Kt(Pe,ke))})}}},Te.prototype.clear=function(){var Pe=this,ye=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(vt){var an=new Kt(Pe,void 0,!0);vt(an),an.defaultPrevented&&(ye=!0)}),!ye)){this.setCurrentMarker();for(var ke=function(vt){var an=$e.markers[vt];$e.setCurrentMarker($e.markers[vt]),$e._currentMarker.dispose(),$e.markerImage.removeChild($e._currentMarker.container),$e.markers.splice($e.markers.indexOf($e._currentMarker),1),$e.eventListeners.markerdelete.forEach(function(bn){return bn(new Kt(Pe,an))})},$e=this,Le=this.markers.length-1;Le>=0;Le--)ke(Le);this.addUndoStep()}},Object.defineProperty(Te.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Te.prototype.showNotesEditor=function(){var Pe;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=(Pe=this._currentMarker.notes)!==null&&Pe!==void 0?Pe:"",this.overlayContainer.appendChild(this.notesArea))},Te.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},Te.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Te.prototype.addUndoStep=function(){var Pe=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var ye=this.getState(),ke=this.undoRedoManager.getLastUndoStep();if(!ke||ke.width===ye.width&&ke.height===ye.height){var $e=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(ye),$e<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Le){return Le(new Pn(Pe))})}else this.undoRedoManager.replaceLastUndoStep(ye),this.eventListeners.statechange.forEach(function(Le){return Le(new Pn(Pe))})}},Te.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Te.prototype.undoStep=function(){var Pe=this,ye=this.undoRedoManager.undo();ye!==void 0&&(this.restoreState(ye),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ke){return ke(new Pn(Pe))}))},Te.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Te.prototype.redoStep=function(){var Pe=this,ye=this.undoRedoManager.redo();ye!==void 0&&(this.restoreState(ye),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ke){return ke(new Pn(Pe))}))},Te.prototype.stepZoom=function(){var Pe=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Pe<this.zoomSteps.length-1?this.zoomSteps[Pe+1]:this.zoomSteps[0]},Te.prototype.panTo=function(Pe){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Pe.x,top:this.prevPanPoint.y-Pe.y}),this.prevPanPoint=Pe},Te.prototype.startRenderAndClose=function(){return Mt(this,void 0,void 0,function(){var Pe,ye,ke=this;return Ct(this,function($e){switch($e.label){case 0:return[4,this.render()];case 1:return Pe=$e.sent(),ye=this.getState(),this.eventListeners.render.forEach(function(Le){return Le(new Xt(ke,Pe,ye))}),this.close(!0),[2]}})})},Te.prototype.getState=function(Pe){Pe===!0&&this.setCurrentMarker();var ye={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(ke){return ye.markers.push(ke.getState())}),ye},Te.prototype.restoreState=function(Pe){var ye=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Pe.markers.forEach(function(ke){var $e=ye._availableMarkerTypes.find(function(vt){return vt.typeName===ke.typeName});if($e!==void 0){var Le=ye.addNewMarker($e);Le.restoreState(ke),ye.markers.push(Le)}}),Pe.width&&Pe.height&&(Pe.width!==this.imageWidth||Pe.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Pe.width,this.imageHeight/Pe.height),this.eventListeners.restorestate.forEach(function(ke){return ke(new Pn(ye))})},Te.prototype.addNewMarker=function(Pe){var ye=st.createGroup();return this.markerImage.appendChild(ye),new Pe(ye,this.overlayContainer,this.settings)},Te.prototype.createNewMarker=function(Pe){var ye,ke=this;(ye=typeof Pe=="string"?this._availableMarkerTypes.find(function($e){return $e.typeName===Pe}):Pe)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(ye),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(ye.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function($e){return $e(new Kt(ke,ke._currentMarker))}))},Te.prototype.markerCreated=function(Pe){var ye=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Pe),this.setCurrentMarker(Pe),Pe instanceof Nt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Nt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(ke){return ke(new Kt(ye,ye._currentMarker))})},Te.prototype.colorChanged=function(Pe){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Pe,this.settings.defaultStrokeColor=Pe)},Te.prototype.fillColorChanged=function(Pe){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Pe)},Te.prototype.markerStateChanged=function(Pe){var ye=this;this.eventListeners.markerchange.forEach(function(ke){return ke(new Kt(ye,Pe))})},Te.prototype.setCurrentMarker=function(Pe){var ye=this;this._currentMarker!==Pe&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(ke){return ke(new Kt(ye,ye._currentMarker))})),this._currentMarker=Pe,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(ke){return ke(new Kt(ye,ye._currentMarker))}))},Te.prototype.onPointerDown=function(Pe){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Pe.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var ye=this.markers.find(function(ke){return ke.ownsTarget(Pe.target)});ye!==void 0?(this.setCurrentMarker(ye),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Pe.clientX,Pe.clientY),Pe.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Pe.clientX,y:Pe.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Pe.clientX,Pe.clientY))},Te.prototype.onDblClick=function(Pe){if(this._isFocused||this.focus(),this.mode==="select"){var ye=this.markers.find(function(ke){return ke.ownsTarget(Pe.target)});ye!==void 0&&ye!==this._currentMarker&&this.setCurrentMarker(ye),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Pe.clientX,Pe.clientY),Pe.target):this.setCurrentMarker()}},Te.prototype.onPointerMove=function(Pe){this.touchPoints!==1&&Pe.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Pe.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Pe.clientX,Pe.clientY)):this.zoomLevel>1&&this.panTo({x:Pe.clientX,y:Pe.clientY}))},Te.prototype.onPointerUp=function(Pe){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Pe.clientX,Pe.clientY)),this.isDragging=!1,this.addUndoStep()},Te.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Te.prototype.onKeyUp=function(Pe){this._currentMarker===void 0||this.notesArea!==void 0||Pe.key!=="Delete"&&Pe.key!=="Backspace"||this.deleteSelectedMarker()},Te.prototype.clientToLocalCoordinates=function(Pe,ye){var ke=this.markerImage.getBoundingClientRect();return{x:(Pe-ke.left)/this.zoomLevel,y:(ye-ke.top)/this.zoomLevel}},Te.prototype.onWindowResize=function(){this.positionUI()},Te.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Pe=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Pe+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},Te.prototype.addLicenseKey=function(Pe){pt.addKey(Pe)},Te.prototype.addEventListener=function(Pe,ye){this.eventListeners.addEventListener(Pe,ye)},Te.prototype.removeEventListener=function(Pe,ye){this.eventListeners.removeEventListener(Pe,ye)},Te.prototype.renderState=function(Pe){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Pe),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Te.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Te.prototype.focus=function(){var Pe=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(ye){return ye(new Pn(Pe))}))},Te.prototype.blur=function(){var Pe=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(ye){return ye(new Pn(Pe))}))},Te.instanceCounter=0,Te}(),Ue=me(70635),$t=me(58130),Gt=(Te,Pe,ye)=>new Promise((ke,$e)=>{var Le=bn=>{try{an(ye.next(bn))}catch(en){$e(en)}},vt=bn=>{try{an(ye.throw(bn))}catch(en){$e(en)}},an=bn=>bn.done?ke(bn.value):Promise.resolve(bn.value).then(Le,vt);an((ye=ye.apply(Te,Pe)).next())}),at=({data:Te,className:Pe,fullWidth:ye,style:ke={},onClose:$e,onOk:Le,showFullTools:vt,noAssociationId:an})=>{const bn=(0,ue.useRef)(null),en=(0,ue.useRef)(null),wn=(0,ue.useRef)(null),ai=(0,ue.useRef)(null),[_n,Hn]=(0,ue.useState)(!1),[wi,Hi]=(0,ue.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ue.useEffect)(()=>{wn.current||(wn.current=document.createElement("style"),document.head.appendChild(wn.current)),Te!=null&&Te.visible?(document.body.setAttribute("data-custom","y-hidden"),wn.current.innerHTML=" html { overflow-y: hidden; }",Te!=null&&Te.src&&_i()):(document.body.removeAttribute("data-custom"),wn.current&&(document.head.removeChild(wn.current),wn.current=null))},[Te==null?void 0:Te.visible]);const _i=()=>Gt(void 0,null,function*(){Hn(!0),Hi("\u6B63\u5728\u52A0\u8F7D\u4E2D");const si=yield(0,$t.ZJ)(Te==null?void 0:Te.src);bn.current.src="",bn.current.src=si,bn.current.onload=function(){vi()},Hn(!1),Hi("")}),cr=si=>Gt(void 0,null,function*(){Hn(!0),Hi("\u6B63\u5728\u4FDD\u5B58\u4E2D");const fi=yield(0,Ue.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Te.title,file:si.dataUrl}});fi!=null&&fi.id&&!an?(yield(0,Ue.ZP)(`/api/attachments/${Te.id}/add_subitem.json`,{method:"post",body:{subitem_id:fi==null?void 0:fi.id,settings:JSON.stringify(si.state)}})).status===0&&Le():fi!=null&&fi.id&&Le(fi),Hn(!1),Hi("")}),_r=()=>{const si=document.querySelector('a[href="https://markerjs.com/"]');si&&si.parentNode&&(si.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(Ui=>{const Fi=document.querySelector(Ui.name);Fi&&Fi.setAttribute("title",Ui.title)})},vi=()=>{en.current=new rt(bn.current),en.current.targetRoot=ai.current,en.current.addEventListener("render",cr),en.current.addEventListener("beforeclose",$e),vt&&(en.current.availableMarkerTypes=en.current.ALL_MARKER_TYPES,en.current.uiStyleSettings.redoButtonVisible=!0,en.current.uiStyleSettings.notesButtonVisible=!0,en.current.uiStyleSettings.zoomButtonVisible=!0,en.current.uiStyleSettings.zoomOutButtonVisible=!0,en.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=en.current.uiStyleSettings,en.current.show(),Te!=null&&Te.snapshotData&&en.current.restoreState(Te.snapshotData),setTimeout(()=>{window.scrollTo(0,0),_r()},300)};return ue.createElement(ue.Fragment,null,(Te==null?void 0:Te.visible)&&ue.createElement(We.Z,{spinning:_n,tip:wi,style:{position:"absolute"}},ue.createElement("div",{ref:ai,className:ot()(Re.imageDimensions,Pe,ye?Re.fullWidth:""),style:ke},ue.createElement("img",{className:Re.img,ref:bn}))))}},34571:function(zn,En,me){"use strict";var ue=me(59301),Re=me(93938),Ze=me(48136),ot=me(75890),We=me(43418),lt=me(59301);const Me=(0,ue.forwardRef)(({callback:Mt,width:Ct,onChange:Ye,disabled:st,readOnly:pt,type:wt="",value:Ie="",style:te={}},ee)=>{const de=(0,ue.useRef)(),se=(0,ue.useRef)(),[he,ve]=(0,ue.useState)(0),[be,Ne]=(0,ue.useState)(0),[Fe,je]=(0,ue.useState)(!1),ze=()=>{var He=document.createElement("div");He.innerHTML=de.current.getValue();var bt=He.innerText;return Mt&&Mt(bt),bt};(0,ue.useImperativeHandle)(ee,()=>({getData:ze}));const Xe=He=>{He.preventDefault();const bt=He.clientX-he,et=He.clientY-be;document.body.onmousemove=It=>{let xt=It.clientX-bt,Bt=It.clientY-et;const Ut=document.getElementsByClassName("markdown-popup-form")[0],Nt=window.innerWidth-Ut.offsetWidth,qe=window.innerHeight-Ut.offsetHeight;xt=Math.max(0,Math.min(xt,Nt)),Bt=Math.max(0,Math.min(Bt,qe)),Je(It.clientX,It.clientY,bt,et)&&(ve(xt),Ne(Bt))},document.body.onmouseup=function(){document.body.onmousemove=null}},Je=(He,bt,et,It)=>{const xt=document.body.clientHeight,Bt=document.body.clientWidth;return He<20&&et>He||He>Bt-20&&et<He||bt<20&&It>bt||bt>xt-20&&It<bt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,ue.useEffect)(()=>{Fe&&setTimeout(()=>{const He=document.getElementsByClassName("markdown-popup-form")[0],bt=window.innerWidth/2-He.offsetWidth/2,et=window.innerHeight/2-He.offsetHeight/2;ve(bt),Ne(et)},0)},[Fe]);const dt=()=>{st||pt||je(!0)};return lt.createElement("div",{style:te},lt.createElement("div",{style:{width:Ct||"100%",position:"relative"},className:`${Re.Z.mathFillWrap} ${st||pt?"cursorDefault":""}`,onClick:()=>dt()},lt.createElement("math-field",{disabled:st,locale:"zh_cn",class:`${Re.Z.mathField} ${wt}`,readOnly:pt,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:de,style:{width:"100%",fontSize:Ie?18:14},value:Ie||""})),lt.createElement(We.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:he,top:be},title:lt.createElement("div",{style:{cursor:"move"},onMouseDown:Xe},"\u8F93\u5165\u516C\u5F0F"),open:Fe,onOk:()=>{const He=se.current.getData();de.current.setValue(He),Ye(He),je(!1)},onCancel:()=>{je(!1)},destroyOnClose:!0,className:"markdown-popup-form"},lt.createElement(ot.Z,{value:Ie,ref:se,onChange:Ye,showSaveButton:!1})))});En.Z=Me},75890:function(zn,En,me){"use strict";var ue=me(59301),Re=me(95237),Ze=me(43604),ot=me(99313),We=me(3113),lt=me(25711),Me=me(93938),Mt=me(48136),Ct=me(59301);const Ye=(0,ue.forwardRef)(({callback:st,showSaveButton:pt,value:wt=""},Ie)=>{const te=(0,ue.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 "}]}]}],de=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
|
|
|
x=a + r\\text{cos}\\theta \\ \r
|
|
|
y=b + r\\text{sin}\\theta \r
|
|
|
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
|
|
|
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
|
|
|
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\left\\{\\begin{matrix} \r
|
|
|
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
|
|
|
\\end{matrix}\\right. \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
|
|
|
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
|
|
|
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\perp \\alpha \\ \r
|
|
|
b \\perp \\alpha \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
|
|
|
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
|
|
|
a \\parallel \\partial ,b \\parallel \\partial \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
|
|
|
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
|
|
|
a \\perp m,a \\perp n \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
|
|
|
a^{2}+b^{2}=c^{2} \r
|
|
|
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
|
|
|
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
|
|
|
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
|
|
|
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
|
|
|
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
|
|
|
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R^{+} \\ \r
|
|
|
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R \\ \r
|
|
|
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
|
|
|
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
|
|
|
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
|
|
|
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
|
|
|
P \\left( \\emptyset \\right) =0 \\\\ \r
|
|
|
P \\left( S \\right) =1 \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
\\forall A \\in S \\\\ \r
|
|
|
P \\left( A \\right) \\ge 0 \r
|
|
|
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
|
|
|
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
|
|
|
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
P_{n}=n! \\\\ \r
|
|
|
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
|
|
|
\\end{array}`}]}]}],se=be=>{te.current.setValue(te.current.getValue()+" "+be.value+" ")},he=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ct.createElement(Re.Z,{className:Me.Z.lists,gutter:[10,10]},ee.map((be,Ne)=>Ct.createElement(Ze.Z,{flex:"110px",className:Me.Z.item},Ct.createElement("div",null,Ct.createElement(lt.Z,{value:`$$${be.value}$$`}),be.name),Ct.createElement("div",{className:Me.Z.children},be.children.map((Fe,je)=>Ct.createElement("div",{key:je},Ct.createElement("h1",null,Fe.name),Ct.createElement(Re.Z,{gutter:[10,10]},Fe.data.map((ze,Xe)=>Ct.createElement(Ze.Z,{key:Xe,onClick:()=>se(ze),className:Me.Z.diamond},Ct.createElement(lt.Z,{value:"`$$"+ze.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ct.createElement(Re.Z,{className:Me.Z.lists,gutter:[10,10]},de.map((be,Ne)=>Ct.createElement(Ze.Z,{flex:"110px",className:Me.Z.item},Ct.createElement("div",null,Ct.createElement(lt.Z,{value:"`$$"+be.value+"$$`"}),be.name),Ct.createElement("div",{className:Me.Z.children},be.children.map((Fe,je)=>Ct.createElement("div",{key:je},Fe.name&&Ct.createElement("h1",null,Fe.name),Ct.createElement(Re.Z,{gutter:[10,10]},Fe.data.map((ze,Xe)=>Ct.createElement(Ze.Z,{key:Xe,onClick:()=>se(ze),className:Me.Z.diamond},Ct.createElement(lt.Z,{value:"`$$"+ze.value+"$$`"}))))))))))}],ve=()=>{var be=document.createElement("div");be.innerHTML=te.current.getValue();var Ne=be.innerText;return st&&st(Ne),Ne};return(0,ue.useImperativeHandle)(Ie,()=>({getData:ve})),Ct.createElement("div",{className:Me.Z.mathWrap},Ct.createElement(ot.default,{defaultActiveKey:"1",items:he}),Ct.createElement("math-field",{locale:"zh_cn",className:Me.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:te,style:{width:800,marginTop:30,fontSize:18}},wt||""),pt&&Ct.createElement("div",{className:Me.Z.button},Ct.createElement(We.ZP,{size:"large",onClick:ve,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});En.Z=Ye},97267:function(zn,En,me){"use strict";var ue=me(59301),Re=me(93314),Ze=me(3113),ot=Object.defineProperty,We=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,Mt=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,Ye=(Ie,te,ee)=>te in Ie?ot(Ie,te,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Ie[te]=ee,st=(Ie,te)=>{for(var ee in te||(te={}))Mt.call(te,ee)&&Ye(Ie,ee,te[ee]);if(Me)for(var ee of Me(te))Ct.call(te,ee)&&Ye(Ie,ee,te[ee]);return Ie},pt=(Ie,te)=>We(Ie,lt(te));const wt=({img:Ie,buttonProps:te={},styles:ee={},customText:de,ButtonText:se,ButtonClick:he,Buttonclass:ve,ButtonTwo:be,imgStyles:Ne,loading:Fe=!1})=>ue.createElement("section",{className:"tc animated fadeIn",style:st(st({},{color:"#999",margin:"100px auto",visibility:Fe?"hidden":"visible"}),ee)},ue.createElement("img",{src:Ie||Re,style:pt(st({},Ne),{pointerEvents:"none",userSelect:"none"})}),ue.createElement("p",{className:"mt20 font14"},de||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),se&&ue.createElement(Ze.ZP,st({className:ve,onClick:he},te),se),be&&be);En.Z=wt},79646:function(zn,En,me){"use strict";me.d(En,{Z:function(){return ve}});var ue=me(59301),Re={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ze=me(3113),ot=me(63093),We=me(48551),lt=me(6848),Me=me(58130),Mt=me(79124),Ct=me(97267),Ye=me(10148),st=me(63486),pt=me(59301),wt=Object.defineProperty,Ie=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,de=(be,Ne,Fe)=>Ne in be?wt(be,Ne,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):be[Ne]=Fe,se=(be,Ne)=>{for(var Fe in Ne||(Ne={}))te.call(Ne,Fe)&&de(be,Fe,Ne[Fe]);if(Ie)for(var Fe of Ie(Ne))ee.call(Ne,Fe)&&de(be,Fe,Ne[Fe]);return be},he=(be,Ne,Fe)=>new Promise((je,ze)=>{var Xe=He=>{try{dt(Fe.next(He))}catch(bt){ze(bt)}},Je=He=>{try{dt(Fe.throw(He))}catch(bt){ze(bt)}},dt=He=>He.done?je(He.value):Promise.resolve(He.value).then(Xe,Je);dt((Fe=Fe.apply(be,Ne)).next())}),ve=({editOffice:be="view",data:Ne,theme:Fe,type:je,filename:ze,monacoEditor:Xe,className:Je,style:dt,close:He,onClose:bt,hasMask:et,disabledDownload:It,onImgDimensions:xt,showNodata:Bt,recordInfo:Ut})=>{const[Nt,qe]=(0,ue.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ke,Tt]=(0,ue.useState)(""),[Ln,Mn]=(0,ue.useState)(),zt=window.ENV==="build"?"/react/build":"",rn=location.host.startsWith("localhost")?Ye.Z.PROXY_SERVER:Ye.Z.API_SERVER,Un=10*(1024*1024),yn=(0,ue.useRef)();Ne!=null&&Ne.startsWith("/api")&&je!=="txt"&&(Ne=Ye.Z.API_SERVER+Ne);const sn=Pn=>Pn.substring(Pn.lastIndexOf("/")+1).split(".").pop();ze&&Xe&&(Xe.filename=ze),(0,ue.useEffect)(()=>{var Pn,Xt;const Kt=(Xt=(Pn=document.cookie)==null?void 0:Pn.replace(/\s/g,""))==null?void 0:Xt.split(";");Kt==null||Kt.map(Ot=>{let rt=Ot.split("=");rt[0]==="_educoder_session"&&Tt(rt[1])})},[]),(0,ue.useEffect)(()=>{je==="office"&&(Ne.indexOf("bigfilescdn.")>-1||Ne.indexOf("bigfiles1")>-1?Mn({url:Ne,fileType:sn(Ne),model:Ne.indexOf("model=edit")?"edit":"view"}):Lt())},[je,Ne]);const Lt=()=>he(void 0,null,function*(){console.log("data:",Ne);let Pn=Ne;Ne.startsWith("http")||(Pn=location.origin+Pn);let Xt=new URL(Pn).pathname.split("/").pop();const Kt=yield(0,Mt.gJ)({attachment_id:Xt});Kt.url=rn+Kt.url,Mn(Kt)}),ti=()=>{if(Ne.startsWith("http")||Ne.startsWith("blob:")){gi();return}(0,Me.Sv)(ze||"educoder",Ne,ze)},gi=()=>{Ut&&(0,st.fc)({id:Ut==null?void 0:Ut.id,watch_type:1,course_id:Ut==null?void 0:Ut.course_id}),(0,Me.Nd)(ze||"educoder",decodeURIComponent(Ne))};return pt.createElement("div",{style:se({},dt||{}),className:`${et&&Re.bgBlack} ${je?Re.wrp:"hide"}`},He&&pt.createElement("div",{className:Re.close,ref:yn},!!xt&&pt.createElement(lt.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>yn.current},pt.createElement("span",{onClick:()=>{bt(),xt()}},pt.createElement("i",{className:"icon-yulanpizhu"}))),!It&&pt.createElement(lt.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>yn.current},pt.createElement("span",{onClick:gi},pt.createElement("i",{className:"icon-quxiaozhiding"}))),pt.createElement(lt.Z,{title:"\u5173\u95ED",getPopupContainer:()=>yn.current},pt.createElement("span",{className:"",onClick:bt},pt.createElement("i",{className:"icon-guanbi1"})))),pt.createElement("div",{className:`${Re[Je]} ${Je} ${Re.monaco} ${je==="txt"?"show":"hide"}`},je==="txt"&&pt.createElement(pt.Fragment,null,pt.createElement(We.ZP,se({},Xe)))),je==="audio"&&pt.createElement("audio",{src:`${(Ne==null?void 0:Ne.indexOf("http://"))>-1||(Ne==null?void 0:Ne.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Ne}`,autoPlay:!0}),je==="video"&&pt.createElement(pt.Fragment,null,(Ne==null?void 0:Ne.indexOf("http"))>-1?pt.createElement("video",{controls:!0,src:`${Ne}`,autoPlay:!0}):pt.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Ne}`,autoPlay:!0})),je==="office"&&Ln&&pt.createElement("iframe",{src:`${zt}/office.html?key=${Ln.key}&url=${btoa(Ln.url)}&callbackUrl=${rn+(Ln.callbackUrl||"")}&fileType=${Ln.fileType}&title=${Ln.title||""}&model=${be}&officeServer=${Ye.Z.ONLYOFFICE}&disabledDownload=${!!It}`}),je==="html"&&pt.createElement("iframe",{src:Ne+"&disposition=inline"}),je==="pdf"&&pt.createElement("iframe",{src:`${zt}/js/pdfview/index.html?filename=${ze||"educoder.pdf"}&url=${encodeURIComponent(Ne)}&disabledDownload=${!!It}`}),je==="image"&&pt.createElement("img",{src:`${(Ne==null?void 0:Ne.indexOf("http://"))>-1||(Ne==null?void 0:Ne.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Ne}`}),(je==="other"||je==="download")&&pt.createElement(pt.Fragment,null,Bt?pt.createElement(Ct.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:pt.createElement(Ze.ZP,{icon:pt.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:ti,disabled:It},"\u4E0B\u8F7D")}):pt.createElement(Ze.ZP,{type:"primary",size:"middle",onClick:ti,disabled:It},pt.createElement(ot.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},35890:function(zn,En,me){"use strict";me.d(En,{t:function(){return Kt}});var ue=me(59301),Re=me(92832),Ze=me(78241),ot=me(43418),We=me(95237),lt=me(43604),Me=me(88897),Mt=me(57809),Ct=me(5112),Ye=me(64542),st=me(42203),pt=me(11037),wt=me(8591),Ie=me(3113),te=me(71418),ee=me(24334),de={flex_box_center:"flex_box_center___kOQ8P",flex_space_between:"flex_space_between___fY6jt",flex_box_vertical_center:"flex_box_vertical_center___bDSSI",flex_box_center_end:"flex_box_center_end___mQ6mU",flex_box_column:"flex_box_column___F15G0",result:"result___UYRo8",left:"left___TRaH5",right:"right___twp9s",box:"box___vwndt",li:"li___hRe2d"},se=me(70635),he=me(22267),ve=me(23469),be=me(56102),Ne=me(38600),Fe=me(59301),je=Object.defineProperty,ze=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,Je=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,bt=(Ot,rt,Ue)=>rt in Ot?je(Ot,rt,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):Ot[rt]=Ue,et=(Ot,rt)=>{for(var Ue in rt||(rt={}))dt.call(rt,Ue)&&bt(Ot,Ue,rt[Ue]);if(Je)for(var Ue of Je(rt))He.call(rt,Ue)&&bt(Ot,Ue,rt[Ue]);return Ot},It=(Ot,rt)=>ze(Ot,Xe(rt)),xt=(Ot,rt,Ue)=>new Promise(($t,Gt)=>{var it=Pe=>{try{Te(Ue.next(Pe))}catch(ye){Gt(ye)}},at=Pe=>{try{Te(Ue.throw(Pe))}catch(ye){Gt(ye)}},Te=Pe=>Pe.done?$t(Pe.value):Promise.resolve(Pe.value).then(it,at);Te((Ue=Ue.apply(Ot,rt)).next())}),Ut=({buttonProps:Ot,buttonText:rt,form:Ue,hackIdentifier:$t="",answerKey:Gt,data:it})=>{const[at,Te]=(0,ue.useState)(!1),[Pe,ye]=(0,ue.useState)(!1),[ke,$e]=(0,ue.useState)(!1),[Le,vt]=(0,ue.useState)({}),[an,bn]=(0,ue.useState)(""),[en,wn]=(0,ue.useState)(""),ai=(0,ue.useRef)($t),_n=(0,ue.useRef)(""),Hn=(0,ue.useRef)(!1);(0,ue.useEffect)(()=>{ke&&cr()},[ke]),(0,ue.useEffect)(()=>()=>{sessionStorage.removeItem("projectFill")},[]);const wi=()=>new Date().getTime(),Hi=it==null?void 0:it.code,_i=()=>{var si,fi;let Ui=Hi?it==null?void 0:it.code:(si=Ue.getFieldValue("hack_codes"))==null?void 0:si.code,Fi=Hi?it==null?void 0:it.answer_content:Ue.getFieldValue(Gt),ao=Hi?it==null?void 0:it.input:(fi=Ue.getFieldValue("hack_sets"))==null?void 0:fi.input;Fi==null||Fi.forEach(wr=>{const Be=wr.value||wr.answer_text||"";Ui=Ui.replace(/(@▁@|@▁▁@)/,Be)}),wn(ao),bn(Ui),vt({}),$e(!0)},cr=()=>xt(void 0,null,function*(){var si,fi,Ui,Fi;const ao=wi(),wr=Hi?it==null?void 0:it.time_limit:(si=Ue.getFieldsValue())==null?void 0:si.hack.time_limit,Be=Hi?(fi=it==null?void 0:it.answer_content)==null?void 0:fi.length:(Fi=(Ui=Ue.getFieldsValue())==null?void 0:Ui.standard_answers)==null?void 0:Fi.length;Te(!0),yield(0,he.bM)(_n.current,{test_hack_code:an,test_input:en});function Xr(){return xt(this,null,function*(){const{status:Hr,data:jn}=yield(0,he.rX)(_n.current,"submit"),Wi=wi()-ao>(wr+3)*1e3*Be;if(Hn.current){if(Wi){wt.ZP.error("\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"),Te(!1);return}if(Hr===0){Te(!1),vt(It(et({},jn),{showText:!0}));return}setTimeout(Xr,1e3)}})}Xr()}),_r=()=>xt(void 0,null,function*(){var si,fi,Ui,Fi,ao,wr,Be;if(!it){try{yield Ue.validateFields()}catch(Li){(Ui=(fi=(si=Li==null?void 0:Li.errorFields)==null?void 0:si[0])==null?void 0:fi.name)!=null&&Ui.includes("standard_answers")?wt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):wt.ZP.error(Li.errorFields[0].errors[0]),Ue.scrollToField(Li.errorFields[0].name,{behavior:"smooth",block:"center"});return}ye(!0);let Hr="";const jn=Ue.getFieldsValue();ai.current?Hr=yield(0,se.ZP)(`/api/problems/${ai.current}.json`,{method:"put",body:It(et({},jn),{hack:It(et({},jn==null?void 0:jn.hack),{sub_discipline_id:(Be=(wr=jn==null?void 0:jn.hack)==null?void 0:wr.sub_discipline_id)==null?void 0:Be[1],difficult:jn.difficulty,item_banks_group_id:jn.item_banks_group_id}),hack_codes:It(et({},jn.hack_codes),{code:ee.Base64.encode(jn.hack_codes.code)}),update_hack_sets:[et({},jn.hack_sets)],is_blank:!0})}):(Hr=yield(0,se.ZP)("/api/problems.json",{method:"post",body:It(et({},jn),{hack:It(et({},jn==null?void 0:jn.hack),{sub_discipline_id:(ao=(Fi=jn==null?void 0:jn.hack)==null?void 0:Fi.sub_discipline_id)==null?void 0:ao[1],difficult:jn.difficulty,item_banks_group_id:jn.item_banks_group_id}),hack_codes:It(et({},jn.hack_codes),{code:ee.Base64.encode(jn.hack_codes.code)}),hack_sets:[et({},jn.hack_sets)],is_blank:!0})}),ai.current=Hr==null?void 0:Hr.identifier,sessionStorage.projectFill=Hr==null?void 0:Hr.identifier)}const Xr=yield(0,se.ZP)(`/api/problems/${ai.current}/start.json`,{method:"get"});if((Xr==null?void 0:Xr.status)===0){_n.current=Xr==null?void 0:Xr.identifier,Hn.current=!0,ye(!1),_i();return}ye(!1)}),vi=si=>{const{status:fi,error_msg:Ui,execute_time:Fi,output:ao,input:wr,expected_output:Be}=si;let Xr=null;switch(fi){case Ne.h.OK:Xr=Fe.createElement(Fe.Fragment,null,Fe.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",Fi/1e3,"\u79D2"),Fe.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A\u8C03\u8BD5\u901A\u8FC7"));break;case Ne.h.NOMATCH:Xr=Fe.createElement(Fe.Fragment,null,Fe.createElement("div",null,"\u8F93\u5165\uFF1A"),Fe.createElement("pre",{style:{fontFamily:"initial"}},wr),Fe.createElement("div",null,"\u8F93\u51FA\uFF1A"),Fe.createElement("pre",{style:{fontFamily:"initial"}},ao&&ee.Base64.decode(ao)),Fe.createElement("div",null,"\u9884\u671F\u8F93\u51FA\uFF1A"),Fe.createElement("pre",{style:{fontFamily:"initial"}},Be&&ee.Base64.decode(Be)));break;case Ne.h.EXECUTEFAILURE:Xr=Fe.createElement(Fe.Fragment,null,Fe.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Fe.createElement("pre",null,wr)),Fe.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Fe.createElement("pre",{className:"error"},ee.Base64.decode(Ui)));break;case Ne.h.COMPILEFAILURE:Xr=Fe.createElement(Fe.Fragment,null,Fe.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Fe.createElement("pre",null,wr)),Fe.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Fe.createElement("pre",{className:"error"},ee.Base64.decode(Ui)));break;case Ne.h.PODFAILURE:Xr=Fe.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Ne.h.TIMEOUT:Xr=Fe.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return Fe.createElement(Fe.Fragment,null," ",Xr," ")};return Fe.createElement("div",null,Fe.createElement(Ie.ZP,It(et({loading:Pe},Ot),{onClick:_r}),rt),Fe.createElement(ot.default,{open:ke,title:"\u8C03\u8BD5\u4EE3\u7801",destroyOnClose:!0,width:1200,okText:"\u8FD0\u884C\u6D4B\u8BD5",confirmLoading:at,cancelButtonProps:{style:{display:"none"}},onOk:()=>cr(),onCancel:()=>{Hn.current=!1,$e(!1)}},Fe.createElement("div",{className:de.result},Fe.createElement("div",{className:de.left},Fe.createElement("div",{className:"mb20"},Fe.createElement("span",{className:"c-black"},"\u6267\u884C\u4EE3\u7801"),!it&&Fe.createElement(be.CopyToClipboard,{text:an,onCopy:()=>wt.ZP.success("\u590D\u5236\u6210\u529F")},Fe.createElement("span",{style:{float:"right"},className:"current c-light-primary"},Fe.createElement("i",{className:"iconfont icon-fuzhi8 mr5"}),"\u590D\u5236"))),Fe.createElement(ve.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:an,onChange:si=>bn(si)})),Fe.createElement("div",{className:de.right},Fe.createElement("div",{className:"c-black mb20"},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B"),Fe.createElement("div",{className:de.box},Fe.createElement("div",{className:de.li},Fe.createElement(Re.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165",value:en,onChange:si=>wn(si.target.value),bordered:!1,style:{height:180}}))),Fe.createElement("div",{className:"c-black mb20 mt30"},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"),Fe.createElement("div",{className:de.box},Fe.createElement(te.Z,{spinning:at,tip:"\u4EE3\u7801\u6267\u884C\u4E2D"},Fe.createElement("div",{className:de.li,style:{height:196,overflow:"auto",padding:10}},vi(Le))))))))},Nt=me(80205),qe=me(59301),Ke=Object.defineProperty,Tt=Object.defineProperties,Ln=Object.getOwnPropertyDescriptors,Mn=Object.getOwnPropertySymbols,zt=Object.prototype.hasOwnProperty,rn=Object.prototype.propertyIsEnumerable,xn=(Ot,rt,Ue)=>rt in Ot?Ke(Ot,rt,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):Ot[rt]=Ue,Un=(Ot,rt)=>{for(var Ue in rt||(rt={}))zt.call(rt,Ue)&&xn(Ot,Ue,rt[Ue]);if(Mn)for(var Ue of Mn(rt))rn.call(rt,Ue)&&xn(Ot,Ue,rt[Ue]);return Ot},yn=(Ot,rt)=>Tt(Ot,Ln(rt)),sn=(Ot,rt)=>{var Ue={};for(var $t in Ot)zt.call(Ot,$t)&&rt.indexOf($t)<0&&(Ue[$t]=Ot[$t]);if(Ot!=null&&Mn)for(var $t of Mn(Ot))rt.indexOf($t)<0&&rn.call(Ot,$t)&&(Ue[$t]=Ot[$t]);return Ue};const{TextArea:Lt}=Re.default,ti=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],gi=({value:Ot,onChange:rt})=>qe.createElement(Switch,{checked:Ot,onChange:Ue=>{rt(Ue)}}),Pn="@\u2581@",Xt="@\u2581\u2581@",Kt=({questionTitlePlaceholder:Ot,form:rt,scoreByBlank:Ue=!1,hackidentifier:$t,answerKey:Gt})=>{const[it,at]=(0,ue.useState)(!1),[Te,Pe]=(0,ue.useState)(!1),ke=(0,st.useParams)().type==="edit",$e=(_n,Hn)=>{const wi=Hn.line;let Hi=0;for(let cr=0;cr<wi;cr++)Hi+=_n.getLine(cr).split(Pn).length-1;for(let cr=0;cr<wi;cr++)Hi+=_n.getLine(cr).split(Xt).length-1;const _i=_n.getLine(wi).substring(0,Hn.ch);return Hi+=_i.split(Pn).length-1,Hi+=_i.split(Xt).length-1,Hi},Le=(_n,Hn,wi,Hi)=>{const _i=_n.getRange(Hn.from,Hn.to);let cr=0;if(Hn.text.forEach(_r=>{cr+=_r.split(Pn).length-1}),Hn.text.forEach(_r=>{cr+=_r.split(Xt).length-1}),Hn.origin!=="setValue"){if(_i&&(_i.indexOf(Pn)!==-1||_i.indexOf(Xt)!==-1)){const _r=_i.split(Pn).length-1+_i.split(Xt).length-1,vi=$e(_n,Hn.from);if(console.log(`\u5220\u9664${_r}\u4E2A\uFF0C \u524D\u9762\u6709${vi}\u4E2A\uFF0C\u65B0\u589E${cr}\u4E2A`),_r>1){const si=Array.from({length:_r},(fi,Ui)=>vi+Ui);Hi(si)}else Hi(vi)}else if(cr>0){const _r=$e(_n,Hn.from);console.log(`\u65B0\u589E${cr}\u4E2A\uFF0C\u4E4B\u524D\u6709${_r}\u4E2A`),wi(cr,_r)}}},vt=()=>{const _n=rt.getFieldValue(Gt);rt.setFieldsValue({[Gt]:_n==null?void 0:_n.map((Hn,wi)=>yn(Un({},Hn),{position:wi+1}))})},an=(0,ue.useRef)(),bn=(_n,Hn)=>{for(let wi=0;wi<_n;wi++)an.current({position:null,answer_text:""},Hn+wi);vt()},en=(0,ue.useRef)(),wn=_n=>{en.current(_n),vt()},ai=Ze.default.useWatch(Gt,rt);return qe.createElement("div",{className:pt.Z.wrap},qe.createElement(Ze.default.Item,{label:"\u8BD5\u9898\u63CF\u8FF0",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}]},qe.createElement(Ye.h,{scrollId:"name",watch:!0,height:140})),qe.createElement("div",{className:pt.Z.questionTitleEditorWrap},qe.createElement(Ze.default.Item,{label:"\u7A0B\u5E8F\u4EE3\u7801",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}]},qe.createElement(Ye.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:(_n,Hn)=>{const wi=rt.getFieldValue(Gt);console.log("--preAnswerData",wi,Hn),rt.setFieldsValue({[Gt]:wi==null?void 0:wi.map((Hi,_i)=>{var cr;return yn(Un({},Hi),{position:_i+1,multi_line:(cr=Hn==null?void 0:Hn[_i])==null?void 0:cr.multiLine})})})},placeholder:Ot,onCMBeforeChange:(_n,Hn)=>{Le(_n,Hn,bn,wn)}}))),qe.createElement(Ze.default.List,{name:Gt,rules:[{validator(_n,Hn){if(!(Hn!=null&&Hn.length))return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const wi of Hn){const{answer_text:Hi}=wi||{};if((Hi==null?void 0:Hi.length)===0)return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(_n,{add:Hn,remove:wi},{errors:Hi})=>(an.current=Hn,en.current=wi,qe.createElement(qe.Fragment,null,qe.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},qe.createElement(Ze.default.Item,{label:"\u586B\u7A7A\u9879\u7B54\u6848",required:!0,labelCol:{span:24}}),qe.createElement("div",{onClick:()=>{ot.default.warning({title:"\u7ED9\u5206\u8BF4\u660E",icon:null,width:700,centered:!0,content:qe.createElement("div",null,qe.createElement("div",null,"1.\u5B66\u751F\u586B\u5199\u7B54\u6848\u4E4B\u540E\uFF0C\u5FC5\u987B\u63D0\u4EA4\u4EE3\u7801",qe.createElement("span",{style:{color:"#e30000"}},"\u8FDB\u884C\u8BC4\u6D4B"),"\u624D\u80FD\u5F97\u5206\u3002"),qe.createElement("div",{style:{marginTop:10}},"2.\u8BD5\u9898\u7B97\u5206\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u5C06\u7A0B\u5E8F\u91CC\u9762\u7684\u6240\u6709\u7A7A\u66FF\u6362\u6210\u5B66\u751F\u7684\u7B54\u6848\u8FDB\u884C\u8BC4\u6D4B\u3002\u8F93\u51FA\u7684\u7ED3\u679C\u4E0E\u6D4B\u8BD5\u96C6\u6BD4\u5BF9\uFF0C\u5B8C\u5168\u6B63\u786E\u5219\u5F97\u6EE1\u5206\uFF1B\u82E5\u4E0D\u5B8C\u5168\u6B63\u786E\uFF0C\u5219\u4F9D\u6B21\u5C06\u6BCF\u4E2A\u7A7A\u6362\u6210\u5B66\u751F\u63D0\u4EA4\u7684\u7B54\u6848\uFF0C\u540C\u65F6\u5C06\u5176\u4ED6\u7A7A\u66FF\u6362\u6210\u6807\u51C6\u7B54\u6848\uFF0C\u8FD0\u884C\u7A0B\u5E8F\u3002\u5982\u679C\u8FD9\u4E2A\u7A7A\u7684\u5B66\u751F\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7ED3\u5408\u80FD\u5F97\u5230\u6B63\u786E\u8F93\u51FA\uFF0C\u5219\u8FD9\u4E2A\u7A7A\u5F97\u5230\u8BE5\u7A7A\u7684\u6EE1\u5206\uFF0C\u5426\u5219\u8BE5\u7A7A\u5F970\u5206\u3002"))})},style:{minHeight:32,color:"#3061D0",cursor:"pointer"}},qe.createElement(Nt.Z,{style:{marginRight:3,color:"#3061D0"}}),qe.createElement("span",null," \u7ED9\u5206\u8BF4\u660E"))),_n.map((_i,cr)=>{var _r=_i,{key:vi,name:si}=_r,fi=sn(_r,["key","name"]),Ui,Fi;return qe.createElement(We.Z,{className:"mb20",key:vi,align:"middle",wrap:!1},qe.createElement(lt.Z,{flex:"0 0 auto",className:`${pt.Z.blankIndex}`},"\u586B\u7A7A\u9879",cr+1),qe.createElement(lt.Z,{flex:1},qe.createElement(We.Z,{align:"top",justify:"space-between",wrap:!1},qe.createElement(lt.Z,null,qe.createElement(Ze.default.Item,yn(Un({},fi),{name:[si,"answer_text"],noStyle:!0}),(Ui=ai==null?void 0:ai[si])!=null&&Ui.multi_line||(Fi=ai==null?void 0:ai[si])!=null&&Fi.multiLine?qe.createElement(Lt,{spellCheck:!1,style:{marginLeft:10,width:550}}):qe.createElement(Re.default,{style:{marginLeft:10,width:550},className:pt.Z.blankInput,size:"large",maxLength:1e3,onBlur:ao=>{}}))),Ue&&qe.createElement(lt.Z,{flex:"224px"},qe.createElement(Ze.default.Item,yn(Un({},fi),{name:[si,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),qe.createElement(Me.Z,{size:"large",className:pt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"}))))))})))),qe.createElement("div",{onClick:()=>at(!0)},qe.createElement(Ze.default.Item,{name:["hack","analysis"],label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},qe.createElement(Ye.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:it}))),qe.createElement(Ze.default.Item,{label:"\u7F16\u7A0B\u8BED\u8A00",style:{marginTop:30},name:["hack_codes","language"],labelCol:{span:24},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00"}]},qe.createElement(Mt.default,{size:"large"},ti.map(_n=>qe.createElement(Mt.default.Option,{key:_n.title,value:_n.key}," ",_n.title)))),qe.createElement(Ze.default.Item,{label:"\u6700\u5927\u8BC4\u6D4B\u65F6\u957F\uFF08\u79D2\uFF09",style:{marginTop:30},labelCol:{span:24},required:!0},qe.createElement(Ze.default.Item,{name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],noStyle:!0},qe.createElement(Me.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})),qe.createElement("span",{className:"ml10 font14"},"\u79D2")),qe.createElement(Ze.default.Item,{label:"\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406",style:{marginTop:30},name:["hack","submit_rule"],labelCol:{span:24},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406"}]},qe.createElement(Ct.ZP.Group,{style:{marginTop:-10}},qe.createElement(Ct.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),qe.createElement(Ct.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),qe.createElement(Ct.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),qe.createElement(Ze.default.Item,{label:"\u6D4B\u8BD5\u7528\u4F8B",required:!0,style:{marginTop:30}}),qe.createElement("div",{style:{background:"#F6F7F9",padding:15}},qe.createElement(Ze.default.Item,{label:"\u8F93\u5165",labelCol:{span:24},name:["hack_sets","input"]},qe.createElement(Lt,{rows:4})),qe.createElement(Ze.default.Item,{label:"\u8F93\u51FA",labelCol:{span:24},name:["hack_sets","output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},qe.createElement(Lt,{rows:4}))),qe.createElement(Ut,{form:rt,answerKey:Gt,hackIdentifier:$t,buttonText:"\u8FD0\u884C\u8C03\u8BD5",buttonProps:{ghost:!0,icon:qe.createElement("i",{className:"iconfont icon-ceshi"}),style:{background:"rgba(55,173,131,0.05)",borderRadius:19,border:"1px solid #37AD83",width:116,height:38,display:"inline-flex",fontSize:14,alignItems:"center",justifyContent:"center",marginTop:20,cursor:"pointer",color:"#37AD83"}}}))}},74830:function(zn,En,me){"use strict";me.d(En,{u:function(){return Fe}});var ue=me(59301),Re=me(95237),Ze=me(43604),ot=me(6848),We=me(78241),lt=me(11037),Me=me(37520),Mt=me(89378),Ct=me(64542),Ye=me(59301),st=Object.defineProperty,pt=Object.defineProperties,wt=Object.getOwnPropertyDescriptors,Ie=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,de=(je,ze,Xe)=>ze in je?st(je,ze,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):je[ze]=Xe,se=(je,ze)=>{for(var Xe in ze||(ze={}))te.call(ze,Xe)&&de(je,Xe,ze[Xe]);if(Ie)for(var Xe of Ie(ze))ee.call(ze,Xe)&&de(je,Xe,ze[Xe]);return je},he=(je,ze)=>pt(je,wt(ze)),ve=(je,ze)=>{var Xe={};for(var Je in je)te.call(je,Je)&&ze.indexOf(Je)<0&&(Xe[Je]=je[Je]);if(je!=null&&Ie)for(var Je of Ie(je))ze.indexOf(Je)<0&&ee.call(je,Je)&&(Xe[Je]=je[Je]);return Xe};const be=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Ne=({value:je,onChange:ze,choiceTextKey:Xe,answerKey:Je,index:dt,isEdit:He,setInputActive:bt,form:et,choiceOptionsPath:It,allowChangeMode:xt,showAddIcon:Bt,addItem:Ut,deleteItem:Nt})=>{console.log(je,"value");const qe=(je==null?void 0:je[Je])===1,Ke=()=>{const Ln=et.getFieldValue(It);et.setFieldValue(It,Ln.map(Mn=>he(se({},Mn),{[Je]:0})))},Tt=()=>{qe?ze(he(se({},je),{[Je]:0})):(xt||Ke(),ze(he(se({},je),{[Je]:1})))};return Ye.createElement(Re.Z,{className:lt.Z.choiceWrap,align:"middle",wrap:!1},Ye.createElement(Ze.Z,{onClick:Tt,className:`${lt.Z.choiceIndex} ${qe?lt.Z.activeAnswer:""}`},be[dt]),Ye.createElement(Ze.Z,{flex:1,className:`${lt.Z.editorWrap} ml15`,onClick:bt},Ye.createElement(Ct.x,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:He,value:je==null?void 0:je[Xe],onChange:Ln=>{ze(he(se({},je),{[Xe]:Ln}))}})),Ye.createElement(Ze.Z,{flex:"0 0 auto",className:"ml15"},Ye.createElement("div",{onClick:Tt,className:`${lt.Z.setAnswerBtn} ${qe?lt.Z.activeAnswer:""}`},qe?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),Ye.createElement(Ze.Z,{className:lt.Z.actionWrapper},Ye.createElement(ot.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},Ye.createElement(Me.Z,{className:lt.Z.addIcon,onClick:Ut,style:{visibility:Bt?"visible":"hidden"}})),Ye.createElement(ot.Z,{title:"\u5220\u9664"},Ye.createElement(Mt.Z,{className:lt.Z.deleteIcon,onClick:Nt,style:{visibility:dt>1?"visible":"hidden"}}))))},Fe=({questionTitlePlaceholder:je,titleKey:ze,choiceKey:Xe,analysisKey:Je,choiceTextKey:dt,answerKey:He,choiceOptionsPath:bt,allowChangeMode:et=!0,form:It,showAnalysis:xt=!0})=>{const[Bt,Ut]=(0,ue.useState)(),[Nt,qe]=(0,ue.useState)(!1);return Ye.createElement("div",{className:lt.Z.wrap},Ye.createElement("div",{className:lt.Z.questionTitleEditorWrap},Ye.createElement(We.default.Item,{label:"\u9898\u5E72",name:ze,labelCol:{span:24},rules:[{required:!0}]},Ye.createElement(Ct.h,{scrollId:Array.isArray(ze)?ze.join("_"):`${ze}`,watch:!0,height:140,placeholder:je}))),Ye.createElement(We.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Ye.createElement(We.default.List,{name:Xe,rules:[{validator(Ke,Tt){const Ln=Tt.some(zt=>zt[He]===1),Mn=Tt.findIndex(zt=>{var rn;return((rn=zt[dt])==null?void 0:rn.length)<=0});return Mn!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${be[Mn]}\u9009\u9879\u7684\u5185\u5BB9`)):Ln?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(Ke,{add:Tt,remove:Ln})=>Ye.createElement("div",{id:Array.isArray(bt)?bt.join("_"):`${bt}`},Ke.map((Mn,zt)=>{var rn=Mn,{key:xn,name:Un}=rn,yn=ve(rn,["key","name"]);const sn=Bt===xn,Lt=()=>{Ut(xn)},ti=zt<7&&zt===Ke.length-1,gi=()=>Tt({[dt]:"",[He]:0}),Pn=()=>Ln(Un);return Ye.createElement(We.default.Item,he(se({},yn),{key:xn,name:Un,className:lt.Z.choiceListWrap,rules:[{validator(Xt,Kt){return Kt!=null&&Kt.choice_text?Promise.resolve():Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${be[zt]}\u9009\u9879\u7684\u5185\u5BB9`))}}]}),Ye.createElement(Ne,{choiceTextKey:dt,answerKey:He,index:zt,isEdit:sn,setInputActive:Lt,form:It,choiceOptionsPath:bt,allowChangeMode:et,showAddIcon:ti,addItem:gi,deleteItem:Pn}))}),Ke.length<8&&Ye.createElement("div",{className:`${lt.Z.addBtn} mb30`,onClick:()=>Tt({[dt]:"",[He]:0})},"\u6DFB\u52A0\u9009\u9879"))),xt&&Ye.createElement("div",{onClick:()=>qe(!0)},Ye.createElement(We.default.Item,{name:Je,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ye.createElement(Ct.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Nt}))))}},26778:function(zn,En,me){"use strict";me.d(En,{u:function(){return et}});var ue=me(59301),Re=me(43418),Ze=me(95237),ot=me(43604),We=me(92832),lt=me(6848),Me=me(78673),Mt=me(78241),Ct=me(5112),Ye=me(88897),st=me(64542),pt=me(89378),wt=me(86902),Ie=me(11037),te=me(34571),ee=me(59301),de=Object.defineProperty,se=Object.defineProperties,he=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,Fe=(It,xt,Bt)=>xt in It?de(It,xt,{enumerable:!0,configurable:!0,writable:!0,value:Bt}):It[xt]=Bt,je=(It,xt)=>{for(var Bt in xt||(xt={}))be.call(xt,Bt)&&Fe(It,Bt,xt[Bt]);if(ve)for(var Bt of ve(xt))Ne.call(xt,Bt)&&Fe(It,Bt,xt[Bt]);return It},ze=(It,xt)=>se(It,he(xt)),Xe=(It,xt)=>{var Bt={};for(var Ut in It)be.call(It,Ut)&&xt.indexOf(Ut)<0&&(Bt[Ut]=It[Ut]);if(It!=null&&ve)for(var Ut of ve(It))xt.indexOf(Ut)<0&&Ne.call(It,Ut)&&(Bt[Ut]=It[Ut]);return Bt};const Je=({value:It,onChange:xt})=>{const Bt=Nt=>{Re.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Ie.Z.modal,onOk:()=>{const qe=[...It];qe.splice(Nt,1),xt(qe)}})},Ut=()=>{const Nt=[...It];Nt.push(""),xt(Nt)};return ee.createElement(Ze.Z,{className:"ml20"},ee.createElement(ot.Z,{flex:1},It==null?void 0:It.map((Nt,qe)=>ee.createElement(Ze.Z,{key:`${Nt}_${qe}`,className:"mb20"},ee.createElement(We.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:Nt,autoSize:{maxRows:3},maxLength:1e3,onBlur:Ke=>{const Tt=[...It],Ln=Ke.target.value.trim();Tt[qe]=Ln,xt(Tt)}}),ee.createElement(lt.Z,{title:"\u5220\u9664"},ee.createElement(pt.Z,{className:Ie.Z.deleteIcon,style:{marginLeft:15,visibility:qe>0?"visible":"hidden"},onClick:()=>Bt(qe)}))))),ee.createElement(ot.Z,null,ee.createElement("div",{className:`${Ie.Z.addBtn}`,onClick:()=>{Ut()}},"\u65B0\u589E\u7B54\u6848")))},dt=({value:It,onChange:xt})=>{const Bt=Nt=>{Re.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Ie.Z.modal,onOk:()=>{const qe=[...It];qe.splice(Nt,1),xt(qe)}})},Ut=()=>{const Nt=[...It];Nt.push(""),xt(Nt)};return ee.createElement(Ze.Z,{className:"ml20"},ee.createElement(ot.Z,{flex:1},It==null?void 0:It.map((Nt,qe)=>ee.createElement(Ze.Z,{key:`${Nt}_${qe}`,align:"middle",className:"mb20"},ee.createElement(te.Z,{value:Nt,style:{flex:1},onChange:Ke=>{const Tt=[...It];Tt[qe]=Ke,xt(Tt)}}),ee.createElement(lt.Z,{title:"\u5220\u9664"},ee.createElement(pt.Z,{className:Ie.Z.deleteIcon,style:{marginLeft:15,visibility:qe>0?"visible":"hidden"},onClick:()=>Bt(qe)}))))),ee.createElement(ot.Z,null,ee.createElement("div",{className:`${Ie.Z.addBtn}`,onClick:()=>{Ut()}},"\u65B0\u589E\u7B54\u6848")))},He=({value:It=!0,onChange:xt})=>ee.createElement(Me.Z,{checked:!It,onChange:Bt=>{xt(!Bt)}}),bt="\u2581",et=({questionTitlePlaceholder:It,form:xt,scoreByBlank:Bt=!1,answerKey:Ut})=>{const[Nt,qe]=(0,ue.useState)(!1),Ke=(yn,sn)=>{const Lt=sn.line;let ti=0;for(let Pn=0;Pn<Lt;Pn++)ti+=yn.getLine(Pn).split(bt).length-1;const gi=yn.getLine(Lt).substring(0,sn.ch);return ti+=gi.split(bt).length-1,ti},Tt=(yn,sn,Lt,ti)=>{const gi=yn.getRange(sn.from,sn.to);let Pn=0;if(sn.text.forEach(Xt=>{Pn+=Xt.split(bt).length-1}),sn.origin!=="setValue"){if(gi&&gi.indexOf(bt)!==-1){const Xt=gi.split(bt).length-1,Kt=Ke(yn,sn.from);if(console.log(`\u5220\u9664${Xt}\u4E2A\uFF0C \u524D\u9762\u6709${Kt}\u4E2A\uFF0C\u65B0\u589E${Pn}\u4E2A`),Xt>1){const Ot=Array.from({length:Xt},(rt,Ue)=>Kt+Ue);ti(Ot)}else ti(Kt)}else if(Pn>0){const Xt=Ke(yn,sn.from);console.log(`\u65B0\u589E${Pn}\u4E2A\uFF0C\u4E4B\u524D\u6709${Xt}\u4E2A`),Lt(Pn,Xt)}}},Ln=()=>{const yn=xt.getFieldValue(Ut);xt.setFieldsValue({[Ut]:yn.map((sn,Lt)=>ze(je({},sn),{position:Lt+1}))})},Mn=(0,ue.useRef)(),zt=(yn,sn)=>{for(let Lt=0;Lt<yn;Lt++)Mn.current({position:null,answer_text:[""],model:1},sn+Lt);Ln()},rn=(0,ue.useRef)(),xn=yn=>{rn.current(yn),Ln()},Un=Mt.default.useWatch(Ut,xt);return ee.createElement("div",{className:Ie.Z.wrap},ee.createElement("div",{className:Ie.Z.questionTitleEditorWrap},ee.createElement(Mt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ee.createElement(st.h,{scrollId:"name",watch:!0,height:140,placeholder:It,showNullButton:!0,onCMBeforeChange:(yn,sn)=>{Tt(yn,sn,zt,xn)}}))),ee.createElement(Mt.default.List,{name:Ut,rules:[{validator(yn,sn){if(!(sn!=null&&sn.length))return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const Lt of sn){const{answer_text:ti}=Lt||{};if(ti!=null&&ti.some(gi=>(gi==null?void 0:gi.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(yn,{add:sn,remove:Lt},{errors:ti})=>(Mn.current=sn,rn.current=Lt,ee.createElement(ee.Fragment,null,ee.createElement(Mt.default.Item,{label:ee.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(yn!=null&&yn.length)&&ee.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),yn.map((gi,Pn)=>{var Xt=gi,{key:Kt,name:Ot}=Xt,rt=Xe(Xt,["key","name"]),Ue,$t;return ee.createElement("div",{style:{marginBottom:10},key:Kt},ee.createElement(Ze.Z,{className:"mb20",align:"middle",wrap:!1},ee.createElement(ot.Z,{style:{marginRight:10},flex:"0 0 auto",className:`${Ie.Z.blankIndex}`},"\u586B\u7A7A\u9879",Pn+1),ee.createElement(Mt.default.Item,ze(je({},rt),{name:[Ot,"model"],noStyle:!0}),ee.createElement(Ct.ZP.Group,{onChange:()=>{const Gt=xt.getFieldValue(Ut);xt.setFieldsValue({[Ut]:Gt.map((it,at)=>ze(je({},it),{answer_text:Ot===at?[""]:it.answer_text}))})}},ee.createElement(Ct.ZP,{value:1},"\u6587\u672C\u6A21\u5F0F ",ee.createElement(lt.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6587\u672C\u7B54\u6848"},ee.createElement(wt.Z,null))),ee.createElement(Ct.ZP,{value:2},"\u6570\u5B66\u516C\u5F0F\u6A21\u5F0F ",ee.createElement(lt.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u7F16\u5199\u6570\u5B66\u516C\u5F0F\u4F5C\u4E3A\u7B54\u6848"},ee.createElement(wt.Z,null)))))),ee.createElement(Ze.Z,{style:{marginLeft:20},align:"middle",wrap:!1},ee.createElement(ot.Z,{flex:1},ee.createElement(Ze.Z,{align:"top",justify:"space-between",wrap:!1},ee.createElement(ot.Z,{flex:1},ee.createElement(Mt.default.Item,ze(je({},rt),{name:[Ot,"answer_text"],noStyle:!0}),(($t=(Ue=xt.getFieldValue(Ut))==null?void 0:Ue[Ot])==null?void 0:$t.model)===1?ee.createElement(Je,null):ee.createElement(dt,null))),Bt&&ee.createElement(ot.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"}},ee.createElement(Mt.default.Item,ze(je({},rt),{name:[Ot,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Ie.Z.blankInputNumberWrapper}),ee.createElement(Ye.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"})))),ee.createElement(Mt.default.Item,ze(je({},rt),{name:[Ot,"position"],noStyle:!0}),ee.createElement(We.default,{type:"hidden"})))))})))),ee.createElement(Ze.Z,{align:"middle"},ee.createElement(Mt.default.Item,{name:"downcase",valuePropName:"checked"},ee.createElement(Me.Z,null)),ee.createElement(ot.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),ee.createElement(Ze.Z,{align:"middle"},ee.createElement(Mt.default.Item,{name:"no_space",valuePropName:"checked"},ee.createElement(Me.Z,null)),ee.createElement(ot.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Un==null?void 0:Un.length)>1&&ee.createElement(Ze.Z,{align:"middle",className:(Un==null?void 0:Un.length)>1?"mb30":`${Ie.Z.hide}`},ee.createElement(Mt.default.Item,{name:"is_ordered"},ee.createElement(He,null)),ee.createElement(ot.Z,{className:"ml10"},"\u5141\u8BB8\u5B66\u751F\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7684\u987A\u5E8F\u4E0D\u4E00\u81F4")),ee.createElement("div",{onClick:()=>qe(!0)},ee.createElement(Mt.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ee.createElement(st.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Nt}))))}},41673:function(zn,En,me){"use strict";me.d(En,{Z:function(){return ve}});var ue=me(59301),Re=me(95237),Ze=me(43604),ot=me(78241),We=me(11037),lt=me(64542),Me=me(59301),Mt=Object.defineProperty,Ct=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,st=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,Ie=(be,Ne,Fe)=>Ne in be?Mt(be,Ne,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):be[Ne]=Fe,te=(be,Ne)=>{for(var Fe in Ne||(Ne={}))pt.call(Ne,Fe)&&Ie(be,Fe,Ne[Fe]);if(st)for(var Fe of st(Ne))wt.call(Ne,Fe)&&Ie(be,Fe,Ne[Fe]);return be},ee=(be,Ne)=>Ct(be,Ye(Ne)),de=(be,Ne)=>{var Fe={};for(var je in be)pt.call(be,je)&&Ne.indexOf(je)<0&&(Fe[je]=be[je]);if(be!=null&&st)for(var je of st(be))Ne.indexOf(je)<0&&wt.call(be,je)&&(Fe[je]=be[je]);return Fe};const se={\u6B63\u786E:"T",\u9519\u8BEF:"F"},he=({value:be,onChange:Ne,form:Fe})=>{const je=(be==null?void 0:be.is_answer)===1,ze=be==null?void 0:be.choice_text,Xe=()=>{const Je=Fe.getFieldsValue().choices.map(dt=>({choice_text:dt.choice_text,is_answer:0}));Fe.setFieldsValue({choices:Je}),Ne(ee(te({},be),{is_answer:1}))};return Me.createElement(Re.Z,{className:We.Z.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"}},Me.createElement(Ze.Z,{onClick:Xe,className:`${We.Z.choiceIndex} ${We.Z.judgementIndex} ${je?We.Z.activeAnswer:""}`},se[ze]),Me.createElement(Ze.Z,{flex:1,className:`${We.Z.editorWrap} ml15`},Me.createElement("div",{className:`${We.Z.inputBorder} ${We.Z.placeholder} ${je?We.Z.activeJudgementAnswer:""}`},ze)),Me.createElement(Ze.Z,{flex:"0 0 auto",className:"ml15"},Me.createElement("div",{onClick:Xe,className:`${We.Z.setAnswerBtn} ${je?We.Z.activeAnswer:""}`},je?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},ve=({questionTitlePlaceholder:be,choiceKey:Ne,form:Fe})=>{const[je,ze]=(0,ue.useState)(!1);return Me.createElement("div",{className:We.Z.wrap},Me.createElement("div",{className:We.Z.questionTitleEditorWrap},Me.createElement(ot.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Me.createElement(lt.h,{scrollId:"name",watch:!0,height:140,placeholder:be}))),Me.createElement(ot.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Me.createElement(ot.default.List,{name:"choices",rules:[{validator(Xe,Je){return Je.some(He=>(He==null?void 0:He.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},Xe=>Me.createElement("div",{id:"choices"},Xe.map(Je=>{var dt=Je,{key:He,name:bt}=dt,et=de(dt,["key","name"]);return Me.createElement(ot.default.Item,ee(te({},et),{key:He,name:bt,noStyle:!0}),Me.createElement(he,{form:Fe}))})))),Me.createElement("div",{onClick:()=>ze(!0)},Me.createElement(ot.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Me.createElement(lt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:je}))))}},64542:function(zn,En,me){"use strict";me.d(En,{h:function(){return te},x:function(){return ee}});var ue=me(23469),Re=me(11037),Ze=me(25711),ot=me(59301),We=Object.defineProperty,lt=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,Mt=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,st=(de,se,he)=>se in de?We(de,se,{enumerable:!0,configurable:!0,writable:!0,value:he}):de[se]=he,pt=(de,se)=>{for(var he in se||(se={}))Ct.call(se,he)&&st(de,he,se[he]);if(Mt)for(var he of Mt(se))Ye.call(se,he)&&st(de,he,se[he]);return de},wt=(de,se)=>lt(de,Me(se)),Ie=(de,se)=>{var he={};for(var ve in de)Ct.call(de,ve)&&se.indexOf(ve)<0&&(he[ve]=de[ve]);if(de!=null&&Mt)for(var ve of Mt(de))se.indexOf(ve)<0&&Ye.call(de,ve)&&(he[ve]=de[ve]);return he};const te=de=>{var se=de,{value:he,onChange:ve,scrollId:be}=se,Ne=Ie(se,["value","onChange","scrollId"]);return ot.createElement("div",{id:be||""},ot.createElement(ue.Z,wt(pt({},Ne),{defaultValue:he,onChange:(Fe,je)=>{console.log("a:",Fe,je),je!=null&&je.length?ve(Fe,je):ve(Fe)}})))},ee=({value:de,onChange:se,placeholder:he,height:ve=140,isEdit:be,miniToolbar:Ne,watch:Fe=!0})=>be?ot.createElement(ue.Z,{watch:Fe,isFocus:!0,height:ve||void 0,placeholder:he,defaultValue:de,onChange:se,miniToolbar:Ne}):ot.createElement("div",{style:{cursor:"pointer"}},de?ot.createElement(Ze.Z,{className:Re.Z.inputBorder,value:de}):ot.createElement("div",{className:`${Re.Z.inputBorder} ${Re.Z.placeholder} inputBorderError`},he))},6507:function(zn,En,me){"use strict";me.d(En,{W:function(){return dt}});var ue=me(59301),Re=me(8591),Ze=me(12563),ot=me(78241),We=me(78673),lt=me(95237),Me=me(43604),Mt=me(6848),Ct=me(92832),Ye=me(88897),st=me(11037),pt=me(64542),wt=me(23469),Ie=me(86902),te=Object.defineProperty,ee=Object.defineProperties,de=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,he=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,be=(He,bt,et)=>bt in He?te(He,bt,{enumerable:!0,configurable:!0,writable:!0,value:et}):He[bt]=et,Ne=(He,bt)=>{for(var et in bt||(bt={}))he.call(bt,et)&&be(He,et,bt[et]);if(se)for(var et of se(bt))ve.call(bt,et)&&be(He,et,bt[et]);return He},Fe=(He,bt)=>ee(He,de(bt)),je=(He,bt)=>{var et={};for(var It in He)he.call(He,It)&&bt.indexOf(It)<0&&(et[It]=He[It]);if(He!=null&&se)for(var It of se(He))bt.indexOf(It)<0&&ve.call(He,It)&&(et[It]=He[It]);return et};const ze=He=>{var bt=He,{value:et,onChange:It}=bt,xt=je(bt,["value","onChange"]);const Bt=Ut=>{It([Ut])};return ue.createElement(wt.Z,Fe(Ne({},xt),{defaultValue:et==null?void 0:et[0],onChange:Bt}))},Xe=He=>{if(!He)return!1;if(/^s*$/.test(He)||He.trim()===""){Re.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let bt=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return He==="|"?(Re.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Je=({value:He=[],onClose:bt})=>ue.createElement(Ze.default,{closable:!0,onClose:bt,className:st.Z.keywordTag},ue.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},He.join(" \u6216 "))),dt=({questionTitlePlaceholder:He,form:bt,showKeywords:et,isMustKeyWords:It=et})=>{const[xt,Bt]=(0,ue.useState)(!1),[Ut,Nt]=(0,ue.useState)(""),qe=ot.default.useWatch("use_keywords",bt),Ke=ot.default.useWatch("question_score",bt);return ue.createElement("div",{className:st.Z.wrap},ue.createElement("div",{className:st.Z.questionTitleEditorWrap},ue.createElement(ot.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ue.createElement(pt.h,{scrollId:"name",watch:!0,height:140,placeholder:He}))),ue.createElement(ot.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:"answer_texts",labelCol:{span:24}},ue.createElement(ze,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),et&&!It&&ue.createElement(ot.default.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked"},ue.createElement(We.Z,{defaultChecked:!0})),et&&It&&ue.createElement(lt.Z,{align:"middle",className:"mb30"},ue.createElement(ot.default.Item,{name:"use_keywords",valuePropName:"checked"},ue.createElement(We.Z,null)),ue.createElement(Me.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),ue.createElement(Me.Z,null,ue.createElement(Mt.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},ue.createElement(Ie.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(qe||!It)&&ue.createElement(ot.default.List,{name:"keywords",rules:[{validator(Tt,Ln){return It?Ln!=null&&Ln.length?(Ln==null?void 0:Ln.reduce((zt,rn)=>zt+rn.score,0))>parseFloat(Ke)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD")):Promise.resolve()}}]},(Tt,{add:Ln,remove:Mn})=>ue.createElement(ue.Fragment,null,ue.createElement("div",{className:`${st.Z.title} mb10`},It?"\u5173\u952E\u8BCD":ue.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),ue.createElement(lt.Z,{align:"middle",className:"font14 mb30"},ue.createElement(Me.Z,{flex:1},ue.createElement(Ct.default,{value:Ut,onChange:zt=>{Nt(zt.target.value)},maxLength:50,allowClear:!0,onPressEnter:zt=>{var rn,xn,Un,yn;const sn=`${(rn=zt.target)==null?void 0:rn.value}`,Lt=(Un=(xn=sn==null?void 0:sn.split("|"))==null?void 0:xn.filter(Pn=>!!Pn))==null?void 0:Un.map(Pn=>Pn==null?void 0:Pn.trim()),ti=bt.getFieldValue("keywords"),gi=((yn=ti==null?void 0:ti.map(Pn=>Pn==null?void 0:Pn.keyword))==null?void 0:yn.flat())||[];for(const Pn of Lt)if(gi.includes(Pn)){Re.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}Xe(sn)&&(Ln({keyword:Lt,score:1}),Nt(""))},className:st.Z.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),ue.createElement(Me.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Tt.map(zt=>{var rn=zt,{key:xn,name:Un}=rn,yn=je(rn,["key","name"]);return ue.createElement(lt.Z,{key:xn,className:"mb20",style:{marginRight:148}},ue.createElement(Me.Z,{flex:1},ue.createElement(lt.Z,{align:"middle",justify:"space-between"},ue.createElement(ot.default.Item,Fe(Ne({},yn),{name:[Un,"keyword"]}),ue.createElement(Je,{onClose:()=>Mn(Un)})),It&&ue.createElement(ot.default.Item,Fe(Ne({},yn),{name:[Un,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:st.Z.blankInputNumberWrapper}),ue.createElement(Ye.Z,{className:st.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),ue.createElement("div",{onClick:()=>Bt(!0)},ue.createElement(ot.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ue.createElement(pt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:xt}))))}},26696:function(zn,En,me){"use strict";me.d(En,{tc:function(){return _r.t},uh:function(){return ue.u},rL:function(){return cr},u8:function(){return Ze.u},ZZ:function(){return Re.Z},Wk:function(){return ot.W}});var ue=me(74830),Re=me(41673),Ze=me(26778),ot=me(6507),We=me(59301),lt=me(36381),Me=me(78241),Mt=me(95237),Ct=me(43604),Ye=me(88897),st=me(6848),pt=me(38854),wt=me(11037),Ie=me(89378),te=me(64542),ee=me(43418),de=me(92832),se=me(78673),he=me(59301),ve=Object.defineProperty,be=Object.defineProperties,Ne=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,Xe=(vi,si,fi)=>si in vi?ve(vi,si,{enumerable:!0,configurable:!0,writable:!0,value:fi}):vi[si]=fi,Je=(vi,si)=>{for(var fi in si||(si={}))je.call(si,fi)&&Xe(vi,fi,si[fi]);if(Fe)for(var fi of Fe(si))ze.call(si,fi)&&Xe(vi,fi,si[fi]);return vi},dt=(vi,si)=>be(vi,Ne(si)),He=(vi,si)=>{var fi={};for(var Ui in vi)je.call(vi,Ui)&&si.indexOf(Ui)<0&&(fi[Ui]=vi[Ui]);if(vi!=null&&Fe)for(var Ui of Fe(vi))si.indexOf(Ui)<0&&ze.call(vi,Ui)&&(fi[Ui]=vi[Ui]);return fi};const bt=({value:vi,onChange:si})=>{const fi=Fi=>{ee.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:wt.Z.modal,onOk:()=>{const ao=[...vi];ao.splice(Fi,1),si(ao)}})},Ui=()=>{const Fi=[...vi];Fi.push(""),si(Fi)};return he.createElement(Mt.Z,{className:"ml20"},he.createElement(Ct.Z,{flex:1},vi==null?void 0:vi.map((Fi,ao)=>he.createElement(Mt.Z,{key:`${Fi}_${ao}`,align:"middle",className:"mb20"},he.createElement(de.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:Fi,autoSize:{maxRows:3},maxLength:1e3,onBlur:wr=>{const Be=[...vi],Xr=wr.target.value.trim();Be[ao]=Xr,si(Be)}}),he.createElement(st.Z,{title:"\u5220\u9664"},he.createElement(Ie.Z,{className:wt.Z.deleteIcon,style:{marginLeft:15,visibility:ao>0?"visible":"hidden"},onClick:()=>fi(ao)}))))),he.createElement(Ct.Z,null,he.createElement("div",{className:`${wt.Z.addBtn}`,onClick:()=>{Ui()}},"\u65B0\u589E\u7B54\u6848")))},et=({value:vi=!0,onChange:si})=>he.createElement(se.Z,{checked:!vi,onChange:fi=>{si(!fi)}}),It="\u2581",xt=({questionTitlePlaceholder:vi,form:si,name:fi,scoreByBlank:Ui=!1,answerKey:Fi,titleKey:ao="name",analysisKey:wr="analysis",isOrdered:Be="is_ordered"})=>{var Xr,Hr;const[jn,Li]=(0,We.useState)(!1),Wi=(vn,At)=>{const nt=At.line;let on=0;for(let Jn=0;Jn<nt;Jn++)on+=vn.getLine(Jn).split(It).length-1;const fn=vn.getLine(nt).substring(0,At.ch);return on+=fn.split(It).length-1,on},ji=(vn,At,nt,on)=>{const fn=vn.getRange(At.from,At.to);let Jn=0;if(At.text.forEach(pn=>{Jn+=pn.split(It).length-1}),At.origin!=="setValue"){if(fn&&fn.indexOf(It)!==-1){const pn=fn.split(It).length-1,Rt=Wi(vn,At.from);if(console.log(`\u5220\u9664${pn}\u4E2A\uFF0C \u524D\u9762\u6709${Rt}\u4E2A\uFF0C\u65B0\u589E${Jn}\u4E2A`),pn>1){const In=Array.from({length:pn},(Vn,Pi)=>Rt+Pi);on(In)}else on(Rt)}else if(Jn>0){const pn=Wi(vn,At.from);console.log(`\u65B0\u589E${Jn}\u4E2A\uFF0C\u4E4B\u524D\u6709${pn}\u4E2A`),nt(Jn,pn)}}},Gn=()=>{const vn=si.getFieldValue(["sub_item_banks",...Fi]);si.setFieldValue(["sub_item_banks",...Fi],vn==null?void 0:vn.map((At,nt)=>dt(Je({},At),{position:nt+1})))},Ht=(0,We.useRef)(),Wt=(vn,At)=>{for(let nt=0;nt<vn;nt++)Ht.current({position:null,answer_text:[""]},At+nt);Gn()},Zt=(0,We.useRef)(),yt=vn=>{Zt.current(vn),Gn()},un=(Hr=(Xr=si.getFieldValue("sub_item_banks"))==null?void 0:Xr[Fi==null?void 0:Fi[0]])==null?void 0:Hr[Fi==null?void 0:Fi[1]];return(0,We.useEffect)(()=>{console.log("========",si.getFieldsValue())},[si]),he.createElement("div",{className:wt.Z.wrap},he.createElement("div",{className:wt.Z.questionTitleEditorWrap},he.createElement(Me.default.Item,{label:"\u9898\u5E72",name:ao,labelCol:{span:24},rules:[{required:!0}]},he.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:vi,showNullButton:!0,onCMBeforeChange:(vn,At)=>{ji(vn,At,Wt,yt)}}))),he.createElement(Me.default.List,{name:Fi,rules:[{validator(vn,At){if((At==null?void 0:At.length)===0)return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const nt of At){const{answer_text:on}=nt||{};if(on!=null&&on.some(fn=>(fn==null?void 0:fn.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(vn,{add:At,remove:nt},{errors:on})=>(Ht.current=At,Zt.current=nt,he.createElement(he.Fragment,null,he.createElement(Me.default.Item,{label:he.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(vn!=null&&vn.length)&&he.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),vn.map((fn,Jn)=>{var pn=fn,{key:Rt,name:In}=pn,Vn=He(pn,["key","name"]);return he.createElement(Mt.Z,{align:"top",key:Rt},he.createElement(Ct.Z,{className:`${wt.Z.blankIndex} pt5`},"\u586B\u7A7A\u9879",Jn+1),he.createElement(Ct.Z,{flex:1},he.createElement(Mt.Z,{align:"top",justify:"space-between"},he.createElement(Ct.Z,{flex:1},he.createElement(Me.default.Item,dt(Je({},Vn),{name:[In,"answer_text"],noStyle:!0}),he.createElement(bt,null))),Ui&&he.createElement(Ct.Z,{flex:"224px"},he.createElement(Me.default.Item,dt(Je({},Vn),{name:[In,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:wt.Z.blankInputNumberWrapper}),he.createElement(Ye.Z,{className:wt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),he.createElement(Me.default.Item,dt(Je({},Vn),{name:[In,"position"],noStyle:!0}),he.createElement(de.default,{type:"hidden"}))))})))),he.createElement(Mt.Z,{align:"middle"},he.createElement(Me.default.Item,{name:[fi,"downcase"],valuePropName:"checked"},he.createElement(se.Z,null)),he.createElement(Ct.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),he.createElement(Mt.Z,{align:"middle"},he.createElement(Me.default.Item,{name:[fi,"no_space"],valuePropName:"checked"},he.createElement(se.Z,null)),he.createElement(Ct.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(un==null?void 0:un.length)>1&&he.createElement(Mt.Z,{align:"middle",className:(un==null?void 0:un.length)>1?"mb30":`${wt.Z.hide}`},he.createElement(Me.default.Item,{name:Be},he.createElement(et,null)),he.createElement(Ct.Z,{className:"ml10"},"\u5141\u8BB8\u5B66\u751F\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7684\u987A\u5E8F\u4E0D\u4E00\u81F4")),he.createElement("div",{className:"mt30",onClick:()=>Li(!0)},he.createElement(Me.default.Item,{name:wr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},he.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:jn}))))};var Bt=me(59301),Ut=Object.defineProperty,Nt=Object.defineProperties,qe=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,Tt=Object.prototype.hasOwnProperty,Ln=Object.prototype.propertyIsEnumerable,Mn=(vi,si,fi)=>si in vi?Ut(vi,si,{enumerable:!0,configurable:!0,writable:!0,value:fi}):vi[si]=fi,zt=(vi,si)=>{for(var fi in si||(si={}))Tt.call(si,fi)&&Mn(vi,fi,si[fi]);if(Ke)for(var fi of Ke(si))Ln.call(si,fi)&&Mn(vi,fi,si[fi]);return vi},rn=(vi,si)=>Nt(vi,qe(si)),xn=(vi,si)=>{var fi={};for(var Ui in vi)Tt.call(vi,Ui)&&si.indexOf(Ui)<0&&(fi[Ui]=vi[Ui]);if(vi!=null&&Ke)for(var Ui of Ke(vi))si.indexOf(Ui)<0&&Ln.call(vi,Ui)&&(fi[Ui]=vi[Ui]);return fi};const Un={\u6B63\u786E:"T",\u9519\u8BEF:"F"},yn=({value:vi,onChange:si,form:fi,choiceKey:Ui})=>{const Fi=(vi==null?void 0:vi.is_answer)===1,ao=vi==null?void 0:vi.choice_text,wr=()=>{var Be;const Xr=(Be=fi==null?void 0:fi.getFieldValue(["sub_item_banks",...Ui]))==null?void 0:Be.map(Hr=>({choice_text:Hr.choice_text,is_answer:0}));fi==null||fi.setFieldValue(["sub_item_banks",...Ui],Xr),si(rn(zt({},vi),{is_answer:1}))};return Bt.createElement(Mt.Z,{className:wt.Z.choiceWrap,align:"middle",wrap:!1},Bt.createElement(Ct.Z,{onClick:wr,className:`${wt.Z.choiceIndex} ${wt.Z.judgementIndex} ${Fi?wt.Z.activeAnswer:""}`},Un[ao]),Bt.createElement(Ct.Z,{flex:1,className:`${wt.Z.editorWrap} ml15`},Bt.createElement("div",{className:`${wt.Z.inputBorder} ${wt.Z.placeholder} ${Fi?wt.Z.activeJudgementAnswer:""}`},ao)),Bt.createElement(Ct.Z,{flex:"0 0 auto",className:"ml15"},Bt.createElement("div",{onClick:wr,className:`${wt.Z.setAnswerBtn} ${Fi?wt.Z.activeAnswer:""}`},Fi?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},sn=({questionTitlePlaceholder:vi,choiceKey:si="choices",form:fi,titleKey:Ui="name",analysisKey:Fi="analysis"})=>{const[ao,wr]=(0,We.useState)(!1);return Bt.createElement("div",{className:wt.Z.wrap},Bt.createElement("div",{className:wt.Z.questionTitleEditorWrap},Bt.createElement(Me.default.Item,{label:"\u9898\u5E72",name:Ui,labelCol:{span:24},rules:[{required:!0}]},Bt.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:vi}))),Bt.createElement(Me.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Bt.createElement(Me.default.List,{name:si,rules:[{validator(Be,Xr){return Xr.some(jn=>(jn==null?void 0:jn.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},Be=>Bt.createElement("div",{id:"choices",style:{display:"flex",flexDirection:"column",gap:"20px"}},Be.map(Xr=>{var Hr=Xr,{key:jn,name:Li}=Hr,Wi=xn(Hr,["key","name"]);return Bt.createElement(Me.default.Item,rn(zt({},Wi),{key:jn,name:Li,noStyle:!0}),Bt.createElement(yn,{form:fi,choiceKey:si}))})))),Bt.createElement("div",{className:"mt30",onClick:()=>wr(!0)},Bt.createElement(Me.default.Item,{name:Fi,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Bt.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:ao}))))};var Lt=me(8591),ti=me(12563),gi=me(23469),Pn=me(86902),Xt=Object.defineProperty,Kt=Object.defineProperties,Ot=Object.getOwnPropertyDescriptors,rt=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable,Gt=(vi,si,fi)=>si in vi?Xt(vi,si,{enumerable:!0,configurable:!0,writable:!0,value:fi}):vi[si]=fi,it=(vi,si)=>{for(var fi in si||(si={}))Ue.call(si,fi)&&Gt(vi,fi,si[fi]);if(rt)for(var fi of rt(si))$t.call(si,fi)&&Gt(vi,fi,si[fi]);return vi},at=(vi,si)=>Kt(vi,Ot(si)),Te=(vi,si)=>{var fi={};for(var Ui in vi)Ue.call(vi,Ui)&&si.indexOf(Ui)<0&&(fi[Ui]=vi[Ui]);if(vi!=null&&rt)for(var Ui of rt(vi))si.indexOf(Ui)<0&&$t.call(vi,Ui)&&(fi[Ui]=vi[Ui]);return fi};const Pe=vi=>{var si=vi,{value:fi,onChange:Ui}=si,Fi=Te(si,["value","onChange"]);const ao=wr=>{Ui([wr])};return We.createElement(gi.Z,at(it({},Fi),{defaultValue:fi==null?void 0:fi[0],onChange:ao}))},ye=vi=>{if(!vi)return!1;let si=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return vi==="|"?(Lt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},ke=({value:vi=[],onClose:si})=>We.createElement(ti.default,{closable:!0,onClose:si,className:wt.Z.keywordTag},We.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},vi.join(" \u6216 "))),$e=({questionTitlePlaceholder:vi,form:si,showKeywords:fi,isMustKeyWords:Ui=fi,titleKey:Fi="name",analysisKey:ao="analysis",answerTexts:wr="answer_texts",keywords:Be="keywords",useKeywords:Xr="use_keywords",indexs:Hr})=>{const[jn,Li]=(0,We.useState)(!1),[Wi,ji]=(0,We.useState)(""),[Gn,Ht]=(0,We.useState)(!1),Wt=Me.default.useWatch("question_score",si);return We.createElement("div",{className:wt.Z.wrap},We.createElement("div",{className:wt.Z.questionTitleEditorWrap},We.createElement(Me.default.Item,{label:"\u9898\u5E72",name:Fi,labelCol:{span:24},rules:[{required:!0}]},We.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:vi}))),We.createElement(Me.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:wr,labelCol:{span:24}},We.createElement(Pe,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),fi&&!Ui&&We.createElement(Me.default.Item,{hidden:!0,name:Xr,valuePropName:"checked"},We.createElement(se.Z,{defaultChecked:!0})),fi&&Ui&&We.createElement(Mt.Z,{align:"middle",className:"mb30"},We.createElement(Me.default.Item,{name:Xr,valuePropName:"checked"},We.createElement(se.Z,{onChange:()=>{var Zt,yt,un,vn,At,nt;console.log(si.getFieldsValue()),Ht((un=(yt=(Zt=si.getFieldsValue())==null?void 0:Zt.sub_item_banks)==null?void 0:yt[Hr])==null?void 0:un.use_keywords),console.log((nt=(At=(vn=si.getFieldsValue())==null?void 0:vn.sub_item_banks)==null?void 0:At[Hr])==null?void 0:nt.use_keywords),console.log(Gn)}})),We.createElement(Ct.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),We.createElement(Ct.Z,null,We.createElement(st.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},We.createElement(Pn.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(Gn||!Ui)&&We.createElement(Me.default.List,{name:Be,rules:[{validator(Zt,yt){return Ui?yt!=null&&yt.length?(yt==null?void 0:yt.reduce((vn,At)=>vn+At.score,0))>parseFloat(Wt)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD")):Promise.resolve()}}]},(Zt,{add:yt,remove:un})=>We.createElement(We.Fragment,null,We.createElement("div",{className:`${wt.Z.title} mb10`},Ui?"\u5173\u952E\u8BCD":We.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),We.createElement(Mt.Z,{align:"middle",className:"font14 mb30"},We.createElement(Ct.Z,{flex:1},We.createElement(de.default,{value:Wi,onChange:vn=>{ji(vn.target.value)},maxLength:50,allowClear:!0,onPressEnter:vn=>{var At,nt,on,fn;const Jn=`${(At=vn.target)==null?void 0:At.value}`,pn=(on=(nt=Jn==null?void 0:Jn.split("|"))==null?void 0:nt.filter(Vn=>!!Vn))==null?void 0:on.map(Vn=>Vn==null?void 0:Vn.trim()),Rt=si.getFieldValue(["sub_item_banks",...Be]),In=((fn=Rt==null?void 0:Rt.map(Vn=>Vn==null?void 0:Vn.keyword))==null?void 0:fn.flat())||[];for(const Vn of pn)if(In.includes(Vn)){Lt.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}ye(Jn)&&(yt({keyword:pn,score:1}),ji(""))},className:wt.Z.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),We.createElement(Ct.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Zt.map(vn=>{var At=vn,{key:nt,name:on}=At,fn=Te(At,["key","name"]);return We.createElement(Mt.Z,{key:nt,className:"mb20",style:{marginRight:148}},We.createElement(Ct.Z,{flex:1},We.createElement(Mt.Z,{align:"middle",justify:"space-between"},We.createElement(Me.default.Item,at(it({},fn),{name:[on,"keyword"]}),We.createElement(ke,{onClose:()=>un(on)})),Ui&&We.createElement(Me.default.Item,at(it({},fn),{name:[on,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:wt.Z.blankInputNumberWrapper}),We.createElement(Ye.Z,{className:wt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),We.createElement("div",{onClick:()=>Li(!0)},We.createElement(Me.default.Item,{name:ao,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},We.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:jn}))))};var Le=me(59301),vt=Object.defineProperty,an=Object.defineProperties,bn=Object.getOwnPropertyDescriptors,en=Object.getOwnPropertySymbols,wn=Object.prototype.hasOwnProperty,ai=Object.prototype.propertyIsEnumerable,_n=(vi,si,fi)=>si in vi?vt(vi,si,{enumerable:!0,configurable:!0,writable:!0,value:fi}):vi[si]=fi,Hn=(vi,si)=>{for(var fi in si||(si={}))wn.call(si,fi)&&_n(vi,fi,si[fi]);if(en)for(var fi of en(si))ai.call(si,fi)&&_n(vi,fi,si[fi]);return vi},wi=(vi,si)=>an(vi,bn(si)),Hi=(vi,si)=>{var fi={};for(var Ui in vi)wn.call(vi,Ui)&&si.indexOf(Ui)<0&&(fi[Ui]=vi[Ui]);if(vi!=null&&en)for(var Ui of en(vi))si.indexOf(Ui)<0&&ai.call(vi,Ui)&&(fi[Ui]=vi[Ui]);return fi};const{Panel:_i}=lt.default,cr=({questionTitlePlaceholder:vi,choiceKey:si,form:fi,withScore:Ui})=>{const[Fi,ao]=(0,We.useState)([]),wr=Be=>{ao(Be)};return Le.createElement("div",{className:wt.Z.wrap},Le.createElement("div",{className:wt.Z.questionTitleEditorWrap},Le.createElement(Me.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Le.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:vi}))),Le.createElement(Me.default.Item,{label:"\u5C0F\u9898",required:!0,labelCol:{span:24}}),Le.createElement(Me.default.List,{name:"sub_item_banks",rules:[{validator(Be,Xr){return Xr?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(Be,{add:Xr,remove:Hr,move:jn})=>{const Li=fi.getFieldValue("sub_item_banks");return Le.createElement(Le.Fragment,null,Le.createElement(lt.default,{className:Be.length>0?wt.Z.collapseWrapper:"",bordered:!1,activeKey:Fi,onChange:wr,expandIcon:({isActive:Wi})=>Le.createElement("i",{className:`iconfont icon-weizhankai ${Wi?wt.Z.open:wt.Z.close}`,style:{fontSize:14,transition:"all .2s"}})},Be.map((Wi,ji)=>{var Gn=Wi,{key:Ht,name:Wt}=Gn,Zt=Hi(Gn,["key","name"]),yt,un,vn,At,nt,on,fn,Jn,pn,Rt;return Le.createElement(_i,{className:wt.Z.panel,forceRender:!0,header:Le.createElement("div",{className:wt.Z.panelHeader},"\u7B2C",ji+1,"\u5C0F\u9898",Le.createElement("span",null,"\uFF08",((yt=Li==null?void 0:Li[Wt])==null?void 0:yt.item_type)=="SINGLE"?"\u5355\u9009\u9898":((un=Li==null?void 0:Li[Wt])==null?void 0:un.item_type)=="MULTIPLE"?"\u591A\u9009\u9898":((vn=Li==null?void 0:Li[Wt])==null?void 0:vn.item_type)=="COMPLETION"?"\u586B\u7A7A\u9898":((At=Li==null?void 0:Li[Wt])==null?void 0:At.item_type)=="JUDGMENT"?"\u5224\u65AD\u9898":"\u7B80\u7B54\u9898","\uFF09")),key:Wt,extra:Le.createElement(Mt.Z,{align:"middle",onClick:In=>In.stopPropagation()},Ui&&Le.createElement(Ct.Z,null,Le.createElement(Me.default.Item,wi(Hn({},Zt),{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5C0F\u9898\u5206\u503C"}],label:"\u5206\u503C",name:[Wt,"question_score"],className:wt.Z.blankInputNumberWrapper}),Le.createElement(Ye.Z,{className:wt.Z.blankInput,placeholder:"\u8BF7\u8F93\u5165\u5F53\u524D\u5C0F\u9898\u5206\u6570",min:.1,precision:1,max:100,style:{width:150}}))),Le.createElement(Ct.Z,null,Le.createElement(Mt.Z,{align:"middle",className:"pl40",justify:"end"},ji!==0&&Le.createElement("div",{onClick:()=>{var In;jn(ji,ji-1);const Vn=(In=fi.getFieldValue("sub_item_banks"))==null?void 0:In.map((Pi,tn)=>(Be.map((hn,Rn)=>{tn===Rn&&(Pi.q_position=Number(hn.name)+1)}),Pi));fi.setFieldValue("sub_item_banks",Vn)}},Le.createElement(st.Z,{title:"\u4E0A\u79FB"},Le.createElement("i",{className:"iconfont icon-shangyi3 c-grey-999 primary-hover"}))),ji<Be.length-1&&Le.createElement("div",{onClick:()=>{var In;jn(ji,ji+1);const Vn=(In=fi.getFieldValue("sub_item_banks"))==null?void 0:In.map((Pi,tn)=>(Be.map((hn,Rn)=>{tn===Rn&&(Pi.q_position=Number(hn.name)+1)}),Pi));fi.setFieldValue("sub_item_banks",Vn)},className:ji===0?"":"ml15"},Le.createElement(st.Z,{title:"\u4E0B\u79FB"},Le.createElement("i",{className:"iconfont icon-xiayi3 c-grey-999 primary-hover"}))))),Le.createElement(Ct.Z,null,Le.createElement(st.Z,{title:"\u5220\u9664"},Le.createElement(Ie.Z,{className:`${wt.Z.deleteIcon} ml15`,onClick:()=>Hr(Wt)}))))},Le.createElement(Me.default.Item,wi(Hn({},Zt),{name:Wt}),(((nt=Li==null?void 0:Li[Wt])==null?void 0:nt.item_type)=="SINGLE"||((on=Li==null?void 0:Li[Wt])==null?void 0:on.item_type)=="MULTIPLE")&&Le.createElement(ue.u,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((fn=Li==null?void 0:Li[Wt])==null?void 0:fn.item_type)=="MULTIPLE",form:fi,choiceKey:[Wt,"choices"],titleKey:[Wt,"name"],analysisKey:[Wt,"analysis"],choiceOptionsPath:["sub_item_banks",Wt,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((Jn=Li==null?void 0:Li[Wt])==null?void 0:Jn.item_type)=="COMPLETION"&&Le.createElement(xt,{form:fi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,name:Wt,titleKey:[Wt,"name"],analysisKey:[Wt,"analysis"],isOrdered:[Wt,"is_ordered"],answerKey:[Wt,"standard_answers"]}),((pn=Li==null?void 0:Li[Wt])==null?void 0:pn.item_type)=="JUDGMENT"&&Le.createElement(sn,{form:fi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[Wt,"name"],analysisKey:[Wt,"analysis"],choiceKey:[Wt,"choices"]}),((Rt=Li==null?void 0:Li[Wt])==null?void 0:Rt.item_type)=="SUBJECTIVE"&&Le.createElement($e,{showKeywords:!0,isMustKeyWords:!1,form:fi,titleKey:[Wt,"name"],analysisKey:[Wt,"analysis"],answerTexts:[Wt,"answer_texts"],useKeywords:[Wt,"use_keywords"],keywords:[Wt,"keywords"],indexs:Wt,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})),Be.length<20&&Le.createElement(pt.Z,{menu:{items:[{label:Le.createElement("div",{onClick:()=>{Xr({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"SINGLE"}),ao([Be==null?void 0:Be.length,...Fi])}},"\u5355\u9009\u9898"),key:"1",show:!0},{label:Le.createElement("div",{onClick:()=>{Xr({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"MULTIPLE"}),ao([Be==null?void 0:Be.length,...Fi])}},"\u591A\u9009\u9898"),key:"2",show:!0},{label:Le.createElement("div",{onClick:()=>{Xr({name:"",choices:[{choice_text:"\u6B63\u786E",is_answer:0},{choice_text:"\u9519\u8BEF",is_answer:0}],analysis:"",item_type:"JUDGMENT"}),ao([Be==null?void 0:Be.length,...Fi])}},"\u5224\u65AD\u9898"),key:"3",show:!0},{label:Le.createElement("div",{onClick:()=>{Xr({name:"",analysis:"",is_ordered:!0,standard_answers:[],item_type:"COMPLETION",downcase:!0,no_space:!0}),ao([Be==null?void 0:Be.length,...Fi])}},"\u586B\u7A7A\u9898"),key:"4",show:!0},{label:Le.createElement("div",{onClick:()=>{Xr({name:"",answer_texts:[],keywords:[],use_keywords:!0,analysis:"",item_type:"SUBJECTIVE"}),ao([Be==null?void 0:Be.length,...Fi])}},"\u7B80\u7B54\u9898"),key:"5",show:!0}].filter(Wi=>Wi.show).map(Wi=>({label:Wi.label,key:Wi.key}))}},Le.createElement("div",{className:`${wt.Z.addBtn}`},"\u6DFB\u52A0\u5C0F\u9898")))}))};var _r=me(35890)},25711:function(zn,En,me){"use strict";me.d(En,{z:function(){return je},Z:function(){return ze}});var ue=me(59301),Re=me(1751),Ze=me(31087),ot=me(64018),We=me(37312),lt=me(10148),Me=me(58130),Mt=me(15342),Ct=me(1012),Ye=me(79646),st=me(59301),wt=({html:Xe})=>{const Je=(0,ue.useRef)(null),dt=(0,ue.useRef)(null),He=`.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,ue.useEffect)(()=>{const bt=Je.current.attachShadow({mode:"open"});dt.current=document.createElement("div"),dt.current.className="markdown-body",dt.current.innerHTML=Xe,bt.appendChild(dt.current);const et=document.createElement("style");return et.textContent=He,bt.appendChild(et),()=>{bt.innerHTML=""}},[]),(0,ue.useEffect)(()=>{dt.current&&(dt.current.innerHTML=Xe)},[Xe]),st.createElement("div",{ref:Je})},Ie=Object.defineProperty,te=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,se=(Xe,Je,dt)=>Je in Xe?Ie(Xe,Je,{enumerable:!0,configurable:!0,writable:!0,value:dt}):Xe[Je]=dt,he=(Xe,Je)=>{for(var dt in Je||(Je={}))ee.call(Je,dt)&&se(Xe,dt,Je[dt]);if(te)for(var dt of te(Je))de.call(Je,dt)&&se(Xe,dt,Je[dt]);return Xe};const ve="@\u2581\u2581@",be="@\u2581@",Ne=/<pre[^>]*>/g;function Fe(Xe){let Je=document.createElement("div");return Je.innerHTML=Xe,Je.childNodes.length===0?"":Je.childNodes[0].nodeValue}const je=(Xe,Je)=>{Xe=Xe||"";const dt=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,He=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,bt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,et=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Je?Xe.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(dt,(It,xt,Bt,Ut,Nt,qe,Ke)=>{const Tt=xt||Ut||qe,Ln=Bt||Nt||Ke||"?";return lt.Z.API_SERVER+"/api/attachments/"+Tt+Ln+"&t="+(0,Me.Jn)(Tt,Date.now())+(It.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Xe=Xe.replace(et,(It,xt,Bt,Ut,Nt,qe,Ke)=>{const Tt=xt||Ut||qe,Ln=Bt||Nt||Ke||"?";return lt.Z.API_SERVER+"/attachments/download/"+Tt+Ln+"&t="+(0,Me.Jn)(Tt,Date.now())+(It.indexOf(")")>-1?")":"&")}).replace(dt,(It,xt,Bt,Ut,Nt,qe,Ke)=>{const Tt=xt||Ut||qe,Ln=Bt||Nt||Ke||"?";return lt.Z.API_SERVER+"/api/attachments/"+Tt+Ln+"&t="+(0,Me.Jn)(Tt,Date.now())+(It.indexOf(")")>-1?")":"&")}).replace(He,(It,xt,Bt,Ut,Nt)=>{const qe=xt||Ut,Ke=Bt||Nt||"";return'"'+lt.Z.API_SERVER+"/api/attachments/"+qe+Ke+qe+Ke+"&t="+(0,Me.Jn)(qe,Date.now())}).replace(bt,(It,xt,Bt,Ut,Nt)=>{const qe=xt||Ut,Ke=Bt||Nt||"";return"("+lt.Z.API_SERVER+"/files/uploads/"+qe+Ke+qe+Ke+"&t="+(0,Me.Jn)(qe,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,`
|
|
|
`),Xe)};var ze=({value:Xe="",className:Je,showTextOnly:dt,showLines:He,style:bt={},stylesPrev:et={},highlightKeywords:It,showProgramFill:xt,isProgramFill:Bt,disabledFill:Ut=!1,programFillValue:Nt,onFillChange:qe=Ln=>{},onFillBlur:Ke=()=>{},onFillFocus:Tt=()=>{}})=>{let Ln=String(Xe);const[Mn,zt]=(0,ue.useState)(""),[rn,xn]=(0,ue.useState)("office"),[Un,yn]=(0,ue.useState)([]),sn=(0,ue.useRef)("a"+(0,Ct.Z)()),Lt={},ti=(Te,Pe,ye)=>{const ke=document.createElement(Te===be?"input":"textarea");ke.style.width="100%",ke.style.height=Te===be?"40px":"151px",ke.rows=5,ke.spellcheck=!1,ke.name="edu-program-fill",ke.placeholder="\u8BF7\u8F93\u5165",ke.dataset.id=Pe;const $e=Object.keys(Lt).length;return Lt[$e]=ke,`<span class="edu-program-fill-wrap ${Te===be?"":"show"}" style="width:${Te===be?"400px":"100%"}" title=${ye||""}><span>${ke.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function gi(Te){return Te=Te.replace(/!\[.*?\]\(.*?\)/g,""),Te=Te.replace(/\[.*?\]\(.*?\)/g,""),Te=Te.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Te=Te.replace(/<embed.*?>/g,""),Te=Te.replace(/<img.*?>/g,""),Te=Te.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Te=Te.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Te=Te.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Te=Te.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Te}const Pn=Te=>Te.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Pe,ye){let ke=ye.replace(/(\n|\r)/g,"").split("}"),$e=[];return ke.map(Le=>{Le!=""&&$e.push(`.${sn.current} ${Le}`)}),`<style>${$e.join("}")}</style>`}),Xt=(0,ue.useMemo)(()=>{try{const ke=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,$e=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Le=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,vt=/\(\/attachments\/download\//g;Ln=Ln.replace(vt,"("+lt.Z.API_SERVER+"/attachments/download/").replace(ke,"("+lt.Z.API_SERVER+"/api/attachments/").replace($e,'"'+lt.Z.API_SERVER+"/api/attachments/").replace(Le,'"'+lt.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(ke){}if(xt){let ke=-1;return Ln=Ln.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function($e,Le,vt){var an;return++ke,ti($e,ke,(an=Nt==null?void 0:Nt[ke])==null?void 0:an.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Pn(Ln||"")}</pre>`}let Te=Pn(Ln);Te=(0,Ze.ZP)(Te);const Pe=(0,Ze.ez)();Ln.match(/\[TOC\]/)&&(Te=Te.replace("<p>[TOC]</p>",(0,Ze.Qv)()),(0,Ze.Iy)()),Te=Te.replace(/(__special_katext_id_\d+__)/g,(ke,$e)=>{const{type:Le,expression:vt}=Pe[$e];return(0,Mt.renderToString)(Fe(vt)||"",{displayMode:Le==="block",throwOnError:!1,output:"html"})}),Te=Te.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ze.AL)();const ye=document.createElement("div");if(ye.innerHTML=Te,dt)return ye.innerText;if(It){const ke=It.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ue(ye,ke),ye.innerHTML}return setTimeout(()=>it(),500),ye.innerHTML},[Ln,It]);(0,ue.useEffect)(()=>{$t.current&&$t.current.querySelectorAll(["input","textarea"]).forEach(Pe=>{Pe.oninput=Kt,Pe.onblur=Ot,Pe.onfocus=rt})},[Un]),(0,ue.useEffect)(()=>{var Te,Pe,ye,ke,$e;if(Nt!=null&&Nt.length)try{const Le=$t.current.querySelectorAll(".edu-program-fill-score"),vt=$t.current.querySelectorAll('[name="edu-program-fill"]');for(const[an,bn]of vt.entries())bn.value=((Te=Nt==null?void 0:Nt[an])==null?void 0:Te.value)||"",((Pe=Nt==null?void 0:Nt[an])==null?void 0:Pe.type)==="warning"?bn.className="program-fill-warning":((ye=Nt==null?void 0:Nt[an])==null?void 0:ye.type)==="success"?bn.className="program-fill-success":bn.className="";for(const[an,bn]of Le.entries())bn.innerHTML=(ke=Nt==null?void 0:Nt[an])!=null&&ke.score?`${($e=Nt==null?void 0:Nt[an])==null?void 0:$e.score}\u5206`:"";yn(Nt)}catch(Le){console.log(Le,"error")}},[Nt]);const Kt=Te=>{Un[Te.target.dataset.id]=Un[Te.target.dataset.id]||{},Un[Te.target.dataset.id].value=Te.target.value,yn([...Un]),qe(Un,Te.target.dataset.id)},Ot=Te=>{Un[Te.target.dataset.id]=Un[Te.target.dataset.id]||{},Un[Te.target.dataset.id].value=Te.target.value,yn([...Un]),Ke(Un,Te.target.dataset.id)},rt=Te=>{Un[Te.target.dataset.id]=Un[Te.target.dataset.id]||{},Un[Te.target.dataset.id].value=Te.target.value,yn([...Un]),Tt(Un,Te.target.dataset.id)};function Ue(Te,Pe){return Te.childNodes.forEach(ye=>{var ke;if(ye.childNodes.length>0)Ue(ye,Pe);else if(ye.nodeName!=="IMG")if(ye.innerHTML)ye.innerHTML=(ke=ye.innerHTML)==null?void 0:ke.replace(new RegExp(Pe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const $e=document.createElement("span");$e.innerHTML=ye.textContent.replace(new RegExp(Pe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),ye.replaceWith($e)}})}const $t=(0,ue.useRef)();Ze.jb.WebkitLineClamp=He,He&&(bt=he(he({},bt),Ze.jb));function Gt(Te){let Pe=Te.target;if(Pe.tagName.toUpperCase()==="A"){let ye=Pe.getAttribute("href");if(ye.indexOf("office")>-1)Te.preventDefault(),zt(ye),xn("office");else if(ye.indexOf("application/pdf")>-1)Te.preventDefault(),zt(ye),xn("pdf");else if(ye.indexOf("text/html")>-1)Te.preventDefault(),zt(ye),xn("html");else if(ye.startsWith("#")){Te.preventDefault();let ke=document.getElementById(ye.replace("#",""));ke&&ke.scrollIntoView(!0)}}}const it=()=>{var Te;const Pe=(Te=$t.current)==null?void 0:Te.querySelectorAll("video");Pe==null||Pe.forEach(ye=>{if(ye.oncontextmenu=()=>!1,ye.src.indexOf(".m3u8")>-1&&!ye.canPlayType("application/vnd.apple.mpegurl")){if(We.ZP.isSupported()){var ke=new We.ZP;ke.loadSource(ye.src),ke.attachMedia(ye)}}})};(0,ue.useEffect)(()=>{if($t.current&&Xt&&Xt.match(Ne)&&window.PR.prettyPrint(),$t.current)return $t.current.addEventListener("click",Gt),()=>{var Te;(Te=$t.current)==null||Te.removeEventListener("click",Gt),(0,Ze.AL)(),(0,Ze.Iy)()}},[Xt,$t.current,Gt]),(0,ue.useEffect)(()=>{var Te;const Pe=ye=>{ye.preventDefault(),ye.clipboardData.setData("text",window.getSelection().toString())};return(Te=$t.current)==null||Te.addEventListener("copy",Pe),()=>{var ye;(ye=$t.current)==null||ye.removeEventListener("copy",Pe)}},[$t.current]);const at=Te=>/<style[\s\S]*?>/i.test(Te||"");return ue.createElement(ue.Fragment,null,dt&&ue.createElement("div",{ref:$t},Xt),!dt&&!at(Xt)&&ue.createElement("div",{ref:$t,style:he({},bt),className:`${Je||""} ${Ut?"disabled-fill":""} markdown-body ${sn.current}`,dangerouslySetInnerHTML:{__html:Xt}}),!dt&&at(Xt)&&ue.createElement(wt,{html:Xt}),ue.createElement(Ye.Z,{close:!0,data:Mn,type:Mn!=null&&Mn.length?rn:"",style:he({},et),onClose:()=>zt("")}))}},48498:function(zn,En,me){"use strict";me.d(En,{Z:function(){return lt}});var ue=me(59301),Re={btn:"btn___kReTL",redBtn:"redBtn___UFEL0"},Ze=me(92310),ot=me.n(Ze),lt=({className:Me,style:Mt,state:Ct,onClick:Ye})=>{var st,pt;return ue.createElement("div",{onClick:Ye,className:ot()(Ct?(st=Re)==null?void 0:st.redBtn:(pt=Re)==null?void 0:pt.btn,Me),style:Mt},Ct?ue.createElement(ue.Fragment,null,ue.createElement("i",{className:"iconfont icon-biaoji1"}),ue.createElement("span",null,"\u53D6\u6D88\u6807\u8BB0\u9519\u9898")):ue.createElement(ue.Fragment,null,ue.createElement("i",{className:"iconfont icon-biaojigaiti"}),ue.createElement("span",null,"\u6807\u8BB0\u9519\u9898")))}},36866:function(zn,En,me){"use strict";me.d(En,{h:function(){return be},Z:function(){return ve}});var ue=me(59301),Re=me(57809),Ze=me(78241),ot=me(3113),We=me(89780),lt=me.n(We),Me=me(79906),Mt=Object.defineProperty,Ct=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,st=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,Ie=(Ne,Fe,je)=>Fe in Ne?Mt(Ne,Fe,{enumerable:!0,configurable:!0,writable:!0,value:je}):Ne[Fe]=je,te=(Ne,Fe)=>{for(var je in Fe||(Fe={}))pt.call(Fe,je)&&Ie(Ne,je,Fe[je]);if(st)for(var je of st(Fe))wt.call(Fe,je)&&Ie(Ne,je,Fe[je]);return Ne},ee=(Ne,Fe)=>Ct(Ne,Ye(Fe));const de=Re.default.Option,se={labelCol:{span:4},wrapperCol:{span:20}},he={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};var ve=({callback:Ne,onCancel:Fe})=>{const[je,ze]=(0,ue.useState)("python");function Xe(dt){ze(he[dt][1])}function Je(dt){Ne(dt)}return ue.createElement(Ze.default,ee(te({},se),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Je,style:{width:500}}),ue.createElement(Ze.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ue.createElement(Re.default,{getPopupContainer:dt=>dt.parentNode,onChange:Xe},Object.keys(he).map(dt=>ue.createElement(de,{key:dt,value:dt},he[dt][0])))),ue.createElement(Ze.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ue.createElement(be,{mode:je})),ue.createElement("div",{className:"flex-container flex-end"},ue.createElement(ot.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ue.createElement(ot.ZP,{type:"ghost",onClick:Fe},"\u53D6\u6D88")))};function be({value:Ne,onChange:Fe,mode:je,options:ze={}}){const Xe=(0,ue.useRef)(),[Je,dt]=(0,ue.useState)();return(0,ue.useEffect)(()=>{if(Je){let He=function(bt){const et=bt.getValue();Fe&&Fe(et)};return Je.on("change",He),()=>{Je.off("change",He)}}},[Je,Fe]),(0,ue.useEffect)(()=>{Je&&Je.setOption("mode",je)},[Je,je]),(0,ue.useEffect)(()=>{Je&&(Ne!==Je.getValue()||Ne==="")&&setTimeout(()=>{Je.setValue(Ne||"")},300)},[Je,Ne]),(0,ue.useEffect)(()=>{if(Xe.current&&!Je){const He=lt().fromTextArea(Xe.current,te({mode:je,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},ze));dt(He)}},[Xe.current,Je]),ue.createElement("div",{className:"my-codemirror-container"},ue.createElement("textarea",{ref:Xe}))}},23469:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Gn}});var ue=me(59301),Re=me(89780),Ze=me.n(Re),ot=me(76374),We=me(79906),lt=me(6313),Me=me(25717),Mt=me(99498),Ct=me(25419),Ye=me(67549),st=me(25711),pt=({value:Ht="",className:Wt,showTextOnly:Zt,showLines:yt,style:un={}})=>{const vn=(0,ue.useMemo)(()=>"",[Ht]);return ue.createElement(ue.Fragment,null,ue.createElement("div",{dangerouslySetInnerHTML:{__html:vn}}))},wt=me(59301),Ie=Object.defineProperty,te=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,ve=(Ht,Wt,Zt)=>Wt in Ht?Ie(Ht,Wt,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):Ht[Wt]=Zt,be=(Ht,Wt)=>{for(var Zt in Wt||(Wt={}))se.call(Wt,Zt)&&ve(Ht,Zt,Wt[Zt]);if(de)for(var Zt of de(Wt))he.call(Wt,Zt)&&ve(Ht,Zt,Wt[Zt]);return Ht},Ne=(Ht,Wt)=>te(Ht,ee(Wt));let Fe=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function je({onActionCallback:Ht,title:Wt,icon:Zt,actionName:yt,className:un="",children:vn}){function At(){Ht(yt)}return wt.createElement("a",{title:Wt,className:un,onClick:At},wt.createElement("i",{className:`${Zt}`}),vn)}var ze=({watch:Ht,showNullButton:Wt,showNullProgramButton:Zt,onActionCallback:yt,fullScreen:un,insertTemp:vn,hidetoolBar:At,extraUse:nt})=>{const on=[...Fe,{title:`${Ht?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Ht?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return wt.createElement("ul",{className:"markdown-toolbar-container"},!At&&on.map((fn,Jn)=>wt.createElement("li",{key:Jn},fn.actionName?wt.createElement(je,Ne(be({},fn),{onActionCallback:yt})):wt.createElement("span",{className:"v-line"}))),Wt?wt.createElement("li",null,wt.createElement(je,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:yt},wt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Zt?wt.createElement(wt.Fragment,null,wt.createElement("li",null,wt.createElement(je,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:yt},wt.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),wt.createElement("li",null,wt.createElement(je,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:yt},wt.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,vn&&wt.createElement("li",null,wt.createElement(je,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${vn}`,onActionCallback:yt},wt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),nt&&wt.createElement("li",null,nt),wt.createElement("li",{className:"btn-full-screen"},wt.createElement(je,{icon:`${un?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:un?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:yt})))},Xe=me(50474),Je=me(78241),dt=me(92832),He=me(3113),bt=Object.defineProperty,et=Object.defineProperties,It=Object.getOwnPropertyDescriptors,xt=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable,Nt=(Ht,Wt,Zt)=>Wt in Ht?bt(Ht,Wt,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):Ht[Wt]=Zt,qe=(Ht,Wt)=>{for(var Zt in Wt||(Wt={}))Bt.call(Wt,Zt)&&Nt(Ht,Zt,Wt[Zt]);if(xt)for(var Zt of xt(Wt))Ut.call(Wt,Zt)&&Nt(Ht,Zt,Wt[Zt]);return Ht},Ke=(Ht,Wt)=>et(Ht,It(Wt));const Tt={labelCol:{span:4},wrapperCol:{span:20}};var Ln=({callback:Ht,onCancel:Wt})=>{function Zt(yt){Ht(yt)}return ue.createElement(Je.default,Ke(qe({},Tt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Zt,style:{width:500}}),ue.createElement(Je.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ue.createElement(dt.default,null)),ue.createElement(Je.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ue.createElement(dt.default,null)),ue.createElement("div",{className:"flex-container flex-end"},ue.createElement(He.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ue.createElement(He.ZP,{type:"ghost",onClick:Wt},"\u53D6\u6D88")))},Mn=me(36866),zt=me(56701),rn=me(43418),xn=me(95237),Un=me(65983),yn=me(59301),sn=({callback:Ht,onCancel:Wt})=>{const Zt=document.createElement("canvas"),yt=Zt.getContext("2d");Zt.width=1e3,Zt.height=800,yt.fillStyle="#ffffff",yt.fillRect(0,0,Zt.width,Zt.height);const un=Zt.toDataURL("image/png");return yn.createElement(rn.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},yn.createElement(xn.Z,{style:{height:"100vh"}},yn.createElement(Un.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:un,visible:!0,title:String(Date.now())},onOk:vn=>{Ht({src:vn.url})},onClose:Wt})))},Lt=me(12378);function ti(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(ti,go.CommandHandler),ti.prototype.canAlignSelection=function(){var Ht=this.diagram;return!(Ht===null||Ht.isReadOnly||Ht.isModelReadOnly||Ht.selection.count<2)},ti.prototype.alignLeft=function(){var Ht=this.diagram;Ht.startTransaction("aligning left");var Wt=1/0;Ht.selection.each(function(Zt){Zt instanceof go.Link||(Wt=Math.min(Zt.position.x,Wt))}),Ht.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Wt,Zt.position.y))}),Ht.commitTransaction("aligning left")},ti.prototype.alignRight=function(){var Ht=this.diagram;Ht.startTransaction("aligning right");var Wt=-1/0;Ht.selection.each(function(Zt){if(!(Zt instanceof go.Link)){var yt=Zt.actualBounds.x+Zt.actualBounds.width;Wt=Math.max(yt,Wt)}}),Ht.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Wt-Zt.actualBounds.width,Zt.position.y))}),Ht.commitTransaction("aligning right")},ti.prototype.alignTop=function(){var Ht=this.diagram;Ht.startTransaction("alignTop");var Wt=1/0;Ht.selection.each(function(Zt){Zt instanceof go.Link||(Wt=Math.min(Zt.position.y,Wt))}),Ht.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Zt.position.x,Wt))}),Ht.commitTransaction("alignTop")},ti.prototype.alignBottom=function(){var Ht=this.diagram;Ht.startTransaction("aligning bottom");var Wt=-1/0;Ht.selection.each(function(Zt){if(!(Zt instanceof go.Link)){var yt=Zt.actualBounds.y+Zt.actualBounds.height;Wt=Math.max(yt,Wt)}}),Ht.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Zt.actualBounds.x,Wt-Zt.actualBounds.height))}),Ht.commitTransaction("aligning bottom")},ti.prototype.alignCenterX=function(){var Ht=this.diagram,Wt=Ht.selection.first();if(Wt){Ht.startTransaction("aligning Center X");var Zt=Wt.actualBounds.x+Wt.actualBounds.width/2;Ht.selection.each(function(yt){yt instanceof go.Link||yt.move(new go.Point(Zt-yt.actualBounds.width/2,yt.actualBounds.y))}),Ht.commitTransaction("aligning Center X")}},ti.prototype.alignCenterY=function(){var Ht=this.diagram,Wt=Ht.selection.first();if(Wt){Ht.startTransaction("aligning Center Y");var Zt=Wt.actualBounds.y+Wt.actualBounds.height/2;Ht.selection.each(function(yt){yt instanceof go.Link||yt.move(new go.Point(yt.actualBounds.x,Zt-yt.actualBounds.height/2))}),Ht.commitTransaction("aligning Center Y")}},ti.prototype.alignColumn=function(Ht){var Wt=this.diagram;Wt.startTransaction("align Column"),Ht===void 0&&(Ht=0),Ht=parseFloat(Ht);var Zt=new Array;Wt.selection.each(function(nt){nt instanceof go.Link||Zt.push(nt)});for(var yt=0;yt<Zt.length-1;yt++){var un=Zt[yt],vn=un.actualBounds.y+un.actualBounds.height+Ht,At=Zt[yt+1];At.move(new go.Point(un.actualBounds.x,vn))}Wt.commitTransaction("align Column")},ti.prototype.alignRow=function(Ht){Ht===void 0&&(Ht=0),Ht=parseFloat(Ht);var Wt=this.diagram;Wt.startTransaction("align Row");var Zt=new Array;Wt.selection.each(function(nt){nt instanceof go.Link||Zt.push(nt)});for(var yt=0;yt<Zt.length-1;yt++){var un=Zt[yt],vn=un.actualBounds.x+un.actualBounds.width+Ht,At=Zt[yt+1];At.move(new go.Point(vn,un.actualBounds.y))}Wt.commitTransaction("align Row")},ti.prototype.canRotate=function(Ht){var Wt=this.diagram;return!(Wt===null||Wt.isReadOnly||Wt.isModelReadOnly||Wt.selection.count<1)},ti.prototype.rotate=function(Ht){Ht===void 0&&(Ht=90);var Wt=this.diagram;Wt.startTransaction("rotate "+Ht.toString());var Wt=this.diagram;Wt.selection.each(function(Zt){Zt instanceof go.Link||Zt instanceof go.Group||(Zt.angle+=Ht)}),Wt.commitTransaction("rotate "+Ht.toString())},ti.prototype.pullToFront=function(){var Ht=this.diagram;Ht.startTransaction("pullToFront");var Wt=new go.Map;Ht.selection.each(function(Zt){Wt.set(Zt.layer,0)}),Wt.iteratorKeys.each(function(Zt){var yt=0;Zt.parts.each(function(un){if(!un.isSelected){var vn=un.zOrder;isNaN(vn)?un.zOrder=0:yt=Math.max(yt,vn)}}),Wt.set(Zt,yt)}),Ht.selection.each(function(Zt){ti._assignZOrder(Zt,Wt.get(Zt.layer)+1)}),Ht.commitTransaction("pullToFront")},ti.prototype.pushToBack=function(){var Ht=this.diagram;Ht.startTransaction("pushToBack");var Wt=new go.Map;Ht.selection.each(function(Zt){Wt.set(Zt.layer,0)}),Wt.iteratorKeys.each(function(Zt){var yt=0;Zt.parts.each(function(un){if(!un.isSelected){var vn=un.zOrder;isNaN(vn)?un.zOrder=0:yt=Math.min(yt,vn)}}),Wt.set(Zt,yt)}),Ht.selection.each(function(Zt){ti._assignZOrder(Zt,Wt.get(Zt.layer)-1-ti._findGroupDepth(Zt))}),Ht.commitTransaction("pushToBack")},ti._assignZOrder=function(Ht,Wt,Zt){Zt===void 0&&(Zt=Ht),Ht.layer===Zt.layer&&(Ht.zOrder=Wt),Ht instanceof go.Group&&Ht.memberParts.each(function(yt){ti._assignZOrder(yt,Wt+1,Zt)})},ti._findGroupDepth=function(Ht){if(Ht instanceof go.Group){var Wt=0;return Ht.memberParts.each(function(Zt){Wt=Math.max(Wt,ti._findGroupDepth(Zt))}),Wt+1}else return 0},ti.prototype.doKeyDown=function(){var Ht=this.diagram;if(Ht!==null){var Wt=Ht.lastInput;if(Wt.key==="Up"||Wt.key==="Down"||Wt.key==="Left"||Wt.key==="Right"){var Zt=this.arrowKeyBehavior;if(Zt==="none")return;if(Zt==="select"){this._arrowKeySelect();return}else if(Zt==="move"){this._arrowKeyMove();return}else if(Zt==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},ti.prototype._getAllParts=function(){var Ht=new Array;return this.diagram.nodes.each(function(Wt){Ht.push(Wt)}),this.diagram.parts.each(function(Wt){Ht.push(Wt)}),Ht},ti.prototype._arrowKeyMove=function(){var Ht=this.diagram,Wt=Ht.lastInput,Zt=0,yt=0;if(Wt.control||Wt.meta)Zt=1,yt=1;else if(Ht.grid!==null){var un=Ht.grid.gridCellSize;yt=un.width,Zt=un.height}Ht.startTransaction("arrowKeyMove"),Ht.selection.each(function(vn){Wt.key==="Up"?vn.move(new go.Point(vn.actualBounds.x,vn.actualBounds.y-Zt)):Wt.key==="Down"?vn.move(new go.Point(vn.actualBounds.x,vn.actualBounds.y+Zt)):Wt.key==="Left"?vn.move(new go.Point(vn.actualBounds.x-yt,vn.actualBounds.y)):Wt.key==="Right"&&vn.move(new go.Point(vn.actualBounds.x+yt,vn.actualBounds.y))}),Ht.commitTransaction("arrowKeyMove")},ti.prototype._arrowKeySelect=function(){var Ht=this.diagram,Wt=Ht.lastInput,Zt=null;Wt.key==="Up"?Zt=this._findNearestPartTowards(270):Wt.key==="Down"?Zt=this._findNearestPartTowards(90):Wt.key==="Left"?Zt=this._findNearestPartTowards(180):Wt.key==="Right"&&(Zt=this._findNearestPartTowards(0)),Zt!==null&&(Wt.shift?Zt.isSelected=!0:Wt.control||Wt.meta?Zt.isSelected=!Zt.isSelected:Ht.select(Zt))},ti.prototype._findNearestPartTowards=function(Ht){var Wt=this.diagram.selection.first();if(Wt===null)return null;for(var Zt=Wt.actualBounds.center,yt=this._getAllParts(),un=1/0,vn=Wt,At=0;At<yt.length;At++){var nt=yt[At];if(nt!==Wt&&nt.canSelect()){var on=nt.actualBounds.center,fn=Zt.directionPoint(on),Jn=this._angleCloseness(fn,Ht);if(Jn<=45){var pn=Zt.distanceSquaredPoint(on);pn*=1+Math.sin(Jn*Math.PI/180),pn<un&&(un=pn,vn=nt)}}}return vn},ti.prototype._angleCloseness=function(Ht,Wt){return Math.min(Math.abs(Wt-Ht),Math.min(Math.abs(Wt+360-Ht),Math.abs(Wt-360-Ht)))},ti.prototype._arrowKeyTree=function(){var Ht=this.diagram,Wt=Ht.selection.first();if(Wt instanceof go.Node){var Zt=Ht.lastInput;if(Zt.key==="Right"){if(!Wt.isTreeLeaf)if(!Wt.isTreeExpanded)Ht.commandHandler.canExpandTree(Wt)&&Ht.commandHandler.expandTree(Wt);else{var yt=this._sortTreeChildrenByY(Wt).first();yt!==null&&Ht.select(yt)}}else if(Zt.key==="Left")if(!Wt.isTreeLeaf&&Wt.isTreeExpanded)Ht.commandHandler.canCollapseTree(Wt)&&Ht.commandHandler.collapseTree(Wt);else{var un=Wt.findTreeParentNode();un!==null&&Ht.select(un)}else if(Zt.key==="Up"){var un=Wt.findTreeParentNode();if(un!==null){var vn=this._sortTreeChildrenByY(un),At=vn.indexOf(Wt);if(At>0){for(var nt=vn.elt(At-1);nt!==null&&nt.isTreeExpanded&&!nt.isTreeLeaf;){var on=this._sortTreeChildrenByY(nt);nt=on.last()}nt!==null&&Ht.select(nt)}else Ht.select(un)}}else if(Zt.key==="Down")if(Wt.isTreeExpanded&&!Wt.isTreeLeaf){var yt=this._sortTreeChildrenByY(Wt).first();yt!==null&&Ht.select(yt)}else for(;Wt!==null;){var un=Wt.findTreeParentNode();if(un===null)break;var vn=this._sortTreeChildrenByY(un),At=vn.indexOf(Wt);if(At<vn.length-1){Ht.select(vn.elt(At+1));break}else Wt=un}var fn=Ht.selection.first();fn!==null&&Ht.scrollToRect(fn.actualBounds)}},ti.prototype._sortTreeChildrenByY=function(Ht){var Wt=new go.List().addAll(Ht.findTreeChildrenNodes());return Wt.sort(function(Zt,yt){var un=Zt.location,vn=yt.location;return un.y<vn.y?-1:un.y>vn.y?1:un.x<vn.x?-1:un.x>vn.x?1:0}),Wt},ti.prototype.copyToClipboard=function(Ht){go.CommandHandler.prototype.copyToClipboard.call(this,Ht),this._lastPasteOffset.set(this.pasteOffset)},ti.prototype.pasteFromClipboard=function(){var Ht=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Ht,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Ht},Object.defineProperty(ti.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Ht){if(Ht!=="move"&&Ht!=="select"&&Ht!=="scroll"&&Ht!=="tree"&&Ht!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Ht);this._arrowKeyBehavior=Ht}}),Object.defineProperty(ti.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Ht){if(!(Ht instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Ht);this._pasteOffset.set(Ht)}});var gi=ti,Pn=me(37404),Xt=me(43604),Kt=me(70635),Ot={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},rt=me(59301),Ue=(Ht,Wt,Zt)=>new Promise((yt,un)=>{var vn=on=>{try{nt(Zt.next(on))}catch(fn){un(fn)}},At=on=>{try{nt(Zt.throw(on))}catch(fn){un(fn)}},nt=on=>on.done?yt(on.value):Promise.resolve(on.value).then(vn,At);nt((Zt=Zt.apply(Ht,Wt)).next())});function $t({onCancel:Ht,callback:Wt}){let Zt=(0,ue.useRef)(),yt=(0,ue.useRef)(),un=(0,ue.useRef)(),vn=(0,ue.useRef)(!1);const At=(0,ue.useRef)(!1),[nt,on]=(0,ue.useState)(0);function fn(){const pn=Lt.bx.make,Rt={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"};Zt.current=new Lt.S0(yt.current,{padding:20,grid:pn(Lt.s_,"Grid",pn(Lt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),pn(Lt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:qt=>{var pi=qt.diagram.commandHandler.addTopLevelParts(qt.diagram.selection,!0);pi||qt.diagram.currentTool.doCancel()},commandHandler:pn(gi),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:qt=>{var pi=qt.subject;pi.location=pi.location.copy().snapToGridPoint(qt.diagram.grid.gridOrigin,qt.diagram.grid.gridCellSize),setTimeout(()=>{qt.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:qt=>{var pi=qt.subject;setTimeout(()=>{qt.diagram.commandHandler.editTextBlock()})},LinkRelinked:qt=>{var pi=qt.parameter.part;pi.invalidateConnectedLinks();var pr=qt.subject;qt.diagram.toolManager.linkingTool.isForwards?pr.toNode.invalidateConnectedLinks():pr.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Zt.current.nodeTemplate=pn(Lt.NB,"Auto",{locationSpot:Lt.z6.Center,locationObjectName:"SHAPE",desiredSize:new Lt.$u(120,60),minSize:new Lt.$u(40,40),resizable:!0,resizeCellSize:new Lt.$u(10,10),rotatable:!0},new Lt.KX("location","loc",Lt.E9.parse).makeTwoWay(Lt.E9.stringify),new Lt.KX("desiredSize","size",Lt.$u.parse).makeTwoWay(Lt.$u.stringify),pn(Lt.bn,{name:"SHAPE",fill:Rt.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Lt.z6.AllSides,toSpot:Lt.z6.AllSides},new Lt.KX("figure"),new Lt.KX("fill"),new Lt.KX("stroke","borderColor"),new Lt.KX("strokeWidth","thickness"),new Lt.KX("strokeDashArray","dash")),pn(Lt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),pn(Lt.al,{margin:1,textAlign:"center",overflow:Lt.al.OverflowEllipsis,editable:!0},new Lt.KX("text").makeTwoWay(),new Lt.KX("stroke","color"))),Zt.current.nodeTemplate.toolTip=pn("ToolTip",pn(Lt.s_,"Vertical",{maxSize:new Lt.$u(200,NaN)},pn(Lt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Lt.KX("text")),pn(Lt.al,{font:"10pt sans-serif",textAlign:"center"},new Lt.KX("text","details"))));function In(qt,pi){var pr=(qi,$r)=>{qi.handled=!0,qi.diagram.model.commit(Ar=>{var io=$r.part.adornedPart,Kr=new Lt.E9().setRectSpot(io.actualBounds,qt);Kr.subtract(io.location),Kr.scale(2,2),Kr.x+=Math.sign(Kr.x)*130,Kr.y+=Math.sign(Kr.y)*130,Kr.add(io.location),Kr.snapToGridPoint(qi.diagram.grid.gridOrigin,qi.diagram.grid.gridCellSize);var jr=Ar.copyNodeData(io.data);Ar.setGroupKeyForNodeData(jr,Ar.getGroupKeyForNodeData(io.data)),Ar.addNodeData(jr);var yo={from:io.key,to:Ar.getKeyForNodeData(jr)};Ar.addLinkData(yo);var $n=qi.diagram.findNodeForData(jr);$n.location=Kr,qi.diagram.select($n),setTimeout(()=>{qi.diagram.commandHandler.editTextBlock()},20)})};return pn(Lt.bn,{figure:pi,alignment:qt,alignmentFocus:qt.opposite(),width:qt.equals(Lt.z6.Top)||qt.equals(Lt.z6.Bottom)?25:18,height:qt.equals(Lt.z6.Top)||qt.equals(Lt.z6.Bottom)?18:25,fill:"orange",stroke:Rt.white,strokeWidth:4,mouseEnter:(qi,$r)=>$r.fill="dodgerblue",mouseLeave:(qi,$r)=>$r.fill="orange",isActionable:!0,click:pr,contextClick:pr})}function Vn(qt){return pn(Lt.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:(pi,pr)=>pr.fill="dodgerblue",mouseLeave:(pi,pr)=>pr.fill="orange",click:(pi,pr)=>{pi.diagram.commandHandler.showContextMenu(pr.part.adornedPart)}},qt||{})}Zt.current.nodeTemplate.selectionAdornmentTemplate=pn(Lt.uz,"Spot",pn(Lt.Vm,{padding:10}),In(Lt.z6.Top,"TriangleUp"),In(Lt.z6.Left,"TriangleLeft"),In(Lt.z6.Right,"TriangleRight"),In(Lt.z6.Bottom,"TriangleDown"),Vn({alignment:new Lt.z6(.75,0)}));function Pi(qt,pi){return(pr,qi)=>{pr.handled=!0,pr.diagram.model.commit($r=>{$r.set(qi.part.adornedPart.data,qt,pi)})}}function tn(qt,pi){return pi||(pi="color"),pn(Lt.bn,{width:16,height:16,stroke:"lightgray",fill:qt,margin:1,background:"transparent",mouseEnter:(pr,qi)=>qi.stroke="dodgerblue",mouseLeave:(pr,qi)=>qi.stroke="lightgray",click:Pi(pi,qt),contextClick:Pi(pi,qt)})}function hn(){return[pn("ContextMenuButton",pn(Lt.s_,"Horizontal",tn(Rt.white,"fill"),tn(Rt.beige,"fill"),tn(Rt.extralightblue,"fill"),tn(Rt.extralightred,"fill"))),pn("ContextMenuButton",pn(Lt.s_,"Horizontal",tn(Rt.lightgray,"fill"),tn(Rt.lightgreen,"fill"),tn(Rt.lightblue,"fill"),tn(Rt.lightred,"fill")))]}function Rn(){return[pn("ContextMenuButton",pn(Lt.s_,"Horizontal",tn(Rt.black),tn(Rt.green),tn(Rt.blue),tn(Rt.red))),pn("ContextMenuButton",pn(Lt.s_,"Horizontal",tn(Rt.white),tn(Rt.magenta),tn(Rt.purple),tn(Rt.orange)))]}function Oi(qt,pi){return pi||(pi="thickness"),pn(Lt.bn,"LineH",{width:16,height:16,strokeWidth:qt,margin:1,background:"transparent",mouseEnter:(pr,qi)=>qi.background="dodgerblue",mouseLeave:(pr,qi)=>qi.background="transparent",click:Pi(pi,qt),contextClick:Pi(pi,qt)})}function Ii(qt,pi){return pi||(pi="dash"),pn(Lt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:qt,margin:1,background:"transparent",mouseEnter:(pr,qi)=>qi.background="dodgerblue",mouseLeave:(pr,qi)=>qi.background="transparent",click:Pi(pi,qt),contextClick:Pi(pi,qt)})}function Si(){return[pn("ContextMenuButton",pn(Lt.s_,"Horizontal",Oi(1),Oi(2),Oi(3),Oi(4))),pn("ContextMenuButton",pn(Lt.s_,"Horizontal",Ii(null),Ii([2,4]),Ii([4,4])))]}function Ni(qt,pi){return pi||(pi="figure"),pn(Lt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:qt,margin:1,background:"transparent",mouseEnter:(pr,qi)=>qi.fill="dodgerblue",mouseLeave:(pr,qi)=>qi.fill="lightgray",click:Pi(pi,qt),contextClick:Pi(pi,qt)})}Zt.current.nodeTemplate.contextMenu=pn("ContextMenu",pn("ContextMenuButton",pn(Lt.s_,"Horizontal",Ni("Rectangle"),Ni("RoundedRectangle"),Ni("Ellipse"),Ni("Diamond"))),pn("ContextMenuButton",pn(Lt.s_,"Horizontal",Ni("Parallelogram2"),Ni("ManualOperation"),Ni("Procedure"),Ni("Cylinder1"))),pn("ContextMenuButton",pn(Lt.s_,"Horizontal",Ni("Terminator"),Ni("CreateRequest"),Ni("Document"),Ni("TriangleDown"))),hn(),Rn(),Si()),Zt.current.groupTemplate=pn(Lt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Lt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(qt,pi)=>{var pr=pi.addMembers(pi.diagram.selection,!0);pr||pi.diagram.currentTool.doCancel()},avoidable:!1},new Lt.KX("location","loc",Lt.E9.parse).makeTwoWay(Lt.E9.stringify),pn(Lt.s_,"Auto",{name:"BODY"},pn(Lt.bn,{parameter1:10,fill:Rt.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Lt.z6.AllSides,toSpot:Lt.z6.AllSides},new Lt.KX("fill"),new Lt.KX("stroke","color"),new Lt.KX("strokeWidth","thickness"),new Lt.KX("strokeDashArray","dash")),pn(Lt.Vm,{background:"transparent",margin:20})),pn(Lt.al,{alignment:Lt.z6.Top,alignmentFocus:Lt.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Lt.KX("text"),new Lt.KX("stroke","color"))),Zt.current.groupTemplate.selectionAdornmentTemplate=pn(Lt.uz,"Spot",pn(Lt.s_,"Auto",pn(Lt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),pn(Lt.Vm,{margin:1.5})),Vn({alignment:Lt.z6.TopRight,alignmentFocus:Lt.z6.BottomRight})),Zt.current.groupTemplate.contextMenu=pn("ContextMenu",hn(),Rn(),Si()),Zt.current.linkTemplate=pn(Lt.rU,{layerName:"Foreground",routing:Lt.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Lt.KX("fromSpot","fromSpot",Lt.z6.parse),new Lt.KX("toSpot","toSpot",Lt.z6.parse),new Lt.KX("fromShortLength","dir",qt=>qt>=1?10:0),new Lt.KX("toShortLength","dir",qt=>qt>=1?10:0),new Lt.KX("points").makeTwoWay(),pn(Lt.bn,{strokeWidth:2},new Lt.KX("stroke","color"),new Lt.KX("strokeWidth","thickness"),new Lt.KX("strokeDashArray","dash")),pn(Lt.bn,{segmentIndex:0,segmentOffset:new Lt.E9(15,0),segmentOrientation:Lt.rU.OrientAlong,alignmentFocus:Lt.z6.Right,figure:"circle",width:10,strokeWidth:0},new Lt.KX("fill","color"),new Lt.KX("visible","dir",qt=>qt===1)),pn(Lt.bn,{segmentIndex:-1,segmentOffset:new Lt.E9(-10,6),segmentOrientation:Lt.rU.OrientPlus90,alignmentFocus:Lt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Lt.KX("fill","color"),new Lt.KX("visible","dir",qt=>qt>=1),new Lt.KX("width","thickness",qt=>7+3*qt),new Lt.KX("height","thickness",qt=>7+3*qt),new Lt.KX("segmentOffset","thickness",qt=>new Lt.E9(-15,4+1.5*qt))),pn(Lt.bn,{segmentIndex:0,segmentOffset:new Lt.E9(15,-6),segmentOrientation:Lt.rU.OrientMinus90,alignmentFocus:Lt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Lt.KX("fill","color"),new Lt.KX("visible","dir",qt=>qt===2),new Lt.KX("width","thickness",qt=>7+3*qt),new Lt.KX("height","thickness",qt=>7+3*qt),new Lt.KX("segmentOffset","thickness",qt=>new Lt.E9(-15,4+1.5*qt))),pn(Lt.al,{alignmentFocus:new Lt.z6(0,1,-4,0),editable:!0},new Lt.KX("text").makeTwoWay(),new Lt.KX("stroke","color"))),Zt.current.linkTemplate.selectionAdornmentTemplate=pn(Lt.uz,pn(Lt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Zi(2)},new Lt.KX("pathPattern","thickness",Zi)),Vn({alignmentFocus:new Lt.z6(0,0,-6,-4)}));function Zi(qt){return pn(Lt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(qt+4).toString()+" H3"})}function sr(qt){var pi="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return qt===0?pi="M0 0 M16 16 M0 8 L16 8":qt===2&&(pi="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),pn(Lt.bn,{geometryString:pi,margin:2,background:"transparent",mouseEnter:(pr,qi)=>qi.background="dodgerblue",mouseLeave:(pr,qi)=>qi.background="transparent",click:Pi("dir",qt),contextClick:Pi("dir",qt)})}function Wr(qt){var pi=(pr,qi)=>{pr.handled=!0,pr.diagram.model.commit($r=>{var Ar=qi.part.adornedPart;$r.set(Ar.data,qt?"toSpot":"fromSpot",Lt.z6.stringify(Lt.z6.AllSides)),(qt?Ar.toNode:Ar.fromNode).invalidateConnectedLinks()})};return pn(Lt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(pr,qi)=>qi.background="dodgerblue",mouseLeave:(pr,qi)=>qi.background="transparent",click:pi,contextClick:pi})}function li(qt,pi){var pr=0,qi=Lt.z6.RightSide;qt.equals(Lt.z6.Top)?(pr=270,qi=Lt.z6.TopSide):qt.equals(Lt.z6.Left)?(pr=180,qi=Lt.z6.LeftSide):qt.equals(Lt.z6.Bottom)&&(pr=90,qi=Lt.z6.BottomSide),pi||(pr-=180);var $r=(Ar,io)=>{Ar.handled=!0,Ar.diagram.model.commit(Kr=>{var jr=io.part.adornedPart;Kr.set(jr.data,pi?"toSpot":"fromSpot",Lt.z6.stringify(qi)),(pi?jr.toNode:jr.fromNode).invalidateConnectedLinks()})};return pn(Lt.bn,{alignment:qt,alignmentFocus:qt.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:pr,background:"transparent",mouseEnter:(Ar,io)=>io.background="dodgerblue",mouseLeave:(Ar,io)=>io.background="transparent",click:$r,contextClick:$r})}Zt.current.linkTemplate.contextMenu=pn("ContextMenu",Rn(),Si(),pn("ContextMenuButton",pn(Lt.s_,"Horizontal",sr(0),sr(1),sr(2))),pn("ContextMenuButton",pn(Lt.s_,"Horizontal",pn(Lt.s_,"Spot",Wr(!1),li(Lt.z6.Top,!1),li(Lt.z6.Left,!1),li(Lt.z6.Right,!1),li(Lt.z6.Bottom,!1)),pn(Lt.s_,"Spot",{margin:new Lt.Zt(0,0,0,2)},Wr(!0),li(Lt.z6.Top,!0),li(Lt.z6.Left,!0),li(Lt.z6.Right,!0),li(Lt.z6.Bottom,!0)))));const Vi=`{ "class": "GraphLinksModel",
|
|
|
"nodeDataArray": [
|
|
|
{"text":"Find Problem","key":-9,"loc":"-20 -140","color":"#3358ff","fill":"white","figure":"Procedure","thickness":3},
|
|
|
{"text":"What do we want?","key":-10,"loc":"-65 -324.305","group":-16,"figure":"Ellipse","fill":"white"},
|
|
|
{"text":"What do our users want?","key":-11,"loc":"105 -334.305","group":-20,"figure":"Ellipse","fill":"#ffffff","color":"black"},
|
|
|
{"text":"Meetings","key":-12,"loc":"-65 -444.305","group":-16,"figure":"TriangleDown","fill":"#ffffff"},
|
|
|
{"text":"Reviews","key":-13,"loc":"105 -454.305","group":-20,"figure":"TriangleDown","fill":"#ffffff","color":"black"},
|
|
|
{"text":"Can we solve it?","key":-14,"loc":"190 -140","color":"#7d33ff","fill":"#ffffff","figure":"Diamond","size":"140 80","thickness":3},
|
|
|
{"isGroup":true,"text":"Internal","key":-16,"loc":"-65 -384.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
|
|
|
{"isGroup":true,"text":"External","key":-20,"loc":"105 -394.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
|
|
|
{"isGroup":true,"text":"Sources","key":-22,"loc":"20 -400","fill":"#a5d2fa","dash":[4,4],"color":"#3358ff"}
|
|
|
],
|
|
|
"linkDataArray": [
|
|
|
{"from":-12,"to":-10,"points":[-65,-414.305,-65,-404.305,-65,-384.305,-65,-384.305,-65,-364.305,-65,-354.305],"dash":null,"dir":1},
|
|
|
{"from":-13,"to":-11,"points":[105,-424.305,105,-414.305,105,-394.305,105,-394.305,105,-374.305,105,-364.305],"dash":null,"color":"#000000","dir":1},
|
|
|
{"from":-10,"to":-9,"points":[-65,-294.305,-65,-284.305,-65,-232.1525,-40,-232.1525,-40,-180,-40,-170],"dir":2,"dash":[4,4]},
|
|
|
{"from":-11,"to":-9,"points":[105,-304.305,105,-294.305,105,-237.1525,0,-237.1525,0,-180,0,-170],"dash":[4,4],"dir":2},
|
|
|
{"from":-9,"to":-14,"points":[40,-150,58,-150,80,-150,80,-153.33333333333331,102,-153.33333333333331,120,-153.33333333333331],"dir":1,"color":"#3358ff"},
|
|
|
{"from":-14,"to":-9,"points":[190,-100,190,-90,-20,-90,-20,-95,-20,-100,-20,-110],"fromSpot":"BottomSide","toSpot":"BottomSide","text":"No","color":"#ff3333","thickness":2,"dir":1},
|
|
|
{"from":-9,"to":-14,"points":[40,-130,58,-130,80,-130,80,-126.66666666666666,102,-126.66666666666666,120,-126.66666666666666]}
|
|
|
]}`;var vo=["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 Qr(qt){return console.log("shapeName:",qt),vo.indexOf(qt)>=0}var Er=new Lt.YI(un.current,{maxSelectionCount:1,linkTemplate:pn(Lt.rU,{locationSpot:Lt.z6.Center,selectionAdornmentTemplate:pn(Lt.uz,"Link",{locationSpot:Lt.z6.Center},pn(Lt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),pn(Lt.bn,{toArrow:"Standard",stroke:null}))},{routing:Lt.rU.AvoidsNodes,curve:Lt.rU.JumpOver,corner:5,toShortLength:4},new Lt.KX("points"),pn(Lt.bn,{isPanelMain:!0,strokeWidth:2}),pn(Lt.bn,{toArrow:"Standard",stroke:null})),model:new Lt.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Lt.bn.getFigureGenerators().toArray().map(qt=>({text:"\u672A\u547D\u540D",size:"100 100",figure:qt.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Zt.current.addDiagramListener("TextEdited",function(qt){var pi;const pr=qt.subject.part;var qi=(pi=document.activeElement)==null?void 0:pi.value;typeof qi=="string"&&qi.trim()===""&&Zt.current.model.commit(function($r){$r.set(pr.data,"text","\u672A\u547D\u540D"),Zt.current.commandHandler.stopCommand()},"increment")}),Er.nodeTemplate=pn(Lt.NB,"Auto",{locationSpot:Lt.z6.Center},new Lt.KX("location","location",Lt.E9.parse).makeTwoWay(Lt.E9.stringify),pn(Lt.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 Lt.KX("stroke").makeTwoWay(),new Lt.KX("fill").makeTwoWay(),new Lt.KX("figure")),pn(Lt.al,{margin:new Lt.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Lt.$u(16,16),maxSize:new Lt.$u(10,NaN),textAlign:"center",editable:!0},new Lt.KX("key").makeTwoWay())),setTimeout(()=>{Zt.current.grid=pn(Lt.s_,"Grid",pn(Lt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),pn(Lt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Zt.current.grid.visible=!0,Zt.current.grid.gridCellStroke="darkgray",Zt.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Zt.current,Zt.current}const Jn=()=>Ue(this,null,function*(){var pn=Zt.current.makeImage();const Rt=yield(0,Kt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:pn.src}});Wt({src:Rt.url})});return(0,ue.useEffect)(()=>(setTimeout(()=>{fn()},500),on(nt+1),()=>{Zt.current=null}),[]),rt.createElement("div",{ref:At,className:vn.current?`${Ot.maxH60} body-overflow-initial`:"body-overflow-initial"},rt.createElement(rn.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!nt,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:rt.createElement(xn.Z,null,rt.createElement(Xt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),rt.createElement(Xt.Z,{onClick:()=>{var pn,Rt,In=Zt.current.selection.first();if(vn.current=!vn.current,document.activeElement&&In){let Vn=(Rt=(pn=document.activeElement)==null?void 0:pn.value)==null?void 0:Rt.trim();typeof Vn=="string"&&Zt.current.model.commit(function(Pi){Pi.set(In.data,"text",Vn||"\u672A\u547D\u540D"),Zt.current.commandHandler.stopCommand()},"increment")}on(nt+1)}},rt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Ht},rt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Ot.flowChartWrp},rt.createElement("div",{style:{display:"flex",height:"100%"}},rt.createElement("div",{style:{width:"300px",height:"100%"}},rt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),rt.createElement("div",{style:{height:"calc(100% - 50px)"},className:Ot.myPaletteDiv,ref:un})),rt.createElement("div",{style:{flex:1,position:"relative"}},rt.createElement("div",{ref:yt,style:{height:"80vh"}}))),rt.createElement("div",{className:"tr"},rt.createElement(He.ZP,{size:"large",onClick:Jn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Gt=$t,it=me(5112),at=me(88897);const Te=it.ZP.Group,Pe={margin:"0 8px"};var ye=({callback:Ht,onCancel:Wt})=>{function Zt(yt){Ht(yt)}return ue.createElement(Je.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Zt},ue.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ue.createElement("span",{style:Pe},"\u5355\u5143\u683C\u6570\uFF1A"),ue.createElement("span",{style:Pe},"\u884C\u6570"),ue.createElement(Je.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ue.createElement(at.Z,null)),ue.createElement("span",{style:Pe},"\u5217\u6570"),ue.createElement(Je.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ue.createElement(at.Z,null))),ue.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ue.createElement("span",{style:Pe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ue.createElement(Je.default.Item,{name:"align"},ue.createElement(Te,null,ue.createElement(it.ZP,{value:"default"},ue.createElement("i",{className:"fa fa-align-justify"})),ue.createElement(it.ZP,{value:"left"},ue.createElement("i",{className:"fa fa-align-left"})),ue.createElement(it.ZP,{value:"center"},ue.createElement("i",{className:"fa fa-align-center"})),ue.createElement(it.ZP,{value:"right"},ue.createElement("i",{className:"fa fa-align-right"}))))),ue.createElement("div",{className:"flex-container flex-end"},ue.createElement(He.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ue.createElement(He.ZP,{type:"ghost",onClick:Wt},"\u53D6\u6D88")))},ke=me(78673),$e=me(98598),Le=me.n($e),an=(0,ue.forwardRef)(({use3d:Ht,width:Wt,height:Zt,callback:yt,showSaveButton:un},vn)=>{const At=(0,ue.useRef)(),nt=(0,ue.useRef)(),[on,fn]=(0,ue.useState)(!1),Jn=(0,ue.useRef)({id:At,appName:"graphing",width:Wt||1e3,height:Zt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ue.useEffect)(()=>{nt.current=new(Le())(Jn.current,!0),window.onload=function(){nt.current.inject("applet_container")}},[]);const pn=()=>{var Rt=window.ggbApplet.getPNGBase64(1,!0,72);return yt&&yt(Rt),Rt};return(0,ue.useEffect)(()=>{Jn.current.appName=on?"3D":"graphing",nt.current.inject("applet_container")},[on]),(0,ue.useEffect)(()=>{fn(Ht)},[Ht]),(0,ue.useImperativeHandle)(vn,()=>({getImgData:pn})),ue.createElement(ue.Fragment,null,ue.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:At}),ue.createElement(xn.Z,{align:"middle"},ue.createElement(Xt.Z,{flex:1},ue.createElement(ke.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:on,onChange:Rt=>fn(Rt)})),ue.createElement(Xt.Z,null,ue.createElement(He.ZP,{size:"large",onClick:pn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),bn=me(75890),en=me(8591);const wn="link",ai="upload-image",_n="add-flowchart",Hn="draw-image",wi="add-flowchart",Hi="code-block",_i="add-table",cr="------------",_r={default:cr,left:`:${cr}`,center:`:${cr}:`,right:`${cr}:`};var vi=me(91300);function si(){}let fi=0;const Ui=1e4,Fi="\u2581",ao="@\u2581\u2581@",wr="@\u2581@",Be=`
|
|
|
**\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`,Xr=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];function Hr(Ht){return/^\d+$/.test(Ht)?`${Ht}px`:Ht}const Li=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Wi={[Li+"-B"]:"bold",[Li+"-I"]:"italic"},ji={[wn]:"\u6DFB\u52A0\u94FE\u63A5",[Hi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[ai]:"\u6DFB\u52A0\u56FE\u7247",[Hn]:"\u6DFB\u52A0\u753B\u56FE",[_n]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[_i]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Gn=({defaultValue:Ht="",onChange:Wt,width:Zt="100%",height:yt=400,miniToolbar:un=!1,isFocus:vn=!1,watch:At,insertTemp:nt,mode:on="markdown",id:fn="markdown-editor-id",showResizeBar:Jn=!1,noStorage:pn=!1,showNullButton:Rt=!1,showNullProgramButton:In=!1,hidetoolBar:Vn=!1,fullScreen:Pi=!1,onBlur:tn,onCMBeforeChange:hn,onFullScreen:Rn,className:Oi="",disablePaste:Ii=!1,disabled:Si=!1,disabledFill:Ni=!1,placeholder:Zi="",values:sr="",extraUse:Wr})=>{const[li,Vi]=(0,ue.useState)(null),[vo,Qr]=(0,ue.useState)(Ht),[Er,qt]=(0,ue.useState)(At),[pi,pr]=(0,ue.useState)(Pi),[qi,$r]=(0,ue.useState)(""),[Ar,io]=(0,ue.useState)(0),[Kr,jr]=(0,ue.useState)(yt),[yo,$n]=(0,ue.useState)(!1),[Xo,Kn]=(0,ue.useState)(0),[Io,Jo]=(0,ue.useState)(0),Yi=(0,ue.useRef)(),ua=(0,ue.useRef)(),Zo=(0,ue.useRef)(),Dr=(0,ue.useRef)();(0,ue.useEffect)(()=>{const Jr=window.scrollY||window.pageYOffset;Qr(sr),li==null||li.setValue(sr),window.scrollTo(0,Jr)},[sr]),(0,ue.useEffect)(()=>{Rn==null||Rn(pi)},[pi]),(0,ue.useEffect)(()=>{if(Yi.current){let Jr=function(Eo,ci){var xa;if(Ii){ci.preventDefault();return}const za=ci.clipboardData;if(za){const xs=za.types.toString(),ho=za.items;if(xs==="Files"||za.types.indexOf("Files")>-1){if(ci.preventDefault(),on=="stex")return;try{let ca=ho[1];((xa=ho[0])==null?void 0:xa.kind)==="file"&&(ca=ho[0]);const ja=ca.getAsFile(),hs=ja.name.split(".").pop();(0,zt.I)(ja,fs=>{var ll,Ys,Bn;fs.id?((ll=ja==null?void 0:ja.type)==null?void 0:ll.indexOf("image"))>-1?eo.replaceSelection(``):((Ys=ja==null?void 0:ja.type)==null?void 0:Ys.indexOf("video"))>-1?eo.replaceSelection(`<video width="100%" controls src="/api/attachments/${fs.id}"></video>`):((Bn=ja==null?void 0:ja.type)==null?void 0:Bn.indexOf("pdf"))>-1?eo.replaceSelection(`<a href="/api/attachments/${fs.id}?type=${ja.type}&disposition=inline" target="_blank">${ja.name}</a>`):Xr.includes(hs)?eo.replaceSelection(`<a href="/api/attachments/${fs.id}?type=office&disposition=inline" target="_blank">${ja.name}</a>`):eo.replaceSelection(`[${ja.name}](/api/attachments/${fs.id}?type=${fs.content_type})`):(fs==null?void 0:fs.status)===401&&(document.location.href="/user/login")})}catch(ca){en.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const eo=Ze().fromTextArea(Yi.current,{mode:on,lineNumbers:!un,lineWrapping:!0,value:Ht,autoCloseTags:!0,autoCloseBrackets:!0});return eo.on("keyup",function(Eo,ci){ci.keyCode===8&&(Eo.getValue()==""?eo.setOption("placeholder",Zi):eo.setOption("placeholder",null))}),eo.on("keydown",function(Eo,ci){if(ci.keyCode===8){var xa=Do(Eo);xa&&ci.preventDefault()}}),vn&&eo.focus(),eo.on("paste",Jr),Si&&eo.on("beforeChange",function(Eo,ci){(ci.origin==="paste"||ci.origin==="+input")&&ci.cancel()}),Vi(eo),()=>{eo.off("paste",Jr)}}},[]);const Ir=(0,ue.useCallback)(()=>{if(ua.current)try{}catch(Jr){console.log(Jr,"---- to set md editor body height")}},[Kr,ua,pi]);(0,ue.useEffect)(()=>{function Jr(){let eo=new ot.Z(Eo=>{for(let ci of Eo)(ci.target.offsetHeight>0||ci.target.offsetWidth>0)&&(Ir(),li.setSize("100%","100%"),li.refresh())});return eo.observe(Yi.current.parentElement),eo}if(li){const eo=Jr();return()=>{var Eo,ci;(Eo=Yi.current)!=null&&Eo.parentElement&&eo.unobserve((ci=Yi.current)==null?void 0:ci.parentElement)}}},[li,Ir]),(0,ue.useEffect)(()=>{if(li){let Jr=[];for(const[eo,Eo]of Object.entries(Wi)){let ci={[eo]:()=>{_o(Eo)}};Jr.push(ci),li.addKeyMap(ci)}return()=>{for(let eo of Jr)li.removeKeyMap(eo)}}},[li]),(0,ue.useEffect)(()=>{Pi!==pi&&pr(Pi)},[Pi]),(0,vi.Z)(()=>{if(!pn&&Ar>0){let Jr=new Date().getTime(),eo=window.sessionStorage.getItem(fn);Jr>=Ar+Ui&&(!eo||eo!==vo)&&(window.sessionStorage.setItem(fn,vo),$n(!0))}},Ui),(0,ue.useEffect)(()=>{qt(At)},[li,At]),(0,ue.useEffect)(()=>{li&&vn&&li.focus()},[li,vn]),(0,ue.useEffect)(()=>{if(Er&&li){let Jr=function(Eo){let ci=Eo.target;if(Dr.current){let xa=ci.scrollTop/ci.scrollHeight;Dr.current.scrollTop=Dr.current.scrollHeight*xa}};const eo=li.getScrollerElement();return eo.addEventListener("scroll",Jr),()=>{eo.removeEventListener("scroll",Jr)}}},[li,Er]),(0,ue.useEffect)(()=>{if(li&&hn){let Jr=function(eo,Eo){hn(eo,Eo)};return li.on("beforeChange",Jr),()=>{li.off("beforeChange",Jr)}}},[li,hn]),(0,ue.useEffect)(()=>{if(li&&tn){let Jr=function(){tn(li.getValue())};return li.on("blur",Jr),()=>{li.off("blur",Jr)}}},[li,tn]);function Do(Jr,eo){var Eo=Jr.getDoc(),ci=Eo.getCursor(),xa=Eo.getLine(ci.line),za=xa.charAt(ci.ch-1),xs=xa.lastIndexOf("@\u2581@",ci.ch),ho=xa.lastIndexOf("@\u2581\u2581@",ci.ch),ca=xs>ho?xs:ho,ja=xs>ho?3:4;if(ao.indexOf(za)===-1)return null;if(console.log("change1:",eo,Jr,xa,ci,ca,xs,ho,za),ca>=0&&ci.ch-ca<5){var hs=ca+ja;return Eo.replaceRange("",{line:ci.line,ch:ca},{line:ci.line,ch:hs}),{line:ci.line,ch:hs}}return null}(0,ue.useEffect)(()=>{if(li){let Jr=function(eo,Eo){const ci=eo.getValue();Qr(ci),io(new Date().getTime()),eo.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Wt&&(In?Wt(ci,xo(ci)):Wt(ci))};return li.on("change",Jr),()=>{li.off("change",Jr)}}},[li,Wt]),(0,ue.useEffect)(()=>{if(li)if(Ht==null)li.setValue(""),Qr("");else{const Jr=window.scrollY||window.pageYOffset;Ht!==li.getValue()&&(li.setValue(Ht),Qr(Ht),li.setCursor(Si?1:li.lineCount(),0),window.scrollTo(0,Jr))}},[li,Ht]);const _o=(0,ue.useCallback)(Jr=>{const eo=li.getCursor(),Eo=li.getSelection();let ci=Eo.split(`
|
|
|
`);switch(Jr){case"bold":return li.replaceSelection("**"+Eo+"**"),Eo===""&&li.setCursor(eo.line,eo.ch+2),li.focus();case"italic":return li.replaceSelection("*"+Eo+"*"),Eo===""&&li.setCursor(eo.line,eo.ch+1),li.focus();case"code":return li.replaceSelection("`"+Eo+"`"),Eo===""&&li.setCursor(eo.line,eo.ch+1),li.focus();case"inline-latex":return $r("inline-latex"),li.focus();case"latex":return li.replaceSelection("```latex\n"+Eo+"\n```"),li.setCursor(eo.line+1,Eo.length+1),li.focus();case"line-break":return li.replaceSelection(`<br/>
|
|
|
`),li.focus();case"list-ul":return Eo===""?li.replaceSelection("- "+Eo):li.replaceSelection(ci.map(xa=>xa===""?"":`- ${xa}`).join(`
|
|
|
`)),li.focus();case"list-ol":return Eo===""?li.replaceSelection("1. "+Eo):li.replaceSelection(ci.map((xa,za)=>xa===""?"":`${za+1}. ${xa}`).join(`
|
|
|
`)),li.focus();case"add-null-ch":return Eo===""&&li.setCursor(eo.line,eo.ch),li.replaceSelection(Fi),li.focus();case"add-signal":return Eo===""&&li.setCursor(eo.line,eo.ch),li.replaceSelection(wr),li.focus();case"add-multiple":return Eo===""&&li.setCursor(eo.line,eo.ch),li.replaceSelection(ao),li.focus();case"inster-template-1":return Eo===""&&li.setCursor(eo.line,eo.ch),li.replaceSelection(Be),li.focus();case"eraser":return li.setValue(""),li.focus();case"trigger-watch":return qt(!Er),li.focus();case"trigger-full-screen":return pr(!pi),li.focus();case wn:$r(wn);return;case Hi:$r(Hi);return;case ai:$r(ai);return;case Hn:$r(Hn);return;case"maths-latex":$r("maths-latex");return;case _n:$r(_n);return;case _i:$r(_i);return;default:throw new Error}},[li,Er,pi]),Ti=(0,ue.useCallback)((Jr,eo)=>{var Eo,ci,xa,za,xs,ho;switch($r(""),qi){case wn:const{title:ll,link:Ys}=Jr;return li.replaceSelection(`[${ll}](${Ys})`),li.focus();case Hi:const{language:Bn,content:Es}=Jr;return li.replaceSelection(["```"+Bn,Es,"```"].join(`
|
|
|
`)),li.focus();case"maths-latex":for(var ca=atob(Jr),ja=new Uint8Array(ca.length),hs=0;hs<ca.length;hs++)ja[hs]=ca.charCodeAt(hs);var fs=new Blob([ja],{type:"image/png"});(0,zt.I)(fs,Il=>{Il.id?li.replaceSelection(``):(Il==null?void 0:Il.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":li.replaceSelection("`$$"+Jr+"$$`");break;case ai:case Hn:case wi:const{src:Pl,alt:Wl}=Jr,Mo=eo,gl=(xa=(ci=(Eo=Mo==null?void 0:Mo.name)==null?void 0:Eo.split("."))==null?void 0:ci.pop)==null?void 0:xa.call(ci);return((za=Mo==null?void 0:Mo.type)==null?void 0:za.indexOf("image"))>-1||!(Mo!=null&&Mo.type)?Wl?li.replaceSelection(``):li.replaceSelection(``):((xs=Mo==null?void 0:Mo.type)==null?void 0:xs.indexOf("video"))>-1?li.replaceSelection(`<video width="100%" controls src="${Pl}"></video>`):((ho=Mo==null?void 0:Mo.type)==null?void 0:ho.indexOf("pdf"))>-1?li.replaceSelection(`<a href="${Pl}?type=${Mo.type}&disposition=inline" target="_blank">${Mo.name}</a>`):Xr.includes(gl)?li.replaceSelection(`<a href="${Pl}?type=office&disposition=inline" target="_blank">${Mo.name}</a>`):li.replaceSelection(`[${Mo.name}](${Pl})`),li.focus();case _i:const{row:Tu,col:Ql,align:us}=Jr;let Sa=`
|
|
|
`;for(let Il=0;Il<Tu;Il++){let Wo=[],Ia=[];for(let aa=0;aa<Ql;aa++)Il===1&&Ia.push(_r[us]),Wo.push(" ");Il===1&&(Sa+=`| ${Ia.join(" | ")} |
|
|
|
`),Sa+=`| ${Wo.join(Ql===1?"":" | ")} |
|
|
|
`}return li.replaceSelection(Sa+`
|
|
|
`),li.focus();default:throw new Error}},[li,qi]),tt=(0,ue.useMemo)(()=>{switch(qi){case wn:return ue.createElement(Ln,{callback:Ti,onCancel:jo});case Hi:return ue.createElement(Mn.Z,{callback:Ti,onCancel:jo});case ai:return ue.createElement(zt.Z,{callback:Ti,onCancel:jo});case _n:return ue.createElement(Gt,{callback:Ti,onCancel:jo});case _i:return ue.createElement(ye,{callback:Ti,onCancel:jo});case"maths-latex":return ue.createElement(an,{showSaveButton:!0,callback:Ti});case"inline-latex":return ue.createElement(bn.Z,{showSaveButton:!0,callback:Ti});default:return null}},[qi]);function jo(){$r("")}(0,ue.useEffect)(()=>{if(Zo.current){let Jr=function(xs){xa=!0,za=xs.pageY},eo=function(){xa=!1},Eo=function(xs){if(xa){let ho=xs.pageY-za;ho<0&&(ho=0),ho>300&&(ho=300);let ca=yt+ho+"px";jr(ca)}},ci=Zo.current,xa=!1,za=0;return ci.addEventListener("mousedown",Jr),document.addEventListener("mousemove",Eo),document.addEventListener("mouseup",eo),()=>{ci.removeEventListener("mousedown",Jr),document.removeEventListener("mousemove",Eo),document.removeEventListener("mouseup",eo)}}},[li,Zo]),(0,ue.useEffect)(()=>{jr(yt)},[yt]);const Ra=Hr(Zt),$a=Hr(Kr),ls={width:Ra,height:$a},Or=(0,ue.useMemo)(()=>{if(Ar){let Jr=new Date(Ar),eo=Jr.getHours(),Eo=Jr.getMinutes(),ci=Jr.getSeconds();return eo=eo<10?"0"+eo:eo,Eo=Eo<10?"0"+Eo:Eo,ci=ci<10?"0"+ci:ci,`${eo}:${Eo}:${ci}`}return 0},[Ar]),xo=Jr=>{const eo=[];if(In){let Eo=-1;Jr=Jr.replace(/(@▁▁@|@▁@)/g,function(ci,xa,za){eo.push({multiLine:ci!==wr})})}return eo};function na(){window.sessionStorage.removeItem(fn),$n(!1),io(0)}function Da(){$n(!1),io(0),li.setValue(window.sessionStorage.getItem(fn))}(0,ue.useEffect)(()=>{ji[qi]&&qi!==Hn&&qi!==_n&&setTimeout(()=>{const Jr=document.getElementsByClassName("markdown-popup-form")[0],eo=window.innerWidth/2-Jr.offsetWidth/2,Eo=window.innerHeight/2-Jr.offsetHeight/2;Kn(eo),Jo(Eo)},0)},[qi]);const Ao=Jr=>{Jr.preventDefault();const eo=Jr.clientX-Xo,Eo=Jr.clientY-Io;document.body.onmousemove=ci=>{let xa=ci.clientX-eo,za=ci.clientY-Eo;const xs=document.getElementsByClassName("markdown-popup-form")[0],ho=window.innerWidth-xs.offsetWidth,ca=window.innerHeight-xs.offsetHeight;xa=Math.max(0,Math.min(xa,ho)),za=Math.max(0,Math.min(za,ca)),Va(ci.clientX,ci.clientY,eo,Eo)&&(Kn(xa),Jo(za))},document.body.onmouseup=function(){document.body.onmousemove=null}},Va=(Jr,eo,Eo,ci)=>{const xa=document.body.clientHeight,za=document.body.clientWidth;return Jr<20&&Eo>Jr||Jr>za-20&&Eo<Jr||eo<20&&ci>eo||eo>xa-20&&ci<eo?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ue.createElement(ue.Fragment,null,ue.createElement("div",{className:"markdown-editor-wrapper",ref:ua},ue.createElement("div",{className:`markdown-editor-container ${Oi} ${Er?"on-preview":""} ${un?"mini":""} ${pi?"full-screen":""}`,style:ls},ue.createElement(ze,{insertTemp:nt,watch:Er,fullScreen:pi,showNullButton:Rt,showNullProgramButton:In,onActionCallback:_o,hidetoolBar:Vn,extraUse:Wr}),ue.createElement("div",{className:"markdown-editor-body"},ue.createElement("div",{className:"codemirror-container"},ue.createElement("textarea",{ref:Yi,placeholder:Zi})),Er?ue.createElement("div",{ref:Dr,className:"preview-container"},on==="stex"&&ue.createElement(pt,{value:vo}),on!=="stex"&&ue.createElement(st.Z,{disabledFill:Ni,showProgramFill:In,value:vo})):null))),Jn?ue.createElement("a",{ref:Zo,className:"editor-resize"}):null,qi===Hn&&ue.createElement(sn,{callback:Ti,onCancel:jo}),qi===_n&&ue.createElement(Gt,{callback:Ti,onCancel:jo}),ue.createElement(Xe.Z,null,ji[qi]&&qi!==Hn&&qi!==_n?ue.createElement(rn.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Xo,top:Io},title:ue.createElement("div",{style:{cursor:"move"},onMouseDown:Ao},ji[qi]),open:!0,onCancel:jo,footer:null,destroyOnClose:!0,width:qi===_n?"1200px":null,height:qi===_n?"80vh":null,className:"markdown-popup-form"},tt):null))}},56701:function(zn,En,me){"use strict";me.d(En,{Z:function(){return ve},I:function(){return Ne}});var ue=me(78241),Re=me(8591),Ze=me(92832),ot=me(3113),We=me(58788),lt=me(59301),Me=me(59301),Mt=Object.defineProperty,Ct=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,st=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,Ie=(Fe,je,ze)=>je in Fe?Mt(Fe,je,{enumerable:!0,configurable:!0,writable:!0,value:ze}):Fe[je]=ze,te=(Fe,je)=>{for(var ze in je||(je={}))pt.call(je,ze)&&Ie(Fe,ze,je[ze]);if(st)for(var ze of st(je))wt.call(je,ze)&&Ie(Fe,ze,je[ze]);return Fe},ee=(Fe,je)=>Ct(Fe,Ye(je));const{useForm:de}=ue.default,se={width:280,marginRight:10},he={labelCol:{span:5},wrapperCol:{span:19}};var ve=({callback:Fe,onCancel:je})=>{const[ze]=de();let Xe=(0,lt.useRef)();function Je(bt){Fe(bt,Xe.current)}function dt(bt,et){if(bt.status===-1){Re.ZP.error(bt.message);return}ze.setFieldsValue({src:`/api/attachments/${bt.id}`,type:et.type})}function He(bt){let et=bt.target.files[0];Xe.current=et,Ne(et,dt)}return Me.createElement(ue.default,ee(te({form:ze},he),{className:"upload-image-panel",onFinish:Je,style:{width:470,overflow:"hidden"}}),Me.createElement(ue.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Me.createElement("div",{className:"flex-container"},Me.createElement(ue.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Me.createElement(Ze.default,{style:se})),Me.createElement(be,{onFileChange:He}))),Me.createElement(ue.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Me.createElement(Ze.default,{style:{width:264}})),Me.createElement(ue.default.Item,{style:{textAlign:"right"}},Me.createElement(ot.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Me.createElement(ot.ZP,{type:"default",onClick:je},"\u53D6\u6D88")))};function be({onFileChange:Fe}){return Me.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Me.createElement("input",{type:"file",onChange:Fe}))}function Ne(Fe,je){if(!Fe)throw new String("\u6CA1\u6709\u6587\u4EF6");let ze=new FormData;ze.append("editormd-image-file",Fe),ze.append("file_param_name","editormd-image-file"),ze.append("byxhr","true");var Xe=new window.XMLHttpRequest;Xe.withCredentials=!0,Xe.addEventListener("load",function(Je){je(JSON.parse(Je.target.responseText),Fe)},!1),Xe.addEventListener("error",function(Je){console.error(Je)},!1),Xe.open("POST",`${We.KI}/api/attachments.json`),Xe.send(ze)}},50474:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Ze}});var ue=me(59301),Re=me(4676);class Ze extends ue.Component{constructor(We){super(We);const lt=window.document;this.node=lt.createElement("div"),lt.body.appendChild(this.node)}render(){const{children:We}=this.props;return(0,Re.createPortal)(We,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},48551:function(zn,En,me){"use strict";me.d(En,{SV:function(){return $t},ZP:function(){return Ue}});var ue=me(59301),Re=me(76374);const Ze={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},ot={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"]},We={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(`
|
|
|
`)}]},lt={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
|
`)}]},Me={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
|
|
|
`)}]};var Mt=me(86061),Ct=me.n(Mt),Ye=Object.defineProperty,st=Object.defineProperties,pt=Object.getOwnPropertyDescriptors,wt=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ee=(Gt,it,at)=>it in Gt?Ye(Gt,it,{enumerable:!0,configurable:!0,writable:!0,value:at}):Gt[it]=at,de=(Gt,it)=>{for(var at in it||(it={}))Ie.call(it,at)&&ee(Gt,at,it[at]);if(wt)for(var at of wt(it))te.call(it,at)&&ee(Gt,at,it[at]);return Gt},se=(Gt,it)=>st(Gt,pt(it)),he=(Gt,it,at)=>new Promise((Te,Pe)=>{var ye=Le=>{try{$e(at.next(Le))}catch(vt){Pe(vt)}},ke=Le=>{try{$e(at.throw(Le))}catch(vt){Pe(vt)}},$e=Le=>Le.done?Te(Le.value):Promise.resolve(Le.value).then(ye,ke);$e((at=at.apply(Gt,it)).next())});const ve={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"]}},be=(Gt,it)=>it.map(at=>({label:at,kind:Gt.languages.CompletionItemKind.Keyword,insertText:at})),Ne=Gt=>Object.keys(ve.tables).map(it=>({label:it,kind:Gt.languages.CompletionItemKind.Variable,insertText:it})),Fe=(Gt,it)=>{const at=ve.tables[Gt];return at?at.map(Te=>({label:Te,kind:it.languages.CompletionItemKind.Field,insertText:Te})):[]};function je(Gt,it,at,Te,Pe){let ye=it.getWordUntilPosition(at),ke={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:ye.startColumn,endColumn:ye.endColumn},$e=Te.map(Le=>({label:Le,kind:Gt.languages.CompletionItemKind.Keyword,insertText:Le,insertTextRules:Gt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ke}));return Pe.map(Le=>{$e.push(se(de({},Le),{range:ke}))}),$e}var ze=Gt=>{ve.languages.map(Pe=>(Gt.languages.registerDocumentFormattingEditProvider(Pe,{provideDocumentFormattingEdits(ye,ke,$e){return he(this,null,function*(){const Le=Ct()(ye.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:ye.getFullModelRange(),text:Le}]})}}),Pe));const it=We.quickKey.map(Pe=>({label:Pe.label,kind:Gt.languages.CompletionItemKind.Method,insertText:Pe.content,insertTextRules:Gt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),at=lt.quickKey.map(Pe=>({label:Pe.label,kind:Gt.languages.CompletionItemKind.Method,insertText:Pe.content,insertTextRules:Gt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Te=ot.quickKey.map(Pe=>({label:Pe.label,kind:Gt.languages.CompletionItemKind.Method,insertText:Pe.content,insertTextRules:Gt.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Gt.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Pe,ye){var ke=Pe.getWordUntilPosition(ye),$e={startLineNumber:ye.lineNumber,endLineNumber:ye.lineNumber,startColumn:ke.startColumn,endColumn:ke.endColumn},Le=Pe.getLineContent(ye.lineNumber).substring(ke.startColumn-2,ke.endColumn);return{suggestions:[...We.keywords.map(vt=>({label:vt,kind:Gt.languages.CompletionItemKind.Function,documentation:vt,insertText:vt,insertTextRules:Gt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:$e})),...We.quickKey.map(vt=>({label:vt.label,kind:Gt.languages.CompletionItemKind.Function,documentation:vt.content,insertText:Le.startsWith("#")?vt.content.replace(/#/,""):vt.content,insertTextRules:Gt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:$e}))]}}}),Gt.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Pe,ye){var ke=Pe.getWordUntilPosition(ye),$e={startLineNumber:ye.lineNumber,endLineNumber:ye.lineNumber,startColumn:ke.startColumn,endColumn:ke.endColumn};return{suggestions:[...Ze.keywords.map(Le=>({label:Le,kind:Gt.languages.CompletionItemKind.Function,documentation:Le,insertText:Le,insertTextRules:Gt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:$e}))]}}}),Gt.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Pe,ye){var ke=Pe.getWordUntilPosition(ye),$e={startLineNumber:ye.lineNumber,endLineNumber:ye.lineNumber,startColumn:ke.startColumn,endColumn:ke.endColumn},Le=Pe.getLineContent(ye.lineNumber).substring(ke.startColumn-2,ke.endColumn);return{suggestions:[...ot.keywords.map(vt=>({label:vt,kind:Gt.languages.CompletionItemKind.Function,documentation:vt,insertText:vt,insertTextRules:Gt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:$e})),...ot.quickKey.map(vt=>({label:vt.label,kind:Gt.languages.CompletionItemKind.Function,documentation:vt.content,insertText:Le.startsWith("#")?vt.content.replace(/#/,""):vt.content,insertTextRules:Gt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:$e}))]}}}),Gt.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Pe,ye){var ke=Pe.getWordUntilPosition(ye),$e={startLineNumber:ye.lineNumber,endLineNumber:ye.lineNumber,startColumn:ke.startColumn,endColumn:ke.endColumn},Le=Pe.getLineContent(ye.lineNumber).substring(ke.startColumn-2,ke.endColumn);return{suggestions:[...Me.keywords.map(vt=>({label:vt,kind:Gt.languages.CompletionItemKind.Function,documentation:vt,insertText:vt,insertTextRules:Gt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:$e})),...Me.quickKey.map(vt=>({label:vt.label,kind:Gt.languages.CompletionItemKind.Function,documentation:vt.content,insertText:Le.startsWith("#")?vt.content.replace(/#/,""):vt.content,insertTextRules:Gt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:$e}))]}}}),Gt.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Pe,ye){var ke=Pe.getWordUntilPosition(ye),$e={startLineNumber:ye.lineNumber,endLineNumber:ye.lineNumber,startColumn:ke.startColumn,endColumn:ke.endColumn},Le=Pe.getLineContent(ye.lineNumber).substring(ke.startColumn-2,ke.endColumn);return{suggestions:[...lt.keywords.map(vt=>({label:vt,kind:Gt.languages.CompletionItemKind.Function,documentation:vt,insertText:vt,insertTextRules:Gt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:$e})),...lt.quickKey.map(vt=>({label:vt.label,kind:Gt.languages.CompletionItemKind.Function,documentation:vt.content,insertText:Le.startsWith("#")?vt.content.replace(/#/,""):vt.content,insertTextRules:Gt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:$e}))]}}})};const Xe="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Je=Object.defineProperty,dt=(Gt,it,at)=>it in Gt?Je(Gt,it,{enumerable:!0,configurable:!0,writable:!0,value:at}):Gt[it]=at,He=(Gt,it,at)=>dt(Gt,typeof it!="symbol"?it+"":it,at);const bt=class mS{constructor(it,at,Te){this.placeholder=it,this.editor=at,this.monaco=Te,at.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return mS.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)}};He(bt,"ID","editor.widget.placeholderHint");var It=bt,xt=me(96236),Bt=me(8591),Ut=me(6848),Nt=me(89392),qe=me(86766),Ke=me(56102),Tt=Object.defineProperty,Ln=Object.defineProperties,Mn=Object.getOwnPropertyDescriptors,zt=Object.getOwnPropertySymbols,rn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,Un=(Gt,it,at)=>it in Gt?Tt(Gt,it,{enumerable:!0,configurable:!0,writable:!0,value:at}):Gt[it]=at,yn=(Gt,it)=>{for(var at in it||(it={}))rn.call(it,at)&&Un(Gt,at,it[at]);if(zt)for(var at of zt(it))xn.call(it,at)&&Un(Gt,at,it[at]);return Gt},sn=(Gt,it)=>Ln(Gt,Mn(it)),Lt=(Gt,it)=>{var at={};for(var Te in Gt)rn.call(Gt,Te)&&it.indexOf(Te)<0&&(at[Te]=Gt[Te]);if(Gt!=null&&zt)for(var Te of zt(Gt))it.indexOf(Te)<0&&xn.call(Gt,Te)&&(at[Te]=Gt[Te]);return at},ti=(Gt,it,at)=>new Promise((Te,Pe)=>{var ye=Le=>{try{$e(at.next(Le))}catch(vt){Pe(vt)}},ke=Le=>{try{$e(at.throw(Le))}catch(vt){Pe(vt)}},$e=Le=>Le.done?Te(Le.value):Promise.resolve(Le.value).then(ye,ke);$e((at=at.apply(Gt,it)).next())});function gi(Gt){return/^\d+$/.test(Gt)?`${Gt}px`:Gt}function Pn(){}let Xt=!1;const Kt={"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 Ot(Gt=[]){let it=Gt;if(Array.isArray(Gt)){for(let at=0;at<Gt.length;at++){let Te=Kt[Gt[at]];if(Te)return Te}return it[0]}return Kt[it]||it}let rt=null;var Ue=Gt=>{var it=Gt,{width:at="100%",height:Te="100%",value:Pe,language:ye="javascript",style:ke={},options:$e={},overrideServices:Le={},theme:vt="vs-dark",onEditBlur:an,isCopy:bn=!1,onSave:en,autoHeight:wn=!1,forbidCopy:ai=!1,onChange:_n=Pn,editorDidMount:Hn=Pn,onFocus:wi=Pn,onBreakPoint:Hi=Pn,breakPointValue:_i=[],filename:cr="educoder.txt",errorLine:_r,errorContent:vi="",highlightLine:si,openBreakPoint:fi=!1,placeholder:Ui=""}=it,Fi=Lt(it,["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 ao=(0,ue.useRef)(),wr=(0,ue.useRef)({}),Be=(0,ue.useRef)(),Xr=(0,ue.useRef)(),Hr=(0,ue.useRef)([]),jn=(0,ue.useRef)(!1),Li=(0,ue.useRef)(),Wi=(0,ue.useRef)(),ji=(0,ue.useRef)(!1),[Gn,Ht]=(0,ue.useState)(!1);function Wt(){let tn;return ao.current&&(tn=new Re.Z(hn=>{for(let Rn of hn)(Rn.target.offsetHeight>0||Rn.target.offsetWidth>0)&&wr.current.instance.layout()}),tn.observe(ao.current)),tn}function Zt(){Bt.ZP.warning({content:decodeURIComponent(Xe),key:"monaco-editor-tip"})}const yt=()=>{let tn=wr.current.instance;if(Pe!=null&&tn&&Gn){const hn=tn.getModel();hn&&Pe!==hn.getValue()&&(Xt=!0,hn.setValue(Pe),tn.layout(),Xt=!1)}};(0,ue.useEffect)(()=>{const tn=qe.Z.subscribe("formatDocument",hn=>{var Rn;let Oi=wr.current.instance;(Rn=Oi==null?void 0:Oi.getAction)==null||Rn.call(Oi,"editor.action.formatDocument").run()});return window.updateMonacoValue=hn=>{_n(hn)},tn},[]),(0,ue.useEffect)(()=>{var tn;let hn=wr.current.instance;Xr.current&&clearTimeout(Xr.current),Xr.current=setTimeout(()=>{yt()},500),Pe&&(Pe!=null&&Pe.length)&&((tn=hn==null?void 0:hn.updateOptions)==null||tn.call(hn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Pe.split(/\r\n|\r|\n/g).length))+3,5)}))},[Pe,Gn,wr.current]),(0,ue.useEffect)(()=>{if(_r&&wr.current&&wr.current.instance){let hn=wr.current.instance;hn.changeViewZones(function(Rn){var Oi=document.createElement("div");Oi.style.padding="10px 20px",Oi.style.width="calc(100% - 20px)",Oi.className="my-error-line-wrp",Oi.innerHTML=vi,Rn.addZone({afterLineNumber:_r||11,heightInLines:3,domNode:Oi})});var tn={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}};hn.addOverlayWidget(tn),hn.revealPositionInCenter({lineNumber:20,column:1})}},[_r,wr.current,Gn]);const un=(tn="",hn)=>{if(!tn||tn.trim()==="")return!0;const Oi=wr.current.instance.getModel().getLineTokens(hn);let Ii=!1;for(let Si=0;Si<2;Si++)Oi.getStandardTokenType(Si)===1&&(Ii=!0);return Ii};(0,ue.useEffect)(()=>{var tn;const hn=(tn=wr.current)==null?void 0:tn.instance;if(hn&&Gn&&ai){const Rn=hn.onDidBlurEditorWidget(()=>{ji.current=!1}),Oi=hn.onDidFocusEditorText(()=>{ji.current=!0});return()=>{Rn.dispose(),Oi.dispose()}}},[wr.current,Gn,ai]),(0,ue.useEffect)(()=>{var tn;if((tn=wr.current)!=null&&tn.instance&&Gn&&fi){let hn=wr.current.instance,Rn=hn.getModel();if(!Rn)return;(()=>{var Er;let qt=[],pi=[];const pr=Rn.getAllDecorations();for(let $r of pr)$r.options.className==="highlighted-line"&&(qt.push((Er=$r==null?void 0:$r.range)==null?void 0:Er.startLineNumber),pi.push($r==null?void 0:$r.id));if(si===qt[0])return;Rn.deltaDecorations(pi,[]);const qi=Rn.getLineCount();si&&si<=qi&&(hn.deltaDecorations([],[{range:new rt.Range(si,1,si,Rn.getLineMaxColumn(si)),options:{isWholeLine:!0,className:"highlighted-line"}}]),hn.revealLineInCenter(si))})();const Ii=(Er=!1)=>{var qt;let pi=[],pr=[];const qi=Rn.getAllDecorations();for(let $r of qi)$r.options.linesDecorationsClassName==="breakpoints-select"&&(pi.push((qt=$r==null?void 0:$r.range)==null?void 0:qt.startLineNumber),pr.push($r==null?void 0:$r.id));if(Er)return{lines:pi,ids:pr};Hi(pi)},Si=Er=>ti(void 0,null,function*(){let qt={range:new rt.Range(Er,1,Er,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Rn.deltaDecorations([],[qt]),Ii()}),Ni=Er=>ti(void 0,null,function*(){let qt=[];const pi=hn.getLineDecorations(Er);for(let pr of pi)pr.options.linesDecorationsClassName==="breakpoints-select"&&qt.push(pr.id);yield Rn.deltaDecorations(qt,[]),Ii()}),Zi=Er=>{let qt=hn.getLineDecorations(Er);for(let pi of qt)if(pi.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Nt.isEqual)(_i,Ii(!0).lines)){Rn.deltaDecorations(Ii(!0).ids,[]);const Er=_i.map(qt=>({range:new rt.Range(qt,1,qt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Rn.deltaDecorations([],Er)}const sr=hn.onDidChangeModelContent(Er=>{let qt=hn.getPosition();if(qt){let pi=qt.lineNumber;clearTimeout(Wi.current),Wi.current=setTimeout(()=>{un(Rn.getLineContent(pi),pi)?Ni(pi):Zi(pi)?(Ni(pi),Si(pi)):Ii()},100)}}),Wr=hn.onMouseDown(Er=>{var qt,pi,pr;if(Er.target.detail&&((pr=(pi=(qt=Er.target)==null?void 0:qt.element)==null?void 0:pi.className)!=null&&pr.includes("line-numbers"))){let qi=Er.target.position.lineNumber;if(un(Rn.getLineContent(qi),qi))return;Zi(qi)?Ni(qi):Si(qi)}}),li=Er=>{let qt={range:new rt.Range(Er,1,Er,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Hr.current=hn.deltaDecorations(Hr.current,[qt])},Vi=()=>{Hr.current=hn.deltaDecorations(Hr.current,[])},vo=hn.onMouseMove(Er=>{var qt,pi,pr;if(Vi(),Er.target.detail&&((pr=(pi=(qt=Er.target)==null?void 0:qt.element)==null?void 0:pi.className)!=null&&pr.includes("line-numbers"))){let qi=Er.target.position.lineNumber;if(un(Rn.getLineContent(qi),qi))return;li(qi)}}),Qr=hn.onMouseLeave(()=>{Vi()});return()=>{sr.dispose(),Wr.dispose(),vo.dispose(),Qr.dispose()}}},[wr.current,Gn,_i,si,fi,ye]),(0,ue.useEffect)(()=>{var tn;(tn=wr.current)!=null&&tn.instance&&fi&&wr.current.instance.setPosition({lineNumber:0,column:0})},[si]);function vn(){let tn=wr.current.instance;if(tn){const hn=tn.getSelection(),Rn=wr.current.pastePos||{},Oi=new rt.Range(Rn.startLineNumber||hn.endLineNumber,Rn.startColumn||hn.endColumn,Rn.endLineNumber||hn.endLineNumber,Rn.endColumn||hn.endColumn);setTimeout(()=>{tn.executeEdits("",[{range:Oi,text:""}])},300)}}function At(tn){(window.navigator.platform.match("Mac")?tn.metaKey:tn.ctrlKey)&&tn.keyCode==83&&(tn.preventDefault(),en())}const nt=()=>{if(wn&&wr.current.instance){const tn=wr.current.instance.getContentHeight();Vn(tn<Te?Te:tn)}else Vn(Te)};function on(tn){var hn=document.createEvent("MouseEvents");hn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),tn.dispatchEvent(hn)}const fn=tn=>{if(!ji.current)return;const{keyCode:hn,ctrlKey:Rn,metaKey:Oi,target:Ii,type:Si}=tn;return(Si==="paste"||(hn===67||hn===86)&&(Oi||Rn))&&Ii.nodeName==="TEXTAREA"&&(Zt(),tn.preventDefault()),!1};function Jn(tn,hn){var Rn=window.URL||window.webkitURL||window,Oi=new Blob([hn]),Ii=document.createElementNS("http://www.w3.org/1999/xhtml","a");Ii.href=Rn.createObjectURL(Oi),Ii.download=tn,on(Ii)}(0,ue.useEffect)(()=>{nt()},[nt]),(0,ue.useEffect)(()=>{ao.current&&!Gn&&Promise.all([me.e(8909),me.e(1810)]).then(me.bind(me,71448)).then(tn=>{try{rt=tn,wr.current.instance=rt.editor.create(ao.current,{value:Pe,language:Ot(ye),theme:vt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Le);const hn=wr.current.instance;let Ii=[...xt.BH._menuItems].find(sr=>sr[0]._debugName=="EditorContext")[1],Si=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ni=(sr,Wr)=>{var li,Vi;let vo=sr._first;do Wr.includes((Vi=(li=vo.element)==null?void 0:li.command)==null?void 0:Vi.id)&&sr._remove(vo);while(vo=vo.next)};if(Hn(hn,rt),setTimeout(()=>{nt(),wr.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Jn(cr||"educoder.txt",hn.getValue())}})},500),wr.current.subscription=hn.onDidChangeModelContent(sr=>{jn.current?clearTimeout(Li.current):(nt(),_n(hn.getValue(),sr)),Li.current=setTimeout(()=>{jn.current=!1},500)}),window.Monaco||ze(rt,Ot(ye)),ai&&(Ni(Ii,Si),ao.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",fn),window.removeEventListener("paste",fn),window.addEventListener("keydown",fn),window.addEventListener("paste",fn)),window.Monaco=rt,an&&hn.onDidBlurEditorWidget(()=>{an(hn.getValue())}),wi&&hn.onDidFocusEditorText(()=>{wi(hn.getValue())}),ai)try{hn.onDidPaste(sr=>{const Wr=hn.getSelection(),li=wr.current.pastePos||{},Vi=new rt.Range(li.startLineNumber||Wr.endLineNumber,li.startColumn||Wr.endColumn,li.endLineNumber||Wr.endLineNumber,li.endColumn||Wr.endColumn);hn.executeEdits("",[{range:sr.range,text:""}])})}catch(sr){}let Zi=Wt();return Ui&&typeof Ui=="string"&&new It(Ui,hn,rt),Ht(!0),()=>{const sr=wr.current.instance;sr.dispose();const Wr=sr.getModel();Wr&&Wr.dispose(),wr.current.subscription&&wr.current.subscription.dispose(),Zi.unobserve(ao.current)}}catch(hn){}})},[]),(0,ue.useEffect)(()=>{if(wr.current.instance&&Gn)return document.addEventListener("keydown",At,!1),()=>{document.removeEventListener("keydown",At)}},[en,Gn]),(0,ue.useEffect)(()=>{let tn=wr.current.instance;if(tn&&Gn){let hn=Ot(ye);rt.editor.setModelLanguage(tn.getModel(),hn)}},[ye,Gn]),(0,ue.useEffect)(()=>{wr.current.instance&&Gn&&rt.editor.setTheme(vt)},[vt,Gn]),(0,ue.useEffect)(()=>{let tn=wr.current.instance;Be.current=$e,tn&&Gn&&(tn.updateOptions(yn({},$e)),setTimeout(()=>{tn.getModel().updateOptions(yn({},$e))},200))},[JSON.stringify($e),Gn]),(0,ue.useEffect)(()=>{let tn=wr.current.instance;tn&&Gn&&tn.layout()},[at,Te,Gn]);const[pn,Rt]=(0,ue.useState)(gi(at)),[In,Vn]=(0,ue.useState)(gi(Te)),Pi=sn(yn({},ke),{width:pn,height:In,position:"relative"});return ue.createElement("div",{className:"my-monaco-editor",ref:ao,style:Pi},bn&&ue.createElement(Ke.CopyToClipboard,{text:Pe,onCopy:()=>Bt.ZP.success("\u590D\u5236\u6210\u529F")},ue.createElement(Ut.Z,{title:"\u590D\u5236\u4EE3\u7801"},ue.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ue.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function $t({width:Gt="100%",height:it="100%",original:at,modified:Te,language:Pe,options:ye={}}){const ke=(0,ue.useRef)(),[$e,Le]=(0,ue.useState)(null);function vt(wn){let ai;return ke.current&&(ai=new Re.Z(_n=>{for(let Hn of _n)(Hn.target.offsetHeight>0||Hn.target.offsetWidth>0)&&wn.layout()}),ai.observe(ke.current)),ai}(0,ue.useEffect)(()=>(ke.current&&Promise.all([me.e(8909),me.e(9404)]).then(me.bind(me,2550)).then(wn=>{rt=wn;const ai=rt.editor.createDiffEditor(ke.current,sn(yn({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},ye),{wordWrap:!0}));Le(ai);let _n=vt(ai);return()=>{ai.dispose();const Hn=ai.getModel();Hn&&Hn.dispose(),_n.unobserve(ke.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ue.useEffect)(()=>{$e&&$e.setModel({original:rt.editor.createModel(at,Pe),modified:rt.editor.createModel(Te,Pe)})},[at,Te,Pe,$e]);const an=gi(Gt),bn=gi(it),en={width:an,height:bn};return ue.createElement("div",{className:"my-diff-editor",ref:ke,style:en})}},94606:function(zn,En,me){"use strict";me.d(En,{jL:function(){return We},w9:function(){return rn},QD:function(){return _n},cQ:function(){return Ke},op:function(){return vt},O5:function(){return ji},_b:function(){return _r},t7:function(){return se},Gi:function(){return ti},YG:function(){return sn},qp:function(){return st},vr:function(){return Hi},qE:function(){return en},Je:function(){return be},wb:function(){return xt},cq:function(){return rt},tp:function(){return Ie}});var ue=me(59301),Re={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},Ze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX+XHttddaex38nlW2lLO1svq1wJ4aeFMM9CqFnNKoaYVapDAOicfjGEMKqKk2nrx59Lbt5xx6aPR6DEG8Hj/K3xwY0YtjSx2vYnlspLEsX0BRKUBrINtyX+PZp0r3fR+IIgzFSo9EsahFUfSHWIj7Pa919zvf2vlo+rFXdWivObjHJvR8S6vTJORHckV0+4GBAF4InwQlBCAIkEMXgCLA9Mn9WCef4ft8HWkgVIDn6ckwUA/HQfCzoFX71TsP6n/41aL3moHTWotnJnGysPEFx8ZcAtMqGTjh2NmVTL+iDB6BZurjsRSe2SogjhNwMZIngbZbqgXom8N26/KjV3femB7ebRxfE3DbRnW/k8c3LQvv5yCjOFVVqhgCyNnJmAhoxyOFasz1OeCM2lLTJryI4BQQUn1RAhI24Lc1dBjc2K6Nnv2edfP+sLvIvergxqb0vpHA1fk8lre9xBZpZsYKU9sMYiDvAHKaqU4HuANcZrIpcILiezRdo7z0aUw3BoJYI4gELAeI/bjZmBq9+PGNd5x/+unHua8U4KsKbriujxUSV9gW+rwg9WPTfpHgpEgUQgAFJwU6LSDwjSxA8F2jslSBBJaZKwVGJRv1pSAJLyQ8qlwLOA4Q1us31Z58+OTj3rX/E68E3qsGbmhK/6Nt40oIFMJwZ5URFh/cZoGgHQKODeSsaUEiA5iSy6IqYRnfmPq66YojPILbYbqpGXuhRhRrFPMSUaP+6OTAtuPff8ze97xceK8KuJGG/oBl4XsaKMTTsiwDKVXZjm1qsgRBU84TXi5VXqo24/syP5ce2xEg0gBDeAZWFijo79JnpLQxXSo7iICiIyD8qUfdxuQRRx24x5MvB95uBzfW1G+XFn4GoMMojQNOYWUK45b+jG9mW+PvFNAKEkqVYgI583VZcOB7WRrCqGwiaQovU1lAlaXKM/BMQNIGbN0FLGh0lySCVv0OP3aPOnKf2a2XCm+3ghuc1AvzOdwmLSwIwkQlBoxMtgZYCkvwQLafBYo0l2v6gBcCxRxQyifwM9PckRCniXIGbjo8wiI4bgnRRFul0XAZMABbaggVoytvo12vff7Qt/Rc8LqBm5jQndrBr3MFHOwyemaJbGaaAKzMp00zV2O+6VVnSTCPcYCNdrItEGAOcKxpVUQKLjPZ6VHVgEuf3Kf/rLk0Y4ViTpiAEUYKJaEgVDg2OTq1+j3r5w68FHi7TXFDU/El1Yr8VLudDM4IjUpLVWW2Mg0GgubybATNfN/0C5+eqjQ9oO0ngAmR0ZF5X2bKjLRZBUFgNE03AKhcPqk62wJsm+qjvyM4Aa0idFN1zcmvHraq90uvObihqej4YsH6nzCEyHwRB0WFZeZJ05xupsZSp6sty+2mXX2a/5rP0fT8MAHRZpmWph48J38zi6xUF1Vqft9KAg2BES6PmyChGGFTBVJ1kb/dq7XeeuTBs0deLLxXrLhHn2nP6+4s3Gk7Yl6Q5mpZMMjAGWjT0o+dgkR6BVnUzJSW2PpzhpHVqIygdPiEET3rzwiHP2QCSlrjUm1epE0el+R1/E6SmjDa2nGEat5Bu9089bC9O7/1moDT0GJkMv5eR6f1oVY7MRfjp2SiNgOO5pkFBpnkadmD/qflRrAtiUrBhJFdPnauJhI6SU6noXSyb2BmUZUqzYKEqSSSZ6SUSU34WagYVUsg9N27R7DtkONWrmRcf8HHK1Lc4EjrqHJn6ZdxBIsXkXU2MqVZqU/ja5ZU/MyWR5/Bps1/wfD2p+G7TUy1QziWRHfZgVXsREd3H1YtnoW+vl709nSjv7f0V4MwPnRaRUGlxSm8rG7N0pAMlim/CE4Jk+tRbTxmAoYK4Qit/Mhb9/a9eze9ILW/YQwv5jvmM/fcs720YMnMDeWStabtJrmVUVaqtsy3sRqgAm+96yH85qbb4DZqWNjfi57uHlRKJViWjSCM0Wr5aDRaqDebqDeaqLkRLFugp7OIQudMrFn+JvT3z8Ee8+dgVldxp+tkpUB42ZZgqLrEnyUq89MkODkunjVVoREFMao5G367een6lZ2fejEQXrbiBgbbn+qZUbyETcWs2KZ/Ynsoi6aMgEPjLVz6Xz/B1OjT2P8tyzB7Zm/i6IMQYRghDGk2ielkLaKIPiiM4PshGk0XzWYDU40a6m6Ickmi3N2Lt+y1B5a+eQ+sXLIQM7rLxi1QiR47I2l3xPizFFyitsQnmqhq8juNks1go2BrDRG4WwMv3veItT1TLwTvZYH7w0NP9y7sn3NPqSgXMiCYRuNz1MbE9eEnRnDhpVdh1fxu7L1iCYIwghcECKMYUfaMY4Rh8jogxJgQNQjP+CECpUK4H8bwPR8tgmzW0Ao8lEsW+vrn4sA1S7Fs2VKsXDIP1UrO3BymMD7PEwvj6wJjnjTTJFAEsUJOJj4y8iMUWIfE8bp1Kzs2virgtg23PtHTV7os9JI0wASFNPWg4vI54LGBMZz/je/i71YvQv/sWXA9D2EYIooiAzCOYoRxDM/z4Xo+PC+Az2MR31NpkU4fpKGUQKRkoiSCjCSiSCAKVPLddgON9hQsK0TXjA7su3YVDjt0Hdbu82ZzbQYgVZb6OJOW0GQjZW54XtACInTkHXjt5kXr9+r4zG4Hd/bZZ8uTTz1rY7liHxiHiR9h+sFAQHNxJMulCGed/x2jtHlv6ofruogILaZpEl6MIAiML2u1XQRhaIDxeKZGqoEAObgoTkBGkUp7bvRRfC0QRpZRkYqk6SjHcYDQryNXVNj/oLX4yIc/iMULZyVVSFr0GxVmlQWDg0xSFG5j372rV1fXr1wpdhldX7Kpbn2mtbqrs7jRkqLIC6VDzgIBwZUKwGXfuwFjA49g331WoO26CSwDh/BieK6HyakaPM9LTZbv0WQJL0r2o9ioMkhN2gDka0JkDhYpExW1FtCQEMKGlg6gbWhTxjPFaKBvZgUfP/njOHz9WrRS5QXG9AkvzeXoHxXrVw0n9puxEm8+dGVlaFeqe8ngBifiT1Y65aUha7+0+M7Sj0IeeOixYXznO1fiHQfvY1REs4wiBoIAcRQZkBOTk/B9P1GSCRBBoraQn/dTmDxOiATGLV+nioxjA49wINjAY4YtIaQFwX1hQYtkn/AtW+Okfzsdf/+OA9H2Uj+XdoiZltBebaGh2a9DrONYvfdtK8q/2L3gaurXxaI4WqUJJH2ETTPltVsaX73wvzG7IjGrrwce4RhoieKCMMDY+LiBZ2AwGJjAQKg0Sx6jCrWBmQAlTJo3vx+ZvIvOXLBEEAJCMPFNQrkBBwnNfcuGMFAFlIqRyxdw+he/gv1WL0PDTftzSicd41jBYaURa/SUHLTrjc+vX9mxy47JS1LcpoGB4qKOuZvzebFMpyUPT0BoTD023P0wfvWL67DfPsvhut4O80z8Woip+hQma41UWVQRDMwEXIQ43Se4OApSYEAYeAijwADSmp1RghPGt3Kb5MMJxEx9VJ2QNu8mYNlQUYj+hUtx9nnnolIpw83KrrSSMOCURmfOQejWr37bis6P7DbFba/ptZal77SlyPFy6WC5ZedBKYWLLrkKs6oOCvl8AoR+zWwjeL6L4dFRuJ5CEGpTsEeBQBD4iFWMWEWIwjpU6Ca+kNswNll+zCgECSkcKM02CQtS/nK0oxPDFDzRIYFSfYRIcFRfzgDktRz7z5/E8Scci7ar0g4xc0aePen0VaSAiLxHutVTe6/cRfn1khQ3OBEdU6xYv4oZbzjJopJISrX96aFtuOaH12D5ogXw/QABVZQFhCDC5NQ4xienEIQCbijh+RKTvXPhVYrIPTGAXLOOOJ4AwhAxzTKomTTEdHy1l/guc5voWTmXSPWFSVAwf7FRH83YuD5jxgQooS3HqE9Bomf2fJx9wcXo7KjAp3swLSZApjPeJUvDioLBkttYvHZtf/v5VPeSwD09Fp9Z7pDnEhzvD1MEqo2d2ut+swEPbr4fM3p7jIqYbhjlBKHxdcMjQ0ZtXmjDbSsMLFqJx048AWDWv/kvWPjNy2DXB5hXAHEIpZqwZNVct1INSFkyoJRyE1g6hjaFnp2IDyrxezqFaMClHQdjsjljsrzuk8/4Cg46ZF9zPQYc05k0qpYswFH+uCW9VYcsm7F994CbiL5fKlkf4lyC1nSswnRlWcBfftVP0RgZRqGQR2jKKd/4JZrpxOQExicmEIQWvDCHhu9gyz99FN76VQCt0AZmnnUxSg/cAUuGEKoJaBdSZjVpBCk7EnDahxRlKHCfjbccNPMis29mWSGMH6TqNKQxWStJVayccQvrjv4ATj7lRLTcpL1k2kym0GUJJlASvuvo6JADV3RtfsngbtXa3gsoBA3k3Rakb8GtiuiaUtk+xveUqRjoU9gmKuYFLr/yGkwMjSBH5xrQ4dNPBaYiGBwehOu24QUCXuhgSnTjsTPOQDxvRjqjrNB31tdRfvwB5O0cEI9BaA9SVhCpGqA56+NAa/oIC5AER2XlmfdDhT60FLBoxlYAof0UnjLukAo1arPyxhev2vcAnHbWOSaJNmWe6elRCAm4TukrS0XvOGivrt+9aHDba8GaQt56r4A8XADztYIVKgimXH6M7iDUebackzJLIm8LlIsSP/jRz/HU1ieQcywDLnHwAWq1BsbGR5M6lYrzJEZmLsHw5z8LlOm0AWwfQ885X0Ol/oypHRFPwpZF2FYXwngEgoBEHpEaNwpTyJsqROsCgupMtFeshLt8Oap/ug8d998CKQgvgICfRFppm/QEBAdg1oIlOOMrF6BcLsAPlCnHIjPvClQcgW4nhFThPxy8ovPXLwjugaGh8uxyzwXlvPOxsoPC9PUaZpYoLZobHtAMtAEhoVDKSXSUHdy+YSN+d9MGFKm4NK0gwKHhUTSaNZPL+ZEFzwXGVrwNk6edlkDjHMLmrei78DzkLR8W18qoEUiRgxR5xKoJ2+ox4EJVh5B9UDqPel8vWgccAW/Naug5Myk84OkJzDn3FOTbIwacFASXJMSC/XOZhxISHTP6ceZ5F6GzuxNekEb5IKlIOvISvU7AhPiog5ZVbtgluE0DurigHPx4RnfunXQXbNJm8wEZQAYCphDs99c9YMqDKbALtjJNyNGRQVx++dWwtDA5GHMyz/ewfXAYntdE4AfwjFkINHsXY+JzXwPmdptGXunKH6D79uuRzxVhqwBKDSFnzTTRNIrHIQXz+RAxTVF1obFqPcY/ehLQVU2CLG+AApwNGzHjR99GTk0Bqg0pvCQ9sRxIY6o5aGmjWOnCmed/A70zZ8INmCpxbGwoAF0Fgd5cEBVkfNj+Szvu2CW4rUPumTN6C+faCijwxqTTeNmXssV+bM1w9oiqm2wToELgt1AtSHQULVxzzU/w5/u2mKUMcRCg3W7hmeFhBF4rKaPY6WDGJDrQnrcUrdX7wRkcQuXe22HHU7CFgDT+zE/AKR9au7CsPkSqAWWiaieG3nkCvPe9G+DSGQrqwUdRuHUjylvvQS4ahaObELoBAVqFSCsJzto4Jkg4OQdn/sd/ord/Plw/MtAIj5Y1oywxq+DXrThae8CKzq3PC+6ux4dndRZ67uut2nM68sn6jWxtx/QvZebKiWKCq7WAmtm2IZSPGR0FjI9uxxVXfB+tqTokYgNu++AQVOSZ1EErunSWRBXTyYASkLIAbdGnMBhI6Lhu5COlA61Ck39JUTHRVAtO73ej0TMbEyeeBj1vjlGauP8RVL7/A+SDQdiowVF1SN02UVaa2fAkl2NU5TNnC5z+5QswY/5iuG4EN1KmhtWxwNwuBws7w+G85S1ftaBr8nnB3f1Y8/hqtfzDzhzQU0qm0v4WOLam6ecIjl2GWhuYaFF5IcamJtFZtNDX4WDzvZvxv9dej9BzoaIIo+Oj0FEAzSxfhyYSa50W5iAU20RNafIuwmol/k0yGPAGJJ0OZSJqHkqWEcU22vPegua/nAR0dxvVWZv+iI6fXomcrsNRDWhNU9UmAWZoVVYOgsFBOCjlLXzqjC+ia+6eaHsRmp5GMScxu8NCf4eF7qKIRBQ8mnfkz4PQ/83SuX/d2BSbHmne3Fktv72vDHQUEsWxGnjuIwPH3hf93FQbGKnTXDUeGhiCFDFmVHPoKlu49dYN+O1vb4alYozXpqBjggvNBHDyYIHDhJVQ+IiSYolFuXHqBQhGT+VCWiUTGaOYQIuIhYWQ34tLcBeugH/ch4DuXmBkEJXvXoB8ewwWXGiT77GWSBoA9G9cKBcLB92dFZx02umI8r0m9Vszv4QVsx10FYUZu7GuNHeuN1XkB9FN7Xbwmb0XVh/KuIhNWwOvs2Tn+6rCZAecITezU9PWc5i0Ml0JZKbfwsTHDU0Bky6wYcs20w7qrThGeaW8xJ0bN+HW2+5Eo9k0lQT9jWkEMVHl2dnhoNp4VLBc4uI4JrKRAcgEO7HDXFLQE64oGNz0k0pUkvUhCxZDrz4A4tEHkXvwLtgihNSJa0gEQNfAXp0NZTnGVSxeuADHHHcCpJXD+9f0YcUc2zRgn6sXnr9O3yeBlqeGJyfDE1cvKlxvkuvfP6512QF6y8kCFwYHllHZsgSezAwh7ZhyPIRHH/fMJDDWAn72x8dQb7XRVbZNoKgWLBRyAvfe/wBuuf0u1CYnIWVaQ9K5pRMrdNw8v5khM2rjZ2iYVGJWfxJunJbwBGjm0kx6ohj/zQpryyS82lKQpopgI0AnLodmaop9C4rVAwTWH3wgluy9Fh/cbxbWLSqa6idbJfpcS3PNupNkQnuioVrDk976I1eV7xW3b2lvL5eKczoLQKWQrIqk6rIeWwYuWw1kymwFTLaAgQlgsK5xxa1bUGu66ChYqOSpXMss4Ms5EtsGnsatGzahMTaWhutsLWsaug2s7F5nix7S/CKZ/08L+7RlZMqpDJ4hk62JShWbLj805Ve2II9zlCbJQqW7C/sftA4HrZiPUw/vRweD7S7A0a/XXW1SsLYSeGpIbxiZeOpIccufG8dVOys/5r2o5JNVQaw9WUrxhDRbk46k62/5moobbySKu397gK/9ZgsKFlDNSZQJzhHI2xKOJVDISTRbbfzpwS0YePxxxL73rJzNwNJZ62yG2dzydNlOUqVnK4PTdpKRWLqfLe/JPpO9nuZnTFRNyFj5Apbtswr5rpn4wpELcPiyqhHKrhTHsTJ4TLnCWNdgA3Dr/lHiuo2j1XJf7x2VvNiHTbZyBs9OA8U02zcTMjKJrsNTwEgT+NE9ow9864Ytt/dVZVDNW6LsSBT5XUsgZ7P7L5BzbDPX+qeHH8HAlr+YZQeJjSWpwk4P2pdhk05mcHfHa3YyzXKa9GD6mez9hOiOhHjHwjzzOzZ65s3B/D2XolSt7nnh+5a9a0mfZcZLkTz3MrJronVxoQ+ziPEWsL3GXDZ60NjIr/6sjynk8EsHEPRxDBK8E1ztw+k+njhHFTqJCTMl4Qm21eDd/KR7+NePLt35fPnO/8fj592ljz5sPn49rwBUC4mF0bqmp2HZMguKhOC4kpPpF8fNgLEjkPzyz/qzjo3zcwKSyqOfy2avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",We=({dataSource:Gn=[],img:Ht,imgWidth:Wt=346,title:Zt,sunTitle:yt,bannerExtraContent:un})=>ue.createElement("div",{className:Re.banner},ue.createElement("div",{className:Re.content},ue.createElement("aside",null,ue.createElement("p",null,ue.createElement("b",null,Zt),ue.createElement("span",null,yt)),Gn.length>0&&ue.createElement("div",{className:Re.btns},Gn.map((vn,At)=>ue.createElement("div",{key:At,onClick:vn.click},vn.name,vn.sign?ue.createElement("img",{src:Ze,width:39}):null))),un),Ht&&ue.createElement("img",{style:{marginTop:33,marginRight:38},src:Ht,width:Wt}))),lt={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},Me=me(92310),Mt=me.n(Me),Ct=me(89392),st=({dataSource:Gn=[],value:Ht,onChange:Wt,onTitleChange:Zt,className:yt,title:un,titleWidth:vn=41,style:At={},fontColor:nt="#6A7283",showCount:on})=>{const[fn,Jn]=(0,ue.useState)(0),[pn,Rt]=(0,ue.useState)(!1),In=(0,ue.useRef)(null),Vn=(0,ue.useRef)(null);return(0,ue.useEffect)(()=>{var Pi;Gn.length!==0&&(((Pi=In==null?void 0:In.current)==null?void 0:Pi.clientHeight)>97?Jn(1):Jn(0)),Gn.length===0&&Jn(0),Rt(!1)},[Gn]),ue.createElement("div",{className:Mt()(lt.row,yt),style:At},ue.createElement("div",{onClick:(0,Ct.throttle)(()=>Zt==null?void 0:Zt(),2e3),style:{width:vn,marginTop:pn?12:4},className:`${lt.title} ${Zt?"current":""}`},un),ue.createElement("div",{className:pn?`${lt.tagsWrap} ${lt.tagsBorderWrap}`:lt.tagsWrap},ue.createElement("div",{className:lt.bar,ref:Vn,style:fn>0?{height:fn===1?97:"auto",overflow:fn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},ue.createElement("div",{className:lt.tag,ref:In},Gn==null?void 0:Gn.map(Pi=>ue.createElement("span",{onClick:()=>Wt(Pi.id),key:Pi.id,style:{color:nt},className:Ht===Pi.id?lt.active:""},ue.createElement("span",{title:Pi.name,className:lt.name},Pi.name),!!on&&ue.createElement("span",{className:lt.num},Pi.count))))),!!fn&&ue.createElement(ue.Fragment,null,fn===1?ue.createElement("div",{onClick:()=>{var Pi;Jn(2),((Pi=In==null?void 0:In.current)==null?void 0:Pi.clientHeight)>245?Rt(!0):Rt(!1)},className:lt.action},"\u5C55\u5F00",ue.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):ue.createElement("div",{onClick:()=>{Vn.current.scrollTop=0,Jn(1),Rt(!1)},className:lt.action},"\u6536\u8D77",ue.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},pt={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},Ie=({dataSource:Gn=[],value:Ht,onChange:Wt,className:Zt,style:yt={}})=>ue.createElement("div",{style:yt,className:Mt()(pt.tabs,Zt)},Gn.map(un=>ue.createElement("span",{onClick:()=>Wt(un.id),className:Ht===un.id?pt.active:"",key:un.id},un.name))),te={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},ee=me(92832),se=({dataSource:Gn=[],value:Ht="",onChange:Wt,onInputChange:Zt=()=>{},className:yt,style:un={},placeholder:vn,allowClear:At=!1})=>{var nt;const[on,fn]=(0,ue.useState)(""),[Jn,pn]=(0,ue.useState)("");(0,ue.useEffect)(()=>{var Vn;let Pi=Ht;(Vn=JSON.stringify(Ht))!=null&&Vn.includes("{")&&(fn(Ht.id),Pi=Ht.value||"");try{pn(decodeURIComponent(Pi||""))}catch(tn){pn(decodeURIComponent(Pi||""))}},[Ht]);const Rt=()=>{Wt(encodeURIComponent(Jn),on||null)},In=Vn=>{Vn!==on&&(fn(Vn),Wt(encodeURIComponent(Jn),Vn))};return ue.createElement("div",{className:Mt()(te.input,yt),style:un},!!Gn.length&&ue.createElement("div",{className:te.dropdown},ue.createElement("div",{className:te.text},(nt=Gn.find(Vn=>Vn.id===on))==null?void 0:nt.name,ue.createElement("i",{className:"iconfont icon-zhankai4"}),ue.createElement("b",{className:te.b1}),ue.createElement("b",{className:te.b2})),ue.createElement("div",{className:te.menu},Gn.map((Vn,Pi)=>ue.createElement("div",{key:Pi,onClick:()=>In(Vn.id)},Vn.name)))),ue.createElement(ee.default,{onPressEnter:Rt,value:Jn,onChange:Vn=>{pn(Vn.target.value),Zt(encodeURIComponent(Vn.target.value),on||null)},bordered:!1,placeholder:vn}),ue.createElement("i",{onClick:Rt,className:"iconfont icon-sousuo9 font14 pl10 current"}))},he={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},be=({value:Gn,onChange:Ht,className:Wt,total:Zt,pageSize:yt,style:un={}})=>{const vn=Gn<2,At=Gn>=Math.ceil(Zt/yt);return Zt<=yt?ue.createElement(ue.Fragment,null):ue.createElement("div",{className:Mt()(he.quickPager,Wt),style:un},ue.createElement("div",{onClick:()=>{vn||Ht(Gn-1,"prev")},className:vn?he.disabled:""},"\u4E0A\u4E00\u9875"),ue.createElement("div",{onClick:()=>{At||Ht(Gn+1,"next")},className:At?he.disabled:""},"\u4E0B\u4E00\u9875"))},Ne={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},Fe=me(71418),je=me(6848),ze=me(39978),Xe=me(10148),Je=me(58130),dt=me(96908),He=me(57177),bt=me(81378),et=me(97267),xt=({className:Gn,dataSource:Ht=[],col:Wt=4,right:Zt,bottom:yt=23,precision:un=0,wrapWidth:vn=1200,trackEventItems:At,loading:nt})=>{const on=Math.floor((vn-(Wt-1)*Zt)/Wt);return ue.createElement(Fe.Z,{spinning:nt},ue.createElement("div",{className:Mt()(Ne.list,Gn)},!!Ht.length&&Ht.map((fn,Jn)=>{const{name:pn,id:Rt,identifier:In,power:Vn,cover_image_id:Pi,pic:tn}=fn;return ue.createElement("div",{className:Ne.wrap,key:Rt,style:{width:on,marginRight:(1+Jn)%Wt===0?0:Zt+un,marginBottom:yt}},ue.createElement("a",{target:"_blank",href:`/shixuns/${In}/challenges`,className:Ne.li,onClick:hn=>{hn.preventDefault(),At&&(0,Je.L9)([At]),Vn&&(0,Je.xg)(`/shixuns/${In}/challenges`)}},ue.createElement("div",{className:Ne.img},ue.createElement("img",{className:Ne.cover,src:`${tn}`}),fn.is_jupyter&&ue.createElement("img",{className:Ne.sign,src:dt}),fn.is_jupyter_lab&&ue.createElement("img",{className:Ne.sign,src:He}),fn.is_unity_3d&&ue.createElement("img",{className:Ne.sign,src:bt})),ue.createElement("div",{className:Ne.name},ue.createElement(je.Z,{title:pn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},ue.createElement("span",{className:Ne.e},pn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),ue.createElement("div",{className:Ne.tags},ue.createElement(je.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},ue.createElement("span",null,ue.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),ue.createElement("span",null,fn.challenges_count))),!!fn.myshixuns_count&&ue.createElement(je.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ue.createElement("span",null,ue.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),ue.createElement("span",null,fn.myshixuns_count))),ue.createElement(je.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},ue.createElement("span",null,ue.createElement("span",null,fn.level))),ue.createElement("div",{className:Ne.rate},ue.createElement(ze.Z,{allowHalf:!0,disabled:!0,defaultValue:fn.score_info}),ue.createElement("span",null,"\xA0",fn.score_info?`${fn.score_info}\u5206`:"5\u5206")))),!Vn&&ue.createElement("div",{className:Ne.lockWrap},ue.createElement("img",{src:`${Xe.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),ue.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Ht.length&&ue.createElement(et.Z,null)))},Bt={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf"},Ut=me(2119),Nt=me(59301),Ke=({className:Gn,dataSource:Ht=[],col:Wt=4,right:Zt,bottom:yt=23,precision:un=0,wrapWidth:vn=1200,trackEventItems:At,loading:nt,onRemove:on=()=>{},isCurrent:fn=!0,showAlias:Jn=!1})=>{const pn=Math.floor((vn-(Wt-1)*Zt)/Wt),Rt=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return Nt.createElement(Fe.Z,{spinning:nt},Nt.createElement("div",{className:Mt()(Bt.list,Gn)},!!(Ht!=null&&Ht.length)&&(Ht==null?void 0:Ht.map((In,Vn)=>{var Pi;const{name:tn,id:hn,identifier:Rn,featured:Oi,school_name:Ii,image_url:Si,excellent:Ni,is_plan:Zi}=In;return Nt.createElement("div",{key:hn,className:Bt.wrap,style:{width:pn,marginRight:(1+Vn)%Wt===0?0:Zt+un,marginBottom:yt}},Nt.createElement("a",{className:Bt.li,onClick:sr=>{sr.preventDefault(),sr.stopPropagation(),At&&(0,Je.L9)([At]),(0,Je.xg)(`/paths/${Rn}`)}},Nt.createElement("div",{className:Bt.img},Nt.createElement("img",{className:Bt.cover,src:`${Si}`}),fn&&(0,Ut.bg)()&&(In==null?void 0:In.studying)&&Nt.createElement("div",{className:`${Bt.movebq} user-path-items`,onClick:sr=>{sr.stopPropagation(),on(In)}},Nt.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),Nt.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Pi=In==null?void 0:In.subject_tags)==null?void 0:Pi.map((sr,Wr)=>{var li,Vi;if(Wr===0){const Qr=(li=Rt.find(Er=>Er.name==sr))==null?void 0:li.swimg;return Nt.createElement("img",{className:Bt.sign,src:Qr,style:{left:"-4px"}})}const vo=(Vi=Rt.find(Qr=>Qr.name==sr))==null?void 0:Vi.ptimg;return Nt.createElement("img",{className:Bt.sign,src:vo,style:{left:`${48+52*(Wr-1)+2*Wr}px`}})}),Nt.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(In==null?void 0:In.excellent)&&Nt.createElement("div",{className:Bt.bq},"\u5F00\u653E\u8BFE\u7A0B"))),Nt.createElement("div",{className:Bt.name},Nt.createElement(je.Z,{title:Jn&&(In!=null&&In.excellent_alias_name)?Nt.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${tn}`,Nt.createElement("br",null),Nt.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${In==null?void 0:In.excellent_alias_name}`)):tn},Nt.createElement("span",{className:Bt.e},Jn&&(In==null?void 0:In.excellent_alias_name)||tn))),Nt.createElement(je.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${Ii}`},Nt.createElement("div",{className:Bt.unit},Nt.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),Ii)),Nt.createElement("div",{className:Bt.tags},Nt.createElement("div",null,Nt.createElement(je.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},Nt.createElement("span",null,Nt.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),Nt.createElement("span",null,In.stages_count))),Nt.createElement(je.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Nt.createElement("span",null,Nt.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),Nt.createElement("span",null,In.members_count)))))))})),!Ht.length&&Nt.createElement(et.Z,null)))},Tt={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},Ln="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGlaOfRbyZh7Xy9B7hnAzOzmCpUvA/jDC2WvbReogE3/TTLufo6IKu0+38r9PQE4n+f1VVS+B+ZbWhnEBX8P0Q4H7gcTCZqyvRbWARZHQLlavp8ZG20P9rXcHhEmI07kdtsODasA5/OlX6gy/dfF/bbTV5GmHeL3JBLRxzttof45awCLRYo9vpuZE7YGdyG2Q0R5UvQBWxYwKwBn8pWPEPg7IlhdiKDYnrMIXAz6WDrh/mu3bXcNcEC5P7wIbrdQzH9eQCZF7+2WkrsCWPZcD/TgRbZsF1zTmrBrBX5HN3tyxwD7YTOVRy8KVL0Bd65Vmo667q2dStcdASx6rofyjouqUK/B9dsXFUohcksnenLbAMtemy1UfnrRiLE84NZ6IdqRirtvbdfi1TbA2Xz5r5j5j5Z5ehe705RMf51KRP64ncVoC2BxHLDH9/batlz2gJPnFc7PArNVgvjViABH6Zhm/ZErQoxkH7AmxYhHlsX71s7aWr9XbNek6M52HBQtA6xdflx5pldCVaEMHDuvcK5A8AjI5oB8EShXgEoZKFeBSgVQCohEgKjr/4z3AUP9gCIg7jLWpBn9fa9lsMXa5d7UqquxJYCFYrOFyk964c8V4F44oVCsEs5lgfNZIJcHPMFIk27wU0sbof/V0UcyBgz2AyMDQDQCbBzwXrtAEz2airu/3ErQQEsA5wqVT3qe93WbPKfqAS+eUsiWCWdmgJPTQLVaB2gjw6oB3U9B0azbsGz5XV6KsWFg01pAzGqXjniIua89ilZK3ZWMu99ohklTgP0YqsqLNlnz+SJh7ymF8xkf2JKEkFu+BOx1Y8CGNcBAH2P9gGe5h5VujqZTCfeKZjFeTQHO5EpfA/ApW9N5ZYYweU5h6jhwPlfHcpux5Ha/BxCLAldfBqSijMtHX2sg4x/SyejvLIXNkgAHoa07bEnNe48rnCkQDr8CFBokehh2q1ntIizYsOVG3y/g6AH7dl3gykuAvj4gAkahSihUCCVP9nryJfNgj1dguIrQ5wKJCCMZZaSjjOGEh6jV9LbuSUb2YAW+ZamQ3CUBzubLT9mKW95zTOFkhnDoqC8NL8clL0oqSYgnCSoCVIM92580axAjji+BuyqQ4RgQOq8wUKrK/0jv83Ilo8BQzMO6VBUDseWYQfM+JO46lYi8cbE7FwVYZxxUvf9u3kXzOyZnCIfPKuw/FAhSgcxTz3GbyFQLpOh6Ics877qE9AAQiZEGSyJUI6JGOT5VxlxocEWvdgTcAGQBUtQwWRTDTQTkYhXIlQnZElD2fMBjDmMizdjYX0VkhSlbOepXF/M6LQpwJl/ebiOd5FyR8PxxhQNHgGKP8+9EL04PKU2tAr5LjIQLJB0DJmswDbACpuP41KuBFYDlEwBsKFdz72ClZqvA2SJpI4yALc+PJ6rYPCDSevOXvSd3EG1PJyK/1KjthgBLIhg8frjbwYgq9MRhB5PHgXOZha01k5nq9d4FalEgowk4/UMKTp/fR59iJBX0nqkBo8ASpsGVPdYHVD7yuwY8uLcGcrAyNZCljbopZErAqQKhWPGB3pD2cEl/RUyK3S5d+88renujhLeGI8nmyv9rI8vv+aMKh6cJk8eC8Tbjye1Oi4BEkpDo91lxVDFSjghS/lVjuQZgMXc6DDdgxRrYEAWbl0GDHwC6FMBmuLkycKJAKFUJMQe4YriCwdjy6t6S1ZhKRn6l0TY37386Pxd4st21rr9fWNnTkw72HeyNnit7Z/+YAsn+CUbaBWJ68wzADbFZQ8GaJSuex6INy9ZCVmDvNkBLW2Y/DrPpxdbmTBGYLhCYCBvSVWzury4rNSvgTfX5yQsoOJMr/T2AJXWrVsDfeUThldOEoydbubu9e9wIYWBUFtJnxwPOHPuct28KyHWs1yHWVCsgCgULwAZkDXBA3ealaAdgmYWoXlNZ0vtzfx9wzUhZ97NM19fSyeinw33NA1jKJmTzlePdZtaL40Cod8+BQGq2OLtIFBgcVVrlSTiMtDPXeHgy+ndDgYFkrPfZEBUb9cgA7H8X7M/B3m0o17QXNLvkjGRsx/OkJW+R2q8erWjW3fuLZlIJdyJcTmIewPl85QNV9r7X7UD2nVTYd4wweXTplpoZNuqf7osB6WEFD4xBw5IbdFG/b8rfMlENoKZQn01rISvYg42qNPcSzLFneRH0FWL/razR6QLh7KxvNLl2tLwsUrZD6oOJhHu3Gd88gLP5skRH3tnK4Je6Z/tBBwenGkvOnbYtHqL+Nb5DeFgMFK2wPSNBB9gYdu2zaNZg14QsvZfPl6r1ixH+NFCfms3nfBk4lSdEXcK1Y2X0tTLuZo0u8T0R3ZtKRN67AGApVZQrVI52W81GDANPHnGw64XA5RcaTODsWbSswGJCthguhsYJHjNGWwXXEJ0BSChYfjdsGKzB05Qb/M/swWGVSb8MwbMycNNGeG9uhse5EnC6qLShRUAWga5Xl1T/ScbddabEU42CbbkEX55W2DtFONAg87WZltToBZAFHV4rbBkYiDASLSzOPLYUAtgA6APFvkFD2HQAvBikjSQt1C036BdAKDt4EbSEbQwjIQNIM8BEXz5fJu3Zunqkt7basCuxthbZfOm7zPjNZgNt9v3OSYWXpgjHpxf655sB3Kjt0XEhLyDpMvrrBZVGqmadXlDbPo3QFLJUacOJYuhce+NXDu4z0nRY0hbDiTgu6oWxZmsi30sXIniJk0NUKDGK9Ooiwr+kEtGPhsQGCZEpH7NRQc7sv9PnlgzA0HNrZslKpgnxftKq0FCHZkAjYEl/AkxNWBKngo4aYWxdR7h8Qr5f3AJVKDF2H/FNnZHASSHgmz26FbCkv6kcoQrCVaMVpHsUiCAV+VLJyNoawEHtxz2tDLLZPT894OClI37oTTeXcoHRCaUdBbLvLrH2S3YzT481+CrA84CKJ2oc49feRHA1T176+vlBT8eGxSJ+PJgxc7ZjmRQ9+WiOEHMJ142WemYIibqRqyVYXs8qkyv9HoCvNptgK98/+rKD3S8CxVIrdy9+z8ioguoDBiOMePO1X9hQ6JkwFcuNQkns+UaJSpnx4V8iOC28QY+/6KFSBeIxaJVHuxoDo0k7sz1bIpwrETalq5hI9oxVfzadjP6dD3C+/B9gfn87g1zs3u2HHDz9/CIGjmY8OWhUjBlD4wpR8lWijq6wcyD4XW/ZQTBfqeJHbM5WGB9/W2sA/2yvp6k+0Qckoj6rNlaxdsYoe/8reV/6u3GsBKcdFtBqR0T/kU5EPqABzuZLLzPjklafXeq+n73s4JkXgFIXFDw2IdIMMBbh1vTdRgOqM0roNQwiN8TLpcEtC6dhfPK25gCLivbALtZUm4wDcQFYjCQdbh/ioDg1q3TwwIaUfSomwqFUInqpVOiK5QqVnK16yz854OCFg/LSLBSi6nFopBaJnXlkgtBHjCEb9WVDDgPDmiVao6zBBUR4+sztPsAvHmU89KwvOMn+KuDJfhuLsLZ7y/8kPFc+ArDEZndCwWYdROAShnLjmjKUZSqWetfJuJuk7Cxfx5XyszaoV9rQQtYkMD3TWYsjYwQ3ThgV6u1k7w11G1aRTJy1sEfJnBAOU5DPLOOzd/gA//wA49+3+/ZoAU8C9hIxRqoPSCeAlAG3zwc+2uEebIaYKQPTswqbByoYj9t3L5IbuZ5s2Z/NoB9/WWH/FOHY6QZ6cIM45nAQnbQxsVHpSIzRaGcvSPgpAViANTZvEazEEWDYswB8+QTjnTdKGA7hbJbx7YeBM1mgT8CNCqjsAxuHTpOR/Ve+kxfA2LE7JT6zF8vLcs2wfeOH2KUpVyh/3vP4i90vp9/CnuMKe15pbMlqxqJF700PkdYPJSKjkyvs9dEB8SEjhuy9IgUbAeuWrcC1m+aziVKF8cOngJdPCKA8n3KjQFxYdjRwMYZiuToZqzxzukjIVwnXj5T1S2PzUoq+QNl86dvM+JithjNFwtOTCk8+17zFeqF6fK2CijLWRHyvTzeX5gwBBUs7QrkSzSl6rLDW224A1gws3snOA4xnXvapt541a0NHKOynm3FKQN+JosLGlIeJpKR22LuI8B3K5sr3M/id9pr19+Fn9/sJZK3mFkn/Gy5ROjpj1IJwpfdcAVhin4U1e6ISARMDwLbrhAqbv0FHzzCeeInR5wCpuL/v9sneKy9gyG/czdrJMEVlSrmErcN2UzwI9GPK5MuP2U7mfmZS4YVX/Bjo8LWUGizS85p1hGSdE7+txTP6bqAOCRVrlajqS83XbwbecJnOs2252fwsQ6hZ2pFMRtl/ayG3gamy5cYWufFkUYLwCTeNWbZsEe2gbK70LAPXdTvI8PPTeYKA/OTu4L9GQFzCXzgwAKSGFIYc7spnKtgZdUgAFvelsOZrNwE3X946sOH5VD3Gjn2sbdkxAdmCgBVuX9yJ58oKVw1XkLSY50zAc7IHWzNyhAf96AEH+yehpelWrjVjhGiSMBZlcR51fIUBFoFKqFcMGrddD1w63hnAMpgn93uQUCRRmbQU3aWKFJ5gvgKcLilc2l/FSMye0UOMHZTJlU/bzBw0Az+dIzx3TGHHLn8PbHZt2KSgHMZ4N+qRsVYFrFnSUWXfFYPGO28ELptYCHClyrjnCeCJF32Hxi1XAnfcLFLy/Hu37w0ADqxYhoprHqpmE1zie9HLjxUUxpNVLWzZu2iasvnyLDN3s6yLjuexgw4OHAUOmbjoJUa++RKlY5bFc9TxFQZY2HPZ/+RngXe/Hrh87UKAv79DTJDzA99Fwn7PG+ff+8huD/kS0C/6cNwXtsRUaSNiUnawyRxhKAZcNmBPHyaiUk8Bzs4SnplSePw5P5uwfgsOC12XvE7BdRgjXfDnmr3ZWKvEHBkAfMfrgS3rFgL8Z//M+gUQsIxrUSTmP//Q/Hsf2OXp+/qTvtokurCoSyaeuuOXMnjwlRwhFSVcMWRPktYA94pFmwnvO6EgyWdPPOdLtDUvf92KXHKZ7z3qxLEvL4oSyVli8uTEQckOrPgClrxYuSLjzpsJV6xfCPBf/AvrPVrAMi+gWKw+5/thatf9z3g4XwAGk0DaOBsCn7D2NNZnQrSJ+NG8H30pgpa9S7Po3ghZ4UE+dUjh+DnCzr3zSy6E77lsi9KpJ+0ArM2QoRIe2lsURGr4rkDfW5QtAu97E+HKBgDf97RIyHMAS5ti4br9pvkA3/e0h5k8MBAALGZM0Yd1THUQ01XLoOhAljteJN3ONRbjtbSQ1Qs1qf4NFIqS/fjISWDfoSDZuq6myqVbFGLi/zXSQJ3tPaxpSfvakCFxVAFXEEuV1nsFYDFJGndghZErAO+/hXDVhsZC1oPPAruP+C/LdZuBt1+3UMj6wROM0xnGQMKn4Hk26SDHycRxmQS2dijxaIEQUaQzIWxdWk2ylSbabFCirkim4akZ4NmXfBDCe/DlW5SOvdJOBpNxv0ijJiPfUKuxVA0lgY0jvgAkL4BsCcb+fOm4sNcOSCsYw6GTrL1P2gccfKTfmTxr27b8XwcAhCxcbdhTMCUsOgJcPWSRRRM9JqbKHzH49mYA2fheFuSpIw7OFYCn9wRhPQHKW7YqXdhsIsicr0VfBB2HKdgYMgyI8vKsHwLeek17Viobc2Jm7J1iZIq+AaRmp24zlMcXsoArLAJMoPutOxtaWbTnjymcLRB27YcOr5Vr6xWkY5Q3JedaMKCaMknyjfEQyXeyzwqFFivAnW/ojkJbGfdi92SLjJ0HWbsXta06FAjQChXLnCbzhOE+xusG7TkctLPBtruw1YU6lSHsP62QLQC7DwJrxhWqirFloI5FByjXtuTQPlsTpMrAb79t+anXzFWo+Me7WEd6yN4sTgmTEtMKwBL8d7ygsDZZxXqLhg7tLrTt8G8VYHPfoWmF4znC0TMKmSrwun5PmwH9sjfBj9CebGpVihnSWKlyReBTv9KhA7ndAS9y/z1PeugPoj5MOE+rEZe5ih/ZIUaOIYuJ49rhbztkp5P1kr10+wEXB2cIG/s9DPbNVa+rUYnZi4N4ZpGShTVLPctMAfjM7Z0BfOgE4+cHgfN5YP0ocOtVrbkS6+f5b9s9DKUCCTtg1SbdpdmazJT8tJZrR+xmIOqQHdtBd80ms9j3UtTkP3dHMBpnbOpnQ8C1MoXmOSMxi+QqUq2w+Ewe+My72gf4wV2Me570JV/tpPB8gH7/DmDNYHsS93d/4gNcs3QFOnIrtmrRgUWWuGmNPQm6FnQnC7ccxo5WgL/72QgqHuPGCV4ArBG05Kdmz2UgN+sDfDYL/O672wN4aprxt/fMpaEIECacdt0w8Ad3tgfwPz3kYbQfWk/WwQFBWG0zgEWNFwl6oA/YMmgT4CBsVhY+ky/fDebfaAWEXt7zyAEHR2YUbpjwEHfnDCI1cg4iNLQLMGDPYj48m2kfYKHeR3b7QpGoNgZg8TzJnv4XH5bvWgf5Hx/0MNLvmzLDADdzRuSrUqlH6XoeaxIWPUnhwHebqSvdvABTM8CDByLYMMDYPNA4jNQYLjQQs5J240dBtsuif/A4Y9+UgMFatRGAhTMUSqT39N/eBmwYaR3gbz7oYTQNDKR8Z4REf7TibZJojlmPcMOo9bzhudQVm8ln3QAsz37vWVez5zdvDAEc+tUALM53EbBmAoA//c72WPR9TzFePsma2kR/FR1cABbqPZ8nfPhWYP1wewCPpIHBNgAWs6qwZynWstWigUPWcV7ymd6HLaWPdgvwzikHe04oXD/uYbjBIXnzKLgInAsAvqtNNen+ZxiTp1mrNkJtYkcWwU24grT5628mrG0DYM2iDcChPXgpFi2hOjNlhcstq0cL0kcDQctKAni3AIv/9vu7I7rK683rF7LpBQAXgDMZ4BPvaI+CJc/o2FnW3iHRW8UTJHu7ULAIbe+5mTAx1DoFf+thD8MCcEjIMtV7Gq2JCXqX6gLXj5XbCgRstsYNE8BtlXBo1nkr3+84pPDSGQc3rfMwUkfFJq9XVCRh0YaCP/QWQryFUFjTv0RonJzxU1I0BSs/+kMoeCbruwvHW1SVJL/p7sdYAyxStE5Oa6ImCfWeLYlwVcF4wm7aSsMSDraKsLQCYLN7ciXgnr0RXQfrzZt4XtEWDXCdFC37sGQoXLe5dYr72R4PJ87DZ9GBkGUo+FweeMd1tGRgfHgOzx1mPH+E9f4rAGtX4hIAy94r3iOXCNePlawmni1ahMVn03bKKDUDsJXv/++4g+eOKlw55mHT4NwT2oMU6MEiaIkeLFQsku8Nl0jUhqScNAf68X0eTmXmwm8MixbOIJXof/kawmj/0u3kZhn7p4Bdh31hTbPn4IURgBfLPJR0lUyZsGWwiuG4RdXIP1upcRklWcKVtkuHgfc8xg/3RFGsspaoE0G2gzZ0BA59baoUVSnvmxoF5GyBtIVL9nJxRsglViqxb+uEMskUjPvClXwkPEe8P1pNEs9UYB0TKpb2MtKelA4O0l5M6SVxKMjeLWqWBOJJW8LujbNBUk8bxWsVKuJYIKTlqAGL0Rtm7ZYshGarlGErFNrKPScyhAdecrXA9cYNfhlgk60gYMii66C6or93SuSGRD4KSKUKaVYuFK9LFjoCJOv9Viq362zBIM9Xx2OJqTJg/aYt+SltSx+Vqm9OlMu0pdNLg7YkXlpKOwi7X6x+R1lYc9Yv43PDSFn7j+1eTUoZSme2ipHaGviuowq7TzgYTTJuWucLI8Yebfbi2QBUne8rlBscpCXgGoAFZDE8SByVpj5x64XSQOV7aVf2YT8x3P+ISVTUJ+nLpLqatvTBXAElS1smrSVc+9Ksg6mwU2afNY9YZs26H6X+Ph13PxNe+wWbjK1ywrYAFl/rAy9FcSoHbB5kbBllDZpJKtPpoKGUUJGEBSShNh35EQiopui3T30+0Pr0tKDAmc4hDgQ4kw1hgJW/dX9BrrGpVGteGOEAus0glMcUSgvXddHFSSukzZGXWXTqh9e5pXLCWtiyVBDcFsiywD960UVmlnDNuIe16YCKg2o5RjfWe7MAEQBsYrfmFSM1Vd5DZYRN8W8twAVCnGlT/5T4MX34g++gNtXwxN+rSz0EFfG0V6pW8HRu9lKUVFyCUuXuqhH75Rq0nNFqQXDNpi2V9LcFsLQjqtOPX3Qhhca3jjHWpX1nhA7eC1ixYd36b3koFCigIx39lai5B8Phrvr2IGHcsHbNBYLgwHDYkC6FGDows1Yhvu5QD2nTgCv7vtTFsl2Lo7bG7ZT01yBbOpTDJsiZWeDhgxEtSIlDQth1GBQTqFeLugx1HsSm+1uVsOPQWQ4B7r7TKngpwjU9arFhcxWF5yrBm1LFQQeGLcvzx/KEfIV0wtq1wz0sDE70WDoReUujtV5U0bN5rI5NkCUT75EDEQjYw3HGNeNz0nWAT8jP2KDnYMZm4o1ipswLop9eysgUqsUVbsdUs9NV36OMa0Z7w5bN7Do6VkfvxRYPxrIJsuzJ2w9HcCLrn4N07bicUGazh87bkvpXx3JySAhhPCkCVaV3bNk3bHR2MJZM0fbRdp0vW+Mnxeu055QDqTa1cRDYNMAd17TsdmyyX5+UksEl2eMJW4aqGLPpwG/EjLo92k7vxZYPp+x2Ieufl1NOdr7i4lxRLEuMSwcYo6mFZxzZ7te0J3vtzKwvTMk5iAMxxpXDlR4YMRrOoLvDKX3J0v7xsrYXW3Rl8T7tOen4xUIjrIWwsYSd/N1G4xXVSYA9UyRUPKkeC1w+WMVo74qL1g3D0vGy0upqciUu9XJIwN6+0w4OTit9rI2rWLsb1yQZ6b7OSxKbPkVHlvMLZ2ZJq23i55LDpzcNVrE26fV0r62ft7UDogMq7tkR77apWdqrMuPwjMLhGQdydqI2TijW8dZyVKzYjyWoT2zBi1URFtYrOrcOrq+I98ePwxbmLwYNOdlsfdrDaHx5D7/S62X7iHdf4OKNVa4804t6Hr0A2bQpOvPRjIOTOYWzRd/VOFel3a9ma8yYNcNJrQSir0zJ/RHJXY5D25BFOhYz5cpcNO2Qe1MiQQ1OxVg4ouaO09AzuWLlDvb4XlsHRi/3AklJ4POzCjkpyD0rjgmlvUQV5uBsYXHC+6BHHKF01npsqo+RtFCcrdv5yoHQpOjOZMy9r9W22gJYGs3my3/FzH/UagcX77O3AkT016lE5I/babFtgJnZzRYqP7VdHa+dQV+Q9xLtSMXdtxJRW+kPbQMc7MfrPZR3MGPjBbnYyzxpIkwqRG5JJGiq3a47Alg68YPlK4++2oSudhdo5e+n6ajr3ionqHQylo4B9im59Ase6EFmbhCi3slwLj4TXgEiyivwOxKJ6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",Mn=me(59301),rn=({className:Gn,dataSource:Ht=[],col:Wt=4,right:Zt,bottom:yt=23,precision:un=0,wrapWidth:vn=1200,trackEventItems:At,loading:nt})=>{const on=Math.floor((vn-(Wt-1)*Zt)/Wt);return Mn.createElement(Fe.Z,{spinning:nt},Mn.createElement("div",{className:Mt()(Tt.list,Gn)},!!Ht.length&&Ht.map((fn,Jn)=>{const{subject_identifier:pn,id:Rt,identifier:In,power:Vn}=fn,Pi=fn.is_public!=0&&fn.is_public;return Mn.createElement("div",{className:Tt.wrap,key:Rt,style:{width:on,marginRight:(1+Jn)%Wt===0?0:Zt+un,marginBottom:yt}},Mn.createElement("a",{className:Tt.li,onClick:tn=>{tn.preventDefault(),At&&(0,Je.L9)([At]),(0,Je.xg)(fn.first_category_url)}},Mn.createElement("div",{className:Tt.top},Mn.createElement(je.Z,{title:fn.name},Mn.createElement("div",{className:Tt.name},fn.name)),Mn.createElement("img",{className:Tt.img,src:Xe.Z.IMG_SERVER+"/images/"+fn.avatar_url}),Mn.createElement("div",{className:Tt.text,title:fn.creator},fn.creator),pn&&Mn.createElement("div",{className:Tt.btns},Mn.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Mn.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Pi&&Mn.createElement("div",{className:Tt.sign},"\u516C\u5F00")),Mn.createElement("div",{className:Tt.bottom},fn.visits>0&&Mn.createElement(je.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},Mn.createElement("span",null,Mn.createElement("i",{className:"iconfont icon-liulanyan"}),Mn.createElement("span",null,fn.visits))),fn.course_members_count>0&&Mn.createElement(je.Z,{title:"\u6210\u5458",placement:"bottom"},Mn.createElement("span",null,Mn.createElement("i",{className:"iconfont icon-chengyuan"}),fn.course_members_count)),fn.tasks_count>0&&Mn.createElement(je.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Mn.createElement("span",null,Mn.createElement("i",{className:"iconfont icon-zuoye"}),fn.tasks_count)),fn.is_end?Mn.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):Mn.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!fn.is_accessible&&Mn.createElement("div",{className:Tt.lockWrap},Mn.createElement("img",{src:`${Xe.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Mn.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Ht.length&&Mn.createElement(et.Z,null)))},xn={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},Un=me(42203),sn=({dataSource:Gn=[],value:Ht,onChange:Wt,className:Zt,style:yt={},tabBarExtraContent:un})=>ue.createElement("div",{className:Mt()(xn.tabs,Zt),style:yt},ue.createElement("div",{className:xn.tabsWrap},Gn.map((vn,At)=>ue.createElement("aside",{className:xn.tab,onClick:()=>{Wt(vn.id),vn.link&&Un.history.push(vn.link)},key:At},ue.createElement("div",{className:Ht===vn.id?xn.active:""},vn.name),(vn==null?void 0:vn.resetCount)==null&&(vn==null?void 0:vn.total)!==void 0&&ue.createElement("span",null,"\uFF08",vn==null?void 0:vn.total,"\uFF09"),(vn==null?void 0:vn.resetCount)!==void 0&&(vn==null?void 0:vn.total)!==void 0&&ue.createElement(je.Z,{title:(vn==null?void 0:vn.tip)!=null?vn==null?void 0:vn.tip:""},ue.createElement("span",{style:{color:"#9096A3"}},"\uFF08",ue.createElement("span",{style:{color:"#000"}},vn==null?void 0:vn.resetCount),"/",ue.createElement("span",null,vn==null?void 0:vn.total),"\uFF09"))))),ue.createElement("div",{className:xn.tabBar},un)),ti=({className:Gn,style:Ht={},children:Wt})=>ue.createElement("div",{className:Mt()(Gn),style:Ht},Wt),gi={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},Pn=me(38854),Xt=me(20834);const Kt=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var rt=({sortValue:Gn,dropValue:Ht,className:Wt,onSort:Zt,onDrop:yt,dataSource:un=Kt})=>{var vn;return ue.createElement("div",{className:Mt()(gi.orderWrap,Wt)},ue.createElement(Pn.Z,{dropdownRender:()=>ue.createElement(Xt.default,null,un.map((At,nt)=>ue.createElement(Xt.default.Item,{key:nt,onClick:()=>yt(At.id)},At.name)))},ue.createElement("span",{className:gi.orderTextWrap},(vn=un.find(At=>Ht===At.id))==null?void 0:vn.name)),ue.createElement("span",{className:gi.orderIconWrap},ue.createElement("span",{className:gi.orderAsc},ue.createElement("i",{className:Gn==="asc"?`iconfont icon-sanjiaoxing-up font12 ${gi.cursorPointer} ${gi.active}`:`iconfont icon-sanjiaoxing-up font12 ${gi.cursorPointer}`,onClick:()=>Zt(Gn==="asc"?"desc":"asc")})),ue.createElement("span",{className:gi.orderDesc},ue.createElement("i",{className:Gn==="desc"?`iconfont icon-sanjiaoxing-down font12 ${gi.cursorPointer} ${gi.active}`:`iconfont icon-sanjiaoxing-down font12 ${gi.cursorPointer}`,onClick:()=>Zt(Gn==="asc"?"desc":"asc")}))))},Ue={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},$t=me(3113),Gt=Object.defineProperty,it=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,Pe=(Gn,Ht,Wt)=>Ht in Gn?Gt(Gn,Ht,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):Gn[Ht]=Wt,ye=(Gn,Ht)=>{for(var Wt in Ht||(Ht={}))at.call(Ht,Wt)&&Pe(Gn,Wt,Ht[Wt]);if(it)for(var Wt of it(Ht))Te.call(Ht,Wt)&&Pe(Gn,Wt,Ht[Wt]);return Gn},ke=(Gn,Ht)=>{var Wt={};for(var Zt in Gn)at.call(Gn,Zt)&&Ht.indexOf(Zt)<0&&(Wt[Zt]=Gn[Zt]);if(Gn!=null&&it)for(var Zt of it(Gn))Ht.indexOf(Zt)<0&&Te.call(Gn,Zt)&&(Wt[Zt]=Gn[Zt]);return Wt},$e=(Gn,Ht,Wt)=>new Promise((Zt,yt)=>{var un=nt=>{try{At(Wt.next(nt))}catch(on){yt(on)}},vn=nt=>{try{At(Wt.throw(nt))}catch(on){yt(on)}},At=nt=>nt.done?Zt(nt.value):Promise.resolve(nt.value).then(un,vn);At((Wt=Wt.apply(Gn,Ht)).next())}),vt=Gn=>{var Ht=Gn,{className:Wt,style:Zt,children:yt,loading:un=!1,openLoading:vn,onClick:At=()=>{},size:nt="middle",shape:on="round"}=Ht,fn=ke(Ht,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Jn,pn]=(0,ue.useState)(!1);return ue.createElement($t.ZP,ye({onClick:(0,Ct.throttle)(Rt=>$e(void 0,null,function*(){vn&&pn(!0);try{yield At(Rt)}catch(In){console.log("error",In)}vn&&pn(!1)}),2e3,{leading:!0,trailing:!1}),className:Mt()(Ue.btn,Ue[`${nt}-${on}`],Wt),style:Zt,size:nt,shape:on,loading:Jn||un},fn),yt)},an={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},en=({className:Gn,style:Ht,children:Wt=null,onClick:Zt,title:yt})=>ue.createElement("div",{className:Mt()(an.head,Gn),style:Ht},ue.createElement("span",{className:"primary-hover",onClick:Zt},ue.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),ue.createElement("b",{title:yt},yt),ue.createElement("div",{className:an.node},Wt)),wn={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},_n=({confirmShow:Gn=!0,confirmTitle:Ht,confirmClick:Wt,cancelShow:Zt=!0,cancelTitle:yt,cancelClick:un,className:vn,style:At,confirmLoading:nt=!1})=>ue.createElement("div",{className:Mt()(wn.btns,vn),style:At},Gn&&ue.createElement($t.ZP,{loading:nt,onClick:Wt,type:"primary",className:wn.confirm},Ht),Zt&&ue.createElement($t.ZP,{onClick:un,className:wn.cancel},yt)),Hn={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},Hi=({className:Gn,style:Ht={},LeftContent:Wt,children:Zt,RightContent:yt})=>ue.createElement("div",{className:Mt()(Hn.fixedBottom,Gn),style:Ht},ue.createElement("div",{className:Hn.wrap},ue.createElement("div",{className:Hn.left},Wt),ue.createElement("div",{className:Hn.center},Zt),ue.createElement("div",{className:Hn.right},yt))),_i={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},_r=({className:Gn,style:Ht={},dataSource:Wt=[]})=>ue.createElement("div",{className:Mt()(_i.crumbs,Gn),style:Ht},Wt.map((Zt,yt)=>yt<Wt.length-1?ue.createElement(ue.Fragment,{key:yt},Zt.path||Zt.onClick?ue.createElement("span",{className:_i.hover,onClick:Zt!=null&&Zt.onClick?Zt.onClick:()=>Un.history.push(Zt.path)},Zt.name):ue.createElement("span",null,Zt.name),ue.createElement("span",null,"\xA0",">","\xA0")):ue.createElement("span",{key:yt,style:{color:"#5F6368"}},Zt.name))),vi=me(31797),si=Object.defineProperty,fi=Object.defineProperties,Ui=Object.getOwnPropertyDescriptors,Fi=Object.getOwnPropertySymbols,ao=Object.prototype.hasOwnProperty,wr=Object.prototype.propertyIsEnumerable,Be=(Gn,Ht,Wt)=>Ht in Gn?si(Gn,Ht,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):Gn[Ht]=Wt,Xr=(Gn,Ht)=>{for(var Wt in Ht||(Ht={}))ao.call(Ht,Wt)&&Be(Gn,Wt,Ht[Wt]);if(Fi)for(var Wt of Fi(Ht))wr.call(Ht,Wt)&&Be(Gn,Wt,Ht[Wt]);return Gn},Hr=(Gn,Ht)=>fi(Gn,Ui(Ht)),jn=(Gn,Ht)=>{var Wt={};for(var Zt in Gn)ao.call(Gn,Zt)&&Ht.indexOf(Zt)<0&&(Wt[Zt]=Gn[Zt]);if(Gn!=null&&Fi)for(var Zt of Fi(Gn))Ht.indexOf(Zt)<0&&wr.call(Gn,Zt)&&(Wt[Zt]=Gn[Zt]);return Wt};const{Countdown:Li}=vi.default;var ji=Gn=>{var Ht=Gn,{onChange:Wt}=Ht,Zt=jn(Ht,["onChange"]);const[yt,un]=(0,ue.useState)(null);(0,ue.useEffect)(()=>{typeof yt=="number"&&yt>=0&&Wt(yt)},[yt]);const vn=At=>{const nt=Math.floor(At/1e3);un(nt)};return ue.createElement(Li,Hr(Xr({},Zt),{onChange:vn}))}},91300:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Re}});var ue=me(59301);function Re(Ze,ot){const We=(0,ue.useRef)();(0,ue.useEffect)(()=>{We.current=Ze}),(0,ue.useEffect)(()=>{function lt(){We.current()}if(ot!==null){let Me=setInterval(lt,ot);return()=>clearInterval(Me)}},[ot])}},38600:function(zn,En,me){"use strict";me.d(En,{h:function(){return ue}});var ue=(Re=>(Re[Re.NOMATCH=-1]="NOMATCH",Re[Re.OK=0]="OK",Re[Re.TIMEOUT=2]="TIMEOUT",Re[Re.PODFAILURE=3]="PODFAILURE",Re[Re.COMPILEFAILURE=4]="COMPILEFAILURE",Re[Re.EXECUTEFAILURE=5]="EXECUTEFAILURE",Re[Re.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",Re))(ue||{})},22267:function(zn,En,me){"use strict";me.d(En,{H7:function(){return te},MK:function(){return Ie},MU:function(){return Ye},X6:function(){return pt},bM:function(){return Ct},fi:function(){return ee},fu:function(){return Mt},n4:function(){return de},rX:function(){return wt},vl:function(){return se},zO:function(){return st}});var ue=me(70635),Re=Object.defineProperty,Ze=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,lt=(he,ve,be)=>ve in he?Re(he,ve,{enumerable:!0,configurable:!0,writable:!0,value:be}):he[ve]=be,Me=(he,ve)=>{for(var be in ve||(ve={}))ot.call(ve,be)&<(he,be,ve[be]);if(Ze)for(var be of Ze(ve))We.call(ve,be)&<(he,be,ve[be]);return he};function Mt(he,ve){return(0,ue.U2)(`myproblems/${he}.json`,Me({hidePopLogin:!0},ve||{}))}function Ct(he,ve){return(0,ue.v_)(`myproblems/${he}/code_submit.json`,ve)}function Ye(he,ve){return(0,ue.v_)(`myproblems/${he}/code_debug.json`,ve)}function st(he,ve){return ve.language&&(ve.language=encodeURIComponent(ve.language)),(0,ue.U2)(`myproblems/${he}/submit_records.json`,ve)}function pt(he){return(0,ue.U2)("myproblems/record_detail.json",{id:he})}function wt(he,ve){return(0,ue.U2)(`myproblems/${he}/result.json`,{mode:ve})}function Ie(he,ve){return(0,ue.v_)(`myproblems/${he}/add_notes.json`,ve)}function te(he,ve){return(0,ue.v_)(`myproblems/${he}/restore_initial_code.json`,ve)}function ee(he){return(0,ue.v_)(`myproblems/${he}/sync_code.json`)}function de(he,ve){return(0,ue.v_)(`myproblems/${he}/update_code.json`,ve)}function se(he,ve){return(0,ue.v_)(`discusses/${he}/plus.json`,ve)}},54675:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Ma}});var ue=me(59301),Re={flex_box_center:"flex_box_center___bZaL5",flex_space_between:"flex_space_between___oaJSq",flex_box_vertical_center:"flex_box_vertical_center____hsuP",flex_box_center_end:"flex_box_center_end___ZYbPQ",flex_box_column:"flex_box_column___nE_62",wrap:"wrap___ulhwR",left:"left___kyWln",title:"title___jsO1D",total:"total___GEhiU",list:"list___u9dBZ",name:"name___Wxggs",b:"b___Y15YO",r:"r___mKQoe",l:"l___uelFD",tag:"tag___Mpkbg",right:"right___mQ3dU",examName:"examName___Na1r8",t:"t___IgCWK",num:"num___CXI8j",topWarp:"topWarp___Kicpu",head:"head___jx3W8",so:"so___qYW7F",btn:"btn___EMJDz",content:"content___sHGsV",titleWrap:"titleWrap___I__GR",single:"single___K5iv9",analysis:"analysis___NoAuR",text:"text___xESW2",modalColumn:"modalColumn___I_tK_",modalRow:"modalRow___lyw_U",sup:"sup___HSz3Z",popover:"popover___kE8aI"},Ze=me(78241),ot=me(6848),We=me(43418),lt=me(88897),Me=me(8591),Mt=me(92832),Ct=me(28103),Ye=me(3113),st=me(25700),pt=me(95237),wt=me(60324),Ie=Object.defineProperty,te=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,se=(Qt,cn,Jt)=>cn in Qt?Ie(Qt,cn,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Qt[cn]=Jt,he=(Qt,cn)=>{for(var Jt in cn||(cn={}))ee.call(cn,Jt)&&se(Qt,Jt,cn[Jt]);if(te)for(var Jt of te(cn))de.call(cn,Jt)&&se(Qt,Jt,cn[Jt]);return Qt};const ve=Qt=>React.createElement("svg",he({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Qt),React.createElement("title",null,"\u7F16\u7EC4 6"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"#E4E6FD",width:34,height:34,rx:10}),React.createElement("g",{fillRule:"nonzero"},React.createElement("path",{d:"M13.808 11.448a.558.558 0 0 1 0 .788l-1.564 1.565a.558.558 0 1 1-.789-.79l1.564-1.563a.558.558 0 0 1 .79 0Zm9.882 2.462a.558.558 0 0 1-.789 0l-1.564-1.563a.558.558 0 1 1 .789-.789l1.564 1.564a.556.556 0 0 1 0 .788Z",fill:"#6678EB"}),React.createElement("path",{d:"M21.753 21.707a5.937 5.937 0 1 0-8.58.015l-.937.936a.558.558 0 1 0 .789.788l.995-.994a5.91 5.91 0 0 0 3.436 1.095c1.287 0 2.48-.41 3.452-1.106l.992.992a.558.558 0 1 0 .789-.789l-.936-.937Z",fill:"#6678EB"}),React.createElement("path",{d:"m20.858 18.95-3.024-1.745v-2.054a.558.558 0 1 0-1.117 0v2.351c0 .064.011.126.031.184a.551.551 0 0 0 .258.33l3.293 1.9a.557.557 0 0 0 .559-.966Z",fill:"#FFF"}))));var be="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTRFNkZEIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0iTTEzLjgwOCAxMS40NDhhLjU1OC41NTggMCAwIDEgMCAuNzg4bC0xLjU2NCAxLjU2NWEuNTU4LjU1OCAwIDEgMS0uNzg5LS43OWwxLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDAgMSAuNzkgMFptOS44ODIgMi40NjJhLjU1OC41NTggMCAwIDEtLjc4OSAwbC0xLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDEgMSAuNzg5LS43ODlsMS41NjQgMS41NjRhLjU1Ni41NTYgMCAwIDEgMCAuNzg4WiIgZmlsbD0iIzY2NzhFQiIvPjxwYXRoIGQ9Ik0yMS43NTMgMjEuNzA3YTUuOTM3IDUuOTM3IDAgMSAwLTguNTguMDE1bC0uOTM3LjkzNmEuNTU4LjU1OCAwIDEgMCAuNzg5Ljc4OGwuOTk1LS45OTRhNS45MSA1LjkxIDAgMCAwIDMuNDM2IDEuMDk1YzEuMjg3IDAgMi40OC0uNDEgMy40NTItMS4xMDZsLjk5Mi45OTJhLjU1OC41NTggMCAxIDAgLjc4OS0uNzg5bC0uOTM2LS45MzdaIiBmaWxsPSIjNjY3OEVCIi8+PHBhdGggZD0ibTIwLjg1OCAxOC45NS0zLjAyNC0xLjc0NXYtMi4wNTRhLjU1OC41NTggMCAxIDAtMS4xMTcgMHYyLjM1MWMwIC4wNjQuMDExLjEyNi4wMzEuMTg0YS41NTEuNTUxIDAgMCAwIC4yNTguMzNsMy4yOTMgMS45YS41NTcuNTU3IDAgMCAwIC41NTktLjk2NloiIGZpbGw9IiNGRkYiLz48L2c+PC9nPjwvc3ZnPg==",Ne=me(25711),Fe=me(42203),je=me(58130),ze=me(70635),Xe=Object.defineProperty,Je=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,bt=(Qt,cn,Jt)=>cn in Qt?Xe(Qt,cn,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Qt[cn]=Jt,et=(Qt,cn)=>{for(var Jt in cn||(cn={}))dt.call(cn,Jt)&&bt(Qt,Jt,cn[Jt]);if(Je)for(var Jt of Je(cn))He.call(cn,Jt)&&bt(Qt,Jt,cn[Jt]);return Qt};const It=Qt=>React.createElement("svg",et({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Qt),React.createElement("title",null,"\u7F16\u7EC4 12"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{width:34,height:34,rx:10,fill:"#EAF3F4"}),React.createElement("path",{d:"M25.905 15.37a.775.775 0 0 0-.626-.529l-4.814-.7-2.152-4.362a.776.776 0 0 0-1.392 0l-2.153 4.363-4.814.699a.775.775 0 0 0-.43 1.323l3.484 3.396-.823 4.794a.777.777 0 0 0 1.126.818l4.306-2.264 4.305 2.264a.778.778 0 0 0 .817-.059.777.777 0 0 0 .31-.759l-.823-4.794 3.483-3.396a.777.777 0 0 0 .196-.795Z",fill:"#21C0A6",fillRule:"nonzero"})));var xt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIgZmlsbD0iI0VBRjNGNCIvPjxwYXRoIGQ9Ik0yNS45MDUgMTUuMzdhLjc3NS43NzUgMCAwIDAtLjYyNi0uNTI5bC00LjgxNC0uNy0yLjE1Mi00LjM2MmEuNzc2Ljc3NiAwIDAgMC0xLjM5MiAwbC0yLjE1MyA0LjM2My00LjgxNC42OTlhLjc3NS43NzUgMCAwIDAtLjQzIDEuMzIzbDMuNDg0IDMuMzk2LS44MjMgNC43OTRhLjc3Ny43NzcgMCAwIDAgMS4xMjYuODE4bDQuMzA2LTIuMjY0IDQuMzA1IDIuMjY0YS43NzguNzc4IDAgMCAwIC44MTctLjA1OS43NzcuNzc3IDAgMCAwIC4zMS0uNzU5bC0uODIzLTQuNzk0IDMuNDgzLTMuMzk2YS43NzcuNzc3IDAgMCAwIC4xOTYtLjc5NVoiIGZpbGw9IiMyMUMwQTYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4=",Bt=Object.defineProperty,Ut=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,Ke=(Qt,cn,Jt)=>cn in Qt?Bt(Qt,cn,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Qt[cn]=Jt,Tt=(Qt,cn)=>{for(var Jt in cn||(cn={}))Nt.call(cn,Jt)&&Ke(Qt,Jt,cn[Jt]);if(Ut)for(var Jt of Ut(cn))qe.call(cn,Jt)&&Ke(Qt,Jt,cn[Jt]);return Qt};const Ln=Qt=>React.createElement("svg",Tt({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Qt),React.createElement("title",null,"\u9898\u76EE"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"#E7F3FF",width:34,height:34,rx:10}),React.createElement("g",{fill:"#4C6FFF",fillRule:"nonzero"},React.createElement("path",{d:"m23.719 13.325-4.098-3.94c-.097-.13-.225-.162-.355-.162-.129 0-.258.064-.387.161l-7.55 7.753c-.065.065-.098.162-.13.227l-1.032 5.427c-.033.194.032.323.16.484.13.13.227.162.389.162h.096l4.776-1.099c.097-.032.194-.064.258-.161l7.841-8.108c.194-.162.194-.517.033-.744h-.001Zm-8.1 8.044a.534.534 0 0 1-.386.162.56.56 0 0 1-.388-.162l-3-2.81c-.226-.194-.226-.517-.033-.743.194-.227.517-.227.743-.033l3 2.811c.259.226.291.55.065.776ZM17 22.92h6.844v1.055H17z"}))));var Mn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTdGM0ZGIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGw9IiM0QzZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0ibTIzLjcxOSAxMy4zMjUtNC4wOTgtMy45NGMtLjA5Ny0uMTMtLjIyNS0uMTYyLS4zNTUtLjE2Mi0uMTI5IDAtLjI1OC4wNjQtLjM4Ny4xNjFsLTcuNTUgNy43NTNjLS4wNjUuMDY1LS4wOTguMTYyLS4xMy4yMjdsLTEuMDMyIDUuNDI3Yy0uMDMzLjE5NC4wMzIuMzIzLjE2LjQ4NC4xMy4xMy4yMjcuMTYyLjM4OS4xNjJoLjA5Nmw0Ljc3Ni0xLjA5OWMuMDk3LS4wMzIuMTk0LS4wNjQuMjU4LS4xNjFsNy44NDEtOC4xMDhjLjE5NC0uMTYyLjE5NC0uNTE3LjAzMy0uNzQ0aC0uMDAxWm0tOC4xIDguMDQ0YS41MzQuNTM0IDAgMCAxLS4zODYuMTYyLjU2LjU2IDAgMCAxLS4zODgtLjE2MmwtMy0yLjgxYy0uMjI2LS4xOTQtLjIyNi0uNTE3LS4wMzMtLjc0My4xOTQtLjIyNy41MTctLjIyNy43NDMtLjAzM2wzIDIuODExYy4yNTkuMjI2LjI5MS41NS4wNjUuNzc2Wk0xNyAyMi45Mmg2Ljg0NHYxLjA1NUgxN3oiLz48L2c+PC9nPjwvc3ZnPg==",zt=me(13021),rn=me(24905),xn=me(23469),Un=me(49985),yn=me(86377),sn={wrap:"wrap___OIoOI",modal:"modal___Z3hfU",titleWrap:"titleWrap___aK3oG",required:"required___NHoO7",title:"title___uxb1R",colorGray:"colorGray___O8YPg",choiceWrap:"choiceWrap___t51sb",answer:"answer___vsBnh",activeAnswer:"activeAnswer___AJN4p",deleteIcon:"deleteIcon___WvOJZ",addIcon:"addIcon___UyeIs",editorWrap:"editorWrap___uqcFU",htmlWrap:"htmlWrap___GcBNL",radio:"radio___e8qQ5",color333:"color333___PLzVK",color999:"color999___v3EY0",fold:"fold___OfvPe",head:"head___EejYX",collapseWrapper:"collapseWrapper___sQyVD",panelHeader:"panelHeader___Ivicf",open:"open___aEOQE",close:"close___z4P5H",inputBorder:"inputBorder___ix67O",keywordTag:"keywordTag___iGx08",scoreByBlankRadio:"scoreByBlankRadio___Kwu7q"},Lt=me(59301),ti=Object.defineProperty,gi=Object.defineProperties,Pn=Object.getOwnPropertyDescriptors,Xt=Object.getOwnPropertySymbols,Kt=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,rt=(Qt,cn,Jt)=>cn in Qt?ti(Qt,cn,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Qt[cn]=Jt,Ue=(Qt,cn)=>{for(var Jt in cn||(cn={}))Kt.call(cn,Jt)&&rt(Qt,Jt,cn[Jt]);if(Xt)for(var Jt of Xt(cn))Ot.call(cn,Jt)&&rt(Qt,Jt,cn[Jt]);return Qt},$t=(Qt,cn)=>gi(Qt,Pn(cn)),Gt=(Qt,cn)=>{var Jt={};for(var dn in Qt)Kt.call(Qt,dn)&&cn.indexOf(dn)<0&&(Jt[dn]=Qt[dn]);if(Qt!=null&&Xt)for(var dn of Xt(Qt))cn.indexOf(dn)<0&&Ot.call(Qt,dn)&&(Jt[dn]=Qt[dn]);return Jt};const it=null,at=(Qt,cn)=>{var Jt=Qt,{globalSetting:dn,loading:xi,dispatch:tr,isEdit:yr,editData:vr}=Jt,br=Gt(Jt,["globalSetting","loading","dispatch","isEdit","editData"]);const[Lr,Mr]=(0,ue.useState)(""),[zr,Sr]=(0,ue.useState)(""),[Tr,ro]=(0,ue.useState)([]),[ia,da]=(0,ue.useState)(""),[ur,Go]=(0,ue.useState)(),[_t,Zn]=(0,ue.useState)(!1),[Fr,Ai]=(0,ue.useState)({}),[Ki,ir]=(0,ue.useState)([]);(0,ue.useEffect)(()=>{!vr||!yr||(Mr(vr==null?void 0:vr.name),Sr(vr==null?void 0:vr.analysis),Go(vr==null?void 0:vr.is_ordered),Ai(vr),Zn(!0))},[vr]),(0,ue.useEffect)(()=>{if(!_t)return;const wo=vr==null?void 0:vr.standard_answer.map(fr=>fr==null?void 0:fr.answer_text);ro(wo);const Cr=vr==null?void 0:vr.standard_answer.map(fr=>fr==null?void 0:fr.score);ir(Cr),Zn(!1)},[_t]),(0,ue.useImperativeHandle)(cn,()=>({onSave:no,Clear:Lo}));const no=()=>{let wo=[],Cr=!1;return Lr?(Tr.forEach((fr,Rr)=>{wo.push({position:Rr+1,answer_text:[],score:Ki[Rr]}),fr==null||fr.forEach((pa,Is)=>{wo[Rr].answer_text.push(pa),(!pa||!(0,je.eR)(pa,1e4))&&(da(`${Rr}-${Is}`),Me.ZP.info(pa?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),Cr=!0)})}),Cr?!1:(wo==null?void 0:wo.length)>20?(Me.ZP.warning("\u586B\u7A7A\u9898\u6807\u51C6\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A/\u4E0D\u80FD\u8D85\u8FC720\u4E2A\uFF01"),!1):{name:Lr,analysis:zr,standard_answers:wo,is_ordered:ur,downcase:Fr==null?void 0:Fr.downcase,no_space:Fr==null?void 0:Fr.no_space,use_blank_score:Fr==null?void 0:Fr.use_blank_score}):(Me.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},Lo=()=>{Mr(""),Sr(""),ro([]),Go(!1)},nr=(wo,Cr,fr)=>{const Rr=Tr.slice();if(Cr&&Rr.splice(wo,Cr),fr)for(let pa=0;pa<fr;pa++)Rr.splice(wo+pa,0,[""]);ro(Rr)},Zr=(wo,Cr,fr)=>{da("");let Rr=Tr.slice();Rr[wo][Cr]=fr,ro(Rr)},Mi=wo=>{let Cr=Tr.slice();Cr[wo]=[...Cr[wo],""],ro(Cr)},Ca=(wo,Cr)=>{let fr=Tr.slice();if(!fr[wo][Cr]){fr[wo]=fr[wo].filter((Rr,pa)=>pa!==Cr),ro(fr);return}We.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:sn.modal,onOk:()=>{fr[wo]=fr[wo].filter((Rr,pa)=>pa!==Cr),ro(fr)}})},Ja=wo=>{We.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:sn.modal,onOk:()=>{let Cr=Tr.slice();Cr=Tr.filter((fr,Rr)=>wo!==Rr),ro(Cr)}})};return Lt.createElement("section",{className:sn.wrap},Lt.createElement("p",{className:sn.titleWrap},Lt.createElement("span",{className:sn.required},"*"),Lt.createElement("span",{className:sn.title},"\u9898\u5E72\uFF1A")),Lt.createElement("div",null,Lt.createElement(Un.Z,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:Lr,onChange:wo=>Mr(wo),showNullButton:!0,onPlaceholderChange:nr})),Lt.createElement("div",{className:"mt20"},Tr.map((wo,Cr)=>Lt.createElement("div",{style:{display:"flex"}},Lt.createElement("div",{style:{flex:1}},Lt.createElement(yn.Z,{key:Cr,answers:wo,index:Cr,flex:1,is_md:!0,activeOptionErrorIndex:ia,onAnswerChange:Zr,addChildAnswer:Mi,deleteChildAnswer:Ca,deleteChildAnswermain:Ja})),Fr.use_blank_score&&Lt.createElement("div",{style:{display:"flex",alignItems:"center",width:"165px"}},Lt.createElement("span",{style:{color:"red",margin:"auto 5px auto 10px"}},"*"),"\u5206\u503C\uFF1A",Lt.createElement(lt.Z,{style:{width:"100px"},size:"large",defaultValue:Ki[Cr],onBlur:fr=>{Ki[Cr]=fr.target.value,ir([...Ki])}}))))),Lt.createElement("div",null,Lt.createElement(rn.default,{className:`${sn.color333} font14 mt20`,checked:Fr.use_blank_score,onChange:wo=>Ai($t(Ue({},Fr),{use_blank_score:wo.target.checked}))},"\u5224\u5206\u65F6\u6309\u7A7A\u7ED9\u5206"),Lt.createElement("span",{style:{color:"#999999",fontSize:"12px"}},"\uFF08\u9009\u4E2D\uFF0C\u5219\u9700\u8981\u8BBE\u7F6E\u6BCF\u7A7A\u5206\u503C\uFF0C\u5B66\u751F\u7B54\u6848\u5224\u5206\u65F6\u6309\u7A7A\u7ED9\u5206\uFF09")),Lt.createElement("div",null,Lt.createElement(rn.default,{className:`${sn.color333} font14 mt20`,checked:Fr.downcase,onChange:wo=>Ai($t(Ue({},Fr),{downcase:wo.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),Lt.createElement("div",null,Lt.createElement(rn.default,{className:`${sn.color333} font14 mt20`,checked:Fr.no_space,onChange:wo=>Ai($t(Ue({},Fr),{no_space:wo.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),Lt.createElement("div",{className:"mt20"},(Tr==null?void 0:Tr.length)>1&&Lt.createElement("span",null,Lt.createElement(rn.default,{checked:ur,onChange:wo=>Go(wo.target.checked),className:`${sn.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),Lt.createElement("span",{className:`${sn.color999} font12`},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),Lt.createElement("p",{className:sn.titleWrap},Lt.createElement("span",{className:sn.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),Lt.createElement(xn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:zr,onChange:wo=>Sr(wo)}))};var Te=(0,Fe.connect)(({loading:Qt,globalSetting:cn})=>({globalSetting:cn,loading:Qt.effects}),null,null,{forwardRef:!0})((0,ue.forwardRef)(at)),Pe=me(5112),ye=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable,Le=(Qt,cn)=>{var Jt={};for(var dn in Qt)ke.call(Qt,dn)&&cn.indexOf(dn)<0&&(Jt[dn]=Qt[dn]);if(Qt!=null&&ye)for(var dn of ye(Qt))cn.indexOf(dn)<0&&$e.call(Qt,dn)&&(Jt[dn]=Qt[dn]);return Jt};const vt=null,an=(Qt,cn)=>{var Jt=Qt,{globalSetting:dn,loading:xi,editData:tr,dispatch:yr,onRef:vr=()=>{},isEdit:br}=Jt,Lr=Le(Jt,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[Mr,zr]=(0,ue.useState)(),[Sr,Tr]=(0,ue.useState)(""),[ro,ia]=(0,ue.useState)("");(0,ue.useEffect)(()=>{if(!tr||!br)return;Tr(tr==null?void 0:tr.name),ia(tr==null?void 0:tr.analysis);const Go=tr==null?void 0:tr.choices.find(_t=>_t.is_answer);zr(Go.choice_text==="\u6B63\u786E"?"0":"1")},[tr]),(0,ue.useImperativeHandle)(cn,()=>({onSave:da,Clear:ur}));const da=()=>Sr?Mr?{name:Sr,choices:[{choice_text:"\u6B63\u786E",is_answer:Mr==="0"?1:0},{choice_text:"\u9519\u8BEF",is_answer:Mr==="1"?1:0}],analysis:ro}:(Me.ZP.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1):(Me.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1),ur=()=>{Tr(""),ia(""),zr("")};return ue.createElement("section",{className:sn.wrap},ue.createElement("p",{className:sn.titleWrap},ue.createElement("span",{className:sn.required},"*"),ue.createElement("span",{className:sn.title},"\u9898\u5E72\uFF1A")),ue.createElement(xn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Sr,onChange:Go=>Tr(Go)}),ue.createElement("p",{className:sn.titleWrap},ue.createElement("span",{className:sn.required},"*"),ue.createElement("span",{className:sn.title},"\u7B54\u6848\u9009\u9879\uFF1A",ue.createElement("span",{className:sn.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),ue.createElement(Pe.ZP.Group,{buttonStyle:"solid",value:Mr,onChange:Go=>zr(Go.target.value)},ue.createElement(Pe.ZP.Button,{value:"0",className:`${sn.radio} mr40`},"\u6B63\u786E"),ue.createElement(Pe.ZP.Button,{value:"1",className:sn.radio},"\u9519\u8BEF")),ue.createElement("p",{className:sn.titleWrap},ue.createElement("span",{className:sn.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),ue.createElement(xn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:ro,onChange:Go=>ia(Go)}))};var bn=(0,Fe.connect)(({loading:Qt,globalSetting:cn})=>({globalSetting:cn,loading:Qt.effects}),null,null,{forwardRef:!0})((0,ue.forwardRef)(an)),en=Object.getOwnPropertySymbols,wn=Object.prototype.hasOwnProperty,ai=Object.prototype.propertyIsEnumerable,_n=(Qt,cn)=>{var Jt={};for(var dn in Qt)wn.call(Qt,dn)&&cn.indexOf(dn)<0&&(Jt[dn]=Qt[dn]);if(Qt!=null&&en)for(var dn of en(Qt))cn.indexOf(dn)<0&&ai.call(Qt,dn)&&(Jt[dn]=Qt[dn]);return Jt};const Hn=null,wi=(Qt,cn)=>{var Jt=Qt,{globalSetting:dn,loading:xi,editData:tr,dispatch:yr,onRef:vr=()=>{},isEdit:br}=Jt,Lr=_n(Jt,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[Mr,zr]=(0,ue.useState)([]);(0,ue.useEffect)(()=>{var ia;if(!tr||!br)return;const da=(ia=tr==null?void 0:tr.shixun)==null?void 0:ia.challenges.map(ur=>({id:ur==null?void 0:ur.id,score:ur.score}));zr(da)},[tr]),(0,ue.useImperativeHandle)(cn,()=>({onSave:Sr,Clear:Tr}));const Sr=()=>({challenges:[...Mr]}),Tr=()=>{zr([])};console.log("editData--",tr);const ro=ia=>{var da,ur;return ue.createElement("div",null,(ur=(da=ia==null?void 0:ia.shixun)==null?void 0:da.challenges)==null?void 0:ur.map((Go,_t)=>{var Zn;return ue.createElement("div",{className:"c-grey-666 font14 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"15px"}},ue.createElement("div",null,ue.createElement("span",{className:"mr5"},"\u7B2C",_t+1,"\u5173"),ue.createElement(ot.Z,{key:_t,title:Go==null?void 0:Go.challenge_name},ue.createElement("span",null,(0,je.Pq)(Go==null?void 0:Go.challenge_name,44)))),ue.createElement("p",{style:{marginBottom:0}},ue.createElement("span",{className:sn.required},"*"),ue.createElement("span",{className:sn.title},"\u5206\u503C\uFF1A"),ue.createElement(lt.Z,{precision:1,min:1,max:100,className:sn.baseFormItem,style:{width:176},value:(Zn=Mr.find(Fr=>Fr.id===Go.id))==null?void 0:Zn.score,onChange:Fr=>{Mr.find(Ai=>Ai.id===Go.id).score=Fr,zr([...Mr])}})))}),ue.createElement("div",{style:{clear:"both"}}))};return ue.createElement("section",{className:sn.wrap},ue.createElement(Ne.Z,{style:{paddingRight:10},className:sn.titleHtml,value:`${tr==null?void 0:tr.position}\u3001${tr==null?void 0:tr.name}`}),ue.createElement("p",{style:{marginBottom:"10px",marginTop:"25px"}},ue.createElement("span",{className:sn.required},"*"),ue.createElement("span",{className:sn.title},"\u5173\u5361")),ro(tr))};var Hi=(0,Fe.connect)(({loading:Qt,globalSetting:cn})=>({globalSetting:cn,loading:Qt.effects}),null,null,{forwardRef:!0})((0,ue.forwardRef)(wi)),_i=Object.getOwnPropertySymbols,cr=Object.prototype.hasOwnProperty,_r=Object.prototype.propertyIsEnumerable,vi=(Qt,cn)=>{var Jt={};for(var dn in Qt)cr.call(Qt,dn)&&cn.indexOf(dn)<0&&(Jt[dn]=Qt[dn]);if(Qt!=null&&_i)for(var dn of _i(Qt))cn.indexOf(dn)<0&&_r.call(Qt,dn)&&(Jt[dn]=Qt[dn]);return Jt};const si=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],fi=(Qt,cn)=>{var Jt=Qt,{editData:dn,globalSetting:xi,loading:tr,dispatch:yr,onRef:vr=()=>{},isEdit:br}=Jt,Lr=vi(Jt,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[Mr,zr]=(0,ue.useState)([]),[Sr,Tr]=(0,ue.useState)(),[ro,ia]=(0,ue.useState)([]),[da,ur]=(0,ue.useState)(""),[Go,_t]=(0,ue.useState)("");(0,ue.useEffect)(()=>{zr(["","","",""])},[]),(0,ue.useEffect)(()=>{if(!dn||!br)return;ur(dn==null?void 0:dn.name),_t(dn==null?void 0:dn.analysis),zr(dn==null?void 0:dn.choices.map(Ki=>Ki.choice_text));const Ai=[];dn==null||dn.choices.map((Ki,ir)=>{Ki.is_answer&&Ai.push(ir)}),ia(Ai)},[dn]),(0,ue.useImperativeHandle)(cn,()=>({onSave:Zn,Clear:Fr}));const Zn=()=>{if(!da)return Me.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const Ai=Mr.findIndex(ir=>!ir);if(Ai>-1)return Me.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${si[Ai]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!ro.length)return Me.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if(ro.length<2)return Me.ZP.info("\u591A\u9009\u9898\u6700\u5C0F\u6B63\u786E\u9009\u9879\u4E3A2\u4E2A"),!1;const Ki=Mr.map((ir,no)=>({choice_text:ir,is_answer:ro.includes(no)?1:0}));return{name:da,choices:Ki,analysis:Go}},Fr=()=>{zr(["","","",""]),ur(""),_t(""),ia("")};return ue.createElement("section",{className:sn.wrap},ue.createElement("p",{className:sn.titleWrap},ue.createElement("span",{className:sn.required},"*"),ue.createElement("span",{className:sn.title},"\u9898\u5E72\uFF1A")),ue.createElement(xn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:da,onChange:Ai=>ur(Ai)}),ue.createElement("p",{className:sn.titleWrap},ue.createElement("span",{className:sn.required},"*"),ue.createElement("span",{className:sn.title},"\u7B54\u6848\u9009\u9879\uFF1A",ue.createElement("span",{className:sn.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Mr.map((Ai,Ki)=>ue.createElement("div",{className:sn.choiceWrap,key:Ki},ue.createElement(ot.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},ue.createElement("div",{className:`${sn.answer} ${ro.includes(Ki)?sn.activeAnswer:""}`,onClick:()=>{ro.includes(Ki)?ia(ro.filter(ir=>ir!==Ki)):ia([...ro,Ki])}},si[Ki])),ue.createElement("div",{className:sn.editorWrap},Sr===Ki?ue.createElement(xn.Z,{id:`single-question-option-${Ki}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Ai,onChange:ir=>{Mr[Ki]=ir,zr(Mr)}}):ue.createElement("div",{className:sn.htmlWrap,onClick:()=>Tr(Ki)},ue.createElement(Ne.Z,{value:Ai}))),Ki>1&&ue.createElement(ot.Z,{title:"\u5220\u9664"},ue.createElement("i",{className:`${sn.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{zr(Mr.filter((ir,no)=>no!==Ki)),ro.includes(Ki)?ia(ro.filter(ir=>ir!==Ki)):ia([...ro,Ki])}})),Ki<7&&Ki===Mr.length-1&&ue.createElement(ot.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},ue.createElement("i",{className:`${sn.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>zr([...Mr,""])})))),ue.createElement("p",{className:sn.titleWrap},ue.createElement("span",{className:sn.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),ue.createElement(xn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Go,onChange:Ai=>_t(Ai)}))};var Ui=(0,Fe.connect)(({loading:Qt,globalSetting:cn})=>({globalSetting:cn,loading:Qt.effects}),null,null,{forwardRef:!0})((0,ue.forwardRef)(fi)),Fi=Object.getOwnPropertySymbols,ao=Object.prototype.hasOwnProperty,wr=Object.prototype.propertyIsEnumerable,Be=(Qt,cn)=>{var Jt={};for(var dn in Qt)ao.call(Qt,dn)&&cn.indexOf(dn)<0&&(Jt[dn]=Qt[dn]);if(Qt!=null&&Fi)for(var dn of Fi(Qt))cn.indexOf(dn)<0&&wr.call(Qt,dn)&&(Jt[dn]=Qt[dn]);return Jt};const Xr=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Hr=(Qt,cn)=>{var Jt=Qt,{editData:dn,globalSetting:xi,loading:tr,dispatch:yr,onRef:vr=()=>{},isEdit:br}=Jt,Lr=Be(Jt,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[Mr,zr]=(0,ue.useState)([]),[Sr,Tr]=(0,ue.useState)(),[ro,ia]=(0,ue.useState)(),[da,ur]=(0,ue.useState)(""),[Go,_t]=(0,ue.useState)("");(0,ue.useEffect)(()=>{zr(["","","",""])},[]),(0,ue.useEffect)(()=>{!dn||!br||(ur(dn==null?void 0:dn.name),_t(dn==null?void 0:dn.analysis),zr(dn==null?void 0:dn.choices.map(Ai=>Ai.choice_text)),ia(dn==null?void 0:dn.choices.findIndex(Ai=>Ai.is_answer)))},[dn]),(0,ue.useImperativeHandle)(cn,()=>({onSave:Zn,Clear:Fr}));const Zn=()=>{if(!da)return Me.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const Ai=Mr.findIndex(ir=>!ir);if(Ai>-1)return Me.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${Xr[Ai]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(console.log("activeAnswer: ",ro),typeof ro!="number")return Me.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;const Ki=Mr.map((ir,no)=>({choice_text:ir,is_answer:ro===no?1:0}));return{name:da,choices:Ki,analysis:Go}},Fr=()=>{zr(["","","",""]),ur(""),_t(""),ia("")};return ue.createElement("section",{className:sn.wrap},ue.createElement("p",{className:sn.titleWrap},ue.createElement("span",{className:sn.required},"*"),ue.createElement("span",{className:sn.title},"\u9898\u5E72\uFF1A")),ue.createElement(xn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:da,onChange:Ai=>ur(Ai)}),ue.createElement("p",{className:sn.titleWrap},ue.createElement("span",{className:sn.required},"*"),ue.createElement("span",{className:sn.title},"\u7B54\u6848\u9009\u9879\uFF1A",ue.createElement("span",{className:sn.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Mr.map((Ai,Ki)=>ue.createElement("div",{className:sn.choiceWrap,key:Ki},ue.createElement(ot.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},ue.createElement("div",{className:`${sn.answer} ${ro===Ki?sn.activeAnswer:""}`,onClick:()=>ia(Ki)},Xr[Ki])),ue.createElement("div",{className:sn.editorWrap},Sr===Ki?ue.createElement(xn.Z,{id:`single-question-option-${Ki}`,watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Ai,onChange:ir=>{Mr[Ki]=ir,zr(Mr)}}):ue.createElement("div",{className:sn.htmlWrap,onClick:()=>Tr(Ki)},ue.createElement(Ne.Z,{value:Ai}))),Ki>1&&ue.createElement(ot.Z,{title:"\u5220\u9664"},ue.createElement("i",{className:`${sn.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{zr(Mr.filter((ir,no)=>no!==Ki)),Ki===ro&&ia(null)}})),Ki<7&&Ki===Mr.length-1&&ue.createElement(ot.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},ue.createElement("i",{className:`${sn.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>zr([...Mr,""])})))),ue.createElement("p",{className:sn.titleWrap},ue.createElement("span",{className:sn.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),ue.createElement(xn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Go,onChange:Ai=>_t(Ai)}))};var jn=(0,Fe.connect)(({loading:Qt,globalSetting:cn})=>({globalSetting:cn,loading:Qt.effects}),null,null,{forwardRef:!0})((0,ue.forwardRef)(Hr)),Li=me(12563),Wi=me(78673),ji=me(43604),Gn=me(86902),Ht=me(59301),Wt=Object.defineProperty,Zt=Object.defineProperties,yt=Object.getOwnPropertyDescriptors,un=Object.getOwnPropertySymbols,vn=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,nt=(Qt,cn,Jt)=>cn in Qt?Wt(Qt,cn,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Qt[cn]=Jt,on=(Qt,cn)=>{for(var Jt in cn||(cn={}))vn.call(cn,Jt)&&nt(Qt,Jt,cn[Jt]);if(un)for(var Jt of un(cn))At.call(cn,Jt)&&nt(Qt,Jt,cn[Jt]);return Qt},fn=(Qt,cn)=>Zt(Qt,yt(cn)),Jn=(Qt,cn)=>{var Jt={};for(var dn in Qt)vn.call(Qt,dn)&&cn.indexOf(dn)<0&&(Jt[dn]=Qt[dn]);if(Qt!=null&&un)for(var dn of un(Qt))cn.indexOf(dn)<0&&At.call(Qt,dn)&&(Jt[dn]=Qt[dn]);return Jt},pn=(Qt,cn,Jt)=>new Promise((dn,xi)=>{var tr=br=>{try{vr(Jt.next(br))}catch(Lr){xi(Lr)}},yr=br=>{try{vr(Jt.throw(br))}catch(Lr){xi(Lr)}},vr=br=>br.done?dn(br.value):Promise.resolve(br.value).then(tr,yr);vr((Jt=Jt.apply(Qt,cn)).next())});const Rt=Qt=>{if(!Qt)return!1;if(/^s*$/.test(Qt)||Qt.trim()===""){Me.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let cn=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return Qt==="|"?(Me.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},In=({value:Qt=[],onClose:cn})=>Ht.createElement(Li.default,{closable:!0,onClose:cn,className:sn.keywordTag},Ht.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},Qt.join(" \u6216 "))),Vn=(Qt,cn)=>{var Jt=Qt,{editData:dn,globalSetting:xi,loading:tr,dispatch:yr,onRef:vr=()=>{},isEdit:br}=Jt,Lr=Jn(Jt,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[Mr,zr]=(0,ue.useState)(""),[Sr,Tr]=(0,ue.useState)(""),[ro,ia]=(0,ue.useState)(""),[da,ur]=(0,ue.useState)(""),[Go]=Ze.default.useForm(),_t=Ze.default.useWatch("use_keywords",Go);(0,ue.useEffect)(()=>{var Ki;!dn||!br||(zr(dn==null?void 0:dn.name),Tr(dn==null?void 0:dn.analysis),ia((Ki=dn==null?void 0:dn.answer_texts)==null?void 0:Ki[0]),Go.setFieldsValue(on({},dn)))},[dn]),(0,ue.useImperativeHandle)(cn,()=>({onSave:Zn,Clear:Fr}));const Zn=()=>pn(void 0,null,function*(){if(!Mr)return Me.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield Go.validateFields()}catch(ir){Me.ZP.error(ir.errorFields[0].errors[0]);return}const Ki=Go.getFieldsValue();return console.log(Ki,"values"),on({name:Mr,answer_texts:[ro],analysis:Sr},Ki)}),Fr=()=>{zr(""),Tr(""),ia(""),Go.resetFields()},Ai=dn==null?void 0:dn.score;return Ht.createElement("section",{className:sn.wrap},Ht.createElement("p",{className:sn.titleWrap},Ht.createElement("span",{className:sn.required},"*"),Ht.createElement("span",{className:sn.title},"\u9898\u5E72\uFF1A")),Ht.createElement(xn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Mr,onChange:Ki=>zr(Ki)}),Ht.createElement("p",{className:sn.titleWrap},Ht.createElement("span",{className:sn.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),Ht.createElement(xn.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:ro,onChange:Ki=>ia(Ki)}),Ht.createElement("p",{className:sn.titleWrap},Ht.createElement("span",{className:sn.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),Ht.createElement(xn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Sr,onChange:Ki=>Tr(Ki)}),Ht.createElement(Ze.default,{form:Go,size:"large",onFinishFailed:Ki=>pn(void 0,null,function*(){var ir,no;Me.ZP.error(Ki.errorFields[0].errors[0]),Go.scrollToField((no=(ir=Ki==null?void 0:Ki.errorFields)==null?void 0:ir[0])==null?void 0:no.name,{behavior:"smooth",block:"center"})})},Ht.createElement(pt.Z,{align:"middle",className:"mb30 mt20"},Ht.createElement(Ze.default.Item,{noStyle:!0,name:"use_keywords",valuePropName:"checked"},Ht.createElement(Wi.Z,null)),Ht.createElement(ji.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),Ht.createElement(ji.Z,null,Ht.createElement(ot.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},Ht.createElement(Gn.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),_t&&Ht.createElement(Ze.default.List,{name:"keywords",rules:[{validator(Ki,ir){return ir!=null&&ir.length?(ir==null?void 0:ir.reduce((Lo,nr)=>Lo+nr.score,0))>parseFloat(Ai)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD"))}}]},(Ki,{add:ir,remove:no})=>Ht.createElement(Ht.Fragment,null,Ht.createElement("div",{className:"mb10"},"\u5173\u952E\u8BCD"),Ht.createElement(pt.Z,{align:"middle",className:"font14 mb30"},Ht.createElement(ji.Z,{flex:1},Ht.createElement(Mt.default,{value:da,onChange:Lo=>{ur(Lo.target.value)},maxLength:50,allowClear:!0,onPressEnter:Lo=>{var nr,Zr,Mi,Ca;const Ja=`${(nr=Lo.target)==null?void 0:nr.value}`,wo=(Mi=(Zr=Ja==null?void 0:Ja.split("|"))==null?void 0:Zr.filter(Rr=>!!Rr))==null?void 0:Mi.map(Rr=>Rr==null?void 0:Rr.trim()),Cr=Go.getFieldValue("keywords"),fr=((Ca=Cr==null?void 0:Cr.map(Rr=>Rr==null?void 0:Rr.keyword))==null?void 0:Ca.flat())||[];for(const Rr of wo)if(fr.includes(Rr)){Me.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}Rt(Ja)&&(ir({keyword:wo,score:1}),ur(""))},className:sn.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),Ht.createElement(ji.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Ki.map(Lo=>{var nr=Lo,{key:Zr,name:Mi}=nr,Ca=Jn(nr,["key","name"]);return Ht.createElement(pt.Z,{key:Zr,style:{marginRight:148}},Ht.createElement(ji.Z,{flex:1},Ht.createElement(pt.Z,{align:"middle",justify:"space-between"},Ht.createElement(Ze.default.Item,fn(on({},Ca),{name:[Mi,"keyword"]}),Ht.createElement(In,{onClose:()=>no(Mi)})),Ht.createElement(Ze.default.Item,fn(on({},Ca),{name:[Mi,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),Ht.createElement(lt.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))})))))};var Pi=(0,Fe.connect)(({loading:Qt,globalSetting:cn})=>({globalSetting:cn,loading:Qt.effects}),null,null,{forwardRef:!0})((0,ue.forwardRef)(Vn)),tn=me(36381),hn={wrap:"wrap___Cc0gS",deleteIcon:"deleteIcon___ebwMv",keywordTag:"keywordTag___lUfL5",questionTitleEditorWrap:"questionTitleEditorWrap___u9UgK",choiceWrap:"choiceWrap___VHsr3",choiceIndex:"choiceIndex___rsj9r",judgementIndex:"judgementIndex___fMm6E",setAnswerBtn:"setAnswerBtn___krVC9",activeAnswer:"activeAnswer___WiYo2",activeJudgementAnswer:"activeJudgementAnswer___M6iww",actionWrapper:"actionWrapper___oKI8_",addIcon:"addIcon___eMbGP",inputBorder:"inputBorder___ob_6x",placeholder:"placeholder___Vkwr4",blankWrapper:"blankWrapper____MZQ5",blankInput:"blankInput___ephwY",blankInputNumberWrapper:"blankInputNumberWrapper___C1UJS",addBtn:"addBtn___qRBpJ",blankIndex:"blankIndex___QsKgf",baseInputWrapper:"baseInputWrapper___juqCB",collapseWrapper:"collapseWrapper___kAXJ0",panelHeader:"panelHeader___hLTSe",open:"open___wWDjf",close:"close___XPTJ0",hide:"hide___VytUy"},Rn=me(37520),Oi=me(89378),Ii=Object.defineProperty,Si=Object.defineProperties,Ni=Object.getOwnPropertyDescriptors,Zi=Object.getOwnPropertySymbols,sr=Object.prototype.hasOwnProperty,Wr=Object.prototype.propertyIsEnumerable,li=(Qt,cn,Jt)=>cn in Qt?Ii(Qt,cn,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Qt[cn]=Jt,Vi=(Qt,cn)=>{for(var Jt in cn||(cn={}))sr.call(cn,Jt)&&li(Qt,Jt,cn[Jt]);if(Zi)for(var Jt of Zi(cn))Wr.call(cn,Jt)&&li(Qt,Jt,cn[Jt]);return Qt},vo=(Qt,cn)=>Si(Qt,Ni(cn)),Qr=(Qt,cn)=>{var Jt={};for(var dn in Qt)sr.call(Qt,dn)&&cn.indexOf(dn)<0&&(Jt[dn]=Qt[dn]);if(Qt!=null&&Zi)for(var dn of Zi(Qt))cn.indexOf(dn)<0&&Wr.call(Qt,dn)&&(Jt[dn]=Qt[dn]);return Jt};const Er=Qt=>{var cn=Qt,{value:Jt,onChange:dn,scrollId:xi}=cn,tr=Qr(cn,["value","onChange","scrollId"]);return ue.createElement("div",{id:xi||""},ue.createElement(xn.Z,vo(Vi({},tr),{defaultValue:Jt,onChange:(yr,vr)=>{vr!=null&&vr.length?dn(yr,vr):dn(yr)}})))},qt=({value:Qt,onChange:cn,placeholder:Jt,height:dn=140,isEdit:xi})=>xi?ue.createElement(xn.Z,{watch:!0,isFocus:!0,height:dn,placeholder:Jt,defaultValue:Qt,onChange:cn}):ue.createElement("div",{style:{cursor:"pointer"}},Qt?ue.createElement(Ne.Z,{className:hn.inputBorder,value:Qt}):ue.createElement("div",{className:`${hn.inputBorder} ${hn.placeholder}`},Jt));var pi=me(59301),pr=Object.defineProperty,qi=Object.defineProperties,$r=Object.getOwnPropertyDescriptors,Ar=Object.getOwnPropertySymbols,io=Object.prototype.hasOwnProperty,Kr=Object.prototype.propertyIsEnumerable,jr=(Qt,cn,Jt)=>cn in Qt?pr(Qt,cn,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Qt[cn]=Jt,yo=(Qt,cn)=>{for(var Jt in cn||(cn={}))io.call(cn,Jt)&&jr(Qt,Jt,cn[Jt]);if(Ar)for(var Jt of Ar(cn))Kr.call(cn,Jt)&&jr(Qt,Jt,cn[Jt]);return Qt},$n=(Qt,cn)=>qi(Qt,$r(cn)),Xo=(Qt,cn)=>{var Jt={};for(var dn in Qt)io.call(Qt,dn)&&cn.indexOf(dn)<0&&(Jt[dn]=Qt[dn]);if(Qt!=null&&Ar)for(var dn of Ar(Qt))cn.indexOf(dn)<0&&Kr.call(Qt,dn)&&(Jt[dn]=Qt[dn]);return Jt};const Kn=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Io=({value:Qt,onChange:cn,choiceTextKey:Jt,answerKey:dn,index:xi,isEdit:tr,setInputActive:yr,form:vr,choiceOptionsPath:br,allowChangeMode:Lr,showAddIcon:Mr,addItem:zr,deleteItem:Sr})=>{const Tr=(Qt==null?void 0:Qt[dn])===!0,ro=()=>{const da=vr.getFieldValue(br);vr.setFieldValue(br,da.map(ur=>$n(yo({},ur),{[dn]:!1})))},ia=()=>{Tr?cn($n(yo({},Qt),{[dn]:!1})):(Lr||ro(),cn($n(yo({},Qt),{[dn]:!0})))};return pi.createElement(pt.Z,{className:hn.choiceWrap,align:"middle",wrap:!1},pi.createElement(ji.Z,{onClick:ia,className:`${hn.choiceIndex} ${Tr?hn.activeAnswer:""}`},Kn[xi]),pi.createElement(ji.Z,{flex:1,className:`${hn.editorWrap} ml15`,onClick:yr},pi.createElement(qt,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:tr,value:Qt==null?void 0:Qt[Jt],onChange:da=>{cn($n(yo({},Qt),{[Jt]:da}))}})),pi.createElement(ji.Z,{flex:"0 0 auto",className:"ml15"},pi.createElement("div",{onClick:ia,className:`${hn.setAnswerBtn} ${Tr?hn.activeAnswer:""}`},Tr?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),pi.createElement(ji.Z,{className:hn.actionWrapper},pi.createElement(ot.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},pi.createElement(Rn.Z,{className:hn.addIcon,onClick:zr,style:{visibility:Mr?"visible":"hidden"}})),pi.createElement(ot.Z,{title:"\u5220\u9664"},pi.createElement(Oi.Z,{className:hn.deleteIcon,onClick:Sr,style:{visibility:xi>1?"visible":"hidden"}}))))},Jo=({questionTitlePlaceholder:Qt,titleKey:cn,choiceKey:Jt,analysisKey:dn,choiceTextKey:xi,answerKey:tr,choiceOptionsPath:yr,allowChangeMode:vr=!0,form:br,showAnalysis:Lr=!0})=>{const[Mr,zr]=(0,ue.useState)(),[Sr,Tr]=(0,ue.useState)(!1);return pi.createElement("div",{className:hn.wrap},pi.createElement("div",{className:hn.questionTitleEditorWrap},pi.createElement(Ze.default.Item,{label:"\u9898\u5E72",name:cn,labelCol:{span:24},rules:[{required:!0}]},pi.createElement(Er,{scrollId:Array.isArray(cn)?cn.join("_"):`${cn}`,watch:!0,height:140,placeholder:Qt}))),pi.createElement(Ze.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),pi.createElement(Ze.default.List,{name:Jt,rules:[{validator(ro,ia){const da=ia.some(Go=>Go[tr]),ur=ia.findIndex(Go=>{var _t;return((_t=Go[xi])==null?void 0:_t.length)<=0});return ur!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Kn[ur]}\u9009\u9879\u7684\u5185\u5BB9`)):da?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(ro,{add:ia,remove:da})=>pi.createElement("div",{id:Array.isArray(yr)?yr.join("_"):`${yr}`},ro.map((ur,Go)=>{var _t=ur,{key:Zn,name:Fr}=_t,Ai=Xo(_t,["key","name"]);const Ki=Mr===Zn,ir=()=>{zr(Zn)},no=Go<7&&Go===ro.length-1,Lo=()=>ia({[xi]:"",[tr]:0}),nr=()=>da(Fr);return pi.createElement(Ze.default.Item,$n(yo({},Ai),{key:Zn,name:Fr,noStyle:!0}),pi.createElement(Io,{choiceTextKey:xi,answerKey:tr,index:Go,isEdit:Ki,setInputActive:ir,form:br,choiceOptionsPath:yr,allowChangeMode:vr,showAddIcon:no,addItem:Lo,deleteItem:nr}))}),ro.length<8&&pi.createElement("div",{className:`${hn.addBtn} mb30`,onClick:()=>ia({[xi]:"",[tr]:0})},"\u6DFB\u52A0\u9009\u9879"))),Lr&&pi.createElement("div",{onClick:()=>Tr(!0)},pi.createElement(Ze.default.Item,{name:dn,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},pi.createElement(qt,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Sr}))))};var Yi=me(59301),ua=Object.defineProperty,Zo=Object.defineProperties,Dr=Object.getOwnPropertyDescriptors,Ir=Object.getOwnPropertySymbols,Do=Object.prototype.hasOwnProperty,_o=Object.prototype.propertyIsEnumerable,Ti=(Qt,cn,Jt)=>cn in Qt?ua(Qt,cn,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Qt[cn]=Jt,tt=(Qt,cn)=>{for(var Jt in cn||(cn={}))Do.call(cn,Jt)&&Ti(Qt,Jt,cn[Jt]);if(Ir)for(var Jt of Ir(cn))_o.call(cn,Jt)&&Ti(Qt,Jt,cn[Jt]);return Qt},jo=(Qt,cn)=>Zo(Qt,Dr(cn)),Ra=(Qt,cn)=>{var Jt={};for(var dn in Qt)Do.call(Qt,dn)&&cn.indexOf(dn)<0&&(Jt[dn]=Qt[dn]);if(Qt!=null&&Ir)for(var dn of Ir(Qt))cn.indexOf(dn)<0&&_o.call(Qt,dn)&&(Jt[dn]=Qt[dn]);return Jt};const $a=({value:Qt,onChange:cn})=>{const Jt=xi=>{We.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:hn.modal,onOk:()=>{const tr=[...Qt];tr.splice(xi,1),cn(tr)}})},dn=()=>{const xi=[...Qt];xi.push(""),cn(xi)};return Yi.createElement(pt.Z,{align:"middle",className:"ml20",gutter:[40,20]},Qt==null?void 0:Qt.map((xi,tr)=>Yi.createElement(ji.Z,{key:`${xi}_${tr}`,className:hn.blankWrapper},Yi.createElement(Mt.default,{className:hn.blankInput,defaultValue:xi,maxLength:1e3,onBlur:yr=>{const vr=[...Qt],br=yr.target.value.trim();vr[tr]=br,cn(vr)}}),Yi.createElement(ot.Z,{title:"\u5220\u9664"},Yi.createElement(Oi.Z,{className:hn.deleteIcon,style:{marginLeft:15,visibility:tr>0?"visible":"hidden"},onClick:()=>Jt(tr)})))),Yi.createElement(ji.Z,null,Yi.createElement("div",{className:`${hn.addBtn}`,onClick:()=>{dn()}},"\u65B0\u589E\u7B54\u6848")))},ls=({value:Qt=!0,onChange:cn})=>Yi.createElement(Wi.Z,{checked:!Qt,onChange:Jt=>{cn(!Jt)}}),Or="\u2581",xo=({questionTitlePlaceholder:Qt,form:cn,name:Jt,scoreByBlank:dn="use_blank_score",answerKey:xi,titleKey:tr="name",analysisKey:yr="analysis",isOrdered:vr="is_ordered"})=>{var br,Lr;const[Mr,zr]=(0,ue.useState)(!1),Sr=(Zn,Fr)=>{const Ai=Fr.line;let Ki=0;for(let no=0;no<Ai;no++)Ki+=Zn.getLine(no).split(Or).length-1;const ir=Zn.getLine(Ai).substring(0,Fr.ch);return Ki+=ir.split(Or).length-1,Ki},Tr=(Zn,Fr,Ai,Ki)=>{const ir=Zn.getRange(Fr.from,Fr.to);let no=0;if(Fr.text.forEach(Lo=>{no+=Lo.split(Or).length-1}),Fr.origin!=="setValue"){if(ir&&ir.indexOf(Or)!==-1){const Lo=ir.split(Or).length-1,nr=Sr(Zn,Fr.from);if(console.log(`\u5220\u9664${Lo}\u4E2A\uFF0C \u524D\u9762\u6709${nr}\u4E2A\uFF0C\u65B0\u589E${no}\u4E2A`),Lo>1){const Zr=Array.from({length:Lo},(Mi,Ca)=>nr+Ca);Ki(Zr)}else Ki(nr)}else if(no>0){const Lo=Sr(Zn,Fr.from);console.log(`\u65B0\u589E${no}\u4E2A\uFF0C\u4E4B\u524D\u6709${Lo}\u4E2A`),Ai(no,Lo)}}},ro=()=>{const Zn=cn.getFieldValue(["sub_item_banks",...xi]);cn.setFieldValue(["sub_item_banks",...xi],Zn==null?void 0:Zn.map((Fr,Ai)=>jo(tt({},Fr),{position:Ai+1})))},ia=(0,ue.useRef)(),da=(Zn,Fr)=>{for(let Ai=0;Ai<Zn;Ai++)ia.current({position:null,answer_text:[""]},Fr+Ai);ro()},ur=(0,ue.useRef)(),Go=Zn=>{ur.current(Zn),ro()},_t=(Lr=(br=cn.getFieldValue("sub_item_banks"))==null?void 0:br[xi==null?void 0:xi[0]])==null?void 0:Lr[xi==null?void 0:xi[1]];return Yi.createElement("div",{className:hn.wrap},Yi.createElement("div",{className:hn.questionTitleEditorWrap},Yi.createElement(Ze.default.Item,{label:"\u9898\u5E72",name:tr,labelCol:{span:24},rules:[{required:!0}]},Yi.createElement(Er,{scrollId:"name",watch:!0,height:140,placeholder:Qt,showNullButton:!0,onCMBeforeChange:(Zn,Fr)=>{Tr(Zn,Fr,da,Go)}}))),Yi.createElement(Ze.default.List,{name:xi,rules:[{validator(Zn,Fr){if((Fr==null?void 0:Fr.length)===0)return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const Ai of Fr){const{answer_text:Ki}=Ai||{};if(Ki!=null&&Ki.some(ir=>(ir==null?void 0:ir.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Zn,{add:Fr,remove:Ai},{errors:Ki})=>(ia.current=Fr,ur.current=Ai,Yi.createElement(Yi.Fragment,null,Yi.createElement(Ze.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Zn.map((ir,no)=>{var Lo=ir,{key:nr,name:Zr}=Lo,Mi=Ra(Lo,["key","name"]);return Yi.createElement(pt.Z,{className:"mb20",key:nr,align:"middle",wrap:!1},Yi.createElement(ji.Z,{flex:"0 0 auto",className:`${hn.blankIndex}`},"\u586B\u7A7A\u9879",no+1),Yi.createElement(ji.Z,{flex:1},Yi.createElement(pt.Z,{align:"top",justify:"space-between",wrap:!1},Yi.createElement(ji.Z,null,Yi.createElement(Ze.default.Item,jo(tt({},Mi),{name:[Zr,"answer_text"],noStyle:!0}),Yi.createElement($a,null))),(cn==null?void 0:cn.getFieldValue(["sub_item_banks",...dn]))&&Yi.createElement(ji.Z,{flex:"224px"},Yi.createElement(Ze.default.Item,jo(tt({},Mi),{name:[Zr,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:hn.blankInputNumberWrapper}),Yi.createElement(lt.Z,{className:hn.blankInput,min:.1,max:100,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),Yi.createElement(Ze.default.Item,jo(tt({},Mi),{name:[Zr,"position"],noStyle:!0}),Yi.createElement(Mt.default,{type:"hidden"}))))})))),Yi.createElement(pt.Z,{align:"middle"},Yi.createElement(Ze.default.Item,{name:[Jt,"downcase"],valuePropName:"checked"},Yi.createElement(Wi.Z,null)),Yi.createElement(ji.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),Yi.createElement(pt.Z,{align:"middle"},Yi.createElement(Ze.default.Item,{name:[Jt,"no_space"],valuePropName:"checked"},Yi.createElement(Wi.Z,null)),Yi.createElement(ji.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(_t==null?void 0:_t.length)>1&&Yi.createElement(pt.Z,{align:"middle",className:(_t==null?void 0:_t.length)>1?"mb30":`${hn.hide}`},Yi.createElement(Ze.default.Item,{name:vr},Yi.createElement(ls,null)),Yi.createElement(ji.Z,{className:"ml10"},"\u5141\u8BB8\u5B66\u751F\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7684\u987A\u5E8F\u4E0D\u4E00\u81F4")),Yi.createElement("div",{onClick:()=>zr(!0)},Yi.createElement(Ze.default.Item,{name:yr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Yi.createElement(qt,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Mr}))))};var na=Object.defineProperty,Da=Object.defineProperties,Ao=Object.getOwnPropertyDescriptors,Va=Object.getOwnPropertySymbols,Jr=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable,Eo=(Qt,cn,Jt)=>cn in Qt?na(Qt,cn,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Qt[cn]=Jt,ci=(Qt,cn)=>{for(var Jt in cn||(cn={}))Jr.call(cn,Jt)&&Eo(Qt,Jt,cn[Jt]);if(Va)for(var Jt of Va(cn))eo.call(cn,Jt)&&Eo(Qt,Jt,cn[Jt]);return Qt},xa=(Qt,cn)=>Da(Qt,Ao(cn)),za=(Qt,cn)=>{var Jt={};for(var dn in Qt)Jr.call(Qt,dn)&&cn.indexOf(dn)<0&&(Jt[dn]=Qt[dn]);if(Qt!=null&&Va)for(var dn of Va(Qt))cn.indexOf(dn)<0&&eo.call(Qt,dn)&&(Jt[dn]=Qt[dn]);return Jt};const xs={\u6B63\u786E:"T",\u9519\u8BEF:"F"},ho=({value:Qt,onChange:cn,form:Jt,choiceKey:dn})=>{const xi=(Qt==null?void 0:Qt.is_answer)===!0,tr=Qt==null?void 0:Qt.choice_text,yr=()=>{var vr;const br=(vr=Jt==null?void 0:Jt.getFieldValue(["sub_item_banks",...dn]))==null?void 0:vr.map(Lr=>({choice_text:Lr==null?void 0:Lr.choice_text,is_answer:!1}));Jt==null||Jt.setFieldValue(["sub_item_banks",...dn],br),cn(xa(ci({},Qt),{is_answer:!0}))};return ue.createElement(pt.Z,{className:hn.choiceWrap,align:"middle",wrap:!1},ue.createElement(ji.Z,{onClick:yr,className:`${hn.choiceIndex} ${hn.judgementIndex} ${xi?hn.activeAnswer:""}`},xs[tr]),ue.createElement(ji.Z,{flex:1,className:`${hn.editorWrap} ml15`},ue.createElement("div",{className:`${hn.inputBorder} ${hn.placeholder} ${xi?hn.activeJudgementAnswer:""}`},tr)),ue.createElement(ji.Z,{flex:"0 0 auto",className:"ml15"},ue.createElement("div",{onClick:yr,className:`${hn.setAnswerBtn} ${xi?hn.activeAnswer:""}`},xi?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},ca=({questionTitlePlaceholder:Qt,choiceKey:cn="choices",form:Jt,titleKey:dn="name",analysisKey:xi="analysis"})=>{const[tr,yr]=(0,ue.useState)(!1);return ue.createElement("div",{className:hn.wrap},ue.createElement("div",{className:hn.questionTitleEditorWrap},ue.createElement(Ze.default.Item,{label:"\u9898\u5E72",name:dn,labelCol:{span:24},rules:[{required:!0}]},ue.createElement(Er,{scrollId:"name",watch:!0,height:140,placeholder:Qt}))),ue.createElement(Ze.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},ue.createElement(Ze.default.List,{name:cn,rules:[{validator(vr,br){return br.some(Mr=>(Mr==null?void 0:Mr.is_answer)===!0)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},vr=>ue.createElement("div",{id:"choices"},vr.map(br=>{var Lr=br,{key:Mr,name:zr}=Lr,Sr=za(Lr,["key","name"]);return ue.createElement(Ze.default.Item,xa(ci({},Sr),{key:Mr,name:zr,noStyle:!0}),ue.createElement(ho,{form:Jt,choiceKey:cn}))})))),ue.createElement("div",{onClick:()=>yr(!0)},ue.createElement(Ze.default.Item,{name:xi,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ue.createElement(qt,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:tr}))))};var ja=Object.defineProperty,hs=Object.defineProperties,fs=Object.getOwnPropertyDescriptors,ll=Object.getOwnPropertySymbols,Ys=Object.prototype.hasOwnProperty,Bn=Object.prototype.propertyIsEnumerable,Es=(Qt,cn,Jt)=>cn in Qt?ja(Qt,cn,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Qt[cn]=Jt,Pl=(Qt,cn)=>{for(var Jt in cn||(cn={}))Ys.call(cn,Jt)&&Es(Qt,Jt,cn[Jt]);if(ll)for(var Jt of ll(cn))Bn.call(cn,Jt)&&Es(Qt,Jt,cn[Jt]);return Qt},Wl=(Qt,cn)=>hs(Qt,fs(cn)),Mo=(Qt,cn)=>{var Jt={};for(var dn in Qt)Ys.call(Qt,dn)&&cn.indexOf(dn)<0&&(Jt[dn]=Qt[dn]);if(Qt!=null&&ll)for(var dn of ll(Qt))cn.indexOf(dn)<0&&Bn.call(Qt,dn)&&(Jt[dn]=Qt[dn]);return Jt};const gl=Qt=>{var cn=Qt,{value:Jt,onChange:dn}=cn,xi=Mo(cn,["value","onChange"]);const tr=yr=>{dn([yr])};return ue.createElement(xn.Z,Wl(Pl({},xi),{defaultValue:Jt==null?void 0:Jt[0],onChange:tr}))},Tu=Qt=>{if(!Qt)return!1;let cn=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return Qt==="|"?(Me.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Ql=({value:Qt=[],onClose:cn})=>ue.createElement(Li.default,{closable:!0,onClose:cn,className:hn.keywordTag},Qt==null?void 0:Qt.join(" \u6216 ")),us=({questionTitlePlaceholder:Qt,form:cn,showKeywords:Jt,isMustKeyWords:dn=Jt,titleKey:xi="name",analysisKey:tr="analysis",answerTexts:yr="answer_texts",keywords:vr="keywords",useKeywords:br="use_keywords",indexs:Lr})=>{const[Mr,zr]=(0,ue.useState)(!1),[Sr,Tr]=(0,ue.useState)(""),ro=Ze.default.useWatch("sub_item_banks",cn),{use_keywords:ia,score:da}=(ro==null?void 0:ro[Lr])||{};return console.log(ia,da,"itemValues"),ue.createElement("div",{className:hn.wrap},ue.createElement("div",{className:hn.questionTitleEditorWrap},ue.createElement(Ze.default.Item,{label:"\u9898\u5E72",name:xi,labelCol:{span:24},rules:[{required:!0}]},ue.createElement(Er,{scrollId:"name",watch:!0,height:140,placeholder:Qt}))),ue.createElement(Ze.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:yr,labelCol:{span:24}},ue.createElement(gl,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),Jt&&!dn&&ue.createElement(Ze.default.Item,{hidden:!0,name:br,valuePropName:"checked"},ue.createElement(Wi.Z,{defaultChecked:!0})),Jt&&dn&&ue.createElement(pt.Z,{align:"middle",className:"mb30"},ue.createElement(Ze.default.Item,{name:br,valuePropName:"checked"},ue.createElement(Wi.Z,null)),ue.createElement(ji.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),ue.createElement(ji.Z,null,ue.createElement(ot.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},ue.createElement(Gn.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(ia||!dn)&&ue.createElement(Ze.default.List,{name:vr,rules:[{validator(ur,Go){return dn?Go!=null&&Go.length?(Go==null?void 0:Go.reduce((Zn,Fr)=>Zn+Fr.score,0))>parseFloat(da)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD")):Promise.resolve()}}]},(ur,{add:Go,remove:_t})=>ue.createElement(ue.Fragment,null,ue.createElement("div",{className:`${hn.title} mb10`},dn?"\u5173\u952E\u8BCD":ue.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),ue.createElement(pt.Z,{align:"middle",className:"font14 mb30"},ue.createElement(ji.Z,{flex:1},ue.createElement(Mt.default,{value:Sr,onChange:Zn=>{Tr(Zn.target.value)},maxLength:50,allowClear:!0,onPressEnter:Zn=>{var Fr,Ai,Ki,ir;const no=`${(Fr=Zn.target)==null?void 0:Fr.value}`,Lo=(Ki=(Ai=no==null?void 0:no.split("|"))==null?void 0:Ai.filter(Mi=>!!Mi))==null?void 0:Ki.map(Mi=>Mi==null?void 0:Mi.trim()),nr=cn.getFieldValue(["sub_item_banks",...vr]),Zr=((ir=nr==null?void 0:nr.map(Mi=>Mi==null?void 0:Mi.keyword))==null?void 0:ir.flat())||[];for(const Mi of Lo)if(Zr.includes(Mi)){Me.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}Tu(no)&&(Go({keyword:Lo,score:1}),Tr(""))},className:hn.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),ue.createElement(ji.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),ur.map(Zn=>{var Fr=Zn,{key:Ai,name:Ki}=Fr,ir=Mo(Fr,["key","name"]);return ue.createElement(pt.Z,{key:Ai,className:"mb20",style:{marginRight:148}},ue.createElement(ji.Z,{flex:1},ue.createElement(pt.Z,{align:"middle",justify:"space-between"},ue.createElement(Ze.default.Item,Wl(Pl({},ir),{name:[Ki,"keyword"]}),ue.createElement(Ql,{onClose:()=>_t(Ki)})),dn&&ue.createElement(Ze.default.Item,Wl(Pl({},ir),{name:[Ki,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:hn.blankInputNumberWrapper}),ue.createElement(lt.Z,{className:hn.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),ue.createElement("div",{onClick:()=>zr(!0)},ue.createElement(Ze.default.Item,{name:tr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ue.createElement(qt,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Mr}))))};var Sa=me(59301),Il=Object.defineProperty,Wo=Object.defineProperties,Ia=Object.getOwnPropertyDescriptors,aa=Object.getOwnPropertySymbols,or=Object.prototype.hasOwnProperty,_s=Object.prototype.propertyIsEnumerable,js=(Qt,cn,Jt)=>cn in Qt?Il(Qt,cn,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Qt[cn]=Jt,pl=(Qt,cn)=>{for(var Jt in cn||(cn={}))or.call(cn,Jt)&&js(Qt,Jt,cn[Jt]);if(aa)for(var Jt of aa(cn))_s.call(cn,Jt)&&js(Qt,Jt,cn[Jt]);return Qt},Xs=(Qt,cn)=>Wo(Qt,Ia(cn)),hu=(Qt,cn)=>{var Jt={};for(var dn in Qt)or.call(Qt,dn)&&cn.indexOf(dn)<0&&(Jt[dn]=Qt[dn]);if(Qt!=null&&aa)for(var dn of aa(Qt))cn.indexOf(dn)<0&&_s.call(Qt,dn)&&(Jt[dn]=Qt[dn]);return Jt},er=(Qt,cn,Jt)=>new Promise((dn,xi)=>{var tr=br=>{try{vr(Jt.next(br))}catch(Lr){xi(Lr)}},yr=br=>{try{vr(Jt.throw(br))}catch(Lr){xi(Lr)}},vr=br=>br.done?dn(br.value):Promise.resolve(br.value).then(tr,yr);vr((Jt=Jt.apply(Qt,cn)).next())});const{Panel:Ss}=tn.default,Ws=null,su=(Qt,cn)=>{var Jt=Qt,{globalSetting:dn,loading:xi,dispatch:tr,editData:yr,onRef:vr=()=>{},isEdit:br}=Jt,Lr=hu(Jt,["globalSetting","loading","dispatch","editData","onRef","isEdit"]);const[Mr,zr]=(0,ue.useState)(""),[Sr,Tr]=(0,ue.useState)([]),[ro]=Ze.default.useForm();(0,ue.useEffect)(()=>{!yr||!br||(zr(yr==null?void 0:yr.name),Tr(yr==null?void 0:yr.sub_item_banks),ro.setFieldsValue(pl({},yr)))},[yr]),(0,ue.useEffect)(()=>{Tr(ro.getFieldValue("sub_item_banks"))},[Ze.default.useWatch("sub_item_banks",ro)]),(0,ue.useImperativeHandle)(cn,()=>({onSave:ia,Clear:da}));const ia=()=>er(void 0,null,function*(){if(!Mr)return Me.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield ro.validateFields()}catch(Ai){return console.log(Ai,"errInfo"),Me.ZP.error(Ai.errorFields[0].errors[0]),!1}const Fr=Sr.map(Ai=>pl({id:Ai.id>1?Ai.id:null},Ai));return{name:Mr,sub_item_banks:Fr}}),da=()=>{zr(""),Tr([])},ur={single:"\u5355\u9009\u9898",multiple:"\u591A\u9009\u9898",judgement:"\u5224\u65AD\u9898",completion:"\u586B\u7A7A\u9898",subjective:"\u7B80\u7B54\u9898",practical:"\u5B9E\u8BAD\u9898",program:"\u7F16\u7A0B\u9898",bprogram:"\u7A0B\u5E8F\u586B\u7A7A\u9898",combination:"\u7EC4\u5408\u9898"},Go=({value:Fr})=>Sa.createElement("div",{style:{textAlign:"center",color:"#DF3065",margin:"0 5px"}},Fr),[_t,Zn]=(0,ue.useState)();return Sa.createElement("section",{className:sn.wrap},Sa.createElement("p",{className:sn.titleWrap},Sa.createElement("span",{className:sn.required},"*"),Sa.createElement("span",{className:sn.title},"\u9898\u5E72\uFF1A")),Sa.createElement(xn.Z,{id:"combination-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Mr,onChange:Fr=>zr(Fr)}),Sa.createElement(Ze.default,{form:ro,autoComplete:"off"},Sa.createElement(Ze.default.List,{name:"sub_item_banks",rules:[{validator(Fr,Ai){return Ai?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(Fr,{add:Ai,remove:Ki})=>{const ir=ro.getFieldValue("sub_item_banks");return Sa.createElement(Sa.Fragment,null,Sa.createElement(tn.default,{className:Fr.length>0?sn.collapseWrapper:"",bordered:!1,expandIcon:({isActive:no})=>Sa.createElement("i",{className:`iconfont icon-weizhankai ${no?sn.open:sn.close}`,style:{fontSize:14,transition:"all .2s"}})},Fr.map((no,Lo)=>{var nr=no,{key:Zr,name:Mi}=nr,Ca=hu(nr,["key","name"]),Ja,wo,Cr,fr,Rr,pa,Is,La,yl,Ea,Js,Ha;return Sa.createElement(Ss,{className:sn.panel,forceRender:!0,header:Sa.createElement("div",{className:sn.panelHeader},"\u7B2C",Lo+1,"\u5C0F\u9898",Sa.createElement("span",null,"\uFF08",ur[(Ja=ir==null?void 0:ir[Mi])==null?void 0:Ja.item_type],"\uFF09")),extra:Sa.createElement(pt.Z,{align:"middle",onClick:ts=>ts.stopPropagation(),style:{display:"flex",alignItems:"center"}},((wo=ir==null?void 0:ir[Mi])==null?void 0:wo.item_type)=="completion"&&Sa.createElement(Ze.default.Item,Xs(pl({},Ca),{name:[Mi,"score"],className:sn.blankInputNumberWrapper,style:{marginBottom:0}}),((Cr=ir==null?void 0:ir[Mi])==null?void 0:Cr.item_type)=="completion"&&Sa.createElement("div",{style:{display:"flex",alignItems:"center",color:"#191919"}},"\u5171",Sa.createElement(Go,{value:(fr=ir==null?void 0:ir[Mi])==null?void 0:fr.score}),"\u5206")),((Rr=ir==null?void 0:ir[Mi])==null?void 0:Rr.item_type)=="completion"&&Sa.createElement(Sa.Fragment,null,Sa.createElement(Pe.ZP.Group,{defaultValue:(pa=ir==null?void 0:ir[Mi])==null?void 0:pa.use_blank_score,className:sn.scoreByBlankRadio,style:{marginRight:10},optionType:"button",options:[{label:"\u6309\u7A7A\u7ED9\u5206",value:!0},{label:"\u6309\u9898\u7ED9\u5206",value:!1}],onChange:ts=>{var Ms;console.log(ro.getFieldsValue()),ro==null||ro.setFieldValue(["sub_item_banks",Mi,"use_blank_score"],(Ms=ts==null?void 0:ts.target)==null?void 0:Ms.value),Zn(new Date)}}),Sa.createElement(ot.Z,{overlayInnerStyle:{width:460},title:Sa.createElement("div",null,"\u6309\u7A7A\u7ED9\u5206\uFF1A\u9700\u8981\u5206\u522B\u8BBE\u7F6E\u6BCF\u4E2A\u586B\u7A7A\u9879\u7684\u5206\u503C\uFF0C\u586B\u7A7A\u9879\u7B54\u5BF9\u4E4B\u540E\u5219\u83B7\u5F97\u5BF9\u5E94\u7684\u5206\u503C\u3002",Sa.createElement("br",null),"\u6309\u9898\u7ED9\u5206\uFF1A\u7B54\u5BF9\u5168\u90E8\u586B\u7A7A\u9879\u4E4B\u540E\u624D\u80FD\u83B7\u5F97\u8BE5\u5C0F\u9898\u7684\u5206\u503C\u3002")},Sa.createElement("i",{className:"icon-tishixiaowenhao font18 c-3061d0"})))),key:Zr},Sa.createElement(Ze.default.Item,Xs(pl({},Ca),{name:Mi}),(((Is=ir==null?void 0:ir[Mi])==null?void 0:Is.item_type)=="single"||((La=ir==null?void 0:ir[Mi])==null?void 0:La.item_type)=="multiple")&&Sa.createElement(Jo,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((yl=ir==null?void 0:ir[Mi])==null?void 0:yl.item_type)!="single",form:ro,choiceKey:[Mi,"choices"],titleKey:[Mi,"name"],analysisKey:[Mi,"analysis"],choiceOptionsPath:["sub_item_banks",Mi,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((Ea=ir==null?void 0:ir[Mi])==null?void 0:Ea.item_type)=="completion"&&Sa.createElement(xo,{form:ro,name:Mi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:[Mi,"use_blank_score"],titleKey:[Mi,"name"],analysisKey:[Mi,"analysis"],isOrdered:[Mi,"is_ordered"],answerKey:[Mi,"standard_answer"],key:_t}),((Js=ir==null?void 0:ir[Mi])==null?void 0:Js.item_type)=="judgement"&&Sa.createElement(ca,{form:ro,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[Mi,"name"],analysisKey:[Mi,"analysis"],choiceKey:[Mi,"choices"]}),((Ha=ir==null?void 0:ir[Mi])==null?void 0:Ha.item_type)=="subjective"&&Sa.createElement(us,{showKeywords:!0,form:ro,titleKey:[Mi,"name"],analysisKey:[Mi,"analysis"],answerTexts:[Mi,"answer_texts"],useKeywords:[Mi,"use_keywords"],keywords:[Mi,"keywords"],indexs:Mi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})))})))};var fu=(0,Fe.connect)(({loading:Qt,globalSetting:cn})=>({globalSetting:cn,loading:Qt.effects}),null,null,{forwardRef:!0})((0,ue.forwardRef)(su)),lu=me(88477),Ru=({visible:Qt,onCancel:cn,onRandomExchange:Jt,selectFromProblemSet:dn,questionParams:xi})=>ue.createElement(We.default,{title:"\u8BF7\u9009\u62E9\u66FF\u6362\u65B9\u5F0F",open:Qt,onCancel:cn,centered:!0,maskClosable:!0,footer:null},ue.createElement(pt.Z,{justify:"center",className:"pb20"},ue.createElement(lu.Z,{onClick:Jt},"\u968F\u673A\u66F4\u6362"),(xi==null?void 0:xi.type)!=="PRACTICAL"&&ue.createElement(Ye.ZP,{style:{marginLeft:24},onClick:dn},"\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9"))),ul=me(94606),zs=me(26696),wl=me(24334),kn=me(48498),Tn=Object.defineProperty,Qn=Object.defineProperties,zi=Object.getOwnPropertyDescriptors,Xi=Object.getOwnPropertySymbols,$i=Object.prototype.hasOwnProperty,Ri=Object.prototype.propertyIsEnumerable,ri=(Qt,cn,Jt)=>cn in Qt?Tn(Qt,cn,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Qt[cn]=Jt,yi=(Qt,cn)=>{for(var Jt in cn||(cn={}))$i.call(cn,Jt)&&ri(Qt,Jt,cn[Jt]);if(Xi)for(var Jt of Xi(cn))Ri.call(cn,Jt)&&ri(Qt,Jt,cn[Jt]);return Qt},Ji=(Qt,cn)=>Qn(Qt,zi(cn)),mr=(Qt,cn,Jt)=>new Promise((dn,xi)=>{var tr=br=>{try{vr(Jt.next(br))}catch(Lr){xi(Lr)}},yr=br=>{try{vr(Jt.throw(br))}catch(Lr){xi(Lr)}},vr=br=>br.done?dn(br.value):Promise.resolve(br.value).then(tr,yr);vr((Jt=Jt.apply(Qt,cn)).next())}),Ma=({data:Qt,submit:cn,goBack:Jt,loading:dn,onTypeScore:xi,editPreview:tr=!1,onSkipExamination:yr,selectValue:vr,onExchange:br,handleMarkWrongQuestion:Lr})=>{var Mr,zr,Sr,Tr,ro,ia,da,ur,Go,_t,Zn;const Fr=(0,ue.useRef)(),[Ai,Ki]=(0,ue.useState)(null),[ir,no]=(0,ue.useState)(!1),[Lo,nr]=(0,ue.useState)(!1),Zr=(0,ue.useRef)(),[Mi]=Ze.default.useForm(),Ca=(0,Fe.useParams)(),[Ja,wo]=(0,ue.useState)(!1);(0,ue.useEffect)(()=>{no(!0)},[]),(0,ue.useEffect)(()=>{tr||(0,je.Dk)("\u8BD5\u5377\u9884\u89C8")},[tr]);const Cr=["\u5BB9\u6613","\u7B80\u5355","\u9002\u4E2D","\u56F0\u96BE"],fr=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Rr={SINGLE:"\u5355\u9009\u9898",MULTIPLE:"\u591A\u9009\u9898",JUDGMENT:"\u5224\u65AD\u9898",COMPLETION:"\u586B\u7A7A\u9898",SUBJECTIVE:"\u7B80\u7B54\u9898",PRACTICAL:"\u5B9E\u8BAD\u9898",PROGRAM:"\u7F16\u7A0B\u9898",BPROGRAM:"\u7A0B\u5E8F\u586B\u7A7A\u9898",COMBINATION:"\u7EC4\u5408\u9898"},pa={single:"\u5355\u9009\u9898",multiple:"\u591A\u9009\u9898",judgement:"\u5224\u65AD\u9898",completion:"\u586B\u7A7A\u9898",subjective:"\u7B80\u7B54\u9898",practical:"\u5B9E\u8BAD\u9898",program:"\u7F16\u7A0B\u9898",bprogram:"\u7A0B\u5E8F\u586B\u7A7A\u9898",combination:"\u7EC4\u5408\u9898"},Is=mi=>{var Co;const Za=[];return ue.createElement(ue.Fragment,null,ue.createElement("aside",{className:Re.single},(Co=mi==null?void 0:mi.choices)==null?void 0:Co.map((Gr,Nr)=>(Gr.is_answer&&Za.push(fr[Nr]),ue.createElement("ul",{key:Nr},ue.createElement("li",null,fr[Nr],"\u3001"),ue.createElement("li",null,ue.createElement(Ne.Z,{value:Gr.choice_text})))))),ue.createElement("div",{className:Re.analysis},ue.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",Za.join(""),ue.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",Cr[mi.difficulty])),ue.createElement("aside",null,ue.createElement("span",{className:Re.text},"\u89E3\u6790:"),ue.createElement(Ne.Z,{value:mi.analysis?mi.analysis:"\u6682\u65E0\u89E3\u6790"})),ue.createElement("ul",null,ue.createElement("li",null,ue.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(mi==null?void 0:mi.discipline_name)||"--"}/${mi==null?void 0:mi.sub_discipline_name}`),ue.createElement(ot.Z,{title:mi==null?void 0:mi.tag_discipline_name},ue.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ue.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),mi==null?void 0:mi.tag_discipline_name)))))},La=(mi,Co)=>{var Za;const Gr=(Za=mi==null?void 0:mi.standard_answer)==null?void 0:Za.map((Nr,gs)=>{var Os;return ue.createElement("div",{key:gs},`\u7B54\u6848\uFF08\u586B\u7A7A${Nr==null?void 0:Nr.position}\uFF09\uFF1A${(Os=Nr==null?void 0:Nr.answer_text)==null?void 0:Os.join("\u3001")}`)});return ue.createElement(ue.Fragment,null,ue.createElement("div",{className:Re.analysis},ue.createElement("div",{style:{display:"flex"}},ue.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),ue.createElement("div",null,Gr)),ue.createElement("aside",null,ue.createElement("span",{className:Re.text},"\u89E3\u6790:"),ue.createElement(Ne.Z,{value:mi.analysis?mi.analysis:"\u6682\u65E0\u89E3\u6790"})),ue.createElement("ul",null,ue.createElement("li",null,ue.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),Co?`${(Co==null?void 0:Co.discipline_name)||"--"}/${Co==null?void 0:Co.sub_discipline_name}`:`${(mi==null?void 0:mi.discipline_name)||"--"}/${mi==null?void 0:mi.sub_discipline_name}`),ue.createElement(ot.Z,{title:Co?Co==null?void 0:Co.tag_discipline_name:mi==null?void 0:mi.tag_discipline_name},ue.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ue.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Co?Co==null?void 0:Co.tag_discipline_name:mi==null?void 0:mi.tag_discipline_name)))))},yl=mi=>{var Co;const Za=(Co=mi==null?void 0:mi.standard_answer)==null?void 0:Co.map((Gr,Nr)=>ue.createElement("div",{key:Nr},`\u7B54\u6848\uFF08\u586B\u7A7A${(Gr==null?void 0:Gr.position)||(Gr==null?void 0:Gr.exercise_choice_id)}\uFF09\uFF1A${Gr==null?void 0:Gr.answer_text}`));return ue.createElement(ue.Fragment,null,ue.createElement("div",{className:Re.analysis},ue.createElement("div",{style:{display:"flex"}},ue.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),ue.createElement("div",null,Za)),ue.createElement("aside",null,ue.createElement("span",{className:Re.text},"\u89E3\u6790:"),ue.createElement(Ne.Z,{value:mi.analysis?mi.analysis:"\u6682\u65E0\u89E3\u6790"})),ue.createElement("ul",null,ue.createElement("li",null,ue.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(mi==null?void 0:mi.discipline_name)||"--"}/${mi==null?void 0:mi.sub_discipline_name}`),ue.createElement(ot.Z,{title:mi==null?void 0:mi.tag_discipline_name},ue.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ue.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),mi==null?void 0:mi.tag_discipline_name)))))},Ea=(mi,Co)=>{var Za;return ue.createElement("div",{className:Re.analysis},ue.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",(Za=mi==null?void 0:mi.answer_texts)==null?void 0:Za[0]),ue.createElement("aside",null,ue.createElement("span",{className:Re.text},"\u89E3\u6790:"),ue.createElement(Ne.Z,{value:mi.analysis?mi.analysis:"\u6682\u65E0\u89E3\u6790"})),ue.createElement("ul",null,ue.createElement("li",null,ue.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),Co?`${(Co==null?void 0:Co.discipline_name)||"--"}/${Co==null?void 0:Co.sub_discipline_name}`:`${(mi==null?void 0:mi.discipline_name)||"--"}/${mi==null?void 0:mi.sub_discipline_name}`),ue.createElement(ot.Z,{title:Co?Co==null?void 0:Co.tag_discipline_name:mi==null?void 0:mi.tag_discipline_name},ue.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ue.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Co?Co==null?void 0:Co.tag_discipline_name:mi==null?void 0:mi.tag_discipline_name))))},Js=mi=>{var Co,Za;return ue.createElement("div",{className:Re.analysis},ue.createElement("aside",null,ue.createElement("span",{className:Re.text},"\u9884\u671F\u8F93\u51FA:"),ue.createElement(Ne.Z,{value:(Co=mi==null?void 0:mi.program_attr)==null?void 0:Co.description})),ue.createElement("div",{style:{marginTop:20}},"\u6B63\u786E\u7B54\u6848\uFF1A",((Za=mi==null?void 0:mi.program_attr)==null?void 0:Za.answer_text)||"--"),ue.createElement("aside",null,ue.createElement("span",{className:Re.text},"\u89E3\u6790:"),ue.createElement(Ne.Z,{value:mi.analysis?mi.analysis:"\u6682\u65E0\u89E3\u6790"})),ue.createElement("ul",null,ue.createElement("li",null,ue.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(mi==null?void 0:mi.discipline_name)||"--"}/${mi==null?void 0:mi.sub_discipline_name}`),ue.createElement(ot.Z,{title:mi==null?void 0:mi.tag_discipline_name},ue.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ue.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),mi==null?void 0:mi.tag_discipline_name))))},Ha=(mi,Co)=>{var Za;return ue.createElement("div",null,(Za=mi==null?void 0:mi.sub_item_banks)==null?void 0:Za.map((Gr,Nr)=>{var gs,Os;const cl=[];return ue.createElement(ue.Fragment,null,ue.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333",paddingTop:"15px"}},Co+1+"."+(Nr+1),"\uFF08",Rr[Gr.item_type]||pa[Gr.item_type],"\uFF09",Gr.name),(Gr.item_type=="SINGLE"||Gr.item_type=="MULTIPLE"||Gr.item_type=="JUDGMENT"||Gr.item_type=="single"||Gr.item_type=="multiple"||Gr.item_type=="judgement")&&ue.createElement(ue.Fragment,null,ue.createElement("aside",{className:Re.single},(gs=Gr==null?void 0:Gr.choices)==null?void 0:gs.map((ba,el)=>(ba.is_answer&&cl.push(fr[el]),ue.createElement("ul",{key:el},ue.createElement("li",null,fr[el],"\u3001"),ue.createElement("li",null,ue.createElement(Ne.Z,{value:ba.choice_text})))))),ue.createElement("div",{className:Re.analysis},ue.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",cl.join(""),ue.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",Cr[Gr.difficulty])),ue.createElement("aside",null,ue.createElement("span",{className:Re.text},"\u89E3\u6790:"),ue.createElement(Ne.Z,{value:Gr.analysis?Gr.analysis:"\u6682\u65E0\u89E3\u6790"})),ue.createElement("ul",null,ue.createElement("li",null,ue.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(mi==null?void 0:mi.discipline_name)||"--"}/${mi==null?void 0:mi.sub_discipline_name}`),ue.createElement(ot.Z,{title:mi==null?void 0:mi.tag_discipline_name},ue.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ue.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),mi==null?void 0:mi.tag_discipline_name))))),(Gr.item_type=="COMPLETION"||Gr.item_type=="completion")&&La(Gr,mi),(Gr.item_type=="SUBJECTIVE"||Gr.item_type=="subjective")&&Ea(Gr,mi),((Os=Qt==null?void 0:Qt.exam)==null?void 0:Os.exercise_status)===3&&ue.createElement(kn.Z,{className:"mt20",state:Gr==null?void 0:Gr.is_wrong,onClick:()=>{Lr==null||Lr({value:Ji(yi({},Gr),{question_id:Gr==null?void 0:Gr.id,question_score:Gr==null?void 0:Gr.score})})}}))}))},ts=mi=>{var Co,Za,Gr;return ue.createElement("div",{style:{marginTop:"12px"}},(Za=(Co=mi==null?void 0:mi.shixun)==null?void 0:Co.challenges)==null?void 0:Za.map((Nr,gs)=>ue.createElement("div",{className:"c-grey-666 font14 mb10 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},ue.createElement("div",null,ue.createElement("span",{className:"mr5"},"\u7B2C",gs+1,"\u5173"),ue.createElement(ot.Z,{key:gs,title:Nr==null?void 0:Nr.challenge_name},ue.createElement("span",null,(0,je.Pq)(Nr==null?void 0:Nr.challenge_name,44)))),tr&&ue.createElement("div",null,"\u5206\u503C\uFF1A",Nr.score,"\u5206"))),ue.createElement(Fe.Link,{style:{float:"right"},target:"_blank",to:`/shixuns/${(Gr=mi==null?void 0:mi.shixun)==null?void 0:Gr.identifier}/challenges`},"\u5B9E\u8BAD\u8BE6\u60C5"),ue.createElement("div",{style:{clear:"both"}}))},Ms=mi=>{let Co=mi.questions_score/mi.questions_count;We.default.confirm({icon:null,centered:!0,title:"\u5206\u6570\u8BBE\u7F6E",content:ue.createElement("div",{className:Re.modalColumn},ue.createElement("div",{className:Re.modalRow,style:{justifyContent:"flex-start"}},ue.createElement("sup",{className:Re.sup},"*"),ue.createElement("span",null,mi==null?void 0:mi.name,"\uFF1A"),ue.createElement(lt.Z,{min:0,precision:1,defaultValue:Co,onChange:Za=>{Co=Za}}),ue.createElement("span",{className:"ml5"},"\u5206/\u9898"))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>mr(void 0,null,function*(){var Za;if(!Co)return Me.ZP.warning("\u5206\u6570\u4E0D\u80FD\u4E3A\u7A7A\u6216\u4E3A0"),Promise.reject();const Gr={type:mi==null?void 0:mi.type,score:Co,scoreTotal:Number((Za=Co*mi.questions_count)==null?void 0:Za.toFixed(1))};xi(Gr)})})},Rs=()=>{let mi="";We.default.confirm({icon:null,centered:!0,title:"\u4FDD\u5B58\u8BD5\u5377",content:ue.createElement("div",{className:Re.modalColumn},ue.createElement("div",{style:{color:"#676A6C",display:"flex",alignItems:"center"},className:"font14 mt20"},ue.createElement("img",{style:{marginRight:5},src:zt.Z}),"\u4FDD\u5B58\u540E\u5355\u72EC\u751F\u6210\u4E00\u4EFD\u4EBA\u5DE5\u7EC4\u5377\u7C7B\u578B\u7684\u56FA\u5B9A\u8BD5\u5377\u3002"),ue.createElement("div",{className:Re.modalRow,style:{marginTop:20}},ue.createElement("sup",{className:Re.sup},"*"),ue.createElement("span",{style:{flexShrink:0}},"\u8BD5\u5377\u540D\u79F0\uFF1A"),ue.createElement(Mt.default,{placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",min:0,maxLength:60,defaultValue:mi,onChange:Co=>{mi=Co.target.value}}))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>mr(void 0,null,function*(){var Co;if(!mi)return Me.ZP.warning("\u8BD5\u5377\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const Za=[],Gr=[],Nr=[],gs=[];(Co=Qt==null?void 0:Qt.questionList)==null||Co.forEach(cl=>{var ba;(ba=cl.questions)==null||ba.forEach(el=>{let ps=cl.questions_score/cl.questions_count;ps=ps&&ps.toFixed(1),cl.type==="COMBINATION"&&Nr.push({id:el.id,sub_item_bank_ids:el.sub_item_banks.map(Vl=>Vl.id)}),cl.type==="PRACTICAL"?gs.push(el.id):(Za.push(el.id),Gr.push(ps))})}),console.log("-----",Nr),yield cn({item_bank_ids:Za,item_bank_scores:Gr,name:mi,combination_item_banks:Nr,shixun_ids:gs})})})},ns=(mi,Co,Za,Gr)=>{var Nr;const gs=`${location.pathname}${location.search}`,Os=(Nr=Gr.questions)==null?void 0:Nr.map(cl=>cl==null?void 0:cl.id);if(gs.includes("exercise"))Zr.current={id:mi,ids:Os,type:Co,index:Za},nr(!0);else{let cl=We.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u8981\u66F4\u6362\u8BE5\u8BD5\u9898\u5417\uFF1F",cancelButtonProps:{disabled:!1},maskClosable:!0,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>mr(void 0,null,function*(){cl.update({cancelButtonProps:{disabled:!0}}),yield br({single_question_id:mi,seleted_item_bank_ids:Os},{type:Co,index:Za}),cl.update({cancelButtonProps:{disabled:!1}}),Me.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u8BD5\u9898")})})}},Kc=mi=>{var Co;const Za=(Co=mi.questions)==null?void 0:Co.map(gs=>gs==null?void 0:gs.id),Gr=mi.name;let Nr=We.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:`\u786E\u8BA4\u66F4\u6362${Gr}\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F`,cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>mr(void 0,null,function*(){Nr.update({cancelButtonProps:{disabled:!0}}),yield br({seleted_item_bank_ids:Za},{type:mi.type}),Nr.update({cancelButtonProps:{disabled:!1}}),Me.ZP.success(`\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210${Gr}\u8BD5\u9898`)})})},Qo=()=>{let mi=We.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u66F4\u6362\u9884\u89C8\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>mr(void 0,null,function*(){mi.update({cancelButtonProps:{disabled:!0}}),yield br(),mi.update({cancelButtonProps:{disabled:!1}}),Me.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u6574\u5F20\u8BD5\u9898")})})},Rd=mi=>{console.log(mi,"key"),yr(mi-1)},Ua=(mi,Co)=>{var Za,Gr;if(Co==="SINGLE")return ue.createElement(ue.Fragment,null,ue.createElement(jn,{ref:Fr,editData:mi,isEdit:!0}),ue.createElement(Ct.Z,null));if(Co==="MULTIPLE")return ue.createElement(ue.Fragment,null,ue.createElement(Ui,{ref:Fr,editData:mi,isEdit:!0}),ue.createElement(Ct.Z,null));if(Co==="JUDGMENT")return ue.createElement(ue.Fragment,null,ue.createElement(bn,{ref:Fr,editData:mi,isEdit:!0}),ue.createElement(Ct.Z,null));if(Co==="COMPLETION")return ue.createElement(ue.Fragment,null,ue.createElement(Te,{ref:Fr,editData:mi,isEdit:!0}),ue.createElement(Ct.Z,null));if(Co==="SUBJECTIVE")return ue.createElement(ue.Fragment,null,ue.createElement(Pi,{ref:Fr,editData:mi,isEdit:!0}),ue.createElement(Ct.Z,null));if(Co==="COMBINATION")return ue.createElement(ue.Fragment,null,ue.createElement(fu,{ref:Fr,editData:mi,isEdit:!0}),ue.createElement(Ct.Z,null));if(Co==="BPROGRAM")return ue.createElement(ue.Fragment,null,ue.createElement(Ze.default,{form:Mi,style:{marginTop:20},onFinishFailed:Nr=>{var gs,Os;Nr.errorFields[0].name.includes("standard_answers")?Me.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):Me.ZP.error(Nr.errorFields[0].errors[0]),Mi.scrollToField((Os=(gs=Nr==null?void 0:Nr.errorFields)==null?void 0:gs[0])==null?void 0:Os.name,{behavior:"smooth",block:"center"})},onFinish:Nr=>mr(void 0,null,function*(){var gs;let Os=Ji(yi({question_score:mi.score},Nr),{question_type:8,hack:Ji(yi({},Nr.hack),{difficult:mi.program_attr.difficult}),hack_codes:Ji(yi({},Nr.hack_codes),{code:wl.Base64.encode((gs=Nr.hack_codes)==null?void 0:gs.code)})});Ja&&(Os.is_cover=1);const cl=yield(0,ze.ZP)(`/api/exercise_questions/${mi.id}.json`,{method:"put",body:Os});(cl==null?void 0:cl.status)===0&&(Me.ZP.success("\u7F16\u8F91\u6210\u529F"),Rd(vr+1)),Ki(null)})},ue.createElement(zs.tc,{form:Mi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,hackidentifier:(Za=mi==null?void 0:mi.program_attr)==null?void 0:Za.identifier,answerKey:"standard_answers"}),ue.createElement(Ct.Z,null)));if(Co==="PROGRAM"&&Fe.history.push(`/problems/${(Gr=mi==null?void 0:mi.program_attr)==null?void 0:Gr.identifier}/edit?type=exercises&express_id=${Ca.categoryId}&question_id=${mi==null?void 0:mi.id}&score=${mi==null?void 0:mi.score}&callback_url=${location.pathname}&select=${vr}&exercise=true`),Co==="PRACTICAL")return ue.createElement(ue.Fragment,null,ue.createElement(Hi,{ref:Fr,editData:mi,isEdit:!0}),ue.createElement(Ct.Z,null))},Th=(mi,Co)=>mr(void 0,null,function*(){var Za,Gr,Nr,gs,Os,cl;const ba=yield(Za=Fr.current)==null?void 0:Za.onSave();if(!ba)return;const el=ra=>{const Cu=ra.map(ql=>ql.choice_text.trim().replace(/^\s+|\s+$/g,""));return new Set(Cu).size!==Cu.length},ps={question_score:Co.score,analysis:ba.analysis};if(mi==="SINGLE"||mi==="MULTIPLE"||mi==="JUDGMENT"){if(mi!=="JUDGMENT"&&el(ba==null?void 0:ba.choices)){Me.ZP.error("\u9009\u62E9\u9898\u9009\u9879\u5185\u5BB9\u4E0D\u80FD\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58");return}const ra=[],Cu=[];ps.question_type=mi==="JUDGMENT"?2:1,ps.question_title=ba==null?void 0:ba.name,(Gr=ba==null?void 0:ba.choices)==null||Gr.forEach((bu,ql)=>{ra.push(bu.choice_text),bu!=null&&bu.is_answer&&Cu.push(ql+1)}),ps.question_choices=ra,ps.standard_answers=Cu}if(mi==="COMPLETION"){let ra=(Nr=ba==null?void 0:ba.standard_answers)==null?void 0:Nr.map((ql,Cl)=>(ql==null?void 0:ql.score)<=0?Cl+1:null).filter(ql=>ql!==null);if((ra==null?void 0:ra.length)>0)return Me.ZP.warning(`\u7B2C${ra.join("\u3001")}\u9879\u7684\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A`),!1;let Cu=(gs=ba==null?void 0:ba.standard_answers)==null?void 0:gs.reduce((ql,Cl)=>ql+(Number(Cl==null?void 0:Cl.score)||0),0);if(parseFloat(Cu.toFixed(2))!=(ps==null?void 0:ps.question_score))return Me.ZP.warning("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01"),!1;ps.is_ordered=ba.is_ordered,ps.question_title=ba==null?void 0:ba.name,ps.use_blank_score=ba==null?void 0:ba.use_blank_score,ps.question_type=3;const bu=[];(Os=ba==null?void 0:ba.standard_answers)==null||Os.forEach((ql,Cl)=>{bu.push({choice_id:ql.position,answer_text:ql.answer_text,score:ql.score})}),ps.standard_answers=bu,ps.downcase=ba==null?void 0:ba.downcase,ps.no_space=ba==null?void 0:ba.no_space}if(mi==="SUBJECTIVE"&&(console.log("editorData"),console.log(ba),ps.question_title=ba==null?void 0:ba.name,ps.question_type=4,ps.answer_texts=ba==null?void 0:ba.answer_texts,ps.use_keywords=ba==null?void 0:ba.use_keywords,ps.keywords=ba==null?void 0:ba.keywords),mi==="COMBINATION"){ps.question_title=ba==null?void 0:ba.name,ps.question_type=7;try{ps.sub_questions=(cl=ba==null?void 0:ba.sub_item_banks)==null?void 0:cl.map((ra,Cu)=>{var bu,ql,Cl;if((ra==null?void 0:ra.item_type)=="single"||(ra==null?void 0:ra.item_type)=="multiple"){if(el(ra==null?void 0:ra.choices))throw new Error(`\u7B2C${Cu+1}\u5C0F\u9898\u9009\u9879\u5185\u5BB9\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58`);const uc=[],Md=[];return(bu=ra==null?void 0:ra.choices)==null||bu.forEach((ft,St)=>{uc.push(ft.choice_text),ft!=null&&ft.is_answer&&Md.push(St+1)}),{id:ra.id,question_id:ra.id,question_title:ra.name,difficulty:ra.difficulty,question_type:(ra==null?void 0:ra.item_type)=="single"?0:(ra==null?void 0:ra.item_type)=="multiple"?1:2,question_choices:uc,standard_answers:Md,analysis:ra.analysis,question_score:ra==null?void 0:ra.score}}else if((ra==null?void 0:ra.item_type)=="completion"){let uc=(ql=ra==null?void 0:ra.standard_answer)==null?void 0:ql.reduce((ft,St)=>ft+(Number(St==null?void 0:St.score)||0),0);if(parseFloat(uc.toFixed(2))!=(ra==null?void 0:ra.score))throw new Error("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01");const Md=[];return(Cl=ra==null?void 0:ra.standard_answer)==null||Cl.forEach((ft,St)=>{Md.push({choice_id:ft.position,answer_text:ft.answer_text,score:ft.score})}),{id:ra.id,question_id:ra.id,is_ordered:ra.is_ordered,question_title:ra.name,difficulty:ra.difficulty,question_type:3,standard_answers:Md,use_blank_score:ra.use_blank_score,analysis:ra.analysis,downcase:ra==null?void 0:ra.downcase,no_space:ra==null?void 0:ra.no_space,question_score:ra==null?void 0:ra.score}}else if((ra==null?void 0:ra.item_type)=="subjective")return{id:ra.id,question_id:ra.id,question_title:ra.name,question_type:4,difficulty:ra.difficulty,answer_texts:ra==null?void 0:ra.answer_texts,analysis:ra.analysis,question_score:ra==null?void 0:ra.score,use_keywords:ra.use_keywords,keywords:ra==null?void 0:ra.keywords}})}catch(ra){Me.ZP.warning(ra.message);return}delete ps.analysis}let Vl=!1;(Co==null?void 0:Co.is_my)===1&&(Vl=yield new Promise((Cu,bu)=>{We.default.confirm({title:"\u63D0\u793A",content:"\u6B64\u9898\u76EE\u5DF2\u5B58\u5728\u4E8E\u8BD5\u9898\u5E93\uFF0C\u662F\u5426\u5C06\u4FEE\u6539\u540E\u7684\u9898\u76EE\u8986\u76D6\u8BD5\u9898\u5E93\u7684\u539F\u9898\uFF1F",okText:"\u8986\u76D6\u539F\u9898",cancelText:"\u4E0D\u8986\u76D6",keyboard:!1,onOk:()=>{Cu(!0)},onCancel:()=>{Cu(!1)}})})),Vl&&(ps.is_cover=1);const lc=mi!=="PRACTICAL"?yield(0,ze.ZP)(`/api/exercise_questions/${Co.id}.json`,{method:"put",body:ps}):yield(0,ze.ZP)(`/api/exercise_questions/${Co.id}/update_shixun_score.json`,{method:"post",body:yi({},ba)});(lc==null?void 0:lc.status)===0&&(Me.ZP.success("\u7F16\u8F91\u6210\u529F"),Rd(vr+1),Ki(null))}),Vc=()=>mr(void 0,null,function*(){(0,Fe.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u66F4\u65B0\u8BD5\u5377\uFF0C\u8BF7\u7A0D\u540E..."}}),(yield(0,ze.ZP)(`/api/exercises/${Ca.categoryId}/sync_random_question.json`,{method:"post"})).status===0&&(yield yr(vr),Me.ZP.success("\u66F4\u65B0\u6210\u529F")),(0,Fe.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1}})}),Uc=(Mr=Qt==null?void 0:Qt.questionList)==null?void 0:Mr.reduce((mi,Co)=>mi+Number(Co.questions_score),0),uh=tr&&((zr=Qt==null?void 0:Qt.exam)==null?void 0:zr.exercise_status)!==1;return ue.createElement("section",{className:Re.wrap},ue.createElement("div",{id:"id_left_preview",className:Re.left,onMouseEnter:mi=>{const Co=document.getElementById("id_left_preview");Co.style.overflowY="auto"},onMouseLeave:mi=>{const Co=document.getElementById("id_left_preview");Co.style.overflowY="hidden"}},ue.createElement("div",{className:Re.title},ue.createElement("div",{className:"body-overflow-initial"},ue.createElement("b",null),ue.createElement("span",null,"\u7B54\u9898\u5361"))),ue.createElement("div",{className:Re.total},ue.createElement("div",null,ue.createElement("img",{src:xt}),ue.createElement("span",null,"\u9898\u6570(\u9053)"),ue.createElement("aside",null,Qt==null?void 0:Qt.all_questions_count)),ue.createElement("div",{className:"mr30 ml30"},ue.createElement("img",{src:Mn}),ue.createElement("span",null,"\u603B\u5206(\u5206)"),ue.createElement("aside",null,Uc&&Uc.toFixed(1))),ue.createElement("div",null,ue.createElement("img",{src:be}),ue.createElement("span",null,"\u65F6\u957F(\u5206)"),ue.createElement("aside",null,((Sr=Qt==null?void 0:Qt.exam)==null?void 0:Sr.time)===-1||((Tr=Qt==null?void 0:Qt.exam)==null?void 0:Tr.time)===null?"\u4E0D\u9650":(ro=Qt==null?void 0:Qt.exam)==null?void 0:ro.time))),(ia=Qt==null?void 0:Qt.questionList)==null?void 0:ia.map((mi,Co)=>{var Za;return ue.createElement("div",{className:Re.list,key:Co},ue.createElement("div",{className:Re.name},ue.createElement("b",null),ue.createElement("span",null,mi.name)),ue.createElement("aside",null,ue.createElement("div",null,"\u5171",ue.createElement("span",{className:Re.b},mi.questions_count),"\u9898 ",ue.createElement("span",{className:Re.l},"|"),"\u5171",ue.createElement("span",{className:Re.r},mi.questions_score),"\u5206"),ue.createElement("div",{className:Re.answerSheet},(Za=mi==null?void 0:mi.questions)==null?void 0:Za.map((Gr,Nr)=>ue.createElement("div",{onClick:()=>{const gs=`Anchor_${Gr==null?void 0:Gr.id}`;let Os=document.getElementById(gs);Os&&setTimeout(()=>Os.scrollIntoView({block:"center",behavior:"smooth"}))},key:Gr==null?void 0:Gr.id,className:Re.tag},Nr+1)))))})),ue.createElement("div",{className:Re.right},ue.createElement("div",{className:Re.examName,id:"examName"},ue.createElement("div",{className:Re.name},ue.createElement(ot.Z,{title:(da=Qt==null?void 0:Qt.exam)==null?void 0:da.name,getPopupContainer:mi=>mi.parentNode},ue.createElement("span",{className:Re.t},(ur=Qt==null?void 0:Qt.exam)==null?void 0:ur.name))),tr&&((Go=Qt==null?void 0:Qt.exam)==null?void 0:Go.exercise_status)===1&&ue.createElement(ul.op,{openLoading:!0,shape:"default",onClick:()=>{We.default.confirm({title:"\u63D0\u793A",content:"\u786E\u8BA4\u6839\u636E\u6700\u65B0\u7684\u968F\u673A\u7EC4\u5377\u62BD\u9898\u89C4\u5219\u91CD\u65B0\u751F\u6210\u8BD5\u5377\u5417\uFF1F",onOk:()=>{Vc()}})},type:"primary"},"\u66F4\u65B0\u8BD5\u5377"),!tr&&ue.createElement(Ye.ZP,{onClick:Qo,type:"primary"},"\u968F\u673A\u66F4\u6362")),ue.createElement("div",{className:Re.topWarp},(_t=Qt==null?void 0:Qt.questionList)==null?void 0:_t.map((mi,Co)=>{var Za,Gr;return ue.createElement(ue.Fragment,{key:Co},ue.createElement("div",{className:Re.head,style:Co===0?{border:0,marginTop:-16}:{}},ue.createElement("div",{className:Re.name},ue.createElement("b",null),ue.createElement("span",null,mi.name)),ue.createElement("div",{className:Re.so},"\u5171",ue.createElement("span",{className:Re.b},mi.questions_count," "),"\u9898 ",mi.type==="COMBINATION"&&`\uFF08\u5305\u542B${(Za=mi==null?void 0:mi.questions)==null?void 0:Za.map(Nr=>{var gs;return(gs=Nr==null?void 0:Nr.sub_item_banks)==null?void 0:gs.length}).reduce((Nr,gs)=>Nr+gs)}\u5C0F\u9898\uFF09`,ue.createElement("span",{className:Re.l},"|"),"\u5171",ue.createElement("span",{className:Re.r},mi.questions_score),"\u5206"),!tr&&ue.createElement("div",{className:Re.btn},ue.createElement(Ye.ZP,{onClick:()=>{Ms(mi)},type:"primary",ghost:!0,className:"mr20"},"\u8BBE\u7F6E\u5F97\u5206"),ue.createElement(Ye.ZP,{onClick:()=>Kc(mi),type:"primary",ghost:!0},"\u968F\u673A\u66F4\u6362"))),(Gr=mi==null?void 0:mi.questions)==null?void 0:Gr.map((Nr,gs)=>{var Os,cl,ba;return Ai===(Nr==null?void 0:Nr.id)?ue.createElement("div",{id:`Anchor_${Nr==null?void 0:Nr.id}`,className:Re.content,style:{padding:0,marginTop:24},key:Nr==null?void 0:Nr.id},ue.createElement("div",{style:{float:"right",marginTop:`${(mi==null?void 0:mi.type)==="PRACTICAL"?"-2px":"-6px"}`}},ue.createElement(Ye.ZP,{onClick:()=>Ki(null),className:"mr20",type:"primary",ghost:!0},"\u53D6\u6D88"),ue.createElement(Ye.ZP,{onClick:()=>{Th(mi==null?void 0:mi.type,Nr)},type:"primary"},"\u4FDD\u5B58")),Ua(Nr,mi.type)):ue.createElement("div",{id:`Anchor_${Nr==null?void 0:Nr.id}`,className:Re.content,key:Nr==null?void 0:Nr.id},ue.createElement("div",{className:Re.titleWrap},(Nr==null?void 0:Nr.item_type)==="bprogram"?ue.createElement(Ne.Z,{style:{paddingRight:10},value:gs+1+"\u3001"+((Os=Nr==null?void 0:Nr.program_attr)==null?void 0:Os.description)}):ue.createElement(Ne.Z,{style:{paddingRight:10},className:Re.titleHtml,value:gs+1+`\u3001${(Nr==null?void 0:Nr.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":""}`+(Nr==null?void 0:Nr.name)}),tr&&ue.createElement(Ye.ZP,{onClick:()=>{var el,ps,Vl;if(Ai){Me.ZP.warning("\u5148\u4FDD\u5B58\u6216\u53D6\u6D88\u5F53\u524D\u6B63\u5728\u7F16\u8F91\u7684\u8BD5\u9898");return}Mi.setFieldsValue({standard_answers:Nr==null?void 0:Nr.standard_answer,hack:yi(yi({},Nr),Nr==null?void 0:Nr.program_attr),hack_codes:Ji(yi({},Nr==null?void 0:Nr.program_attr),{code:wl.Base64.decode(((el=Nr==null?void 0:Nr.program_attr)==null?void 0:el.code)||"")}),hack_sets:yi({},(ps=Nr==null?void 0:Nr.hack_sets)==null?void 0:ps[0])}),(Nr==null?void 0:Nr.item_type)=="program"?Fe.history.push(`/problems/newedit/${(Vl=Nr==null?void 0:Nr.program_attr)==null?void 0:Vl.identifier}?type=exercises&express_id=${Ca.categoryId}&question_id=${Nr==null?void 0:Nr.id}&score=${Nr==null?void 0:Nr.score}&exercise=true&callback_url=/classrooms/${Ca.coursesId}/exercise/${Ca.categoryId}/detail?random=true`):Ki(Nr==null?void 0:Nr.id)},type:"primary",style:{marginLeft:"auto"},ghost:!0},"\u7F16\u8F91"),!uh&&ue.createElement(Ye.ZP,{disabled:uh,className:"ml20",onClick:()=>ns(Nr==null?void 0:Nr.id,mi.type,gs,mi),type:"primary",ghost:!0},"\u6362\u4E00\u9898")),(Nr==null?void 0:Nr.item_type)==="bprogram"&&ue.createElement(Ne.Z,{style:{paddingRight:10,paddingLeft:25},showProgramFill:!0,disabledFill:!0,className:Re.titleHtml,value:wl.Base64.decode(((cl=Nr==null?void 0:Nr.program_attr)==null?void 0:cl.code)||"")}),(mi.type==="SINGLE"||mi.type==="JUDGMENT"||mi.type==="MULTIPLE")&&Is(Nr),mi.type==="COMPLETION"&&La(Nr),mi.type==="SUBJECTIVE"&&Ea(Nr),mi.type==="PROGRAM"&&Js(Nr),mi.type==="BPROGRAM"&&yl(Nr),mi.type==="COMBINATION"&&Ha(Nr,gs),mi.type==="PRACTICAL"&&ts(Nr),((ba=Qt==null?void 0:Qt.exam)==null?void 0:ba.exercise_status)===3&&!["COMBINATION"].includes(mi.type)&&ue.createElement(kn.Z,{className:"mt20",state:Nr==null?void 0:Nr.is_wrong,onClick:()=>{Lr==null||Lr({value:Ji(yi({},Nr),{question_id:Nr==null?void 0:Nr.id,question_score:Nr==null?void 0:Nr.score})})}}))}))}))),tr?ue.createElement(ul.vr,null,ue.createElement(st.Z,{showTotal:je.rU,total:(Zn=Qt==null?void 0:Qt.exam)==null?void 0:Zn.total_num,pageSize:1,current:vr+1,showSizeChanger:!1,onChange:Rd,showQuickJumper:!1,hideOnSinglePage:!1})):ue.createElement(ul.vr,{LeftContent:ue.createElement(ul.op,{onClick:Jt,shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u8FD4\u56DE"),RightContent:ue.createElement(pt.Z,{align:"middle"},ue.createElement(wt.Z,{color:"#55575D",overlayClassName:Re.popover,open:ir,getPopupContainer:mi=>mi==null?void 0:mi.parentNode,content:"\u5982\u60A8\u5BF9\u6B64\u4EFD\u8BD5\u9898\u6EE1\u610F\uFF0C\u53EF\u5C06\u6B64\u4EFD\u8BD5\u9898\u4FDD\u5B58\u4E3A\u56FA\u5B9A\u8BD5\u5377"},ue.createElement(ul.op,{onMouseEnter:()=>no(!0),onMouseLeave:()=>no(!1),onClick:()=>Rs(),shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u4FDD\u5B58")),ue.createElement(ul.op,{shape:"default",type:"primary",onClick:()=>cn(),style:{height:38,marginLeft:20}},"\u63D0\u4EA4"))}),ue.createElement(Ru,{visible:Lo,questionParams:Zr.current,onRandomExchange:()=>mr(void 0,null,function*(){const mi=Zr.current;yield br({single_question_id:mi.id,seleted_item_bank_ids:mi.ids},{type:mi.type,index:mi.index}),nr(!1)}),selectFromProblemSet:()=>{const mi=Zr.current,Co=`${location.pathname}${location.search}`;Co.includes("exercise")&&Fe.history.push(`/paperlibrary/exchangequestion?type=exercise&qid=${mi.id}&qtype=${mi.type}&exerciseid=${Ca.categoryId}&from=${Co}`)},onCancel:()=>{nr(!1)}}))}},60050:function(zn,En,me){"use strict";me.r(En),me.d(En,{default:function(){return wl}});var ue=me(59301),Re={wrapper:"wrapper___KtBVT",breadCrumbWrapper:"breadCrumbWrapper___k9tSB",baseInfo:"baseInfo____j5EY",radioBtnWrapper:"radioBtnWrapper___k9OCh",baseLineHeight:"baseLineHeight___O_QXK",radiogroup:"radiogroup___e2fW6",easy:"easy___WcUAp",medium:"medium___U_o3j",hard:"hard___dAXLS",formWrap:"formWrap___wt5tC",baseFormItem:"baseFormItem___zV64d",cascaderPopup:"cascaderPopup___qm63f",fixedBottom:"fixedBottom___liDZ4",cancelBtn:"cancelBtn___ZV9Mi",confirmBtn:"confirmBtn___DwH6m",previewBtn:"previewBtn___aLYCy",concat:"concat___ZuLMo"},Ze=me(8591),ot=me(78241),We=me(66104),lt=me(42203),Me=me(15519),Mt=me(71418),Ct=me(92832),Ye=me(19842),st=me(5112),pt=me(95237),wt=me(88897),Ie=me(3113),te=me(70635),ee=Object.defineProperty,de=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,ve=(kn,Tn,Qn)=>Tn in kn?ee(kn,Tn,{enumerable:!0,configurable:!0,writable:!0,value:Qn}):kn[Tn]=Qn,be=(kn,Tn)=>{for(var Qn in Tn||(Tn={}))se.call(Tn,Qn)&&ve(kn,Qn,Tn[Qn]);if(de)for(var Qn of de(Tn))he.call(Tn,Qn)&&ve(kn,Qn,Tn[Qn]);return kn},Ne=(kn,Tn,Qn)=>new Promise((zi,Xi)=>{var $i=yi=>{try{ri(Qn.next(yi))}catch(Ji){Xi(Ji)}},Ri=yi=>{try{ri(Qn.throw(yi))}catch(Ji){Xi(Ji)}},ri=yi=>yi.done?zi(yi.value):Promise.resolve(yi.value).then($i,Ri);ri((Qn=Qn.apply(kn,Tn)).next())});function Fe(kn){return Ne(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${kn}/edit_random_exam_new.json`,{method:"get"})})}function je(kn,Tn){return Ne(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${kn}/update_random_exam.json`,{method:"post",body:Tn})})}function ze(kn){return Ne(this,null,function*(){return(0,te.ZP)("/api/examination_banks/create_random_exam.json",{method:"post",body:kn})})}function Xe(kn){return Ne(this,null,function*(){return(0,te.ZP)("/api/disciplines.json",{method:"get",params:kn})})}function Je(kn){return Ne(this,null,function*(){return(0,te.ZP)("/api/item_banks/item_difficulty_count.json",{method:"get",params:kn})})}function dt(kn,Tn){return Ne(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${kn}/set_item_type_score.json`,{method:"post",body:Tn})})}function He(kn,Tn){return Ne(this,null,function*(){return(0,te.ZP)(`/api/exercises/${kn}/set_item_type_score.json`,{method:"post",body:Tn})})}function bt(kn,Tn){return Ne(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${kn}/delete_item_type.json`,{method:"post",body:Tn})})}function et(kn,Tn){return Ne(this,null,function*(){return(0,te.ZP)(`/api/exercises/${kn}/delete_item_type.json`,{method:"post",body:Tn})})}function It(kn){return Ne(this,null,function*(){return(0,te.ZP)("/api/examination_banks/preview_random_questions.json",{method:"post",body:kn})})}function xt(kn){return Ne(this,null,function*(){return(0,te.ZP)("/api/examination_banks/toggle_random_questions.json",{method:"post",body:kn})})}function Bt(kn){return Ne(this,null,function*(){return(0,te.ZP)("/api/examination_banks/save_question_list.json",{method:"post",body:kn})})}function Ut(kn){return Ne(this,null,function*(){return(0,te.ZP)(`/api/exercises/${kn.categoryId}/edit.json`,{method:"get",params:be({},kn)})})}var Nt=(kn=>(kn.OnlyFileFolder="1",kn.OnlyKnowledge="2",kn.OnlyDifficulty="3",kn.FileFolderAndDiff="4",kn.FileFolderAndKnowledge="5",kn.KnowledgeAndDiff="6",kn.All="7",kn.Shixun="8",kn))(Nt||{}),qe=me(89392),Ke=Object.defineProperty,Tt=Object.defineProperties,Ln=Object.getOwnPropertyDescriptors,Mn=Object.getOwnPropertySymbols,zt=Object.prototype.hasOwnProperty,rn=Object.prototype.propertyIsEnumerable,xn=(kn,Tn,Qn)=>Tn in kn?Ke(kn,Tn,{enumerable:!0,configurable:!0,writable:!0,value:Qn}):kn[Tn]=Qn,Un=(kn,Tn)=>{for(var Qn in Tn||(Tn={}))zt.call(Tn,Qn)&&xn(kn,Qn,Tn[Qn]);if(Mn)for(var Qn of Mn(Tn))rn.call(Tn,Qn)&&xn(kn,Qn,Tn[Qn]);return kn},yn=(kn,Tn)=>Tt(kn,Ln(Tn)),sn=(kn=>(kn[kn.FileFolder=1]="FileFolder",kn[kn.Difficulty=2]="Difficulty",kn[kn.Knowledge=3]="Knowledge",kn))(sn||{});const Lt=(0,ue.createContext)(null),ti={[Nt.OnlyFileFolder]:[1],[Nt.OnlyKnowledge]:[3],[Nt.OnlyDifficulty]:[2],[Nt.FileFolderAndDiff]:[1,2],[Nt.FileFolderAndKnowledge]:[1,3],[Nt.KnowledgeAndDiff]:[3,2],[Nt.All]:[3,2,1]},gi=(kn,Tn)=>{if(kn.length!==Tn.length)return!1;for(const Qn of Tn)if(!kn.includes(Qn))return!1;return!0},Pn=kn=>{for(const[Tn,Qn]of Object.entries(ti))if(gi(kn,Qn))return Tn},Xt={SINGLE:"\u5355\u9009\u9898",MULTIPLE:"\u591A\u9009\u9898",COMPLETION:"\u586B\u7A7A\u9898",JUDGMENT:"\u5224\u65AD\u9898",SUBJECTIVE:"\u7B80\u7B54\u9898",PROGRAM:"\u7F16\u7A0B\u9898",BPROGRAM:"\u7A0B\u5E8F\u586B\u7A7A\u9898",COMBINATION:"\u7EC4\u5408\u9898",PRACTICAL:"\u5B9E\u8BAD\u9898"},Kt={1:{label:"\u7B80\u5355",color:"#46B70E"},2:{label:"\u9002\u4E2D",color:"#165DFF"},3:{label:"\u56F0\u96BE",color:"#EE6F1A"}},Ot=kn=>kn&&parseFloat(kn.toFixed(1)),rt=(kn,Tn)=>{var Qn,zi,Xi;switch(Tn.type){case"init":return Tn.payload;case"updateBaseInfo":return yn(Un({},kn),{examination_bank:Tn.payload});case"deleteQuestionType":{const{item_types:$i}=kn,Ri=$i.filter(ri=>ri.item_type!==Tn.payload);return kn.examination_bank.question_count=Ot(Ri.reduce((ri,yi)=>ri+yi.item_bank_count,0)),kn.examination_bank.total_score=Ot(Ri.reduce((ri,yi)=>ri+yi.total_score,0)),yn(Un({},kn),{item_types:Ri})}case"setQuestionType":{const{item_types:$i=[]}=kn,Ri=$i.map(yi=>yi.item_type),ri=$i.filter(yi=>Tn.payload.includes(yi.item_type));for(const yi of Tn.payload)Ri.includes(yi)||(yi==="PRACTICAL"?ri.push({item_type:yi,contents:[],item_banks:[],item_bank_count:0,item_bank_num:0,item_type_text:Xt[yi],random_rule_type:Nt.Shixun,score:0,total_score:0}):ri.push({item_type:yi,contents:[],item_bank_count:0,item_type_text:Xt[yi],score:0,total_score:0}));return yn(Un({},kn),{item_types:ri})}case"updateItemTypes":return yn(Un({},kn),{item_types:Tn.payload});case"deleteRule":{const $i=(0,qe.cloneDeep)(kn),Ri=$i.item_types.find(yi=>yi.item_type===Tn.payload.itemType),ri=Ri.contents.find(yi=>yi.id===Tn.payload.id&&yi.is_share==Tn.payload.is_share);return Ri.contents=Ri.contents.filter(yi=>yi!==ri),((Qn=Ri.contents)==null?void 0:Qn.length)===0&&(Ri.random_rule_type=[]),Ri.item_bank_count-=ri==null?void 0:ri.quanlity,$i.examination_bank.question_count-=ri==null?void 0:ri.quanlity,Ri.total_score-=(ri==null?void 0:ri.quanlity)*Ri.score,$i.examination_bank.total_score-=(ri==null?void 0:ri.quanlity)*Ri.score,Ri.total_score=Ot(Ri.total_score),$i.examination_bank.total_score=Ot($i.examination_bank.total_score),$i.contents=Ri.contents,$i}case"changeQuestionNum":{const $i=(0,qe.cloneDeep)(kn),Ri=$i.item_types.find(sa=>sa.item_type===Tn.payload.itemType),ri=(zi=Ri==null?void 0:Ri.contents)==null?void 0:zi.find(sa=>sa.id===Tn.payload.id);if(Tn.payload.itemType==="PRACTICAL")return Tn.payload.num&&($i.examination_bank.question_count=$i.examination_bank.question_count-Ri.item_bank_count+Tn.payload.num,$i.examination_bank.total_score=Ot($i.examination_bank.total_score-Ri.total_score+Tn.payload.num*Ri.score)),Tn.payload.score&&($i.examination_bank.total_score=Ot($i.examination_bank.total_score-Ri.total_score+Tn.payload.num*Ri.score)),Ri.item_bank_count=Tn.payload.num,Ri.total_score=Ot(Ri.item_bank_count*Ri.score),$i;$i.examination_bank.question_count=$i.examination_bank.question_count-(ri==null?void 0:ri.quanlity)+Tn.payload.num;const yi=Ri.contents.find(sa=>sa.id===Tn.payload.id&&sa.teacher_group_id===Tn.payload.teacher_group_id);yi.quanlity=Tn.payload.num;let Ji=0,mr=0;for(const sa of Ri.contents)Ji+=sa==null?void 0:sa.quanlity,mr+=(sa==null?void 0:sa.quanlity)*Ri.score;return $i.examination_bank.total_score=Ot($i.examination_bank.total_score-Ri.total_score+mr),Ri.item_bank_count=Ji,Ri.total_score=Ot(mr),$i}case"changeQuestionScore":{const $i=(0,qe.cloneDeep)(kn),Ri=$i.item_types.find(ri=>ri.item_type===Tn.payload.itemType);return Ri.score=Tn.payload.score,Ri.total_score=Ot(Ri.item_bank_count*Ri.score),$i.examination_bank.total_score=Ot($i.item_types.reduce((ri,yi)=>ri+yi.total_score,0)),$i}case"editRule":{const $i=(0,qe.cloneDeep)(kn),Ri=$i.item_types.find(ri=>ri.item_type===Tn.payload.itemType);return Ri.contents=Tn.payload.tableData.map(ri=>yn(Un({},ri),{item_type:Tn.payload.itemType,random_rule_type:Tn.payload.randomRuleType})),Ri.random_rule_type=Tn.payload.randomRuleType,Ri.item_bank_count=Ri.contents.reduce((ri,yi)=>ri+(yi==null?void 0:yi.quanlity),0),Ri.score=Ri.score||1,Ri.total_score=Ot(Ri.item_bank_count*Ri.score),$i.examination_bank.question_count=$i.item_types.reduce((ri,yi)=>ri+yi.item_bank_count,0),$i.examination_bank.total_score=Ot($i.item_types.reduce((ri,yi)=>ri+yi.total_score,0)),$i}case"addShixun":{const $i=(0,qe.cloneDeep)(kn),Ri=$i.item_types.find(ri=>ri.item_type==="PRACTICAL");return Ri.item_banks=Tn.payload.shixunList,$i.examination_bank.question_count=$i.examination_bank.question_count+1,Ri.item_bank_num=Ri.item_banks.length,Ri.item_bank_count=Ri.item_bank_count||1,Ri.score=Ri.score||1,Ri.total_score=Ri.total_score||Ri.score*Ri.item_bank_count,$i.examination_bank.total_score=(Xi=$i==null?void 0:$i.item_types)==null?void 0:Xi.map(ri=>ri.total_score).reduce((ri,yi)=>ri+yi),$i}case"deleteShixunQuestion":{const $i=(0,qe.cloneDeep)(kn),Ri=$i.item_types.find(ri=>ri.item_type==="PRACTICAL");return Ri.item_banks=Ri.item_banks.filter(ri=>ri.id!==Tn.payload.shixunId),Ri.item_bank_num-=1,Ri.item_bank_count>Ri.item_bank_num&&(Ri.item_bank_count-=1,Ri.total_score-=Ri.score,Ri.total_score=Ot(Ri.total_score)),$i}}};var Ue=me(14670),$t=Object.defineProperty,Gt=Object.defineProperties,it=Object.getOwnPropertyDescriptors,at=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,ye=(kn,Tn,Qn)=>Tn in kn?$t(kn,Tn,{enumerable:!0,configurable:!0,writable:!0,value:Qn}):kn[Tn]=Qn,ke=(kn,Tn)=>{for(var Qn in Tn||(Tn={}))Te.call(Tn,Qn)&&ye(kn,Qn,Tn[Qn]);if(at)for(var Qn of at(Tn))Pe.call(Tn,Qn)&&ye(kn,Qn,Tn[Qn]);return kn},$e=(kn,Tn)=>Gt(kn,it(Tn)),Le=(kn,Tn,Qn)=>new Promise((zi,Xi)=>{var $i=yi=>{try{ri(Qn.next(yi))}catch(Ji){Xi(Ji)}},Ri=yi=>{try{ri(Qn.throw(yi))}catch(Ji){Xi(Ji)}},ri=yi=>yi.done?zi(yi.value):Promise.resolve(yi.value).then($i,Ri);ri((Qn=Qn.apply(kn,Tn)).next())}),an=({courseOptions:kn,setCurrentKey:Tn,loading:Qn,form:zi})=>{const{data:Xi,disabled:$i,dispatch:Ri}=(0,ue.useContext)(Lt),ri=(0,lt.useParams)(),yi=(0,ue.useRef)(!0),[Ji,mr]=(0,ue.useState)(!1),sa=(0,ue.useMemo)(()=>{var Ma,Qt,cn,Jt,dn;if(!kn.length||!Xi)return;const xi=(Ma=Xi==null?void 0:Xi.examination_bank)==null?void 0:Ma.sub_discipline_id,tr=((Qt=Xi==null?void 0:Xi.examination_bank)==null?void 0:Qt.time)===-1?void 0:yi.current?ri.id?(cn=Xi==null?void 0:Xi.examination_bank)==null?void 0:cn.time:((Jt=Xi==null?void 0:Xi.examination_bank)==null?void 0:Jt.time)||60:(dn=Xi==null?void 0:Xi.examination_bank)==null?void 0:dn.time;yi.current=!1;let yr=[];for(const vr of kn)for(const br of vr.children)br.value===xi&&(yr=[vr.value,br.value]);return $e(ke({},Xi.examination_bank),{time:tr,course:yr})},[Xi,kn]);return(0,ue.useEffect)(()=>{zi.setFieldsValue(ke({},sa))},[sa]),ue.createElement(Mt.Z,{spinning:Qn,size:"large",style:{position:"fixed",maxHeight:"100vh"},className:"mt30"},ue.createElement("div",{className:Re.formWrap},ue.createElement(ot.default,{form:zi,autoComplete:"off",colon:!1,labelCol:{span:4},wrapperCol:{span:20},initialValues:sa||{difficulty:2,time:60},onValuesChange:(Ma,Qt)=>{const{course:cn=[]}=Qt,Jt=$e(ke({},Qt),{sub_discipline_id:cn[1]||0});Ri({type:"updateBaseInfo",payload:Jt})}},ue.createElement(ot.default.Item,{name:"name",label:"\u8BD5\u5377\u540D\u79F0",className:Re.baseLineHeight,rules:[{required:!0,validator:(Ma,Qt)=>{var cn;return((cn=Qt==null?void 0:Qt.replaceAll(" ",""))==null?void 0:cn.length)>0?Promise.resolve():Promise.reject("\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0")}}]},ue.createElement(Ct.default,{maxLength:60,className:Re.baseFormItem,placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",showCount:!0})),ue.createElement(ot.default.Item,{label:"\u65B9\u5411&\u8BFE\u7A0B",name:"course",className:Re.baseLineHeight},ue.createElement(Ye.Z,{className:Re.baseFormItem,disabled:$i,size:"large",allowClear:!1,placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:kn,dropdownMenuColumnStyle:{padding:"8px 12px",fontSize:14}})),ue.createElement("div",{className:Re.concat},"\u6CA1\u6709\u5408\u9002\u7684\u65B9\u5411&\u8BFE\u7A0B\uFF1F",ue.createElement("span",{onClick:()=>mr(!0)},"\u8054\u7CFB\u6559\u7814\u52A9\u7406")),ue.createElement(ot.default.Item,{label:"\u96BE\u5EA6",name:"difficulty",className:Re.radioBtnWrapper,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u5EA6"}]},ue.createElement(st.ZP.Group,{disabled:$i,className:Re.radiogroup},ue.createElement(st.ZP.Button,{className:Re.easy,value:1},"\u7B80\u5355"),ue.createElement(st.ZP.Button,{className:Re.medium,value:2},"\u9002\u4E2D"),ue.createElement(st.ZP.Button,{className:Re.hard,value:3},"\u56F0\u96BE"))),ue.createElement(ot.default.Item,{label:"\u7B54\u9898\u65F6\u957F",className:Re.baseLineHeight},ue.createElement(pt.Z,{align:"middle"},ue.createElement(ot.default.Item,{name:"time",noStyle:!0},ue.createElement(wt.Z,{className:Re.baseFormItem,min:1,disabled:$i,size:"large",max:9999,style:{width:220},placeholder:"\u8BF7\u586B\u5199\u7B54\u9898\u65F6\u957F"})),ue.createElement("span",{style:{marginLeft:"10px",width:"40px",lineHeight:"46px",fontSize:14}},"\u5206\u949F"))),ue.createElement(ot.default.Item,{label:"\u8BD5\u5377\u987B\u77E5",name:"exam_notes"},ue.createElement(Ct.default.TextArea,{rows:6,disabled:$i,maxLength:65535,placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u987B\u77E5"})))),ue.createElement("div",{className:Re.fixedBottom},ue.createElement(Ie.ZP,{className:`${Re.cancelBtn} mr5`,onClick:()=>{ri.id||window.location.href.indexOf("randompaper")>-1?lt.history.push("/paperlibrary"):lt.history.push(`/classrooms/${ri.coursesId}/exercise`)}},"\u53D6\u6D88"),ue.createElement(Ie.ZP,{className:`${Re.confirmBtn} ml15`,type:"primary",size:"large",onClick:()=>Le(void 0,null,function*(){if(yield zi.validateFields(),!ri.id&&!ri.coursesId){const Ma=yield ze(Xi);Ma.status===0&&(lt.history.replace(`/randompaper/edit/${Ma==null?void 0:Ma.examination_bank_id}?type=settings`),Tn("settings"))}else Tn("settings")})},"\u4E0B\u4E00\u6B65")),ue.createElement(Ue.Z,{open:Ji,onCancel:()=>{mr(!1)}}))},bn=me(43418),en=me(43604),wn={flex_box_center:"flex_box_center___NXYwj",flex_space_between:"flex_space_between___Oy2UZ",flex_box_vertical_center:"flex_box_vertical_center___ybBar",flex_box_center_end:"flex_box_center_end___yyQPf",flex_box_column:"flex_box_column____kuXY",questionInfo:"questionInfo___U9mnu",label:"label___PP7Ng",content:"content___PUXFl",leftPart:"leftPart___uoQeo",rightPart:"rightPart___mCG7H",dragItem:"dragItem___djmPG",blackText:"blackText___KqEaU",greyText:"greyText___VamKm",iconWrapper:"iconWrapper___o1C0y",contentArea:"contentArea___Fj7D0",dragging:"dragging___mX3Il",hidden:"hidden___KWDLK",dragIcon:"dragIcon___yPuB3",deleteIcon:"deleteIcon___go29y",disabled:"disabled___uSK9k",challengeNameWrapper:"challengeNameWrapper___DFjRy",challengeName:"challengeName___m7v0x",shixunPreviewFooter:"shixunPreviewFooter___iaciG",shixunInfoWrapper:"shixunInfoWrapper___aSihg",shixunInfo:"shixunInfo___WYBm1",btnToDetail:"btnToDetail___WVmtj",fixedBottom:"fixedBottom___oeMSX",cancelBtn:"cancelBtn___ac73V",confirmBtn:"confirmBtn___sYh2O",previewBtn:"previewBtn___c2uQz",setScoreModalTable:"setScoreModalTable___kPddX",title:"title___lP1E2",tipcontent:"tipcontent___tV6uE",name:"name___YLyPW",tip:"tip___FYIzt",info:"info___rSdr9",img:"img___ft7eS"},ai=me(97267),_n=me(94606),Hn=me(24905);const wi=[{label:"\u5355\u9009\u9898",value:"SINGLE"},{label:"\u591A\u9009\u9898",value:"MULTIPLE"},{label:"\u586B\u7A7A\u9898",value:"COMPLETION"},{label:"\u5224\u65AD\u9898",value:"JUDGMENT"},{label:"\u7B80\u7B54\u9898",value:"SUBJECTIVE"},{label:"\u7F16\u7A0B\u9898",value:"PROGRAM"},{label:"\u7EC4\u5408\u9898",value:"COMBINATION"},{label:"\u5B9E\u8BAD\u9898",value:"PRACTICAL"},{label:"\u7A0B\u5E8F\u586B\u7A7A\u9898",value:"BPROGRAM"}];var _i=({open:kn,onCancel:Tn,onOk:Qn})=>{const{data:zi,dispatch:Xi}=(0,ue.useContext)(Lt);(0,ue.useEffect)(()=>{if(kn){const{item_types:ri}=zi||{};Ri(ri==null?void 0:ri.map(yi=>yi.item_type))}},[kn,zi]);const[$i,Ri]=(0,ue.useState)([]);return ue.createElement(bn.default,{title:ue.createElement("div",null,"\u9898\u578B\u8BBE\u7F6E",ue.createElement("span",{className:"c-grey-333",style:{fontSize:14,fontWeight:400}},"\uFF08\u901A\u8FC7\u52FE\u9009\u53EF\u5BF9\u9898\u578B\u8FDB\u884C\u6DFB\u52A0/\u5220\u9664\uFF09")),closable:!0,centered:!0,open:kn,onCancel:Tn,onOk:()=>Qn($i)},ue.createElement(Hn.default.Group,{value:$i,onChange:ri=>Ri(ri)},ue.createElement(pt.Z,{gutter:[0,20]},wi.map(ri=>ue.createElement(en.Z,{key:ri.value,span:6},ue.createElement(Hn.default,{value:ri.value},ri.label))))))},cr=me(2595),_r=Object.defineProperty,vi=Object.getOwnPropertySymbols,si=Object.prototype.hasOwnProperty,fi=Object.prototype.propertyIsEnumerable,Ui=(kn,Tn,Qn)=>Tn in kn?_r(kn,Tn,{enumerable:!0,configurable:!0,writable:!0,value:Qn}):kn[Tn]=Qn,Fi=(kn,Tn)=>{for(var Qn in Tn||(Tn={}))si.call(Tn,Qn)&&Ui(kn,Qn,Tn[Qn]);if(vi)for(var Qn of vi(Tn))fi.call(Tn,Qn)&&Ui(kn,Qn,Tn[Qn]);return kn},wr=({open:kn,onCancel:Tn,onOk:Qn})=>{const{data:zi}=(0,ue.useContext)(Lt),[Xi,$i]=(0,ue.useState)();console.log("--xxx-",Xi),(0,ue.useEffect)(()=>{kn&&$i((0,qe.cloneDeep)(zi))},[kn,zi]);const Ri=(0,ue.useMemo)(()=>{var ri;let yi;return yi=(ri=Xi==null?void 0:Xi.item_types)==null?void 0:ri.map(Ji=>Ji.total_score).reduce((Ji,mr)=>parseFloat(Ji)+parseFloat(mr)),yi==null?void 0:yi.toFixed(1)},[Xi]);return kn?ue.createElement(bn.default,{title:"\u6279\u91CF\u8BBE\u7F6E\u5206\u503C",open:kn,width:640,centered:!0,closable:!0,onCancel:Tn,onOk:()=>{Qn(Xi)}},ue.createElement("div",{className:"c-black mb20"},"\u603B\u5206",ue.createElement("span",{className:"ml10 c-light-primary"},Ri)),ue.createElement(cr.default,{columns:[{title:"\u9898\u578B\u540D\u79F0",dataIndex:"item_type_text",width:130},{title:"\u5C0F\u9898\u603B\u6570",dataIndex:"item_bank_count",width:130},{title:"\u9898\u578B\u603B\u5206",dataIndex:"total_score",width:130},{title:"\u64CD\u4F5C",render(ri,yi){const{score:Ji,item_type:mr}=yi;return ue.createElement("div",{style:{color:"#9096A3"}},"\u6BCF",((yi==null?void 0:yi.item_type)==="PRACTICAL","\u9898"),ue.createElement(wt.Z,{precision:1,size:"large",className:"ml10 mr10",min:.1,disabled:(yi==null?void 0:yi.item_bank_count)===0,max:100,onChange:sa=>{const Ma=Xi,Qt=Ma.item_types.find(Jt=>Jt.item_type===mr);Qt.score=Number(sa);const cn=sa*Qt.item_bank_count;Qt.total_score=cn&&Number(cn.toFixed(1)),Ma.examination_bank.total_score=Ma.item_types.reduce((Jt,dn)=>Number(Jt)+Number(dn.total_score),0),$i(Fi({},Ma))}}),"\u5206")}}],className:wn.setScoreModalTable,dataSource:Xi==null?void 0:Xi.item_types,rowKey:"item_type",pagination:!1})):null},Be=me(99313),Xr=me(57809),Hr=me(86914),jn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAtFJREFUWEftWL9rU1EYPffFpCCKEEEJVUQHB10qAUHFHwguDg4ORRDq4uDg4CBIJ6GD0D/B3UEFJ5cugjbQChIqokWKClVrFDGIg2B8yZX3Xl/z/O5LzvfyKhTJXV7g/jrfOfc797sx1toCNnAzQ4A51RkymJNA/CcMvpoYhf0xDWtPwqICWEKM+QSYGgojt3Hw3mweFjmD9YlR+N8WAJSdjYwBrAWCb1oL+jzvMbzSFKoPBgLKAc6dugPbuRDtHzAXgGEMxmjjsXEAYr4MMOw2DcA8wcjWG6g+XOEAZ8c+wNpKtCXZMI+WMn6DJrbsOMQBPtrr9ySM4ZX9LEApkOfd5QBntvvhuhqFswKOz2/wDQWSZ9o0FADLfji5fBTYPwmUduYVMmV+IrLWF2DpFtCcizDTu3hmFeCBKaC4LR2cJpvjMZrwfn8HFm8qATan/bWslWckq6SuTyWcIfi5allrkmsY/DoZSZzanCwQo0REAwTIJf583e9txNIWic9p5E2OCQilZ7BxzY/8L60RSqRkcgnHqKXERgFw5eq/80EagIbB91cSPigilMabNWmYD6okXr7cZdABIAE7Gv6dpfIuZxJDI/G7S32ymJx6CoDP50ny5mIXIJPQ2Y8kEVVEw+DSeCKLWbkldlQA6JZwaZe9BuDr8xkAZjU6Pp5LvHiu9xmkWej6Wt8KXOK1VuGDL89272IaMLv6yAID3cUvzvS5SZyQyZOAZZl7hrnEz0/rjZoxzAhOyUEOcOFEH6MWhDGCWAApPs8B1o/p68GsANgbRVVRPzu8fvVg5gA0xcLTsV/wCtF/iKz6cABkfBfL+Z12m0tc2/cWXnFPODf3zZCxmOj4yxzg/O4qWv48LDwHIHOZrO/i5HoGHRQ3HeEAg0m1ShWtn/dh27tgUAilTqOUMcyqm7AfbZjCR5Q2j+N4o64DOMDhXq8pQ4B5mdzwDP4B5kHmZrL/eyAAAAAASUVORK5CYII=",Li="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAA4RJREFUWEftWEtrE1EYPXfSh5VWSlMfNSi4sokLK30pWtuKIChVVBBBWpfiRhcKghii7tp/4FrBBxREXbhQ0Bj7gqokahe+kNZWqa21tLGtk7kymY5J79yZL5NUKNLZZHHnzj33fOec+90wzrkHS/hhywBzrM4ygzkSiP+EwTdtPvDJdnDeCI4KgBPEsGGAPYOn8Bq23A7nwiLNYH+bD+rYSwBlloUYAzgH9F/Zo48pyhMoBVdR3ZkVUBpgV9MNcO24sb7OnA6GYtBEa75rbkCYL24wOcxGAPYUhSUXUH3/Cw0wXDUIziuMJYkFc6mluH+GcRSv2UYDfLxJtSWMwiuOUxsUC6Qot2iAD71q8ruZVNgtYFO/+m+yQKKm2UgGAMvU5GTvbqDyClC4LmUMuw+LTFiYdNDC7FdgIASMG57KHGDNdSB/tVyKltIJAESmRHziBmZHgf5WlwBrb6bihFrQmkdpCSDRiiyu+ozgyJzBujtpy1Jiy9XOAPqOuQRY35mKP8qdFvELBFJu1qH1HnUL8K59iV0DFtwqc3PPIQnAH+3noGmXAK1k4YnhxoaS8joqQgFYOaBUAlBSedbTIgCcuLwBc78+SW3qWnJUzkjG8/yAZ3Nqd937BYDfghvB4x+NQJ5vAMycozRvOVOF+Rk1FaVAkQEquX73PkmJh89EwXngn5+5dhsuPgwopYYZu/ZKAA6dDkLTQhaAlhKLDAsvuJWE+X5RDbCi1jBjpEkCcPCsH4mpmKXEVIksbZiAkDxz5zWZVwaUnjS6pkiDTcx8aI2CscCCRtStJqmjzKmtLD8FeLxAZKcNwPcnguCJ0II1SAYERJSJnUxX0gysagbC2+0YbPNDnY79rZrk6LR+n0DkRsP5a4GK80C4xuEkeXswCvCAfaOawV3E1K2+DGUaUeO+i4AlB9NpeX0gCGihpA6zeahcpBB7W4Bo0IHBgSN+zP2MGVuX1ZiihHKJOC5IpMAHfH7gAFAfetUYBUcgGwIXZc73d0BixqEffNGQ5mYi1yjCSFdLKhIfA6ZHHQBGm/2YmYpJ2bAEN4nAmVRZjKmzwOQQcWnq3focnNdTBwV9n88yhuKj95xb/i5/HdSpRwBbmfpXIRPTCIS5ycF0U3o8O+g7SWR9FebiHeCJXQArkNdKYIiqODXO2G9A6cCeiRANcFEsmf1HlgFmz50xc8kz+AfHHTJwrKNsNwAAAABJRU5ErkJggg==",Wi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABWlJREFUWEftV1tsVEUY/ubspUu3W9mWGlttwXqJVRNBbqIFDbyA8mCCkAYtpEaIGBODhBCECiG+UE1EnzTempYqtSAE45saBMX40JC0IRojpd1GKM1uW7bd7V7OOWPmnD3bPTNndxYbE2I6L2dzdubMN9/3/ZchlFIXbuNB5gDOUp05BmdJIP4fDPZcxt2xaRzVgadBUQ3QDDEE5m/2zBkE1whwoYTg461LcX42LEoZZOCiMXoJoBUCHEIASgH2dBqUgijKORfBkW3/EqgUYNsPieMAmtj+Fhb2NIfFXvaFnUhCQBlI6wD8dGcBrisEP5V7fft2NuJvKcC9p6PDoLSa7cwTJgKejZj8WjLm93iWSAG2tI+qEsdlvywl6BZPqBByQgpw44fDKskEAQUF+82e5rBrxCvGz7fWZr+XkZ/ZwFTIbgkKel0K8LkPhlW2uLbSh9UNQfh9btGLIrIZ7E7WyDkaf8xYQsX538cwHE4YgKUAnz0WMgC+/EwNSn1uR5MVEcxZ/xbjUgbyi3PXDNNLAW44FjIk3rOxNpvtCseuCEFCMGcUc/2734YMFaQA178fUhlDB56vy+4s27AYlgrOocA7Z0IG60UDPLypLm8BEQBncnc2X3ITijng4ZMhM8vK+kHGIIuyI5sXZgsGn//ECmOvgMJ8rgA5/f92T8hM8rkAX/psZI+u4yClesAWhhLNhPTBpSMhfeSkF7eLoP5OHzY8FoSizGzU+vWQmXosgLvPTNTGJpNXi8lvPF4hPwoZW0YZsKw+gMWLSrMV1ASYE8V7e27WTUwnB7IzsrFVjOXzdDVWOpfgY+YO+j3YvKrCWMEkP9g9ZHjeJvErnaN9oHhYgCSrYQ5F2echKPcpSGkUE9PU3vXkMeWWJxcg6HcZAA+cGDIosgHc0THaqun0EN8ViFFqdij5SlTT8jKsa5gHJdPF/DaQwCcXotkCme+8y+/zY1m937D/W19yHmSs7eoeb0gm0v1Wi2QBEGpuAcm8buCjF6tmWqyMHPu/iWAkahQlseZm0lKw1I2mRlPm/V2D9iCxZG1pH+2j4GR2KB1lJaaE8TSTUDf88kiNB2sfKsWCMgWlXgVVARfG4xp+/iuBU72xmca7gGW2NlYaMu/vYgxyaYaBbGkPt+pUP5Trw1xGa4Nu7FhdjkULPBlDUwxGVLgVgsFIGj/+MY0rYdXwzzwvQTzFOiDHi4Fj9K14wI+V9/uxr3PQuZLs6hxviKnpfttVI+fERzdVoPoOsWmYiGt4ozsCncnFA+JeFGp0KwJuNK+pwL6OPBKzYzV/npHZoZN/74UK3OUAMJ7S8VpXBJoRsPYgEhBLskLzmkq0nR7OX+q2t4fNaHYYtUEXdq4O4N6MxGzKnzfSiExpqJnvRm8oiYtXkhiJasZqj8vMMCqzaebAsvbsiQf9OHXxRv5+kEXzZFzvt+5qgiQEmO8jhseSGjAW0w0wJW7g8Tovnqovgb+EGO+XLvTCRYBITEd3bxy/DqREQrnmojLgRt/VMaN7z9ssNLeP94GPZotR2d2CECy5x40315XZNIgldbz61U15aSLASHgSqqblB9hyfKpV07WMzHaXi3lS3NPrAnav9ePRGjOgVI3i5KUEvrucEm6HfFix2h6dnMbNqen8AHd1pxpiyWS/mS0lYSncj2cWVJURBHwEI1Ed8VQ+8sSoSasqro9OFL40beuM/UIpXSnczvjbF387484jK+VODDL/3QiPny3YsG7vGFsRT+rfE5BSC6QjB7IWWfY/91FrrwRRV0k76i2fhhcnk2obqN4IQrxOAGWevEV8UIiS1iltO/t69SEpQHnI/bcz5gDOlt/bnsF/AOXAMnuF/cdAAAAAAElFTkSuQmCC",ji="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABpxJREFUWAntWE2IHFUQrtfzk5nNbrKbRGPcRSU/oIEkmERjMAQhCBIjKBpFEBER9OZNL4IevOhFbyGHRA9BhKBeouJFIkTNwaxGg16ikN1k0WR3M5ndnf/ptr56r7p7+s1mkYCHkILpev1e1VdfVb3X0zNEt+Qmr4Dpl9+xs9FYq0XvR0SPUETriC9WYI6x72YML0T0By99Gxj68KWd5k/ndEPKiwRy7RadZSKrDEdDVGiRxfnZ9YjJM1MTUScydIwn371Roh7BD042P2Hg5xHRxRON+6R6WlE7m1wzGRjT4ZnTjNOFjQkYIbQ68UlGURhSYIIpTu7k6N7CkWeN6XoE3zoxP8WMuK22kemG6ngxel4CWQeubpw1AmQrkFpnyx9HVg/uy8MuLbPV5uJ7DuloUDhlA8hWSAxS8SSEZy6zi152V2pX3/YJzjVlH8EtYkTDUaAhOobuJ0vZL7XuJWzoKY9gtd6JY5eKAQ0PFOL7/2NQqbWp0eKNCjFmk0fQVsvQ2Opl9Pj2NZQPeGdnWpu5jbtu68zA2uV4QsIll+sAdPigfPXzNF2cafKBCo1HUFF2bRiikQEmx/If9042H49vdm9qTKsDenD9EE1O263mbaaDhy7FeWf3jBe5F5mXe5+b+gyFhiy17rWKK+NVcGQ5ppRjpheZW680/oQQSy5LAiSmGHGpPYKyB/WUZnurvFUDJD32eodFJQXjrGAN4nQ2Hq/4BGHsgtrHChKxAH38BT6+wED8LUCOt/CejSW6czhPF2badPqvJoUO2/o4ew0Y+yaE+xBkVwkEniBrd5KScEsOnwNo1TCjY5fQ6/uG6b51RXWlLWMNOvxdNaZD/J2GEKLF340dP+xZe0xjCPBxQTmIjqHtx67DRIiKDTuDUMb+3jsKPeQQYufdJRrjaiqezR/xgKGYVgM/5ItHEJZog22FHSuCEOZ1DQAbjPvZryz1gWYeQ2XMW0ahBOEYrPFhuFhjDDuvxWBtATi4GCUat7Ls5j0DVwW8tYyOeNBUa4Z0/nLbJQ8QJGu1XlMvd2LnoaQN4NQryBxi9YbbCrRpbYGa7Yh+mWzS7EKXxlbl6ZWHV9DalTn6+twC7V5f4q/LHE3Pd+nIqSrV2VYF1dfvd8xl97yts1o7/eLRf7B1RbSWCaSd5zdmem3vCtrFwVVanYjOTDTpgXuW0e9TLfr4hzmaWQhlew4WDc01JbwUfTF8zGtM4GLcp4JYSiRLDisHtg70kMNcMW+kWsfPzNOJX2uYEkELQQ6CVwCQcK8C8ThNGHYaE9ojCAPZu6xxOBEAGqLjvZvKdqLPFb7qn11WcjEhDNheW6b40BAsewR1EQYIJKApB8ytkJMIC1/WDuX8STfjYJIK4fWfA+BngIiOEdSJ9ywAAQAJmBvrhM5NzCbvjAqk+mKlI4kJDjuoRuI6hsYHotreKTNoe8I9grZmzkDqx4YwFgerPxtfYGAXwSLLFXMHdwzS09uXU6nAGFwe+ZpEmVJjzOm8aqwLpNM69vqx9ck337G8AML8BTsQQKHNL7CX50KavNqljbfnaYDfuiHnptr03jfX6O9qSAe2DNCjm8s034hocrbLEIa2jRVp22iRupxXpY7kBK1HG7wcY4a1EHerMqmXFz6aZW9bHWTBCbmHaTLGHATrq5YbarSJai2usbMt86+EJ7aW6bHNJZq61qU5JrplNPnp8OlPNfryHL8xS1/QFRsPsBg5eMH3WyzRYcJ5S0ZWy5grqho/cjG+WjdU51+/adsG3x8fb9AbX1TlEZMmx8D0zP1ld9A4TioeyTcvYoOWxfcJCrEcB0T3Edhqm5clvtg4TRLjGX4c/jblH6h8ztCawRwFjI1tBI0PyKoW4nzvPWZ03zE7tgGhRMf1tx2xPHt6wlNI2a0b/g/k/BV9hgiUXOq8HS5ei43iPSQJ8r6xiVocv4JBwJ79K5WtEOx0Tny0XdD8QfXPT0f0+dmWvKWAHfbqoe8b1MafGpKN0xiLn2r2z+X0GS6JyeW5o5VmPhfIW2b2y5xduDh44CABFqhUBa9nP1xGWw1dqoRUcy8M6JD6CF7mVLbDqOW1uF5vjpeK+YfEYQkCWYYZc4HQyxU+6Veqeme1Jpuc4t4CNFqdcY9g1yzbX2/WL+QCM9QLhzstl90/S1fUdg2FgWQT6EVLbNHpThjNhaa8Hz6e7DgcFVbPTxwNcrk9JgqH9bBkCWYDZPh7uNmWanuhVfhIVaIwOjUzeNfLZ141XPdbcpNX4F/ikyqlsA/6bwAAAABJRU5ErkJggg==",Gn={ruleCheckBox:"ruleCheckBox___Onj2f",folderAreaWrapper:"folderAreaWrapper___ut2mr",folderAreaHeader:"folderAreaHeader___fOIDA",folderWrapper:"folderWrapper___IpJ50",folderIcon:"folderIcon___zBoRM",shareFolderIcon:"shareFolderIcon____5s3p",treeNodeItem:"treeNodeItem___quqla",treeNodeDifficulty:"treeNodeDifficulty___en0gk"},Ht=me(2908),Wt=Object.defineProperty,Zt=Object.defineProperties,yt=Object.getOwnPropertyDescriptors,un=Object.getOwnPropertySymbols,vn=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,nt=(kn,Tn,Qn)=>Tn in kn?Wt(kn,Tn,{enumerable:!0,configurable:!0,writable:!0,value:Qn}):kn[Tn]=Qn,on=(kn,Tn)=>{for(var Qn in Tn||(Tn={}))vn.call(Tn,Qn)&&nt(kn,Qn,Tn[Qn]);if(un)for(var Qn of un(Tn))At.call(Tn,Qn)&&nt(kn,Qn,Tn[Qn]);return kn},fn=(kn,Tn)=>Zt(kn,yt(Tn)),Jn=(kn,Tn,Qn)=>new Promise((zi,Xi)=>{var $i=yi=>{try{ri(Qn.next(yi))}catch(Ji){Xi(Ji)}},Ri=yi=>{try{ri(Qn.throw(yi))}catch(Ji){Xi(Ji)}},ri=yi=>yi.done?zi(yi.value):Promise.resolve(yi.value).then($i,Ri);ri((Qn=Qn.apply(kn,Tn)).next())});const pn=(kn,Tn,Qn)=>kn.map(zi=>zi.key===Tn?on(on({},zi),Qn):zi.children?fn(on({},zi),{children:pn(zi.children,Tn,Qn)}):zi),Rt={\u7B80\u5355:1,\u9002\u4E2D:2,\u56F0\u96BE:3},In=(kn,Tn,Qn)=>kn.map(zi=>{var Xi;const $i=zi==null?void 0:zi.tag_disciplines.map(ri=>{const yi=ri==null?void 0:ri.difficulty_count.map(Ji=>({label:Ji==null?void 0:Ji.name,value:Rt[Ji.name]}));return{title:Pn(Tn)===Nt.All&&yi.length>0?ue.createElement(pt.Z,{justify:"space-between"},ue.createElement(en.Z,null,`${ri.name}\uFF08${ri.child_count}\uFF09`),ue.createElement(en.Z,null,ue.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),ue.createElement(ot.default.Item,{noStyle:!0,name:[`${zi.id}_${ri.id}`,"diffValue"]},ue.createElement(Hn.default.Group,{style:{columnGap:12},options:yi})),ue.createElement(ot.default.Item,{noStyle:!0,name:[`${zi.id}_${ri.id}`,"diffNum"],initialValue:ri==null?void 0:ri.difficulty_count},ue.createElement("input",{type:"hidden"})),ue.createElement(ot.default.Item,{noStyle:!0,name:[`${zi.id}_${ri.id}`,"extra"],initialValue:fn(on({},zi),{type:Qn})},ue.createElement("input",{type:"hidden"})))):`${ri.name}\uFF08${ri.child_count}\uFF09`,key:`${zi.id}_${ri.id}`,name:ri.name,parentName:zi.name,item_banks_count:ri.child_count,icon:null,isLeaf:!0,checkable:Pn(Tn)===Nt.FileFolderAndKnowledge,disableCheckbox:ri.child_count===0}}),Ri=zi==null?void 0:zi.difficulty_count.map(ri=>({label:ri==null?void 0:ri.name,value:Rt[ri.name]}));return{title:Pn(Tn)===Nt.FileFolderAndDiff&&Ri.length>0?ue.createElement(pt.Z,{justify:"space-between"},ue.createElement(en.Z,null,`${zi.name}\uFF08${zi.item_banks_count}\uFF09`),ue.createElement(en.Z,null,ue.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),ue.createElement(ot.default.Item,{noStyle:!0,name:[`${zi.id}`,"diffValue"]},ue.createElement(Hn.default.Group,{style:{columnGap:12},options:Ri})),ue.createElement(ot.default.Item,{noStyle:!0,name:[`${zi.id}`,"diffNum"],initialValue:zi==null?void 0:zi.difficulty_count},ue.createElement("input",{type:"hidden"})),ue.createElement(ot.default.Item,{noStyle:!0,name:[`${zi.id}`,"extra"],initialValue:fn(on({},zi),{type:Qn})},ue.createElement("input",{type:"hidden"})))):`${zi.name}\uFF08${zi.item_banks_count}\uFF09`,key:`${zi.id}`,name:zi.name,item_banks_count:zi.item_banks_count,icon:ri=>ri.expanded?Qn==="0"?ue.createElement("img",{src:Li,className:Gn.folderIcon}):ue.createElement("img",{src:Wi,className:Gn.shareFolderIcon}):Qn==="0"?ue.createElement("img",{src:jn,className:Gn.folderIcon}):ue.createElement("img",{src:ji,className:Gn.shareFolderIcon}),isLeaf:!zi.have_child&&!((Xi=zi.tag_disciplines)!=null&&Xi.length),checkable:Pn(Tn)===Nt.OnlyFileFolder,disableCheckbox:zi.item_banks_count===0,children:zi.children.length?Pn(Tn)===Nt.All||Pn(Tn)===Nt.FileFolderAndKnowledge?[...In(zi.children,Tn,Qn),...$i]:In(zi.children,Tn,Qn):[]}}),Vn=(kn,Tn,Qn)=>kn.map(zi=>{var Xi;const $i=zi==null?void 0:zi.tag_disciplines.map(ri=>{console.log("tagItem:",ri);const yi=ri==null?void 0:ri.difficulty_count.map(Ji=>({label:Ji==null?void 0:Ji.name,value:Rt[Ji.name]}));return{title:Pn(Tn)===Nt.All&&yi.length>0?ue.createElement(pt.Z,{justify:"space-between"},ue.createElement(en.Z,null,`${ri.name}\uFF08${ri.child_count}\uFF09`),ue.createElement(en.Z,null,ue.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),ue.createElement(ot.default.Item,{noStyle:!0,name:[`${zi.id}_${ri.id}`,"diffValue"]},ue.createElement(Hn.default.Group,{style:{columnGap:12},options:yi})),ue.createElement(ot.default.Item,{noStyle:!0,name:[`${zi.id}_${ri.id}`,"diffNum"],initialValue:ri==null?void 0:ri.difficulty_count},ue.createElement("input",{type:"hidden"})),ue.createElement(ot.default.Item,{noStyle:!0,name:[`${zi.id}_${ri.id}`,"extra"],initialValue:fn(on({},zi),{type:Qn})},ue.createElement("input",{type:"hidden"})))):`${ri.name}\uFF08${ri.child_count}\uFF09`,key:`${zi.id}_${ri.id}`,name:ri.name,parentName:zi.name,item_banks_count:ri.child_count,icon:null,isLeaf:!0,checkable:Pn(Tn)===Nt.FileFolderAndKnowledge,disableCheckbox:ri.child_count===0}}),Ri=zi==null?void 0:zi.difficulty_count.map(ri=>({label:ri==null?void 0:ri.name,value:Rt[ri.name]}));return{title:Pn(Tn)===Nt.FileFolderAndDiff&&Ri.length>0?ue.createElement(pt.Z,{justify:"space-between"},ue.createElement(en.Z,null,`${zi.name}\uFF08${zi.item_banks_count}\uFF09`),ue.createElement(en.Z,null,ue.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),ue.createElement(ot.default.Item,{noStyle:!0,name:[`${zi.id}`,"diffValue"]},ue.createElement(Hn.default.Group,{style:{columnGap:12},options:Ri})),ue.createElement(ot.default.Item,{noStyle:!0,name:[`${zi.id}`,"diffNum"],initialValue:zi==null?void 0:zi.difficulty_count},ue.createElement("input",{type:"hidden"})),ue.createElement(ot.default.Item,{noStyle:!0,name:[`${zi.id}`,"extra"],initialValue:fn(on({},zi),{type:Qn})},ue.createElement("input",{type:"hidden"})))):`${zi.name}\uFF08${zi.item_banks_count}\uFF09`,key:`${zi.id}`,name:zi.name,item_banks_count:zi.item_banks_count,icon:ri=>ri.expanded?Qn==="0"?ue.createElement("img",{src:Li,className:Gn.folderIcon}):ue.createElement("img",{src:Wi,className:Gn.shareFolderIcon}):Qn==="0"?ue.createElement("img",{src:jn,className:Gn.folderIcon}):ue.createElement("img",{src:ji,className:Gn.shareFolderIcon}),isLeaf:!zi.have_child&&!((Xi=zi.tag_disciplines)!=null&&Xi.length),checkable:Pn(Tn)===Nt.OnlyFileFolder,disableCheckbox:zi.item_banks_count===0,children:[...Vn(zi.children,Tn,Qn),...$i]}});var tn=({ruleValue:kn,defaultData:Tn,setSelectData:Qn,currentItemType:zi,selectData:Xi})=>{const[$i,Ri]=(0,ue.useState)("1"),[ri,yi]=(0,ue.useState)(!0),[Ji]=ot.default.useForm(),[mr,sa]=(0,ue.useState)([]),[Ma,Qt]=(0,ue.useState)("all"),cn=(Ai,Ki,ir)=>{const{checkedNodes:no}=Ki;console.log("type:",ir,no,Xi),ir==="0"?(dn(Ai),Pn(kn)===Nt.OnlyFileFolder?(Qn(Lo=>fn(on({},Lo),{my:no.map(nr=>({id:nr.key,group_id:nr.key,group_name:nr.name,item_bank_num:nr.item_banks_count,folderType:"0",quanlity:1}))})),Fr(no.reduce((Lo,nr)=>Lo+nr.item_banks_count,0))):(console.log(no),Qn(Lo=>fn(on({},Lo),{my:no.map(nr=>{const[Zr,Mi]=nr.key.split("_");return{id:nr.key,tag_discipline_name:nr.name,group_id:Zr,tag_discipline_id:Mi,folderType:"0",group_name:nr.parentName,item_bank_num:nr.item_banks_count,quanlity:1}})})),Fr(no.reduce((Lo,nr)=>Lo+nr.item_banks_count,0)))):(tr(Ai),Pn(kn)===Nt.OnlyFileFolder?Qn(Lo=>(console.log("pre:",Lo),fn(on({},Lo),{public:no.map(nr=>({id:nr.key==="0"?"00":nr.key,teacher_group_name:nr.name,teacher_group_id:nr.key,folderType:"3",item_bank_num:nr.item_banks_count,quanlity:1}))}))):Qn(Lo=>fn(on({},Lo),{public:no.map(nr=>{const[Zr,Mi]=nr.key.split("_");return{id:nr.key==="0"?"00":nr.key,tag_discipline_name:nr.name,teacher_group_id:Zr,tag_discipline_id:Mi,folderType:"3",teacher_group_name:nr.parentName,item_bank_num:nr.item_banks_count,quanlity:1}})})),Fr(no.reduce((Lo,nr)=>Lo+nr.item_banks_count,0)))},[Jt,dn]=(0,ue.useState)([]),[xi,tr]=(0,ue.useState)([]),[yr,vr]=(0,ue.useState)([]),[br,Lr]=(0,ue.useState)([]),[Mr,zr]=(0,ue.useState)([]),[Sr,Tr]=(0,ue.useState)([]),[ro,ia]=(0,ue.useState)(!1),[da,ur]=(0,ue.useState)(!1);function Go(){return Jn(this,null,function*(){let Ai=yield(0,te.ZP)("/api/teach_group_shares.json",{method:"get"});Ai&&sa(Ai==null?void 0:Ai.groups)})}(0,ue.useEffect)(()=>{Go()},[]);const _t=Ai=>Jn(void 0,null,function*(){var Ki,ir,no,Lo,nr,Zr,Mi,Ca,Ja,wo,Cr,fr;Ai.type==="0"?ia(!0):ur(!0);const Rr=yield(0,Ht.ex)(Ai);Ai.type==="0"?ia(!1):ur(!1),Ai.type==="0"?zr(Rr):Tr(Rr);const pa=(Ki=Rr.navigation[0])==null?void 0:Ki.difficulty_count.map(La=>({label:La==null?void 0:La.name,value:Rt[La.name]})),Is=(ir=Rr.navigation[0])==null?void 0:ir.tag_disciplines.map(La=>{const yl=La==null?void 0:La.difficulty_count.map(Ea=>({label:Ea==null?void 0:Ea.name,value:Rt[Ea.name]}));return{title:Pn(kn)===Nt.All&&yl.length>0?ue.createElement(pt.Z,{justify:"space-between",style:{color:"#232B40"}},ue.createElement(en.Z,null,`${La.name}\uFF08${La.child_count}\uFF09`),ue.createElement(en.Z,null,ue.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),ue.createElement(ot.default.Item,{noStyle:!0,name:[`0_${La.id}`,"diffValue"]},ue.createElement(Hn.default.Group,{style:{columnGap:12},options:yl})),ue.createElement(ot.default.Item,{noStyle:!0,name:[`0_${La.id}`,"diffNum"],initialValue:La==null?void 0:La.difficulty_count},ue.createElement("input",{type:"hidden"})),ue.createElement(ot.default.Item,{noStyle:!0,name:[`0_${La.id}`,"extra"],initialValue:{tag_discipline_name:La.name,name:"\u6839\u76EE\u5F55",type:Ai.type}},ue.createElement("input",{type:"hidden"})))):ue.createElement("span",{style:{color:"#232B40"}},La.name,"\uFF08",La.child_count,"\uFF09"),key:`0_${La.id}`,name:La.name,parentName:"\u6839\u76EE\u5F55",item_banks_count:La.child_count,icon:null,isLeaf:!0,checkable:Pn(kn)===Nt.FileFolderAndKnowledge,disableCheckbox:La.child_count===0}});if(Ai.type==="0"){const La=In(Rr.data,kn,"0"),yl=Vn(Rr.data,kn,"0");console.log("normalChildren2:",yl),vr([{title:Pn(kn)===Nt.FileFolderAndDiff?ue.createElement(pt.Z,{justify:"space-between",style:{color:"#232B40"}},ue.createElement(en.Z,null,`\u6839\u76EE\u5F55\uFF08${(no=Rr.navigation[0])==null?void 0:no.child_count}\uFF09`),ue.createElement(en.Z,null,ue.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),ue.createElement(ot.default.Item,{noStyle:!0,name:["0","diffValue"],initialValue:[]},ue.createElement(Hn.default.Group,{style:{columnGap:12},options:pa})),ue.createElement(ot.default.Item,{noStyle:!0,name:["0","diffNum"],initialValue:(Lo=Rr.navigation[0])==null?void 0:Lo.difficulty_count},ue.createElement("input",{type:"hidden"})),ue.createElement(ot.default.Item,{noStyle:!0,name:["0","extra"],initialValue:{type:"0",group_id:"0",name:"\u6839\u76EE\u5F55"}},ue.createElement("input",{type:"hidden"})))):ue.createElement("span",{style:{color:"#232B40"}},`\u6839\u76EE\u5F55\uFF08${(nr=Rr.navigation[0])==null?void 0:nr.child_count}\uFF09`),key:"0",name:"\u6839\u76EE\u5F55",item_banks_count:(Zr=Rr.navigation[0])==null?void 0:Zr.child_count,disabled:!(((Mi=Rr.navigation[0])==null?void 0:Mi.child_count)>0),checkable:Pn(kn)===Nt.OnlyFileFolder,icon:Ea=>Ea.expanded?ue.createElement("img",{src:Li,className:Gn.folderIcon}):ue.createElement("img",{src:jn,className:Gn.folderIcon}),isLeaf:!1,children:Pn(kn)===Nt.OnlyFileFolder||Pn(kn)===Nt.FileFolderAndDiff?La:[...yl,...Is]}])}else{const La=In(Rr.data,kn,"3");Lr([{title:Pn(kn)===Nt.FileFolderAndDiff?ue.createElement(pt.Z,{justify:"space-between"},ue.createElement(en.Z,null,`\u6839\u76EE\u5F55\uFF08${(Ca=Rr.navigation[0])==null?void 0:Ca.child_count}\uFF09`),ue.createElement(en.Z,null,ue.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),ue.createElement(ot.default.Item,{noStyle:!0,name:["0","diffValue"]},ue.createElement(Hn.default.Group,{style:{columnGap:12},options:pa})),ue.createElement(ot.default.Item,{noStyle:!0,name:["0","diffNum"],initialValue:(Ja=Rr.navigation[0])==null?void 0:Ja.difficulty_count},ue.createElement("input",{type:"hidden"})),ue.createElement(ot.default.Item,{noStyle:!0,name:["0","extra"],initialValue:{type:"3",group_id:"0",name:"\u6839\u76EE\u5F55"}},ue.createElement("input",{type:"hidden"})))):ue.createElement("span",{style:{color:"#232B40"}},`\u6839\u76EE\u5F55\uFF08${(wo=Rr.navigation[0])==null?void 0:wo.child_count}\uFF09`),key:"0",name:"\u6839\u76EE\u5F55",item_banks_count:(Cr=Rr.navigation[0])==null?void 0:Cr.child_count,checkable:Pn(kn)===Nt.OnlyFileFolder,icon:yl=>yl.expanded?ue.createElement("img",{src:Wi,className:Gn.shareFolderIcon}):ue.createElement("img",{src:ji,className:Gn.shareFolderIcon}),isLeaf:!1,disabled:!(((fr=Rr.navigation[0])==null?void 0:fr.child_count)>0),children:Pn(kn)===Nt.OnlyFileFolder||Pn(kn)===Nt.FileFolderAndDiff?La:[...La,...Is]}])}});(0,ue.useEffect)(()=>{$i==="1"?_t({type:"0",group_id:0,item_type:zi,show_children:!0}):$i==="2"&&_t({type:"3",except_mine:!0,item_type:zi,show_children:!0,teach_group_id:Ma==="all"?"":Ma})},[kn,$i,Ma]),(0,ue.useEffect)(()=>{var Ai,Ki,ir,no,Lo,nr,Zr,Mi,Ca,Ja,wo,Cr;console.log("selectData-active:",Xi,Tn,$i),$i==="1"?(dn((Ai=Xi==null?void 0:Xi.my)==null?void 0:Ai.map(fr=>fr.id)),Fr(((ir=(Ki=Xi==null?void 0:Xi.my)==null?void 0:Ki.reduce)==null?void 0:ir.call(Ki,(fr,Rr)=>fr+Rr.item_bank_num,0))||0)):$i==="2"&&(tr((no=Xi==null?void 0:Xi.public)==null?void 0:no.map(fr=>fr.id)),Fr(((nr=(Lo=Xi==null?void 0:Xi.public)==null?void 0:Lo.reduce)==null?void 0:nr.call(Lo,(fr,Rr)=>fr+Rr.item_bank_num,0))||0)),Pn(kn)===Nt.All&&($i==="1"?(dn((Zr=Xi==null?void 0:Xi.my)==null?void 0:Zr.map(fr=>fr.id)),Fr((Xi==null?void 0:Xi.filter(fr=>!fr.is_share).reduce((fr,Rr)=>fr+Rr.item_bank_num,0))||0),(Mi=Xi==null?void 0:Xi.filter(fr=>!fr.is_share))==null||Mi.forEach(fr=>{const Rr=Ji.getFieldValue([`${fr.group_id||0}_${fr.tag_discipline_id}`,"diffValue"])||[];console.log("prev:",Rr),Rr!=null&&Rr.includes[fr.difficulty]||Ji.setFieldValue([`${fr.group_id||0}_${fr.tag_discipline_id}`,"diffValue"],Array.from(new Set([...Rr,fr.difficulty])))})):$i==="2"&&(tr((Ca=Xi==null?void 0:Xi.public)==null?void 0:Ca.map(fr=>fr.id)),Fr((Xi==null?void 0:Xi.filter(fr=>!!fr.is_share).reduce((fr,Rr)=>fr+Rr.item_bank_num,0))||0),(Ja=Xi==null?void 0:Xi.filter(fr=>!!fr.is_share))==null||Ja.forEach(fr=>{const Rr=Ji.getFieldValue([`${fr.teacher_group_id||0}_${fr.tag_discipline_id}`,"diffValue"])||[];Rr!=null&&Rr.includes[fr.difficulty]||Ji.setFieldValue([`${fr.teacher_group_id||0}_${fr.tag_discipline_id}`,"diffValue"],Array.from(new Set([...Rr,fr.difficulty])))}))),Pn(kn)===Nt.FileFolderAndDiff&&(Ji.resetFields(),setTimeout(()=>{Qn(Xi)},300),$i==="1"?(Fr((Xi==null?void 0:Xi.filter(fr=>!fr.is_share).reduce((fr,Rr)=>fr+Rr.item_bank_num,0))||0),(wo=Xi==null?void 0:Xi.filter(fr=>!fr.is_share))==null||wo.forEach(fr=>{const Rr=Ji.getFieldValue([`${fr.group_id}`,"diffValue"])||[];console.log("prev:",Rr),Rr!=null&&Rr.includes[fr.difficulty]||Ji.setFieldValue([`${fr.group_id}`,"diffValue"],Array.from(new Set([...Rr,fr.difficulty])))})):(Fr((Xi==null?void 0:Xi.filter(fr=>!!fr.is_share).reduce((fr,Rr)=>fr+Rr.item_bank_num,0))||0),(Cr=Xi==null?void 0:Xi.filter(fr=>!!fr.is_share))==null||Cr.forEach(fr=>{const Rr=Ji.getFieldValue([`${fr.teacher_group_id}`,"diffValue"])||[];Rr!=null&&Rr.includes[fr.difficulty]||Ji.setFieldValue([`${fr.teacher_group_id}`,"diffValue"],Array.from(new Set([...Rr,fr.difficulty])))})))},[$i]),console.log("1111111111:",Jt,xi),(0,ue.useEffect)(()=>{setTimeout(()=>{var Ai,Ki,ir,no,Lo;switch(Pn(kn)){case Nt.OnlyFileFolder:{const nr=[],Zr=[];for(const Mi of Xi.my||[])nr.push(Mi);for(const Mi of Xi.public||[])Zr.push(Mi);dn(nr.map(Mi=>`${Mi.group_id}`)),tr(Zr.map(Mi=>`${Mi.teacher_group_id}`)),Fr($i==="1"?nr.reduce((Mi,Ca)=>Mi+Ca.item_bank_num,0):Zr.reduce((Mi,Ca)=>Mi+Ca.item_bank_num,0));break}case Nt.FileFolderAndKnowledge:{const nr=[],Zr=[];for(const Mi of(Xi==null?void 0:Xi.my)||[])nr.push(Mi);for(const Mi of(Xi==null?void 0:Xi.public)||[])Zr.push(Mi);Fr((Ai=$i==="1"?nr:Zr)==null?void 0:Ai.reduce((Mi,Ca)=>Mi+Ca.item_bank_num,0)),dn(nr.map(Mi=>`${Mi.group_id}_${Mi.tag_discipline_id}`)),tr(Zr.map(Mi=>`${Mi.teacher_group_id}_${Mi.tag_discipline_id}`));break}case Nt.All:{$i==="1"?(Fr((Xi==null?void 0:Xi.filter(nr=>!nr.is_share).reduce((nr,Zr)=>nr+Zr.item_bank_num,0))||0),(Ki=Xi==null?void 0:Xi.filter(nr=>!nr.is_share))==null||Ki.forEach(nr=>{const Zr=Ji.getFieldValue([`${nr.group_id||0}_${nr.tag_discipline_id}`,"diffValue"])||[];console.log("prev:",Zr,nr.difficulty,nr),Zr!=null&&Zr.includes[nr.difficulty]||Ji.setFieldValue([`${nr.group_id||0}_${nr.tag_discipline_id}`,"diffValue"],Array.from(new Set([...Zr,nr.difficulty])))})):(Fr((Xi==null?void 0:Xi.filter(nr=>!!nr.is_share).reduce((nr,Zr)=>nr+Zr.item_bank_num,0))||0),(ir=Xi==null?void 0:Xi.filter(nr=>!!nr.is_share))==null||ir.forEach(nr=>{const Zr=Ji.getFieldValue([`${nr.group_id||0}_${nr.tag_discipline_id}`,"diffValue"])||[];console.log("prev:",Zr,nr.difficulty,nr),Zr!=null&&Zr.includes[nr.difficulty]||Ji.setFieldValue([`${nr.group_id||0}_${nr.tag_discipline_id}`,"diffValue"],Array.from(new Set([...Zr,nr.difficulty])))}));break}case Nt.FileFolderAndDiff:{$i==="1"?(Fr((Xi==null?void 0:Xi.filter(nr=>!nr.is_share).reduce((nr,Zr)=>nr+Zr.item_bank_num,0))||0),(no=Xi==null?void 0:Xi.filter(nr=>!nr.is_share))==null||no.forEach(nr=>{const Zr=Ji.getFieldValue([`${nr.group_id}`,"diffValue"])||[];console.log("prev:",Zr,nr.difficulty),Zr!=null&&Zr.includes[nr.difficulty]||Ji.setFieldValue([`${nr.group_id}`,"diffValue"],Array.from(new Set([...Zr,nr.difficulty])))})):(Fr((Xi==null?void 0:Xi.filter(nr=>!!nr.is_share).reduce((nr,Zr)=>nr+Zr.item_bank_num,0))||0),(Lo=Xi==null?void 0:Xi.filter(nr=>!!nr.is_share))==null||Lo.forEach(nr=>{const Zr=Ji.getFieldValue([`${nr.group_id}`,"diffValue"])||[];Zr!=null&&Zr.includes[nr.difficulty]||Ji.setFieldValue([`${nr.group_id}`,"diffValue"],Array.from(new Set([...Zr,nr.difficulty])))}));break}}},800)},[Tn,kn,yr,br]);const[Zn,Fr]=(0,ue.useState)(0);return ue.createElement(ot.default,{form:Ji,onValuesChange:(Ai,Ki)=>Jn(void 0,null,function*(){var ir,no,Lo,nr;console.log("onValuesChange:",Ki,Ai);let Zr=0;if(Pn(kn)===Nt.FileFolderAndDiff){const Mi=yield Ji.getFieldValue(),Ca=[],Ja=[];for(const Cr of Object.keys(Mi))if((no=(ir=Mi[Cr])==null?void 0:ir.diffValue)!=null&&no.length&&Cr!=="null"&&Cr!==null){const fr=Mi[Cr];Ca.push(on({id:Cr},fr))}const wo={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"};Ca.map(Cr=>{var fr,Rr,pa,Is,La;Cr.id==0&&(Cr.diffNum=$i==="1"?(Rr=(fr=Mr==null?void 0:Mr.navigation)==null?void 0:fr[0])==null?void 0:Rr.difficulty_count:(Is=(pa=Sr==null?void 0:Sr.navigation)==null?void 0:pa[0])==null?void 0:Is.difficulty_count),(La=Cr==null?void 0:Cr.diffValue)==null||La.map(yl=>{var Ea,Js,Ha,ts,Ms;const Rs={group_name:((Ea=Cr.extra)==null?void 0:Ea.name)||"",teacher_group_name:"",id:`${Cr.id}_${yl}`,group_id:Cr.id,difficulty:yl,item_bank_num:(ts=(Ha=(Js=Cr.diffNum)==null?void 0:Js.filter(ns=>ns.name===wo[yl]))==null?void 0:Ha[0])==null?void 0:ts.value};$i==="2"&&(Rs.is_share=!0,Rs.teacher_group_id=Cr.id,Rs.teacher_group_name=(Ms=Cr.extra)==null?void 0:Ms.name),Ja.push(Rs)})}),Zr=Ja.reduce((Cr,fr)=>Cr+fr.item_bank_num,0),Qn([...Ja,...Xi==null?void 0:Xi.filter(Cr=>$i==="1"?Cr.is_share:!Cr.is_share)])}else if(Pn(kn)===Nt.All){const Mi=[];for(const Ca of Object.keys(Ki)){const{diffNum:Ja=[],diffValue:wo=[],extra:Cr={}}=Ki[Ca];console.log("---",Cr);const[fr,Rr]=Ca.split("_");let pa=(nr=(Lo=Cr.tag_disciplines)==null?void 0:Lo.filter(Is=>parseInt(Is.id)===parseInt(Rr)))==null?void 0:nr[0];wo.forEach(Is=>{var La;const yl={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},Ea=(La=Ja==null?void 0:Ja.find(Ha=>Ha.name===yl[Is]))==null?void 0:La.value,Js={group_name:"",teacher_group_name:"",tag_discipline_name:(pa==null?void 0:pa.name)||Cr.tag_discipline_name,id:`${Ca}_${Is}`,group_id:fr,is_share:!!(pa!=null&&pa.is_share||(Cr==null?void 0:Cr.type)==="3"),tag_discipline_id:Rr,difficulty:Is,item_bank_num:Ea};Zr+=Ea,Cr.type==="0"?Js.group_name=Cr.name:Js.teacher_group_name=Cr.name,$i==="2"&&(Js.is_share=!0,Js.teacher_group_id=Cr.id||0,Js.teacher_group_name=Cr.name),Ea>0&&Mi.push(Js)})}Qn([...Mi,...Xi==null?void 0:Xi.filter(Ca=>$i==="1"?Ca.is_share:!Ca.is_share)])}Fr(Zr)})},ue.createElement(Be.default,{destroyInactiveTabPane:!0,activeKey:$i,onChange:Ai=>Ri(Ai),style:{minHeight:260},tabBarExtraContent:{right:$i==="2"&&(mr==null?void 0:mr.length)>0&&ue.createElement(Xr.default,{onChange:Ai=>{Qt(Ai)},value:Ma,style:{width:120}},ue.createElement(Xr.default.Option,{key:"all",value:"all"},"\u5168\u90E8"),mr==null?void 0:mr.map(Ai=>ue.createElement(Xr.default.Option,{key:Ai==null?void 0:Ai.group_id,value:Ai==null?void 0:Ai.group_id},Ai==null?void 0:Ai.name)))},items:[{key:"1",label:"\u6211\u521B\u5EFA\u7684",children:(yr==null?void 0:yr.length)===0?ue.createElement(Mt.Z,{spinning:ro},ue.createElement(ai.Z,{ButtonTwo:ue.createElement("a",{target:"_blank",href:"/problemset"},"\u524D\u5F80\u9898\u5E93\uFF0C\u65B0\u589E\u66F4\u591A\u8BD5\u9898",">")})):ue.createElement("div",{className:Gn.folderAreaWrapper},ue.createElement(pt.Z,{justify:"space-between",align:"middle",className:Gn.folderAreaHeader},ue.createElement("span",null,"\u6587\u4EF6\u5939"),ue.createElement("span",{className:"mr20"},"\u5DF2\u9009",ue.createElement("span",{style:{color:"#3061D0"}}," ",Zn," "),"\u9898")),ue.createElement(Mt.Z,{spinning:ro},ue.createElement("div",{style:{minHeight:200}},yr.length>0&&ue.createElement(Hr.default,{checkable:!0,className:Gn.folderWrapper,rootStyle:{paddingLeft:15,paddingRight:0,paddingTop:10},selectable:!1,onCheck:(Ai,Ki)=>cn(Ai,Ki,"0"),checkedKeys:Jt,checkStrictly:!0,treeData:yr,showIcon:!0,blockNode:!0,defaultExpandAll:!0}))))},{key:"2",label:"\u56E2\u961F\u5171\u4EAB",children:(br==null?void 0:br.length)===0?ue.createElement(Mt.Z,{spinning:da},ue.createElement(ai.Z,{ButtonTwo:ue.createElement("a",{target:"_blank",href:"/problemset"},"\u524D\u5F80\u9898\u5E93\uFF0C\u65B0\u589E\u66F4\u591A\u8BD5\u9898",">")})):ue.createElement("div",{className:Gn.folderAreaWrapper},ue.createElement(pt.Z,{justify:"space-between",align:"middle",className:Gn.folderAreaHeader},ue.createElement("span",null,"\u6587\u4EF6\u5939"),ue.createElement("span",{className:"mr20"},"\u5DF2\u9009",ue.createElement("span",{style:{color:"#3061D0"}}," ",Zn||0," "),"\u9898")),ue.createElement(Mt.Z,{spinning:da},ue.createElement("div",{style:{minHeight:200}},(br==null?void 0:br.length)>0&&ue.createElement(Hr.default,{checkable:!0,className:Gn.folderWrapper,selectable:!1,rootStyle:{paddingLeft:15,paddingRight:0,paddingTop:10},onCheck:(Ai,Ki)=>cn(Ai,Ki,"3"),checkedKeys:xi,checkStrictly:!0,treeData:br,showIcon:!0,blockNode:!0,defaultExpandAll:!0}))))}]}))},hn=me(69831),Rn=me(35427),Oi=Object.defineProperty,Ii=Object.defineProperties,Si=Object.getOwnPropertyDescriptors,Ni=Object.getOwnPropertySymbols,Zi=Object.prototype.hasOwnProperty,sr=Object.prototype.propertyIsEnumerable,Wr=(kn,Tn,Qn)=>Tn in kn?Oi(kn,Tn,{enumerable:!0,configurable:!0,writable:!0,value:Qn}):kn[Tn]=Qn,li=(kn,Tn)=>{for(var Qn in Tn||(Tn={}))Zi.call(Tn,Qn)&&Wr(kn,Qn,Tn[Qn]);if(Ni)for(var Qn of Ni(Tn))sr.call(Tn,Qn)&&Wr(kn,Qn,Tn[Qn]);return kn},Vi=(kn,Tn)=>Ii(kn,Si(Tn)),vo=(kn,Tn,Qn)=>new Promise((zi,Xi)=>{var $i=yi=>{try{ri(Qn.next(yi))}catch(Ji){Xi(Ji)}},Ri=yi=>{try{ri(Qn.throw(yi))}catch(Ji){Xi(Ji)}},ri=yi=>yi.done?zi(yi.value):Promise.resolve(yi.value).then($i,Ri);ri((Qn=Qn.apply(kn,Tn)).next())});const Qr={\u7B80\u5355:1,\u9002\u4E2D:2,\u56F0\u96BE:3};var qt=({ruleValue:kn,setSelectData:Tn,currentItemType:Qn,defaultData:zi,isFirst:Xi})=>{const[$i,Ri]=(0,ue.useState)([]),[ri,yi,Ji,mr]=(0,Rn.U)(Xe,{source:"question",page:1,per_page:10,group_id:0,keyword:"",group_type:0,clazz:"ItemBanksGroup",sub_discipline_id:void 0,item_type:Qn,show_children:!0});(0,ue.useEffect)(()=>{vo(void 0,null,function*(){const xi=yield Ji({},!0);Ri((0,hn.L)(xi.disciplines))})},[]),console.log(zi),(0,ue.useEffect)(()=>{if(Xi)switch(Pn(kn)){case Nt.OnlyKnowledge:{Jt(zi.map(xi=>xi.tag_discipline_id));break}case Nt.KnowledgeAndDiff:{const xi=new Map;zi.forEach(tr=>{tr&&(xi.has(tr.tag_discipline_id)?xi.set(tr.tag_discipline_id,[...xi.get(tr.tag_discipline_id),tr.difficulty]):xi.set(tr.tag_discipline_id,[tr.difficulty]))});for(const[tr,yr]of xi.entries())sa.setFieldValue([tr,"diff"],yr);break}}},[zi,kn,Xi]);const[sa]=ot.default.useForm(),Ma=(0,ue.useMemo)(()=>{const xi=[];let tr="",yr="";const vr={};for(const br of(mr==null?void 0:mr.disciplines)||[]){tr=br.name;for(const Lr of br.sub_disciplines){yr=Lr.name;for(const Mr of Lr.tag_disciplines){const zr={sub_discipline_name:`${tr}&${yr}`,sub_discipline_id:Lr.id,tag_discipline_name:Mr.name,id:Mr.id,item_bank_num:Mr.total_count,difficulty_count:Mr.difficulty_count,tag_discipline_id:Mr.id};xi.push(zr)}}}return xi},[mr,zi]),Qt=[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",show:!0,render:(xi,tr)=>{const{item_bank_num:yr}=tr;return ue.createElement("div",null,xi,`(${yr})`)}},{title:"\u65B9\u5411&\u8BFE\u7A0B",dataIndex:"sub_discipline_name",ellipsis:!0,show:!0},{title:"\u96BE\u5EA6",width:"35%",show:kn.includes(sn.Difficulty),render:(xi,tr)=>{const{id:yr,difficulty_count:vr,total_count:br,sub_discipline_name:Lr,tag_discipline_name:Mr}=tr;return ue.createElement(ue.Fragment,null,ue.createElement(ot.default.Item,{name:[yr,"diff"],noStyle:!0},ue.createElement(Hn.default.Group,{style:{columnGap:12},options:vr.map(zr=>({label:zr.name,value:Qr[zr.name]}))})),ue.createElement(ot.default.Item,{name:[yr,"extra"],initialValue:{difficulty_count:vr,total_count:br,sub_discipline_name:Lr,tag_discipline_name:Mr},noStyle:!0},ue.createElement("input",{type:"hidden"})))}}].filter(xi=>xi.show),[cn,Jt]=(0,ue.useState)([]),dn=(0,ue.useRef)(new Map);return ue.createElement("div",{style:{marginTop:12}},ue.createElement(pt.Z,{className:"mb20",align:"middle",gutter:20},ue.createElement(en.Z,null,ue.createElement(Ye.Z,{placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",size:"large",style:{width:240},options:$i,onChange:xi=>{Ji({sub_discipline_id:xi==null?void 0:xi[1]})}})),ue.createElement(en.Z,null,ue.createElement(_n.t7,{style:{width:300},placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\u8FDB\u884C\u641C\u7D22",value:ri.keyword,onChange:xi=>Ji({keyword:xi})}))),ue.createElement(ot.default,{form:sa,onValuesChange:(xi,tr)=>{var yr;console.log(tr),dn.current.clear();for(const vr of Object.keys(tr)){const br={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},Lr=tr[vr],{difficulty_count:Mr,total_count:zr}=Lr.extra||{};(yr=Lr==null?void 0:Lr.diff)==null||yr.forEach(Sr=>{var Tr;const ro=(Tr=Mr==null?void 0:Mr.find(da=>da.name===br[Sr]))==null?void 0:Tr.value,ia=Vi(li({},Lr.extra),{id:`${vr}_${Sr}`,difficulty:Sr,item_bank_num:ro,tag_discipline_id:vr});ro>0&&dn.current.set(`${vr}_${Sr}`,ia)})}Tn([...dn.current.values()])}},(Ma==null?void 0:Ma.length)===0?ue.createElement(ai.Z,{ButtonTwo:ue.createElement("a",{target:"_blank",href:"/problemset"},"\u524D\u5F80\u9898\u5E93\uFF0C\u65B0\u589E\u66F4\u591A\u8BD5\u9898",">")}):ue.createElement(cr.default,{rowSelection:Pn(kn)===Nt.OnlyKnowledge?{preserveSelectedRowKeys:!0,type:"checkbox",onChange(xi,tr){console.log("table-selectedRowKeys:",xi,tr),Jt(xi),Tn(tr)},getCheckboxProps:xi=>({disabled:xi.item_bank_num===0}),selectedRowKeys:cn}:void 0,columns:Qt,dataSource:Ma,loading:yi,scroll:{y:480},rowKey:"id",pagination:!1})))},pi=Object.defineProperty,pr=Object.defineProperties,qi=Object.getOwnPropertyDescriptors,$r=Object.getOwnPropertySymbols,Ar=Object.prototype.hasOwnProperty,io=Object.prototype.propertyIsEnumerable,Kr=(kn,Tn,Qn)=>Tn in kn?pi(kn,Tn,{enumerable:!0,configurable:!0,writable:!0,value:Qn}):kn[Tn]=Qn,jr=(kn,Tn)=>{for(var Qn in Tn||(Tn={}))Ar.call(Tn,Qn)&&Kr(kn,Qn,Tn[Qn]);if($r)for(var Qn of $r(Tn))io.call(Tn,Qn)&&Kr(kn,Qn,Tn[Qn]);return kn},yo=(kn,Tn)=>pr(kn,qi(Tn)),$n=(kn,Tn,Qn)=>new Promise((zi,Xi)=>{var $i=yi=>{try{ri(Qn.next(yi))}catch(Ji){Xi(Ji)}},Ri=yi=>{try{ri(Qn.throw(yi))}catch(Ji){Xi(Ji)}},ri=yi=>yi.done?zi(yi.value):Promise.resolve(yi.value).then($i,Ri);ri((Qn=Qn.apply(kn,Tn)).next())});const Xo={\u7B80\u5355:1,\u9002\u4E2D:2,\u56F0\u96BE:3};var Io=({open:kn,onCancel:Tn,setVisibleModalType:Qn,currentItemType:zi})=>{var Xi;const{data:$i,dispatch:Ri}=(0,ue.useContext)(Lt),[ri,yi]=(0,ue.useState)([]),[Ji,mr]=(0,ue.useState)(),sa=(Xi=$i==null?void 0:$i.item_types)==null?void 0:Xi.find(yr=>yr.item_type===zi);(0,ue.useEffect)(()=>{var yr,vr,br;if(kn){const Lr=(yr=$i==null?void 0:$i.item_types)==null?void 0:yr.find(Mr=>Mr.item_type===zi);if((Lr==null?void 0:Lr.random_rule_type)!==Nt.Shixun){const Mr=ti[Lr==null?void 0:Lr.random_rule_type]||[];yi(Mr);const zr=(br=(vr=$i==null?void 0:$i.item_types)==null?void 0:vr.find(Sr=>Sr.item_type===zi))==null?void 0:br.contents;switch(console.log("----xxx",Pn(Mr)),Pn(Mr)){case Nt.OnlyDifficulty:{Jt(zr.map(Sr=>Sr.difficulty));break}case Nt.OnlyFileFolder:{Jt({my:zr==null?void 0:zr.filter(Sr=>parseInt(Sr.teacher_group_id)!=="NaN"&&!Sr.teacher_group_id&&Sr.teacher_group_id!==0),public:zr==null?void 0:zr.filter(Sr=>parseInt(Sr.teacher_group_id)>=0)}),mr({my:zr==null?void 0:zr.filter(Sr=>parseInt(Sr.teacher_group_id)!=="NaN"&&!Sr.teacher_group_id&&Sr.teacher_group_id!==0),public:zr==null?void 0:zr.filter(Sr=>parseInt(Sr.teacher_group_id)>=0)});break}case Nt.FileFolderAndKnowledge:{Jt({my:zr==null?void 0:zr.filter(Sr=>parseInt(Sr.teacher_group_id)!=="NaN"&&!Sr.teacher_group_id&&Sr.teacher_group_id!==0),public:zr==null?void 0:zr.filter(Sr=>parseInt(Sr.teacher_group_id)>=0)}),mr({my:zr==null?void 0:zr.filter(Sr=>parseInt(Sr.teacher_group_id)!=="NaN"&&!Sr.teacher_group_id&&Sr.teacher_group_id!==0),public:zr==null?void 0:zr.filter(Sr=>parseInt(Sr.teacher_group_id)>=0)});break}case Nt.FileFolderAndDiff:{Jt(zr),mr(zr);break}case Nt.All:{Jt(zr),mr(zr);break}default:Jt(zr)}}}},[kn]);const[Ma,Qt]=(0,ue.useState)([]);(0,ue.useEffect)(()=>{kn&&Je({item_type:zi}).then(yr=>{yr.status===0&&Qt(yr.data)})},[kn]),(0,ue.useEffect)(()=>{console.log("selectData",Ji)},[Ji]);const[cn,Jt]=(0,ue.useState)(),[dn,xi]=(0,ue.useState)(!0);console.log("isFirst:",dn);const tr=yr=>{yi(yr),mr([]),Jt([]),xi(!1)};return ue.createElement(bn.default,{title:"\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219",width:948,closable:!0,centered:!0,open:kn,onCancel:Tn,destroyOnClose:!0,onOk:()=>$n(void 0,null,function*(){var yr,vr,br,Lr,Mr,zr,Sr;if(Ji===void 0){Qn("");return}if(Object.prototype.toString.call(Ji)==="[object Object]"&&!((yr=Ji.my)!=null&&yr.length)&&!((vr=Ji.public)!=null&&vr.length)){Ze.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}if(!Object.keys(Ji).length&&!(Ji!=null&&Ji.length)){Ze.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}const Tr=Pn(ri);switch(Tr){case Nt.OnlyFileFolder:{Ri({type:"editRule",payload:{itemType:zi,tableData:[...Ji.my||[],...Ji.public||[]],randomRuleType:Tr}});break}case Nt.OnlyDifficulty:{const ro=(Lr=(br=$i==null?void 0:$i.item_types)==null?void 0:br.find(da=>da.item_type===zi))==null?void 0:Lr.contents;let ia=[{},{value:(Mr=Ma.find(da=>da.name==="\u7B80\u5355"))==null?void 0:Mr.value},{value:(zr=Ma.find(da=>da.name==="\u9002\u4E2D"))==null?void 0:zr.value},{value:(Sr=Ma.find(da=>da.name==="\u56F0\u96BE"))==null?void 0:Sr.value}];Ri({type:"editRule",payload:{itemType:zi,tableData:Ji.map((da,ur)=>{var Go,_t,Zn,Fr;return{difficulty:da,id:ur,quanlity:((_t=(Go=ro==null?void 0:ro.filter(Ai=>Ai.id===ur))==null?void 0:Go[0])==null?void 0:_t.quanlity)||1,item_bank_num:(Ma==null?void 0:Ma.length)===1?(Zn=Ma[0])==null?void 0:Zn.value:(Fr=ia==null?void 0:ia[da])==null?void 0:Fr.value}}),randomRuleType:Tr}});break}case Nt.OnlyKnowledge:{Ri({type:"editRule",payload:{itemType:zi,tableData:Ji.map(ro=>yo(jr({},ro),{quanlity:ro.quanlity||1})),randomRuleType:Tr}});break}case Nt.KnowledgeAndDiff:{Ri({type:"editRule",payload:{itemType:zi,tableData:Ji.map(ro=>yo(jr({},ro),{quanlity:ro.quanlity||1})),randomRuleType:Tr}});break}case Nt.FileFolderAndDiff:{Ri({type:"editRule",payload:{itemType:zi,tableData:Ji.map(ro=>yo(jr({},ro),{quanlity:ro.quanlity||1})),randomRuleType:Tr}});break}case Nt.FileFolderAndKnowledge:{Ri({type:"editRule",payload:{itemType:zi,tableData:[...Ji.my||[],...Ji.public||[]],randomRuleType:Tr}});break}case Nt.All:{Ri({type:"editRule",payload:{itemType:zi,tableData:Ji.map(ro=>yo(jr({},ro),{quanlity:ro.quanlity||1})),randomRuleType:Tr}});break}}Qn("")})},ue.createElement(Hn.default.Group,{className:`${Gn.ruleCheckBox}`,style:{marginBottom:8},value:ri,onChange:yr=>{var vr;ri!=null&&ri.length&&((vr=sa==null?void 0:sa.contents)==null?void 0:vr.length)>0?bn.default.confirm({title:"\u63D0\u793A",content:"\u5207\u6362\u89C4\u5219\u540E\uFF0C\u4E4B\u524D\u7684\u62BD\u9898\u914D\u7F6E\u5C06\u88AB\u6E05\u7A7A\uFF01",okText:"\u7ACB\u5373\u5207\u6362",cancelText:"\u6682\u4E0D\u5207\u6362",onOk:()=>tr(yr)}):tr(yr)},options:[{label:"\u6307\u5B9A\u6587\u4EF6\u5939\u62BD\u9898",value:sn.FileFolder},{label:"\u6307\u5B9A\u96BE\u5EA6\u62BD\u9898",value:sn.Difficulty},{label:"\u6307\u5B9A\u77E5\u8BC6\u70B9\u62BD\u9898",value:sn.Knowledge}]}),ri.includes(sn.FileFolder)?ue.createElement(tn,{defaultData:cn,selectData:Ji,ruleValue:ri,setSelectData:mr,currentItemType:zi}):ri.includes(sn.Knowledge)?ue.createElement(qt,{defaultData:cn,isFirst:dn,ruleValue:ri,setSelectData:mr,currentItemType:zi}):ri.includes(sn.Difficulty)?ue.createElement("div",{style:{marginTop:12}},ue.createElement("span",{className:"mr20",style:{color:"#666"}},"\u96BE\u5EA6"),ue.createElement(Hn.default.Group,{style:{columnGap:12},options:Ma.map(yr=>({label:yr.name,value:Xo[yr.name]})),value:Ji||cn,onChange:yr=>mr(yr)})):null)},Yi=({open:kn,onCancel:Tn,setVisibleModalType:Qn,currentItemType:zi})=>kn?ue.createElement(Io,{open:kn,onCancel:Tn,setVisibleModalType:Qn,currentItemType:zi}):null,ua=me(6848),Zo=me(81349),Dr=(kn,Tn,Qn)=>new Promise((zi,Xi)=>{var $i=yi=>{try{ri(Qn.next(yi))}catch(Ji){Xi(Ji)}},Ri=yi=>{try{ri(Qn.throw(yi))}catch(Ji){Xi(Ji)}},ri=yi=>yi.done?zi(yi.value):Promise.resolve(yi.value).then($i,Ri);ri((Qn=Qn.apply(kn,Tn)).next())});const Ir=()=>{const[kn,Tn]=(0,ue.useState)([]);return(0,ue.useEffect)(()=>{Dr(void 0,null,function*(){const zi=yield(0,Zo.d1)({source:"question"});zi!=null&&zi.disciplines&&Tn((0,hn.L)(zi==null?void 0:zi.disciplines))})},[]),kn};var Do=me(16597),_o=me(25711),Ti=me(58130),tt=me(86902),jo=me(72194),$a=({open:kn,onCancel:Tn,onOk:Qn})=>{const{data:zi}=(0,ue.useContext)(Lt),Xi=Ir(),[$i,Ri,ri,yi]=(0,Rn.U)(Do.Gm,{page:1,limit:10,keyword:"",diff:"",shixun_publish_status:"",discipline_id:"",sub_discipline_id:"",type:0,include_shixuns:!0,item_type:"SHIXUN"}),[Ji,mr]=(0,ue.useState)(!1);(0,ue.useEffect)(()=>{if(kn){ri({page:1,limit:10,type:0},!0).then(dn=>{(dn==null?void 0:dn.shixuns_count)===0&&mr(!0)});const Jt=zi.item_types.find(dn=>dn.item_type==="PRACTICAL");Ma(Jt.item_banks.map(dn=>dn.id)),cn(Jt.item_banks)}},[kn,zi]);const[sa,Ma]=(0,ue.useState)([]),[Qt,cn]=(0,ue.useState)([]);return ue.createElement(bn.default,{title:"\u9009\u62E9\u5B9E\u8BAD\u9898",open:kn,width:948,centered:!0,closable:!0,onCancel:Tn,onOk:()=>Qn(Qt),destroyOnClose:!0},ue.createElement(pt.Z,{justify:"space-between",className:"mb20",style:{maxHeight:650}},ue.createElement(en.Z,null,ue.createElement(Ye.Z,{style:{width:160},size:"large",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:Xi,onChange:Jt=>{ri({page:1,discipline_id:Jt==null?void 0:Jt[0],sub_discipline_id:Jt==null?void 0:Jt[1]})}}),ue.createElement(Xr.default,{className:"ml20",style:{width:118},size:"large",placeholder:"\u96BE\u5EA6",allowClear:!0,options:[{label:"\u521D\u7EA7",value:1},{label:"\u4E2D\u7EA7",value:2},{label:"\u4E2D\u9AD8\u7EA7",value:3},{label:"\u9AD8\u7EA7",value:4}],onChange:Jt=>ri({page:1,diff:Jt})}),ue.createElement(Xr.default,{className:"ml20",placeholder:"\u5168\u90E8\u72B6\u6001",style:{width:118},size:"large",allowClear:!0,options:[{label:"\u672A\u53D1\u5E03",value:"unpublish"},{label:"\u9759\u9ED8\u53D1\u5E03",value:"silent_publish"},{label:"\u516C\u5F00\u53D1\u5E03",value:"public_publish"}],onChange:Jt=>ri({page:1,shixun_publish_status:Jt})})),ue.createElement(_n.t7,{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",style:{width:290},onChange:Jt=>{ri({keyword:Jt,page:1})}})),Ji?ue.createElement("div",null,ue.createElement(ai.Z,{customText:"\u6682\u65E0\u6570\u636E",ButtonText:"\u524D\u5F80\u5B9E\u8DF5\u9879\u76EE\u5E93\uFF0C\u6DFB\u52A0\u66F4\u591A\u8BD5\u9898>",ButtonClick:()=>(0,Ti.xg)("/shixuns")})):ue.createElement(cr.default,{loading:Ri,rowKey:"id",columns:[{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"30%",ellipsis:{showTitle:!0},render:(Jt,dn)=>ue.createElement("div",{style:{display:"flex",alignItems:"center"}},ue.createElement("div",{className:dn!=null&&dn.high_resources_consume?wn.title:"",title:Jt||"--"},ue.createElement(_o.Z,{key:1,showLines:1,showTextOnly:!0,value:Jt||"--"})),(dn==null?void 0:dn.high_resources_consume)&&ue.createElement(jo.Z,{type:"shixun",style:{marginLeft:10}}))},{title:"\u96BE\u5EA6",dataIndex:"level"},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",render:(Jt,dn,xi)=>ue.createElement("span",null,Jt||"- -")},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"study_count"},{title:ue.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",ue.createElement(ua.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},ue.createElement(tt.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",width:100,render:(Jt,dn,xi)=>ue.createElement("span",null,Jt||"- -")},{title:"\u64CD\u4F5C",render(Jt,dn){const{title:xi,challenge_names:tr,author_name:yr,identifier:vr,author_school_name:br,study_count:Lr}=dn||{};return ue.createElement("div",null,ue.createElement("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:()=>{bn.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:ue.createElement("div",null,ue.createElement(_o.Z,{value:xi,style:{marginBottom:18}}),ue.createElement("div",{className:wn.challengeNameWrapper},tr.map((Mr,zr)=>ue.createElement("div",{className:wn.challengeName,key:zr},"\u7B2C",(0,Ti.EM)(zr+1),"\u9898\xA0",Mr))),ue.createElement(pt.Z,{className:wn.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},ue.createElement(en.Z,{className:wn.shixunInfoWrapper},ue.createElement("span",null,"\u521B\u5EFA\u8005"),ue.createElement("span",{className:wn.shixunInfo},yr.split("\u3001")[0]),ue.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),ue.createElement("span",{className:wn.shixunInfo},br),ue.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),ue.createElement("span",{className:wn.shixunInfo},Lr)),ue.createElement(Ie.ZP,{type:"primary",className:wn.btnToDetail,onClick:()=>(0,Ti.xg)(`/shixuns/${vr}/challenges?exercise=true`)},ue.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),(dn==null?void 0:dn.shixun_tag_num)===1&&ue.createElement("a",{target:"_blank",href:`/shixuns/${dn==null?void 0:dn.identifier}/challenges`,style:{marginLeft:10}},"\u53BB\u53D1\u5E03"))}}],dataSource:yi==null?void 0:yi.items,rowSelection:{selectedRowKeys:sa,preserveSelectedRowKeys:!0,getCheckboxProps:Jt=>({disabled:Jt.shixun_tag_num===1}),onChange(Jt,dn){var xi,tr,yr;console.log(Jt),Ma(Jt);const vr=[];for(const Lr of Qt)Jt.includes(Lr.id)&&vr.push(Lr);const br=vr.map(Lr=>Lr.id);for(const Lr of dn)Lr&&Jt.includes(Lr.id)&&!br.includes(Lr.id)&&vr.push({id:Lr.id,difficulty:Lr.level,identifier:Lr.identifier,name:Lr.name,real_name:(xi=Lr==null?void 0:Lr.author_name)==null?void 0:xi.split("\u3001")[0],school_name:Lr.author_school_name,challenge_names:Lr.challenge_names,challenges:(tr=Lr.challenge_names)==null?void 0:tr.map((Mr,zr)=>({subject:Mr,id:zr,score:5})),score:((yr=Lr.challenge_names)==null?void 0:yr.length)*5,study_count:Lr.study_count,challenges_count:Lr.challenges_count});cn(vr)}},pagination:{current:$i.page,pageSize:$i.limit,total:yi==null?void 0:yi.items_count,showTotal:Jt=>ue.createElement("span",null,"\u5171\xA0",ue.createElement("span",{style:{color:"#165DFF"}},Jt),"\xA0\u6761\u6570\u636E"),showQuickJumper:!0,onChange(Jt,dn){ri({page:Jt,limit:dn})},size:"default"},scroll:{y:400}}))},ls=me(78018),Or=me(59301),xo=Object.defineProperty,na=Object.defineProperties,Da=Object.getOwnPropertyDescriptors,Ao=Object.getOwnPropertySymbols,Va=Object.prototype.hasOwnProperty,Jr=Object.prototype.propertyIsEnumerable,eo=(kn,Tn,Qn)=>Tn in kn?xo(kn,Tn,{enumerable:!0,configurable:!0,writable:!0,value:Qn}):kn[Tn]=Qn,Eo=(kn,Tn)=>{for(var Qn in Tn||(Tn={}))Va.call(Tn,Qn)&&eo(kn,Qn,Tn[Qn]);if(Ao)for(var Qn of Ao(Tn))Jr.call(Tn,Qn)&&eo(kn,Qn,Tn[Qn]);return kn},ci=(kn,Tn)=>na(kn,Da(Tn)),za=({onDelete:kn,list:Tn,onSelect:Qn})=>{const[zi,Xi]=(0,ue.useState)(!1),{dispatch:$i,disabled:Ri}=(0,ue.useContext)(Lt),ri=(Ma,Qt,cn)=>{const Jt=Array.from(Ma),[dn]=Jt.splice(Qt,1);return Jt.splice(cn,0,dn),Jt},[yi,Ji]=(0,ue.useState)(null),[mr,sa]=(0,ue.useState)(!1);return Or.createElement(ls.Z5,{onDragStart:()=>{sa(!0)},onDragEnd:Ma=>{if(sa(!1),!Ma.destination)return;const Qt=ri(Tn,Ma.source.index,Ma.destination.index);$i({type:"updateItemTypes",payload:Qt})}},Or.createElement(ls.bK,{droppableId:"droppable"},(Ma,Qt)=>Or.createElement("div",ci(Eo({},Ma.droppableProps),{ref:Ma.innerRef}),Or.createElement(Mt.Z,{spinning:zi},Tn.map((cn,Jt)=>Or.createElement(ls._l,{key:Jt,draggableId:Jt.toString(),index:Jt,isDragDisabled:yi!==cn.item_type},(dn,xi)=>Or.createElement(pt.Z,ci(Eo(Eo({align:"middle",wrap:!1,ref:dn.innerRef},dn.draggableProps),dn.dragHandleProps),{className:`${wn.dragItem} ${mr?wn.dragging:""}`}),Or.createElement(en.Z,{className:wn.contentArea,onClick:()=>{Qn(cn.item_type),(0,Ti.k3)()}},Or.createElement("span",{className:wn.blackText},(0,Ti.EM)(Jt+1),"\u3001\u3010",cn.item_type_text,"\u3011"),Or.createElement(ua.Z,{title:`\uFF08${cn.item_bank_count}\u5C0F\u9898\uFF0C\u5171${parseFloat(cn.total_score).toFixed(1)}\u5206\uFF09`},Or.createElement("span",{className:wn.greyText},`\uFF08${cn.item_bank_count}\u5C0F\u9898\uFF0C\u5171${parseFloat(cn.total_score).toFixed(1)}\u5206\uFF09`))),!Ri&&Or.createElement(Or.Fragment,null,Or.createElement(ua.Z,{title:"\u957F\u6309\u53EF\u8FDB\u884C\u62D6\u62FD\u6392\u5E8F",open:yi===cn.item_type&&!mr},Or.createElement("div",{style:{cursor:"grab"},className:`${wn.iconWrapper} ${mr?wn.hidden:""}`,onMouseEnter:()=>{Ji(cn.item_type)},onMouseLeave:()=>Ji(null)},Or.createElement("i",{className:`iconfont icon-tuodong1 ${wn.dragIcon}`}))),Or.createElement(ua.Z,{title:"\u5220\u9664"},Or.createElement("div",{className:`${wn.iconWrapper} ${mr?wn.hidden:""}`,style:{cursor:"pointer"},onClick:()=>kn(cn.item_type)},Or.createElement("i",{className:`iconfont icon-shanchu12 ${wn.deleteIcon}`})))))))),Ma.placeholder)))},xs=me(10777),ho={flex_box_center:"flex_box_center___ppkzA",flex_space_between:"flex_space_between___Z1syx",flex_box_vertical_center:"flex_box_vertical_center___twJ9S",flex_box_center_end:"flex_box_center_end___uI0uW",flex_box_column:"flex_box_column___JRp7D",timelineWrapper:"timelineWrapper___LP9aM",title:"title___KUHj_",desc:"desc___ubc8E",titles:"titles___njkjf",questionDetailWrapper:"questionDetailWrapper___p4SFM",questionTitle:"questionTitle___JC9X6",questionScoreInfo:"questionScoreInfo___NgOJI",deleteIcon:"deleteIcon___oMVTN",deleteBtn:"deleteBtn___JUPEl",normalText:"normalText___FW9Y_",folderIcon:"folderIcon___gvacQ",challengeNameWrapper:"challengeNameWrapper___fG7Vv",challengeName:"challengeName___Ia1Xs",shixunPreviewFooter:"shixunPreviewFooter___rKsnN",shixunInfoWrapper:"shixunInfoWrapper___FEnDb",shixunInfo:"shixunInfo___TbrA2",btnToDetail:"btnToDetail___dqLQP",q_title:"q_title___qnv4p"},ca=me(73631),ja=me(31328);const hs=(kn,Tn,Qn,zi)=>{const Xi={[Nt.OnlyDifficulty]:[{title:"\u96BE\u5EA6",key:"difficulty",render($i,Ri){const{difficulty:ri}=Ri;return ue.createElement("span",{style:{color:Kt[ri].color}},Kt[ri].label)}}],[Nt.OnlyKnowledge]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"\u65B9\u5411&\u8BFE\u7A0B",dataIndex:"sub_discipline_name",width:180,ellipsis:{showTitle:!0},render($i,Ri){return`${$i}`}}],[Nt.OnlyFileFolder]:[{title:"\u6587\u4EF6\u5939",render($i,Ri,ri){const{group_name:yi,teacher_group_name:Ji}=Ri,mr=yi||Ji,sa=Ji?ja:ca;return ue.createElement("div",{style:{display:"flex"}},ue.createElement("img",{src:sa,className:ho.folderIcon})," ",ue.createElement(ua.Z,{title:mr},ue.createElement("span",{className:ho.titles},mr)))}},{title:"\u7C7B\u578B",render($i,Ri){const{teacher_group_name:ri}=Ri;return ue.createElement("span",null,ri?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}}],[Nt.KnowledgeAndDiff]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:{showTitle:!0}},{title:"\u65B9\u5411&\u8BFE\u7A0B",width:180,dataIndex:"sub_discipline_name",ellipsis:{showTitle:!0}},{title:"\u96BE\u5EA6",key:"difficulty",render($i,Ri){const{difficulty:ri}=Ri;return ue.createElement("span",{style:{color:Kt[ri].color}},Kt[ri].label)}}],[Nt.FileFolderAndKnowledge]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"\u6587\u4EF6\u5939",render($i,Ri){const{group_name:ri,teacher_group_name:yi}=Ri,Ji=ri||yi,mr=yi?ja:ca;return ue.createElement("div",{style:{display:"flex"}},ue.createElement("img",{src:mr,className:ho.folderIcon})," ",ue.createElement(ua.Z,{title:Ji},ue.createElement("span",{className:ho.titles},Ji)))}},{title:"\u7C7B\u578B",render($i,Ri){const{teacher_group_name:ri}=Ri;return ue.createElement("span",null,ri?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}}],[Nt.FileFolderAndDiff]:[{title:"\u6587\u4EF6\u5939",render($i,Ri){const{group_name:ri,teacher_group_name:yi}=Ri,Ji=ri||yi,mr=yi?ja:ca;return ue.createElement("div",{style:{display:"flex"}},ue.createElement("img",{src:mr,className:ho.folderIcon})," ",ue.createElement(ua.Z,{title:Ji},ue.createElement("span",{className:ho.titles},Ji)))}},{title:"\u7C7B\u578B",render($i,Ri){const{teacher_group_name:ri}=Ri;return ue.createElement("span",null,ri?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}},{title:"\u96BE\u5EA6",key:"difficulty",render($i,Ri){const{difficulty:ri}=Ri;return ue.createElement("span",{style:{color:Kt[ri].color}},Kt[ri].label)}}],[Nt.All]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"\u6587\u4EF6\u5939",render($i,Ri){const{group_name:ri,teacher_group_name:yi,teacher_group_id:Ji}=Ri,mr=ri||yi,sa=Ji||Ji===0?ja:ca;return ue.createElement("div",{style:{display:"flex"}},ue.createElement("img",{src:sa,className:ho.folderIcon})," ",ue.createElement(ua.Z,{title:mr},ue.createElement("span",{className:ho.titles},mr)))}},{title:"\u7C7B\u578B",render($i,Ri){const{teacher_group_id:ri}=Ri;return ue.createElement("span",null,ri||ri===0?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}},{title:"\u96BE\u5EA6",key:"difficulty",render($i,Ri){const{difficulty:ri}=Ri;return ue.createElement("span",{style:{color:Kt[ri].color}},Kt[ri].label)}}],[Nt.Shixun]:[]};for(const $i of Object.values(Xi))$i.push({title:"\u62BD\u9898\u6570\u91CF",key:"quanlity",render(Ri,ri){const{item_bank_num:yi,quanlity:Ji,id:mr,teacher_group_id:sa}=ri||{};return ue.createElement(pt.Z,{align:"middle"},ue.createElement(wt.Z,{disabled:zi,min:1,max:yi,size:"large",precision:0,value:Ji,onChange:Ma=>{Tn({type:"changeQuestionNum",payload:{itemType:Qn,id:mr,num:Ma,teacher_group_id:sa}})}}),ue.createElement("span",{className:"ml10 font14",style:{color:"#333333"}},"/",yi))}},{title:"\u64CD\u4F5C",key:"action",align:"right",render(Ri,ri){const{id:yi,is_share:Ji}=ri;return zi?ue.createElement("span",{className:"cursorNotAllowed c-grey-999"},"\u5220\u9664"):ue.createElement("span",{className:ho.deleteBtn,onClick:()=>{Tn({type:"deleteRule",payload:{itemType:Qn,id:yi,is_share:Ji}})}},"\u5220\u9664")}});return Xi[kn]},fs=({setVisibleModalType:kn})=>{var Tn,Qn,zi,Xi;const{data:$i,dispatch:Ri,disabled:ri}=(0,ue.useContext)(Lt),yi=(Tn=$i==null?void 0:$i.item_types)==null?void 0:Tn.find(Ji=>Ji.item_type==="PRACTICAL");return ue.createElement(xs.Z,{className:ho.timelineWrapper,items:[{children:ue.createElement("div",{style:{transform:"translateY(-4px)"}},ue.createElement(pt.Z,{className:"mb20",align:"middle",justify:"space-between"},ue.createElement(en.Z,null,ue.createElement("span",{className:ho.title},"\u9898\u5E93\u9009\u9898"),ue.createElement("span",{className:ho.desc},"\uFF08\u9700\u8981\u5148\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9\u5B9E\u8BAD\u9898\uFF0C\u518D\u8BBE\u7F6E\u4ECE\u5DF2\u9009\u5B9E\u8BAD\u9898\u4E2D\u968F\u673A\u62BD\u9898\u7684\u6570\u91CF\uFF09")),!ri&&ue.createElement(_n.op,{style:{width:102},onClick:()=>kn("selectShixun")},"\u4ECE\u9898\u5E93\u9009\u62E9")),((Qn=yi==null?void 0:yi.item_banks)==null?void 0:Qn.length)===0?ue.createElement(ai.Z,{customText:"\u6682\u65E0\u5F85\u62BD\u8BD5\u9898\uFF0C\u8BF7\u5148\u4ECE\u9898\u5E93\u8FDB\u884C\u9009\u62E9\uFF5E"}):ue.createElement(cr.default,{rowKey:"id",className:"mb10",columns:[{title:"\u5E8F\u53F7",width:60,render(Ji,mr,sa){return ue.createElement("span",null,sa+1)}},{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"40%",ellipsis:{showTitle:!0},render:(Ji,mr)=>ue.createElement("div",{style:{display:"flex",alignItems:"center"}},ue.createElement("div",{className:mr!=null&&mr.high_resources_consume?ho.q_title:"",title:Ji||"--"},ue.createElement(_o.Z,{key:1,showLines:1,showTextOnly:!0,value:Ji})),(mr==null?void 0:mr.high_resources_consume)&&ue.createElement(jo.Z,{type:"shixun",style:{marginLeft:10}}))},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"study_count"},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",render:(Ji,mr,sa)=>ue.createElement("span",null,Ji||"- -")},{title:"\u96BE\u5EA6",dataIndex:"difficulty"},{title:"\u64CD\u4F5C",align:"right",width:180,render(Ji,mr,sa){const{id:Ma,identifier:Qt,name:cn,challenge_names:Jt=[],real_name:dn,school_name:xi,study_count:tr,challenges:yr=[]}=mr||{};return ue.createElement("div",null,ue.createElement("span",{style:{color:"#165DFF",cursor:"pointer",marginLeft:20},onClick:()=>{bn.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:ue.createElement("div",null,ue.createElement(_o.Z,{value:cn,style:{marginBottom:18}}),ue.createElement("div",{className:ho.challengeNameWrapper},yr==null?void 0:yr.map((vr,br)=>ue.createElement("div",{className:ho.challengeName,key:br},"\u7B2C",(0,Ti.EM)(br+1),"\u9898\xA0",vr==null?void 0:vr.subject))),ue.createElement(pt.Z,{className:ho.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},ue.createElement(en.Z,{className:ho.shixunInfoWrapper},ue.createElement("span",null,"\u521B\u5EFA\u8005"),ue.createElement("span",{className:ho.shixunInfo},dn),ue.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),ue.createElement("span",{className:ho.shixunInfo},xi),ue.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),ue.createElement("span",{className:ho.shixunInfo},tr)),ue.createElement(Ie.ZP,{type:"primary",className:ho.btnToDetail,onClick:()=>(0,Ti.xg)(`/shixuns/${Qt}/challenges?exercise=true`)},ue.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),!ri&&ue.createElement("span",{onClick:()=>{Ri({type:"deleteShixunQuestion",payload:{shixunId:Ma}})},className:`ml20 ${ho.deleteBtn}`},"\u5220\u9664"))}}],dataSource:(yi==null?void 0:yi.item_banks)||[],pagination:!1}))},{children:ue.createElement(pt.Z,{style:{transform:(zi=yi==null?void 0:yi.item_banks)!=null&&zi.length?"translateY(-8px)":"none"},align:"middle",justify:"space-between"},ue.createElement("span",{className:ho.title},"\u5DF2\u9009\u5B9E\u8BAD\u9898\u4E2D\u968F\u673A\u62BD\u9898"),!!((Xi=yi==null?void 0:yi.item_banks)!=null&&Xi.length)&&ue.createElement(en.Z,null,ue.createElement(pt.Z,{align:"middle"},ue.createElement("span",{className:ho.normalText},"\u62BD\u9898\u6570\u91CF"),ue.createElement(wt.Z,{min:0,disabled:ri,max:yi==null?void 0:yi.item_bank_num,size:"large",className:"ml10 mr10",value:(yi==null?void 0:yi.item_bank_count)||1,onChange:Ji=>Ri({type:"changeQuestionNum",payload:{num:Ji||1,itemType:"PRACTICAL"}})}),ue.createElement("span",{className:`${ho.normalText} mr30`},"/",yi==null?void 0:yi.item_bank_num),ue.createElement("span",{className:ho.normalText},"\u6BCF\u9898\u5206\u503C"),ue.createElement(wt.Z,{disabled:ri,min:0,max:100,size:"large",precision:1,className:"ml10 mr10",value:yi==null?void 0:yi.score,onChange:Ji=>Ri({type:"changeQuestionScore",payload:{score:Ji,itemType:"PRACTICAL"}})}),ue.createElement("span",{className:ho.normalText},"\u5206"))))}]})};var Ys=({setVisibleModalType:kn,currentItemType:Tn,onDelete:Qn})=>{var zi,Xi;const $i=(0,lt.useParams)(),{data:Ri,dispatch:ri,disabled:yi}=(0,ue.useContext)(Lt),Ji=((zi=Ri==null?void 0:Ri.item_types)==null?void 0:zi.findIndex(sa=>sa.item_type===Tn))+1,mr=(Xi=Ri==null?void 0:Ri.item_types)==null?void 0:Xi.find(sa=>sa.item_type===Tn);return ue.createElement("div",{className:ho.questionDetailWrapper},ue.createElement(pt.Z,{justify:"space-between",align:"middle",className:"mb30"},ue.createElement(en.Z,null,ue.createElement("span",{className:ho.questionTitle},`${(0,Ti.EM)(Ji)}\u3001${mr==null?void 0:mr.item_type_text}`),ue.createElement("span",{className:ho.questionScoreInfo},"\uFF08",ue.createElement("span",{style:{color:"#3061D0"}},mr==null?void 0:mr.item_bank_count),"\u5C0F\u9898 ",ue.createElement("span",null,"\uFF0C\u5171",ue.createElement("span",{style:{color:"#3061D0"}},mr==null?void 0:mr.total_score),"\u5206"),"\uFF09")),!yi&&ue.createElement("i",{className:`iconfont icon-shanchutimu ${ho.deleteIcon}`,onClick:()=>Qn(Tn)})),Tn==="PRACTICAL"?ue.createElement(fs,{setVisibleModalType:kn}):ue.createElement(ue.Fragment,null,(mr==null?void 0:mr.contents.length)===0?ue.createElement(ai.Z,{styles:{margin:"70px auto 100px auto"},customText:ue.createElement("span",null,"\u6682\u65E0\u62BD\u9898\u89C4\u5219\uFF0C\u652F\u6301",ue.createElement("span",{style:{color:"#EA9741"}},"\u6307\u5B9A\u6587\u4EF6\u5939\u3001\u96BE\u5EA6\u3001\u77E5\u8BC6\u70B9"),"\u8FDB\u884C\u62BD\u9898\uFF5E"),ButtonTwo:($i==null?void 0:$i.id)&&ue.createElement(pt.Z,{justify:"center",className:"mt30"},ue.createElement(_n.op,{style:{width:136,marginTop:-10},onClick:()=>kn("rule")},"\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219"))}):ue.createElement(ue.Fragment,null,ue.createElement(pt.Z,{justify:"space-between",align:"middle",className:"mb20"},ue.createElement(en.Z,null,ue.createElement(pt.Z,{align:"middle"},ue.createElement("span",{className:`${ho.normalText}`},"\u6BCF\u9898\u5206\u503C"),ue.createElement(wt.Z,{disabled:yi,size:"large",className:"ml10 mr10",min:.1,max:100,value:mr==null?void 0:mr.score,precision:1,onChange:sa=>ri({type:"changeQuestionScore",payload:{score:sa,itemType:Tn}})}),ue.createElement("span",{className:ho.normalText},"\u5206"))),($i==null?void 0:$i.id)&&ue.createElement(_n.op,{onClick:()=>kn("rule")},"\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219")),ue.createElement(cr.default,{columns:hs(mr==null?void 0:mr.random_rule_type,ri,Tn,yi),dataSource:mr==null?void 0:mr.contents,pagination:!1,rowKey:"id"}))))},Bn=me(88477),Es=me(79124),Pl=me(2119),Wl=me(32637),Mo=me(59301),gl=Object.defineProperty,Tu=Object.defineProperties,Ql=Object.getOwnPropertyDescriptors,us=Object.getOwnPropertySymbols,Sa=Object.prototype.hasOwnProperty,Il=Object.prototype.propertyIsEnumerable,Wo=(kn,Tn,Qn)=>Tn in kn?gl(kn,Tn,{enumerable:!0,configurable:!0,writable:!0,value:Qn}):kn[Tn]=Qn,Ia=(kn,Tn)=>{for(var Qn in Tn||(Tn={}))Sa.call(Tn,Qn)&&Wo(kn,Qn,Tn[Qn]);if(us)for(var Qn of us(Tn))Il.call(Tn,Qn)&&Wo(kn,Qn,Tn[Qn]);return kn},aa=(kn,Tn)=>Tu(kn,Ql(Tn)),or=(kn,Tn,Qn)=>new Promise((zi,Xi)=>{var $i=yi=>{try{ri(Qn.next(yi))}catch(Ji){Xi(Ji)}},Ri=yi=>{try{ri(Qn.throw(yi))}catch(Ji){Xi(Ji)}},ri=yi=>yi.done?zi(yi.value):Promise.resolve(yi.value).then($i,Ri);ri((Qn=Qn.apply(kn,Tn)).next())}),js=({})=>{var kn,Tn,Qn,zi,Xi,$i,Ri,ri,yi,Ji,mr,sa,Ma,Qt,cn;const[Jt]=(0,lt.useSearchParams)(),dn=(0,lt.useParams)(),{data:xi,dispatch:tr,setPreview:yr,getData:vr,handlePreview:br,disabled:Lr}=(0,ue.useContext)(Lt),[Mr,zr]=(0,ue.useState)(""),[Sr,Tr]=(0,ue.useState)((Tn=(kn=xi==null?void 0:xi.item_types)==null?void 0:kn[0])==null?void 0:Tn.item_type),[ro,ia]=(0,ue.useState)(!0),[da,ur]=(0,ue.useState)(!1),Go=(Ai,Ki)=>or(void 0,null,function*(){var ir,no,Lo,nr,Zr,Mi;const Ca=xi.item_types.map(Rr=>Rr.item_type_text),Ja=(ir=xi==null?void 0:xi.item_types)==null?void 0:ir.filter(Rr=>{var pa,Is;return((pa=Rr.contents)==null?void 0:pa.length)>0||((Is=Rr==null?void 0:Rr.item_banks)==null?void 0:Is.length)>0});if(xi.sort_by_item_type=Ca,!((no=xi.item_types)!=null&&no.length)){Ze.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}if((Ja==null?void 0:Ja.length)===0){Ze.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}let wo=()=>or(void 0,null,function*(){const Rr=(0,qe.cloneDeep)(xi),{item_types:pa}=Rr||{};Rr.item_types=pa.filter(La=>La.item_type===Sr),(yield je(dn.id||dn.categoryId,Rr)).status===0&&(Tr(Ki),Ze.ZP.success("\u4FDD\u5B58\u6210\u529F"),Ai||lt.history.push("/paperlibrary"))}),Cr=(nr=(Lo=xi==null?void 0:xi.item_types)==null?void 0:Lo.filter(Rr=>Rr.item_type_text==="\u5B9E\u8BAD\u9898")[0])==null?void 0:nr.item_banks,fr=0;Cr==null||Cr.map(Rr=>{Rr.high_resources_consume&&(fr=fr+1)}),console.log(fr),fr>0?bn.default.info({centered:!0,icon:null,width:600,okText:"\u6211\u77E5\u9053\u4E86",title:"\u63D0\u793A",content:Mo.createElement("div",null,Mo.createElement("div",{className:wn.tipcontent},Mo.createElement("div",null,Mo.createElement("div",{className:wn.name},"\u60A8\u597D\uFF01",(Zr=(0,Pl.eY)())==null?void 0:Zr.username,"\uFF08",(Mi=(0,Pl.eY)())==null?void 0:Mi.login,"\uFF09\uFF1A"),Mo.createElement("div",{className:wn.tip},"\u5F53\u524D\u8BD5\u5377\u5305\u542B\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002",Mo.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002\u53D1\u5E03\u8003\u8BD5\u524D\uFF0C\u8BF7\u5148\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u83B7\u53D6\u6388\u6743\u7801\u3002"),Mo.createElement("div",{className:wn.info},Mo.createElement("i",{className:"iconfont icon-xunifangzhenti1 mr10 font26"}),Mo.createElement("span",{className:"mr10",style:{color:"#6A7283"}},"\u9AD8\u6D88\u8017\u5B9E\u9A8C"),Mo.createElement("span",{style:{color:"#232B40"}},`${fr}\u4E2A`))),Mo.createElement("div",null,Mo.createElement("div",{className:wn.img},Mo.createElement("img",{src:Wl,width:"124px",height:"124px"})),Mo.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")))),onOk:()=>{wo()}}):wo()}),_t=(Ai,Ki,ir)=>or(void 0,null,function*(){console.log(xi);const no=aa(Ia(Ia({},xi.exercise),dn),{exerciseId:dn.categoryId,sort_by_item_type:xi.sort_by_item_type,difficulty:xi.examination_bank.difficulty,exam_notes:xi.examination_bank.exam_notes,exercise_name:xi.examination_bank.name,time:xi.examination_bank.time,changed_item_type:Sr,item_types:xi.item_types,sub_discipline_id:xi.examination_bank.sub_discipline_id});(!Ai||Ki===1)&&(no.is_reset=1);const Lo=yield(0,Es.wy)(no);return Lo.status===0&&(Ze.ZP.success("\u4FEE\u6539\u6210\u529F "),Tr(ir),Ai||lt.history.push(`/classrooms/${dn.coursesId}/exercise/${dn.categoryId}/detail?random=true`)),Lo}),Zn=Ai=>{bn.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,closable:!0,content:Mo.createElement("div",null,"\u786E\u8BA4\u5220\u9664\u8BE5\u9898\u578B\uFF1F"),onOk:()=>or(void 0,null,function*(){var Ki,ir,no,Lo;if(dn.id){if((yield bt(dn.id,{item_type:[Ai]})).status!==0)return}else{const nr=yield et(dn.categoryId,{item_type:[Ai]});if(vr(),nr.status!==0)return}if(tr({type:"deleteQuestionType",payload:Ai}),Ai===Sr){const nr=rt(xi,{type:"deleteQuestionType",payload:Ai});Tr(nr.item_types.length?nr.item_types[0].item_type:(ir=(Ki=xi==null?void 0:xi.item_types)==null?void 0:Ki[0])==null?void 0:ir.item_type)}else Tr((Lo=(no=xi==null?void 0:xi.item_types)==null?void 0:no[0])==null?void 0:Lo.item_type)})})};(0,ue.useEffect)(()=>{var Ai;(Ai=xi==null?void 0:xi.examination_bank)!=null&&Ai.name&&ia(!1),(0,Ti.Dk)("\u968F\u673A\u7EC4\u5377")},[(Qn=xi==null?void 0:xi.examination_bank)==null?void 0:Qn.name]);const Fr=()=>or(void 0,null,function*(){var Ai;let Ki=yield _t(!0,1);if((Ki==null?void 0:Ki.status)===0){const ir=yield(0,te.ZP)(`/api/exercises/${dn==null?void 0:dn.categoryId}/simulate_start_answer.json`,{method:"get",params:{coursesId:dn==null?void 0:dn.coursesId,categoryId:dn==null?void 0:dn.categoryId}});(ir==null?void 0:ir.status)!=-1&&window.open(`/classrooms/${dn.coursesId}/exercise/${dn.categoryId}/${(Ai=(0,Pl.eY)())==null?void 0:Ai.login}/initate_answer`)}});return Mo.createElement("div",{className:wn.questionInfo},Mo.createElement("div",{className:"tc mb20"},Mo.createElement(Me.VP,{defaultValue:(zi=xi==null?void 0:xi.examination_bank)==null?void 0:zi.name,onFinish:Ai=>or(void 0,null,function*(){return tr({type:"updateBaseInfo",payload:aa(Ia({},xi.examination_bank),{name:Ai})}),!0})})),Mo.createElement(pt.Z,{justify:"center",className:"mb20"},Mo.createElement(en.Z,{className:"mr30"},Mo.createElement("span",{className:wn.label},"\u7B54\u9898\u65F6\u957F"),Mo.createElement("span",null,((Xi=xi==null?void 0:xi.examination_bank)==null?void 0:Xi.time)===-1?"\u4E0D\u9650":(($i=xi==null?void 0:xi.examination_bank)==null?void 0:$i.time)||"\u4E0D\u9650")),Mo.createElement(en.Z,{className:"mr30"},Mo.createElement("span",{className:wn.label},"\u96BE\u5EA6"),Mo.createElement("span",null,(ri=Kt[`${(Ri=xi==null?void 0:xi.examination_bank)==null?void 0:Ri.difficulty}`])==null?void 0:ri.label)),Mo.createElement(en.Z,{className:"mr30"},Mo.createElement("span",{className:wn.label},"\u8BD5\u9898\u603B\u6570"),Mo.createElement("span",null,((yi=xi==null?void 0:xi.examination_bank)==null?void 0:yi.question_count)||0)),Mo.createElement(en.Z,null,Mo.createElement("span",{className:wn.label},"\u603B\u5206"),Mo.createElement("span",null,((mr=(Ji=xi==null?void 0:xi.examination_bank)==null?void 0:Ji.total_score)==null?void 0:mr.toFixed(1))||0))),Mo.createElement("div",{className:wn.content,style:{border:((sa=xi==null?void 0:xi.item_types)==null?void 0:sa.length)<=0&&"none"}},((Ma=xi==null?void 0:xi.item_types)==null?void 0:Ma.length)>0?Mo.createElement(pt.Z,{wrap:!1},Mo.createElement(en.Z,{flex:"260px",className:wn.leftPart},!Lr&&Mo.createElement(pt.Z,{className:"mb20"},Mo.createElement(_n.op,{style:{margin:"0 15px",borderRadius:2},onClick:()=>zr("setScore")},"\u6279\u91CF\u8BBE\u7F6E\u5206\u503C"),(dn==null?void 0:dn.id)&&Mo.createElement(_n.op,{shape:"default",onClick:()=>zr("questionType")},"\u6DFB\u52A0\u9898\u578B")),Mo.createElement(za,{list:xi.item_types,onSelect:Ai=>or(void 0,null,function*(){if(Ai===Sr)return;ia(!0);const Ki=xi.item_types.find(ir=>ir.item_type===Sr);if(Sr!=="PRACTICAL"&&Ki.contents.length>0&&(dn!=null&&dn.id)){const ir=(0,qe.cloneDeep)(xi),{item_types:no}=ir||{};ir.item_types=no.filter(Lo=>Lo.item_type===Sr);try{(yield je(dn.id||dn.categoryId,ir)).status===0&&Tr(Ai)}catch(Lo){}}else dn.categoryId?_t(!0,2,Ai):Go(!0,Ai);ia(!1)}),onDelete:Zn})),Mo.createElement(en.Z,{flex:1,className:wn.rightPart},Mo.createElement(Mt.Z,{spinning:ro},Mo.createElement(Ys,{setVisibleModalType:zr,currentItemType:Sr,onDelete:Zn})))):Mo.createElement(ai.Z,{customText:"\u8BF7\u5148\u8BBE\u7F6E\u8BD5\u5377\u9898\u578B",styles:{margin:"70px auto"},ButtonTwo:Mo.createElement(pt.Z,{justify:"center",className:"mt20"},(dn==null?void 0:dn.id)&&Mo.createElement(_n.op,{style:{width:88},onClick:()=>zr("questionType")},"\u6DFB\u52A0\u9898\u578B"))})),!!(dn!=null&&dn.id)&&Mo.createElement("div",{className:wn.fixedBottom},Mo.createElement(Bn.Z,{className:`${wn.previewBtn} mr20`,onClick:()=>or(void 0,null,function*(){var Ai,Ki;const ir=(Ai=xi==null?void 0:xi.item_types)==null?void 0:Ai.filter(no=>{var Lo,nr;return((Lo=no.contents)==null?void 0:Lo.length)>0||((nr=no==null?void 0:no.item_banks)==null?void 0:nr.length)>0});if(!((Ki=xi.item_types)!=null&&Ki.length)){Ze.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}if((ir==null?void 0:ir.length)===0){Ze.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}yield Go(!0,Sr),br()})},"\u8BD5\u5377\u9884\u89C8"),Mo.createElement(Bn.Z,{type:"primary",className:wn.confirmBtn,onClick:()=>Go()},Mo.createElement("i",{className:"iconfont icon-baocun1 mr5"}),"\u4FDD\u5B58\u8BD5\u5377")),!!(dn!=null&&dn.categoryId)&&Mo.createElement("div",{className:wn.fixedBottom,style:{justifyContent:((Qt=xi==null?void 0:xi.exercise)==null?void 0:Qt.exercise_status)!==1?"end":"center"}},Mo.createElement(Bn.Z,{className:`${wn.previewBtn} mr20`,onClick:()=>or(void 0,null,function*(){var Ai,Ki;document.body.scrollIntoView(),lt.history.push(`/classrooms/${dn.coursesId}/exercise/${(Ai=xi==null?void 0:xi.exercise)==null?void 0:Ai.id}/detail?random=${(Ki=xi==null?void 0:xi.exercise)==null?void 0:Ki.is_random}`)})},"\u8FD4\u56DE"),((cn=xi==null?void 0:xi.exercise)==null?void 0:cn.exercise_status)===1&&Mo.createElement(Bn.Z,{className:`${wn.previewBtn} mr20`,onClick:Fr},"\u6A21\u62DF\u8003\u8BD5"),(xi==null?void 0:xi.exercise.exercise_status)===1&&Mo.createElement(Bn.Z,{type:"primary",className:wn.confirmBtn,onClick:()=>_t()},"\u63D0\u4EA4")),Mo.createElement(_i,{open:Mr==="questionType",onCancel:()=>zr(""),onOk:Ai=>or(void 0,null,function*(){var Ki,ir;const no=[],Lo=rt(xi,{type:"setQuestionType",payload:Ai}),nr=((Ki=Lo==null?void 0:Lo.item_types)==null?void 0:Ki.map(Zr=>Zr.item_type))||[];for(const Zr of((ir=xi==null?void 0:xi.item_types)==null?void 0:ir.map(Mi=>Mi.item_type))||[])nr.includes(Zr)||no.push(Zr);dn.id&&no.length>0&&(yield bt(dn.id,{item_type:no})).status!==0||(tr({type:"setQuestionType",payload:Ai}),Tr(Sr||Lo.item_types[0].item_type),zr(""))})}),Mo.createElement(wr,{open:Mr==="setScore",onCancel:()=>{zr("")},onOk:Ai=>or(void 0,null,function*(){console.log("---newData",Ai);const Ki=Ai.item_types.map(ir=>({item_type:ir.item_type,score:ir.score}));dn.id?(yield dt(dn.id,{score_settings:Ki})).status===0&&tr({type:"init",payload:Ai}):(yield He(dn.categoryId,{score_settings:Ki})).status===0&&tr({type:"init",payload:Ai}),zr("")})}),Mo.createElement(Yi,{open:Mr==="rule",onCancel:()=>zr(""),currentItemType:Sr,setVisibleModalType:zr}),Jt.get("type")==="settings"&&Mo.createElement($a,{open:Mr==="selectShixun",onCancel:()=>zr(""),onOk:Ai=>{if(console.log(Ai),(Ai==null?void 0:Ai.length)<=0){Ze.ZP.info("\u5B9E\u8BAD\u6570\u4E0D\u80FD\u4E3A0");return}tr({type:"addShixun",payload:{shixunList:[...Ai]}}),zr("")}}))},pl=me(54675),Xs=me(59301),hu=Object.defineProperty,er=Object.defineProperties,Ss=Object.getOwnPropertyDescriptors,Ws=Object.getOwnPropertySymbols,su=Object.prototype.hasOwnProperty,fu=Object.prototype.propertyIsEnumerable,lu=(kn,Tn,Qn)=>Tn in kn?hu(kn,Tn,{enumerable:!0,configurable:!0,writable:!0,value:Qn}):kn[Tn]=Qn,Oo=(kn,Tn)=>{for(var Qn in Tn||(Tn={}))su.call(Tn,Qn)&&lu(kn,Qn,Tn[Qn]);if(Ws)for(var Qn of Ws(Tn))fu.call(Tn,Qn)&&lu(kn,Qn,Tn[Qn]);return kn},Ru=(kn,Tn)=>er(kn,Ss(Tn)),ul=(kn,Tn,Qn)=>new Promise((zi,Xi)=>{var $i=yi=>{try{ri(Qn.next(yi))}catch(Ji){Xi(Ji)}},Ri=yi=>{try{ri(Qn.throw(yi))}catch(Ji){Xi(Ji)}},ri=yi=>yi.done?zi(yi.value):Promise.resolve(yi.value).then($i,Ri);ri((Qn=Qn.apply(kn,Tn)).next())}),wl=()=>{var kn,Tn,Qn,zi;const[Xi,$i]=(0,ue.useState)("baseInfo"),Ri=(0,lt.useDispatch)();(0,ue.useEffect)(()=>{Ri({type:"globalSetting/footerToggle",payload:!1})},[]);const ri=(0,lt.useParams)(),yi=!!(ri.id||ri.categoryId),[Ji]=(0,lt.useSearchParams)();(0,ue.useEffect)(()=>{Ji.get("type")==="settings"&&$i("settings")},[]);const[mr,sa]=(0,ue.useReducer)(rt,null),[Ma,Qt]=(0,ue.useState)(!1),cn=()=>ul(void 0,null,function*(){Qt(!0);let Sr;ri.categoryId?Sr=yield Ut(ri):Sr=yield Fe(ri.id),Qt(!1),Sr.status===0&&sa({type:"init",payload:Sr})});(0,ue.useEffect)(()=>{yi?cn():sa({type:"init",payload:{examination_bank:{difficulty:2}}})},[ri]);const[Jt,dn]=(0,ue.useState)(""),xi=(Sr,Tr)=>ul(void 0,null,function*(){var ro,ia,da,ur;const Go=(ro=mr==null?void 0:mr.item_types)==null?void 0:ro.filter(Fr=>{var Ai;return((Ai=Fr==null?void 0:Fr.item_type)==null?void 0:Ai.toUpperCase())===(Tr==null?void 0:Tr.type)}),_t={sort_by_item_type:mr.sort_by_item_type,difficulty:mr.examination_bank.difficulty,exam_notes:mr.examination_bank.exam_notes,name:mr.examination_bank.name,time:mr.examination_bank.time,item_types:mr.item_types};if(Sr!==void 0&&!(Sr!=null&&Sr.single_question_id)){_t.seleted_item_bank_ids=Sr==null?void 0:Sr.seleted_item_bank_ids,_t.item_types=Go;const Fr=yield xt(_t);if((Fr==null?void 0:Fr.status)===0){let Ai=(0,qe.cloneDeep)(Lr.data);Ai.questionList=(ia=Ai==null?void 0:Ai.questionList)==null?void 0:ia.map(Ki=>{var ir;return Ki.type===Tr.type?Ru(Oo({},Ki),{questions:((ir=Fr==null?void 0:Fr.questions)==null?void 0:ir.questions)||[]}):Ki}),Mr({show:!0,data:Ai})}return}if(Sr!==void 0&&(Sr!=null&&Sr.single_question_id)){_t.seleted_item_bank_ids=Sr==null?void 0:Sr.seleted_item_bank_ids,_t.single_question_id=Sr==null?void 0:Sr.single_question_id,_t.item_types=Go;const Fr=yield xt(_t);if((Fr==null?void 0:Fr.status)===0){let Ai=(0,qe.cloneDeep)(Lr.data);Ai.questionList=(da=Ai==null?void 0:Ai.questionList)==null?void 0:da.map(Ki=>{var ir,no;if(Ki.type===Tr.type){const Lo=(0,qe.cloneDeep)(Ki==null?void 0:Ki.questions);return Lo.splice(Tr.index,1,(no=(ir=Fr==null?void 0:Fr.questions)==null?void 0:ir.questions)==null?void 0:no[0]),console.log(Ki==null?void 0:Ki.questions,Lo,Tr.index,"new_questions"),Ru(Oo({},Ki),{questions:Lo})}return Ki}),Mr({show:!0,data:Ai})}return}const Zn=yield It(_t);if((Zn==null?void 0:Zn.status)===0){const Fr=(0,Ti.ad)(Zn);let Ai=[];(ur=mr==null?void 0:mr.item_types)==null||ur.forEach(Ki=>{var ir;const no=(ir=Fr==null?void 0:Fr.questionList)==null?void 0:ir.find(Lo=>Ki.item_type===Lo.type);Ai.push(no)}),console.log(mr,"sortList"),Ai=(0,qe.compact)(Ai),Fr.questionList=Ai,Mr({show:!0,data:Fr}),dn(new Date)}}),tr=Sr=>{var Tr;let ro=(0,qe.cloneDeep)(Lr.data);ro.questionList=(Tr=ro==null?void 0:ro.questionList)==null?void 0:Tr.map(ia=>ia.type===Sr.type?Ru(Oo({},ia),{questions_score:Sr.scoreTotal}):ia),sa({type:"changeQuestionScore",payload:{score:Sr.score,itemType:Sr.type}}),Mr({show:!0,data:ro})},yr=Sr=>ul(void 0,null,function*(){const Tr={sort_by_item_type:mr.sort_by_item_type,difficulty:mr.examination_bank.difficulty,exam_notes:mr.examination_bank.exam_notes,name:mr.examination_bank.name,time:mr.examination_bank.time,item_types:mr.item_types,sub_discipline_id:mr.examination_bank.sub_discipline_id};if(Sr){(yield Bt(Oo(Oo({},Tr),Sr))).status===0&&Ze.ZP.success("\u4FDD\u5B58\u6210\u529F");return}(yield je(ri.id,Tr)).status===0&&(Ze.ZP.success("\u63D0\u4EA4\u6210\u529F"),lt.history.push("/paperlibrary?defaultActiveKey=0"))}),vr=Ir(),[br]=ot.default.useForm(),[Lr,Mr]=(0,ue.useState)({show:!1,data:{}}),zr=!!((kn=mr==null?void 0:mr.exercise)!=null&&kn.exercise_status)&&((Tn=mr==null?void 0:mr.exercise)==null?void 0:Tn.exercise_status)!==1;return Xs.createElement(Lt.Provider,{value:{data:mr,disabled:zr,dispatch:sa,setPreview:Mr,getData:cn,handlePreview:xi}},Lr.show?Xs.createElement(pl.Z,{key:Jt,data:Lr.data,onExchange:xi,onTypeScore:tr,submit:yr,goBack:()=>Mr({show:!1,data:{}})}):Xs.createElement("div",{className:Re.wrapper},Xs.createElement("div",{className:"edu-container"},Xs.createElement(We.Z,{className:Re.breadCrumbWrapper,separator:">",items:ri!=null&&ri.categoryId?[{title:Xs.createElement(lt.Link,{to:`/classrooms/${ri.coursesId}/exercise`},(zi=(Qn=(0,Pl.eY)())==null?void 0:Qn.course)==null?void 0:zi.course_name)},{title:Xs.createElement(lt.Link,{to:`/classrooms/${ri.coursesId}/exercise`},"\u8BD5\u5377\u5217\u8868")},{title:"\u7F16\u8F91\u8BD5\u5377"}]:[{title:Xs.createElement(lt.Link,{to:"/paperlibrary"},"\u8BD5\u5377\u5E93")},{title:"\u968F\u673A\u7EC4\u5377"}]}),Xs.createElement(Me.d4,{activeKey:Xi,tabs:[{key:"baseInfo",label:"\u8BD5\u5377\u57FA\u7840\u4FE1\u606F"},{key:"settings",label:"\u7EC4\u5377\u914D\u7F6E"}],onChange:Sr=>ul(void 0,null,function*(){if(Sr==="settings"&&(yield br.validateFields(),!yi)){const Tr=yield ze(mr);Tr.status===0&<.history.replace(`/randompaper/edit/${Tr==null?void 0:Tr.examination_bank_id}?type=settings`)}$i(Sr)})}),Xi==="baseInfo"&&Xs.createElement(an,{courseOptions:vr,setCurrentKey:$i,loading:Ma,form:br}),Xs.createElement("div",{style:{display:Xi==="settings"?"block":"none"}},mr&&Xs.createElement(js,null)))))}},14670:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Ye}});var ue=me(43418),Re={ul:"ul___TdfYY"},Ze=me(32637),ot=me(59301),We=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,Mt=(st,pt)=>{var wt={};for(var Ie in st)lt.call(st,Ie)&&pt.indexOf(Ie)<0&&(wt[Ie]=st[Ie]);if(st!=null&&We)for(var Ie of We(st))pt.indexOf(Ie)<0&&Me.call(st,Ie)&&(wt[Ie]=st[Ie]);return wt},Ye=st=>{var pt=st,{open:wt,onCancel:Ie}=pt,te=Mt(pt,["open","onCancel"]);return ot.createElement(ue.default,{centered:!0,open:wt,title:ot.createElement("div",{style:{fontWeight:"bold"}},"\u8054\u7CFB\u6559\u7814\u52A9\u7406"),width:"696px",onCancel:Ie,footer:null},ot.createElement("div",null,ot.createElement("div",{className:"tc"},ot.createElement("img",{className:"mt10",src:Ze,width:"182px",height:"181px",style:{borderRadius:"2px",border:"1px solid #D8E3E9"}})),ot.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16 mt10"},"\u514D\u8D39\u6559\u7814\u52A9\u7406"),ot.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16"},"\u5FAE\u4FE1\u626B\u4E00\u626B\u6DFB\u52A0"),ot.createElement("div",{style:{color:"#333"},className:"pt30 font14"},ot.createElement("ul",{className:Re.ul},ot.createElement("li",null,"1\u3001\u89E3\u7B54\u8001\u5E08\u7591\u60D1\u3001\u5E2E\u52A9\u8001\u5E08\u66F4\u5FEB\u719F\u6089\u548C\u4F7F\u7528\u5E73\u53F0\u6559\u5B66\u3002"),ot.createElement("li",null,"2\u3001\u534F\u52A9\u8001\u5E08\u521B\u5EFA\u8BFE\u5802\u3001\u8BFE\u7A0B\u8BBE\u8BA1\u3001\u505A\u597D\u6559\u5B66\u5DE5\u4F5C\u3002"),ot.createElement("li",null,"3\u3001\u6839\u636E\u8001\u5E08\u6559\u5B66\u65B9\u5411\uFF0C\u5206\u4EAB\u5934\u6B4C\u5E73\u53F0C9\u9662\u6821\u3001985\u9AD8\u6821\u3001211\u9AD8\u6821\u3001\u53CC\u4E00\u6D41\u9AD8\u6821\u8001\u5E08\u7ECF\u5178\u5B9E\u8DF5\u6559\u5B66\u6848\u4F8B\u3002")))))}},35427:function(zn,En,me){"use strict";me.d(En,{U:function(){return Ct}});var ue=me(59301),Re=Object.defineProperty,Ze=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,lt=(Ye,st,pt)=>st in Ye?Re(Ye,st,{enumerable:!0,configurable:!0,writable:!0,value:pt}):Ye[st]=pt,Me=(Ye,st)=>{for(var pt in st||(st={}))ot.call(st,pt)&<(Ye,pt,st[pt]);if(Ze)for(var pt of Ze(st))We.call(st,pt)&<(Ye,pt,st[pt]);return Ye},Mt=(Ye,st,pt)=>new Promise((wt,Ie)=>{var te=se=>{try{de(pt.next(se))}catch(he){Ie(he)}},ee=se=>{try{de(pt.throw(se))}catch(he){Ie(he)}},de=se=>se.done?wt(se.value):Promise.resolve(se.value).then(te,ee);de((pt=pt.apply(Ye,st)).next())});function Ct(Ye,st){const[pt,wt]=(0,ue.useState)(st),[Ie,te]=(0,ue.useState)(!1),[ee,de]=(0,ue.useState)();return[pt,Ie,(he,ve=!1)=>Mt(this,null,function*(){const be=ve?st:Me(Me({},pt),he);te(!0),wt(be);const Ne=yield Ye(be);return te(!1),de(Ne),Ne}),ee]}},31087:function(zn,En,me){"use strict";me.d(En,{AL:function(){return be},Iy:function(){return st},Qv:function(){return Ie},ez:function(){return ve},jb:function(){return pt}});var ue=me(32834),Re=me.n(ue),Ze=me(11690),ot=me.n(Ze);let We=1;function lt(Xe,Je){const dt=Xe.match(/^(\s+)(?:```)/);if(dt===null)return Je;const He=dt[1];return Je.split(`
|
|
|
`).map(bt=>{const et=bt.match(/^\s+/);if(et===null)return bt;const[It]=et;return It.length>=He.length?bt.slice(He.length):bt}).join(`
|
|
|
`)}let Me=[],Mt=["<ul>"];const Ct=new(Re()).Renderer,Ye=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function st(){Me.length=0,Mt=["<ul>"]}const pt={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function wt(Xe,Je,dt,He){if(Je>=Xe.length||Xe[Je].level<=dt)return Je;var bt=Xe[Je];He.push("<li><a href='#"+We+bt.anchor+"'>"+bt.text+"</a>"),Je++;var et=[];return Je=wt(Xe,Je,bt.level,et),et.length>0&&(He.push("<ul>"),et.forEach(function(It){He.push(It)}),He.push("</ul>")),He.push("</li>"),Je=wt(Xe,Je,dt,He),Je}function Ie(){return wt(Me,0,0,Mt),Mt.push("</ul>"),Mt.join("")}const te={heading(Xe){const Je=Ye.exec(Xe);if(We+=1,Je)return{type:"heading",raw:Je[0],depth:Je[1].length,text:Je[2]}},fences(Xe){const Je=this.rules.block.fences.exec(Xe);if(Je){const dt=Je[0];let He=lt(dt,Je[3]||"");const bt=Je[2]?Je[2].trim():Je[2];if(["latex","katex","math"].indexOf(bt)>=0){const et=se(),It=He;He=et,he[et]={type:"block",expression:It}}return{type:"code",raw:dt,lang:bt,text:He}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let de=0;const se=()=>`__special_katext_id_${de++}__`;let he={};function ve(){return he}function be(){de=0,he={}}function Ne(Xe){return Xe=Xe.replace(ee,(Je,dt)=>{const He=se();return he[He]={type:"inline",expression:dt},He}),Xe}const Fe=Ct.listitem;Ct.listitem=function(Xe){return Fe(Ne(Xe))};const je=Ct.paragraph;Ct.paragraph=function(Xe){return je(Ne(Xe))};const ze=Ct.tablecell;Ct.tablecell=function(Xe,Je){return ze(Ne(Xe),Je)},Ct.code=function(Xe,Je,dt){const He=(Je||"").match(/\S*/)[0];return He?["latex","katex","math"].indexOf(He)>=0?`<p class='editormd-tex'>${Xe}</p>`:`<pre class="prettyprint linenums"><code class="language-${Je}">${dt?Xe:(0,Ze.escape)(Xe,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(dt?Xe:(0,Ze.escape)(Xe,!0))+"</code></pre>"},Ct.heading=function(Xe,Je,dt){let He=this.options.headerPrefix+dt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Me.push({anchor:He,level:Je,text:Xe}),"<h"+Je+' id="'+We+He+'">'+Xe+"</h"+Je+">"},Re().setOptions({silent:!0,gfm:!0,pedantic:!1}),Re().use({tokenizer:te,renderer:Ct}),En.ZP=Re()},50371:function(zn,En){"use strict";function me(){const ue=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let Re=1;Re<arguments.length;Re++){const Ze=Re<0||arguments.length<=Re?void 0:arguments[Re];Ze&&Object.keys(Ze).forEach(ot=>{const We=Ze[ot];We!==void 0&&(ue[ot]=We)})}return ue}En.Z=me},77578:function(zn,En,me){"use strict";me.d(En,{Z:function(){return ue}});const ue=Re=>Re?typeof Re=="function"?Re():Re:null},13845:function(zn,En,me){"use strict";me.d(En,{F:function(){return ue},Z:function(){return Re}});function ue(Ze){return Ze!=null&&Ze===Ze.window}function Re(Ze,ot){var We,lt;if(typeof window=="undefined")return 0;const Me=ot?"scrollTop":"scrollLeft";let Mt=0;return ue(Ze)?Mt=Ze[ot?"pageYOffset":"pageXOffset"]:Ze instanceof Document?Mt=Ze.documentElement[Me]:(Ze instanceof HTMLElement||Ze)&&(Mt=Ze[Me]),Ze&&!ue(Ze)&&typeof Mt!="number"&&(Mt=(lt=((We=Ze.ownerDocument)!==null&&We!==void 0?We:Ze).documentElement)===null||lt===void 0?void 0:lt[Me]),Mt}},56762:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Re}});var ue=me(59301);function Re(){const[,Ze]=ue.useReducer(ot=>ot+1,0);return Ze}},68031:function(zn,En,me){"use strict";me.d(En,{Z:function(){return ot}});var ue=me(23073);function Re(We,lt,Me,Mt){const Ct=Me-lt;return We/=Mt/2,We<1?Ct/2*We*We*We+lt:Ct/2*((We-=2)*We*We+2)+lt}var Ze=me(13845);function ot(We){let lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:Me=()=>window,callback:Mt,duration:Ct=450}=lt,Ye=Me(),st=(0,Ze.Z)(Ye,!0),pt=Date.now(),wt=()=>{const te=Date.now()-pt,ee=Re(te>Ct?Ct:te,st,We,Ct);(0,Ze.F)(Ye)?Ye.scrollTo(window.pageXOffset,ee):Ye instanceof Document||Ye.constructor.name==="HTMLDocument"?Ye.documentElement.scrollTop=ee:Ye.scrollTop=ee,te<Ct?(0,ue.Z)(wt):typeof Mt=="function"&&Mt()};(0,ue.Z)(wt)}},66104:function(zn,En,me){"use strict";me.d(En,{Z:function(){return It}});var ue=me(92310),Re=me.n(ue),Ze=me(38298),ot=me(36994),We=me(59301),lt=me(92343),Me=me(36355),Mt=me(18290),Ct=me(91857);const Ye=xt=>{let{children:Bt}=xt;const{getPrefixCls:Ut}=We.useContext(Me.E_),Nt=Ut("breadcrumb");return We.createElement("li",{className:`${Nt}-separator`,"aria-hidden":"true"},Bt===""?Bt:Bt||"/")};Ye.__ANT_BREADCRUMB_SEPARATOR=!0;var st=Ye,pt=function(xt,Bt){var Ut={};for(var Nt in xt)Object.prototype.hasOwnProperty.call(xt,Nt)&&Bt.indexOf(Nt)<0&&(Ut[Nt]=xt[Nt]);if(xt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,Nt=Object.getOwnPropertySymbols(xt);qe<Nt.length;qe++)Bt.indexOf(Nt[qe])<0&&Object.prototype.propertyIsEnumerable.call(xt,Nt[qe])&&(Ut[Nt[qe]]=xt[Nt[qe]]);return Ut};function wt(xt,Bt){if(xt.title===void 0||xt.title===null)return null;const Ut=Object.keys(Bt).join("|");return typeof xt.title=="object"?xt.title:String(xt.title).replace(new RegExp(`:(${Ut})`,"g"),(Nt,qe)=>Bt[qe]||Nt)}function Ie(xt,Bt,Ut,Nt){if(Ut==null)return null;const{className:qe,onClick:Ke}=Bt,Tt=pt(Bt,["className","onClick"]),Ln=Object.assign(Object.assign({},(0,ot.Z)(Tt,{data:!0,aria:!0})),{onClick:Ke});return Nt!==void 0?We.createElement("a",Object.assign({},Ln,{className:Re()(`${xt}-link`,qe),href:Nt}),Ut):We.createElement("span",Object.assign({},Ln,{className:Re()(`${xt}-link`,qe)}),Ut)}function te(xt,Bt){return(Nt,qe,Ke,Tt,Ln)=>{if(Bt)return Bt(Nt,qe,Ke,Tt);const Mn=wt(Nt,qe);return Ie(xt,Nt,Mn,Ln)}}var ee=function(xt,Bt){var Ut={};for(var Nt in xt)Object.prototype.hasOwnProperty.call(xt,Nt)&&Bt.indexOf(Nt)<0&&(Ut[Nt]=xt[Nt]);if(xt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,Nt=Object.getOwnPropertySymbols(xt);qe<Nt.length;qe++)Bt.indexOf(Nt[qe])<0&&Object.prototype.propertyIsEnumerable.call(xt,Nt[qe])&&(Ut[Nt[qe]]=xt[Nt[qe]]);return Ut};const de=xt=>{const{prefixCls:Bt,separator:Ut="/",children:Nt,menu:qe,overlay:Ke,dropdownProps:Tt,href:Ln}=xt,zt=(rn=>{if(qe||Ke){const xn=Object.assign({},Tt);if(qe){const Un=qe||{},{items:yn}=Un,sn=ee(Un,["items"]);xn.menu=Object.assign(Object.assign({},sn),{items:yn==null?void 0:yn.map((Lt,ti)=>{var{key:gi,title:Pn,label:Xt,path:Kt}=Lt,Ot=ee(Lt,["key","title","label","path"]);let rt=Xt!=null?Xt:Pn;return Kt&&(rt=We.createElement("a",{href:`${Ln}${Kt}`},rt)),Object.assign(Object.assign({},Ot),{key:gi!=null?gi:ti,label:rt})})})}else Ke&&(xn.overlay=Ke);return We.createElement(Ct.Z,Object.assign({placement:"bottom"},xn),We.createElement("span",{className:`${Bt}-overlay-link`},rn,We.createElement(Mt.Z,null)))}return rn})(Nt);return zt!=null?We.createElement(We.Fragment,null,We.createElement("li",null,zt),Ut&&We.createElement(st,null,Ut)):null},se=xt=>{const{prefixCls:Bt,children:Ut,href:Nt}=xt,qe=ee(xt,["prefixCls","children","href"]),{getPrefixCls:Ke}=We.useContext(Me.E_),Tt=Ke("breadcrumb",Bt);return We.createElement(de,Object.assign({},qe,{prefixCls:Tt}),Ie(Tt,qe,Ut,Nt))};se.__ANT_BREADCRUMB_ITEM=!0;var he=se,ve=me(17313),be=me(83116),Ne=me(37613);const Fe=xt=>{const{componentCls:Bt,iconCls:Ut}=xt;return{[Bt]:Object.assign(Object.assign({},(0,ve.Wf)(xt)),{color:xt.itemColor,fontSize:xt.fontSize,[Ut]:{fontSize:xt.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:xt.linkColor,transition:`color ${xt.motionDurationMid}`,padding:`0 ${xt.paddingXXS}px`,borderRadius:xt.borderRadiusSM,height:xt.lineHeight*xt.fontSize,display:"inline-block",marginInline:-xt.marginXXS,"&:hover":{color:xt.linkHoverColor,backgroundColor:xt.colorBgTextHover}},(0,ve.Qy)(xt)),"li:last-child":{color:xt.lastItemColor},[`${Bt}-separator`]:{marginInline:xt.separatorMargin,color:xt.separatorColor},[`${Bt}-link`]:{[`
|
|
|
> ${Ut} + span,
|
|
|
> ${Ut} + a
|
|
|
`]:{marginInlineStart:xt.marginXXS}},[`${Bt}-overlay-link`]:{borderRadius:xt.borderRadiusSM,height:xt.lineHeight*xt.fontSize,display:"inline-block",padding:`0 ${xt.paddingXXS}px`,marginInline:-xt.marginXXS,[`> ${Ut}`]:{marginInlineStart:xt.marginXXS,fontSize:xt.fontSizeIcon},"&:hover":{color:xt.linkHoverColor,backgroundColor:xt.colorBgTextHover,a:{color:xt.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${xt.componentCls}-rtl`]:{direction:"rtl"}})}};var je=(0,be.Z)("Breadcrumb",xt=>{const Bt=(0,Ne.TS)(xt,{});return[Fe(Bt)]},xt=>({itemColor:xt.colorTextDescription,lastItemColor:xt.colorText,iconFontSize:xt.fontSize,linkColor:xt.colorTextDescription,linkHoverColor:xt.colorText,separatorColor:xt.colorTextDescription,separatorMargin:xt.marginXS})),ze=function(xt,Bt){var Ut={};for(var Nt in xt)Object.prototype.hasOwnProperty.call(xt,Nt)&&Bt.indexOf(Nt)<0&&(Ut[Nt]=xt[Nt]);if(xt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,Nt=Object.getOwnPropertySymbols(xt);qe<Nt.length;qe++)Bt.indexOf(Nt[qe])<0&&Object.prototype.propertyIsEnumerable.call(xt,Nt[qe])&&(Ut[Nt[qe]]=xt[Nt[qe]]);return Ut};function Xe(xt){const{breadcrumbName:Bt,children:Ut}=xt,Nt=ze(xt,["breadcrumbName","children"]),qe=Object.assign({title:Bt},Nt);return Ut&&(qe.menu={items:Ut.map(Ke=>{var{breadcrumbName:Tt}=Ke,Ln=ze(Ke,["breadcrumbName"]);return Object.assign(Object.assign({},Ln),{title:Tt})})}),qe}function Je(xt,Bt){return(0,We.useMemo)(()=>xt||(Bt?Bt.map(Xe):null),[xt,Bt])}var dt=function(xt,Bt){var Ut={};for(var Nt in xt)Object.prototype.hasOwnProperty.call(xt,Nt)&&Bt.indexOf(Nt)<0&&(Ut[Nt]=xt[Nt]);if(xt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,Nt=Object.getOwnPropertySymbols(xt);qe<Nt.length;qe++)Bt.indexOf(Nt[qe])<0&&Object.prototype.propertyIsEnumerable.call(xt,Nt[qe])&&(Ut[Nt[qe]]=xt[Nt[qe]]);return Ut};const He=(xt,Bt)=>{if(Bt===void 0)return Bt;let Ut=(Bt||"").replace(/^\//,"");return Object.keys(xt).forEach(Nt=>{Ut=Ut.replace(`:${Nt}`,xt[Nt])}),Ut},bt=xt=>{const{prefixCls:Bt,separator:Ut="/",style:Nt,className:qe,rootClassName:Ke,routes:Tt,items:Ln,children:Mn,itemRender:zt,params:rn={}}=xt,xn=dt(xt,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:Un,direction:yn,breadcrumb:sn}=We.useContext(Me.E_);let Lt;const ti=Un("breadcrumb",Bt),[gi,Pn]=je(ti),Xt=Je(Ln,Tt),Kt=te(ti,zt);if(Xt&&Xt.length>0){const Ue=[],$t=Ln||Tt;Lt=Xt.map((Gt,it)=>{const{path:at,key:Te,type:Pe,menu:ye,overlay:ke,onClick:$e,className:Le,separator:vt,dropdownProps:an}=Gt,bn=He(rn,at);bn!==void 0&&Ue.push(bn);const en=Te!=null?Te:it;if(Pe==="separator")return We.createElement(st,{key:en},vt);const wn={},ai=it===Xt.length-1;ye?wn.menu=ye:ke&&(wn.overlay=ke);let{href:_n}=Gt;return Ue.length&&bn!==void 0&&(_n=`#/${Ue.join("/")}`),We.createElement(de,Object.assign({key:en},wn,(0,ot.Z)(Gt,{data:!0,aria:!0}),{className:Le,dropdownProps:an,href:_n,separator:ai?"":Ut,onClick:$e,prefixCls:ti}),Kt(Gt,rn,$t,Ue,_n))})}else if(Mn){const Ue=(0,Ze.Z)(Mn).length;Lt=(0,Ze.Z)(Mn).map(($t,Gt)=>{if(!$t)return $t;const it=Gt===Ue-1;return(0,lt.Tm)($t,{separator:it?"":Ut,key:Gt})})}const Ot=Re()(ti,sn==null?void 0:sn.className,{[`${ti}-rtl`]:yn==="rtl"},qe,Ke,Pn),rt=Object.assign(Object.assign({},sn==null?void 0:sn.style),Nt);return gi(We.createElement("nav",Object.assign({className:Ot,style:rt},xn),We.createElement("ol",null,Lt)))};bt.Item=he,bt.Separator=st;var et=bt,It=et},19842:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Hr}});var ue=me(26390),Re=me(59301),Ze=me(16537),ot=me(50023),We=me(53878),lt=me(92310),Me=me.n(lt),Mt=me(5891),Ct=me(29043),Ye=me(19149),st=me(77861),pt=me(17115),wt=me(90782),Ie=me(8107),te=me(35788),ee=Re.createContext(null),de=ee,se=me(80665),he=me(80962),ve=me(57259),be="__rc_cascader_search_mark__",Ne=function(Li,Wi,ji){var Gn=ji.label;return Wi.some(function(Ht){return String(Ht[Gn]).toLowerCase().includes(Li.toLowerCase())})},Fe=function(Li,Wi,ji,Gn){return Wi.map(function(Ht){return Ht[Gn.label]}).join(" / ")},je=function(jn,Li,Wi,ji,Gn,Ht){var Wt=Gn.filter,Zt=Wt===void 0?Ne:Wt,yt=Gn.render,un=yt===void 0?Fe:yt,vn=Gn.limit,At=vn===void 0?50:vn,nt=Gn.sort;return Re.useMemo(function(){var on=[];if(!jn)return[];function fn(Jn,pn){var Rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Jn.forEach(function(In){if(!(!nt&&At!==!1&&At>0&&on.length>=At)){var Vn=[].concat((0,ue.Z)(pn),[In]),Pi=In[Wi.children],tn=Rt||In.disabled;if((!Pi||Pi.length===0||Ht)&&Zt(jn,Vn,{label:Wi.label})){var hn;on.push((0,ve.Z)((0,ve.Z)({},In),{},(hn={disabled:tn},(0,he.Z)(hn,Wi.label,un(jn,Vn,ji,Wi)),(0,he.Z)(hn,be,Vn),(0,he.Z)(hn,Wi.children,void 0),hn)))}Pi&&fn(In[Wi.children],Vn,tn)}})}return fn(Li,[]),nt&&on.sort(function(Jn,pn){return nt(Jn[be],pn[be],jn,Wi)}),At!==!1&&At>0?on.slice(0,At):on},[jn,Li,Wi,ji,un,Ht,Zt,nt,At])},ze="__RC_CASCADER_SPLIT__",Xe="SHOW_PARENT",Je="SHOW_CHILD";function dt(jn){return jn.join(ze)}function He(jn){return jn.map(dt)}function bt(jn){return jn.split(ze)}function et(jn){var Li=jn||{},Wi=Li.label,ji=Li.value,Gn=Li.children,Ht=ji||"value";return{label:Wi||"label",value:Ht,key:Ht,children:Gn||"children"}}function It(jn,Li){var Wi,ji;return(Wi=jn.isLeaf)!==null&&Wi!==void 0?Wi:!((ji=jn[Li.children])!==null&&ji!==void 0&&ji.length)}function xt(jn){var Li=jn.parentElement;if(Li){var Wi=jn.offsetTop-Li.offsetTop;Wi-Li.scrollTop<0?Li.scrollTo({top:Wi}):Wi+jn.offsetHeight-Li.scrollTop>Li.offsetHeight&&Li.scrollTo({top:Wi+jn.offsetHeight-Li.offsetHeight})}}function Bt(jn,Li){return jn.map(function(Wi){var ji;return(ji=Wi[be])===null||ji===void 0?void 0:ji.map(function(Gn){return Gn[Li.value]})})}function Ut(jn,Li,Wi){var ji=new Set(jn),Gn=Li();return jn.filter(function(Ht){var Wt=Gn[Ht],Zt=Wt?Wt.parent:null,yt=Wt?Wt.children:null;return Wt&&Wt.node.disabled?!0:Wi===Je?!(yt&&yt.some(function(un){return un.key&&ji.has(un.key)})):!(Zt&&!Zt.node.disabled&&ji.has(Zt.key))})}function Nt(jn,Li,Wi){for(var ji=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,Gn=Li,Ht=[],Wt=function(){var un,vn,At,nt=jn[Zt],on=(un=Gn)===null||un===void 0?void 0:un.findIndex(function(Jn){var pn=Jn[Wi.value];return ji?String(pn)===String(nt):pn===nt}),fn=on!==-1?(vn=Gn)===null||vn===void 0?void 0:vn[on]:null;Ht.push({value:(At=fn==null?void 0:fn[Wi.value])!==null&&At!==void 0?At:nt,index:on,option:fn}),Gn=fn==null?void 0:fn[Wi.children]},Zt=0;Zt<jn.length;Zt+=1)Wt();return Ht}var qe=function(jn,Li,Wi,ji,Gn){return Re.useMemo(function(){var Ht=Gn||function(Wt){var Zt=ji?Wt.slice(-1):Wt,yt=" / ";return Zt.every(function(un){return["string","number"].includes((0,se.Z)(un))})?Zt.join(yt):Zt.reduce(function(un,vn,At){var nt=Re.isValidElement(vn)?Re.cloneElement(vn,{key:At}):vn;return At===0?[nt]:[].concat((0,ue.Z)(un),[yt,nt])},[])};return jn.map(function(Wt){var Zt,yt,un=Nt(Wt,Li,Wi),vn=Ht(un.map(function(nt){var on,fn=nt.option,Jn=nt.value;return(on=fn==null?void 0:fn[Wi.label])!==null&&on!==void 0?on:Jn}),un.map(function(nt){var on=nt.option;return on})),At=dt(Wt);return{label:vn,value:At,key:At,valueCells:Wt,disabled:(Zt=un[un.length-1])===null||Zt===void 0||(yt=Zt.option)===null||yt===void 0?void 0:yt.disabled}})},[jn,Li,Wi,Gn,ji])},Ke=me(71430),Tt=function(jn,Li){var Wi=Re.useRef({options:null,info:null}),ji=Re.useCallback(function(){return Wi.current.options!==jn&&(Wi.current.options=jn,Wi.current.info=(0,Ke.I8)(jn,{fieldNames:Li,initWrapper:function(Ht){return(0,ve.Z)((0,ve.Z)({},Ht),{},{pathKeyEntities:{}})},processEntity:function(Ht,Wt){var Zt=Ht.nodes.map(function(yt){return yt[Li.value]}).join(ze);Wt.pathKeyEntities[Zt]=Ht,Ht.key=Zt}})),Wi.current.info.pathKeyEntities},[Li,jn]);return ji},Ln=function(jn,Li){return Re.useCallback(function(Wi){var ji=[],Gn=[];return Wi.forEach(function(Ht){var Wt=Nt(Ht,jn,Li);Wt.every(function(Zt){return Zt.option})?Gn.push(Ht):ji.push(Ht)}),[Gn,ji]},[jn,Li])},Mn=me(51395);function zt(jn){return Re.useMemo(function(){if(!jn)return[!1,{}];var Li={matchInputWidth:!0,limit:50};return jn&&(0,se.Z)(jn)==="object"&&(Li=(0,ve.Z)((0,ve.Z)({},Li),jn)),Li.limit<=0&&delete Li.limit,[!0,Li]},[jn])}var rn=Re.memo(function(jn){var Li=jn.children;return Li},function(jn,Li){return!Li.open}),xn=rn;function Un(jn){var Li,Wi=jn.prefixCls,ji=jn.checked,Gn=jn.halfChecked,Ht=jn.disabled,Wt=jn.onClick,Zt=jn.disableCheckbox,yt=Re.useContext(de),un=yt.checkable,vn=typeof un!="boolean"?un:null;return Re.createElement("span",{className:Me()("".concat(Wi),(Li={},(0,he.Z)(Li,"".concat(Wi,"-checked"),ji),(0,he.Z)(Li,"".concat(Wi,"-indeterminate"),!ji&&Gn),(0,he.Z)(Li,"".concat(Wi,"-disabled"),Ht||Zt),Li)),onClick:Wt},vn)}var yn="__cascader_fix_label__";function sn(jn){var Li=jn.prefixCls,Wi=jn.multiple,ji=jn.options,Gn=jn.activeValue,Ht=jn.prevValuePath,Wt=jn.onToggleOpen,Zt=jn.onSelect,yt=jn.onActive,un=jn.checkedSet,vn=jn.halfCheckedSet,At=jn.loadingKeys,nt=jn.isSelectable,on=jn.searchValue,fn="".concat(Li,"-menu"),Jn="".concat(Li,"-menu-item"),pn=Re.useContext(de),Rt=pn.fieldNames,In=pn.changeOnSelect,Vn=pn.expandTrigger,Pi=pn.expandIcon,tn=pn.loadingIcon,hn=pn.dropdownMenuColumnStyle,Rn=Vn==="hover",Oi=Re.useMemo(function(){return ji.map(function(Ii){var Si,Ni=Ii.disabled,Zi=Ii.disableCheckbox,sr=Ii[be],Wr=(Si=Ii[yn])!==null&&Si!==void 0?Si:Ii[Rt.label],li=Ii[Rt.value],Vi=It(Ii,Rt),vo=sr?sr.map(function(pr){return pr[Rt.value]}):[].concat((0,ue.Z)(Ht),[li]),Qr=dt(vo),Er=At.includes(Qr),qt=un.has(Qr),pi=vn.has(Qr);return{disabled:Ni,label:Wr,value:li,isLeaf:Vi,isLoading:Er,checked:qt,halfChecked:pi,option:Ii,disableCheckbox:Zi,fullPath:vo,fullPathKey:Qr}})},[ji,un,Rt,vn,At,Ht]);return Re.createElement("ul",{className:fn,role:"menu"},Oi.map(function(Ii){var Si,Ni=Ii.disabled,Zi=Ii.label,sr=Ii.value,Wr=Ii.isLeaf,li=Ii.isLoading,Vi=Ii.checked,vo=Ii.halfChecked,Qr=Ii.option,Er=Ii.fullPath,qt=Ii.fullPathKey,pi=Ii.disableCheckbox,pr=function(){if(!(Ni||on)){var io=(0,ue.Z)(Er);Rn&&Wr&&io.pop(),yt(io)}},qi=function(){nt(Qr)&&Zt(Er,Wr)},$r;return typeof Qr.title=="string"?$r=Qr.title:typeof Zi=="string"&&($r=Zi),Re.createElement("li",{key:qt,className:Me()(Jn,(Si={},(0,he.Z)(Si,"".concat(Jn,"-expand"),!Wr),(0,he.Z)(Si,"".concat(Jn,"-active"),Gn===sr||Gn===qt),(0,he.Z)(Si,"".concat(Jn,"-disabled"),Ni),(0,he.Z)(Si,"".concat(Jn,"-loading"),li),Si)),style:hn,role:"menuitemcheckbox",title:$r,"aria-checked":Vi,"data-path-key":qt,onClick:function(){pr(),!pi&&(!Wi||Wr)&&qi()},onDoubleClick:function(){In&&Wt(!1)},onMouseEnter:function(){Rn&&pr()},onMouseDown:function(io){io.preventDefault()}},Wi&&Re.createElement(Un,{prefixCls:"".concat(Li,"-checkbox"),checked:Vi,halfChecked:vo,disabled:Ni||pi,disableCheckbox:pi,onClick:function(io){pi||(io.stopPropagation(),qi())}}),Re.createElement("div",{className:"".concat(Jn,"-content")},Zi),!li&&Pi&&!Wr&&Re.createElement("div",{className:"".concat(Jn,"-expand-icon")},Pi),li&&tn&&Re.createElement("div",{className:"".concat(Jn,"-loading-icon")},tn))}))}var Lt=function(){var jn=(0,st.lk)(),Li=jn.multiple,Wi=jn.open,ji=Re.useContext(de),Gn=ji.values,Ht=Re.useState([]),Wt=(0,Ct.Z)(Ht,2),Zt=Wt[0],yt=Wt[1];return Re.useEffect(function(){if(Wi&&!Li){var un=Gn[0];yt(un||[])}},[Wi]),[Zt,yt]},ti=me(85108),gi=function(jn,Li,Wi,ji,Gn,Ht){var Wt=(0,st.lk)(),Zt=Wt.direction,yt=Wt.searchValue,un=Wt.toggleOpen,vn=Wt.open,At=Zt==="rtl",nt=Re.useMemo(function(){for(var hn=-1,Rn=Li,Oi=[],Ii=[],Si=ji.length,Ni=Bt(Li,Wi),Zi=function(Qr){var Er=Rn.findIndex(function(qt,pi){return(Ni[pi]?dt(Ni[pi]):qt[Wi.value])===ji[Qr]});if(Er===-1)return"break";hn=Er,Oi.push(hn),Ii.push(ji[Qr]),Rn=Rn[hn][Wi.children]},sr=0;sr<Si&&Rn;sr+=1){var Wr=Zi(sr);if(Wr==="break")break}for(var li=Li,Vi=0;Vi<Oi.length-1;Vi+=1)li=li[Oi[Vi]][Wi.children];return[Ii,hn,li,Ni]},[ji,Wi,Li]),on=(0,Ct.Z)(nt,4),fn=on[0],Jn=on[1],pn=on[2],Rt=on[3],In=function(Rn){Gn(Rn)},Vn=function(Rn){var Oi=pn.length,Ii=Jn;Ii===-1&&Rn<0&&(Ii=Oi);for(var Si=0;Si<Oi;Si+=1){Ii=(Ii+Rn+Oi)%Oi;var Ni=pn[Ii];if(Ni&&!Ni.disabled){var Zi=fn.slice(0,-1).concat(Rt[Ii]?dt(Rt[Ii]):Ni[Wi.value]);In(Zi);return}}},Pi=function(){if(fn.length>1){var Rn=fn.slice(0,-1);In(Rn)}else un(!1)},tn=function(){var Rn,Oi=((Rn=pn[Jn])===null||Rn===void 0?void 0:Rn[Wi.children])||[],Ii=Oi.find(function(Ni){return!Ni.disabled});if(Ii){var Si=[].concat((0,ue.Z)(fn),[Ii[Wi.value]]);In(Si)}};Re.useImperativeHandle(jn,function(){return{onKeyDown:function(Rn){var Oi=Rn.which;switch(Oi){case ti.Z.UP:case ti.Z.DOWN:{var Ii=0;Oi===ti.Z.UP?Ii=-1:Oi===ti.Z.DOWN&&(Ii=1),Ii!==0&&Vn(Ii);break}case ti.Z.LEFT:{if(yt)break;At?tn():Pi();break}case ti.Z.RIGHT:{if(yt)break;At?Pi():tn();break}case ti.Z.BACKSPACE:{yt||Pi();break}case ti.Z.ENTER:{if(fn.length){var Si=pn[Jn],Ni=(Si==null?void 0:Si[be])||[];Ni.length?Ht(Ni.map(function(Zi){return Zi[Wi.value]}),Ni[Ni.length-1]):Ht(fn,pn[Jn])}break}case ti.Z.ESC:un(!1),vn&&Rn.stopPropagation()}},onKeyUp:function(){}}})},Pn=Re.forwardRef(function(jn,Li){var Wi,ji,Gn,Ht,Wt=(0,st.lk)(),Zt=Wt.prefixCls,yt=Wt.multiple,un=Wt.searchValue,vn=Wt.toggleOpen,At=Wt.notFoundContent,nt=Wt.direction,on=Wt.open,fn=Re.useRef(),Jn=nt==="rtl",pn=Re.useContext(de),Rt=pn.options,In=pn.values,Vn=pn.halfValues,Pi=pn.fieldNames,tn=pn.changeOnSelect,hn=pn.onSelect,Rn=pn.searchOptions,Oi=pn.dropdownPrefixCls,Ii=pn.loadData,Si=pn.expandTrigger,Ni=Oi||Zt,Zi=Re.useState([]),sr=(0,Ct.Z)(Zi,2),Wr=sr[0],li=sr[1],Vi=function(Yi){if(!(!Ii||un)){var ua=Nt(Yi,Rt,Pi),Zo=ua.map(function(Do){var _o=Do.option;return _o}),Dr=Zo[Zo.length-1];if(Dr&&!It(Dr,Pi)){var Ir=dt(Yi);li(function(Do){return[].concat((0,ue.Z)(Do),[Ir])}),Ii(Zo)}}};Re.useEffect(function(){Wr.length&&Wr.forEach(function(Jo){var Yi=bt(Jo),ua=Nt(Yi,Rt,Pi,!0).map(function(Dr){var Ir=Dr.option;return Ir}),Zo=ua[ua.length-1];(!Zo||Zo[Pi.children]||It(Zo,Pi))&&li(function(Dr){return Dr.filter(function(Ir){return Ir!==Jo})})})},[Rt,Wr,Pi]);var vo=Re.useMemo(function(){return new Set(He(In))},[In]),Qr=Re.useMemo(function(){return new Set(He(Vn))},[Vn]),Er=Lt(),qt=(0,Ct.Z)(Er,2),pi=qt[0],pr=qt[1],qi=function(Yi){pr(Yi),Vi(Yi)},$r=function(Yi){var ua=Yi.disabled,Zo=It(Yi,Pi);return!ua&&(Zo||tn||yt)},Ar=function(Yi,ua){var Zo=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;hn(Yi),!yt&&(ua||tn&&(Si==="hover"||Zo))&&vn(!1)},io=Re.useMemo(function(){return un?Rn:Rt},[un,Rn,Rt]),Kr=Re.useMemo(function(){for(var Jo=[{options:io}],Yi=io,ua=Bt(Yi,Pi),Zo=function(){var _o=pi[Dr],Ti=Yi.find(function(jo,Ra){return(ua[Ra]?dt(ua[Ra]):jo[Pi.value])===_o}),tt=Ti==null?void 0:Ti[Pi.children];if(!(tt!=null&&tt.length))return"break";Yi=tt,Jo.push({options:tt})},Dr=0;Dr<pi.length;Dr+=1){var Ir=Zo();if(Ir==="break")break}return Jo},[io,pi,Pi]),jr=function(Yi,ua){$r(ua)&&Ar(Yi,It(ua,Pi),!0)};gi(Li,io,Pi,pi,qi,jr),Re.useEffect(function(){for(var Jo=0;Jo<pi.length;Jo+=1){var Yi,ua=pi.slice(0,Jo+1),Zo=dt(ua),Dr=(Yi=fn.current)===null||Yi===void 0?void 0:Yi.querySelector('li[data-path-key="'.concat(Zo.replace(/\\{0,2}"/g,'\\"'),'"]'));Dr&&xt(Dr)}},[pi]);var yo=!((Wi=Kr[0])!==null&&Wi!==void 0&&(ji=Wi.options)!==null&&ji!==void 0&&ji.length),$n=[(Gn={},(0,he.Z)(Gn,Pi.value,"__EMPTY__"),(0,he.Z)(Gn,yn,At),(0,he.Z)(Gn,"disabled",!0),Gn)],Xo=(0,ve.Z)((0,ve.Z)({},jn),{},{multiple:!yo&&yt,onSelect:Ar,onActive:qi,onToggleOpen:vn,checkedSet:vo,halfCheckedSet:Qr,loadingKeys:Wr,isSelectable:$r}),Kn=yo?[{options:$n}]:Kr,Io=Kn.map(function(Jo,Yi){var ua=pi.slice(0,Yi),Zo=pi[Yi];return Re.createElement(sn,(0,Mt.Z)({key:Yi},Xo,{searchValue:un,prefixCls:Ni,options:Jo.options,prevValuePath:ua,activeValue:Zo}))});return Re.createElement(xn,{open:on},Re.createElement("div",{className:Me()("".concat(Ni,"-menus"),(Ht={},(0,he.Z)(Ht,"".concat(Ni,"-menu-empty"),yo),(0,he.Z)(Ht,"".concat(Ni,"-rtl"),Jn),Ht)),ref:fn},Io))}),Xt=Pn;function Kt(jn){var Li=jn.onPopupVisibleChange,Wi=jn.popupVisible,ji=jn.popupClassName,Gn=jn.popupPlacement;warning(!Li,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(Wi===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(ji===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(Gn===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Ot(jn,Li){if(jn){var Wi=function ji(Gn){for(var Ht=0;Ht<Gn.length;Ht++){var Wt=Gn[Ht];if(Wt[Li==null?void 0:Li.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(Wt[Li==null?void 0:Li.children])&&ji(Wt[Li==null?void 0:Li.children]))return!0}};Wi(jn)}}var rt=null,Ue=["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","children","dropdownMatchSelectWidth","showCheckedStrategy"];function $t(jn){return Array.isArray(jn)&&Array.isArray(jn[0])}function Gt(jn){return jn?$t(jn)?jn:(jn.length===0?[]:[jn]).map(function(Li){return Array.isArray(Li)?Li:[Li]}):[]}var it=Re.forwardRef(function(jn,Li){var Wi=jn.id,ji=jn.prefixCls,Gn=ji===void 0?"rc-cascader":ji,Ht=jn.fieldNames,Wt=jn.defaultValue,Zt=jn.value,yt=jn.changeOnSelect,un=jn.onChange,vn=jn.displayRender,At=jn.checkable,nt=jn.autoClearSearchValue,on=nt===void 0?!0:nt,fn=jn.searchValue,Jn=jn.onSearch,pn=jn.showSearch,Rt=jn.expandTrigger,In=jn.options,Vn=jn.dropdownPrefixCls,Pi=jn.loadData,tn=jn.popupVisible,hn=jn.open,Rn=jn.popupClassName,Oi=jn.dropdownClassName,Ii=jn.dropdownMenuColumnStyle,Si=jn.popupPlacement,Ni=jn.placement,Zi=jn.onDropdownVisibleChange,sr=jn.onPopupVisibleChange,Wr=jn.expandIcon,li=Wr===void 0?">":Wr,Vi=jn.loadingIcon,vo=jn.children,Qr=jn.dropdownMatchSelectWidth,Er=Qr===void 0?!1:Qr,qt=jn.showCheckedStrategy,pi=qt===void 0?Xe:qt,pr=(0,Ye.Z)(jn,Ue),qi=(0,pt.ZP)(Wi),$r=!!At,Ar=(0,te.Z)(Wt,{value:Zt,postState:Gt}),io=(0,Ct.Z)(Ar,2),Kr=io[0],jr=io[1],yo=Re.useMemo(function(){return et(Ht)},[JSON.stringify(Ht)]),$n=Re.useMemo(function(){return In||[]},[In]),Xo=Tt($n,yo),Kn=Re.useCallback(function(ho){var ca=Xo();return ho.map(function(ja){var hs=ca[ja].nodes;return hs.map(function(fs){return fs[yo.value]})})},[Xo,yo]),Io=(0,te.Z)("",{value:fn,postState:function(ca){return ca||""}}),Jo=(0,Ct.Z)(Io,2),Yi=Jo[0],ua=Jo[1],Zo=function(ca,ja){ua(ca),ja.source!=="blur"&&Jn&&Jn(ca)},Dr=zt(pn),Ir=(0,Ct.Z)(Dr,2),Do=Ir[0],_o=Ir[1],Ti=je(Yi,$n,yo,Vn||Gn,_o,yt),tt=Ln($n,yo),jo=Re.useMemo(function(){var ho=tt(Kr),ca=(0,Ct.Z)(ho,2),ja=ca[0],hs=ca[1];if(!$r||!Kr.length)return[ja,[],hs];var fs=He(ja),ll=Xo(),Ys=(0,wt.S)(fs,!0,ll),Bn=Ys.checkedKeys,Es=Ys.halfCheckedKeys;return[Kn(Bn),Kn(Es),hs]},[$r,Kr,Xo,Kn,tt]),Ra=(0,Ct.Z)(jo,3),$a=Ra[0],ls=Ra[1],Or=Ra[2],xo=Re.useMemo(function(){var ho=He($a),ca=Ut(ho,Xo,pi);return[].concat((0,ue.Z)(Or),(0,ue.Z)(Kn(ca)))},[$a,Xo,Kn,Or,pi]),na=qe(xo,$n,yo,$r,vn),Da=(0,Ie.Z)(function(ho){if(jr(ho),un){var ca=Gt(ho),ja=ca.map(function(ll){return Nt(ll,$n,yo).map(function(Ys){return Ys.option})}),hs=$r?ca:ca[0],fs=$r?ja:ja[0];un(hs,fs)}}),Ao=(0,Ie.Z)(function(ho){if((!$r||on)&&ua(""),!$r)Da(ho);else{var ca=dt(ho),ja=He($a),hs=He(ls),fs=ja.includes(ca),ll=Or.some(function(Ql){return dt(Ql)===ca}),Ys=$a,Bn=Or;if(ll&&!fs)Bn=Or.filter(function(Ql){return dt(Ql)!==ca});else{var Es=fs?ja.filter(function(Ql){return Ql!==ca}):[].concat((0,ue.Z)(ja),[ca]),Pl=Xo(),Wl;if(fs){var Mo=(0,wt.S)(Es,{checked:!1,halfCheckedKeys:hs},Pl);Wl=Mo.checkedKeys}else{var gl=(0,wt.S)(Es,!0,Pl);Wl=gl.checkedKeys}var Tu=Ut(Wl,Xo,pi);Ys=Kn(Tu)}Da([].concat((0,ue.Z)(Bn),(0,ue.Z)(Ys)))}}),Va=function(ca,ja){if(ja.type==="clear"){Da([]);return}var hs=ja.values[0],fs=hs.valueCells;Ao(fs)},Jr=hn!==void 0?hn:tn,eo=Oi||Rn,Eo=Ni||Si,ci=function(ca){Zi==null||Zi(ca),sr==null||sr(ca)},xa=Re.useMemo(function(){return{options:$n,fieldNames:yo,values:$a,halfValues:ls,changeOnSelect:yt,onSelect:Ao,checkable:At,searchOptions:Ti,dropdownPrefixCls:Vn,loadData:Pi,expandTrigger:Rt,expandIcon:li,loadingIcon:Vi,dropdownMenuColumnStyle:Ii}},[$n,yo,$a,ls,yt,Ao,At,Ti,Vn,Pi,Rt,li,Vi,Ii]),za=!(Yi?Ti:$n).length,xs=Yi&&_o.matchInputWidth||za?{}:{minWidth:"auto"};return Re.createElement(de.Provider,{value:xa},Re.createElement(st.Ac,(0,Mt.Z)({},pr,{ref:Li,id:qi,prefixCls:Gn,autoClearSearchValue:on,dropdownMatchSelectWidth:Er,dropdownStyle:xs,displayValues:na,onDisplayValuesChange:Va,mode:$r?"multiple":void 0,searchValue:Yi,onSearch:Zo,showSearch:Do,OptionList:Xt,emptyOptions:za,open:Jr,dropdownClassName:eo,placement:Eo,onDropdownVisibleChange:ci,getRawInputElement:function(){return vo}})))});it.SHOW_PARENT=Xe,it.SHOW_CHILD=Je;var at=it,Te=at,Pe=me(64002),ye=me(62892),ke=me(53487),$e=me(19080),Le=me(36355),vt=me(93891),an=me(1684),bn=me(19716),en=me(32441),wn=me(14154),ai=me(58582),_n=me(84443),Hn=me(66339),wi=me(33234),Hi=me(98447),_i=me(17313),cr=me(74207),_r=me(83116);const vi=jn=>{const{prefixCls:Li,componentCls:Wi,antCls:ji}=jn,Gn=`${Wi}-menu-item`,Ht=`
|
|
|
&${Gn}-expand ${Gn}-expand-icon,
|
|
|
${Gn}-loading-icon
|
|
|
`;return[{[Wi]:{width:jn.controlWidth}},{[`${Wi}-dropdown`]:[(0,Hi.C2)(`${Li}-checkbox`,jn),{[`&${ji}-select-dropdown`]:{padding:0}},{[Wi]:{"&-checkbox":{top:0,marginInlineEnd:jn.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${Wi}-menu-empty`]:{[`${Wi}-menu`]:{width:"100%",height:"auto",[Gn]:{color:jn.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:jn.controlItemWidth,height:jn.dropdownHeight,margin:0,padding:jn.menuPadding,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${jn.lineWidth}px ${jn.lineType} ${jn.colorSplit}`},"&-item":Object.assign(Object.assign({},_i.vS),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:jn.optionPadding,lineHeight:jn.lineHeight,cursor:"pointer",transition:`all ${jn.motionDurationMid}`,borderRadius:jn.borderRadiusSM,"&:hover":{background:jn.controlItemBgHover},"&-disabled":{color:jn.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[Ht]:{color:jn.colorTextDisabled}},[`&-active:not(${Gn}-disabled)`]:{"&, &:hover":{fontWeight:jn.optionSelectedFontWeight,backgroundColor:jn.optionSelectedBg}},"&-content":{flex:"auto"},[Ht]:{marginInlineStart:jn.paddingXXS,color:jn.colorTextDescription,fontSize:jn.fontSizeIcon},"&-keyword":{color:jn.colorHighlight}})}}}]},{[`${Wi}-dropdown-rtl`]:{direction:"rtl"}},(0,cr.c)(jn)]};var si=(0,_r.Z)("Cascader",jn=>[vi(jn)],jn=>{const Li=Math.round((jn.controlHeight-jn.fontSize*jn.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:jn.controlItemBgActive,optionSelectedFontWeight:jn.fontWeightStrong,optionPadding:`${Li}px ${jn.paddingSM}px`,menuPadding:jn.paddingXXS}}),fi=function(jn,Li){var Wi={};for(var ji in jn)Object.prototype.hasOwnProperty.call(jn,ji)&&Li.indexOf(ji)<0&&(Wi[ji]=jn[ji]);if(jn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gn=0,ji=Object.getOwnPropertySymbols(jn);Gn<ji.length;Gn++)Li.indexOf(ji[Gn])<0&&Object.prototype.propertyIsEnumerable.call(jn,ji[Gn])&&(Wi[ji[Gn]]=jn[ji[Gn]]);return Wi};const{SHOW_CHILD:Ui,SHOW_PARENT:Fi}=Te;function ao(jn,Li,Wi){const ji=jn.toLowerCase().split(Li).reduce((Wt,Zt,yt)=>yt===0?[Zt]:[].concat((0,ue.Z)(Wt),[Li,Zt]),[]),Gn=[];let Ht=0;return ji.forEach((Wt,Zt)=>{const yt=Ht+Wt.length;let un=jn.slice(Ht,yt);Ht=yt,Zt%2===1&&(un=Re.createElement("span",{className:`${Wi}-menu-item-keyword`,key:`separator-${Zt}`},un)),Gn.push(un)}),Gn}const wr=(jn,Li,Wi,ji)=>{const Gn=[],Ht=jn.toLowerCase();return Li.forEach((Wt,Zt)=>{Zt!==0&&Gn.push(" / ");let yt=Wt[ji.label];const un=typeof yt;(un==="string"||un==="number")&&(yt=ao(String(yt),Ht,Wi)),Gn.push(yt)}),Gn},Be=Re.forwardRef((jn,Li)=>{const{prefixCls:Wi,size:ji,disabled:Gn,className:Ht,rootClassName:Wt,multiple:Zt,bordered:yt=!0,transitionName:un,choiceTransitionName:vn="",popupClassName:At,dropdownClassName:nt,expandIcon:on,placement:fn,showSearch:Jn,allowClear:pn=!0,notFoundContent:Rt,direction:In,getPopupContainer:Vn,status:Pi,showArrow:tn,builtinPlacements:hn,style:Rn}=jn,Oi=fi(jn,["prefixCls","size","disabled","className","rootClassName","multiple","bordered","transitionName","choiceTransitionName","popupClassName","dropdownClassName","expandIcon","placement","showSearch","allowClear","notFoundContent","direction","getPopupContainer","status","showArrow","builtinPlacements","style"]),Ii=(0,Pe.Z)(Oi,["suffixIcon"]),{getPopupContainer:Si,getPrefixCls:Ni,renderEmpty:Zi,direction:sr,popupOverflow:Wr,cascader:li}=Re.useContext(Le.E_),Vi=In||sr,vo=Vi==="rtl",{status:Qr,hasFeedback:Er,isFormItemInput:qt,feedbackIcon:pi}=Re.useContext(en.aM),pr=(0,$e.F)(Qr,Pi),qi=Rt||(Zi==null?void 0:Zi("Cascader"))||Re.createElement(vt.Z,{componentName:"Cascader"}),$r=Ni(),Ar=Ni("select",Wi),io=Ni("cascader",Wi),[Kr,jr]=(0,wn.Z)(Ar),[yo]=si(io),{compactSize:$n,compactItemClassnames:Xo}=(0,wi.ri)(Ar,In),Kn=Me()(At||nt,`${io}-dropdown`,{[`${io}-dropdown-rtl`]:Vi==="rtl"},Wt,jr),Io=Re.useMemo(()=>{if(!Jn)return Jn;let Or={render:wr};return typeof Jn=="object"&&(Or=Object.assign(Object.assign({},Or),Jn)),Or},[Jn]),Jo=(0,bn.Z)(Or=>{var xo;return(xo=ji!=null?ji:$n)!==null&&xo!==void 0?xo:Or}),Yi=Re.useContext(an.Z),ua=Gn!=null?Gn:Yi;let Zo=on;on||(Zo=vo?Re.createElement(Ze.Z,null):Re.createElement(We.Z,null));const Dr=Re.createElement("span",{className:`${Ar}-menu-item-loading-icon`},Re.createElement(ot.Z,{spin:!0})),Ir=Re.useMemo(()=>Zt?Re.createElement("span",{className:`${io}-checkbox-inner`}):!1,[Zt]),Do=(0,_n.Z)(jn.suffixIcon,tn),{suffixIcon:_o,removeIcon:Ti,clearIcon:tt}=(0,Hn.Z)(Object.assign(Object.assign({},jn),{hasFeedback:Er,feedbackIcon:pi,showSuffixIcon:Do,multiple:Zt,prefixCls:Ar,componentName:"Cascader"})),jo=Re.useMemo(()=>fn!==void 0?fn:vo?"bottomRight":"bottomLeft",[fn,vo]),Ra=(0,ai.Z)(hn,Wr),$a=pn===!0?{clearIcon:tt}:pn,ls=Re.createElement(Te,Object.assign({prefixCls:Ar,className:Me()(!Wi&&io,{[`${Ar}-lg`]:Jo==="large",[`${Ar}-sm`]:Jo==="small",[`${Ar}-rtl`]:vo,[`${Ar}-borderless`]:!yt,[`${Ar}-in-form-item`]:qt},(0,$e.Z)(Ar,pr,Er),Xo,li==null?void 0:li.className,Ht,Wt,jr),disabled:ua,style:Object.assign(Object.assign({},li==null?void 0:li.style),Rn)},Ii,{builtinPlacements:Ra,direction:Vi,placement:jo,notFoundContent:qi,allowClear:$a,showSearch:Io,expandIcon:Zo,suffixIcon:_o,removeIcon:Ti,loadingIcon:Dr,checkable:Ir,dropdownClassName:Kn,dropdownPrefixCls:Wi||io,choiceTransitionName:(0,ye.m)($r,"",vn),transitionName:(0,ye.m)($r,"slide-up",un),getPopupContainer:Vn||Si,ref:Li}));return yo(Kr(ls))}),Xr=(0,ke.Z)(Be);Be.SHOW_PARENT=Fi,Be.SHOW_CHILD=Ui,Be._InternalPanelDoNotUseOrYouWillBeFired=Xr;var Hr=Be},24905:function(zn,En,me){"use strict";me.d(En,{default:function(){return je}});var ue=me(92310),Re=me.n(ue),Ze=me(5630),ot=me(59301),We=me(36355),lt=me(1684),Me=me(32441),Ct=ot.createContext(null),Ye=me(98447),st=me(14088),pt=me(4572),wt=function(ze,Xe){var Je={};for(var dt in ze)Object.prototype.hasOwnProperty.call(ze,dt)&&Xe.indexOf(dt)<0&&(Je[dt]=ze[dt]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,dt=Object.getOwnPropertySymbols(ze);He<dt.length;He++)Xe.indexOf(dt[He])<0&&Object.prototype.propertyIsEnumerable.call(ze,dt[He])&&(Je[dt[He]]=ze[dt[He]]);return Je};const Ie=(ze,Xe)=>{var Je;const{prefixCls:dt,className:He,rootClassName:bt,children:et,indeterminate:It=!1,style:xt,onMouseEnter:Bt,onMouseLeave:Ut,skipGroup:Nt=!1,disabled:qe}=ze,Ke=wt(ze,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:Tt,direction:Ln,checkbox:Mn}=ot.useContext(We.E_),zt=ot.useContext(Ct),{isFormItemInput:rn}=ot.useContext(Me.aM),xn=ot.useContext(lt.Z),Un=(Je=(zt==null?void 0:zt.disabled)||qe)!==null&&Je!==void 0?Je:xn,yn=ot.useRef(Ke.value);ot.useEffect(()=>{zt==null||zt.registerValue(Ke.value)},[]),ot.useEffect(()=>{if(!Nt)return Ke.value!==yn.current&&(zt==null||zt.cancelValue(yn.current),zt==null||zt.registerValue(Ke.value),yn.current=Ke.value),()=>zt==null?void 0:zt.cancelValue(Ke.value)},[Ke.value]);const sn=Tt("checkbox",dt),[Lt,ti]=(0,Ye.ZP)(sn),gi=Object.assign({},Ke);zt&&!Nt&&(gi.onChange=function(){Ke.onChange&&Ke.onChange.apply(Ke,arguments),zt.toggleOption&&zt.toggleOption({label:et,value:Ke.value})},gi.name=zt.name,gi.checked=zt.value.includes(Ke.value));const Pn=Re()(`${sn}-wrapper`,{[`${sn}-rtl`]:Ln==="rtl",[`${sn}-wrapper-checked`]:gi.checked,[`${sn}-wrapper-disabled`]:Un,[`${sn}-wrapper-in-form-item`]:rn},Mn==null?void 0:Mn.className,He,bt,ti),Xt=Re()({[`${sn}-indeterminate`]:It},pt.A,ti),Kt=It?"mixed":void 0;return Lt(ot.createElement(st.Z,{component:"Checkbox",disabled:Un},ot.createElement("label",{className:Pn,style:Object.assign(Object.assign({},Mn==null?void 0:Mn.style),xt),onMouseEnter:Bt,onMouseLeave:Ut},ot.createElement(Ze.Z,Object.assign({"aria-checked":Kt},gi,{prefixCls:sn,className:Xt,disabled:Un,ref:Xe})),et!==void 0&&ot.createElement("span",null,et))))};var ee=ot.forwardRef(Ie),de=me(26390),se=me(64002),he=function(ze,Xe){var Je={};for(var dt in ze)Object.prototype.hasOwnProperty.call(ze,dt)&&Xe.indexOf(dt)<0&&(Je[dt]=ze[dt]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,dt=Object.getOwnPropertySymbols(ze);He<dt.length;He++)Xe.indexOf(dt[He])<0&&Object.prototype.propertyIsEnumerable.call(ze,dt[He])&&(Je[dt[He]]=ze[dt[He]]);return Je};const ve=(ze,Xe)=>{const{defaultValue:Je,children:dt,options:He=[],prefixCls:bt,className:et,rootClassName:It,style:xt,onChange:Bt}=ze,Ut=he(ze,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Nt,direction:qe}=ot.useContext(We.E_),[Ke,Tt]=ot.useState(Ut.value||Je||[]),[Ln,Mn]=ot.useState([]);ot.useEffect(()=>{"value"in Ut&&Tt(Ut.value||[])},[Ut.value]);const zt=ot.useMemo(()=>He.map(Ot=>typeof Ot=="string"||typeof Ot=="number"?{label:Ot,value:Ot}:Ot),[He]),rn=Ot=>{Mn(rt=>rt.filter(Ue=>Ue!==Ot))},xn=Ot=>{Mn(rt=>[].concat((0,de.Z)(rt),[Ot]))},Un=Ot=>{const rt=Ke.indexOf(Ot.value),Ue=(0,de.Z)(Ke);rt===-1?Ue.push(Ot.value):Ue.splice(rt,1),"value"in Ut||Tt(Ue),Bt==null||Bt(Ue.filter($t=>Ln.includes($t)).sort(($t,Gt)=>{const it=zt.findIndex(Te=>Te.value===$t),at=zt.findIndex(Te=>Te.value===Gt);return it-at}))},yn=Nt("checkbox",bt),sn=`${yn}-group`,[Lt,ti]=(0,Ye.ZP)(yn),gi=(0,se.Z)(Ut,["value","disabled"]),Pn=He.length?zt.map(Ot=>ot.createElement(ee,{prefixCls:yn,key:Ot.value.toString(),disabled:"disabled"in Ot?Ot.disabled:Ut.disabled,value:Ot.value,checked:Ke.includes(Ot.value),onChange:Ot.onChange,className:`${sn}-item`,style:Ot.style,title:Ot.title},Ot.label)):dt,Xt={toggleOption:Un,value:Ke,disabled:Ut.disabled,name:Ut.name,registerValue:xn,cancelValue:rn},Kt=Re()(sn,{[`${sn}-rtl`]:qe==="rtl"},et,It,ti);return Lt(ot.createElement("div",Object.assign({className:Kt,style:xt},gi,{ref:Xe}),ot.createElement(Ct.Provider,{value:Xt},Pn)))},be=ot.forwardRef(ve);var Ne=ot.memo(be);const Fe=ee;Fe.Group=Ne,Fe.__ANT_CHECKBOX=!0;var je=Fe},98447:function(zn,En,me){"use strict";me.d(En,{C2:function(){return We}});var ue=me(17313),Re=me(37613),Ze=me(83116);const ot=lt=>{const{checkboxCls:Me}=lt,Mt=`${Me}-wrapper`;return[{[`${Me}-group`]:Object.assign(Object.assign({},(0,ue.Wf)(lt)),{display:"inline-flex",flexWrap:"wrap",columnGap:lt.marginXS,[`> ${lt.antCls}-row`]:{flex:1}}),[Mt]:Object.assign(Object.assign({},(0,ue.Wf)(lt)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${Mt}`]:{marginInlineStart:0},[`&${Mt}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Me]:Object.assign(Object.assign({},(0,ue.Wf)(lt)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:lt.borderRadiusSM,alignSelf:"center",[`${Me}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Me}-inner`]:Object.assign({},(0,ue.oN)(lt))},[`${Me}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:lt.checkboxSize,height:lt.checkboxSize,direction:"ltr",backgroundColor:lt.colorBgContainer,border:`${lt.lineWidth}px ${lt.lineType} ${lt.colorBorder}`,borderRadius:lt.borderRadiusSM,borderCollapse:"separate",transition:`all ${lt.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:lt.checkboxSize/14*5,height:lt.checkboxSize/14*8,border:`${lt.lineWidthBold}px solid ${lt.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${lt.motionDurationFast} ${lt.motionEaseInBack}, opacity ${lt.motionDurationFast}`}},"& + span":{paddingInlineStart:lt.paddingXS,paddingInlineEnd:lt.paddingXS}})},{[`
|
|
|
${Mt}:not(${Mt}-disabled),
|
|
|
${Me}:not(${Me}-disabled)
|
|
|
`]:{[`&:hover ${Me}-inner`]:{borderColor:lt.colorPrimary}},[`${Mt}:not(${Mt}-disabled)`]:{[`&:hover ${Me}-checked:not(${Me}-disabled) ${Me}-inner`]:{backgroundColor:lt.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Me}-checked:not(${Me}-disabled):after`]:{borderColor:lt.colorPrimaryHover}}},{[`${Me}-checked`]:{[`${Me}-inner`]:{backgroundColor:lt.colorPrimary,borderColor:lt.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${lt.motionDurationMid} ${lt.motionEaseOutBack} ${lt.motionDurationFast}`}}},[`
|
|
|
${Mt}-checked:not(${Mt}-disabled),
|
|
|
${Me}-checked:not(${Me}-disabled)
|
|
|
`]:{[`&:hover ${Me}-inner`]:{backgroundColor:lt.colorPrimaryHover,borderColor:"transparent"}}},{[Me]:{"&-indeterminate":{[`${Me}-inner`]:{backgroundColor:lt.colorBgContainer,borderColor:lt.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:lt.fontSizeLG/2,height:lt.fontSizeLG/2,backgroundColor:lt.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${Mt}-disabled`]:{cursor:"not-allowed"},[`${Me}-disabled`]:{[`&, ${Me}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Me}-inner`]:{background:lt.colorBgContainerDisabled,borderColor:lt.colorBorder,"&:after":{borderColor:lt.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:lt.colorTextDisabled},[`&${Me}-indeterminate ${Me}-inner::after`]:{background:lt.colorTextDisabled}}}]};function We(lt,Me){const Mt=(0,Re.TS)(Me,{checkboxCls:`.${lt}`,checkboxSize:Me.controlInteractiveSize});return[ot(Mt)]}En.ZP=(0,Ze.Z)("Checkbox",(lt,Me)=>{let{prefixCls:Mt}=Me;return[We(Mt,lt)]})},36381:function(zn,En,me){"use strict";me.d(En,{default:function(){return gi}});var ue=me(53878),Re=me(92310),Ze=me.n(Re),ot=me(5891),We=me(26390),lt=me(29043),Me=me(80665),Mt=me(35788),Ct=me(51395),Ye=me(59301),st=me(19149),pt=me(38298),wt=me(80962),Ie=me(43469),te=me(85108),ee=Ye.forwardRef(function(Pn,Xt){var Kt=Pn.prefixCls,Ot=Pn.forceRender,rt=Pn.className,Ue=Pn.style,$t=Pn.children,Gt=Pn.isActive,it=Pn.role,at=Ye.useState(Gt||Ot),Te=(0,lt.Z)(at,2),Pe=Te[0],ye=Te[1];return Ye.useEffect(function(){(Ot||Gt)&&ye(!0)},[Ot,Gt]),Pe?Ye.createElement("div",{ref:Xt,className:Ze()("".concat(Kt,"-content"),(0,wt.Z)((0,wt.Z)({},"".concat(Kt,"-content-active"),Gt),"".concat(Kt,"-content-inactive"),!Gt),rt),style:Ue,role:it},Ye.createElement("div",{className:"".concat(Kt,"-content-box")},$t)):null});ee.displayName="PanelContent";var de=ee,se=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],he=Ye.forwardRef(function(Pn,Xt){var Kt=Pn.showArrow,Ot=Kt===void 0?!0:Kt,rt=Pn.headerClass,Ue=Pn.isActive,$t=Pn.onItemClick,Gt=Pn.forceRender,it=Pn.className,at=Pn.prefixCls,Te=Pn.collapsible,Pe=Pn.accordion,ye=Pn.panelKey,ke=Pn.extra,$e=Pn.header,Le=Pn.expandIcon,vt=Pn.openMotion,an=Pn.destroyInactivePanel,bn=Pn.children,en=(0,st.Z)(Pn,se),wn=Te==="disabled",ai=Te==="header",_n=Te==="icon",Hn=ke!=null&&typeof ke!="boolean",wi=function(){$t==null||$t(ye)},Hi=function(fi){(fi.key==="Enter"||fi.keyCode===te.Z.ENTER||fi.which===te.Z.ENTER)&&wi()},_i=typeof Le=="function"?Le(Pn):Ye.createElement("i",{className:"arrow"});_i&&(_i=Ye.createElement("div",{className:"".concat(at,"-expand-icon"),onClick:["header","icon"].includes(Te)?wi:void 0},_i));var cr=Ze()((0,wt.Z)((0,wt.Z)((0,wt.Z)({},"".concat(at,"-item"),!0),"".concat(at,"-item-active"),Ue),"".concat(at,"-item-disabled"),wn),it),_r=Ze()(rt,(0,wt.Z)((0,wt.Z)((0,wt.Z)({},"".concat(at,"-header"),!0),"".concat(at,"-header-collapsible-only"),ai),"".concat(at,"-icon-collapsible-only"),_n)),vi={className:_r,"aria-expanded":Ue,"aria-disabled":wn,onKeyDown:Hi};return!ai&&!_n&&(vi.onClick=wi,vi.role=Pe?"tab":"button",vi.tabIndex=wn?-1:0),Ye.createElement("div",(0,ot.Z)({},en,{ref:Xt,className:cr}),Ye.createElement("div",vi,Ot&&_i,Ye.createElement("span",{className:"".concat(at,"-header-text"),onClick:Te==="header"?wi:void 0},$e),Hn&&Ye.createElement("div",{className:"".concat(at,"-extra")},ke)),Ye.createElement(Ie.default,(0,ot.Z)({visible:Ue,leavedClassName:"".concat(at,"-content-hidden")},vt,{forceRender:Gt,removeOnLeave:an}),function(si,fi){var Ui=si.className,Fi=si.style;return Ye.createElement(de,{ref:fi,prefixCls:at,className:Ui,style:Fi,isActive:Ue,forceRender:Gt,role:Pe?"tabpanel":void 0},bn)}))}),ve=he,be=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Ne=function(Xt,Kt){var Ot=Kt.prefixCls,rt=Kt.accordion,Ue=Kt.collapsible,$t=Kt.destroyInactivePanel,Gt=Kt.onItemClick,it=Kt.activeKey,at=Kt.openMotion,Te=Kt.expandIcon;return Xt.map(function(Pe,ye){var ke=Pe.children,$e=Pe.label,Le=Pe.key,vt=Pe.collapsible,an=Pe.onItemClick,bn=Pe.destroyInactivePanel,en=(0,st.Z)(Pe,be),wn=String(Le!=null?Le:ye),ai=vt!=null?vt:Ue,_n=bn!=null?bn:$t,Hn=function(_i){ai!=="disabled"&&(Gt(_i),an==null||an(_i))},wi=!1;return rt?wi=it[0]===wn:wi=it.indexOf(wn)>-1,Ye.createElement(ve,(0,ot.Z)({},en,{prefixCls:Ot,key:wn,panelKey:wn,isActive:wi,accordion:rt,openMotion:at,expandIcon:Te,header:$e,collapsible:ai,onItemClick:Hn,destroyInactivePanel:_n}),ke)})},Fe=function(Xt,Kt,Ot){if(!Xt)return null;var rt=Ot.prefixCls,Ue=Ot.accordion,$t=Ot.collapsible,Gt=Ot.destroyInactivePanel,it=Ot.onItemClick,at=Ot.activeKey,Te=Ot.openMotion,Pe=Ot.expandIcon,ye=Xt.key||String(Kt),ke=Xt.props,$e=ke.header,Le=ke.headerClass,vt=ke.destroyInactivePanel,an=ke.collapsible,bn=ke.onItemClick,en=!1;Ue?en=at[0]===ye:en=at.indexOf(ye)>-1;var wn=an!=null?an:$t,ai=function(wi){wn!=="disabled"&&(it(wi),bn==null||bn(wi))},_n={key:ye,panelKey:ye,header:$e,headerClass:Le,isActive:en,prefixCls:rt,destroyInactivePanel:vt!=null?vt:Gt,openMotion:Te,accordion:Ue,children:Xt.props.children,onItemClick:ai,expandIcon:Pe,collapsible:wn};return typeof Xt.type=="string"?Xt:(Object.keys(_n).forEach(function(Hn){typeof _n[Hn]=="undefined"&&delete _n[Hn]}),Ye.cloneElement(Xt,_n))};function je(Pn,Xt,Kt){return Array.isArray(Pn)?Ne(Pn,Kt):(0,pt.Z)(Xt).map(function(Ot,rt){return Fe(Ot,rt,Kt)})}var ze=je,Xe=me(36994);function Je(Pn){var Xt=Pn;if(!Array.isArray(Xt)){var Kt=(0,Me.Z)(Xt);Xt=Kt==="number"||Kt==="string"?[Xt]:[]}return Xt.map(function(Ot){return String(Ot)})}var dt=Ye.forwardRef(function(Pn,Xt){var Kt=Pn.prefixCls,Ot=Kt===void 0?"rc-collapse":Kt,rt=Pn.destroyInactivePanel,Ue=rt===void 0?!1:rt,$t=Pn.style,Gt=Pn.accordion,it=Pn.className,at=Pn.children,Te=Pn.collapsible,Pe=Pn.openMotion,ye=Pn.expandIcon,ke=Pn.activeKey,$e=Pn.defaultActiveKey,Le=Pn.onChange,vt=Pn.items,an=Ze()(Ot,it),bn=(0,Mt.Z)([],{value:ke,onChange:function(Hi){return Le==null?void 0:Le(Hi)},defaultValue:$e,postState:Je}),en=(0,lt.Z)(bn,2),wn=en[0],ai=en[1],_n=function(Hi){return ai(function(){if(Gt)return wn[0]===Hi?[]:[Hi];var _i=wn.indexOf(Hi),cr=_i>-1;return cr?wn.filter(function(_r){return _r!==Hi}):[].concat((0,We.Z)(wn),[Hi])})};(0,Ct.ZP)(!at,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var Hn=ze(vt,at,{prefixCls:Ot,accordion:Gt,openMotion:Pe,expandIcon:ye,collapsible:Te,destroyInactivePanel:Ue,onItemClick:_n,activeKey:wn});return Ye.createElement("div",(0,ot.Z)({ref:Xt,className:an,style:$t,role:Gt?"tablist":void 0},(0,Xe.Z)(Pn,{aria:!0,data:!0})),Hn)}),He=Object.assign(dt,{Panel:ve}),bt=He,et=He.Panel,It=me(64002),xt=me(62892),Bt=me(92343),Ut=me(36355),Nt=me(19716),Ke=Ye.forwardRef((Pn,Xt)=>{const{getPrefixCls:Kt}=Ye.useContext(Ut.E_),{prefixCls:Ot,className:rt,showArrow:Ue=!0}=Pn,$t=Kt("collapse",Ot),Gt=Ze()({[`${$t}-no-arrow`]:!Ue},rt);return Ye.createElement(bt.Panel,Object.assign({ref:Xt},Pn,{prefixCls:$t,className:Gt}))}),Tt=me(17313),Ln=me(8378),Mn=me(83116),zt=me(37613);const rn=Pn=>{const{componentCls:Xt,contentBg:Kt,padding:Ot,headerBg:rt,headerPadding:Ue,collapseHeaderPaddingSM:$t,collapseHeaderPaddingLG:Gt,collapsePanelBorderRadius:it,lineWidth:at,lineType:Te,colorBorder:Pe,colorText:ye,colorTextHeading:ke,colorTextDisabled:$e,fontSize:Le,fontSizeLG:vt,lineHeight:an,marginSM:bn,paddingSM:en,paddingLG:wn,paddingXS:ai,motionDurationSlow:_n,fontSizeIcon:Hn,contentPadding:wi}=Pn,Hi=`${at}px ${Te} ${Pe}`;return{[Xt]:Object.assign(Object.assign({},(0,Tt.Wf)(Pn)),{backgroundColor:rt,border:Hi,borderBottom:0,borderRadius:`${it}px`,"&-rtl":{direction:"rtl"},[`& > ${Xt}-item`]:{borderBottom:Hi,"&:last-child":{[`
|
|
|
&,
|
|
|
& > ${Xt}-header`]:{borderRadius:`0 0 ${it}px ${it}px`}},[`> ${Xt}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:Ue,color:ke,lineHeight:an,cursor:"pointer",transition:`all ${_n}, visibility 0s`,[`> ${Xt}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${Xt}-expand-icon`]:{height:Le*an,display:"flex",alignItems:"center",paddingInlineEnd:bn},[`${Xt}-arrow`]:Object.assign(Object.assign({},(0,Tt.Ro)()),{fontSize:Hn,svg:{transition:`transform ${_n}`}}),[`${Xt}-header-text`]:{marginInlineEnd:"auto"}},[`${Xt}-header-collapsible-only`]:{cursor:"default",[`${Xt}-header-text`]:{flex:"none",cursor:"pointer"}},[`${Xt}-icon-collapsible-only`]:{cursor:"default",[`${Xt}-expand-icon`]:{cursor:"pointer"}}},[`${Xt}-content`]:{color:ye,backgroundColor:Kt,borderTop:Hi,[`& > ${Xt}-content-box`]:{padding:wi},"&-hidden":{display:"none"}},"&-small":{[`> ${Xt}-item`]:{[`> ${Xt}-header`]:{padding:$t,paddingInlineStart:ai,[`> ${Xt}-expand-icon`]:{marginInlineStart:en-ai}},[`> ${Xt}-content > ${Xt}-content-box`]:{padding:en}}},"&-large":{[`> ${Xt}-item`]:{fontSize:vt,[`> ${Xt}-header`]:{padding:Gt,paddingInlineStart:Ot,[`> ${Xt}-expand-icon`]:{height:vt*an,marginInlineStart:wn-Ot}},[`> ${Xt}-content > ${Xt}-content-box`]:{padding:wn}}},[`${Xt}-item:last-child`]:{[`> ${Xt}-content`]:{borderRadius:`0 0 ${it}px ${it}px`}},[`& ${Xt}-item-disabled > ${Xt}-header`]:{"\n &,\n & > .arrow\n ":{color:$e,cursor:"not-allowed"}},[`&${Xt}-icon-position-end`]:{[`& > ${Xt}-item`]:{[`> ${Xt}-header`]:{[`${Xt}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:bn}}}}})}},xn=Pn=>{const{componentCls:Xt}=Pn,Kt=`> ${Xt}-item > ${Xt}-header ${Xt}-arrow svg`;return{[`${Xt}-rtl`]:{[Kt]:{transform:"rotate(180deg)"}}}},Un=Pn=>{const{componentCls:Xt,headerBg:Kt,paddingXXS:Ot,colorBorder:rt}=Pn;return{[`${Xt}-borderless`]:{backgroundColor:Kt,border:0,[`> ${Xt}-item`]:{borderBottom:`1px solid ${rt}`},[`
|
|
|
> ${Xt}-item:last-child,
|
|
|
> ${Xt}-item:last-child ${Xt}-header
|
|
|
`]:{borderRadius:0},[`> ${Xt}-item:last-child`]:{borderBottom:0},[`> ${Xt}-item > ${Xt}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${Xt}-item > ${Xt}-content > ${Xt}-content-box`]:{paddingTop:Ot}}}},yn=Pn=>{const{componentCls:Xt,paddingSM:Kt}=Pn;return{[`${Xt}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${Xt}-item`]:{borderBottom:0,[`> ${Xt}-content`]:{backgroundColor:"transparent",border:0,[`> ${Xt}-content-box`]:{paddingBlock:Kt}}}}}};var sn=(0,Mn.Z)("Collapse",Pn=>{const Xt=(0,zt.TS)(Pn,{collapseHeaderPaddingSM:`${Pn.paddingXS}px ${Pn.paddingSM}px`,collapseHeaderPaddingLG:`${Pn.padding}px ${Pn.paddingLG}px`,collapsePanelBorderRadius:Pn.borderRadiusLG});return[rn(Xt),Un(Xt),yn(Xt),xn(Xt),(0,Ln.Z)(Xt)]},Pn=>({headerPadding:`${Pn.paddingSM}px ${Pn.padding}px`,headerBg:Pn.colorFillAlter,contentPadding:`${Pn.padding}px 16px`,contentBg:Pn.colorBgContainer})),ti=Object.assign(Ye.forwardRef((Pn,Xt)=>{const{getPrefixCls:Kt,direction:Ot,collapse:rt}=Ye.useContext(Ut.E_),{prefixCls:Ue,className:$t,rootClassName:Gt,style:it,bordered:at=!0,ghost:Te,size:Pe,expandIconPosition:ye="start",children:ke,expandIcon:$e}=Pn,Le=(0,Nt.Z)(Hi=>{var _i;return(_i=Pe!=null?Pe:Hi)!==null&&_i!==void 0?_i:"middle"}),vt=Kt("collapse",Ue),an=Kt(),[bn,en]=sn(vt),wn=Ye.useMemo(()=>ye==="left"?"start":ye==="right"?"end":ye,[ye]),ai=function(){let Hi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const _i=$e?$e(Hi):Ye.createElement(ue.Z,{rotate:Hi.isActive?90:void 0});return(0,Bt.Tm)(_i,()=>({className:Ze()(_i.props.className,`${vt}-arrow`)}))},_n=Ze()(`${vt}-icon-position-${wn}`,{[`${vt}-borderless`]:!at,[`${vt}-rtl`]:Ot==="rtl",[`${vt}-ghost`]:!!Te,[`${vt}-${Le}`]:Le!=="middle"},rt==null?void 0:rt.className,$t,Gt,en),Hn=Object.assign(Object.assign({},(0,xt.Z)(an)),{motionAppear:!1,leavedClassName:`${vt}-content-hidden`}),wi=Ye.useMemo(()=>ke?(0,pt.Z)(ke).map((Hi,_i)=>{var cr,_r;if(!((cr=Hi.props)===null||cr===void 0)&&cr.disabled){const vi=(_r=Hi.key)!==null&&_r!==void 0?_r:String(_i),{disabled:si,collapsible:fi}=Hi.props,Ui=Object.assign(Object.assign({},(0,It.Z)(Hi.props,["disabled"])),{key:vi,collapsible:fi!=null?fi:si?"disabled":void 0});return(0,Bt.Tm)(Hi,Ui)}return Hi}):null,[ke]);return bn(Ye.createElement(bt,Object.assign({ref:Xt,openMotion:Hn},(0,It.Z)(Pn,["rootClassName"]),{expandIcon:ai,prefixCls:vt,className:_n,style:Object.assign(Object.assign({},rt==null?void 0:rt.style),it)}),wi))}),{Panel:Ke}),gi=ti},93891:function(zn,En,me){"use strict";var ue=me(59301),Re=me(36355),Ze=me(64165);const ot=We=>{const{componentName:lt}=We,{getPrefixCls:Me}=(0,ue.useContext)(Re.E_),Mt=Me("empty");switch(lt){case"Table":case"List":return ue.createElement(Ze.Z,{image:Ze.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return ue.createElement(Ze.Z,{image:Ze.Z.PRESENTED_IMAGE_SIMPLE,className:`${Mt}-small`});default:return ue.createElement(Ze.Z,null)}};En.Z=ot},28103:function(zn,En,me){"use strict";me.d(En,{Z:function(){return pt}});var ue=me(92310),Re=me.n(ue),Ze=me(59301),ot=me(36355),We=me(17313),lt=me(83116),Me=me(37613);const Mt=wt=>{const{componentCls:Ie,sizePaddingEdgeHorizontal:te,colorSplit:ee,lineWidth:de,textPaddingInline:se,orientationMargin:he,verticalMarginInline:ve}=wt;return{[Ie]:Object.assign(Object.assign({},(0,We.Wf)(wt)),{borderBlockStart:`${de}px solid ${ee}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:ve,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${de}px solid ${ee}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${wt.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${Ie}-with-text`]:{display:"flex",alignItems:"center",margin:`${wt.dividerHorizontalWithTextGutterMargin}px 0`,color:wt.colorTextHeading,fontWeight:500,fontSize:wt.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${ee}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${de}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${Ie}-with-text-left`]:{"&::before":{width:`${he*100}%`},"&::after":{width:`${100-he*100}%`}},[`&-horizontal${Ie}-with-text-right`]:{"&::before":{width:`${100-he*100}%`},"&::after":{width:`${he*100}%`}},[`${Ie}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:se},"&-dashed":{background:"none",borderColor:ee,borderStyle:"dashed",borderWidth:`${de}px 0 0`},[`&-horizontal${Ie}-with-text${Ie}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${Ie}-dashed`]:{borderInlineStartWidth:de,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${Ie}-with-text`]:{color:wt.colorText,fontWeight:"normal",fontSize:wt.fontSize},[`&-horizontal${Ie}-with-text-left${Ie}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${Ie}-inner-text`]:{paddingInlineStart:te}},[`&-horizontal${Ie}-with-text-right${Ie}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${Ie}-inner-text`]:{paddingInlineEnd:te}}})}};var Ct=(0,lt.Z)("Divider",wt=>{const Ie=(0,Me.TS)(wt,{dividerHorizontalWithTextGutterMargin:wt.margin,dividerHorizontalGutterMargin:wt.marginLG,sizePaddingEdgeHorizontal:0});return[Mt(Ie)]},wt=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:wt.marginXS})),Ye=function(wt,Ie){var te={};for(var ee in wt)Object.prototype.hasOwnProperty.call(wt,ee)&&Ie.indexOf(ee)<0&&(te[ee]=wt[ee]);if(wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var de=0,ee=Object.getOwnPropertySymbols(wt);de<ee.length;de++)Ie.indexOf(ee[de])<0&&Object.prototype.propertyIsEnumerable.call(wt,ee[de])&&(te[ee[de]]=wt[ee[de]]);return te},pt=wt=>{const{getPrefixCls:Ie,direction:te,divider:ee}=Ze.useContext(ot.E_),{prefixCls:de,type:se="horizontal",orientation:he="center",orientationMargin:ve,className:be,rootClassName:Ne,children:Fe,dashed:je,plain:ze,style:Xe}=wt,Je=Ye(wt,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),dt=Ie("divider",de),[He,bt]=Ct(dt),et=he.length>0?`-${he}`:he,It=!!Fe,xt=he==="left"&&ve!=null,Bt=he==="right"&&ve!=null,Ut=Re()(dt,ee==null?void 0:ee.className,bt,`${dt}-${se}`,{[`${dt}-with-text`]:It,[`${dt}-with-text${et}`]:It,[`${dt}-dashed`]:!!je,[`${dt}-plain`]:!!ze,[`${dt}-rtl`]:te==="rtl",[`${dt}-no-default-orientation-margin-left`]:xt,[`${dt}-no-default-orientation-margin-right`]:Bt},be,Ne),Nt=Ze.useMemo(()=>typeof ve=="number"?ve:/^\d+$/.test(ve)?Number(ve):ve,[ve]),qe=Object.assign(Object.assign({},xt&&{marginLeft:Nt}),Bt&&{marginRight:Nt});return He(Ze.createElement("div",Object.assign({className:Ut,style:Object.assign(Object.assign({},ee==null?void 0:ee.style),Xe)},Je,{role:"separator"}),Fe&&se!=="vertical"&&Ze.createElement("span",{className:`${dt}-inner-text`,style:qe},Fe)))}},91857:function(zn,En,me){"use strict";var ue=me(59301),Re=me(53878),Ze=me(92310),ot=me.n(Ze),We=me(31561),lt=me(80764),Me=me(35788),Mt=me(64002),Ct=me(79676),Ye=me(53487),st=me(92343),pt=me(36355),wt=me(20834),Ie=me(40875),te=me(88088),ee=me(47211);const de=null,se=Ne=>{const{menu:Fe,arrow:je,prefixCls:ze,children:Xe,trigger:Je,disabled:dt,dropdownRender:He,getPopupContainer:bt,overlayClassName:et,rootClassName:It,open:xt,onOpenChange:Bt,visible:Ut,onVisibleChange:Nt,mouseEnterDelay:qe=.15,mouseLeaveDelay:Ke=.1,autoAdjustOverflow:Tt=!0,placement:Ln="",overlay:Mn,transitionName:zt}=Ne,{getPopupContainer:rn,getPrefixCls:xn,direction:Un}=ue.useContext(pt.E_),yn=ue.useMemo(()=>{const ye=xn();return zt!==void 0?zt:Ln.includes("top")?`${ye}-slide-down`:`${ye}-slide-up`},[xn,Ln,zt]),sn=ue.useMemo(()=>Ln?Ln.includes("Center")?Ln.slice(0,Ln.indexOf("Center")):Ln:Un==="rtl"?"bottomRight":"bottomLeft",[Ln,Un]),Lt=xn("dropdown",ze),[ti,gi]=(0,ee.Z)(Lt),[,Pn]=(0,te.Z)(),Xt=ue.Children.only(Xe),Kt=(0,st.Tm)(Xt,{className:ot()(`${Lt}-trigger`,{[`${Lt}-rtl`]:Un==="rtl"},Xt.props.className),disabled:dt}),Ot=dt?[]:Je;let rt;Ot&&Ot.includes("contextMenu")&&(rt=!0);const[Ue,$t]=(0,Me.Z)(!1,{value:xt!=null?xt:Ut}),Gt=(0,lt.useEvent)(ye=>{Bt==null||Bt(ye),Nt==null||Nt(ye),$t(ye)}),it=ot()(et,It,gi,{[`${Lt}-rtl`]:Un==="rtl"}),at=(0,Ct.Z)({arrowPointAtCenter:typeof je=="object"&&je.pointAtCenter,autoAdjustOverflow:Tt,offset:Pn.marginXXS,arrowWidth:je?Pn.sizePopupArrow:0,borderRadius:Pn.borderRadius}),Te=ue.useCallback(()=>{$t(!1)},[]),Pe=()=>{let ye;return Fe!=null&&Fe.items?ye=ue.createElement(wt.default,Object.assign({},Fe)):typeof Mn=="function"?ye=Mn():ye=Mn,He&&(ye=He(ye)),ye=ue.Children.only(typeof ye=="string"?ue.createElement("span",null,ye):ye),ue.createElement(Ie.J,{prefixCls:`${Lt}-menu`,expandIcon:ue.createElement("span",{className:`${Lt}-menu-submenu-arrow`},ue.createElement(Re.Z,{className:`${Lt}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Te,validator:ke=>{let{mode:$e}=ke}},ye)};return ti(ue.createElement(We.Z,Object.assign({alignPoint:rt},(0,Mt.Z)(Ne,["rootClassName"]),{mouseEnterDelay:qe,mouseLeaveDelay:Ke,visible:Ue,builtinPlacements:at,arrow:!!je,overlayClassName:it,prefixCls:Lt,getPopupContainer:bt||rn,transitionName:yn,trigger:Ot,overlay:Pe,placement:sn,onVisibleChange:Gt}),Kt))};function he(Ne){return Object.assign(Object.assign({},Ne),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const ve=(0,Ye.Z)(se,"dropdown",Ne=>Ne,he),be=Ne=>ue.createElement(ve,Object.assign({},Ne),ue.createElement("span",null));se._InternalPanelDoNotUseOrYouWillBeFired=be,En.Z=se},38854:function(zn,En,me){"use strict";me.d(En,{Z:function(){return te}});var ue=me(91857),Re=me(92310),Ze=me.n(Re),ot=me(59301),We=me(19362),lt=me(3113),Me=me(36355),Mt=me(81327),Ct=me(33234),Ye=me(47211),st=function(ee,de){var se={};for(var he in ee)Object.prototype.hasOwnProperty.call(ee,he)&&de.indexOf(he)<0&&(se[he]=ee[he]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ve=0,he=Object.getOwnPropertySymbols(ee);ve<he.length;ve++)de.indexOf(he[ve])<0&&Object.prototype.propertyIsEnumerable.call(ee,he[ve])&&(se[he[ve]]=ee[he[ve]]);return se};const pt=ee=>{const{getPopupContainer:de,getPrefixCls:se,direction:he}=ot.useContext(Me.E_),{prefixCls:ve,type:be="default",danger:Ne,disabled:Fe,loading:je,onClick:ze,htmlType:Xe,children:Je,className:dt,menu:He,arrow:bt,autoFocus:et,overlay:It,trigger:xt,align:Bt,open:Ut,onOpenChange:Nt,placement:qe,getPopupContainer:Ke,href:Tt,icon:Ln=ot.createElement(We.Z,null),title:Mn,buttonsRender:zt=Pe=>Pe,mouseEnterDelay:rn,mouseLeaveDelay:xn,overlayClassName:Un,overlayStyle:yn,destroyPopupOnHide:sn,dropdownRender:Lt}=ee,ti=st(ee,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),gi=se("dropdown",ve),Pn=`${gi}-button`,[Xt,Kt]=(0,Ye.Z)(gi),Ot={menu:He,arrow:bt,autoFocus:et,align:Bt,disabled:Fe,trigger:Fe?[]:xt,onOpenChange:Nt,getPopupContainer:Ke||de,mouseEnterDelay:rn,mouseLeaveDelay:xn,overlayClassName:Un,overlayStyle:yn,destroyPopupOnHide:sn,dropdownRender:Lt},{compactSize:rt,compactItemClassnames:Ue}=(0,Ct.ri)(gi,he),$t=Ze()(Pn,Ue,dt,Kt);"overlay"in ee&&(Ot.overlay=It),"open"in ee&&(Ot.open=Ut),"placement"in ee?Ot.placement=qe:Ot.placement=he==="rtl"?"bottomLeft":"bottomRight";const Gt=ot.createElement(lt.ZP,{type:be,danger:Ne,disabled:Fe,loading:je,onClick:ze,htmlType:Xe,href:Tt,title:Mn},Je),it=ot.createElement(lt.ZP,{type:be,danger:Ne,icon:Ln}),[at,Te]=zt([Gt,it]);return Xt(ot.createElement(Mt.Z.Compact,Object.assign({className:$t,size:rt,block:!0},ti),at,ot.createElement(ue.Z,Object.assign({},Ot),Te)))};pt.__ANT_BUTTON=!0;var wt=pt;const Ie=ue.Z;Ie.Button=wt;var te=Ie},47211:function(zn,En,me){"use strict";me.d(En,{Z:function(){return st}});var ue=me(17313),Re=me(13826),Ze=me(92899),ot=me(29878),We=me(19447),lt=me(83116),Me=me(37613),Ct=pt=>{const{componentCls:wt,menuCls:Ie,colorError:te,colorTextLightSolid:ee}=pt,de=`${Ie}-item`;return{[`${wt}, ${wt}-menu-submenu`]:{[`${Ie} ${de}`]:{[`&${de}-danger:not(${de}-disabled)`]:{color:te,"&:hover":{color:ee,backgroundColor:te}}}}}};const Ye=pt=>{const{componentCls:wt,menuCls:Ie,zIndexPopup:te,dropdownArrowDistance:ee,sizePopupArrow:de,antCls:se,iconCls:he,motionDurationMid:ve,dropdownPaddingVertical:be,fontSize:Ne,dropdownEdgeChildPadding:Fe,colorTextDisabled:je,fontSizeIcon:ze,controlPaddingHorizontal:Xe,colorBgElevated:Je}=pt;return[{[wt]:Object.assign(Object.assign({},(0,ue.Wf)(pt)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:te,display:"block","&::before":{position:"absolute",insetBlock:-ee+de/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${se}-btn`]:{[`& > ${he}-down, & > ${se}-btn-icon > ${he}-down`]:{fontSize:ze}},[`${wt}-wrap`]:{position:"relative",[`${se}-btn > ${he}-down`]:{fontSize:ze},[`${he}-down::before`]:{transition:`transform ${ve}`}},[`${wt}-wrap-open`]:{[`${he}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${se}-slide-down-enter${se}-slide-down-enter-active${wt}-placement-bottomLeft,
|
|
|
&${se}-slide-down-appear${se}-slide-down-appear-active${wt}-placement-bottomLeft,
|
|
|
&${se}-slide-down-enter${se}-slide-down-enter-active${wt}-placement-bottom,
|
|
|
&${se}-slide-down-appear${se}-slide-down-appear-active${wt}-placement-bottom,
|
|
|
&${se}-slide-down-enter${se}-slide-down-enter-active${wt}-placement-bottomRight,
|
|
|
&${se}-slide-down-appear${se}-slide-down-appear-active${wt}-placement-bottomRight`]:{animationName:Re.fJ},[`&${se}-slide-up-enter${se}-slide-up-enter-active${wt}-placement-topLeft,
|
|
|
&${se}-slide-up-appear${se}-slide-up-appear-active${wt}-placement-topLeft,
|
|
|
&${se}-slide-up-enter${se}-slide-up-enter-active${wt}-placement-top,
|
|
|
&${se}-slide-up-appear${se}-slide-up-appear-active${wt}-placement-top,
|
|
|
&${se}-slide-up-enter${se}-slide-up-enter-active${wt}-placement-topRight,
|
|
|
&${se}-slide-up-appear${se}-slide-up-appear-active${wt}-placement-topRight`]:{animationName:Re.Qt},[`&${se}-slide-down-leave${se}-slide-down-leave-active${wt}-placement-bottomLeft,
|
|
|
&${se}-slide-down-leave${se}-slide-down-leave-active${wt}-placement-bottom,
|
|
|
&${se}-slide-down-leave${se}-slide-down-leave-active${wt}-placement-bottomRight`]:{animationName:Re.Uw},[`&${se}-slide-up-leave${se}-slide-up-leave-active${wt}-placement-topLeft,
|
|
|
&${se}-slide-up-leave${se}-slide-up-leave-active${wt}-placement-top,
|
|
|
&${se}-slide-up-leave${se}-slide-up-leave-active${wt}-placement-topRight`]:{animationName:Re.ly}})},(0,We.ZP)(pt,{colorBg:Je,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${wt} ${Ie}`]:{position:"relative",margin:0},[`${Ie}-submenu-popup`]:{position:"absolute",zIndex:te,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${wt}, ${wt}-menu-submenu`]:{[Ie]:Object.assign(Object.assign({padding:Fe,listStyleType:"none",backgroundColor:Je,backgroundClip:"padding-box",borderRadius:pt.borderRadiusLG,outline:"none",boxShadow:pt.boxShadowSecondary},(0,ue.Qy)(pt)),{[`${Ie}-item-group-title`]:{padding:`${be}px ${Xe}px`,color:pt.colorTextDescription,transition:`all ${ve}`},[`${Ie}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Ie}-item-icon`]:{minWidth:Ne,marginInlineEnd:pt.marginXS,fontSize:pt.fontSizeSM},[`${Ie}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${ve}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${Ie}-item, ${Ie}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${be}px ${Xe}px`,color:pt.colorText,fontWeight:"normal",fontSize:Ne,lineHeight:pt.lineHeight,cursor:"pointer",transition:`all ${ve}`,borderRadius:pt.borderRadiusSM,"&:hover, &-active":{backgroundColor:pt.controlItemBgHover}},(0,ue.Qy)(pt)),{"&-selected":{color:pt.colorPrimary,backgroundColor:pt.controlItemBgActive,"&:hover, &-active":{backgroundColor:pt.controlItemBgActiveHover}},"&-disabled":{color:je,cursor:"not-allowed","&:hover":{color:je,backgroundColor:Je,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${pt.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:pt.colorSplit},[`${wt}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:pt.paddingXS,[`${wt}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:pt.colorTextDescription,fontSize:ze,fontStyle:"normal"}}}),[`${Ie}-item-group-list`]:{margin:`0 ${pt.marginXS}px`,padding:0,listStyle:"none"},[`${Ie}-submenu-title`]:{paddingInlineEnd:Xe+pt.fontSizeSM},[`${Ie}-submenu-vertical`]:{position:"relative"},[`${Ie}-submenu${Ie}-submenu-disabled ${wt}-menu-submenu-title`]:{[`&, ${wt}-menu-submenu-arrow-icon`]:{color:je,backgroundColor:Je,cursor:"not-allowed"}},[`${Ie}-submenu-selected ${wt}-menu-submenu-title`]:{color:pt.colorPrimary}})}},[(0,Re.oN)(pt,"slide-up"),(0,Re.oN)(pt,"slide-down"),(0,Ze.Fm)(pt,"move-up"),(0,Ze.Fm)(pt,"move-down"),(0,ot._y)(pt,"zoom-big")]]};var st=(0,lt.Z)("Dropdown",(pt,wt)=>{let{rootPrefixCls:Ie}=wt;const{marginXXS:te,sizePopupArrow:ee,controlHeight:de,fontSize:se,lineHeight:he,paddingXXS:ve,componentCls:be,borderRadiusLG:Ne}=pt,Fe=(de-se*he)/2,{dropdownArrowOffset:je}=(0,We.fS)({contentRadius:Ne}),ze=(0,Me.TS)(pt,{menuCls:`${be}-menu`,rootPrefixCls:Ie,dropdownArrowDistance:ee/2+te,dropdownArrowOffset:je,dropdownPaddingVertical:Fe,dropdownEdgeChildPadding:ve});return[Ye(ze),Ct(ze)]},pt=>({zIndexPopup:pt.zIndexPopupBase+50}))},64165:function(zn,En,me){"use strict";me.d(En,{Z:function(){return ve}});var ue=me(92310),Re=me.n(ue),Ze=me(59301),ot=me(36355),We=me(9763),lt=me(64993),Me=me(88088),Ct=()=>{const[,be]=(0,Me.Z)(),Fe=new lt.C(be.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return Ze.createElement("svg",{style:Fe,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},Ze.createElement("g",{fill:"none",fillRule:"evenodd"},Ze.createElement("g",{transform:"translate(24 31.67)"},Ze.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Ze.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),Ze.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),Ze.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),Ze.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),Ze.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),Ze.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},Ze.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Ze.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},st=()=>{const[,be]=(0,Me.Z)(),{colorFill:Ne,colorFillTertiary:Fe,colorFillQuaternary:je,colorBgContainer:ze}=be,{borderColor:Xe,shadowColor:Je,contentColor:dt}=(0,Ze.useMemo)(()=>({borderColor:new lt.C(Ne).onBackground(ze).toHexShortString(),shadowColor:new lt.C(Fe).onBackground(ze).toHexShortString(),contentColor:new lt.C(je).onBackground(ze).toHexShortString()}),[Ne,Fe,je,ze]);return Ze.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Ze.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Ze.createElement("ellipse",{fill:Je,cx:"32",cy:"33",rx:"32",ry:"7"}),Ze.createElement("g",{fillRule:"nonzero",stroke:Xe},Ze.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),Ze.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:dt}))))},pt=me(83116),wt=me(37613);const Ie=be=>{const{componentCls:Ne,margin:Fe,marginXS:je,marginXL:ze,fontSize:Xe,lineHeight:Je}=be;return{[Ne]:{marginInline:je,fontSize:Xe,lineHeight:Je,textAlign:"center",[`${Ne}-image`]:{height:be.emptyImgHeight,marginBottom:je,opacity:be.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Ne}-description`]:{color:be.colorText},[`${Ne}-footer`]:{marginTop:Fe},"&-normal":{marginBlock:ze,color:be.colorTextDisabled,[`${Ne}-description`]:{color:be.colorTextDisabled},[`${Ne}-image`]:{height:be.emptyImgHeightMD}},"&-small":{marginBlock:je,color:be.colorTextDisabled,[`${Ne}-image`]:{height:be.emptyImgHeightSM}}}}};var te=(0,pt.Z)("Empty",be=>{const{componentCls:Ne,controlHeightLG:Fe}=be,je=(0,wt.TS)(be,{emptyImgCls:`${Ne}-img`,emptyImgHeight:Fe*2.5,emptyImgHeightMD:Fe,emptyImgHeightSM:Fe*.875});return[Ie(je)]}),ee=function(be,Ne){var Fe={};for(var je in be)Object.prototype.hasOwnProperty.call(be,je)&&Ne.indexOf(je)<0&&(Fe[je]=be[je]);if(be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ze=0,je=Object.getOwnPropertySymbols(be);ze<je.length;ze++)Ne.indexOf(je[ze])<0&&Object.prototype.propertyIsEnumerable.call(be,je[ze])&&(Fe[je[ze]]=be[je[ze]]);return Fe};const de=Ze.createElement(Ct,null),se=Ze.createElement(st,null),he=be=>{var{className:Ne,rootClassName:Fe,prefixCls:je,image:ze=de,description:Xe,children:Je,imageStyle:dt,style:He}=be,bt=ee(be,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:et,direction:It,empty:xt}=Ze.useContext(ot.E_),Bt=et("empty",je),[Ut,Nt]=te(Bt),[qe]=(0,We.Z)("Empty"),Ke=typeof Xe!="undefined"?Xe:qe==null?void 0:qe.description,Tt=typeof Ke=="string"?Ke:"empty";let Ln=null;return typeof ze=="string"?Ln=Ze.createElement("img",{alt:Tt,src:ze}):Ln=ze,Ut(Ze.createElement("div",Object.assign({className:Re()(Nt,Bt,xt==null?void 0:xt.className,{[`${Bt}-normal`]:ze===se,[`${Bt}-rtl`]:It==="rtl"},Ne,Fe),style:Object.assign(Object.assign({},xt==null?void 0:xt.style),He)},bt),Ze.createElement("div",{className:`${Bt}-image`,style:dt},Ln),Ke&&Ze.createElement("div",{className:`${Bt}-description`},Ke),Je&&Ze.createElement("div",{className:`${Bt}-footer`},Je)))};he.PRESENTED_IMAGE_DEFAULT=de,he.PRESENTED_IMAGE_SIMPLE=se;var ve=he},78241:function(zn,En,me){"use strict";me.d(En,{default:function(){return Zt}});var ue=me(26390),Re=me(92310),Ze=me.n(Re),ot=me(43469),We=me(59301),lt=me(62892),Me=me(32441);function Mt(yt){const[un,vn]=We.useState(yt);return We.useEffect(()=>{const At=setTimeout(()=>{vn(yt)},yt.length?0:10);return()=>{clearTimeout(At)}},[yt]),un}var Ct=me(17313),Ye=me(29878),st=me(8378),pt=me(37613),wt=me(83116),te=yt=>{const{componentCls:un}=yt,vn=`${un}-show-help`,At=`${un}-show-help-item`;return{[vn]:{transition:`opacity ${yt.motionDurationSlow} ${yt.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[At]:{overflow:"hidden",transition:`height ${yt.motionDurationSlow} ${yt.motionEaseInOut},
|
|
|
opacity ${yt.motionDurationSlow} ${yt.motionEaseInOut},
|
|
|
transform ${yt.motionDurationSlow} ${yt.motionEaseInOut} !important`,[`&${At}-appear, &${At}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${At}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ee=yt=>({legend:{display:"block",width:"100%",marginBottom:yt.marginLG,padding:0,color:yt.colorTextDescription,fontSize:yt.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${yt.lineWidth}px ${yt.lineType} ${yt.colorBorder}`},label:{fontSize:yt.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 ${yt.controlOutlineWidth}px ${yt.controlOutline}`},output:{display:"block",paddingTop:15,color:yt.colorText,fontSize:yt.fontSize,lineHeight:yt.lineHeight}}),de=(yt,un)=>{const{formItemCls:vn}=yt;return{[vn]:{[`${vn}-label > label`]:{height:un},[`${vn}-control-input`]:{minHeight:un}}}},se=yt=>{const{componentCls:un}=yt;return{[yt.componentCls]:Object.assign(Object.assign(Object.assign({},(0,Ct.Wf)(yt)),ee(yt)),{[`${un}-text`]:{display:"inline-block",paddingInlineEnd:yt.paddingSM},"&-small":Object.assign({},de(yt,yt.controlHeightSM)),"&-large":Object.assign({},de(yt,yt.controlHeightLG))})}},he=yt=>{const{formItemCls:un,iconCls:vn,componentCls:At,rootPrefixCls:nt,labelRequiredMarkColor:on,labelColor:fn,labelFontSize:Jn,labelHeight:pn,labelColonMarginInlineStart:Rt,labelColonMarginInlineEnd:In,itemMarginBottom:Vn}=yt;return{[un]:Object.assign(Object.assign({},(0,Ct.Wf)(yt)),{marginBottom:Vn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${nt}-row`]:{display:"none"},"&-has-warning":{[`${un}-split`]:{color:yt.colorError}},"&-has-error":{[`${un}-split`]:{color:yt.colorWarning}},[`${un}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${yt.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:pn,color:fn,fontSize:Jn,[`> ${vn}`]:{fontSize:yt.fontSize,verticalAlign:"top"},[`&${un}-required:not(${un}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:yt.marginXXS,color:on,fontSize:yt.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${At}-hide-required-mark &`]:{display:"none"}},[`${un}-optional`]:{display:"inline-block",marginInlineStart:yt.marginXXS,color:yt.colorTextDescription,[`${At}-hide-required-mark &`]:{display:"none"}},[`${un}-tooltip`]:{color:yt.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:yt.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Rt,marginInlineEnd:In},[`&${un}-no-colon::after`]:{content:'"\\a0"'}}},[`${un}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${nt}-col-'"]):not([class*="' ${nt}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:yt.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[un]:{"&-explain, &-extra":{clear:"both",color:yt.colorTextDescription,fontSize:yt.fontSize,lineHeight:yt.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:yt.controlHeightSM,transition:`color ${yt.motionDurationMid} ${yt.motionEaseOut}`},"&-explain":{"&-error":{color:yt.colorError},"&-warning":{color:yt.colorWarning}}},[`&-with-help ${un}-explain`]:{height:"auto",opacity:1},[`${un}-feedback-icon`]:{fontSize:yt.fontSize,textAlign:"center",visibility:"visible",animationName:Ye.kr,animationDuration:yt.motionDurationMid,animationTimingFunction:yt.motionEaseOutBack,pointerEvents:"none","&-success":{color:yt.colorSuccess},"&-error":{color:yt.colorError},"&-warning":{color:yt.colorWarning},"&-validating":{color:yt.colorPrimary}}})}},ve=yt=>{const{componentCls:un,formItemCls:vn}=yt;return{[`${un}-horizontal`]:{[`${vn}-label`]:{flexGrow:0},[`${vn}-control`]:{flex:"1 1 0",minWidth:0},[`${vn}-label[class$='-24'], ${vn}-label[class*='-24 ']`]:{[`& + ${vn}-control`]:{minWidth:"unset"}}}}},be=yt=>{const{componentCls:un,formItemCls:vn}=yt;return{[`${un}-inline`]:{display:"flex",flexWrap:"wrap",[vn]:{flex:"none",marginInlineEnd:yt.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${vn}-label,
|
|
|
> ${vn}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${vn}-label`]:{flex:"none"},[`${un}-text`]:{display:"inline-block"},[`${vn}-has-feedback`]:{display:"inline-block"}}}}},Ne=yt=>({padding:yt.verticalLabelPadding,margin:yt.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Fe=yt=>{const{componentCls:un,formItemCls:vn,rootPrefixCls:At}=yt;return{[`${vn} ${vn}-label`]:Ne(yt),[un]:{[vn]:{flexWrap:"wrap",[`${vn}-label, ${vn}-control`]:{[`&:not([class*=" ${At}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},je=yt=>{const{componentCls:un,formItemCls:vn,rootPrefixCls:At}=yt;return{[`${un}-vertical`]:{[vn]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${un}-item-control`]:{width:"100%"}}},[`${un}-vertical ${vn}-label,
|
|
|
.${At}-col-24${vn}-label,
|
|
|
.${At}-col-xl-24${vn}-label`]:Ne(yt),[`@media (max-width: ${yt.screenXSMax}px)`]:[Fe(yt),{[un]:{[`.${At}-col-xs-24${vn}-label`]:Ne(yt)}}],[`@media (max-width: ${yt.screenSMMax}px)`]:{[un]:{[`.${At}-col-sm-24${vn}-label`]:Ne(yt)}},[`@media (max-width: ${yt.screenMDMax}px)`]:{[un]:{[`.${At}-col-md-24${vn}-label`]:Ne(yt)}},[`@media (max-width: ${yt.screenLGMax}px)`]:{[un]:{[`.${At}-col-lg-24${vn}-label`]:Ne(yt)}}}},ze=(yt,un)=>(0,pt.TS)(yt,{formItemCls:`${yt.componentCls}-item`,rootPrefixCls:un});var Xe=(0,wt.Z)("Form",(yt,un)=>{let{rootPrefixCls:vn}=un;const At=ze(yt,vn);return[se(At),he(At),te(At),ve(At),be(At),je(At),(0,st.Z)(At),Ye.kr]},yt=>({labelRequiredMarkColor:yt.colorError,labelColor:yt.colorTextHeading,labelFontSize:yt.fontSize,labelHeight:yt.controlHeight,labelColonMarginInlineStart:yt.marginXXS/2,labelColonMarginInlineEnd:yt.marginXS,itemMarginBottom:yt.marginLG,verticalLabelPadding:`0 0 ${yt.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Je=[];function dt(yt,un,vn){let At=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof yt=="string"?yt:`${un}-${At}`,error:yt,errorStatus:vn}}var bt=yt=>{let{help:un,helpStatus:vn,errors:At=Je,warnings:nt=Je,className:on,fieldId:fn,onVisibleChanged:Jn}=yt;const{prefixCls:pn}=We.useContext(Me.Rk),Rt=`${pn}-item-explain`,[,In]=Xe(pn),Vn=(0,We.useMemo)(()=>(0,lt.Z)(pn),[pn]),Pi=Mt(At),tn=Mt(nt),hn=We.useMemo(()=>un!=null?[dt(un,"help",vn)]:[].concat((0,ue.Z)(Pi.map((Oi,Ii)=>dt(Oi,"error","error",Ii))),(0,ue.Z)(tn.map((Oi,Ii)=>dt(Oi,"warning","warning",Ii)))),[un,vn,Pi,tn]),Rn={};return fn&&(Rn.id=`${fn}_help`),We.createElement(ot.default,{motionDeadline:Vn.motionDeadline,motionName:`${pn}-show-help`,visible:!!hn.length,onVisibleChanged:Jn},Oi=>{const{className:Ii,style:Si}=Oi;return We.createElement("div",Object.assign({},Rn,{className:Ze()(Rt,Ii,on,In),style:Si,role:"alert"}),We.createElement(ot.CSSMotionList,Object.assign({keys:hn},(0,lt.Z)(pn),{motionName:`${pn}-show-help-item`,component:!1}),Ni=>{const{key:Zi,error:sr,errorStatus:Wr,className:li,style:Vi}=Ni;return We.createElement("div",{key:Zi,className:Ze()(li,{[`${Rt}-${Wr}`]:Wr}),style:Vi},sr)}))})},et=me(95013),It=me(36355),xt=me(1684),Bt=me(52946),Ut=me(19716),Nt=me(16722);const qe=["parentNode"],Ke="form_item";function Tt(yt){return yt===void 0||yt===!1?[]:Array.isArray(yt)?yt:[yt]}function Ln(yt,un){if(!yt.length)return;const vn=yt.join("_");return un?`${un}_${vn}`:qe.includes(vn)?`${Ke}_${vn}`:vn}function Mn(yt,un,vn,At,nt,on){let fn=At;return on!==void 0?fn=on:vn.validating?fn="validating":yt.length?fn="error":un.length?fn="warning":(vn.touched||nt&&vn.validated)&&(fn="success"),fn}function zt(yt){return Tt(yt).join("_")}function rn(yt){const[un]=(0,et.useForm)(),vn=We.useRef({}),At=We.useMemo(()=>yt!=null?yt:Object.assign(Object.assign({},un),{__INTERNAL__:{itemRef:nt=>on=>{const fn=zt(nt);on?vn.current[fn]=on:delete vn.current[fn]}},scrollToField:function(nt){let on=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const fn=Tt(nt),Jn=Ln(fn,At.__INTERNAL__.name),pn=Jn?document.getElementById(Jn):null;pn&&(0,Nt.Z)(pn,Object.assign({scrollMode:"if-needed",block:"nearest"},on))},getFieldInstance:nt=>{const on=zt(nt);return vn.current[on]}}),[yt,un]);return[At]}var xn=me(28726),Un=function(yt,un){var vn={};for(var At in yt)Object.prototype.hasOwnProperty.call(yt,At)&&un.indexOf(At)<0&&(vn[At]=yt[At]);if(yt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,At=Object.getOwnPropertySymbols(yt);nt<At.length;nt++)un.indexOf(At[nt])<0&&Object.prototype.propertyIsEnumerable.call(yt,At[nt])&&(vn[At[nt]]=yt[At[nt]]);return vn};const yn=(yt,un)=>{const vn=We.useContext(xt.Z),{getPrefixCls:At,direction:nt,form:on}=We.useContext(It.E_),{prefixCls:fn,className:Jn,rootClassName:pn,size:Rt,disabled:In=vn,form:Vn,colon:Pi,labelAlign:tn,labelWrap:hn,labelCol:Rn,wrapperCol:Oi,hideRequiredMark:Ii,layout:Si="horizontal",scrollToFirstError:Ni,requiredMark:Zi,onFinishFailed:sr,name:Wr,style:li,feedbackIcons:Vi}=yt,vo=Un(yt,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Qr=(0,Ut.Z)(Rt),Er=We.useContext(xn.Z),qt=(0,We.useMemo)(()=>Zi!==void 0?Zi:on&&on.requiredMark!==void 0?on.requiredMark:!Ii,[Ii,Zi,on]),pi=Pi!=null?Pi:on==null?void 0:on.colon,pr=At("form",fn),[qi,$r]=Xe(pr),Ar=Ze()(pr,`${pr}-${Si}`,{[`${pr}-hide-required-mark`]:qt===!1,[`${pr}-rtl`]:nt==="rtl",[`${pr}-${Qr}`]:Qr},$r,on==null?void 0:on.className,Jn,pn),[io]=rn(Vn),{__INTERNAL__:Kr}=io;Kr.name=Wr;const jr=(0,We.useMemo)(()=>({name:Wr,labelAlign:tn,labelCol:Rn,labelWrap:hn,wrapperCol:Oi,vertical:Si==="vertical",colon:pi,requiredMark:qt,itemRef:Kr.itemRef,form:io,feedbackIcons:Vi}),[Wr,tn,Rn,Oi,Si,pi,qt,io,Vi]);We.useImperativeHandle(un,()=>io);const yo=(Xo,Kn)=>{if(Xo){let Io={block:"nearest"};typeof Xo=="object"&&(Io=Xo),io.scrollToField(Kn,Io)}},$n=Xo=>{if(sr==null||sr(Xo),Xo.errorFields.length){const Kn=Xo.errorFields[0].name;if(Ni!==void 0){yo(Ni,Kn);return}on&&on.scrollToFirstError!==void 0&&yo(on.scrollToFirstError,Kn)}};return qi(We.createElement(xt.n,{disabled:In},We.createElement(Bt.q,{size:Qr},We.createElement(Me.RV,Object.assign({},{validateMessages:Er}),We.createElement(Me.q3.Provider,{value:jr},We.createElement(et.default,Object.assign({id:Wr},vo,{name:Wr,onFinishFailed:$n,form:io,style:Object.assign(Object.assign({},on==null?void 0:on.style),li),className:Ar})))))))};var Lt=We.forwardRef(yn),ti=me(12383),gi=me(20475),Pn=me(92343),Xt=me(38298);function Kt(yt){if(typeof yt=="function")return yt;const un=(0,Xt.Z)(yt);return un.length<=1?un[0]:un}const Ot=()=>{const{status:yt,errors:un=[],warnings:vn=[]}=(0,We.useContext)(Me.aM);return{status:yt,errors:un,warnings:vn}};Ot.Context=Me.aM;var rt=Ot,Ue=me(23073);function $t(yt){const[un,vn]=We.useState(yt),At=(0,We.useRef)(null),nt=(0,We.useRef)([]),on=(0,We.useRef)(!1);We.useEffect(()=>(on.current=!1,()=>{on.current=!0,Ue.Z.cancel(At.current),At.current=null}),[]);function fn(Jn){on.current||(At.current===null&&(nt.current=[],At.current=(0,Ue.Z)(()=>{At.current=null,vn(pn=>{let Rt=pn;return nt.current.forEach(In=>{Rt=In(Rt)}),Rt})})),nt.current.push(Jn))}return[un,fn]}function Gt(){const{itemRef:yt}=We.useContext(Me.q3),un=We.useRef({});function vn(At,nt){const on=nt&&typeof nt=="object"&&nt.ref,fn=At.join("_");return(un.current.name!==fn||un.current.originRef!==on)&&(un.current.name=fn,un.current.originRef=on,un.current.ref=(0,gi.sQ)(yt(At),on)),un.current.ref}return vn}var it=me(48886),at=me(28800),Te=me(64002),Pe=me(27382),ye=me(37028);const ke=yt=>{const{formItemCls:un}=yt;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${un}-control`]:{display:"flex"}}}};var $e=(0,wt.b)(["Form","item-item"],(yt,un)=>{let{rootPrefixCls:vn}=un;const At=ze(yt,vn);return[ke(At)]}),vt=yt=>{const{prefixCls:un,status:vn,wrapperCol:At,children:nt,errors:on,warnings:fn,_internalItemRender:Jn,extra:pn,help:Rt,fieldId:In,marginBottom:Vn,onErrorVisibleChanged:Pi}=yt,tn=`${un}-item`,hn=We.useContext(Me.q3),Rn=At||hn.wrapperCol||{},Oi=Ze()(`${tn}-control`,Rn.className),Ii=We.useMemo(()=>Object.assign({},hn),[hn]);delete Ii.labelCol,delete Ii.wrapperCol;const Si=We.createElement("div",{className:`${tn}-control-input`},We.createElement("div",{className:`${tn}-control-input-content`},nt)),Ni=We.useMemo(()=>({prefixCls:un,status:vn}),[un,vn]),Zi=Vn!==null||on.length||fn.length?We.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},We.createElement(Me.Rk.Provider,{value:Ni},We.createElement(bt,{fieldId:In,errors:on,warnings:fn,help:Rt,helpStatus:vn,className:`${tn}-explain-connected`,onVisibleChanged:Pi})),!!Vn&&We.createElement("div",{style:{width:0,height:Vn}})):null,sr={};In&&(sr.id=`${In}_extra`);const Wr=pn?We.createElement("div",Object.assign({},sr,{className:`${tn}-extra`}),pn):null,li=Jn&&Jn.mark==="pro_table_render"&&Jn.render?Jn.render(yt,{input:Si,errorList:Zi,extra:Wr}):We.createElement(We.Fragment,null,Si,Zi,Wr);return We.createElement(Me.q3.Provider,{value:Ii},We.createElement(ye.Z,Object.assign({},Rn,{className:Oi}),li),We.createElement($e,{prefixCls:un}))},an=me(86902),bn=me(31724),en=me(9763),wn=me(6848),ai=function(yt,un){var vn={};for(var At in yt)Object.prototype.hasOwnProperty.call(yt,At)&&un.indexOf(At)<0&&(vn[At]=yt[At]);if(yt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,At=Object.getOwnPropertySymbols(yt);nt<At.length;nt++)un.indexOf(At[nt])<0&&Object.prototype.propertyIsEnumerable.call(yt,At[nt])&&(vn[At[nt]]=yt[At[nt]]);return vn};function _n(yt){return yt?typeof yt=="object"&&!We.isValidElement(yt)?yt:{title:yt}:null}var wi=yt=>{let{prefixCls:un,label:vn,htmlFor:At,labelCol:nt,labelAlign:on,colon:fn,required:Jn,requiredMark:pn,tooltip:Rt}=yt;var In;const[Vn]=(0,en.Z)("Form"),{vertical:Pi,labelAlign:tn,labelCol:hn,labelWrap:Rn,colon:Oi}=We.useContext(Me.q3);if(!vn)return null;const Ii=nt||hn||{},Si=on||tn,Ni=`${un}-item-label`,Zi=Ze()(Ni,Si==="left"&&`${Ni}-left`,Ii.className,{[`${Ni}-wrap`]:!!Rn});let sr=vn;const Wr=fn===!0||Oi!==!1&&fn!==!1;Wr&&!Pi&&typeof vn=="string"&&vn.trim()!==""&&(sr=vn.replace(/[:|:]\s*$/,""));const Vi=_n(Rt);if(Vi){const{icon:qt=We.createElement(an.Z,null)}=Vi,pi=ai(Vi,["icon"]),pr=We.createElement(wn.Z,Object.assign({},pi),We.cloneElement(qt,{className:`${un}-item-tooltip`,title:""}));sr=We.createElement(We.Fragment,null,sr,pr)}const vo=pn==="optional",Qr=typeof pn=="function";Qr?sr=pn(sr,{required:!!Jn}):vo&&!Jn&&(sr=We.createElement(We.Fragment,null,sr,We.createElement("span",{className:`${un}-item-optional`,title:""},(Vn==null?void 0:Vn.optional)||((In=bn.Z.Form)===null||In===void 0?void 0:In.optional))));const Er=Ze()({[`${un}-item-required`]:Jn,[`${un}-item-required-mark-optional`]:vo||Qr,[`${un}-item-no-colon`]:!Wr});return We.createElement(ye.Z,Object.assign({},Ii,{className:Zi}),We.createElement("label",{htmlFor:At,className:Er,title:typeof vn=="string"?vn:""},sr))},Hi=me(79999),_i=me(33130),cr=me(85404),_r=me(50023);const vi={success:Hi.Z,warning:cr.Z,error:_i.Z,validating:_r.Z};function si(yt){let{children:un,errors:vn,warnings:At,hasFeedback:nt,validateStatus:on,prefixCls:fn,meta:Jn,noStyle:pn}=yt;const Rt=`${fn}-item`,{feedbackIcons:In}=We.useContext(Me.q3),Vn=Mn(vn,At,Jn,null,!!nt,on),{isFormItemInput:Pi,status:tn}=We.useContext(Me.aM),hn=We.useMemo(()=>{var Rn;let Oi;if(nt){const Ni=nt!==!0&&nt.icons||In,Zi=Vn&&((Rn=Ni==null?void 0:Ni({status:Vn,errors:vn,warnings:At}))===null||Rn===void 0?void 0:Rn[Vn]),sr=Vn&&vi[Vn];Oi=Zi!==!1&&sr?We.createElement("span",{className:Ze()(`${Rt}-feedback-icon`,`${Rt}-feedback-icon-${Vn}`)},Zi||We.createElement(sr,null)):null}let Ii=!0,Si=Vn||"";return pn&&(Ii=Pi,Si=(Vn!=null?Vn:tn)||""),{status:Si,errors:vn,warnings:At,hasFeedback:!!nt,feedbackIcon:Oi,isFormItemInput:Ii}},[Vn,nt,pn,Pi,tn]);return We.createElement(Me.aM.Provider,{value:hn},un)}var fi=function(yt,un){var vn={};for(var At in yt)Object.prototype.hasOwnProperty.call(yt,At)&&un.indexOf(At)<0&&(vn[At]=yt[At]);if(yt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,At=Object.getOwnPropertySymbols(yt);nt<At.length;nt++)un.indexOf(At[nt])<0&&Object.prototype.propertyIsEnumerable.call(yt,At[nt])&&(vn[At[nt]]=yt[At[nt]]);return vn};function Ui(yt){const{prefixCls:un,className:vn,rootClassName:At,style:nt,help:on,errors:fn,warnings:Jn,validateStatus:pn,meta:Rt,hasFeedback:In,hidden:Vn,children:Pi,fieldId:tn,required:hn,isRequired:Rn,onSubItemMetaChange:Oi}=yt,Ii=fi(yt,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Si=`${un}-item`,{requiredMark:Ni}=We.useContext(Me.q3),Zi=We.useRef(null),sr=Mt(fn),Wr=Mt(Jn),li=on!=null,Vi=!!(li||fn.length||Jn.length),vo=!!Zi.current&&(0,it.Z)(Zi.current),[Qr,Er]=We.useState(null);(0,at.Z)(()=>{if(Vi&&Zi.current){const $r=getComputedStyle(Zi.current);Er(parseInt($r.marginBottom,10))}},[Vi,vo]);const qt=$r=>{$r||Er(null)},pr=function(){let $r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Ar=$r?sr:Rt.errors,io=$r?Wr:Rt.warnings;return Mn(Ar,io,Rt,"",!!In,pn)}(),qi=Ze()(Si,vn,At,{[`${Si}-with-help`]:li||sr.length||Wr.length,[`${Si}-has-feedback`]:pr&&In,[`${Si}-has-success`]:pr==="success",[`${Si}-has-warning`]:pr==="warning",[`${Si}-has-error`]:pr==="error",[`${Si}-is-validating`]:pr==="validating",[`${Si}-hidden`]:Vn});return We.createElement("div",{className:qi,style:nt,ref:Zi},We.createElement(Pe.Z,Object.assign({className:`${Si}-row`},(0,Te.Z)(Ii,["_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"])),We.createElement(wi,Object.assign({htmlFor:tn},yt,{requiredMark:Ni,required:hn!=null?hn:Rn,prefixCls:un})),We.createElement(vt,Object.assign({},yt,Rt,{errors:sr,warnings:Wr,prefixCls:un,status:pr,help:on,marginBottom:Qr,onErrorVisibleChanged:qt}),We.createElement(Me.qI.Provider,{value:Oi},We.createElement(si,{prefixCls:un,meta:Rt,errors:Rt.errors,warnings:Rt.warnings,hasFeedback:In,validateStatus:pr},Pi)))),!!Qr&&We.createElement("div",{className:`${Si}-margin-offset`,style:{marginBottom:-Qr}}))}const Fi="__SPLIT__",ao=null,wr=We.memo(yt=>{let{children:un}=yt;return un},(yt,un)=>yt.value===un.value&&yt.update===un.update&&yt.childProps.length===un.childProps.length&&yt.childProps.every((vn,At)=>vn===un.childProps[At]));function Be(yt){return yt!=null}function Xr(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Hr(yt){const{name:un,noStyle:vn,className:At,dependencies:nt,prefixCls:on,shouldUpdate:fn,rules:Jn,children:pn,required:Rt,label:In,messageVariables:Vn,trigger:Pi="onChange",validateTrigger:tn,hidden:hn,help:Rn}=yt,{getPrefixCls:Oi}=We.useContext(It.E_),{name:Ii}=We.useContext(Me.q3),Si=Kt(pn),Ni=typeof Si=="function",Zi=We.useContext(Me.qI),{validateTrigger:sr}=We.useContext(et.FieldContext),Wr=tn!==void 0?tn:sr,li=Be(un),Vi=Oi("form",on),[vo,Qr]=Xe(Vi),Er=We.useContext(et.ListContext),qt=We.useRef(),[pi,pr]=$t({}),[qi,$r]=(0,ti.Z)(()=>Xr()),Ar=Kn=>{const Io=Er==null?void 0:Er.getKey(Kn.name);if($r(Kn.destroy?Xr():Kn,!0),vn&&Rn!==!1&&Zi){let Jo=Kn.name;if(Kn.destroy)Jo=qt.current||Jo;else if(Io!==void 0){const[Yi,ua]=Io;Jo=[Yi].concat((0,ue.Z)(ua)),qt.current=Jo}Zi(Kn,Jo)}},io=(Kn,Io)=>{pr(Jo=>{const Yi=Object.assign({},Jo),Zo=[].concat((0,ue.Z)(Kn.name.slice(0,-1)),(0,ue.Z)(Io)).join(Fi);return Kn.destroy?delete Yi[Zo]:Yi[Zo]=Kn,Yi})},[Kr,jr]=We.useMemo(()=>{const Kn=(0,ue.Z)(qi.errors),Io=(0,ue.Z)(qi.warnings);return Object.values(pi).forEach(Jo=>{Kn.push.apply(Kn,(0,ue.Z)(Jo.errors||[])),Io.push.apply(Io,(0,ue.Z)(Jo.warnings||[]))}),[Kn,Io]},[pi,qi.errors,qi.warnings]),yo=Gt();function $n(Kn,Io,Jo){return vn&&!hn?We.createElement(si,{prefixCls:Vi,hasFeedback:yt.hasFeedback,validateStatus:yt.validateStatus,meta:qi,errors:Kr,warnings:jr,noStyle:!0},Kn):We.createElement(Ui,Object.assign({key:"row"},yt,{className:Ze()(At,Qr),prefixCls:Vi,fieldId:Io,isRequired:Jo,errors:Kr,warnings:jr,meta:qi,onSubItemMetaChange:io}),Kn)}if(!li&&!Ni&&!nt)return vo($n(Si));let Xo={};return typeof In=="string"?Xo.label=In:un&&(Xo.label=String(un)),Vn&&(Xo=Object.assign(Object.assign({},Xo),Vn)),vo(We.createElement(et.Field,Object.assign({},yt,{messageVariables:Xo,trigger:Pi,validateTrigger:Wr,onMetaChange:Ar}),(Kn,Io,Jo)=>{const Yi=Tt(un).length&&Io?Io.name:[],ua=Ln(Yi,Ii),Zo=Rt!==void 0?Rt:!!(Jn&&Jn.some(Do=>{if(Do&&typeof Do=="object"&&Do.required&&!Do.warningOnly)return!0;if(typeof Do=="function"){const _o=Do(Jo);return _o&&_o.required&&!_o.warningOnly}return!1})),Dr=Object.assign({},Kn);let Ir=null;if(Array.isArray(Si)&&li)Ir=Si;else if(!(Ni&&(!(fn||nt)||li))){if(!(nt&&!Ni&&!li))if((0,Pn.l$)(Si)){const Do=Object.assign(Object.assign({},Si.props),Dr);if(Do.id||(Do.id=ua),Rn||Kr.length>0||jr.length>0||yt.extra){const tt=[];(Rn||Kr.length>0)&&tt.push(`${ua}_help`),yt.extra&&tt.push(`${ua}_extra`),Do["aria-describedby"]=tt.join(" ")}Kr.length>0&&(Do["aria-invalid"]="true"),Zo&&(Do["aria-required"]="true"),(0,gi.Yr)(Si)&&(Do.ref=yo(Yi,Si)),new Set([].concat((0,ue.Z)(Tt(Pi)),(0,ue.Z)(Tt(Wr)))).forEach(tt=>{Do[tt]=function(){for(var jo,Ra,$a,ls,Or,xo=arguments.length,na=new Array(xo),Da=0;Da<xo;Da++)na[Da]=arguments[Da];($a=Dr[tt])===null||$a===void 0||(jo=$a).call.apply(jo,[Dr].concat(na)),(Or=(ls=Si.props)[tt])===null||Or===void 0||(Ra=Or).call.apply(Ra,[ls].concat(na))}});const Ti=[Do["aria-required"],Do["aria-invalid"],Do["aria-describedby"]];Ir=We.createElement(wr,{value:Dr[yt.valuePropName||"value"],update:Si,childProps:Ti},(0,Pn.Tm)(Si,Do))}else Ni&&(fn||nt)&&!li?Ir=Si(Jo):Ir=Si}return $n(Ir,ua,Zo)}))}const jn=Hr;jn.useStatus=rt;var Li=jn,Wi=function(yt,un){var vn={};for(var At in yt)Object.prototype.hasOwnProperty.call(yt,At)&&un.indexOf(At)<0&&(vn[At]=yt[At]);if(yt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,At=Object.getOwnPropertySymbols(yt);nt<At.length;nt++)un.indexOf(At[nt])<0&&Object.prototype.propertyIsEnumerable.call(yt,At[nt])&&(vn[At[nt]]=yt[At[nt]]);return vn},Gn=yt=>{var{prefixCls:un,children:vn}=yt,At=Wi(yt,["prefixCls","children"]);const{getPrefixCls:nt}=We.useContext(It.E_),on=nt("form",un),fn=We.useMemo(()=>({prefixCls:on,status:"error"}),[on]);return We.createElement(et.List,Object.assign({},At),(Jn,pn,Rt)=>We.createElement(Me.Rk.Provider,{value:fn},vn(Jn.map(In=>Object.assign(Object.assign({},In),{fieldKey:In.key})),pn,{errors:Rt.errors,warnings:Rt.warnings})))};function Ht(){const{form:yt}=(0,We.useContext)(Me.q3);return yt}const Wt=Lt;Wt.Item=Li,Wt.List=Gn,Wt.ErrorList=bt,Wt.useForm=rn,Wt.useFormInstance=Ht,Wt.useWatch=et.useWatch,Wt.Provider=Me.RV,Wt.create=()=>{};var Zt=Wt},8628:function(zn,En,me){"use strict";var ue=me(59301),Re=me(28800),Ze=me(56762),ot=me(69507);function We(){let lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const Me=(0,ue.useRef)({}),Mt=(0,Ze.Z)(),Ct=(0,ot.ZP)();return(0,Re.Z)(()=>{const Ye=Ct.subscribe(st=>{Me.current=st,lt&&Mt()});return()=>Ct.unsubscribe(Ye)},[]),Me.current}En.Z=We},9432:function(zn,En,me){"use strict";me.d(En,{Z:function(){return he},n:function(){return de}});var ue=me(33130),Re=me(92310),Ze=me.n(Re),ot=me(93681),We=me(20475),lt=me(59301),Me=me(19080),Mt=me(36355),Ct=me(1684),Ye=me(19716),st=me(32441),pt=me(33234),wt=me(59412),Ie=me(9937);function te(ve){return!!(ve.prefix||ve.suffix||ve.allowClear)}var ee=function(ve,be){var Ne={};for(var Fe in ve)Object.prototype.hasOwnProperty.call(ve,Fe)&&be.indexOf(Fe)<0&&(Ne[Fe]=ve[Fe]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,Fe=Object.getOwnPropertySymbols(ve);je<Fe.length;je++)be.indexOf(Fe[je])<0&&Object.prototype.propertyIsEnumerable.call(ve,Fe[je])&&(Ne[Fe[je]]=ve[Fe[je]]);return Ne};function de(ve,be){if(!ve)return;ve.focus(be);const{cursor:Ne}=be||{};if(Ne){const Fe=ve.value.length;switch(Ne){case"start":ve.setSelectionRange(0,0);break;case"end":ve.setSelectionRange(Fe,Fe);break;default:ve.setSelectionRange(0,Fe);break}}}var he=(0,lt.forwardRef)((ve,be)=>{var Ne;const{prefixCls:Fe,bordered:je=!0,status:ze,size:Xe,disabled:Je,onBlur:dt,onFocus:He,suffix:bt,allowClear:et,addonAfter:It,addonBefore:xt,className:Bt,style:Ut,styles:Nt,rootClassName:qe,onChange:Ke,classNames:Tt}=ve,Ln=ee(ve,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Mn,direction:zt,input:rn}=lt.useContext(Mt.E_),xn=Mn("input",Fe),Un=(0,lt.useRef)(null),[yn,sn]=(0,Ie.ZP)(xn),{compactSize:Lt,compactItemClassnames:ti}=(0,pt.ri)(xn,zt),gi=(0,Ye.Z)($e=>{var Le;return(Le=Xe!=null?Xe:Lt)!==null&&Le!==void 0?Le:$e}),Pn=lt.useContext(Ct.Z),Xt=Je!=null?Je:Pn,{status:Kt,hasFeedback:Ot,feedbackIcon:rt}=(0,lt.useContext)(st.aM),Ue=(0,Me.F)(Kt,ze),$t=te(ve)||!!Ot,Gt=(0,lt.useRef)($t);(0,lt.useEffect)(()=>{var $e;$t&&Gt.current,Gt.current=$t},[$t]);const it=(0,wt.Z)(Un,!0),at=$e=>{it(),dt==null||dt($e)},Te=$e=>{it(),He==null||He($e)},Pe=$e=>{it(),Ke==null||Ke($e)},ye=(Ot||bt)&<.createElement(lt.Fragment,null,bt,Ot&&rt);let ke;return typeof et=="object"&&(et!=null&&et.clearIcon)?ke=et:et&&(ke={clearIcon:lt.createElement(ue.Z,null)}),yn(lt.createElement(ot.default,Object.assign({ref:(0,We.sQ)(be,Un),prefixCls:xn,autoComplete:rn==null?void 0:rn.autoComplete},Ln,{disabled:Xt,onBlur:at,onFocus:Te,style:Object.assign(Object.assign({},rn==null?void 0:rn.style),Ut),styles:Object.assign(Object.assign({},rn==null?void 0:rn.styles),Nt),suffix:ye,allowClear:ke,className:Ze()(Bt,qe,ti,rn==null?void 0:rn.className),onChange:Pe,addonAfter:It&<.createElement(pt.BR,null,lt.createElement(st.Ux,{override:!0,status:!0},It)),addonBefore:xt&<.createElement(pt.BR,null,lt.createElement(st.Ux,{override:!0,status:!0},xt)),classNames:Object.assign(Object.assign(Object.assign({},Tt),rn==null?void 0:rn.classNames),{input:Ze()({[`${xn}-sm`]:gi==="small",[`${xn}-lg`]:gi==="large",[`${xn}-rtl`]:zt==="rtl",[`${xn}-borderless`]:!je},!$t&&(0,Me.Z)(xn,Ue),Tt==null?void 0:Tt.input,(Ne=rn==null?void 0:rn.classNames)===null||Ne===void 0?void 0:Ne.input,sn)}),classes:{affixWrapper:Ze()({[`${xn}-affix-wrapper-sm`]:gi==="small",[`${xn}-affix-wrapper-lg`]:gi==="large",[`${xn}-affix-wrapper-rtl`]:zt==="rtl",[`${xn}-affix-wrapper-borderless`]:!je},(0,Me.Z)(`${xn}-affix-wrapper`,Ue,Ot),sn),wrapper:Ze()({[`${xn}-group-rtl`]:zt==="rtl"},sn),group:Ze()({[`${xn}-group-wrapper-sm`]:gi==="small",[`${xn}-group-wrapper-lg`]:gi==="large",[`${xn}-group-wrapper-rtl`]:zt==="rtl",[`${xn}-group-wrapper-disabled`]:Xt},(0,Me.Z)(`${xn}-group-wrapper`,Ue,Ot),sn)}})))})},1643:function(zn,En,me){"use strict";var ue=me(33130),Re=me(92310),Ze=me.n(Re),ot=me(9296),We=me(59301),lt=me(19080),Me=me(36355),Mt=me(1684),Ct=me(19716),Ye=me(32441),st=me(9432),pt=me(9937),wt=function(te,ee){var de={};for(var se in te)Object.prototype.hasOwnProperty.call(te,se)&&ee.indexOf(se)<0&&(de[se]=te[se]);if(te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,se=Object.getOwnPropertySymbols(te);he<se.length;he++)ee.indexOf(se[he])<0&&Object.prototype.propertyIsEnumerable.call(te,se[he])&&(de[se[he]]=te[se[he]]);return de};const Ie=(0,We.forwardRef)((te,ee)=>{const{prefixCls:de,bordered:se=!0,size:he,disabled:ve,status:be,allowClear:Ne,showCount:Fe,classNames:je,rootClassName:ze,className:Xe}=te,Je=wt(te,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:dt,direction:He}=We.useContext(Me.E_),bt=(0,Ct.Z)(he),et=We.useContext(Mt.Z),It=ve!=null?ve:et,{status:xt,hasFeedback:Bt,feedbackIcon:Ut}=We.useContext(Ye.aM),Nt=(0,lt.F)(xt,be),qe=We.useRef(null);We.useImperativeHandle(ee,()=>{var zt;return{resizableTextArea:(zt=qe.current)===null||zt===void 0?void 0:zt.resizableTextArea,focus:rn=>{var xn,Un;(0,st.n)((Un=(xn=qe.current)===null||xn===void 0?void 0:xn.resizableTextArea)===null||Un===void 0?void 0:Un.textArea,rn)},blur:()=>{var rn;return(rn=qe.current)===null||rn===void 0?void 0:rn.blur()}}});const Ke=dt("input",de);let Tt;typeof Ne=="object"&&(Ne!=null&&Ne.clearIcon)?Tt=Ne:Ne&&(Tt={clearIcon:We.createElement(ue.Z,null)});const[Ln,Mn]=(0,pt.ZP)(Ke);return Ln(We.createElement(ot.default,Object.assign({},Je,{disabled:It,allowClear:Tt,className:Ze()(Xe,ze),classes:{affixWrapper:Ze()(`${Ke}-textarea-affix-wrapper`,{[`${Ke}-affix-wrapper-rtl`]:He==="rtl",[`${Ke}-affix-wrapper-borderless`]:!se,[`${Ke}-affix-wrapper-sm`]:bt==="small",[`${Ke}-affix-wrapper-lg`]:bt==="large",[`${Ke}-textarea-show-count`]:Fe},(0,lt.Z)(`${Ke}-affix-wrapper`,Nt),Mn)},classNames:Object.assign(Object.assign({},je),{textarea:Ze()({[`${Ke}-borderless`]:!se,[`${Ke}-sm`]:bt==="small",[`${Ke}-lg`]:bt==="large"},(0,lt.Z)(Ke,Nt),Mn,je==null?void 0:je.textarea)}),prefixCls:Ke,suffix:Bt&&We.createElement("span",{className:`${Ke}-textarea-suffix`},Ut),showCount:Fe,ref:qe})))});En.Z=Ie},59412:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Re}});var ue=me(59301);function Re(Ze,ot){const We=(0,ue.useRef)([]),lt=()=>{We.current.push(setTimeout(()=>{var Me,Mt,Ct,Ye;!((Me=Ze.current)===null||Me===void 0)&&Me.input&&((Mt=Ze.current)===null||Mt===void 0?void 0:Mt.input.getAttribute("type"))==="password"&&(!((Ct=Ze.current)===null||Ct===void 0)&&Ct.input.hasAttribute("value"))&&((Ye=Ze.current)===null||Ye===void 0||Ye.input.removeAttribute("value"))}))};return(0,ue.useEffect)(()=>(ot&<(),()=>We.current.forEach(Me=>{Me&&clearTimeout(Me)})),[]),lt}},92832:function(zn,En,me){"use strict";me.d(En,{default:function(){return bt}});var ue=me(92310),Re=me.n(ue),Ze=me(59301),ot=me(36355),We=me(32441),lt=me(9937),Mt=et=>{const{getPrefixCls:It,direction:xt}=(0,Ze.useContext)(ot.E_),{prefixCls:Bt,className:Ut}=et,Nt=It("input-group",Bt),qe=It("input"),[Ke,Tt]=(0,lt.ZP)(qe),Ln=Re()(Nt,{[`${Nt}-lg`]:et.size==="large",[`${Nt}-sm`]:et.size==="small",[`${Nt}-compact`]:et.compact,[`${Nt}-rtl`]:xt==="rtl"},Tt,Ut),Mn=(0,Ze.useContext)(We.aM),zt=(0,Ze.useMemo)(()=>Object.assign(Object.assign({},Mn),{isFormItemInput:!1}),[Mn]);return Ke(Ze.createElement("span",{className:Ln,style:et.style,onMouseEnter:et.onMouseEnter,onMouseLeave:et.onMouseLeave,onFocus:et.onFocus,onBlur:et.onBlur},Ze.createElement(We.aM.Provider,{value:zt},et.children)))},Ct=me(9432),Ye=me(61441),st=me(30631),pt=me(64002),wt=me(20475),Ie=me(59412),te=function(et,It){var xt={};for(var Bt in et)Object.prototype.hasOwnProperty.call(et,Bt)&&It.indexOf(Bt)<0&&(xt[Bt]=et[Bt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ut=0,Bt=Object.getOwnPropertySymbols(et);Ut<Bt.length;Ut++)It.indexOf(Bt[Ut])<0&&Object.prototype.propertyIsEnumerable.call(et,Bt[Ut])&&(xt[Bt[Ut]]=et[Bt[Ut]]);return xt};const ee=et=>et?Ze.createElement(st.Z,null):Ze.createElement(Ye.Z,null),de={click:"onClick",hover:"onMouseOver"};var he=Ze.forwardRef((et,It)=>{const{visibilityToggle:xt=!0}=et,Bt=typeof xt=="object"&&xt.visible!==void 0,[Ut,Nt]=(0,Ze.useState)(()=>Bt?xt.visible:!1),qe=(0,Ze.useRef)(null);Ze.useEffect(()=>{Bt&&Nt(xt.visible)},[Bt,xt]);const Ke=(0,Ie.Z)(qe),Tt=()=>{const{disabled:Xt}=et;Xt||(Ut&&Ke(),Nt(Kt=>{var Ot;const rt=!Kt;return typeof xt=="object"&&((Ot=xt.onVisibleChange)===null||Ot===void 0||Ot.call(xt,rt)),rt}))},Ln=Xt=>{const{action:Kt="click",iconRender:Ot=ee}=et,rt=de[Kt]||"",Ue=Ot(Ut),$t={[rt]:Tt,className:`${Xt}-icon`,key:"passwordIcon",onMouseDown:Gt=>{Gt.preventDefault()},onMouseUp:Gt=>{Gt.preventDefault()}};return Ze.cloneElement(Ze.isValidElement(Ue)?Ue:Ze.createElement("span",null,Ue),$t)},{className:Mn,prefixCls:zt,inputPrefixCls:rn,size:xn}=et,Un=te(et,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:yn}=Ze.useContext(ot.E_),sn=yn("input",rn),Lt=yn("input-password",zt),ti=xt&&Ln(Lt),gi=Re()(Lt,Mn,{[`${Lt}-${xn}`]:!!xn}),Pn=Object.assign(Object.assign({},(0,pt.Z)(Un,["suffix","iconRender","visibilityToggle"])),{type:Ut?"text":"password",className:gi,prefixCls:sn,suffix:ti});return xn&&(Pn.size=xn),Ze.createElement(Ct.Z,Object.assign({ref:(0,wt.sQ)(It,qe)},Pn))}),ve=me(21970),be=me(92343),Ne=me(3113),Fe=me(19716),je=me(33234),ze=function(et,It){var xt={};for(var Bt in et)Object.prototype.hasOwnProperty.call(et,Bt)&&It.indexOf(Bt)<0&&(xt[Bt]=et[Bt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ut=0,Bt=Object.getOwnPropertySymbols(et);Ut<Bt.length;Ut++)It.indexOf(Bt[Ut])<0&&Object.prototype.propertyIsEnumerable.call(et,Bt[Ut])&&(xt[Bt[Ut]]=et[Bt[Ut]]);return xt},Je=Ze.forwardRef((et,It)=>{const{prefixCls:xt,inputPrefixCls:Bt,className:Ut,size:Nt,suffix:qe,enterButton:Ke=!1,addonAfter:Tt,loading:Ln,disabled:Mn,onSearch:zt,onChange:rn,onCompositionStart:xn,onCompositionEnd:Un}=et,yn=ze(et,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:sn,direction:Lt}=Ze.useContext(ot.E_),ti=Ze.useRef(!1),gi=sn("input-search",xt),Pn=sn("input",Bt),{compactSize:Xt}=(0,je.ri)(gi,Lt),Kt=(0,Fe.Z)(vt=>{var an;return(an=Nt!=null?Nt:Xt)!==null&&an!==void 0?an:vt}),Ot=Ze.useRef(null),rt=vt=>{vt&&vt.target&&vt.type==="click"&&zt&&zt(vt.target.value,vt,{source:"clear"}),rn&&rn(vt)},Ue=vt=>{var an;document.activeElement===((an=Ot.current)===null||an===void 0?void 0:an.input)&&vt.preventDefault()},$t=vt=>{var an,bn;zt&&zt((bn=(an=Ot.current)===null||an===void 0?void 0:an.input)===null||bn===void 0?void 0:bn.value,vt,{source:"input"})},Gt=vt=>{ti.current||Ln||$t(vt)},it=typeof Ke=="boolean"?Ze.createElement(ve.Z,null):null,at=`${gi}-button`;let Te;const Pe=Ke||{},ye=Pe.type&&Pe.type.__ANT_BUTTON===!0;ye||Pe.type==="button"?Te=(0,be.Tm)(Pe,Object.assign({onMouseDown:Ue,onClick:vt=>{var an,bn;(bn=(an=Pe==null?void 0:Pe.props)===null||an===void 0?void 0:an.onClick)===null||bn===void 0||bn.call(an,vt),$t(vt)},key:"enterButton"},ye?{className:at,size:Kt}:{})):Te=Ze.createElement(Ne.ZP,{className:at,type:Ke?"primary":void 0,size:Kt,disabled:Mn,key:"enterButton",onMouseDown:Ue,onClick:$t,loading:Ln,icon:it},Ke),Tt&&(Te=[Te,(0,be.Tm)(Tt,{key:"addonAfter"})]);const ke=Re()(gi,{[`${gi}-rtl`]:Lt==="rtl",[`${gi}-${Kt}`]:!!Kt,[`${gi}-with-button`]:!!Ke},Ut),$e=vt=>{ti.current=!0,xn==null||xn(vt)},Le=vt=>{ti.current=!1,Un==null||Un(vt)};return Ze.createElement(Ct.Z,Object.assign({ref:(0,wt.sQ)(Ot,It),onPressEnter:Gt},yn,{size:Kt,onCompositionStart:$e,onCompositionEnd:Le,prefixCls:Pn,addonAfter:Te,suffix:qe,onChange:rt,className:ke,disabled:Mn}))}),dt=me(1643);const He=Ct.Z;He.Group=Mt,He.Search=Je,He.TextArea=dt.Z,He.Password=he;var bt=He},99580:function(zn,En,me){"use strict";me.d(En,{D:function(){return ve},Z:function(){return Fe}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},ot=Ze,We=me(88853),lt=function(ze,Xe){return Re.createElement(We.Z,(0,ue.Z)({},ze,{ref:Xe,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me,Ct=me(16537),Ye=me(53878),st=me(92310),pt=me.n(st),wt=me(64002),te=je=>!isNaN(parseFloat(je))&&isFinite(je),ee=me(36355),de=me(84966),se=function(je,ze){var Xe={};for(var Je in je)Object.prototype.hasOwnProperty.call(je,Je)&&ze.indexOf(Je)<0&&(Xe[Je]=je[Je]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var dt=0,Je=Object.getOwnPropertySymbols(je);dt<Je.length;dt++)ze.indexOf(Je[dt])<0&&Object.prototype.propertyIsEnumerable.call(je,Je[dt])&&(Xe[Je[dt]]=je[Je[dt]]);return Xe};const he={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},ve=Re.createContext({}),be=(()=>{let je=0;return function(){let ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return je+=1,`${ze}${je}`}})();var Fe=Re.forwardRef((je,ze)=>{const{prefixCls:Xe,className:Je,trigger:dt,children:He,defaultCollapsed:bt=!1,theme:et="dark",style:It={},collapsible:xt=!1,reverseArrow:Bt=!1,width:Ut=200,collapsedWidth:Nt=80,zeroWidthTriggerStyle:qe,breakpoint:Ke,onCollapse:Tt,onBreakpoint:Ln}=je,Mn=se(je,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:zt}=(0,Re.useContext)(de.Gs),[rn,xn]=(0,Re.useState)("collapsed"in je?je.collapsed:bt),[Un,yn]=(0,Re.useState)(!1);(0,Re.useEffect)(()=>{"collapsed"in je&&xn(je.collapsed)},[je.collapsed]);const sn=(Kt,Ot)=>{"collapsed"in je||xn(Kt),Tt==null||Tt(Kt,Ot)},Lt=(0,Re.useRef)();Lt.current=Kt=>{yn(Kt.matches),Ln==null||Ln(Kt.matches),rn!==Kt.matches&&sn(Kt.matches,"responsive")},(0,Re.useEffect)(()=>{function Kt(rt){return Lt.current(rt)}let Ot;if(typeof window!="undefined"){const{matchMedia:rt}=window;if(rt&&Ke&&Ke in he){Ot=rt(`(max-width: ${he[Ke]})`);try{Ot.addEventListener("change",Kt)}catch(Ue){Ot.addListener(Kt)}Kt(Ot)}}return()=>{try{Ot==null||Ot.removeEventListener("change",Kt)}catch(rt){Ot==null||Ot.removeListener(Kt)}}},[Ke]),(0,Re.useEffect)(()=>{const Kt=be("ant-sider-");return zt.addSider(Kt),()=>zt.removeSider(Kt)},[]);const ti=()=>{sn(!rn,"clickTrigger")},{getPrefixCls:gi}=(0,Re.useContext)(ee.E_),Pn=()=>{const Kt=gi("layout-sider",Xe),Ot=(0,wt.Z)(Mn,["collapsed"]),rt=rn?Nt:Ut,Ue=te(rt)?`${rt}px`:String(rt),$t=parseFloat(String(Nt||0))===0?Re.createElement("span",{onClick:ti,className:pt()(`${Kt}-zero-width-trigger`,`${Kt}-zero-width-trigger-${Bt?"right":"left"}`),style:qe},dt||Re.createElement(Mt,null)):null,at={expanded:Bt?Re.createElement(Ye.Z,null):Re.createElement(Ct.Z,null),collapsed:Bt?Re.createElement(Ct.Z,null):Re.createElement(Ye.Z,null)}[rn?"collapsed":"expanded"],Te=dt!==null?$t||Re.createElement("div",{className:`${Kt}-trigger`,onClick:ti,style:{width:Ue}},dt||at):null,Pe=Object.assign(Object.assign({},It),{flex:`0 0 ${Ue}`,maxWidth:Ue,minWidth:Ue,width:Ue}),ye=pt()(Kt,`${Kt}-${et}`,{[`${Kt}-collapsed`]:!!rn,[`${Kt}-has-trigger`]:xt&&dt!==null&&!$t,[`${Kt}-below`]:!!Un,[`${Kt}-zero-width`]:parseFloat(Ue)===0},Je);return Re.createElement("aside",Object.assign({className:ye},Ot,{style:Pe,ref:ze}),Re.createElement("div",{className:`${Kt}-children`},He),xt||Un&&$t?Te:null)},Xt=Re.useMemo(()=>({siderCollapsed:rn}),[rn]);return Re.createElement(ve.Provider,{value:Xt},Pn())})},84966:function(zn,En,me){"use strict";me.d(En,{VY:function(){return ve},$_:function(){return he},h4:function(){return se},Gs:function(){return wt},ZP:function(){return be}});var ue=me(26390),Re=me(92310),Ze=me.n(Re),ot=me(64002),We=me(59301),lt=me(36355),Me=me(83116),Ct=Ne=>{const{componentCls:Fe,bodyBg:je,lightSiderBg:ze,lightTriggerBg:Xe,lightTriggerColor:Je}=Ne;return{[`${Fe}-sider-light`]:{background:ze,[`${Fe}-sider-trigger`]:{color:Je,background:Xe},[`${Fe}-sider-zero-width-trigger`]:{color:Je,background:Xe,border:`1px solid ${je}`,borderInlineStart:0}}}};const Ye=Ne=>{const{antCls:Fe,componentCls:je,colorText:ze,triggerColor:Xe,footerBg:Je,triggerBg:dt,headerHeight:He,headerPadding:bt,headerColor:et,footerPadding:It,triggerHeight:xt,zeroTriggerHeight:Bt,zeroTriggerWidth:Ut,motionDurationMid:Nt,motionDurationSlow:qe,fontSize:Ke,borderRadius:Tt,bodyBg:Ln,headerBg:Mn,siderBg:zt}=Ne;return{[je]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Ln,"&, *":{boxSizing:"border-box"},[`&${je}-has-sider`]:{flexDirection:"row",[`> ${je}, > ${je}-content`]:{width:0}},[`${je}-header, &${je}-footer`]:{flex:"0 0 auto"},[`${je}-sider`]:{position:"relative",minWidth:0,background:zt,transition:`all ${Nt}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Fe}-menu${Fe}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:xt},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:xt,color:Xe,lineHeight:`${xt}px`,textAlign:"center",background:dt,cursor:"pointer",transition:`all ${Nt}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:He,insetInlineEnd:-Ut,zIndex:1,width:Ut,height:Bt,color:Xe,fontSize:Ne.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:zt,borderStartStartRadius:0,borderStartEndRadius:Tt,borderEndEndRadius:Tt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${qe} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${qe}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-Ut,borderStartStartRadius:Tt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Tt}}}}},Ct(Ne)),{"&-rtl":{direction:"rtl"}}),[`${je}-header`]:{height:He,padding:bt,color:et,lineHeight:`${He}px`,background:Mn,[`${Fe}-menu`]:{lineHeight:"inherit"}},[`${je}-footer`]:{padding:It,color:ze,fontSize:Ke,background:Je},[`${je}-content`]:{flex:"auto",minHeight:0}}};var st=(0,Me.Z)("Layout",Ne=>[Ye(Ne)],Ne=>{const{colorBgLayout:Fe,controlHeight:je,controlHeightLG:ze,colorText:Xe,controlHeightSM:Je,marginXXS:dt,colorTextLightSolid:He,colorBgContainer:bt}=Ne,et=ze*1.25;return{colorBgHeader:"#001529",colorBgBody:Fe,colorBgTrigger:"#002140",bodyBg:Fe,headerBg:"#001529",headerHeight:je*2,headerPadding:`0 ${et}px`,headerColor:Xe,footerPadding:`${Je}px ${et}px`,footerBg:Fe,siderBg:"#001529",triggerHeight:ze+dt*2,triggerBg:"#002140",triggerColor:He,zeroTriggerWidth:ze,zeroTriggerHeight:ze,lightSiderBg:bt,lightTriggerBg:bt,lightTriggerColor:Xe}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),pt=function(Ne,Fe){var je={};for(var ze in Ne)Object.prototype.hasOwnProperty.call(Ne,ze)&&Fe.indexOf(ze)<0&&(je[ze]=Ne[ze]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,ze=Object.getOwnPropertySymbols(Ne);Xe<ze.length;Xe++)Fe.indexOf(ze[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Ne,ze[Xe])&&(je[ze[Xe]]=Ne[ze[Xe]]);return je};const wt=We.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function Ie(Ne){let{suffixCls:Fe,tagName:je,displayName:ze}=Ne;return Xe=>We.forwardRef((dt,He)=>We.createElement(Xe,Object.assign({ref:He,suffixCls:Fe,tagName:je},dt)))}const te=We.forwardRef((Ne,Fe)=>{const{prefixCls:je,suffixCls:ze,className:Xe,tagName:Je}=Ne,dt=pt(Ne,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:He}=We.useContext(lt.E_),bt=He("layout",je),[et,It]=st(bt),xt=ze?`${bt}-${ze}`:bt;return et(We.createElement(Je,Object.assign({className:Ze()(je||xt,Xe,It),ref:Fe},dt)))}),ee=We.forwardRef((Ne,Fe)=>{const{direction:je}=We.useContext(lt.E_),[ze,Xe]=We.useState([]),{prefixCls:Je,className:dt,rootClassName:He,children:bt,hasSider:et,tagName:It,style:xt}=Ne,Bt=pt(Ne,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Ut=(0,ot.Z)(Bt,["suffixCls"]),{getPrefixCls:Nt,layout:qe}=We.useContext(lt.E_),Ke=Nt("layout",Je),[Tt,Ln]=st(Ke),Mn=Ze()(Ke,{[`${Ke}-has-sider`]:typeof et=="boolean"?et:ze.length>0,[`${Ke}-rtl`]:je==="rtl"},qe==null?void 0:qe.className,dt,He,Ln),zt=We.useMemo(()=>({siderHook:{addSider:rn=>{Xe(xn=>[].concat((0,ue.Z)(xn),[rn]))},removeSider:rn=>{Xe(xn=>xn.filter(Un=>Un!==rn))}}}),[]);return Tt(We.createElement(wt.Provider,{value:zt},We.createElement(It,Object.assign({ref:Fe,className:Mn,style:Object.assign(Object.assign({},qe==null?void 0:qe.style),xt)},Ut),bt)))}),de=Ie({tagName:"div",displayName:"Layout"})(ee),se=Ie({suffixCls:"header",tagName:"header",displayName:"Header"})(te),he=Ie({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(te),ve=Ie({suffixCls:"content",tagName:"main",displayName:"Content"})(te);var be=de},40875:function(zn,En,me){"use strict";me.d(En,{J:function(){return lt}});var ue=me(59301),Re=me(33234),Ze=me(80764),ot=function(Me,Mt){var Ct={};for(var Ye in Me)Object.prototype.hasOwnProperty.call(Me,Ye)&&Mt.indexOf(Ye)<0&&(Ct[Ye]=Me[Ye]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var st=0,Ye=Object.getOwnPropertySymbols(Me);st<Ye.length;st++)Mt.indexOf(Ye[st])<0&&Object.prototype.propertyIsEnumerable.call(Me,Ye[st])&&(Ct[Ye[st]]=Me[Ye[st]]);return Ct};const We=ue.createContext(null),lt=ue.forwardRef((Me,Mt)=>{const{children:Ct}=Me,Ye=ot(Me,["children"]),st=ue.useContext(We),pt=ue.useMemo(()=>Object.assign(Object.assign({},st),Ye),[st,Ye.prefixCls,Ye.mode,Ye.selectable]);return ue.createElement(We.Provider,{value:pt},ue.createElement(Re.BR,null,(0,Ze.supportNodeRef)(Ct)?ue.cloneElement(Ct,{ref:Mt}):Ct))});En.Z=We},20834:function(zn,En,me){"use strict";me.d(En,{default:function(){return Xt}});var ue=me(22798),Re=me(59301),Ze=me(99580),ot=me(92310),We=me.n(ot),lt=me(36355),Me=function(Kt,Ot){var rt={};for(var Ue in Kt)Object.prototype.hasOwnProperty.call(Kt,Ue)&&Ot.indexOf(Ue)<0&&(rt[Ue]=Kt[Ue]);if(Kt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $t=0,Ue=Object.getOwnPropertySymbols(Kt);$t<Ue.length;$t++)Ot.indexOf(Ue[$t])<0&&Object.prototype.propertyIsEnumerable.call(Kt,Ue[$t])&&(rt[Ue[$t]]=Kt[Ue[$t]]);return rt},Ct=Kt=>{const{prefixCls:Ot,className:rt,dashed:Ue}=Kt,$t=Me(Kt,["prefixCls","className","dashed"]),{getPrefixCls:Gt}=Re.useContext(lt.E_),it=Gt("menu",Ot),at=We()({[`${it}-item-divider-dashed`]:!!Ue},rt);return Re.createElement(ue.iz,Object.assign({className:at},$t))},Ye=me(38298),st=me(64002),pt=me(6848),wt=me(92343),te=(0,Re.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),de=Kt=>{var Ot;const{className:rt,children:Ue,icon:$t,title:Gt,danger:it}=Kt,{prefixCls:at,firstLevel:Te,direction:Pe,disableMenuItemTitleTooltip:ye,inlineCollapsed:ke}=Re.useContext(te),$e=wn=>{const ai=Re.createElement("span",{className:`${at}-title-content`},Ue);return(!$t||(0,wt.l$)(Ue)&&Ue.type==="span")&&Ue&&wn&&Te&&typeof Ue=="string"?Re.createElement("div",{className:`${at}-inline-collapsed-noicon`},Ue.charAt(0)):ai},{siderCollapsed:Le}=Re.useContext(Ze.D);let vt=Gt;typeof Gt=="undefined"?vt=Te?Ue:"":Gt===!1&&(vt="");const an={title:vt};!Le&&!ke&&(an.title=null,an.open=!1);const bn=(0,Ye.Z)(Ue).length;let en=Re.createElement(ue.ck,Object.assign({},(0,st.Z)(Kt,["title","icon","danger"]),{className:We()({[`${at}-item-danger`]:it,[`${at}-item-only-child`]:($t?bn+1:bn)===1},rt),title:typeof Gt=="string"?Gt:void 0}),(0,wt.Tm)($t,{className:We()((0,wt.l$)($t)?(Ot=$t.props)===null||Ot===void 0?void 0:Ot.className:"",`${at}-item-icon`)}),$e(ke));return ye||(en=Re.createElement(pt.Z,Object.assign({},an,{placement:Pe==="rtl"?"left":"right",overlayClassName:`${at}-inline-collapsed-tooltip`}),en)),en},he=Kt=>{var Ot;const{popupClassName:rt,icon:Ue,title:$t,theme:Gt}=Kt,it=Re.useContext(te),{prefixCls:at,inlineCollapsed:Te,theme:Pe}=it,ye=(0,ue.Xl)();let ke;if(!Ue)ke=Te&&!ye.length&&$t&&typeof $t=="string"?Re.createElement("div",{className:`${at}-inline-collapsed-noicon`},$t.charAt(0)):Re.createElement("span",{className:`${at}-title-content`},$t);else{const Le=(0,wt.l$)($t)&&$t.type==="span";ke=Re.createElement(Re.Fragment,null,(0,wt.Tm)(Ue,{className:We()((0,wt.l$)(Ue)?(Ot=Ue.props)===null||Ot===void 0?void 0:Ot.className:"",`${at}-item-icon`)}),Le?$t:Re.createElement("span",{className:`${at}-title-content`},$t))}const $e=Re.useMemo(()=>Object.assign(Object.assign({},it),{firstLevel:!1}),[it]);return Re.createElement(te.Provider,{value:$e},Re.createElement(ue.Wd,Object.assign({},(0,st.Z)(Kt,["icon"]),{title:ke,popupClassName:We()(at,rt,`${at}-${Gt||Pe}`)})))},ve=me(19362),be=me(80764),Ne=me(62892),Fe=me(40875),je=function(Kt,Ot){var rt={};for(var Ue in Kt)Object.prototype.hasOwnProperty.call(Kt,Ue)&&Ot.indexOf(Ue)<0&&(rt[Ue]=Kt[Ue]);if(Kt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $t=0,Ue=Object.getOwnPropertySymbols(Kt);$t<Ue.length;$t++)Ot.indexOf(Ue[$t])<0&&Object.prototype.propertyIsEnumerable.call(Kt,Ue[$t])&&(rt[Ue[$t]]=Kt[Ue[$t]]);return rt};function ze(Kt){return(Kt||[]).map((Ot,rt)=>{if(Ot&&typeof Ot=="object"){const Ue=Ot,{label:$t,children:Gt,key:it,type:at}=Ue,Te=je(Ue,["label","children","key","type"]),Pe=it!=null?it:`tmp-${rt}`;return Gt||at==="group"?at==="group"?Re.createElement(ue.BW,Object.assign({key:Pe},Te,{title:$t}),ze(Gt)):Re.createElement(he,Object.assign({key:Pe},Te,{title:$t}),ze(Gt)):at==="divider"?Re.createElement(Ct,Object.assign({key:Pe},Te)):Re.createElement(de,Object.assign({key:Pe},Te),$t)}return null}).filter(Ot=>Ot)}function Xe(Kt){return Re.useMemo(()=>Kt&&ze(Kt),[Kt])}var Je=me(64993),dt=me(17313),He=me(8378),bt=me(13826),et=me(29878),It=me(83116),xt=me(37613),Ut=Kt=>{const{componentCls:Ot,motionDurationSlow:rt,horizontalLineHeight:Ue,colorSplit:$t,lineWidth:Gt,lineType:it,itemPaddingInline:at}=Kt;return{[`${Ot}-horizontal`]:{lineHeight:Ue,border:0,borderBottom:`${Gt}px ${it} ${$t}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Ot}-item, ${Ot}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:at},[`> ${Ot}-item:hover,
|
|
|
> ${Ot}-item-active,
|
|
|
> ${Ot}-submenu ${Ot}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Ot}-item, ${Ot}-submenu-title`]:{transition:[`border-color ${rt}`,`background ${rt}`].join(",")},[`${Ot}-submenu-arrow`]:{display:"none"}}}},qe=Kt=>{let{componentCls:Ot,menuArrowOffset:rt}=Kt;return{[`${Ot}-rtl`]:{direction:"rtl"},[`${Ot}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Ot}-rtl${Ot}-vertical,
|
|
|
${Ot}-submenu-rtl ${Ot}-vertical`]:{[`${Ot}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${rt})`},"&::after":{transform:`rotate(45deg) translateY(${rt})`}}}}};const Ke=Kt=>Object.assign({},(0,dt.oN)(Kt));var Ln=(Kt,Ot)=>{const{componentCls:rt,itemColor:Ue,itemSelectedColor:$t,groupTitleColor:Gt,itemBg:it,subMenuItemBg:at,itemSelectedBg:Te,activeBarHeight:Pe,activeBarWidth:ye,activeBarBorderWidth:ke,motionDurationSlow:$e,motionEaseInOut:Le,motionEaseOut:vt,itemPaddingInline:an,motionDurationMid:bn,itemHoverColor:en,lineType:wn,colorSplit:ai,itemDisabledColor:_n,dangerItemColor:Hn,dangerItemHoverColor:wi,dangerItemSelectedColor:Hi,dangerItemActiveBg:_i,dangerItemSelectedBg:cr,itemHoverBg:_r,itemActiveBg:vi,menuSubMenuBg:si,horizontalItemSelectedColor:fi,horizontalItemSelectedBg:Ui,horizontalItemBorderRadius:Fi,horizontalItemHoverBg:ao,popupBg:wr}=Kt;return{[`${rt}-${Ot}, ${rt}-${Ot} > ${rt}`]:{color:Ue,background:it,[`&${rt}-root:focus-visible`]:Object.assign({},Ke(Kt)),[`${rt}-item-group-title`]:{color:Gt},[`${rt}-submenu-selected`]:{[`> ${rt}-submenu-title`]:{color:$t}},[`${rt}-item-disabled, ${rt}-submenu-disabled`]:{color:`${_n} !important`},[`${rt}-item:not(${rt}-item-selected):not(${rt}-submenu-selected)`]:{[`&:hover, > ${rt}-submenu-title:hover`]:{color:en}},[`&:not(${rt}-horizontal)`]:{[`${rt}-item:not(${rt}-item-selected)`]:{"&:hover":{backgroundColor:_r},"&:active":{backgroundColor:vi}},[`${rt}-submenu-title`]:{"&:hover":{backgroundColor:_r},"&:active":{backgroundColor:vi}}},[`${rt}-item-danger`]:{color:Hn,[`&${rt}-item:hover`]:{[`&:not(${rt}-item-selected):not(${rt}-submenu-selected)`]:{color:wi}},[`&${rt}-item:active`]:{background:_i}},[`${rt}-item a`]:{"&, &:hover":{color:"inherit"}},[`${rt}-item-selected`]:{color:$t,[`&${rt}-item-danger`]:{color:Hi},"a, a:hover":{color:"inherit"}},[`& ${rt}-item-selected`]:{backgroundColor:Te,[`&${rt}-item-danger`]:{backgroundColor:cr}},[`${rt}-item, ${rt}-submenu-title`]:{[`&:not(${rt}-item-disabled):focus-visible`]:Object.assign({},Ke(Kt))},[`&${rt}-submenu > ${rt}`]:{backgroundColor:si},[`&${rt}-popup > ${rt}`]:{backgroundColor:wr},[`&${rt}-horizontal`]:Object.assign(Object.assign({},Ot==="dark"?{borderBottom:0}:{}),{[`> ${rt}-item, > ${rt}-submenu`]:{top:ke,marginTop:-ke,marginBottom:0,borderRadius:Fi,"&::after":{position:"absolute",insetInline:an,bottom:0,borderBottom:`${Pe}px solid transparent`,transition:`border-color ${$e} ${Le}`,content:'""'},"&:hover, &-active, &-open":{background:ao,"&::after":{borderBottomWidth:Pe,borderBottomColor:fi}},"&-selected":{color:fi,backgroundColor:Ui,"&:hover":{backgroundColor:Ui},"&::after":{borderBottomWidth:Pe,borderBottomColor:fi}}}}),[`&${rt}-root`]:{[`&${rt}-inline, &${rt}-vertical`]:{borderInlineEnd:`${ke}px ${wn} ${ai}`}},[`&${rt}-inline`]:{[`${rt}-sub${rt}-inline`]:{background:at},[`${rt}-item, ${rt}-submenu-title`]:ke&&ye?{width:`calc(100% + ${ke}px)`}:{},[`${rt}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${ye}px solid ${$t}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${bn} ${vt}`,`opacity ${bn} ${vt}`].join(","),content:'""'},[`&${rt}-item-danger`]:{"&::after":{borderInlineEndColor:Hi}}},[`${rt}-selected, ${rt}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${bn} ${Le}`,`opacity ${bn} ${Le}`].join(",")}}}}}};const Mn=Kt=>{const{componentCls:Ot,itemHeight:rt,itemMarginInline:Ue,padding:$t,menuArrowSize:Gt,marginXS:it,itemMarginBlock:at}=Kt,Te=$t+Gt+it;return{[`${Ot}-item`]:{position:"relative",overflow:"hidden"},[`${Ot}-item, ${Ot}-submenu-title`]:{height:rt,lineHeight:`${rt}px`,paddingInline:$t,overflow:"hidden",textOverflow:"ellipsis",marginInline:Ue,marginBlock:at,width:`calc(100% - ${Ue*2}px)`},[`> ${Ot}-item,
|
|
|
> ${Ot}-submenu > ${Ot}-submenu-title`]:{height:rt,lineHeight:`${rt}px`},[`${Ot}-item-group-list ${Ot}-submenu-title,
|
|
|
${Ot}-submenu-title`]:{paddingInlineEnd:Te}}};var rn=Kt=>{const{componentCls:Ot,iconCls:rt,itemHeight:Ue,colorTextLightSolid:$t,dropdownWidth:Gt,controlHeightLG:it,motionDurationMid:at,motionEaseOut:Te,paddingXL:Pe,itemMarginInline:ye,fontSizeLG:ke,motionDurationSlow:$e,paddingXS:Le,boxShadowSecondary:vt,collapsedWidth:an,collapsedIconSize:bn}=Kt,en={height:Ue,lineHeight:`${Ue}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Ot]:{"&-inline, &-vertical":Object.assign({[`&${Ot}-root`]:{boxShadow:"none"}},Mn(Kt))},[`${Ot}-submenu-popup`]:{[`${Ot}-vertical`]:Object.assign(Object.assign({},Mn(Kt)),{boxShadow:vt})}},{[`${Ot}-submenu-popup ${Ot}-vertical${Ot}-sub`]:{minWidth:Gt,maxHeight:`calc(100vh - ${it*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Ot}-inline`]:{width:"100%",[`&${Ot}-root`]:{[`${Ot}-item, ${Ot}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${$e}`,`background ${$e}`,`padding ${at} ${Te}`].join(","),[`> ${Ot}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Ot}-sub${Ot}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Ot}-submenu > ${Ot}-submenu-title`]:en,[`& ${Ot}-item-group-title`]:{paddingInlineStart:Pe}},[`${Ot}-item`]:en}},{[`${Ot}-inline-collapsed`]:{width:an,[`&${Ot}-root`]:{[`${Ot}-item, ${Ot}-submenu ${Ot}-submenu-title`]:{[`> ${Ot}-inline-collapsed-noicon`]:{fontSize:ke,textAlign:"center"}}},[`> ${Ot}-item,
|
|
|
> ${Ot}-item-group > ${Ot}-item-group-list > ${Ot}-item,
|
|
|
> ${Ot}-item-group > ${Ot}-item-group-list > ${Ot}-submenu > ${Ot}-submenu-title,
|
|
|
> ${Ot}-submenu > ${Ot}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${ke/2}px - ${ye}px)`,textOverflow:"clip",[`
|
|
|
${Ot}-submenu-arrow,
|
|
|
${Ot}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${Ot}-item-icon, ${rt}`]:{margin:0,fontSize:bn,lineHeight:`${Ue}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Ot}-item-icon, ${rt}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Ot}-item-icon, ${rt}`]:{display:"none"},"a, a:hover":{color:$t}},[`${Ot}-item-group-title`]:Object.assign(Object.assign({},dt.vS),{paddingInline:Le})}}]};const xn=Kt=>{const{componentCls:Ot,motionDurationSlow:rt,motionDurationMid:Ue,motionEaseInOut:$t,motionEaseOut:Gt,iconCls:it,iconSize:at,iconMarginInlineEnd:Te}=Kt;return{[`${Ot}-item, ${Ot}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${rt}`,`background ${rt}`,`padding ${rt} ${$t}`].join(","),[`${Ot}-item-icon, ${it}`]:{minWidth:at,fontSize:at,transition:[`font-size ${Ue} ${Gt}`,`margin ${rt} ${$t}`,`color ${rt}`].join(","),"+ span":{marginInlineStart:Te,opacity:1,transition:[`opacity ${rt} ${$t}`,`margin ${rt}`,`color ${rt}`].join(",")}},[`${Ot}-item-icon`]:Object.assign({},(0,dt.Ro)()),[`&${Ot}-item-only-child`]:{[`> ${it}, > ${Ot}-item-icon`]:{marginInlineEnd:0}}},[`${Ot}-item-disabled, ${Ot}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Ot}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Un=Kt=>{const{componentCls:Ot,motionDurationSlow:rt,motionEaseInOut:Ue,borderRadius:$t,menuArrowSize:Gt,menuArrowOffset:it}=Kt;return{[`${Ot}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Kt.margin,width:Gt,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${rt} ${Ue}, opacity ${rt}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Gt*.6,height:Gt*.15,backgroundColor:"currentcolor",borderRadius:$t,transition:[`background ${rt} ${Ue}`,`transform ${rt} ${Ue}`,`top ${rt} ${Ue}`,`color ${rt} ${Ue}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${it})`},"&::after":{transform:`rotate(-45deg) translateY(${it})`}}}}},yn=Kt=>{const{antCls:Ot,componentCls:rt,fontSize:Ue,motionDurationSlow:$t,motionDurationMid:Gt,motionEaseInOut:it,paddingXS:at,padding:Te,colorSplit:Pe,lineWidth:ye,zIndexPopup:ke,borderRadiusLG:$e,subMenuItemBorderRadius:Le,menuArrowSize:vt,menuArrowOffset:an,lineType:bn,menuPanelMaskInset:en,groupTitleLineHeight:wn,groupTitleFontSize:ai}=Kt;return[{"":{[`${rt}`]:Object.assign(Object.assign({},(0,dt.dF)()),{"&-hidden":{display:"none"}})},[`${rt}-submenu-hidden`]:{display:"none"}},{[rt]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,dt.Wf)(Kt)),(0,dt.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:Ue,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${$t} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${rt}-item`]:{flex:"none"}},[`${rt}-item, ${rt}-submenu, ${rt}-submenu-title`]:{borderRadius:Kt.itemBorderRadius},[`${rt}-item-group-title`]:{padding:`${at}px ${Te}px`,fontSize:ai,lineHeight:wn,transition:`all ${$t}`},[`&-horizontal ${rt}-submenu`]:{transition:[`border-color ${$t} ${it}`,`background ${$t} ${it}`].join(",")},[`${rt}-submenu, ${rt}-submenu-inline`]:{transition:[`border-color ${$t} ${it}`,`background ${$t} ${it}`,`padding ${Gt} ${it}`].join(",")},[`${rt}-submenu ${rt}-sub`]:{cursor:"initial",transition:[`background ${$t} ${it}`,`padding ${$t} ${it}`].join(",")},[`${rt}-title-content`]:{transition:`color ${$t}`},[`${rt}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${rt}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Pe,borderStyle:bn,borderWidth:0,borderTopWidth:ye,marginBlock:ye,padding:0,"&-dashed":{borderStyle:"dashed"}}}),xn(Kt)),{[`${rt}-item-group`]:{[`${rt}-item-group-list`]:{margin:0,padding:0,[`${rt}-item, ${rt}-submenu-title`]:{paddingInline:`${Ue*2}px ${Te}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:ke,borderRadius:$e,boxShadow:"none",transformOrigin:"0 0",[`&${rt}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${en}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:en},"\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:Kt.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:Kt.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:Kt.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:Kt.paddingXS},[`> ${rt}`]:Object.assign(Object.assign(Object.assign({borderRadius:$e},xn(Kt)),Un(Kt)),{[`${rt}-item, ${rt}-submenu > ${rt}-submenu-title`]:{borderRadius:Le},[`${rt}-submenu-title::after`]:{transition:`transform ${$t} ${it}`}})}}),Un(Kt)),{[`&-inline-collapsed ${rt}-submenu-arrow,
|
|
|
&-inline ${rt}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${an})`},"&::after":{transform:`rotate(45deg) translateX(-${an})`}},[`${rt}-submenu-open${rt}-submenu-inline > ${rt}-submenu-title > ${rt}-submenu-arrow`]:{transform:`translateY(-${vt*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${an})`},"&::before":{transform:`rotate(45deg) translateX(${an})`}}})},{[`${Ot}-layout-header`]:{[rt]:{lineHeight:"inherit"}}}]};var sn=(Kt,Ot)=>(0,It.Z)("Menu",Ue=>{if(Ot===!1)return[];const{colorBgElevated:$t,colorPrimary:Gt,colorTextLightSolid:it,controlHeightLG:at,fontSize:Te,darkItemColor:Pe,darkDangerItemColor:ye,darkItemBg:ke,darkSubMenuItemBg:$e,darkItemSelectedColor:Le,darkItemSelectedBg:vt,darkDangerItemSelectedBg:an,darkItemHoverBg:bn,darkGroupTitleColor:en,darkItemHoverColor:wn,darkItemDisabledColor:ai,darkDangerItemHoverColor:_n,darkDangerItemSelectedColor:Hn,darkDangerItemActiveBg:wi}=Ue,Hi=Te/7*5,_i=(0,xt.TS)(Ue,{menuArrowSize:Hi,menuHorizontalHeight:at*1.15,menuArrowOffset:`${Hi*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:$t}),cr=(0,xt.TS)(_i,{itemColor:Pe,itemHoverColor:wn,groupTitleColor:en,itemSelectedColor:Le,itemBg:ke,popupBg:ke,subMenuItemBg:$e,itemActiveBg:"transparent",itemSelectedBg:vt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:bn,itemDisabledColor:ai,dangerItemColor:ye,dangerItemHoverColor:_n,dangerItemSelectedColor:Hn,dangerItemActiveBg:wi,dangerItemSelectedBg:an,menuSubMenuBg:$e,horizontalItemSelectedColor:it,horizontalItemSelectedBg:Gt});return[yn(_i),Ut(_i),rn(_i),Ln(_i,"light"),Ln(cr,"dark"),qe(_i),(0,He.Z)(_i),(0,bt.oN)(_i,"slide-up"),(0,bt.oN)(_i,"slide-down"),(0,et._y)(_i,"zoom-big")]},Ue=>{const{colorPrimary:$t,colorError:Gt,colorTextDisabled:it,colorErrorBg:at,colorText:Te,colorTextDescription:Pe,colorBgContainer:ye,colorFillAlter:ke,colorFillContent:$e,lineWidth:Le,lineWidthBold:vt,controlItemBgActive:an,colorBgTextHover:bn,controlHeightLG:en,lineHeight:wn,colorBgElevated:ai,marginXXS:_n,padding:Hn,fontSize:wi,controlHeightSM:Hi,fontSizeLG:_i,colorTextLightSolid:cr,colorErrorHover:_r}=Ue,vi=new Je.C(cr).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:Ue.zIndexPopupBase+50,radiusItem:Ue.borderRadiusLG,itemBorderRadius:Ue.borderRadiusLG,radiusSubMenuItem:Ue.borderRadiusSM,subMenuItemBorderRadius:Ue.borderRadiusSM,colorItemText:Te,itemColor:Te,colorItemTextHover:Te,itemHoverColor:Te,colorItemTextHoverHorizontal:$t,horizontalItemHoverColor:$t,colorGroupTitle:Pe,groupTitleColor:Pe,colorItemTextSelected:$t,itemSelectedColor:$t,colorItemTextSelectedHorizontal:$t,horizontalItemSelectedColor:$t,colorItemBg:ye,itemBg:ye,colorItemBgHover:bn,itemHoverBg:bn,colorItemBgActive:$e,itemActiveBg:an,colorSubItemBg:ke,subMenuItemBg:ke,colorItemBgSelected:an,itemSelectedBg:an,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:vt,activeBarHeight:vt,colorActiveBarBorderSize:Le,activeBarBorderWidth:Le,colorItemTextDisabled:it,itemDisabledColor:it,colorDangerItemText:Gt,dangerItemColor:Gt,colorDangerItemTextHover:Gt,dangerItemHoverColor:Gt,colorDangerItemTextSelected:Gt,dangerItemSelectedColor:Gt,colorDangerItemBgActive:at,dangerItemActiveBg:at,colorDangerItemBgSelected:at,dangerItemSelectedBg:at,itemMarginInline:Ue.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:en,groupTitleLineHeight:wn,collapsedWidth:en*2,popupBg:ai,itemMarginBlock:_n,itemPaddingInline:Hn,horizontalLineHeight:`${en*1.15}px`,iconSize:wi,iconMarginInlineEnd:Hi-wi,collapsedIconSize:_i,groupTitleFontSize:wi,darkItemDisabledColor:new Je.C(cr).setAlpha(.25).toRgbString(),darkItemColor:vi,darkDangerItemColor:Gt,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:cr,darkItemSelectedBg:$t,darkDangerItemSelectedBg:Gt,darkItemHoverBg:"transparent",darkGroupTitleColor:vi,darkItemHoverColor:cr,darkDangerItemHoverColor:_r,darkDangerItemSelectedColor:cr,darkDangerItemActiveBg:Gt}},{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"]]})(Kt),Lt=function(Kt,Ot){var rt={};for(var Ue in Kt)Object.prototype.hasOwnProperty.call(Kt,Ue)&&Ot.indexOf(Ue)<0&&(rt[Ue]=Kt[Ue]);if(Kt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $t=0,Ue=Object.getOwnPropertySymbols(Kt);$t<Ue.length;$t++)Ot.indexOf(Ue[$t])<0&&Object.prototype.propertyIsEnumerable.call(Kt,Ue[$t])&&(rt[Ue[$t]]=Kt[Ue[$t]]);return rt},gi=(0,Re.forwardRef)((Kt,Ot)=>{var rt,Ue;const $t=Re.useContext(Fe.Z),Gt=$t||{},{getPrefixCls:it,getPopupContainer:at,direction:Te,menu:Pe}=Re.useContext(lt.E_),ye=it(),{prefixCls:ke,className:$e,style:Le,theme:vt="light",expandIcon:an,_internalDisableMenuItemTitleTooltip:bn,inlineCollapsed:en,siderCollapsed:wn,items:ai,children:_n,rootClassName:Hn,mode:wi,selectable:Hi,onClick:_i,overflowedIndicatorPopupClassName:cr}=Kt,_r=Lt(Kt,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),vi=(0,st.Z)(_r,["collapsedWidth"]),si=Xe(ai)||_n;(rt=Gt.validator)===null||rt===void 0||rt.call(Gt,{mode:wi});const fi=(0,be.useEvent)(function(){var ji;_i==null||_i.apply(void 0,arguments),(ji=Gt.onClick)===null||ji===void 0||ji.call(Gt)}),Ui=Gt.mode||wi,Fi=Hi!=null?Hi:Gt.selectable,ao=Re.useMemo(()=>wn!==void 0?wn:en,[en,wn]),wr={horizontal:{motionName:`${ye}-slide-up`},inline:(0,Ne.Z)(ye),other:{motionName:`${ye}-zoom-big`}},Be=it("menu",ke||Gt.prefixCls),[Xr,Hr]=sn(Be,!$t),jn=We()(`${Be}-${vt}`,Pe==null?void 0:Pe.className,$e);let Li;if(typeof an=="function")Li=an;else if(an===null||an===!1)Li=null;else if(Gt.expandIcon===null||Gt.expandIcon===!1)Li=null;else{const ji=an!=null?an:Gt.expandIcon;Li=(0,wt.Tm)(ji,{className:We()(`${Be}-submenu-expand-icon`,(0,wt.l$)(ji)?(Ue=ji.props)===null||Ue===void 0?void 0:Ue.className:"")})}const Wi=Re.useMemo(()=>({prefixCls:Be,inlineCollapsed:ao||!1,direction:Te,firstLevel:!0,theme:vt,mode:Ui,disableMenuItemTitleTooltip:bn}),[Be,ao,Te,bn,vt]);return Xr(Re.createElement(Fe.Z.Provider,{value:null},Re.createElement(te.Provider,{value:Wi},Re.createElement(ue.ZP,Object.assign({getPopupContainer:at,overflowedIndicator:Re.createElement(ve.Z,null),overflowedIndicatorPopupClassName:We()(Be,`${Be}-${vt}`,cr),mode:Ui,selectable:Fi,onClick:fi},vi,{inlineCollapsed:ao,style:Object.assign(Object.assign({},Pe==null?void 0:Pe.style),Le),className:jn,prefixCls:Be,direction:Te,defaultMotions:wr,expandIcon:Li,ref:Ot,rootClassName:We()(Hn,Hr)}),si))))});const Pn=(0,Re.forwardRef)((Kt,Ot)=>{const rt=(0,Re.useRef)(null),Ue=Re.useContext(Ze.D);return(0,Re.useImperativeHandle)(Ot,()=>({menu:rt.current,focus:$t=>{var Gt;(Gt=rt.current)===null||Gt===void 0||Gt.focus($t)}})),Re.createElement(gi,Object.assign({ref:rt},Kt,Ue))});Pn.Item=de,Pn.SubMenu=he,Pn.Divider=Ct,Pn.ItemGroup=ue.BW;var Xt=Pn},25700:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Gt}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},ot=Ze,We=me(88853),lt=function(at,Te){return Re.createElement(We.Z,(0,ue.Z)({},at,{ref:Te,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me,Ct=me(93343),Ye=me(16537),st=me(53878),pt=me(92310),wt=me.n(pt),Ie=me(80962),te=me(57259),ee=me(79545),de=me(68550),se=me(17928),he=me(7711),ve=me(36994),be={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Ne=be,Fe=me(91735),je=function(it){(0,se.Z)(Te,it);var at=(0,he.Z)(Te);function Te(){var Pe;(0,ee.Z)(this,Te);for(var ye=arguments.length,ke=new Array(ye),$e=0;$e<ye;$e++)ke[$e]=arguments[$e];return Pe=at.call.apply(at,[this].concat(ke)),Pe.state={goInputText:""},Pe.getValidValue=function(){var Le=Pe.state.goInputText;return!Le||Number.isNaN(Le)?void 0:Number(Le)},Pe.buildOptionText=function(Le){return"".concat(Le," ").concat(Pe.props.locale.items_per_page)},Pe.changeSize=function(Le){Pe.props.changeSize(Number(Le))},Pe.handleChange=function(Le){Pe.setState({goInputText:Le.target.value})},Pe.handleBlur=function(Le){var vt=Pe.props,an=vt.goButton,bn=vt.quickGo,en=vt.rootPrefixCls,wn=Pe.state.goInputText;an||wn===""||(Pe.setState({goInputText:""}),!(Le.relatedTarget&&(Le.relatedTarget.className.indexOf("".concat(en,"-item-link"))>=0||Le.relatedTarget.className.indexOf("".concat(en,"-item"))>=0))&&bn(Pe.getValidValue()))},Pe.go=function(Le){var vt=Pe.state.goInputText;vt!==""&&(Le.keyCode===Ne.ENTER||Le.type==="click")&&(Pe.setState({goInputText:""}),Pe.props.quickGo(Pe.getValidValue()))},Pe}return(0,de.Z)(Te,[{key:"getPageSizeOptions",value:function(){var ye=this.props,ke=ye.pageSize,$e=ye.pageSizeOptions;return $e.some(function(Le){return Le.toString()===ke.toString()})?$e:$e.concat([ke.toString()]).sort(function(Le,vt){var an=Number.isNaN(Number(Le))?0:Number(Le),bn=Number.isNaN(Number(vt))?0:Number(vt);return an-bn})}},{key:"render",value:function(){var ye=this,ke=this.props,$e=ke.pageSize,Le=ke.locale,vt=ke.rootPrefixCls,an=ke.changeSize,bn=ke.quickGo,en=ke.goButton,wn=ke.selectComponentClass,ai=ke.buildOptionText,_n=ke.selectPrefixCls,Hn=ke.disabled,wi=this.state.goInputText,Hi="".concat(vt,"-options"),_i=wn,cr=null,_r=null,vi=null;if(!an&&!bn)return null;var si=this.getPageSizeOptions();if(an&&_i){var fi=si.map(function(Ui,Fi){return Re.createElement(_i.Option,{key:Fi,value:Ui.toString()},(ai||ye.buildOptionText)(Ui))});cr=Re.createElement(_i,{disabled:Hn,prefixCls:_n,showSearch:!1,className:"".concat(Hi,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:($e||si[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Fi){return Fi.parentNode},"aria-label":Le.page_size,defaultOpen:!1},fi)}return bn&&(en&&(vi=typeof en=="boolean"?Re.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Hn,className:"".concat(Hi,"-quick-jumper-button")},Le.jump_to_confirm):Re.createElement("span",{onClick:this.go,onKeyUp:this.go},en)),_r=Re.createElement("div",{className:"".concat(Hi,"-quick-jumper")},Le.jump_to,Re.createElement("input",{disabled:Hn,type:"text",value:wi,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":Le.page}),Le.page,vi)),Re.createElement("li",{className:"".concat(Hi)},cr,_r)}}]),Te}(Re.Component);je.defaultProps={pageSizeOptions:["10","20","50","100"]};var ze=je,Xe=function(at){var Te,Pe=at.rootPrefixCls,ye=at.page,ke=at.active,$e=at.className,Le=at.showTitle,vt=at.onClick,an=at.onKeyPress,bn=at.itemRender,en="".concat(Pe,"-item"),wn=wt()(en,"".concat(en,"-").concat(ye),(Te={},(0,Ie.Z)(Te,"".concat(en,"-active"),ke),(0,Ie.Z)(Te,"".concat(en,"-disabled"),!ye),(0,Ie.Z)(Te,at.className,$e),Te)),ai=function(){vt(ye)},_n=function(Hi){an(Hi,vt,ye)},Hn=bn(ye,"page",Re.createElement("a",{rel:"nofollow"},ye));return Hn?Re.createElement("li",{title:Le?ye.toString():null,className:wn,onClick:ai,onKeyPress:_n,tabIndex:0},Hn):null},Je=Xe;function dt(){}function He(it){var at=Number(it);return typeof at=="number"&&!Number.isNaN(at)&&isFinite(at)&&Math.floor(at)===at}var bt=function(at,Te,Pe){return Pe};function et(it,at,Te){var Pe=typeof it=="undefined"?at.pageSize:it;return Math.floor((Te.total-1)/Pe)+1}var It=function(it){(0,se.Z)(Te,it);var at=(0,he.Z)(Te);function Te(Pe){var ye;(0,ee.Z)(this,Te),ye=at.call(this,Pe),ye.paginationNode=Re.createRef(),ye.getJumpPrevPage=function(){return Math.max(1,ye.state.current-(ye.props.showLessItems?3:5))},ye.getJumpNextPage=function(){return Math.min(et(void 0,ye.state,ye.props),ye.state.current+(ye.props.showLessItems?3:5))},ye.getItemIcon=function(an,bn){var en=ye.props.prefixCls,wn=an||Re.createElement("button",{type:"button","aria-label":bn,className:"".concat(en,"-item-link")});return typeof an=="function"&&(wn=Re.createElement(an,(0,te.Z)({},ye.props))),wn},ye.isValid=function(an){var bn=ye.props.total;return He(an)&&an!==ye.state.current&&He(bn)&&bn>0},ye.shouldDisplayQuickJumper=function(){var an=ye.props,bn=an.showQuickJumper,en=an.total,wn=ye.state.pageSize;return en<=wn?!1:bn},ye.handleKeyDown=function(an){(an.keyCode===Ne.ARROW_UP||an.keyCode===Ne.ARROW_DOWN)&&an.preventDefault()},ye.handleKeyUp=function(an){var bn=ye.getValidValue(an),en=ye.state.currentInputValue;bn!==en&&ye.setState({currentInputValue:bn}),an.keyCode===Ne.ENTER?ye.handleChange(bn):an.keyCode===Ne.ARROW_UP?ye.handleChange(bn-1):an.keyCode===Ne.ARROW_DOWN&&ye.handleChange(bn+1)},ye.handleBlur=function(an){var bn=ye.getValidValue(an);ye.handleChange(bn)},ye.changePageSize=function(an){var bn=ye.state.current,en=et(an,ye.state,ye.props);bn=bn>en?en:bn,en===0&&(bn=ye.state.current),typeof an=="number"&&("pageSize"in ye.props||ye.setState({pageSize:an}),"current"in ye.props||ye.setState({current:bn,currentInputValue:bn})),ye.props.onShowSizeChange(bn,an),"onChange"in ye.props&&ye.props.onChange&&ye.props.onChange(bn,an)},ye.handleChange=function(an){var bn=ye.props,en=bn.disabled,wn=bn.onChange,ai=ye.state,_n=ai.pageSize,Hn=ai.current,wi=ai.currentInputValue;if(ye.isValid(an)&&!en){var Hi=et(void 0,ye.state,ye.props),_i=an;return an>Hi?_i=Hi:an<1&&(_i=1),"current"in ye.props||ye.setState({current:_i}),_i!==wi&&ye.setState({currentInputValue:_i}),wn(_i,_n),_i}return Hn},ye.prev=function(){ye.hasPrev()&&ye.handleChange(ye.state.current-1)},ye.next=function(){ye.hasNext()&&ye.handleChange(ye.state.current+1)},ye.jumpPrev=function(){ye.handleChange(ye.getJumpPrevPage())},ye.jumpNext=function(){ye.handleChange(ye.getJumpNextPage())},ye.hasPrev=function(){return ye.state.current>1},ye.hasNext=function(){return ye.state.current<et(void 0,ye.state,ye.props)},ye.runIfEnter=function(an,bn){if(an.key==="Enter"||an.charCode===13){for(var en=arguments.length,wn=new Array(en>2?en-2:0),ai=2;ai<en;ai++)wn[ai-2]=arguments[ai];bn.apply(void 0,wn)}},ye.runIfEnterPrev=function(an){ye.runIfEnter(an,ye.prev)},ye.runIfEnterNext=function(an){ye.runIfEnter(an,ye.next)},ye.runIfEnterJumpPrev=function(an){ye.runIfEnter(an,ye.jumpPrev)},ye.runIfEnterJumpNext=function(an){ye.runIfEnter(an,ye.jumpNext)},ye.handleGoTO=function(an){(an.keyCode===Ne.ENTER||an.type==="click")&&ye.handleChange(ye.state.currentInputValue)},ye.renderPrev=function(an){var bn=ye.props,en=bn.prevIcon,wn=bn.itemRender,ai=wn(an,"prev",ye.getItemIcon(en,"prev page")),_n=!ye.hasPrev();return(0,Re.isValidElement)(ai)?(0,Re.cloneElement)(ai,{disabled:_n}):ai},ye.renderNext=function(an){var bn=ye.props,en=bn.nextIcon,wn=bn.itemRender,ai=wn(an,"next",ye.getItemIcon(en,"next page")),_n=!ye.hasNext();return(0,Re.isValidElement)(ai)?(0,Re.cloneElement)(ai,{disabled:_n}):ai};var ke=Pe.onChange!==dt,$e="current"in Pe;$e&&!ke&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var Le=Pe.defaultCurrent;"current"in Pe&&(Le=Pe.current);var vt=Pe.defaultPageSize;return"pageSize"in Pe&&(vt=Pe.pageSize),Le=Math.min(Le,et(vt,void 0,Pe)),ye.state={current:Le,currentInputValue:Le,pageSize:vt},ye}return(0,de.Z)(Te,[{key:"componentDidUpdate",value:function(ye,ke){var $e=this.props.prefixCls;if(ke.current!==this.state.current&&this.paginationNode.current){var Le=this.paginationNode.current.querySelector(".".concat($e,"-item-").concat(ke.current));if(Le&&document.activeElement===Le){var vt;Le==null||(vt=Le.blur)===null||vt===void 0||vt.call(Le)}}}},{key:"getValidValue",value:function(ye){var ke=ye.target.value,$e=et(void 0,this.state,this.props),Le=this.state.currentInputValue,vt;return ke===""?vt=ke:Number.isNaN(Number(ke))?vt=Le:ke>=$e?vt=$e:vt=Number(ke),vt}},{key:"getShowSizeChanger",value:function(){var ye=this.props,ke=ye.showSizeChanger,$e=ye.total,Le=ye.totalBoundaryShowSizeChanger;return typeof ke!="undefined"?ke:$e>Le}},{key:"render",value:function(){var ye=this.props,ke=ye.prefixCls,$e=ye.className,Le=ye.style,vt=ye.disabled,an=ye.hideOnSinglePage,bn=ye.total,en=ye.locale,wn=ye.showQuickJumper,ai=ye.showLessItems,_n=ye.showTitle,Hn=ye.showTotal,wi=ye.simple,Hi=ye.itemRender,_i=ye.showPrevNextJumpers,cr=ye.jumpPrevIcon,_r=ye.jumpNextIcon,vi=ye.selectComponentClass,si=ye.selectPrefixCls,fi=ye.pageSizeOptions,Ui=this.state,Fi=Ui.current,ao=Ui.pageSize,wr=Ui.currentInputValue;if(an===!0&&bn<=ao)return null;var Be=et(void 0,this.state,this.props),Xr=[],Hr=null,jn=null,Li=null,Wi=null,ji=null,Gn=wn&&wn.goButton,Ht=ai?1:2,Wt=Fi-1>0?Fi-1:0,Zt=Fi+1<Be?Fi+1:Be,yt=(0,ve.Z)(this.props,{aria:!0,data:!0}),un=Hn&&Re.createElement("li",{className:"".concat(ke,"-total-text")},Hn(bn,[bn===0?0:(Fi-1)*ao+1,Fi*ao>bn?bn:Fi*ao]));if(wi){Gn&&(typeof Gn=="boolean"?ji=Re.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},en.jump_to_confirm):ji=Re.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Gn),ji=Re.createElement("li",{title:_n?"".concat(en.jump_to).concat(Fi,"/").concat(Be):null,className:"".concat(ke,"-simple-pager")},ji));var vn=this.renderPrev(Wt);return Re.createElement("ul",(0,ue.Z)({className:wt()(ke,"".concat(ke,"-simple"),(0,Ie.Z)({},"".concat(ke,"-disabled"),vt),$e),style:Le,ref:this.paginationNode},yt),un,vn?Re.createElement("li",{title:_n?en.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:wt()("".concat(ke,"-prev"),(0,Ie.Z)({},"".concat(ke,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},vn):null,Re.createElement("li",{title:_n?"".concat(Fi,"/").concat(Be):null,className:"".concat(ke,"-simple-pager")},Re.createElement("input",{type:"text",value:wr,disabled:vt,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),Re.createElement("span",{className:"".concat(ke,"-slash")},"/"),Be),Re.createElement("li",{title:_n?en.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:wt()("".concat(ke,"-next"),(0,Ie.Z)({},"".concat(ke,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Zt)),ji)}if(Be<=3+Ht*2){var At={locale:en,rootPrefixCls:ke,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:_n,itemRender:Hi};Be||Xr.push(Re.createElement(Je,(0,ue.Z)({},At,{key:"noPager",page:1,className:"".concat(ke,"-item-disabled")})));for(var nt=1;nt<=Be;nt+=1){var on=Fi===nt;Xr.push(Re.createElement(Je,(0,ue.Z)({},At,{key:nt,page:nt,active:on})))}}else{var fn=ai?en.prev_3:en.prev_5,Jn=ai?en.next_3:en.next_5,pn=Hi(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(cr,"prev page")),Rt=Hi(this.getJumpNextPage(),"jump-next",this.getItemIcon(_r,"next page"));_i&&(Hr=pn?Re.createElement("li",{title:_n?fn:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:wt()("".concat(ke,"-jump-prev"),(0,Ie.Z)({},"".concat(ke,"-jump-prev-custom-icon"),!!cr))},pn):null,jn=Rt?Re.createElement("li",{title:_n?Jn:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:wt()("".concat(ke,"-jump-next"),(0,Ie.Z)({},"".concat(ke,"-jump-next-custom-icon"),!!_r))},Rt):null),Wi=Re.createElement(Je,{locale:en,last:!0,rootPrefixCls:ke,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Be,page:Be,active:!1,showTitle:_n,itemRender:Hi}),Li=Re.createElement(Je,{locale:en,rootPrefixCls:ke,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:_n,itemRender:Hi});var In=Math.max(1,Fi-Ht),Vn=Math.min(Fi+Ht,Be);Fi-1<=Ht&&(Vn=1+Ht*2),Be-Fi<=Ht&&(In=Be-Ht*2);for(var Pi=In;Pi<=Vn;Pi+=1){var tn=Fi===Pi;Xr.push(Re.createElement(Je,{locale:en,rootPrefixCls:ke,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Pi,page:Pi,active:tn,showTitle:_n,itemRender:Hi}))}Fi-1>=Ht*2&&Fi!==3&&(Xr[0]=(0,Re.cloneElement)(Xr[0],{className:"".concat(ke,"-item-after-jump-prev")}),Xr.unshift(Hr)),Be-Fi>=Ht*2&&Fi!==Be-2&&(Xr[Xr.length-1]=(0,Re.cloneElement)(Xr[Xr.length-1],{className:"".concat(ke,"-item-before-jump-next")}),Xr.push(jn)),In!==1&&Xr.unshift(Li),Vn!==Be&&Xr.push(Wi)}var hn=!this.hasPrev()||!Be,Rn=!this.hasNext()||!Be,Oi=this.renderPrev(Wt),Ii=this.renderNext(Zt);return Re.createElement("ul",(0,ue.Z)({className:wt()(ke,$e,(0,Ie.Z)({},"".concat(ke,"-disabled"),vt)),style:Le,ref:this.paginationNode},yt),un,Oi?Re.createElement("li",{title:_n?en.prev_page:null,onClick:this.prev,tabIndex:hn?null:0,onKeyPress:this.runIfEnterPrev,className:wt()("".concat(ke,"-prev"),(0,Ie.Z)({},"".concat(ke,"-disabled"),hn)),"aria-disabled":hn},Oi):null,Xr,Ii?Re.createElement("li",{title:_n?en.next_page:null,onClick:this.next,tabIndex:Rn?null:0,onKeyPress:this.runIfEnterNext,className:wt()("".concat(ke,"-next"),(0,Ie.Z)({},"".concat(ke,"-disabled"),Rn)),"aria-disabled":Rn},Ii):null,Re.createElement(ze,{disabled:vt,locale:en,rootPrefixCls:ke,selectComponentClass:vi,selectPrefixCls:si,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Fi,pageSize:ao,pageSizeOptions:fi,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Gn}))}}],[{key:"getDerivedStateFromProps",value:function(ye,ke){var $e={};if("current"in ye&&($e.current=ye.current,ye.current!==ke.current&&($e.currentInputValue=$e.current)),"pageSize"in ye&&ye.pageSize!==ke.pageSize){var Le=ke.current,vt=et(ye.pageSize,ke,ye);Le=Le>vt?vt:Le,"current"in ye||($e.current=Le,$e.currentInputValue=Le),$e.pageSize=ye.pageSize}return $e}}]),Te}(Re.Component);It.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:dt,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:dt,locale:Fe.Z,style:{},itemRender:bt,totalBoundaryShowSizeChanger:50};var xt=It,Bt=me(22075),Ut=me(36355),Nt=me(19716),qe=me(8628),Ke=me(9763),Tt=me(57809);const Ln=it=>Re.createElement(Tt.default,Object.assign({},it,{showSearch:!0,size:"small"})),Mn=it=>Re.createElement(Tt.default,Object.assign({},it,{showSearch:!0,size:"middle"}));Ln.Option=Tt.default.Option,Mn.Option=Tt.default.Option;var zt=me(9937),rn=me(17313),xn=me(83116),Un=me(37613);const yn=it=>{const{componentCls:at}=it;return{[`${at}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${at}-item-link`]:{color:it.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${at}-item-link`]:{color:it.colorTextDisabled,cursor:"not-allowed"}}},[`&${at}-disabled`]:{cursor:"not-allowed",[`${at}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:it.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:it.colorBorder,backgroundColor:it.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:it.itemActiveBgDisabled},a:{color:it.itemActiveColorDisabled}}},[`${at}-item-link`]:{color:it.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${at}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${at}-simple-pager`]:{color:it.colorTextDisabled},[`${at}-jump-prev, ${at}-jump-next`]:{[`${at}-item-link-icon`]:{opacity:0},[`${at}-item-ellipsis`]:{opacity:1}}},[`&${at}-simple`]:{[`${at}-prev, ${at}-next`]:{[`&${at}-disabled ${at}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},sn=it=>{const{componentCls:at}=it;return{[`&${at}-mini ${at}-total-text, &${at}-mini ${at}-simple-pager`]:{height:it.itemSizeSM,lineHeight:`${it.itemSizeSM}px`},[`&${at}-mini ${at}-item`]:{minWidth:it.itemSizeSM,height:it.itemSizeSM,margin:0,lineHeight:`${it.itemSizeSM-2}px`},[`&${at}-mini:not(${at}-disabled) ${at}-item:not(${at}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:it.colorBgTextHover},"&:active":{backgroundColor:it.colorBgTextActive}},[`&${at}-mini ${at}-prev, &${at}-mini ${at}-next`]:{minWidth:it.itemSizeSM,height:it.itemSizeSM,margin:0,lineHeight:`${it.itemSizeSM}px`},[`&${at}-mini:not(${at}-disabled)`]:{[`${at}-prev, ${at}-next`]:{[`&:hover ${at}-item-link`]:{backgroundColor:it.colorBgTextHover},[`&:active ${at}-item-link`]:{backgroundColor:it.colorBgTextActive},[`&${at}-disabled:hover ${at}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${at}-mini ${at}-prev ${at}-item-link,
|
|
|
&${at}-mini ${at}-next ${at}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:it.itemSizeSM,lineHeight:`${it.itemSizeSM}px`}},[`&${at}-mini ${at}-jump-prev, &${at}-mini ${at}-jump-next`]:{height:it.itemSizeSM,marginInlineEnd:0,lineHeight:`${it.itemSizeSM}px`},[`&${at}-mini ${at}-options`]:{marginInlineStart:it.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:it.miniOptionsSizeChangerTop},"&-quick-jumper":{height:it.itemSizeSM,lineHeight:`${it.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,zt.x0)(it)),{width:it.paginationMiniQuickJumperInputWidth,height:it.controlHeightSM})}}}},Lt=it=>{const{componentCls:at}=it;return{[`
|
|
|
&${at}-simple ${at}-prev,
|
|
|
&${at}-simple ${at}-next
|
|
|
`]:{height:it.itemSizeSM,lineHeight:`${it.itemSizeSM}px`,verticalAlign:"top",[`${at}-item-link`]:{height:it.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:it.colorBgTextHover},"&:active":{backgroundColor:it.colorBgTextActive},"&::after":{height:it.itemSizeSM,lineHeight:`${it.itemSizeSM}px`}}},[`&${at}-simple ${at}-simple-pager`]:{display:"inline-block",height:it.itemSizeSM,marginInlineEnd:it.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:it.marginXS,padding:`0 ${it.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:it.itemInputBg,border:`${it.lineWidth}px ${it.lineType} ${it.colorBorder}`,borderRadius:it.borderRadius,outline:"none",transition:`border-color ${it.motionDurationMid}`,color:"inherit","&:hover":{borderColor:it.colorPrimary},"&:focus":{borderColor:it.colorPrimaryHover,boxShadow:`${it.inputOutlineOffset}px 0 ${it.controlOutlineWidth}px ${it.controlOutline}`},"&[disabled]":{color:it.colorTextDisabled,backgroundColor:it.colorBgContainerDisabled,borderColor:it.colorBorder,cursor:"not-allowed"}}}}},ti=it=>{const{componentCls:at}=it;return{[`${at}-jump-prev, ${at}-jump-next`]:{outline:0,[`${at}-item-container`]:{position:"relative",[`${at}-item-link-icon`]:{color:it.colorPrimary,fontSize:it.fontSizeSM,opacity:0,transition:`all ${it.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${at}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:it.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:it.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:it.paginationEllipsisTextIndent,opacity:1,transition:`all ${it.motionDurationMid}`}},"&:hover":{[`${at}-item-link-icon`]:{opacity:1},[`${at}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${at}-prev,
|
|
|
${at}-jump-prev,
|
|
|
${at}-jump-next
|
|
|
`]:{marginInlineEnd:it.marginXS},[`
|
|
|
${at}-prev,
|
|
|
${at}-next,
|
|
|
${at}-jump-prev,
|
|
|
${at}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:it.itemSize,height:it.itemSize,color:it.colorText,fontFamily:it.fontFamily,lineHeight:`${it.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:it.borderRadius,cursor:"pointer",transition:`all ${it.motionDurationMid}`},[`${at}-prev, ${at}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:it.colorText,cursor:"pointer",userSelect:"none"},[`${at}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:it.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${it.lineWidth}px ${it.lineType} transparent`,borderRadius:it.borderRadius,outline:"none",transition:`all ${it.motionDurationMid}`},[`&:hover ${at}-item-link`]:{backgroundColor:it.colorBgTextHover},[`&:active ${at}-item-link`]:{backgroundColor:it.colorBgTextActive},[`&${at}-disabled:hover`]:{[`${at}-item-link`]:{backgroundColor:"transparent"}}},[`${at}-slash`]:{marginInlineEnd:it.paginationSlashMarginInlineEnd,marginInlineStart:it.paginationSlashMarginInlineStart},[`${at}-options`]:{display:"inline-block",marginInlineStart:it.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:it.controlHeight,marginInlineStart:it.marginXS,lineHeight:`${it.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,zt.ik)(it)),{width:it.controlHeightLG*1.25,height:it.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:it.marginXS,marginInlineEnd:it.marginXS})}}}},gi=it=>{const{componentCls:at}=it;return{[`${at}-item`]:{display:"inline-block",minWidth:it.itemSize,height:it.itemSize,marginInlineEnd:it.marginXS,fontFamily:it.fontFamily,lineHeight:`${it.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${it.lineWidth}px ${it.lineType} transparent`,borderRadius:it.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${it.paginationItemPaddingInline}px`,color:it.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${at}-item-active)`]:{"&:hover":{transition:`all ${it.motionDurationMid}`,backgroundColor:it.colorBgTextHover},"&:active":{backgroundColor:it.colorBgTextActive}},"&-active":{fontWeight:it.fontWeightStrong,backgroundColor:it.itemActiveBg,borderColor:it.colorPrimary,a:{color:it.colorPrimary},"&:hover":{borderColor:it.colorPrimaryHover},"&:hover a":{color:it.colorPrimaryHover}}}}},Pn=it=>{const{componentCls:at}=it;return{[at]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,rn.Wf)(it)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${at}-total-text`]:{display:"inline-block",height:it.itemSize,marginInlineEnd:it.marginXS,lineHeight:`${it.itemSize-2}px`,verticalAlign:"middle"}}),gi(it)),ti(it)),Lt(it)),sn(it)),yn(it)),{[`@media only screen and (max-width: ${it.screenLG}px)`]:{[`${at}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${it.screenSM}px)`]:{[`${at}-options`]:{display:"none"}}}),[`&${it.componentCls}-rtl`]:{direction:"rtl"}}},Xt=it=>{const{componentCls:at}=it;return{[`${at}${at}-disabled:not(${at}-mini)`]:{"&, &:hover":{[`${at}-item-link`]:{borderColor:it.colorBorder}},"&:focus-visible":{[`${at}-item-link`]:{borderColor:it.colorBorder}},[`${at}-item, ${at}-item-link`]:{backgroundColor:it.colorBgContainerDisabled,borderColor:it.colorBorder,[`&:hover:not(${at}-item-active)`]:{backgroundColor:it.colorBgContainerDisabled,borderColor:it.colorBorder,a:{color:it.colorTextDisabled}},[`&${at}-item-active`]:{backgroundColor:it.itemActiveBgDisabled}},[`${at}-prev, ${at}-next`]:{"&:hover button":{backgroundColor:it.colorBgContainerDisabled,borderColor:it.colorBorder,color:it.colorTextDisabled},[`${at}-item-link`]:{backgroundColor:it.colorBgContainerDisabled,borderColor:it.colorBorder}}},[`${at}:not(${at}-mini)`]:{[`${at}-prev, ${at}-next`]:{"&:hover button":{borderColor:it.colorPrimaryHover,backgroundColor:it.itemBg},[`${at}-item-link`]:{backgroundColor:it.itemLinkBg,borderColor:it.colorBorder},[`&:hover ${at}-item-link`]:{borderColor:it.colorPrimary,backgroundColor:it.itemBg,color:it.colorPrimary},[`&${at}-disabled`]:{[`${at}-item-link`]:{borderColor:it.colorBorder,color:it.colorTextDisabled}}},[`${at}-item`]:{backgroundColor:it.itemBg,border:`${it.lineWidth}px ${it.lineType} ${it.colorBorder}`,[`&:hover:not(${at}-item-active)`]:{borderColor:it.colorPrimary,backgroundColor:it.itemBg,a:{color:it.colorPrimary}},"&-active":{borderColor:it.colorPrimary}}}}},Kt=it=>{const{componentCls:at}=it;return{[`${at}:not(${at}-disabled)`]:{[`${at}-item`]:Object.assign({},(0,rn.Qy)(it)),[`${at}-jump-prev, ${at}-jump-next`]:{"&:focus-visible":Object.assign({[`${at}-item-link-icon`]:{opacity:1},[`${at}-item-ellipsis`]:{opacity:0}},(0,rn.oN)(it))},[`${at}-prev, ${at}-next`]:{[`&:focus-visible ${at}-item-link`]:Object.assign({},(0,rn.oN)(it))}}}};var Ot=(0,xn.Z)("Pagination",it=>{const at=(0,Un.TS)(it,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:it.marginXXS/2,paginationMiniQuickJumperInputWidth:it.controlHeightLG*1.1,paginationItemPaddingInline:it.marginXXS*1.5,paginationEllipsisLetterSpacing:it.marginXXS/2,paginationSlashMarginInlineStart:it.marginXXS,paginationSlashMarginInlineEnd:it.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,zt.e5)(it),(0,zt.TM)(it));return[Pn(at),Kt(at),it.wireframe&&Xt(at)]},it=>({itemBg:it.colorBgContainer,itemSize:it.controlHeight,itemSizeSM:it.controlHeightSM,itemActiveBg:it.colorBgContainer,itemLinkBg:it.colorBgContainer,itemActiveColorDisabled:it.colorTextDisabled,itemActiveBgDisabled:it.controlItemBgActiveDisabled,itemInputBg:it.colorBgContainer,miniOptionsSizeChangerTop:0})),rt=function(it,at){var Te={};for(var Pe in it)Object.prototype.hasOwnProperty.call(it,Pe)&&at.indexOf(Pe)<0&&(Te[Pe]=it[Pe]);if(it!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ye=0,Pe=Object.getOwnPropertySymbols(it);ye<Pe.length;ye++)at.indexOf(Pe[ye])<0&&Object.prototype.propertyIsEnumerable.call(it,Pe[ye])&&(Te[Pe[ye]]=it[Pe[ye]]);return Te},$t=it=>{const{prefixCls:at,selectPrefixCls:Te,className:Pe,rootClassName:ye,style:ke,size:$e,locale:Le,selectComponentClass:vt,responsive:an,showSizeChanger:bn}=it,en=rt(it,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:wn}=(0,qe.Z)(an),{getPrefixCls:ai,direction:_n,pagination:Hn={}}=Re.useContext(Ut.E_),wi=ai("pagination",at),[Hi,_i]=Ot(wi),cr=bn!=null?bn:Hn.showSizeChanger,_r=Re.useMemo(()=>{const Be=Re.createElement("span",{className:`${wi}-item-ellipsis`},"\u2022\u2022\u2022"),Xr=Re.createElement("button",{className:`${wi}-item-link`,type:"button",tabIndex:-1},_n==="rtl"?Re.createElement(st.Z,null):Re.createElement(Ye.Z,null)),Hr=Re.createElement("button",{className:`${wi}-item-link`,type:"button",tabIndex:-1},_n==="rtl"?Re.createElement(Ye.Z,null):Re.createElement(st.Z,null)),jn=Re.createElement("a",{className:`${wi}-item-link`},Re.createElement("div",{className:`${wi}-item-container`},_n==="rtl"?Re.createElement(Ct.Z,{className:`${wi}-item-link-icon`}):Re.createElement(Mt,{className:`${wi}-item-link-icon`}),Be)),Li=Re.createElement("a",{className:`${wi}-item-link`},Re.createElement("div",{className:`${wi}-item-container`},_n==="rtl"?Re.createElement(Mt,{className:`${wi}-item-link-icon`}):Re.createElement(Ct.Z,{className:`${wi}-item-link-icon`}),Be));return{prevIcon:Xr,nextIcon:Hr,jumpPrevIcon:jn,jumpNextIcon:Li}},[_n,wi]),[vi]=(0,Ke.Z)("Pagination",Bt.Z),si=Object.assign(Object.assign({},vi),Le),fi=(0,Nt.Z)($e),Ui=fi==="small"||!!(wn&&!fi&&an),Fi=ai("select",Te),ao=wt()({[`${wi}-mini`]:Ui,[`${wi}-rtl`]:_n==="rtl"},Hn==null?void 0:Hn.className,Pe,ye,_i),wr=Object.assign(Object.assign({},Hn==null?void 0:Hn.style),ke);return Hi(Re.createElement(xt,Object.assign({},_r,en,{style:wr,prefixCls:wi,selectPrefixCls:Fi,className:ao,selectComponentClass:vt||(Ui?Ln:Mn),locale:si,showSizeChanger:cr})))},Gt=$t},39722:function(zn,En,me){"use strict";me.d(En,{t5:function(){return Ye}});var ue=me(92310),Re=me.n(ue),Ze=me(55477),ot=me(59301),We=me(36355),lt=me(77578),Me=me(17356),Mt=function(pt,wt){var Ie={};for(var te in pt)Object.prototype.hasOwnProperty.call(pt,te)&&wt.indexOf(te)<0&&(Ie[te]=pt[te]);if(pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,te=Object.getOwnPropertySymbols(pt);ee<te.length;ee++)wt.indexOf(te[ee])<0&&Object.prototype.propertyIsEnumerable.call(pt,te[ee])&&(Ie[te[ee]]=pt[te[ee]]);return Ie};const Ct=(pt,wt,Ie)=>{if(!(!wt&&!Ie))return ot.createElement(ot.Fragment,null,wt&&ot.createElement("div",{className:`${pt}-title`},(0,lt.Z)(wt)),ot.createElement("div",{className:`${pt}-inner-content`},(0,lt.Z)(Ie)))},Ye=pt=>{const{hashId:wt,prefixCls:Ie,className:te,style:ee,placement:de="top",title:se,content:he,children:ve}=pt;return ot.createElement("div",{className:Re()(wt,Ie,`${Ie}-pure`,`${Ie}-placement-${de}`,te),style:ee},ot.createElement("div",{className:`${Ie}-arrow`}),ot.createElement(Ze.G,Object.assign({},pt,{className:wt,prefixCls:Ie}),ve||Ct(Ie,se,he)))},st=pt=>{const{prefixCls:wt}=pt,Ie=Mt(pt,["prefixCls"]),{getPrefixCls:te}=ot.useContext(We.E_),ee=te("popover",wt),[de,se]=(0,Me.Z)(ee);return de(ot.createElement(Ye,Object.assign({},Ie,{prefixCls:ee,hashId:se})))};En.ZP=st},60324:function(zn,En,me){"use strict";var ue=me(92310),Re=me.n(ue),Ze=me(59301),ot=me(77578),We=me(62892),lt=me(36355),Me=me(6848),Mt=me(39722),Ct=me(17356),Ye=function(wt,Ie){var te={};for(var ee in wt)Object.prototype.hasOwnProperty.call(wt,ee)&&Ie.indexOf(ee)<0&&(te[ee]=wt[ee]);if(wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var de=0,ee=Object.getOwnPropertySymbols(wt);de<ee.length;de++)Ie.indexOf(ee[de])<0&&Object.prototype.propertyIsEnumerable.call(wt,ee[de])&&(te[ee[de]]=wt[ee[de]]);return te};const st=wt=>{let{title:Ie,content:te,prefixCls:ee}=wt;return Ze.createElement(Ze.Fragment,null,Ie&&Ze.createElement("div",{className:`${ee}-title`},(0,ot.Z)(Ie)),Ze.createElement("div",{className:`${ee}-inner-content`},(0,ot.Z)(te)))},pt=Ze.forwardRef((wt,Ie)=>{const{prefixCls:te,title:ee,content:de,overlayClassName:se,placement:he="top",trigger:ve="hover",mouseEnterDelay:be=.1,mouseLeaveDelay:Ne=.1,overlayStyle:Fe={}}=wt,je=Ye(wt,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:ze}=Ze.useContext(lt.E_),Xe=ze("popover",te),[Je,dt]=(0,Ct.Z)(Xe),He=ze(),bt=Re()(se,dt);return Je(Ze.createElement(Me.Z,Object.assign({placement:he,trigger:ve,mouseEnterDelay:be,mouseLeaveDelay:Ne,overlayStyle:Fe},je,{prefixCls:Xe,overlayClassName:bt,ref:Ie,overlay:ee||de?Ze.createElement(st,{prefixCls:Xe,title:ee,content:de}):null,transitionName:(0,We.m)(He,"zoom-big",je.transitionName),"data-popover-inject":!0})))});pt._InternalPanelDoNotUseOrYouWillBeFired=Mt.ZP,En.Z=pt},17356:function(zn,En,me){"use strict";var ue=me(17313),Re=me(29878),Ze=me(19447),ot=me(33166),We=me(83116),lt=me(37613);const Me=Ye=>{const{componentCls:st,popoverColor:pt,minWidth:wt,fontWeightStrong:Ie,popoverPadding:te,boxShadowSecondary:ee,colorTextHeading:de,borderRadiusLG:se,zIndexPopup:he,marginXS:ve,colorBgElevated:be,popoverBg:Ne}=Ye;return[{[st]:Object.assign(Object.assign({},(0,ue.Wf)(Ye)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:he,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":be,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${st}-content`]:{position:"relative"},[`${st}-inner`]:{backgroundColor:Ne,backgroundClip:"padding-box",borderRadius:se,boxShadow:ee,padding:te},[`${st}-title`]:{minWidth:wt,marginBottom:ve,color:de,fontWeight:Ie},[`${st}-inner-content`]:{color:pt}})},(0,Ze.ZP)(Ye,{colorBg:"var(--antd-arrow-background-color)"}),{[`${st}-pure`]:{position:"relative",maxWidth:"none",margin:Ye.sizePopupArrow,display:"inline-block",[`${st}-content`]:{display:"inline-block"}}}]},Mt=Ye=>{const{componentCls:st}=Ye;return{[st]:ot.i.map(pt=>{const wt=Ye[`${pt}6`];return{[`&${st}-${pt}`]:{"--antd-arrow-background-color":wt,[`${st}-inner`]:{backgroundColor:wt},[`${st}-arrow`]:{background:"transparent"}}}})}},Ct=Ye=>{const{componentCls:st,lineWidth:pt,lineType:wt,colorSplit:Ie,paddingSM:te,controlHeight:ee,fontSize:de,lineHeight:se,padding:he}=Ye,ve=ee-Math.round(de*se),be=ve/2,Ne=ve/2-pt,Fe=he;return{[st]:{[`${st}-inner`]:{padding:0},[`${st}-title`]:{margin:0,padding:`${be}px ${Fe}px ${Ne}px`,borderBottom:`${pt}px ${wt} ${Ie}`},[`${st}-inner-content`]:{padding:`${te}px ${Fe}px`}}}};En.Z=(0,We.Z)("Popover",Ye=>{const{colorBgElevated:st,colorText:pt,wireframe:wt}=Ye,Ie=(0,lt.TS)(Ye,{popoverPadding:12,popoverBg:st,popoverColor:pt});return[Me(Ie),Mt(Ie),wt&&Ct(Ie),(0,Re._y)(Ie,"zoom-big")]},Ye=>({width:177,minWidth:177,zIndexPopup:Ye.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},39978:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Ke}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"},ot=Ze,We=me(88853),lt=function(Ln,Mn){return Re.createElement(We.Z,(0,ue.Z)({},Ln,{ref:Mn,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me,Ct=me(92310),Ye=me.n(Ct),st=me(80962),pt=me(29043),wt=me(19149),Ie=me(35788),te=me(85108),ee=me(36994);function de(Tt,Ln){var Mn=Tt.disabled,zt=Tt.prefixCls,rn=Tt.character,xn=Tt.characterRender,Un=Tt.index,yn=Tt.count,sn=Tt.value,Lt=Tt.allowHalf,ti=Tt.focused,gi=Tt.onHover,Pn=Tt.onClick,Xt=function(at){gi(at,Un)},Kt=function(at){Pn(at,Un)},Ot=function(at){at.keyCode===te.Z.ENTER&&Pn(at,Un)},rt=Un+1,Ue=new Set([zt]);sn===0&&Un===0&&ti?Ue.add("".concat(zt,"-focused")):Lt&&sn+.5>=rt&&sn<rt?(Ue.add("".concat(zt,"-half")),Ue.add("".concat(zt,"-active")),ti&&Ue.add("".concat(zt,"-focused"))):(rt<=sn?Ue.add("".concat(zt,"-full")):Ue.add("".concat(zt,"-zero")),rt===sn&&ti&&Ue.add("".concat(zt,"-focused")));var $t=typeof rn=="function"?rn(Tt):rn,Gt=Re.createElement("li",{className:Ye()(Array.from(Ue)),ref:Ln},Re.createElement("div",{onClick:Mn?null:Kt,onKeyDown:Mn?null:Ot,onMouseMove:Mn?null:Xt,role:"radio","aria-checked":sn>Un?"true":"false","aria-posinset":Un+1,"aria-setsize":yn,tabIndex:Mn?-1:0},Re.createElement("div",{className:"".concat(zt,"-first")},$t),Re.createElement("div",{className:"".concat(zt,"-second")},$t)));return xn&&(Gt=xn(Gt,Tt)),Gt}var se=Re.forwardRef(de);function he(){var Tt=Re.useRef({});function Ln(zt){return Tt.current[zt]}function Mn(zt){return function(rn){Tt.current[zt]=rn}}return[Ln,Mn]}function ve(Tt){var Ln=Tt.pageXOffset,Mn="scrollLeft";if(typeof Ln!="number"){var zt=Tt.document;Ln=zt.documentElement[Mn],typeof Ln!="number"&&(Ln=zt.body[Mn])}return Ln}function be(Tt){var Ln,Mn,zt=Tt.ownerDocument,rn=zt.body,xn=zt&&zt.documentElement,Un=Tt.getBoundingClientRect();return Ln=Un.left,Mn=Un.top,Ln-=xn.clientLeft||rn.clientLeft||0,Mn-=xn.clientTop||rn.clientTop||0,{left:Ln,top:Mn}}function Ne(Tt){var Ln=be(Tt),Mn=Tt.ownerDocument,zt=Mn.defaultView||Mn.parentWindow;return Ln.left+=ve(zt),Ln.left}var Fe=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function je(Tt,Ln){var Mn,zt=Tt.prefixCls,rn=zt===void 0?"rc-rate":zt,xn=Tt.className,Un=Tt.defaultValue,yn=Tt.value,sn=Tt.count,Lt=sn===void 0?5:sn,ti=Tt.allowHalf,gi=ti===void 0?!1:ti,Pn=Tt.allowClear,Xt=Pn===void 0?!0:Pn,Kt=Tt.character,Ot=Kt===void 0?"\u2605":Kt,rt=Tt.characterRender,Ue=Tt.disabled,$t=Tt.direction,Gt=$t===void 0?"ltr":$t,it=Tt.tabIndex,at=it===void 0?0:it,Te=Tt.autoFocus,Pe=Tt.onHoverChange,ye=Tt.onChange,ke=Tt.onFocus,$e=Tt.onBlur,Le=Tt.onKeyDown,vt=Tt.onMouseLeave,an=(0,wt.Z)(Tt,Fe),bn=he(),en=(0,pt.Z)(bn,2),wn=en[0],ai=en[1],_n=Re.useRef(null),Hn=function(){if(!Ue){var nt;(nt=_n.current)===null||nt===void 0||nt.focus()}};Re.useImperativeHandle(Ln,function(){return{focus:Hn,blur:function(){if(!Ue){var nt;(nt=_n.current)===null||nt===void 0||nt.blur()}}}});var wi=(0,Ie.Z)(Un||0,{value:yn}),Hi=(0,pt.Z)(wi,2),_i=Hi[0],cr=Hi[1],_r=(0,Ie.Z)(null),vi=(0,pt.Z)(_r,2),si=vi[0],fi=vi[1],Ui=function(nt,on){var fn=Gt==="rtl",Jn=nt+1;if(gi){var pn=wn(nt),Rt=Ne(pn),In=pn.clientWidth;(fn&&on-Rt>In/2||!fn&&on-Rt<In/2)&&(Jn-=.5)}return Jn},Fi=function(nt){cr(nt),ye==null||ye(nt)},ao=Re.useState(!1),wr=(0,pt.Z)(ao,2),Be=wr[0],Xr=wr[1],Hr=function(){Xr(!0),ke==null||ke()},jn=function(){Xr(!1),$e==null||$e()},Li=Re.useState(null),Wi=(0,pt.Z)(Li,2),ji=Wi[0],Gn=Wi[1],Ht=function(nt,on){var fn=Ui(on,nt.pageX);fn!==si&&(Gn(fn),fi(null)),Pe==null||Pe(fn)},Wt=function(nt){Ue||(Gn(null),fi(null),Pe==null||Pe(void 0)),nt&&(vt==null||vt(nt))},Zt=function(nt,on){var fn=Ui(on,nt.pageX),Jn=!1;Xt&&(Jn=fn===_i),Wt(),Fi(Jn?0:fn),fi(Jn?fn:null)},yt=function(nt){var on=nt.keyCode,fn=Gt==="rtl",Jn=_i;on===te.Z.RIGHT&&Jn<Lt&&!fn?(gi?Jn+=.5:Jn+=1,Fi(Jn),nt.preventDefault()):on===te.Z.LEFT&&Jn>0&&!fn||on===te.Z.RIGHT&&Jn>0&&fn?(gi?Jn-=.5:Jn-=1,Fi(Jn),nt.preventDefault()):on===te.Z.LEFT&&Jn<Lt&&fn&&(gi?Jn+=.5:Jn+=1,Fi(Jn),nt.preventDefault()),Le==null||Le(nt)};Re.useEffect(function(){Te&&!Ue&&Hn()},[]);var un=new Array(Lt).fill(0).map(function(At,nt){return Re.createElement(se,{ref:ai(nt),index:nt,count:Lt,disabled:Ue,prefixCls:"".concat(rn,"-star"),allowHalf:gi,value:ji===null?_i:ji,onClick:Zt,onHover:Ht,key:At||nt,character:Ot,characterRender:rt,focused:Be})}),vn=Ye()(rn,xn,(Mn={},(0,st.Z)(Mn,"".concat(rn,"-disabled"),Ue),(0,st.Z)(Mn,"".concat(rn,"-rtl"),Gt==="rtl"),Mn));return Re.createElement("ul",(0,ue.Z)({className:vn,onMouseLeave:Wt,tabIndex:Ue?-1:at,onFocus:Ue?null:Hr,onBlur:Ue?null:jn,onKeyDown:Ue?null:yt,ref:_n,role:"radiogroup"},(0,ee.Z)(an,{aria:!0,data:!0,attr:!0})),un)}var ze=Re.forwardRef(je),Xe=ze,Je=me(36355),dt=me(6848),He=me(17313),bt=me(83116),et=me(37613);const It=Tt=>{const{componentCls:Ln}=Tt;return{[`${Ln}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:Tt.marginXS},"> div":{transition:`all ${Tt.motionDurationMid}, outline 0s`,"&:hover":{transform:Tt.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${Tt.lineWidth}px dashed ${Tt.starColor}`,transform:Tt.starHoverScale}},"&-first, &-second":{color:Tt.starBg,transition:`all ${Tt.motionDurationMid}`,userSelect:"none",[Tt.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${Ln}-star-first, &-half ${Ln}-star-second`]:{opacity:1},[`&-half ${Ln}-star-first, &-full ${Ln}-star-second`]:{color:"inherit"}}}},xt=Tt=>({[`&-rtl${Tt.componentCls}`]:{direction:"rtl"}}),Bt=Tt=>{const{componentCls:Ln}=Tt;return{[Ln]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,He.Wf)(Tt)),{display:"inline-block",margin:0,padding:0,color:Tt.starColor,fontSize:Tt.starSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${Ln} ${Ln}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),It(Tt)),{[`+ ${Ln}-text`]:{display:"inline-block",marginInlineStart:Tt.marginXS,fontSize:Tt.fontSize}}),xt(Tt))}};var Ut=(0,bt.Z)("Rate",Tt=>{const Ln=(0,et.TS)(Tt,{});return[Bt(Ln)]},Tt=>({starColor:Tt.yellow6,starSize:Tt.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:Tt.colorFillContent})),Nt=function(Tt,Ln){var Mn={};for(var zt in Tt)Object.prototype.hasOwnProperty.call(Tt,zt)&&Ln.indexOf(zt)<0&&(Mn[zt]=Tt[zt]);if(Tt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rn=0,zt=Object.getOwnPropertySymbols(Tt);rn<zt.length;rn++)Ln.indexOf(zt[rn])<0&&Object.prototype.propertyIsEnumerable.call(Tt,zt[rn])&&(Mn[zt[rn]]=Tt[zt[rn]]);return Mn},Ke=Re.forwardRef((Tt,Ln)=>{const{prefixCls:Mn,className:zt,rootClassName:rn,style:xn,tooltips:Un,character:yn=Re.createElement(Mt,null)}=Tt,sn=Nt(Tt,["prefixCls","className","rootClassName","style","tooltips","character"]),Lt=(Ue,$t)=>{let{index:Gt}=$t;return Un?Re.createElement(dt.Z,{title:Un[Gt]},Ue):Ue},{getPrefixCls:ti,direction:gi,rate:Pn}=Re.useContext(Je.E_),Xt=ti("rate",Mn),[Kt,Ot]=Ut(Xt),rt=Object.assign(Object.assign({},Pn==null?void 0:Pn.style),xn);return Kt(Re.createElement(Xe,Object.assign({ref:Ln,character:yn,characterRender:Lt},sn,{className:Ye()(zt,rn,Ot,Pn==null?void 0:Pn.className),style:rt,prefixCls:Xt,direction:gi})))})},57809:function(zn,En,me){"use strict";var ue=me(92310),Re=me.n(ue),Ze=me(77861),ot=me(64002),We=me(59301),lt=me(53487),Me=me(62892),Mt=me(19080),Ct=me(36355),Ye=me(1684),st=me(93891),pt=me(19716),wt=me(32441),Ie=me(33234),te=me(14154),ee=me(58582),de=me(84443),se=me(66339),he=function(je,ze){var Xe={};for(var Je in je)Object.prototype.hasOwnProperty.call(je,Je)&&ze.indexOf(Je)<0&&(Xe[Je]=je[Je]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var dt=0,Je=Object.getOwnPropertySymbols(je);dt<Je.length;dt++)ze.indexOf(Je[dt])<0&&Object.prototype.propertyIsEnumerable.call(je,Je[dt])&&(Xe[Je[dt]]=je[Je[dt]]);return Xe};const ve="SECRET_COMBOBOX_MODE_DO_NOT_USE",be=(je,ze)=>{var Xe,{prefixCls:Je,bordered:dt=!0,className:He,rootClassName:bt,getPopupContainer:et,popupClassName:It,dropdownClassName:xt,listHeight:Bt=256,placement:Ut,listItemHeight:Nt=24,size:qe,disabled:Ke,notFoundContent:Tt,status:Ln,builtinPlacements:Mn,dropdownMatchSelectWidth:zt,popupMatchSelectWidth:rn,direction:xn,style:Un,allowClear:yn}=je,sn=he(je,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Lt,getPrefixCls:ti,renderEmpty:gi,direction:Pn,virtual:Xt,popupMatchSelectWidth:Kt,popupOverflow:Ot,select:rt}=We.useContext(Ct.E_),Ue=ti("select",Je),$t=ti(),Gt=xn!=null?xn:Pn,{compactSize:it,compactItemClassnames:at}=(0,Ie.ri)(Ue,Gt),[Te,Pe]=(0,te.Z)(Ue),ye=We.useMemo(()=>{const{mode:wr}=sn;if(wr!=="combobox")return wr===ve?"combobox":wr},[sn.mode]),ke=ye==="multiple"||ye==="tags",$e=(0,de.Z)(sn.suffixIcon,sn.showArrow),Le=(Xe=rn!=null?rn:zt)!==null&&Xe!==void 0?Xe:Kt,{status:vt,hasFeedback:an,isFormItemInput:bn,feedbackIcon:en}=We.useContext(wt.aM),wn=(0,Mt.F)(vt,Ln);let ai;Tt!==void 0?ai=Tt:ye==="combobox"?ai=null:ai=(gi==null?void 0:gi("Select"))||We.createElement(st.Z,{componentName:"Select"});const{suffixIcon:_n,itemIcon:Hn,removeIcon:wi,clearIcon:Hi}=(0,se.Z)(Object.assign(Object.assign({},sn),{multiple:ke,hasFeedback:an,feedbackIcon:en,showSuffixIcon:$e,prefixCls:Ue,showArrow:sn.showArrow,componentName:"Select"})),_i=yn===!0?{clearIcon:Hi}:yn,cr=(0,ot.Z)(sn,["suffixIcon","itemIcon"]),_r=Re()(It||xt,{[`${Ue}-dropdown-${Gt}`]:Gt==="rtl"},bt,Pe),vi=(0,pt.Z)(wr=>{var Be;return(Be=qe!=null?qe:it)!==null&&Be!==void 0?Be:wr}),si=We.useContext(Ye.Z),fi=Ke!=null?Ke:si,Ui=Re()({[`${Ue}-lg`]:vi==="large",[`${Ue}-sm`]:vi==="small",[`${Ue}-rtl`]:Gt==="rtl",[`${Ue}-borderless`]:!dt,[`${Ue}-in-form-item`]:bn},(0,Mt.Z)(Ue,wn,an),at,rt==null?void 0:rt.className,He,bt,Pe),Fi=We.useMemo(()=>Ut!==void 0?Ut:Gt==="rtl"?"bottomRight":"bottomLeft",[Ut,Gt]),ao=(0,ee.Z)(Mn,Ot);return Te(We.createElement(Ze.ZP,Object.assign({ref:ze,virtual:Xt,showSearch:rt==null?void 0:rt.showSearch},cr,{style:Object.assign(Object.assign({},rt==null?void 0:rt.style),Un),dropdownMatchSelectWidth:Le,builtinPlacements:ao,transitionName:(0,Me.m)($t,"slide-up",sn.transitionName),listHeight:Bt,listItemHeight:Nt,mode:ye,prefixCls:Ue,placement:Fi,direction:Gt,suffixIcon:_n,menuItemSelectedIcon:Hn,removeIcon:wi,allowClear:_i,notFoundContent:ai,className:Ui,getPopupContainer:et||Lt,dropdownClassName:_r,disabled:fi})))},Ne=We.forwardRef(be),Fe=(0,lt.Z)(Ne);Ne.SECRET_COMBOBOX_MODE_DO_NOT_USE=ve,Ne.Option=Ze.Wx,Ne.OptGroup=Ze.Xo,Ne._InternalPanelDoNotUseOrYouWillBeFired=Fe,En.default=Ne},14154:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Ne}});var ue=me(17313),Re=me(74207),Ze=me(37613),ot=me(83116),We=me(13826),lt=me(92899);const Me=Fe=>{const{optionHeight:je,optionFontSize:ze,optionLineHeight:Xe,optionPadding:Je}=Fe;return{position:"relative",display:"block",minHeight:je,padding:Je,color:Fe.colorText,fontWeight:"normal",fontSize:ze,lineHeight:Xe,boxSizing:"border-box"}};var Ct=Fe=>{const{antCls:je,componentCls:ze}=Fe,Xe=`${ze}-item`,Je=`&${je}-slide-up-enter${je}-slide-up-enter-active`,dt=`&${je}-slide-up-appear${je}-slide-up-appear-active`,He=`&${je}-slide-up-leave${je}-slide-up-leave-active`,bt=`${ze}-dropdown-placement-`;return[{[`${ze}-dropdown`]:Object.assign(Object.assign({},(0,ue.Wf)(Fe)),{position:"absolute",top:-9999,zIndex:Fe.zIndexPopup,boxSizing:"border-box",padding:Fe.paddingXXS,overflow:"hidden",fontSize:Fe.fontSize,fontVariant:"initial",backgroundColor:Fe.colorBgElevated,borderRadius:Fe.borderRadiusLG,outline:"none",boxShadow:Fe.boxShadowSecondary,[`
|
|
|
${Je}${bt}bottomLeft,
|
|
|
${dt}${bt}bottomLeft
|
|
|
`]:{animationName:We.fJ},[`
|
|
|
${Je}${bt}topLeft,
|
|
|
${dt}${bt}topLeft,
|
|
|
${Je}${bt}topRight,
|
|
|
${dt}${bt}topRight
|
|
|
`]:{animationName:We.Qt},[`${He}${bt}bottomLeft`]:{animationName:We.Uw},[`
|
|
|
${He}${bt}topLeft,
|
|
|
${He}${bt}topRight
|
|
|
`]:{animationName:We.ly},"&-hidden":{display:"none"},[`${Xe}`]:Object.assign(Object.assign({},Me(Fe)),{cursor:"pointer",transition:`background ${Fe.motionDurationSlow} ease`,borderRadius:Fe.borderRadiusSM,"&-group":{color:Fe.colorTextDescription,fontSize:Fe.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},ue.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Xe}-option-disabled)`]:{backgroundColor:Fe.optionActiveBg},[`&-selected:not(${Xe}-option-disabled)`]:{color:Fe.optionSelectedColor,fontWeight:Fe.optionSelectedFontWeight,backgroundColor:Fe.optionSelectedBg,[`${Xe}-option-state`]:{color:Fe.colorPrimary}},"&-disabled":{[`&${Xe}-option-selected`]:{backgroundColor:Fe.colorBgContainerDisabled},color:Fe.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Fe.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,We.oN)(Fe,"slide-up"),(0,We.oN)(Fe,"slide-down"),(0,lt.Fm)(Fe,"move-up"),(0,lt.Fm)(Fe,"move-down")]};const Ye=2,st=Fe=>{let{controlHeightSM:je,controlHeight:ze,lineWidth:Xe}=Fe;const Je=(ze-je)/2-Xe,dt=Math.ceil(Je/2);return[Je,dt]};function pt(Fe,je){const{componentCls:ze,iconCls:Xe}=Fe,Je=`${ze}-selection-overflow`,dt=Fe.multipleSelectItemHeight,[He]=st(Fe),bt=je?`${ze}-${je}`:"";return{[`${ze}-multiple${bt}`]:{fontSize:Fe.fontSize,[Je]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${ze}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${He-Ye}px ${Ye*2}px`,borderRadius:Fe.borderRadius,[`${ze}-show-search&`]:{cursor:"text"},[`${ze}-disabled&`]:{background:Fe.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Ye}px 0`,lineHeight:`${dt}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${ze}-show-arrow ${ze}-selector,
|
|
|
&${ze}-allow-clear ${ze}-selector
|
|
|
`]:{paddingInlineEnd:Fe.fontSizeIcon+Fe.controlPaddingHorizontal},[`${ze}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:dt,marginTop:Ye,marginBottom:Ye,lineHeight:`${dt-Fe.lineWidth*2}px`,background:Fe.multipleItemBg,border:`${Fe.lineWidth}px ${Fe.lineType} ${Fe.multipleItemBorderColor}`,borderRadius:Fe.borderRadiusSM,cursor:"default",transition:`font-size ${Fe.motionDurationSlow}, line-height ${Fe.motionDurationSlow}, height ${Fe.motionDurationSlow}`,userSelect:"none",marginInlineEnd:Ye*2,paddingInlineStart:Fe.paddingXS,paddingInlineEnd:Fe.paddingXS/2,[`${ze}-disabled&`]:{color:Fe.multipleItemColorDisabled,borderColor:Fe.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Fe.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,ue.Ro)()),{display:"inline-flex",alignItems:"center",color:Fe.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${Xe}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Fe.colorIconHover}})},[`${Je}-item + ${Je}-item`]:{[`${ze}-selection-search`]:{marginInlineStart:0}},[`${ze}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Fe.inputPaddingHorizontalBase-He,"\n &-input,\n &-mirror\n ":{height:dt,fontFamily:Fe.fontFamily,lineHeight:`${dt}px`,transition:`all ${Fe.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${ze}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Fe.inputPaddingHorizontalBase,insetInlineEnd:Fe.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Fe.motionDurationSlow}`}}}}var Ie=Fe=>{const{componentCls:je}=Fe,ze=(0,Ze.TS)(Fe,{controlHeight:Fe.controlHeightSM,multipleSelectItemHeight:Fe.controlHeightXS,borderRadius:Fe.borderRadiusSM,borderRadiusSM:Fe.borderRadiusXS}),Xe=(0,Ze.TS)(Fe,{fontSize:Fe.fontSizeLG,controlHeight:Fe.controlHeightLG,multipleSelectItemHeight:Fe.multipleItemHeightLG,borderRadius:Fe.borderRadiusLG,borderRadiusSM:Fe.borderRadius}),[,Je]=st(Fe);return[pt(Fe),pt(ze,"sm"),{[`${je}-multiple${je}-sm`]:{[`${je}-selection-placeholder`]:{insetInline:Fe.controlPaddingHorizontalSM-Fe.lineWidth},[`${je}-selection-search`]:{marginInlineStart:Je}}},pt(Xe,"lg")]};function te(Fe,je){const{componentCls:ze,inputPaddingHorizontalBase:Xe,borderRadius:Je}=Fe,dt=Fe.controlHeight-Fe.lineWidth*2,He=Math.ceil(Fe.fontSize*1.25),bt=je?`${ze}-${je}`:"";return{[`${ze}-single${bt}`]:{fontSize:Fe.fontSize,[`${ze}-selector`]:Object.assign(Object.assign({},(0,ue.Wf)(Fe)),{display:"flex",borderRadius:Je,[`${ze}-selection-search`]:{position:"absolute",top:0,insetInlineStart:Xe,insetInlineEnd:Xe,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${ze}-selection-item,
|
|
|
${ze}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${dt}px`,transition:`all ${Fe.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${dt}px`}},[`${ze}-selection-item`]:{position:"relative",userSelect:"none"},[`${ze}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${ze}-selection-item:after`,`${ze}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${ze}-show-arrow ${ze}-selection-item,
|
|
|
&${ze}-show-arrow ${ze}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:He},[`&${ze}-open ${ze}-selection-item`]:{color:Fe.colorTextPlaceholder},[`&:not(${ze}-customize-input)`]:{[`${ze}-selector`]:{width:"100%",height:Fe.controlHeight,padding:`0 ${Xe}px`,[`${ze}-selection-search-input`]:{height:dt},"&:after":{lineHeight:`${dt}px`}}},[`&${ze}-customize-input`]:{[`${ze}-selector`]:{"&:after":{display:"none"},[`${ze}-selection-search`]:{position:"static",width:"100%"},[`${ze}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Xe}px`,"&:after":{display:"none"}}}}}}}function ee(Fe){const{componentCls:je}=Fe,ze=Fe.controlPaddingHorizontalSM-Fe.lineWidth;return[te(Fe),te((0,Ze.TS)(Fe,{controlHeight:Fe.controlHeightSM,borderRadius:Fe.borderRadiusSM}),"sm"),{[`${je}-single${je}-sm`]:{[`&:not(${je}-customize-input)`]:{[`${je}-selection-search`]:{insetInlineStart:ze,insetInlineEnd:ze},[`${je}-selector`]:{padding:`0 ${ze}px`},[`&${je}-show-arrow ${je}-selection-search`]:{insetInlineEnd:ze+Fe.fontSize*1.5},[`
|
|
|
&${je}-show-arrow ${je}-selection-item,
|
|
|
&${je}-show-arrow ${je}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Fe.fontSize*1.5}}}},te((0,Ze.TS)(Fe,{controlHeight:Fe.singleItemHeightLG,fontSize:Fe.fontSizeLG,borderRadius:Fe.borderRadiusLG}),"lg")]}const de=Fe=>{const{componentCls:je,selectorBg:ze}=Fe;return{position:"relative",backgroundColor:ze,border:`${Fe.lineWidth}px ${Fe.lineType} ${Fe.colorBorder}`,transition:`all ${Fe.motionDurationMid} ${Fe.motionEaseInOut}`,input:{cursor:"pointer"},[`${je}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${je}-disabled&`]:{color:Fe.colorTextDisabled,background:Fe.colorBgContainerDisabled,cursor:"not-allowed",[`${je}-multiple&`]:{background:Fe.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},se=function(Fe,je){let ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:Xe,borderHoverColor:Je,outlineColor:dt,antCls:He}=je,bt=ze?{[`${Xe}-selector`]:{borderColor:Je}}:{};return{[Fe]:{[`&:not(${Xe}-disabled):not(${Xe}-customize-input):not(${He}-pagination-size-changer)`]:Object.assign(Object.assign({},bt),{[`${Xe}-focused& ${Xe}-selector`]:{borderColor:Je,boxShadow:`0 0 0 ${je.controlOutlineWidth}px ${dt}`,outline:0},[`&:hover ${Xe}-selector`]:{borderColor:Je}})}}},he=Fe=>{const{componentCls:je}=Fe;return{[`${je}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},ve=Fe=>{const{componentCls:je,inputPaddingHorizontalBase:ze,iconCls:Xe}=Fe;return{[je]:Object.assign(Object.assign({},(0,ue.Wf)(Fe)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${je}-customize-input) ${je}-selector`]:Object.assign(Object.assign({},de(Fe)),he(Fe)),[`${je}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},ue.vS),[`${je}-selection-placeholder`]:Object.assign(Object.assign({},ue.vS),{flex:1,color:Fe.colorTextPlaceholder,pointerEvents:"none"}),[`${je}-arrow`]:Object.assign(Object.assign({},(0,ue.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:ze,height:Fe.fontSizeIcon,marginTop:-Fe.fontSizeIcon/2,color:Fe.colorTextQuaternary,fontSize:Fe.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[Xe]:{verticalAlign:"top",transition:`transform ${Fe.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${je}-suffix)`]:{pointerEvents:"auto"}},[`${je}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${je}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:ze,zIndex:1,display:"inline-block",width:Fe.fontSizeIcon,height:Fe.fontSizeIcon,marginTop:-Fe.fontSizeIcon/2,color:Fe.colorTextQuaternary,fontSize:Fe.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Fe.clearBg,cursor:"pointer",opacity:0,transition:`color ${Fe.motionDurationMid} ease, opacity ${Fe.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Fe.colorTextTertiary}},"&:hover":{[`${je}-clear`]:{opacity:1}}}),[`${je}-has-feedback`]:{[`${je}-clear`]:{insetInlineEnd:ze+Fe.fontSize+Fe.paddingXS}}}},be=Fe=>{const{componentCls:je}=Fe;return[{[je]:{[`&-borderless ${je}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${je}-in-form-item`]:{width:"100%"}}},ve(Fe),ee(Fe),Ie(Fe),Ct(Fe),{[`${je}-rtl`]:{direction:"rtl"}},se(je,(0,Ze.TS)(Fe,{borderHoverColor:Fe.colorPrimaryHover,outlineColor:Fe.controlOutline})),se(`${je}-status-error`,(0,Ze.TS)(Fe,{borderHoverColor:Fe.colorErrorHover,outlineColor:Fe.colorErrorOutline}),!0),se(`${je}-status-warning`,(0,Ze.TS)(Fe,{borderHoverColor:Fe.colorWarningHover,outlineColor:Fe.colorWarningOutline}),!0),(0,Re.c)(Fe,{borderElCls:`${je}-selector`,focusElCls:`${je}-focused`})]};var Ne=(0,ot.Z)("Select",(Fe,je)=>{let{rootPrefixCls:ze}=je;const Xe=(0,Ze.TS)(Fe,{rootPrefixCls:ze,inputPaddingHorizontalBase:Fe.paddingSM-1,multipleSelectItemHeight:Fe.multipleItemHeight});return[be(Xe)]},Fe=>{const{fontSize:je,lineHeight:ze,controlHeight:Xe,controlPaddingHorizontal:Je,zIndexPopupBase:dt,colorText:He,fontWeightStrong:bt,controlItemBgActive:et,controlItemBgHover:It,colorBgContainer:xt,colorFillSecondary:Bt,controlHeightLG:Ut,controlHeightSM:Nt,colorBgContainerDisabled:qe,colorTextDisabled:Ke}=Fe;return{zIndexPopup:dt+50,optionSelectedColor:He,optionSelectedFontWeight:bt,optionSelectedBg:et,optionActiveBg:It,optionPadding:`${(Xe-je*ze)/2}px ${Je}px`,optionFontSize:je,optionLineHeight:ze,optionHeight:Xe,selectorBg:xt,clearBg:xt,singleItemHeightLG:Ut,multipleItemBg:Bt,multipleItemBorderColor:"transparent",multipleItemHeight:Nt,multipleItemHeightLG:Xe,multipleSelectorBgDisabled:qe,multipleItemColorDisabled:Ke,multipleItemBorderColorDisabled:"transparent"}})},58582:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Re}});const ue=Ze=>{const We={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:Ze==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},We),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},We),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},We),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},We),{points:["br","tr"],offset:[0,-4]})}};function Re(Ze,ot){return Ze||ue(ot)}},84443:function(zn,En,me){"use strict";me.d(En,{Z:function(){return ue}});function ue(Re,Ze){return Ze!==void 0?Ze:Re!==null}},66339:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});var ue=me(10402),Re=me(33130),Ze=me(72119),ot=me(18290),We=me(50023),lt=me(21970),Me=me(59301);function Mt(Ct){let{suffixIcon:Ye,clearIcon:st,menuItemSelectedIcon:pt,removeIcon:wt,loading:Ie,multiple:te,hasFeedback:ee,prefixCls:de,showSuffixIcon:se,feedbackIcon:he,showArrow:ve,componentName:be}=Ct;const Ne=st!=null?st:Me.createElement(Re.Z,null),Fe=Je=>Ye===null&&!ee&&!ve?null:Me.createElement(Me.Fragment,null,se!==!1&&Je,ee&&he);let je=null;if(Ye!==void 0)je=Fe(Ye);else if(Ie)je=Fe(Me.createElement(We.Z,{spin:!0}));else{const Je=`${de}-suffix`;je=dt=>{let{open:He,showSearch:bt}=dt;return Fe(He&&bt?Me.createElement(lt.Z,{className:Je}):Me.createElement(ot.Z,{className:Je}))}}let ze=null;pt!==void 0?ze=pt:te?ze=Me.createElement(ue.Z,null):ze=null;let Xe=null;return wt!==void 0?Xe=wt:Xe=Me.createElement(Ze.Z,null),{clearIcon:Ne,suffixIcon:je,itemIcon:ze,removeIcon:Xe}}},78485:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Ot}});var ue=me(92310),Re=me.n(ue),Ze=me(59301),ot=me(36355),We=me(64002),Me=rt=>{const{prefixCls:Ue,className:$t,style:Gt,size:it,shape:at}=rt,Te=Re()({[`${Ue}-lg`]:it==="large",[`${Ue}-sm`]:it==="small"}),Pe=Re()({[`${Ue}-circle`]:at==="circle",[`${Ue}-square`]:at==="square",[`${Ue}-round`]:at==="round"}),ye=Ze.useMemo(()=>typeof it=="number"?{width:it,height:it,lineHeight:`${it}px`}:{},[it]);return Ze.createElement("span",{className:Re()(Ue,Te,Pe,$t),style:Object.assign(Object.assign({},ye),Gt)})},Mt=me(9792),Ct=me(83116),Ye=me(37613);const st=new Mt.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),pt=rt=>({height:rt,lineHeight:`${rt}px`}),wt=rt=>Object.assign({width:rt},pt(rt)),Ie=rt=>({background:rt.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:st,animationDuration:rt.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),te=rt=>Object.assign({width:rt*5,minWidth:rt*5},pt(rt)),ee=rt=>{const{skeletonAvatarCls:Ue,gradientFromColor:$t,controlHeight:Gt,controlHeightLG:it,controlHeightSM:at}=rt;return{[`${Ue}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:$t},wt(Gt)),[`${Ue}${Ue}-circle`]:{borderRadius:"50%"},[`${Ue}${Ue}-lg`]:Object.assign({},wt(it)),[`${Ue}${Ue}-sm`]:Object.assign({},wt(at))}},de=rt=>{const{controlHeight:Ue,borderRadiusSM:$t,skeletonInputCls:Gt,controlHeightLG:it,controlHeightSM:at,gradientFromColor:Te}=rt;return{[`${Gt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Te,borderRadius:$t},te(Ue)),[`${Gt}-lg`]:Object.assign({},te(it)),[`${Gt}-sm`]:Object.assign({},te(at))}},se=rt=>Object.assign({width:rt},pt(rt)),he=rt=>{const{skeletonImageCls:Ue,imageSizeBase:$t,gradientFromColor:Gt,borderRadiusSM:it}=rt;return{[`${Ue}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:Gt,borderRadius:it},se($t*2)),{[`${Ue}-path`]:{fill:"#bfbfbf"},[`${Ue}-svg`]:Object.assign(Object.assign({},se($t)),{maxWidth:$t*4,maxHeight:$t*4}),[`${Ue}-svg${Ue}-svg-circle`]:{borderRadius:"50%"}}),[`${Ue}${Ue}-circle`]:{borderRadius:"50%"}}},ve=(rt,Ue,$t)=>{const{skeletonButtonCls:Gt}=rt;return{[`${$t}${Gt}-circle`]:{width:Ue,minWidth:Ue,borderRadius:"50%"},[`${$t}${Gt}-round`]:{borderRadius:Ue}}},be=rt=>Object.assign({width:rt*2,minWidth:rt*2},pt(rt)),Ne=rt=>{const{borderRadiusSM:Ue,skeletonButtonCls:$t,controlHeight:Gt,controlHeightLG:it,controlHeightSM:at,gradientFromColor:Te}=rt;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${$t}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Te,borderRadius:Ue,width:Gt*2,minWidth:Gt*2},be(Gt))},ve(rt,Gt,$t)),{[`${$t}-lg`]:Object.assign({},be(it))}),ve(rt,it,`${$t}-lg`)),{[`${$t}-sm`]:Object.assign({},be(at))}),ve(rt,at,`${$t}-sm`))},Fe=rt=>{const{componentCls:Ue,skeletonAvatarCls:$t,skeletonTitleCls:Gt,skeletonParagraphCls:it,skeletonButtonCls:at,skeletonInputCls:Te,skeletonImageCls:Pe,controlHeight:ye,controlHeightLG:ke,controlHeightSM:$e,gradientFromColor:Le,padding:vt,marginSM:an,borderRadius:bn,titleHeight:en,blockRadius:wn,paragraphLiHeight:ai,controlHeightXS:_n,paragraphMarginTop:Hn}=rt;return{[`${Ue}`]:{display:"table",width:"100%",[`${Ue}-header`]:{display:"table-cell",paddingInlineEnd:vt,verticalAlign:"top",[`${$t}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Le},wt(ye)),[`${$t}-circle`]:{borderRadius:"50%"},[`${$t}-lg`]:Object.assign({},wt(ke)),[`${$t}-sm`]:Object.assign({},wt($e))},[`${Ue}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${Gt}`]:{width:"100%",height:en,background:Le,borderRadius:wn,[`+ ${it}`]:{marginBlockStart:$e}},[`${it}`]:{padding:0,"> li":{width:"100%",height:ai,listStyle:"none",background:Le,borderRadius:wn,"+ li":{marginBlockStart:_n}}},[`${it}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${Ue}-content`]:{[`${Gt}, ${it} > li`]:{borderRadius:bn}}},[`${Ue}-with-avatar ${Ue}-content`]:{[`${Gt}`]:{marginBlockStart:an,[`+ ${it}`]:{marginBlockStart:Hn}}},[`${Ue}${Ue}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Ne(rt)),ee(rt)),de(rt)),he(rt)),[`${Ue}${Ue}-block`]:{width:"100%",[`${at}`]:{width:"100%"},[`${Te}`]:{width:"100%"}},[`${Ue}${Ue}-active`]:{[`
|
|
|
${Gt},
|
|
|
${it} > li,
|
|
|
${$t},
|
|
|
${at},
|
|
|
${Te},
|
|
|
${Pe}
|
|
|
`]:Object.assign({},Ie(rt))}}};var je=(0,Ct.Z)("Skeleton",rt=>{const{componentCls:Ue}=rt,$t=(0,Ye.TS)(rt,{skeletonAvatarCls:`${Ue}-avatar`,skeletonTitleCls:`${Ue}-title`,skeletonParagraphCls:`${Ue}-paragraph`,skeletonButtonCls:`${Ue}-button`,skeletonInputCls:`${Ue}-input`,skeletonImageCls:`${Ue}-image`,imageSizeBase:rt.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${rt.gradientFromColor} 25%, ${rt.gradientToColor} 37%, ${rt.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Fe($t)]},rt=>{const{colorFillContent:Ue,colorFill:$t}=rt,Gt=Ue,it=$t;return{color:Gt,colorGradientEnd:it,gradientFromColor:Gt,gradientToColor:it,titleHeight:rt.controlHeight/2,blockRadius:rt.borderRadiusSM,paragraphMarginTop:rt.marginLG+rt.marginXXS,paragraphLiHeight:rt.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),Xe=rt=>{const{prefixCls:Ue,className:$t,rootClassName:Gt,active:it,shape:at="circle",size:Te="default"}=rt,{getPrefixCls:Pe}=Ze.useContext(ot.E_),ye=Pe("skeleton",Ue),[ke,$e]=je(ye),Le=(0,We.Z)(rt,["prefixCls","className"]),vt=Re()(ye,`${ye}-element`,{[`${ye}-active`]:it},$t,Gt,$e);return ke(Ze.createElement("div",{className:vt},Ze.createElement(Me,Object.assign({prefixCls:`${ye}-avatar`,shape:at,size:Te},Le))))},dt=rt=>{const{prefixCls:Ue,className:$t,rootClassName:Gt,active:it,block:at=!1,size:Te="default"}=rt,{getPrefixCls:Pe}=Ze.useContext(ot.E_),ye=Pe("skeleton",Ue),[ke,$e]=je(ye),Le=(0,We.Z)(rt,["prefixCls"]),vt=Re()(ye,`${ye}-element`,{[`${ye}-active`]:it,[`${ye}-block`]:at},$t,Gt,$e);return ke(Ze.createElement("div",{className:vt},Ze.createElement(Me,Object.assign({prefixCls:`${ye}-button`,size:Te},Le))))};const He="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 et=rt=>{const{prefixCls:Ue,className:$t,rootClassName:Gt,style:it,active:at}=rt,{getPrefixCls:Te}=Ze.useContext(ot.E_),Pe=Te("skeleton",Ue),[ye,ke]=je(Pe),$e=Re()(Pe,`${Pe}-element`,{[`${Pe}-active`]:at},$t,Gt,ke);return ye(Ze.createElement("div",{className:$e},Ze.createElement("div",{className:Re()(`${Pe}-image`,$t),style:it},Ze.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${Pe}-image-svg`},Ze.createElement("path",{d:He,className:`${Pe}-image-path`})))))},xt=rt=>{const{prefixCls:Ue,className:$t,rootClassName:Gt,active:it,block:at,size:Te="default"}=rt,{getPrefixCls:Pe}=Ze.useContext(ot.E_),ye=Pe("skeleton",Ue),[ke,$e]=je(ye),Le=(0,We.Z)(rt,["prefixCls"]),vt=Re()(ye,`${ye}-element`,{[`${ye}-active`]:it,[`${ye}-block`]:at},$t,Gt,$e);return ke(Ze.createElement("div",{className:vt},Ze.createElement(Me,Object.assign({prefixCls:`${ye}-input`,size:Te},Le))))},Bt=me(5891),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"},Nt=Ut,qe=me(88853),Ke=function(Ue,$t){return Ze.createElement(qe.Z,(0,Bt.Z)({},Ue,{ref:$t,icon:Nt}))},Tt=Ze.forwardRef(Ke),Ln=Tt,zt=rt=>{const{prefixCls:Ue,className:$t,rootClassName:Gt,style:it,active:at,children:Te}=rt,{getPrefixCls:Pe}=Ze.useContext(ot.E_),ye=Pe("skeleton",Ue),[ke,$e]=je(ye),Le=Re()(ye,`${ye}-element`,{[`${ye}-active`]:at},$e,$t,Gt),vt=Te!=null?Te:Ze.createElement(Ln,null);return ke(Ze.createElement("div",{className:Le},Ze.createElement("div",{className:Re()(`${ye}-image`,$t),style:it},vt)))},rn=me(26390),Un=rt=>{const Ue=Pe=>{const{width:ye,rows:ke=2}=rt;if(Array.isArray(ye))return ye[Pe];if(ke-1===Pe)return ye},{prefixCls:$t,className:Gt,style:it,rows:at}=rt,Te=(0,rn.Z)(Array(at)).map((Pe,ye)=>Ze.createElement("li",{key:ye,style:{width:Ue(ye)}}));return Ze.createElement("ul",{className:Re()($t,Gt),style:it},Te)},sn=rt=>{let{prefixCls:Ue,className:$t,width:Gt,style:it}=rt;return Ze.createElement("h3",{className:Re()(Ue,$t),style:Object.assign({width:Gt},it)})};function Lt(rt){return rt&&typeof rt=="object"?rt:{}}function ti(rt,Ue){return rt&&!Ue?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function gi(rt,Ue){return!rt&&Ue?{width:"38%"}:rt&&Ue?{width:"50%"}:{}}function Pn(rt,Ue){const $t={};return(!rt||!Ue)&&($t.width="61%"),!rt&&Ue?$t.rows=3:$t.rows=2,$t}const Xt=rt=>{const{prefixCls:Ue,loading:$t,className:Gt,rootClassName:it,style:at,children:Te,avatar:Pe=!1,title:ye=!0,paragraph:ke=!0,active:$e,round:Le}=rt,{getPrefixCls:vt,direction:an,skeleton:bn}=Ze.useContext(ot.E_),en=vt("skeleton",Ue),[wn,ai]=je(en);if($t||!("loading"in rt)){const _n=!!Pe,Hn=!!ye,wi=!!ke;let Hi;if(_n){const _r=Object.assign(Object.assign({prefixCls:`${en}-avatar`},ti(Hn,wi)),Lt(Pe));Hi=Ze.createElement("div",{className:`${en}-header`},Ze.createElement(Me,Object.assign({},_r)))}let _i;if(Hn||wi){let _r;if(Hn){const si=Object.assign(Object.assign({prefixCls:`${en}-title`},gi(_n,wi)),Lt(ye));_r=Ze.createElement(sn,Object.assign({},si))}let vi;if(wi){const si=Object.assign(Object.assign({prefixCls:`${en}-paragraph`},Pn(_n,Hn)),Lt(ke));vi=Ze.createElement(Un,Object.assign({},si))}_i=Ze.createElement("div",{className:`${en}-content`},_r,vi)}const cr=Re()(en,{[`${en}-with-avatar`]:_n,[`${en}-active`]:$e,[`${en}-rtl`]:an==="rtl",[`${en}-round`]:Le},bn==null?void 0:bn.className,Gt,it,ai);return wn(Ze.createElement("div",{className:cr,style:Object.assign(Object.assign({},bn==null?void 0:bn.style),at)},Hi,_i))}return typeof Te!="undefined"?Te:null};Xt.Button=dt,Xt.Avatar=Xe,Xt.Input=xt,Xt.Image=et,Xt.Node=zt;var Kt=Xt,Ot=Kt},81327:function(zn,En,me){"use strict";me.d(En,{Z:function(){return de}});var ue=me(59301),Re=me(92310),Ze=me.n(Re),ot=me(38298),We=me(36355),lt=me(33234);const Me=ue.createContext({latestIndex:0}),Mt=Me.Provider;var Ye=se=>{let{className:he,index:ve,children:be,split:Ne,style:Fe}=se;const{latestIndex:je}=ue.useContext(Me);return be==null?null:ue.createElement(ue.Fragment,null,ue.createElement("div",{className:he,style:Fe},be),ve<je&&Ne&&ue.createElement("span",{className:`${he}-split`},Ne))},st=me(2856);function pt(se){return["small","middle","large"].includes(se)}function wt(se){return se?typeof se=="number"&&!Number.isNaN(se):!1}var Ie=function(se,he){var ve={};for(var be in se)Object.prototype.hasOwnProperty.call(se,be)&&he.indexOf(be)<0&&(ve[be]=se[be]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ne=0,be=Object.getOwnPropertySymbols(se);Ne<be.length;Ne++)he.indexOf(be[Ne])<0&&Object.prototype.propertyIsEnumerable.call(se,be[Ne])&&(ve[be[Ne]]=se[be[Ne]]);return ve};const ee=ue.forwardRef((se,he)=>{var ve,be;const{getPrefixCls:Ne,space:Fe,direction:je}=ue.useContext(We.E_),{size:ze=(Fe==null?void 0:Fe.size)||"small",align:Xe,className:Je,rootClassName:dt,children:He,direction:bt="horizontal",prefixCls:et,split:It,style:xt,wrap:Bt=!1,classNames:Ut,styles:Nt}=se,qe=Ie(se,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Ke,Tt]=Array.isArray(ze)?ze:[ze,ze],Ln=pt(Tt),Mn=pt(Ke),zt=wt(Tt),rn=wt(Ke),xn=(0,ot.Z)(He,{keepEmpty:!0}),Un=Xe===void 0&&bt==="horizontal"?"center":Xe,yn=Ne("space",et),[sn,Lt]=(0,st.Z)(yn),ti=Ze()(yn,Fe==null?void 0:Fe.className,Lt,`${yn}-${bt}`,{[`${yn}-rtl`]:je==="rtl",[`${yn}-align-${Un}`]:Un,[`${yn}-gap-row-${Tt}`]:Ln,[`${yn}-gap-col-${Ke}`]:Mn},Je,dt),gi=Ze()(`${yn}-item`,(ve=Ut==null?void 0:Ut.item)!==null&&ve!==void 0?ve:(be=Fe==null?void 0:Fe.classNames)===null||be===void 0?void 0:be.item);let Pn=0;const Xt=xn.map((rt,Ue)=>{var $t,Gt;rt!=null&&(Pn=Ue);const it=rt&&rt.key||`${gi}-${Ue}`;return ue.createElement(Ye,{className:gi,key:it,index:Ue,split:It,style:($t=Nt==null?void 0:Nt.item)!==null&&$t!==void 0?$t:(Gt=Fe==null?void 0:Fe.styles)===null||Gt===void 0?void 0:Gt.item},rt)}),Kt=ue.useMemo(()=>({latestIndex:Pn}),[Pn]);if(xn.length===0)return null;const Ot={};return Bt&&(Ot.flexWrap="wrap"),!Mn&&rn&&(Ot.columnGap=Ke),!Ln&&zt&&(Ot.rowGap=Tt),sn(ue.createElement("div",Object.assign({ref:he,className:ti,style:Object.assign(Object.assign(Object.assign({},Ot),Fe==null?void 0:Fe.style),xt)},qe),ue.createElement(Mt,{value:Kt},Xt)))});ee.Compact=lt.ZP;var de=ee},31797:function(zn,En,me){"use strict";me.d(En,{default:function(){return je}});var ue=me(59301),Re=me(56762),Ze=me(92343),ot=me(92310),We=me.n(ot),lt=me(36355),Me=me(78485),Ct=ze=>{const{value:Xe,formatter:Je,precision:dt,decimalSeparator:He,groupSeparator:bt="",prefixCls:et}=ze;let It;if(typeof Je=="function")It=Je(Xe);else{const xt=String(Xe),Bt=xt.match(/^(-?)(\d*)(\.(\d+))?$/);if(!Bt||xt==="-")It=xt;else{const Ut=Bt[1];let Nt=Bt[2]||"0",qe=Bt[4]||"";Nt=Nt.replace(/\B(?=(\d{3})+(?!\d))/g,bt),typeof dt=="number"&&(qe=qe.padEnd(dt,"0").slice(0,dt>0?dt:0)),qe&&(qe=`${He}${qe}`),It=[ue.createElement("span",{key:"int",className:`${et}-content-value-int`},Ut,Nt),qe&&ue.createElement("span",{key:"decimal",className:`${et}-content-value-decimal`},qe)]}}return ue.createElement("span",{className:`${et}-content-value`},It)},Ye=me(17313),st=me(83116),pt=me(37613);const wt=ze=>{const{componentCls:Xe,marginXXS:Je,padding:dt,colorTextDescription:He,titleFontSize:bt,colorTextHeading:et,contentFontSize:It,fontFamily:xt}=ze;return{[`${Xe}`]:Object.assign(Object.assign({},(0,Ye.Wf)(ze)),{[`${Xe}-title`]:{marginBottom:Je,color:He,fontSize:bt},[`${Xe}-skeleton`]:{paddingTop:dt},[`${Xe}-content`]:{color:et,fontSize:It,fontFamily:xt,[`${Xe}-content-value`]:{display:"inline-block",direction:"ltr"},[`${Xe}-content-prefix, ${Xe}-content-suffix`]:{display:"inline-block"},[`${Xe}-content-prefix`]:{marginInlineEnd:Je},[`${Xe}-content-suffix`]:{marginInlineStart:Je}}})}};var Ie=(0,st.Z)("Statistic",ze=>{const Xe=(0,pt.TS)(ze,{});return[wt(Xe)]},ze=>{const{fontSizeHeading3:Xe,fontSize:Je}=ze;return{titleFontSize:Je,contentFontSize:Xe}}),ee=ze=>{const{prefixCls:Xe,className:Je,rootClassName:dt,style:He,valueStyle:bt,value:et=0,title:It,valueRender:xt,prefix:Bt,suffix:Ut,loading:Nt=!1,onMouseEnter:qe,onMouseLeave:Ke,decimalSeparator:Tt=".",groupSeparator:Ln=","}=ze,{getPrefixCls:Mn,direction:zt,statistic:rn}=ue.useContext(lt.E_),xn=Mn("statistic",Xe),[Un,yn]=Ie(xn),sn=ue.createElement(Ct,Object.assign({decimalSeparator:Tt,groupSeparator:Ln,prefixCls:xn},ze,{value:et})),Lt=We()(xn,{[`${xn}-rtl`]:zt==="rtl"},rn==null?void 0:rn.className,Je,dt,yn);return Un(ue.createElement("div",{className:Lt,style:Object.assign(Object.assign({},rn==null?void 0:rn.style),He),onMouseEnter:qe,onMouseLeave:Ke},It&&ue.createElement("div",{className:`${xn}-title`},It),ue.createElement(Me.Z,{paragraph:!1,loading:Nt,className:`${xn}-skeleton`},ue.createElement("div",{style:bt,className:`${xn}-content`},Bt&&ue.createElement("span",{className:`${xn}-content-prefix`},Bt),xt?xt(sn):sn,Ut&&ue.createElement("span",{className:`${xn}-content-suffix`},Ut)))))};const de=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function se(ze,Xe){let Je=ze;const dt=/\[[^\]]*]/g,He=(Xe.match(dt)||[]).map(xt=>xt.slice(1,-1)),bt=Xe.replace(dt,"[]"),et=de.reduce((xt,Bt)=>{let[Ut,Nt]=Bt;if(xt.includes(Ut)){const qe=Math.floor(Je/Nt);return Je-=qe*Nt,xt.replace(new RegExp(`${Ut}+`,"g"),Ke=>{const Tt=Ke.length;return qe.toString().padStart(Tt,"0")})}return xt},bt);let It=0;return et.replace(dt,()=>{const xt=He[It];return It+=1,xt})}function he(ze,Xe){const{format:Je=""}=Xe,dt=new Date(ze).getTime(),He=Date.now(),bt=Math.max(dt-He,0);return se(bt,Je)}const ve=1e3/30;function be(ze){return new Date(ze).getTime()}const Ne=ze=>{const{value:Xe,format:Je="HH:mm:ss",onChange:dt,onFinish:He}=ze,bt=(0,Re.Z)(),et=ue.useRef(null),It=()=>{He==null||He(),et.current&&(clearInterval(et.current),et.current=null)},xt=()=>{const Nt=be(Xe);Nt>=Date.now()&&(et.current=setInterval(()=>{bt(),dt==null||dt(Nt-Date.now()),Nt<Date.now()&&It()},ve))};ue.useEffect(()=>(xt(),()=>{et.current&&(clearInterval(et.current),et.current=null)}),[Xe]);const Bt=(Nt,qe)=>he(Nt,Object.assign(Object.assign({},qe),{format:Je})),Ut=Nt=>(0,Ze.Tm)(Nt,{title:void 0});return ue.createElement(ee,Object.assign({},ze,{valueRender:Ut,formatter:Bt}))};var Fe=ue.memo(Ne);ee.Countdown=Fe;var je=ee},15969:function(zn,En,me){"use strict";me.d(En,{N:function(){return ue}});const ue=Re=>({color:Re.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${Re.motionDurationSlow}`,"&:focus, &:hover":{color:Re.colorLinkHover},"&:active":{color:Re.colorLinkActive}})},78673:function(zn,En,me){"use strict";me.d(En,{Z:function(){return bt}});var ue=me(50023),Re=me(92310),Ze=me.n(Re),ot=me(5891),We=me(80962),lt=me(29043),Me=me(19149),Mt=me(59301),Ct=me(35788),Ye=me(85108),st=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],pt=Mt.forwardRef(function(et,It){var xt,Bt=et.prefixCls,Ut=Bt===void 0?"rc-switch":Bt,Nt=et.className,qe=et.checked,Ke=et.defaultChecked,Tt=et.disabled,Ln=et.loadingIcon,Mn=et.checkedChildren,zt=et.unCheckedChildren,rn=et.onClick,xn=et.onChange,Un=et.onKeyDown,yn=(0,Me.Z)(et,st),sn=(0,Ct.Z)(!1,{value:qe,defaultValue:Ke}),Lt=(0,lt.Z)(sn,2),ti=Lt[0],gi=Lt[1];function Pn(rt,Ue){var $t=ti;return Tt||($t=rt,gi($t),xn==null||xn($t,Ue)),$t}function Xt(rt){rt.which===Ye.Z.LEFT?Pn(!1,rt):rt.which===Ye.Z.RIGHT&&Pn(!0,rt),Un==null||Un(rt)}function Kt(rt){var Ue=Pn(!ti,rt);rn==null||rn(Ue,rt)}var Ot=Ze()(Ut,Nt,(xt={},(0,We.Z)(xt,"".concat(Ut,"-checked"),ti),(0,We.Z)(xt,"".concat(Ut,"-disabled"),Tt),xt));return Mt.createElement("button",(0,ot.Z)({},yn,{type:"button",role:"switch","aria-checked":ti,disabled:Tt,className:Ot,ref:It,onKeyDown:Xt,onClick:Kt}),Ln,Mt.createElement("span",{className:"".concat(Ut,"-inner")},Mt.createElement("span",{className:"".concat(Ut,"-inner-checked")},Mn),Mt.createElement("span",{className:"".concat(Ut,"-inner-unchecked")},zt)))});pt.displayName="Switch";var wt=pt,Ie=me(14088),te=me(36355),ee=me(1684),de=me(19716),se=me(64993),he=me(17313),ve=me(83116),be=me(37613);const Ne=et=>{const{componentCls:It,trackHeightSM:xt,trackPadding:Bt,trackMinWidthSM:Ut,innerMinMarginSM:Nt,innerMaxMarginSM:qe,handleSizeSM:Ke}=et,Tt=`${It}-inner`;return{[It]:{[`&${It}-small`]:{minWidth:Ut,height:xt,lineHeight:`${xt}px`,[`${It}-inner`]:{paddingInlineStart:qe,paddingInlineEnd:Nt,[`${Tt}-checked`]:{marginInlineStart:`calc(-100% + ${Ke+Bt*2}px - ${qe*2}px)`,marginInlineEnd:`calc(100% - ${Ke+Bt*2}px + ${qe*2}px)`},[`${Tt}-unchecked`]:{marginTop:-xt,marginInlineStart:0,marginInlineEnd:0}},[`${It}-handle`]:{width:Ke,height:Ke},[`${It}-loading-icon`]:{top:(Ke-et.switchLoadingIconSize)/2,fontSize:et.switchLoadingIconSize},[`&${It}-checked`]:{[`${It}-inner`]:{paddingInlineStart:Nt,paddingInlineEnd:qe,[`${Tt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Tt}-unchecked`]:{marginInlineStart:`calc(100% - ${Ke+Bt*2}px + ${qe*2}px)`,marginInlineEnd:`calc(-100% + ${Ke+Bt*2}px - ${qe*2}px)`}},[`${It}-handle`]:{insetInlineStart:`calc(100% - ${Ke+Bt}px)`}},[`&:not(${It}-disabled):active`]:{[`&:not(${It}-checked) ${Tt}`]:{[`${Tt}-unchecked`]:{marginInlineStart:et.marginXXS/2,marginInlineEnd:-et.marginXXS/2}},[`&${It}-checked ${Tt}`]:{[`${Tt}-checked`]:{marginInlineStart:-et.marginXXS/2,marginInlineEnd:et.marginXXS/2}}}}}}},Fe=et=>{const{componentCls:It,handleSize:xt}=et;return{[It]:{[`${It}-loading-icon${et.iconCls}`]:{position:"relative",top:(xt-et.fontSize)/2,color:et.switchLoadingIconColor,verticalAlign:"top"},[`&${It}-checked ${It}-loading-icon`]:{color:et.switchColor}}}},je=et=>{const{componentCls:It,motion:xt,trackPadding:Bt,handleBg:Ut,handleShadow:Nt,handleSize:qe}=et,Ke=`${It}-handle`;return{[It]:{[Ke]:{position:"absolute",top:Bt,insetInlineStart:Bt,width:qe,height:qe,transition:`all ${et.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Ut,borderRadius:qe/2,boxShadow:Nt,transition:`all ${et.switchDuration} ease-in-out`,content:'""'}},[`&${It}-checked ${Ke}`]:{insetInlineStart:`calc(100% - ${qe+Bt}px)`},[`&:not(${It}-disabled):active`]:xt?{[`${Ke}::before`]:{insetInlineEnd:et.switchHandleActiveInset,insetInlineStart:0},[`&${It}-checked ${Ke}::before`]:{insetInlineEnd:0,insetInlineStart:et.switchHandleActiveInset}}:{}}}},ze=et=>{const{componentCls:It,trackHeight:xt,trackPadding:Bt,innerMinMargin:Ut,innerMaxMargin:Nt,handleSize:qe}=et,Ke=`${It}-inner`;return{[It]:{[Ke]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Nt,paddingInlineEnd:Ut,transition:`padding-inline-start ${et.switchDuration} ease-in-out, padding-inline-end ${et.switchDuration} ease-in-out`,[`${Ke}-checked, ${Ke}-unchecked`]:{display:"block",color:et.colorTextLightSolid,fontSize:et.fontSizeSM,transition:`margin-inline-start ${et.switchDuration} ease-in-out, margin-inline-end ${et.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Ke}-checked`]:{marginInlineStart:`calc(-100% + ${qe+Bt*2}px - ${Nt*2}px)`,marginInlineEnd:`calc(100% - ${qe+Bt*2}px + ${Nt*2}px)`},[`${Ke}-unchecked`]:{marginTop:-xt,marginInlineStart:0,marginInlineEnd:0}},[`&${It}-checked ${Ke}`]:{paddingInlineStart:Ut,paddingInlineEnd:Nt,[`${Ke}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Ke}-unchecked`]:{marginInlineStart:`calc(100% - ${qe+Bt*2}px + ${Nt*2}px)`,marginInlineEnd:`calc(-100% + ${qe+Bt*2}px - ${Nt*2}px)`}},[`&:not(${It}-disabled):active`]:{[`&:not(${It}-checked) ${Ke}`]:{[`${Ke}-unchecked`]:{marginInlineStart:Bt*2,marginInlineEnd:-Bt*2}},[`&${It}-checked ${Ke}`]:{[`${Ke}-checked`]:{marginInlineStart:-Bt*2,marginInlineEnd:Bt*2}}}}}},Xe=et=>{const{componentCls:It,trackHeight:xt,trackMinWidth:Bt}=et;return{[It]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,he.Wf)(et)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Bt,height:xt,lineHeight:`${xt}px`,verticalAlign:"middle",background:et.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${et.motionDurationMid}`,userSelect:"none",[`&:hover:not(${It}-disabled)`]:{background:et.colorTextTertiary}}),(0,he.Qy)(et)),{[`&${It}-checked`]:{background:et.switchColor,[`&:hover:not(${It}-disabled)`]:{background:et.colorPrimaryHover}},[`&${It}-loading, &${It}-disabled`]:{cursor:"not-allowed",opacity:et.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${It}-rtl`]:{direction:"rtl"}})}};var Je=(0,ve.Z)("Switch",et=>{const It=(0,be.TS)(et,{switchDuration:et.motionDurationMid,switchColor:et.colorPrimary,switchDisabledOpacity:et.opacityLoading,switchLoadingIconSize:et.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${et.opacityLoading})`,switchHandleActiveInset:"-30%"});return[Xe(It),ze(It),je(It),Fe(It),Ne(It)]},et=>{const{fontSize:It,lineHeight:xt,controlHeight:Bt,colorWhite:Ut}=et,Nt=It*xt,qe=Bt/2,Ke=2,Tt=Nt-Ke*2,Ln=qe-Ke*2;return{trackHeight:Nt,trackHeightSM:qe,trackMinWidth:Tt*2+Ke*4,trackMinWidthSM:Ln*2+Ke*2,trackPadding:Ke,handleBg:Ut,handleSize:Tt,handleSizeSM:Ln,handleShadow:`0 2px 4px 0 ${new se.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:Tt/2,innerMaxMargin:Tt+Ke+Ke*2,innerMinMarginSM:Ln/2,innerMaxMarginSM:Ln+Ke+Ke*2}}),dt=function(et,It){var xt={};for(var Bt in et)Object.prototype.hasOwnProperty.call(et,Bt)&&It.indexOf(Bt)<0&&(xt[Bt]=et[Bt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ut=0,Bt=Object.getOwnPropertySymbols(et);Ut<Bt.length;Ut++)It.indexOf(Bt[Ut])<0&&Object.prototype.propertyIsEnumerable.call(et,Bt[Ut])&&(xt[Bt[Ut]]=et[Bt[Ut]]);return xt};const He=Mt.forwardRef((et,It)=>{const{prefixCls:xt,size:Bt,disabled:Ut,loading:Nt,className:qe,rootClassName:Ke,style:Tt}=et,Ln=dt(et,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:Mn,direction:zt,switch:rn}=Mt.useContext(te.E_),xn=Mt.useContext(ee.Z),Un=(Ut!=null?Ut:xn)||Nt,yn=Mn("switch",xt),sn=Mt.createElement("div",{className:`${yn}-handle`},Nt&&Mt.createElement(ue.Z,{className:`${yn}-loading-icon`})),[Lt,ti]=Je(yn),gi=(0,de.Z)(Bt),Pn=Ze()(rn==null?void 0:rn.className,{[`${yn}-small`]:gi==="small",[`${yn}-loading`]:Nt,[`${yn}-rtl`]:zt==="rtl"},qe,Ke,ti),Xt=Object.assign(Object.assign({},rn==null?void 0:rn.style),Tt);return Lt(Mt.createElement(Ie.Z,{component:"Switch"},Mt.createElement(wt,Object.assign({},Ln,{prefixCls:yn,className:Pn,style:Xt,disabled:Un,ref:It,loadingIcon:sn}))))});He.__ANT_SWITCH=!0;var bt=He},2595:function(zn,En,me){"use strict";me.d(En,{default:function(){return Md}});var ue={},Re="rc-table-internal-hook",Ze=me(29043),ot=me(8107),We=me(28800),lt=me(51346),Me=me(59301),Mt=me(4676);function Ct(ft){var St=Me.createContext(void 0),nn=function(Dn){var Sn=Dn.value,ni=Dn.children,ii=Me.useRef(Sn);ii.current=Sn;var Yn=Me.useState(function(){return{getValue:function(){return ii.current},listeners:new Set}}),Ci=(0,Ze.Z)(Yn,1),Bi=Ci[0];return(0,We.Z)(function(){(0,Mt.unstable_batchedUpdates)(function(){Bi.listeners.forEach(function(bi){bi(Sn)})})},[Sn]),Me.createElement(St.Provider,{value:Bi},ni)};return{Context:St,Provider:nn,defaultValue:ft}}function Ye(ft,St){var nn=(0,ot.Z)(typeof St=="function"?St:function(bi){if(St===void 0)return bi;if(!Array.isArray(St))return bi[St];var xr={};return St.forEach(function(gr){xr[gr]=bi[gr]}),xr}),ln=Me.useContext(ft==null?void 0:ft.Context),Dn=ln||{},Sn=Dn.listeners,ni=Dn.getValue,ii=Me.useRef();ii.current=nn(ln?ni():ft==null?void 0:ft.defaultValue);var Yn=Me.useState({}),Ci=(0,Ze.Z)(Yn,2),Bi=Ci[1];return(0,We.Z)(function(){if(!ln)return;function bi(xr){var gr=nn(xr);(0,lt.Z)(ii.current,gr,!0)||Bi({})}return Sn.add(bi),function(){Sn.delete(bi)}},[ln]),ii.current}var st=me(5891),pt=me(20475);function wt(){var ft=Me.createContext(null);function St(){return Me.useContext(ft)}function nn(Dn,Sn){var ni=(0,pt.Yr)(Dn),ii=function(Ci,Bi){var bi=ni?{ref:Bi}:{},xr=Me.useRef(0),gr=Me.useRef(Ci),ar=St();return ar!==null?Me.createElement(Dn,(0,st.Z)({},Ci,bi)):((!Sn||Sn(gr.current,Ci))&&(xr.current+=1),gr.current=Ci,Me.createElement(ft.Provider,{value:xr.current},Me.createElement(Dn,(0,st.Z)({},Ci,bi))))};return ni?Me.forwardRef(ii):ii}function ln(Dn,Sn){var ni=(0,pt.Yr)(Dn),ii=function(Ci,Bi){var bi=ni?{ref:Bi}:{};return St(),Me.createElement(Dn,(0,st.Z)({},Ci,bi))};return ni?Me.memo(Me.forwardRef(ii),Sn):Me.memo(ii,Sn)}return{makeImmutable:nn,responseImmutable:ln,useImmutableMark:St}}var Ie=wt(),te=Ie.makeImmutable,ee=Ie.responseImmutable,de=Ie.useImmutableMark,se=wt(),he=se.makeImmutable,ve=se.responseImmutable,be=se.useImmutableMark,Ne=Ct(),Fe=Ne;function je(ft,St){var nn=Me.useRef(0);nn.current+=1;var ln=Me.useRef(ft),Dn=[];Object.keys(ft||{}).map(function(ni){var ii;(ft==null?void 0:ft[ni])!==((ii=ln.current)===null||ii===void 0?void 0:ii[ni])&&Dn.push(ni)}),ln.current=ft;var Sn=Me.useRef([]);return Dn.length&&(Sn.current=Dn),Me.useDebugValue(nn.current),Me.useDebugValue(Sn.current.join(", ")),St&&console.log("".concat(St,":"),nn.current,Sn.current),nn.current}var ze=null,Xe=Me.memo(function(){var ft=je();return Me.createElement("h1",null,"Render Times: ",ft)});Xe.displayName="RenderBlock";var Je=me(80665),dt=me(57259),He=me(80962),bt=me(92310),et=me.n(bt),It=me(79722),xt=me(69004),Bt=me(51395),Ut=Me.createContext({renderWithProps:!1}),Nt=Ut,qe="RC_TABLE_KEY";function Ke(ft){return ft==null?[]:Array.isArray(ft)?ft:[ft]}function Tt(ft){var St=[],nn={};return ft.forEach(function(ln){for(var Dn=ln||{},Sn=Dn.key,ni=Dn.dataIndex,ii=Sn||Ke(ni).join("-")||qe;nn[ii];)ii="".concat(ii,"_next");nn[ii]=!0,St.push(ii)}),St}function Ln(ft){return ft!=null}function Mn(ft){return ft&&(0,Je.Z)(ft)==="object"&&!Array.isArray(ft)&&!Me.isValidElement(ft)}function zt(ft,St,nn,ln,Dn,Sn){var ni=Me.useContext(Nt),ii=be(),Yn=(0,It.Z)(function(){if(Ln(ln))return[ln];var Ci=St==null||St===""?[]:Array.isArray(St)?St:[St],Bi=(0,xt.Z)(ft,Ci),bi=Bi,xr=void 0;if(Dn){var gr=Dn(Bi,ft,nn);Mn(gr)?(bi=gr.children,xr=gr.props,ni.renderWithProps=!0):bi=gr}return[bi,xr]},[ii,ft,ln,St,Dn,nn],function(Ci,Bi){if(Sn){var bi=(0,Ze.Z)(Ci,2),xr=bi[1],gr=(0,Ze.Z)(Bi,2),ar=gr[1];return Sn(ar,xr)}return ni.renderWithProps?!0:!(0,lt.Z)(Ci,Bi,!0)});return Yn}function rn(ft,St,nn,ln){var Dn=ft+St-1;return ft<=ln&&Dn>=nn}function xn(ft,St){return Ye(Fe,function(nn){var ln=rn(ft,St||1,nn.hoverStartRow,nn.hoverEndRow);return[ln,nn.onHover]})}var Un=function(St){var nn=St.ellipsis,ln=St.rowType,Dn=St.children,Sn,ni=nn===!0?{showTitle:!0}:nn;return ni&&(ni.showTitle||ln==="header")&&(typeof Dn=="string"||typeof Dn=="number"?Sn=Dn.toString():Me.isValidElement(Dn)&&typeof Dn.props.children=="string"&&(Sn=Dn.props.children)),Sn};function yn(ft){var St,nn,ln,Dn,Sn,ni,ii,Yn,Ci=ft.component,Bi=ft.children,bi=ft.ellipsis,xr=ft.scope,gr=ft.prefixCls,ar=ft.className,oo=ft.align,dr=ft.record,qr=ft.render,Yr=ft.dataIndex,So=ft.renderIndex,$o=ft.shouldCellUpdate,la=ft.index,so=ft.rowType,Ho=ft.colSpan,Na=ft.rowSpan,fo=ft.fixLeft,ko=ft.fixRight,po=ft.firstFixLeft,kr=ft.lastFixLeft,Fo=ft.firstFixRight,qo=ft.lastFixRight,ma=ft.appendNode,va=ft.additionalProps,lo=va===void 0?{}:va,Ba=ft.isSticky,Wa="".concat(gr,"-cell"),Ps=Ye(Fe,["supportSticky","allColumnsFixedLeft"]),is=Ps.supportSticky,il=Ps.allColumnsFixedLeft,Ls=zt(dr,Yr,So,Bi,qr,$o),_a=(0,Ze.Z)(Ls,2),oa=_a[0],as=_a[1],rl={},Gs=typeof fo=="number"&&is,xl=typeof ko=="number"&&is;Gs&&(rl.position="sticky",rl.left=fo),xl&&(rl.position="sticky",rl.right=ko);var Pa=(St=(nn=(ln=as==null?void 0:as.colSpan)!==null&&ln!==void 0?ln:lo.colSpan)!==null&&nn!==void 0?nn:Ho)!==null&&St!==void 0?St:1,ha=(Dn=(Sn=(ni=as==null?void 0:as.rowSpan)!==null&&ni!==void 0?ni:lo.rowSpan)!==null&&Sn!==void 0?Sn:Na)!==null&&Dn!==void 0?Dn:1,ya=xn(la,ha),Vo=(0,Ze.Z)(ya,2),vs=Vo[0],Ko=Vo[1],Aa=function(Sl){var kl;dr&&Ko(la,la+ha-1),lo==null||(kl=lo.onMouseEnter)===null||kl===void 0||kl.call(lo,Sl)},es=function(Sl){var kl;dr&&Ko(-1,-1),lo==null||(kl=lo.onMouseLeave)===null||kl===void 0||kl.call(lo,Sl)};if(Pa===0||ha===0)return null;var rs=(ii=lo.title)!==null&&ii!==void 0?ii:Un({rowType:so,ellipsis:bi,children:oa}),zl=et()(Wa,ar,(Yn={},(0,He.Z)(Yn,"".concat(Wa,"-fix-left"),Gs&&is),(0,He.Z)(Yn,"".concat(Wa,"-fix-left-first"),po&&is),(0,He.Z)(Yn,"".concat(Wa,"-fix-left-last"),kr&&is),(0,He.Z)(Yn,"".concat(Wa,"-fix-left-all"),kr&&il&&is),(0,He.Z)(Yn,"".concat(Wa,"-fix-right"),xl&&is),(0,He.Z)(Yn,"".concat(Wa,"-fix-right-first"),Fo&&is),(0,He.Z)(Yn,"".concat(Wa,"-fix-right-last"),qo&&is),(0,He.Z)(Yn,"".concat(Wa,"-ellipsis"),bi),(0,He.Z)(Yn,"".concat(Wa,"-with-append"),ma),(0,He.Z)(Yn,"".concat(Wa,"-fix-sticky"),(Gs||xl)&&Ba&&is),(0,He.Z)(Yn,"".concat(Wa,"-row-hover"),!as&&vs),Yn),lo.className,as==null?void 0:as.className),Ol={};oo&&(Ol.textAlign=oo);var eu=(0,dt.Z)((0,dt.Z)((0,dt.Z)((0,dt.Z)({},rl),lo.style),Ol),as==null?void 0:as.style),ws=oa;return(0,Je.Z)(ws)==="object"&&!Array.isArray(ws)&&!Me.isValidElement(ws)&&(ws=null),bi&&(kr||Fo)&&(ws=Me.createElement("span",{className:"".concat(Wa,"-content")},ws)),Me.createElement(Ci,(0,st.Z)({},as,lo,{className:zl,style:eu,title:rs,scope:xr,onMouseEnter:Aa,onMouseLeave:es,colSpan:Pa!==1?Pa:null,rowSpan:ha!==1?ha:null}),ma,ws)}var sn=Me.memo(yn);function Lt(ft,St,nn,ln,Dn,Sn){var ni=nn[ft]||{},ii=nn[St]||{},Yn,Ci;ni.fixed==="left"?Yn=ln.left[Dn==="rtl"?St:ft]:ii.fixed==="right"&&(Ci=ln.right[Dn==="rtl"?ft:St]);var Bi=!1,bi=!1,xr=!1,gr=!1,ar=nn[St+1],oo=nn[ft-1],dr=!(Sn!=null&&Sn.children);if(Dn==="rtl"){if(Yn!==void 0){var qr=oo&&oo.fixed==="left";gr=!qr&&dr}else if(Ci!==void 0){var Yr=ar&&ar.fixed==="right";xr=!Yr&&dr}}else if(Yn!==void 0){var So=ar&&ar.fixed==="left";Bi=!So&&dr}else if(Ci!==void 0){var $o=oo&&oo.fixed==="right";bi=!$o&&dr}return{fixLeft:Yn,fixRight:Ci,lastFixLeft:Bi,firstFixRight:bi,lastFixRight:xr,firstFixLeft:gr,isSticky:ln.isSticky}}var ti=Me.createContext({}),gi=ti;function Pn(ft){var St=ft.className,nn=ft.index,ln=ft.children,Dn=ft.colSpan,Sn=Dn===void 0?1:Dn,ni=ft.rowSpan,ii=ft.align,Yn=Ye(Fe,["prefixCls","direction"]),Ci=Yn.prefixCls,Bi=Yn.direction,bi=Me.useContext(gi),xr=bi.scrollColumnIndex,gr=bi.stickyOffsets,ar=bi.flattenColumns,oo=bi.columns,dr=nn+Sn-1,qr=dr+1===xr?Sn+1:Sn,Yr=Lt(nn,nn+qr-1,ar,gr,Bi,oo==null?void 0:oo[nn]);return Me.createElement(sn,(0,st.Z)({className:St,index:nn,component:"td",prefixCls:Ci,record:null,dataIndex:null,align:ii,colSpan:qr,rowSpan:ni,render:function(){return ln}},Yr))}var Xt=me(19149),Kt=["children"];function Ot(ft){var St=ft.children,nn=(0,Xt.Z)(ft,Kt);return Me.createElement("tr",nn,St)}function rt(ft){var St=ft.children;return St}rt.Row=Ot,rt.Cell=Pn;var Ue=rt;function $t(ft){var St=ft.children,nn=ft.stickyOffsets,ln=ft.flattenColumns,Dn=ft.columns,Sn=Ye(Fe,"prefixCls"),ni=ln.length-1,ii=ln[ni],Yn=Me.useMemo(function(){return{stickyOffsets:nn,flattenColumns:ln,scrollColumnIndex:ii!=null&&ii.scrollbar?ni:null,columns:Dn}},[ii,ln,ni,nn,Dn]);return Me.createElement(gi.Provider,{value:Yn},Me.createElement("tfoot",{className:"".concat(Sn,"-summary")},St))}var Gt=ve($t),it=Ue,at=me(80764),Te=me(29301),Pe=me(48886),ye=me(24387),ke=me(59055),$e=me(36994);function Le(ft,St,nn,ln,Dn,Sn,ni){ft.push({record:St,indent:nn,index:ni});var ii=Sn(St),Yn=Dn==null?void 0:Dn.has(ii);if(St&&Array.isArray(St[ln])&&Yn)for(var Ci=0;Ci<St[ln].length;Ci+=1)Le(ft,St[ln][Ci],nn+1,ln,Dn,Sn,Ci)}function vt(ft,St,nn,ln){var Dn=Me.useMemo(function(){if(nn!=null&&nn.size){for(var Sn=[],ni=0;ni<(ft==null?void 0:ft.length);ni+=1){var ii=ft[ni];Le(Sn,ii,0,St,nn,ln,ni)}return Sn}return ft==null?void 0:ft.map(function(Yn,Ci){return{record:Yn,indent:0,index:Ci}})},[ft,St,nn,ln]);return Dn}function an(ft){var St=ft.prefixCls,nn=ft.children,ln=ft.component,Dn=ft.cellComponent,Sn=ft.className,ni=ft.expanded,ii=ft.colSpan,Yn=ft.isEmpty,Ci=Ye(Fe,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Bi=Ci.scrollbarSize,bi=Ci.fixHeader,xr=Ci.fixColumn,gr=Ci.componentWidth,ar=Ci.horizonScroll,oo=nn;return(Yn?ar&&gr:xr)&&(oo=Me.createElement("div",{style:{width:gr-(bi?Bi:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(St,"-expanded-row-fixed")},oo)),Me.createElement(ln,{className:Sn,style:{display:ni?null:"none"}},Me.createElement(sn,{component:Dn,prefixCls:St,colSpan:ii},oo))}var bn=an;function en(ft,St,nn,ln){var Dn=Ye(Fe,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Sn=Dn.flattenColumns,ni=Dn.expandableType,ii=Dn.expandedKeys,Yn=Dn.childrenColumnName,Ci=Dn.onTriggerExpand,Bi=Dn.rowExpandable,bi=Dn.onRow,xr=Dn.expandRowByClick,gr=Dn.rowClassName,ar=ni==="nest",oo=ni==="row"&&(!Bi||Bi(ft)),dr=oo||ar,qr=ii&&ii.has(St),Yr=Yn&&ft&&ft[Yn],So=(0,at.useEvent)(Ci),$o=bi==null?void 0:bi(ft,nn),la=$o==null?void 0:$o.onClick,so=function(ko){xr&&dr&&Ci(ft,ko);for(var po=arguments.length,kr=new Array(po>1?po-1:0),Fo=1;Fo<po;Fo++)kr[Fo-1]=arguments[Fo];la==null||la.apply(void 0,[ko].concat(kr))},Ho;typeof gr=="string"?Ho=gr:typeof gr=="function"&&(Ho=gr(ft,nn,ln));var Na=Tt(Sn);return(0,dt.Z)((0,dt.Z)({},Dn),{},{columnsKey:Na,nestExpandable:ar,expanded:qr,hasNestChildren:Yr,record:ft,onTriggerExpand:So,rowSupportExpand:oo,expandable:dr,rowProps:(0,dt.Z)((0,dt.Z)({},$o),{},{className:et()(Ho,$o==null?void 0:$o.className),onClick:so})})}function wn(ft,St,nn,ln,Dn){var Sn=ft.record,ni=ft.prefixCls,ii=ft.columnsKey,Yn=ft.fixedInfoList,Ci=ft.expandIconColumnIndex,Bi=ft.nestExpandable,bi=ft.indentSize,xr=ft.expandIcon,gr=ft.expanded,ar=ft.hasNestChildren,oo=ft.onTriggerExpand,dr=ii[nn],qr=Yn[nn],Yr;nn===(Ci||0)&&Bi&&(Yr=Me.createElement(Me.Fragment,null,Me.createElement("span",{style:{paddingLeft:"".concat(bi*ln,"px")},className:"".concat(ni,"-row-indent indent-level-").concat(ln)}),xr({prefixCls:ni,expanded:gr,expandable:ar,record:Sn,onExpand:oo})));var So;return St.onCell&&(So=St.onCell(Sn,Dn)),{key:dr,fixedInfo:qr,appendCellNode:Yr,additionalCellProps:So||{}}}function ai(ft){var St=ft.className,nn=ft.style,ln=ft.record,Dn=ft.index,Sn=ft.renderIndex,ni=ft.rowKey,ii=ft.indent,Yn=ii===void 0?0:ii,Ci=ft.rowComponent,Bi=ft.cellComponent,bi=ft.scopeCellComponent,xr=en(ln,ni,Dn,Yn),gr=xr.prefixCls,ar=xr.flattenColumns,oo=xr.expandedRowClassName,dr=xr.expandedRowRender,qr=xr.rowProps,Yr=xr.expanded,So=xr.rowSupportExpand,$o=Me.useState(!1),la=(0,Ze.Z)($o,2),so=la[0],Ho=la[1];Me.useEffect(function(){Yr&&Ho(!0)},[Yr]);var Na=Me.createElement(Ci,(0,st.Z)({},qr,{"data-row-key":ni,className:et()(St,"".concat(gr,"-row"),"".concat(gr,"-row-level-").concat(Yn),qr==null?void 0:qr.className),style:(0,dt.Z)((0,dt.Z)({},nn),qr==null?void 0:qr.style)}),ar.map(function(kr,Fo){var qo=kr.render,ma=kr.dataIndex,va=kr.className,lo=wn(xr,kr,Fo,Yn,Dn),Ba=lo.key,Wa=lo.fixedInfo,Ps=lo.appendCellNode,is=lo.additionalCellProps;return Me.createElement(sn,(0,st.Z)({className:va,ellipsis:kr.ellipsis,align:kr.align,scope:kr.rowScope,component:kr.rowScope?bi:Bi,prefixCls:gr,key:Ba,record:ln,index:Dn,renderIndex:Sn,dataIndex:ma,render:qo,shouldCellUpdate:kr.shouldCellUpdate},Wa,{appendNode:Ps,additionalProps:is}))})),fo;if(So&&(so||Yr)){var ko=dr(ln,Dn,Yn+1,Yr),po=oo&&oo(ln,Dn,Yn);fo=Me.createElement(bn,{expanded:Yr,className:et()("".concat(gr,"-expanded-row"),"".concat(gr,"-expanded-row-level-").concat(Yn+1),po),prefixCls:gr,component:Ci,cellComponent:Bi,colSpan:ar.length,isEmpty:!1},ko)}return Me.createElement(Me.Fragment,null,Na,fo)}ai.displayName="BodyRow";var _n=ve(ai);function Hn(ft){var St=ft.columnKey,nn=ft.onColumnResize,ln=Me.useRef();return Me.useEffect(function(){ln.current&&nn(St,ln.current.offsetWidth)},[]),Me.createElement(Te.Z,{data:St},Me.createElement("td",{ref:ln,style:{padding:0,border:0,height:0}},Me.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function wi(ft){var St=ft.prefixCls,nn=ft.columnsKey,ln=ft.onColumnResize;return Me.createElement("tr",{"aria-hidden":"true",className:"".concat(St,"-measure-row"),style:{height:0,fontSize:0}},Me.createElement(Te.Z.Collection,{onBatchResize:function(Sn){Sn.forEach(function(ni){var ii=ni.data,Yn=ni.size;ln(ii,Yn.offsetWidth)})}},nn.map(function(Dn){return Me.createElement(Hn,{key:Dn,columnKey:Dn,onColumnResize:ln})})))}function Hi(ft){var St=ft.data,nn=ft.measureColumnWidth,ln=Ye(Fe,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Dn=ln.prefixCls,Sn=ln.getComponent,ni=ln.onColumnResize,ii=ln.flattenColumns,Yn=ln.getRowKey,Ci=ln.expandedKeys,Bi=ln.childrenColumnName,bi=ln.emptyNode,xr=vt(St,Bi,Ci,Yn),gr=Me.useRef({renderWithProps:!1}),ar=Sn(["body","wrapper"],"tbody"),oo=Sn(["body","row"],"tr"),dr=Sn(["body","cell"],"td"),qr=Sn(["body","cell"],"th"),Yr;St.length?Yr=xr.map(function($o,la){var so=$o.record,Ho=$o.indent,Na=$o.index,fo=Yn(so,la);return Me.createElement(_n,{key:fo,rowKey:fo,record:so,index:la,renderIndex:Na,rowComponent:oo,cellComponent:dr,scopeCellComponent:qr,getRowKey:Yn,indent:Ho})}):Yr=Me.createElement(bn,{expanded:!0,className:"".concat(Dn,"-placeholder"),prefixCls:Dn,component:oo,cellComponent:dr,colSpan:ii.length,isEmpty:!0},bi);var So=Tt(ii);return Me.createElement(Nt.Provider,{value:gr.current},Me.createElement(ar,{className:"".concat(Dn,"-tbody")},nn&&Me.createElement(wi,{prefixCls:Dn,columnsKey:So,onColumnResize:ni}),Yr))}Hi.displayName="Body";var _i=ve(Hi),cr=["expandable"],_r="RC_TABLE_INTERNAL_COL_DEFINE";function vi(ft){var St=ft.expandable,nn=(0,Xt.Z)(ft,cr),ln;return"expandable"in ft?ln=(0,dt.Z)((0,dt.Z)({},nn),St):ln=nn,ln.showExpandColumn===!1&&(ln.expandIconColumnIndex=-1),ln}var si=["columnType"];function fi(ft){for(var St=ft.colWidths,nn=ft.columns,ln=ft.columCount,Dn=[],Sn=ln||nn.length,ni=!1,ii=Sn-1;ii>=0;ii-=1){var Yn=St[ii],Ci=nn&&nn[ii],Bi=Ci&&Ci[_r];if(Yn||Bi||ni){var bi=Bi||{},xr=bi.columnType,gr=(0,Xt.Z)(bi,si);Dn.unshift(Me.createElement("col",(0,st.Z)({key:ii,style:{width:Yn}},gr))),ni=!0}}return Me.createElement("colgroup",null,Dn)}var Ui=fi,Fi=me(26390),ao=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function wr(ft,St){return(0,Me.useMemo)(function(){for(var nn=[],ln=0;ln<St;ln+=1){var Dn=ft[ln];if(Dn!==void 0)nn[ln]=Dn;else return null}return nn},[ft.join("_"),St])}var Be=Me.forwardRef(function(ft,St){var nn=ft.className,ln=ft.noData,Dn=ft.columns,Sn=ft.flattenColumns,ni=ft.colWidths,ii=ft.columCount,Yn=ft.stickyOffsets,Ci=ft.direction,Bi=ft.fixHeader,bi=ft.stickyTopOffset,xr=ft.stickyBottomOffset,gr=ft.stickyClassName,ar=ft.onScroll,oo=ft.maxContentScroll,dr=ft.children,qr=(0,Xt.Z)(ft,ao),Yr=Ye(Fe,["prefixCls","scrollbarSize","isSticky"]),So=Yr.prefixCls,$o=Yr.scrollbarSize,la=Yr.isSticky,so=la&&!Bi?0:$o,Ho=Me.useRef(null),Na=Me.useCallback(function(va){(0,pt.mH)(St,va),(0,pt.mH)(Ho,va)},[]);Me.useEffect(function(){var va;function lo(Ba){var Wa=Ba,Ps=Wa.currentTarget,is=Wa.deltaX;is&&(ar({currentTarget:Ps,scrollLeft:Ps.scrollLeft+is}),Ba.preventDefault())}return(va=Ho.current)===null||va===void 0||va.addEventListener("wheel",lo),function(){var Ba;(Ba=Ho.current)===null||Ba===void 0||Ba.removeEventListener("wheel",lo)}},[]);var fo=Me.useMemo(function(){return Sn.every(function(va){return va.width})},[Sn]),ko=Sn[Sn.length-1],po={fixed:ko?ko.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(So,"-cell-scrollbar")}}},kr=(0,Me.useMemo)(function(){return so?[].concat((0,Fi.Z)(Dn),[po]):Dn},[so,Dn]),Fo=(0,Me.useMemo)(function(){return so?[].concat((0,Fi.Z)(Sn),[po]):Sn},[so,Sn]),qo=(0,Me.useMemo)(function(){var va=Yn.right,lo=Yn.left;return(0,dt.Z)((0,dt.Z)({},Yn),{},{left:Ci==="rtl"?[].concat((0,Fi.Z)(lo.map(function(Ba){return Ba+so})),[0]):lo,right:Ci==="rtl"?va:[].concat((0,Fi.Z)(va.map(function(Ba){return Ba+so})),[0]),isSticky:la})},[so,Yn,la]),ma=wr(ni,ii);return Me.createElement("div",{style:(0,dt.Z)({overflow:"hidden"},la?{top:bi,bottom:xr}:{}),ref:Na,className:et()(nn,(0,He.Z)({},gr,!!gr))},Me.createElement("table",{style:{tableLayout:"fixed",visibility:ln||ma?null:"hidden"}},(!ln||!oo||fo)&&Me.createElement(Ui,{colWidths:ma?[].concat((0,Fi.Z)(ma),[so]):[],columCount:ii+1,columns:Fo}),dr((0,dt.Z)((0,dt.Z)({},qr),{},{stickyOffsets:qo,columns:kr,flattenColumns:Fo}))))});Be.displayName="FixedHolder";var Xr=Me.memo(Be);function Hr(ft){var St=ft.cells,nn=ft.stickyOffsets,ln=ft.flattenColumns,Dn=ft.rowComponent,Sn=ft.cellComponent,ni=ft.tdCellComponent,ii=ft.onHeaderRow,Yn=ft.index,Ci=Ye(Fe,["prefixCls","direction"]),Bi=Ci.prefixCls,bi=Ci.direction,xr;ii&&(xr=ii(St.map(function(ar){return ar.column}),Yn));var gr=Tt(St.map(function(ar){return ar.column}));return Me.createElement(Dn,xr,St.map(function(ar,oo){var dr=ar.column,qr=Lt(ar.colStart,ar.colEnd,ln,nn,bi,dr),Yr;return dr&&dr.onHeaderCell&&(Yr=ar.column.onHeaderCell(dr)),Me.createElement(sn,(0,st.Z)({},ar,{scope:dr.title?ar.colSpan>1?"colgroup":"col":null,ellipsis:dr.ellipsis,align:dr.align,component:dr.title?Sn:ni,prefixCls:Bi,key:gr[oo]},qr,{additionalProps:Yr,rowType:"header"}))}))}Hr.displayName="HeaderRow";var jn=Hr;function Li(ft){var St=[];function nn(ni,ii){var Yn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;St[Yn]=St[Yn]||[];var Ci=ii,Bi=ni.filter(Boolean).map(function(bi){var xr={key:bi.key,className:bi.className||"",children:bi.title,column:bi,colStart:Ci},gr=1,ar=bi.children;return ar&&ar.length>0&&(gr=nn(ar,Ci,Yn+1).reduce(function(oo,dr){return oo+dr},0),xr.hasSubColumns=!0),"colSpan"in bi&&(gr=bi.colSpan),"rowSpan"in bi&&(xr.rowSpan=bi.rowSpan),xr.colSpan=gr,xr.colEnd=xr.colStart+gr-1,St[Yn].push(xr),Ci+=gr,gr});return Bi}nn(ft,0);for(var ln=St.length,Dn=function(ii){St[ii].forEach(function(Yn){!("rowSpan"in Yn)&&!Yn.hasSubColumns&&(Yn.rowSpan=ln-ii)})},Sn=0;Sn<ln;Sn+=1)Dn(Sn);return St}function Wi(ft){var St=ft.stickyOffsets,nn=ft.columns,ln=ft.flattenColumns,Dn=ft.onHeaderRow,Sn=Ye(Fe,["prefixCls","getComponent"]),ni=Sn.prefixCls,ii=Sn.getComponent,Yn=Me.useMemo(function(){return Li(nn)},[nn]),Ci=ii(["header","wrapper"],"thead"),Bi=ii(["header","row"],"tr"),bi=ii(["header","cell"],"th"),xr=ii(["header","cell"],"td");return Me.createElement(Ci,{className:"".concat(ni,"-thead")},Yn.map(function(gr,ar){var oo=Me.createElement(jn,{key:ar,flattenColumns:ln,cells:gr,stickyOffsets:St,rowComponent:Bi,cellComponent:bi,tdCellComponent:xr,onHeaderRow:Dn,index:ar});return oo}))}var ji=ve(Wi),Gn=me(38298);function Ht(ft){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof St=="number"?St:St.endsWith("%")?ft*parseFloat(St)/100:null}function Wt(ft,St){return Me.useMemo(function(){if(St&&St>0){var nn=0,ln=0;ft.forEach(function(Ci){var Bi=Ht(St,Ci.width);Bi?nn+=Bi:ln+=1});var Dn=St-nn,Sn=ln,ni=Dn/ln,ii=0,Yn=ft.map(function(Ci){var Bi=(0,dt.Z)({},Ci),bi=Ht(St,Bi.width);if(bi)Bi.width=bi;else{var xr=Math.floor(ni);Bi.width=Sn===1?Dn:xr,Dn-=xr,Sn-=1}return ii+=Bi.width,Bi});return[Yn,ii]}return[ft,St]},[ft,St])}var Zt=["children"],yt=["fixed"];function un(ft){return(0,Gn.Z)(ft).filter(function(St){return Me.isValidElement(St)}).map(function(St){var nn=St.key,ln=St.props,Dn=ln.children,Sn=(0,Xt.Z)(ln,Zt),ni=(0,dt.Z)({key:nn},Sn);return Dn&&(ni.children=un(Dn)),ni})}function vn(ft){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return ft.filter(function(nn){return nn&&(0,Je.Z)(nn)==="object"}).reduce(function(nn,ln,Dn){var Sn=ln.fixed,ni=Sn===!0?"left":Sn,ii="".concat(St,"-").concat(Dn),Yn=ln.children;return Yn&&Yn.length>0?[].concat((0,Fi.Z)(nn),(0,Fi.Z)(vn(Yn,ii).map(function(Ci){return(0,dt.Z)({fixed:ni},Ci)}))):[].concat((0,Fi.Z)(nn),[(0,dt.Z)((0,dt.Z)({key:ii},ln),{},{fixed:ni})])},[])}function At(ft){for(var St=!0,nn=0;nn<ft.length;nn+=1){var ln=ft[nn];if(St&&ln.fixed!=="left")St=!1;else if(!St&&ln.fixed==="left"){warning(!1,"Index ".concat(nn-1," of `columns` missing `fixed='left'` prop."));break}}for(var Dn=!0,Sn=ft.length-1;Sn>=0;Sn-=1){var ni=ft[Sn];if(Dn&&ni.fixed!=="right")Dn=!1;else if(!Dn&&ni.fixed==="right"){warning(!1,"Index ".concat(Sn+1," of `columns` missing `fixed='right'` prop."));break}}}function nt(ft){return ft.map(function(St){var nn=St.fixed,ln=(0,Xt.Z)(St,yt),Dn=nn;return nn==="left"?Dn="right":nn==="right"&&(Dn="left"),(0,dt.Z)({fixed:Dn},ln)})}function on(ft,St){var nn=ft.prefixCls,ln=ft.columns,Dn=ft.children,Sn=ft.expandable,ni=ft.expandedKeys,ii=ft.columnTitle,Yn=ft.getRowKey,Ci=ft.onTriggerExpand,Bi=ft.expandIcon,bi=ft.rowExpandable,xr=ft.expandIconColumnIndex,gr=ft.direction,ar=ft.expandRowByClick,oo=ft.columnWidth,dr=ft.fixed,qr=ft.scrollWidth,Yr=Me.useMemo(function(){return ln||un(Dn)},[ln,Dn]),So=Me.useMemo(function(){if(Sn){var ko,po=Yr.slice();if(!po.includes(ue)){var kr=xr||0;kr>=0&&po.splice(kr,0,ue)}var Fo=po.indexOf(ue);po=po.filter(function(lo,Ba){return lo!==ue||Ba===Fo});var qo=Yr[Fo],ma;(dr==="left"||dr)&&!xr?ma="left":(dr==="right"||dr)&&xr===Yr.length?ma="right":ma=qo?qo.fixed:null;var va=(ko={},(0,He.Z)(ko,_r,{className:"".concat(nn,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,He.Z)(ko,"title",ii),(0,He.Z)(ko,"fixed",ma),(0,He.Z)(ko,"className","".concat(nn,"-row-expand-icon-cell")),(0,He.Z)(ko,"width",oo),(0,He.Z)(ko,"render",function(Ba,Wa,Ps){var is=Yn(Wa,Ps),il=ni.has(is),Ls=bi?bi(Wa):!0,_a=Bi({prefixCls:nn,expanded:il,expandable:Ls,record:Wa,onExpand:Ci});return ar?Me.createElement("span",{onClick:function(as){return as.stopPropagation()}},_a):_a}),ko);return po.map(function(lo){return lo===ue?va:lo})}return Yr.filter(function(lo){return lo!==ue})},[Sn,Yr,Yn,ni,Bi,gr]),$o=Me.useMemo(function(){var ko=So;return St&&(ko=St(ko)),ko.length||(ko=[{render:function(){return null}}]),ko},[St,So,gr]),la=Me.useMemo(function(){return gr==="rtl"?nt(vn($o)):vn($o)},[$o,gr,qr]),so=Wt(la,qr),Ho=(0,Ze.Z)(so,2),Na=Ho[0],fo=Ho[1];return[$o,Na,fo]}var fn=on;function Jn(ft){var St,nn=ft.prefixCls,ln=ft.record,Dn=ft.onExpand,Sn=ft.expanded,ni=ft.expandable,ii="".concat(nn,"-row-expand-icon");if(!ni)return Me.createElement("span",{className:et()(ii,"".concat(nn,"-row-spaced"))});var Yn=function(Bi){Dn(ln,Bi),Bi.stopPropagation()};return Me.createElement("span",{className:et()(ii,(St={},(0,He.Z)(St,"".concat(nn,"-row-expanded"),Sn),(0,He.Z)(St,"".concat(nn,"-row-collapsed"),!Sn),St)),onClick:Yn})}function pn(ft,St,nn){var ln=[];function Dn(Sn){(Sn||[]).forEach(function(ni,ii){ln.push(St(ni,ii)),Dn(ni[nn])})}return Dn(ft),ln}function Rt(ft,St,nn){var ln=vi(ft),Dn=ln.expandIcon,Sn=ln.expandedRowKeys,ni=ln.defaultExpandedRowKeys,ii=ln.defaultExpandAllRows,Yn=ln.expandedRowRender,Ci=ln.onExpand,Bi=ln.onExpandedRowsChange,bi=ln.childrenColumnName,xr=Dn||Jn,gr=bi||"children",ar=Me.useMemo(function(){return Yn?"row":ft.expandable&&ft.internalHooks===Re&&ft.expandable.__PARENT_RENDER_ICON__||St.some(function(la){return la&&(0,Je.Z)(la)==="object"&&la[gr]})?"nest":!1},[!!Yn,St]),oo=Me.useState(function(){return ni||(ii?pn(St,nn,gr):[])}),dr=(0,Ze.Z)(oo,2),qr=dr[0],Yr=dr[1],So=Me.useMemo(function(){return new Set(Sn||qr||[])},[Sn,qr]),$o=Me.useCallback(function(la){var so=nn(la,St.indexOf(la)),Ho,Na=So.has(so);Na?(So.delete(so),Ho=(0,Fi.Z)(So)):Ho=[].concat((0,Fi.Z)(So),[so]),Yr(Ho),Ci&&Ci(!Na,la),Bi&&Bi(Ho)},[nn,So,St,Ci,Bi]);return[ln,ar,So,xr,gr,$o]}function In(ft,St,nn,ln){var Dn=ft.map(function(Sn,ni){return Lt(ni,ni,ft,St,nn,ln==null?void 0:ln[ni])});return(0,It.Z)(function(){return Dn},[Dn],function(Sn,ni){return!(0,lt.Z)(Sn,ni)})}function Vn(ft){var St=(0,Me.useRef)(ft),nn=(0,Me.useState)({}),ln=(0,Ze.Z)(nn,2),Dn=ln[1],Sn=(0,Me.useRef)(null),ni=(0,Me.useRef)([]);function ii(Yn){ni.current.push(Yn);var Ci=Promise.resolve();Sn.current=Ci,Ci.then(function(){if(Sn.current===Ci){var Bi=ni.current,bi=St.current;ni.current=[],Bi.forEach(function(xr){St.current=xr(St.current)}),Sn.current=null,bi!==St.current&&Dn({})}})}return(0,Me.useEffect)(function(){return function(){Sn.current=null}},[]),[St.current,ii]}function Pi(ft){var St=(0,Me.useRef)(ft||null),nn=(0,Me.useRef)();function ln(){window.clearTimeout(nn.current)}function Dn(ni){St.current=ni,ln(),nn.current=window.setTimeout(function(){St.current=null,nn.current=void 0},100)}function Sn(){return St.current}return(0,Me.useEffect)(function(){return ln},[]),[Dn,Sn]}function tn(){var ft=Me.useState(-1),St=(0,Ze.Z)(ft,2),nn=St[0],ln=St[1],Dn=Me.useState(-1),Sn=(0,Ze.Z)(Dn,2),ni=Sn[0],ii=Sn[1],Yn=Me.useCallback(function(Ci,Bi){ln(Ci),ii(Bi)},[]);return[nn,ni,Yn]}var hn=me(87746),Rn=(0,hn.Z)()?window:null;function Oi(ft,St){var nn=(0,Je.Z)(ft)==="object"?ft:{},ln=nn.offsetHeader,Dn=ln===void 0?0:ln,Sn=nn.offsetSummary,ni=Sn===void 0?0:Sn,ii=nn.offsetScroll,Yn=ii===void 0?0:ii,Ci=nn.getContainer,Bi=Ci===void 0?function(){return Rn}:Ci,bi=Bi()||Rn;return Me.useMemo(function(){var xr=!!ft;return{isSticky:xr,stickyClassName:xr?"".concat(St,"-sticky-holder"):"",offsetHeader:Dn,offsetSummary:ni,offsetScroll:Yn,container:bi}},[Yn,Dn,ni,St,bi])}function Ii(ft,St,nn){var ln=(0,Me.useMemo)(function(){for(var Dn=[],Sn=[],ni=0,ii=0,Yn=0;Yn<St;Yn+=1)if(nn==="rtl"){Sn[Yn]=ii,ii+=ft[Yn]||0;var Ci=St-Yn-1;Dn[Ci]=ni,ni+=ft[Ci]||0}else{Dn[Yn]=ni,ni+=ft[Yn]||0;var Bi=St-Yn-1;Sn[Bi]=ii,ii+=ft[Bi]||0}return{left:Dn,right:Sn}},[ft,St,nn]);return ln}var Si=Ii;function Ni(ft){var St=ft.className,nn=ft.children;return Me.createElement("div",{className:St},nn)}var Zi=Ni,sr=me(8178),Wr=me(21783),li=function(St,nn){var ln,Dn,Sn=St.scrollBodyRef,ni=St.onScroll,ii=St.offsetScroll,Yn=St.container,Ci=Ye(Fe,"prefixCls"),Bi=((ln=Sn.current)===null||ln===void 0?void 0:ln.scrollWidth)||0,bi=((Dn=Sn.current)===null||Dn===void 0?void 0:Dn.clientWidth)||0,xr=Bi&&bi*(bi/Bi),gr=Me.useRef(),ar=Vn({scrollLeft:0,isHiddenScrollBar:!1}),oo=(0,Ze.Z)(ar,2),dr=oo[0],qr=oo[1],Yr=Me.useRef({delta:0,x:0}),So=Me.useState(!1),$o=(0,Ze.Z)(So,2),la=$o[0],so=$o[1],Ho=function(){so(!1)},Na=function(Fo){Fo.persist(),Yr.current.delta=Fo.pageX-dr.scrollLeft,Yr.current.x=0,so(!0),Fo.preventDefault()},fo=function(Fo){var qo,ma=Fo||((qo=window)===null||qo===void 0?void 0:qo.event),va=ma.buttons;if(!la||va===0){la&&so(!1);return}var lo=Yr.current.x+Fo.pageX-Yr.current.x-Yr.current.delta;lo<=0&&(lo=0),lo+xr>=bi&&(lo=bi-xr),ni({scrollLeft:lo/bi*(Bi+2)}),Yr.current.x=Fo.pageX},ko=function(){if(Sn.current){var Fo=(0,Wr.os)(Sn.current).top,qo=Fo+Sn.current.offsetHeight,ma=Yn===window?document.documentElement.scrollTop+window.innerHeight:(0,Wr.os)(Yn).top+Yn.clientHeight;qo-(0,ke.Z)()<=ma||Fo>=ma-ii?qr(function(va){return(0,dt.Z)((0,dt.Z)({},va),{},{isHiddenScrollBar:!0})}):qr(function(va){return(0,dt.Z)((0,dt.Z)({},va),{},{isHiddenScrollBar:!1})})}},po=function(Fo){qr(function(qo){return(0,dt.Z)((0,dt.Z)({},qo),{},{scrollLeft:Fo/Bi*bi||0})})};return Me.useImperativeHandle(nn,function(){return{setScrollLeft:po}}),Me.useEffect(function(){var kr=(0,sr.Z)(document.body,"mouseup",Ho,!1),Fo=(0,sr.Z)(document.body,"mousemove",fo,!1);return ko(),function(){kr.remove(),Fo.remove()}},[xr,la]),Me.useEffect(function(){var kr=(0,sr.Z)(Yn,"scroll",ko,!1),Fo=(0,sr.Z)(window,"resize",ko,!1);return function(){kr.remove(),Fo.remove()}},[Yn]),Me.useEffect(function(){dr.isHiddenScrollBar||qr(function(kr){var Fo=Sn.current;return Fo?(0,dt.Z)((0,dt.Z)({},kr),{},{scrollLeft:Fo.scrollLeft/Fo.scrollWidth*Fo.clientWidth}):kr})},[dr.isHiddenScrollBar]),Bi<=bi||!xr||dr.isHiddenScrollBar?null:Me.createElement("div",{style:{height:(0,ke.Z)(),width:bi,bottom:ii},className:"".concat(Ci,"-sticky-scroll")},Me.createElement("div",{onMouseDown:Na,ref:gr,className:et()("".concat(Ci,"-sticky-scroll-bar"),(0,He.Z)({},"".concat(Ci,"-sticky-scroll-bar-active"),la)),style:{width:"".concat(xr,"px"),transform:"translate3d(".concat(dr.scrollLeft,"px, 0, 0)")}}))},Vi=Me.forwardRef(li);function vo(ft){return null}var Qr=vo;function Er(ft){return null}var qt=Er,pi="rc-table",pr=[],qi={};function $r(){return"No Data"}function Ar(ft){var St,nn=(0,dt.Z)({rowKey:"key",prefixCls:pi,emptyText:$r},ft),ln=nn.prefixCls,Dn=nn.className,Sn=nn.rowClassName,ni=nn.style,ii=nn.data,Yn=nn.rowKey,Ci=nn.scroll,Bi=nn.tableLayout,bi=nn.direction,xr=nn.title,gr=nn.footer,ar=nn.summary,oo=nn.caption,dr=nn.id,qr=nn.showHeader,Yr=nn.components,So=nn.emptyText,$o=nn.onRow,la=nn.onHeaderRow,so=nn.internalHooks,Ho=nn.transformColumns,Na=nn.internalRefs,fo=nn.tailor,ko=nn.sticky,po=ii||pr,kr=!!po.length,Fo=so===Re,qo=Me.useCallback(function(ss,tl){return(0,xt.Z)(Yr,ss)||tl},[Yr]),ma=Me.useMemo(function(){return typeof Yn=="function"?Yn:function(ss){var tl=ss&&ss[Yn];return tl}},[Yn]),va=qo(["body"]),lo=tn(),Ba=(0,Ze.Z)(lo,3),Wa=Ba[0],Ps=Ba[1],is=Ba[2],il=Rt(nn,po,ma),Ls=(0,Ze.Z)(il,6),_a=Ls[0],oa=Ls[1],as=Ls[2],rl=Ls[3],Gs=Ls[4],xl=Ls[5],Pa=Ci==null?void 0:Ci.x,ha=Me.useState(0),ya=(0,Ze.Z)(ha,2),Vo=ya[0],vs=ya[1],Ko=fn((0,dt.Z)((0,dt.Z)((0,dt.Z)({},nn),_a),{},{expandable:!!_a.expandedRowRender,columnTitle:_a.columnTitle,expandedKeys:as,getRowKey:ma,onTriggerExpand:xl,expandIcon:rl,expandIconColumnIndex:_a.expandIconColumnIndex,direction:bi,scrollWidth:Fo&&fo&&typeof Pa=="number"?Pa:null}),Fo?Ho:null),Aa=(0,Ze.Z)(Ko,3),es=Aa[0],rs=Aa[1],zl=Aa[2],Ol=zl!=null?zl:Pa,eu=Me.useMemo(function(){return{columns:es,flattenColumns:rs}},[es,rs]),ws=Me.useRef(),Ul=Me.useRef(),Sl=Me.useRef(),kl=Me.useRef(),Rc=Me.useRef(),Cs=Me.useState(!1),ks=(0,Ze.Z)(Cs,2),bs=ks[0],$s=ks[1],bl=Me.useState(!1),Qa=(0,Ze.Z)(bl,2),Hs=Qa[0],Hl=Qa[1],tu=Vn(new Map),Yu=(0,Ze.Z)(tu,2),_u=Yu[0],El=Yu[1],ju=Tt(rs),zu=ju.map(function(ss){return _u.get(ss)}),Fs=Me.useMemo(function(){return zu},[zu.join("_")]),Yl=Si(Fs,rs.length,bi),Ks=Ci&&Ln(Ci.y),Zs=Ci&&Ln(Ol)||!!_a.fixed,Xu=Zs&&rs.some(function(ss){var tl=ss.fixed;return tl}),Yc=Me.useRef(),cc=Oi(ko,ln),dc=cc.isSticky,Ju=cc.offsetHeader,Hu=cc.offsetSummary,ys=cc.offsetScroll,Qs=cc.stickyClassName,Ml=cc.container,qs=Me.useMemo(function(){return ar==null?void 0:ar(po)},[ar,po]),cs=(Ks||dc)&&Me.isValidElement(qs)&&qs.type===Ue&&qs.props.fixed,Ll,Eu,Sc;Ks&&(Eu={overflowY:"scroll",maxHeight:Ci.y}),Zs&&(Ll={overflowX:"auto"},Ks||(Eu={overflowY:"hidden"}),Sc={width:Ol===!0?"auto":Ol,minWidth:"100%"});var _d=Me.useCallback(function(ss,tl){(0,Pe.Z)(ws.current)&&El(function(uu){if(uu.get(ss)!==tl){var hc=new Map(uu);return hc.set(ss,tl),hc}return uu})},[]),gn=Pi(null),ld=(0,Ze.Z)(gn,2),Fc=ld[0],df=ld[1];function jd(ss,tl){tl&&(typeof tl=="function"?tl(ss):tl.scrollLeft!==ss&&(tl.scrollLeft=ss,tl.scrollLeft!==ss&&setTimeout(function(){tl.scrollLeft=ss},0)))}var zd=(0,ot.Z)(function(ss){var tl=ss.currentTarget,uu=ss.scrollLeft,hc=bi==="rtl",fc=typeof uu=="number"?uu:tl.scrollLeft,Gd=tl||qi;if(!df()||df()===Gd){var dd;Fc(Gd),jd(fc,Ul.current),jd(fc,Sl.current),jd(fc,Rc.current),jd(fc,(dd=Yc.current)===null||dd===void 0?void 0:dd.setScrollLeft)}var mh=tl||Ul.current;if(mh){var Pc=mh.scrollWidth,Jc=mh.clientWidth;if(Pc===Jc){$s(!1),Hl(!1);return}hc?($s(-fc<Pc-Jc),Hl(-fc>0)):($s(fc>0),Hl(fc<Pc-Jc))}}),Rh=function(){Zs&&Sl.current?zd({currentTarget:Sl.current}):($s(!1),Hl(!1))},Qg=function(tl){var uu=tl.width;uu!==Vo&&(Rh(),vs(ws.current?ws.current.offsetWidth:uu))},Tl=Me.useRef(!1);Me.useEffect(function(){Tl.current&&Rh()},[Zs,ii,es.length]),Me.useEffect(function(){Tl.current=!0},[]);var ch=Me.useState(0),Hd=(0,Ze.Z)(ch,2),dh=Hd[0],hf=Hd[1],Zf=Me.useState(!0),hh=(0,Ze.Z)(Zf,2),fh=hh[0],Qu=hh[1];Me.useEffect(function(){(!fo||!Fo)&&(Sl.current instanceof Element?hf((0,ke.o)(Sl.current).width):hf((0,ke.o)(kl.current).width)),Qu((0,ye.G)("position","sticky"))},[]),Me.useEffect(function(){Fo&&Na&&(Na.body.current=Sl.current)});var Zd=Me.useCallback(function(ss){return Me.createElement(Me.Fragment,null,Me.createElement(ji,ss),cs==="top"&&Me.createElement(Gt,ss,qs))},[cs,qs]),ff=Me.useCallback(function(ss){return Me.createElement(Gt,ss,qs)},[qs]),Nc=qo(["table"],"table"),ud=Me.useMemo(function(){return Bi||(Xu?Ol==="max-content"?"auto":"fixed":Ks||dc||rs.some(function(ss){var tl=ss.ellipsis;return tl})?"fixed":"auto")},[Ks,Xu,rs,Bi,dc]),Wd,Ld={colWidths:Fs,columCount:rs.length,stickyOffsets:Yl,onHeaderRow:la,fixHeader:Ks,scroll:Ci},Mu=Me.useMemo(function(){return kr?null:typeof So=="function"?So():So},[kr,So]),Fd=Me.createElement(_i,{data:po,measureColumnWidth:Ks||Zs||dc}),_h=Me.createElement(Ui,{colWidths:rs.map(function(ss){var tl=ss.width;return tl}),columns:rs}),Zu=oo!=null?Me.createElement("caption",{className:"".concat(ln,"-caption")},oo):void 0,Xc=(0,$e.Z)(nn,{data:!0}),gh=(0,$e.Z)(nn,{aria:!0});if(Ks||dc){var ph;typeof va=="function"?(ph=va(po,{scrollbarSize:dh,ref:Sl,onScroll:zd}),Ld.colWidths=rs.map(function(ss,tl){var uu=ss.width,hc=tl===rs.length-1?uu-dh:uu;return typeof hc=="number"&&!Number.isNaN(hc)?hc:0})):ph=Me.createElement("div",{style:(0,dt.Z)((0,dt.Z)({},Ll),Eu),onScroll:zd,ref:Sl,className:et()("".concat(ln,"-body"))},Me.createElement(Nc,(0,st.Z)({style:(0,dt.Z)((0,dt.Z)({},Sc),{},{tableLayout:ud})},gh),Zu,_h,Fd,!cs&&qs&&Me.createElement(Gt,{stickyOffsets:Yl,flattenColumns:rs,columns:es},qs)));var cd=(0,dt.Z)((0,dt.Z)((0,dt.Z)({noData:!po.length,maxContentScroll:Zs&&Ol==="max-content"},Ld),eu),{},{direction:bi,stickyClassName:Qs,onScroll:zd});Wd=Me.createElement(Me.Fragment,null,qr!==!1&&Me.createElement(Xr,(0,st.Z)({},cd,{stickyTopOffset:Ju,className:"".concat(ln,"-header"),ref:Ul}),Zd),ph,cs&&cs!=="top"&&Me.createElement(Xr,(0,st.Z)({},cd,{stickyBottomOffset:Hu,className:"".concat(ln,"-summary"),ref:Rc}),ff),dc&&Me.createElement(Vi,{ref:Yc,offsetScroll:ys,scrollBodyRef:Sl,onScroll:zd,container:Ml}))}else Wd=Me.createElement("div",{style:(0,dt.Z)((0,dt.Z)({},Ll),Eu),className:et()("".concat(ln,"-content")),onScroll:zd,ref:Sl},Me.createElement(Nc,(0,st.Z)({style:(0,dt.Z)((0,dt.Z)({},Sc),{},{tableLayout:ud})},gh),Zu,_h,qr!==!1&&Me.createElement(ji,(0,st.Z)({},Ld,eu)),Fd,qs&&Me.createElement(Gt,{stickyOffsets:Yl,flattenColumns:rs,columns:es},qs)));var gu=Me.createElement("div",(0,st.Z)({className:et()(ln,Dn,(St={},(0,He.Z)(St,"".concat(ln,"-rtl"),bi==="rtl"),(0,He.Z)(St,"".concat(ln,"-ping-left"),bs),(0,He.Z)(St,"".concat(ln,"-ping-right"),Hs),(0,He.Z)(St,"".concat(ln,"-layout-fixed"),Bi==="fixed"),(0,He.Z)(St,"".concat(ln,"-fixed-header"),Ks),(0,He.Z)(St,"".concat(ln,"-fixed-column"),Xu),(0,He.Z)(St,"".concat(ln,"-scroll-horizontal"),Zs),(0,He.Z)(St,"".concat(ln,"-has-fix-left"),rs[0]&&rs[0].fixed),(0,He.Z)(St,"".concat(ln,"-has-fix-right"),rs[rs.length-1]&&rs[rs.length-1].fixed==="right"),St)),style:ni,id:dr,ref:ws},Xc),xr&&Me.createElement(Zi,{className:"".concat(ln,"-title")},xr(po)),Me.createElement("div",{ref:kl,className:"".concat(ln,"-container")},Wd),gr&&Me.createElement(Zi,{className:"".concat(ln,"-footer")},gr(po)));Zs&&(gu=Me.createElement(Te.Z,{onResize:Qg},gu));var jh=In(rs,Yl,bi,es),Rl=Me.useMemo(function(){return{scrollX:Ol,prefixCls:ln,getComponent:qo,scrollbarSize:dh,direction:bi,fixedInfoList:jh,isSticky:dc,supportSticky:fh,componentWidth:Vo,fixHeader:Ks,fixColumn:Xu,horizonScroll:Zs,tableLayout:ud,rowClassName:Sn,expandedRowClassName:_a.expandedRowClassName,expandIcon:rl,expandableType:oa,expandRowByClick:_a.expandRowByClick,expandedRowRender:_a.expandedRowRender,onTriggerExpand:xl,expandIconColumnIndex:_a.expandIconColumnIndex,indentSize:_a.indentSize,allColumnsFixedLeft:rs.every(function(ss){return ss.fixed==="left"}),emptyNode:Mu,columns:es,flattenColumns:rs,onColumnResize:_d,hoverStartRow:Wa,hoverEndRow:Ps,onHover:is,rowExpandable:_a.rowExpandable,onRow:$o,getRowKey:ma,expandedKeys:as,childrenColumnName:Gs}},[Ol,ln,qo,dh,bi,jh,dc,fh,Vo,Ks,Xu,Zs,ud,Sn,_a.expandedRowClassName,rl,oa,_a.expandRowByClick,_a.expandedRowRender,xl,_a.expandIconColumnIndex,_a.indentSize,Mu,es,rs,_d,Wa,Ps,is,_a.rowExpandable,$o,ma,as,Gs]);return Me.createElement(Fe.Provider,{value:Rl},gu)}function io(ft){return he(Ar,ft)}var Kr=io();Kr.EXPAND_COLUMN=ue,Kr.INTERNAL_HOOKS=Re,Kr.Column=Qr,Kr.ColumnGroup=qt,Kr.Summary=it;var jr=Kr,yo=me(70318),$n=Ct(null),Xo=Ct(null);function Kn(ft,St,nn){var ln=St||1;return nn[ft+ln]-(nn[ft]||0)}function Io(ft){var St=ft.rowInfo,nn=ft.column,ln=ft.colIndex,Dn=ft.indent,Sn=ft.index,ni=ft.renderIndex,ii=ft.record,Yn=ft.style,Ci=ft.className,Bi=ft.inverse,bi=ft.getHeight,xr=nn.render,gr=nn.dataIndex,ar=nn.className,oo=nn.width,dr=Ye(Xo,["columnsOffset"]),qr=dr.columnsOffset,Yr=wn(St,nn,ln,Dn,Sn),So=Yr.key,$o=Yr.fixedInfo,la=Yr.appendCellNode,so=Yr.additionalCellProps,Ho=so.style,Na=so.colSpan,fo=Na===void 0?1:Na,ko=so.rowSpan,po=ko===void 0?1:ko,kr=ln-1,Fo=Kn(kr,fo,qr),qo=fo>1?oo-Fo:0,ma=(0,dt.Z)((0,dt.Z)((0,dt.Z)({},Ho),Yn),{},{flex:"0 0 ".concat(Fo,"px"),width:"".concat(Fo,"px"),marginRight:qo,pointerEvents:"auto"}),va=Me.useMemo(function(){return Bi?po<=1:fo===0||po===0||po>1},[po,fo,Bi]);va?ma.visibility="hidden":Bi&&(ma.height=bi==null?void 0:bi(po));var lo=va?function(){return null}:xr,Ba={};return(po===0||fo===0)&&(Ba.rowSpan=1,Ba.colSpan=1),Me.createElement(sn,(0,st.Z)({className:et()(ar,Ci),ellipsis:nn.ellipsis,align:nn.align,scope:nn.rowScope,component:"div",prefixCls:St.prefixCls,key:So,record:ii,index:Sn,renderIndex:ni,dataIndex:gr,render:lo,shouldCellUpdate:nn.shouldCellUpdate},$o,{appendNode:la,additionalProps:(0,dt.Z)((0,dt.Z)({},so),{},{style:ma},Ba)}))}var Jo=Io,Yi=["data","index","className","rowKey","style","extra","getHeight"],ua=Me.forwardRef(function(ft,St){var nn=ft.data,ln=ft.index,Dn=ft.className,Sn=ft.rowKey,ni=ft.style,ii=ft.extra,Yn=ft.getHeight,Ci=(0,Xt.Z)(ft,Yi),Bi=nn.record,bi=nn.indent,xr=nn.index,gr=Ye(Fe,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),ar=gr.scrollX,oo=gr.flattenColumns,dr=gr.prefixCls,qr=gr.fixColumn,Yr=gr.componentWidth,So=en(Bi,Sn,ln,bi),$o=So.rowSupportExpand,la=So.expanded,so=So.rowProps,Ho=So.expandedRowRender,Na=So.expandedRowClassName,fo;if($o&&la){var ko=Ho(Bi,ln,bi+1,la),po=Na==null?void 0:Na(Bi,ln,bi),kr={};qr&&(kr={style:(0,He.Z)({},"--virtual-width","".concat(Yr,"px"))});var Fo="".concat(dr,"-expanded-row-cell");fo=Me.createElement("div",{className:et()("".concat(dr,"-expanded-row"),"".concat(dr,"-expanded-row-level-").concat(bi+1),po)},Me.createElement(sn,{component:"div",prefixCls:dr,className:et()(Fo,(0,He.Z)({},"".concat(Fo,"-fixed"),qr)),additionalProps:kr},ko))}var qo=(0,dt.Z)((0,dt.Z)({},ni),{},{width:ar});ii&&(qo.position="absolute",qo.pointerEvents="none");var ma=Me.createElement("div",(0,st.Z)({},so,Ci,{ref:$o?null:St,className:et()(Dn,"".concat(dr,"-row"),so==null?void 0:so.className,(0,He.Z)({},"".concat(dr,"-row-extra"),ii)),style:(0,dt.Z)((0,dt.Z)({},qo),so==null?void 0:so.style)}),oo.map(function(va,lo){return Me.createElement(Jo,{key:lo,rowInfo:So,column:va,colIndex:lo,indent:bi,index:ln,renderIndex:xr,record:Bi,inverse:ii,getHeight:Yn})}));return $o?Me.createElement("div",{ref:St},ma,fo):ma}),Zo=ve(ua),Dr=Zo,Ir=Me.forwardRef(function(ft,St){var nn=ft.data,ln=ft.onScroll,Dn=Ye(Fe,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),Sn=Dn.flattenColumns,ni=Dn.onColumnResize,ii=Dn.getRowKey,Yn=Dn.expandedKeys,Ci=Dn.prefixCls,Bi=Dn.childrenColumnName,bi=Dn.emptyNode,xr=Dn.scrollX,gr=Ye($n),ar=gr.scrollY,oo=gr.listItemHeight,dr=Me.useRef(),qr=vt(nn,Bi,Yn,ii),Yr=Me.useMemo(function(){var fo=0;return Sn.map(function(ko){var po=ko.width,kr=ko.key;return fo+=po,[kr,po,fo]})},[Sn]),So=Me.useMemo(function(){return Yr.map(function(fo){return fo[2]})},[Yr]);Me.useEffect(function(){Yr.forEach(function(fo){var ko=(0,Ze.Z)(fo,2),po=ko[0],kr=ko[1];ni(po,kr)})},[Yr]),Me.useImperativeHandle(St,function(){var fo={};return Object.defineProperty(fo,"scrollLeft",{get:function(){var po;return((po=dr.current)===null||po===void 0?void 0:po.getScrollInfo().x)||0},set:function(po){var kr;(kr=dr.current)===null||kr===void 0||kr.scrollTo({left:po})}}),fo});var $o=function(ko,po){var kr,Fo=(kr=qr[po])===null||kr===void 0?void 0:kr.record,qo=ko.onCell;if(qo){var ma,va=qo(Fo,po);return(ma=va==null?void 0:va.rowSpan)!==null&&ma!==void 0?ma:1}return 1},la=function(ko){var po=ko.start,kr=ko.end,Fo=ko.getSize,qo=ko.offsetY;if(kr<0)return null;for(var ma=Sn.filter(function(Pa){return $o(Pa,po)===0}),va=po,lo=function(ha){if(ma=ma.filter(function(ya){return $o(ya,ha)===0}),!ma.length)return va=ha,"break"},Ba=po;Ba>=0;Ba-=1){var Wa=lo(Ba);if(Wa==="break")break}for(var Ps=Sn.filter(function(Pa){return $o(Pa,kr)!==1}),is=kr,il=function(ha){if(Ps=Ps.filter(function(ya){return $o(ya,ha)!==1}),!Ps.length)return is=Math.max(ha-1,kr),"break"},Ls=kr;Ls<qr.length;Ls+=1){var _a=il(Ls);if(_a==="break")break}for(var oa=[],as=function(ha){var ya=qr[ha];if(!ya)return"continue";Sn.some(function(Vo){return $o(Vo,ha)>1})&&oa.push(ha)},rl=va;rl<=is;rl+=1)var Gs=as(rl);var xl=oa.map(function(Pa){var ha=qr[Pa],ya=ii(ha.record,Pa),Vo=function(Aa){var es=Pa+Aa-1,rs=ii(qr[es].record,es),zl=Fo(ya,rs);return zl.bottom-zl.top},vs=Fo(ya);return Me.createElement(Dr,{key:Pa,data:ha,rowKey:ya,index:Pa,style:{top:-qo+vs.top},extra:!0,getHeight:Vo})});return xl},so=Me.useMemo(function(){return{columnsOffset:So}},[So]),Ho="".concat(Ci,"-tbody"),Na;return qr.length?Na=Me.createElement(yo.Z,{fullHeight:!1,ref:dr,className:et()(Ho,"".concat(Ho,"-virtual")),height:ar,itemHeight:oo||24,data:qr,itemKey:function(ko){return ii(ko.record)},scrollWidth:xr,onVirtualScroll:function(ko){var po=ko.x;ln({scrollLeft:po})},extraRender:la},function(fo,ko,po){var kr=ii(fo.record,ko);return Me.createElement(Dr,(0,st.Z)({data:fo,rowKey:kr,index:ko},po))}):Na=Me.createElement("div",{className:et()("".concat(Ci,"-placeholder"))},Me.createElement(sn,{component:"div",prefixCls:Ci},bi)),Me.createElement(Xo.Provider,{value:so},Na)}),Do=ve(Ir),_o=Do,Ti=function(St,nn){var ln=nn.ref,Dn=nn.onScroll;return Me.createElement(_o,{ref:ln,data:St,onScroll:Dn})},tt=100;function jo(ft){var St=ft.columns,nn=ft.scroll,ln=ft.prefixCls,Dn=ln===void 0?pi:ln,Sn=ft.className,ni=ft.listItemHeight,ii=nn||{},Yn=ii.x,Ci=ii.y;typeof Yn!="number"&&(Yn=((St||[]).length+1)*tt),typeof Ci!="number"&&(Ci=500);var Bi=Me.useMemo(function(){return{scrollY:Ci,listItemHeight:ni}},[Ci,ni]);return Me.createElement($n.Provider,{value:Bi},Me.createElement(jr,(0,st.Z)({},ft,{className:et()(Sn,"".concat(Dn,"-virtual")),scroll:(0,dt.Z)((0,dt.Z)({},nn),{},{x:Yn}),components:{body:Ti},columns:St,internalHooks:Re,tailor:!0})))}function Ra(ft){return he(jo,ft)}var $a=Ra(),ls=null;function Or(ft){return null}var xo=Or;function na(ft){return null}var Da=na,Ao=me(64002),Va=me(68031),Jr=me(36355),eo=me(93891),Eo=me(19716),ci=me(8628),xa=me(31724),za=me(25700),xs=me(71418),ho=me(88088);function ca(ft){return function(nn){let{prefixCls:ln,onExpand:Dn,record:Sn,expanded:ni,expandable:ii}=nn;const Yn=`${ln}-row-expand-icon`;return Me.createElement("button",{type:"button",onClick:Ci=>{Dn(Sn,Ci),Ci.stopPropagation()},className:et()(Yn,{[`${Yn}-spaced`]:!ii,[`${Yn}-expanded`]:ii&&ni,[`${Yn}-collapsed`]:ii&&!ni}),"aria-label":ni?ft.collapse:ft.expand,"aria-expanded":ni})}}var ja=ca;function hs(ft,St){return"key"in ft&&ft.key!==void 0&&ft.key!==null?ft.key:ft.dataIndex?Array.isArray(ft.dataIndex)?ft.dataIndex.join("."):ft.dataIndex:St}function fs(ft,St){return St?`${St}-${ft}`:`${ft}`}function ll(ft,St){return typeof ft=="function"?ft(St):ft}function Ys(ft,St){const nn=ll(ft,St);return Object.prototype.toString.call(nn)==="[object Object]"?"":nn}var Bn={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"},Es=Bn,Pl=me(88853),Wl=function(St,nn){return Me.createElement(Pl.Z,(0,st.Z)({},St,{ref:nn,icon:Es}))},Mo=Me.forwardRef(Wl),gl=Mo,Tu=me(56762);function Ql(ft){const St=Me.useRef(ft),nn=(0,Tu.Z)();return[()=>St.current,ln=>{St.current=ln,nn()}]}var us=me(3113),Sa=me(24905),Il=me(38854),Wo=me(64165),Ia=me(20834),aa=me(40875),or=me(5112),_s=me(86914),js=me(21970),pl=me(92832);function Xs(ft){let{value:St,onChange:nn,filterSearch:ln,tablePrefixCls:Dn,locale:Sn}=ft;return ln?Me.createElement("div",{className:`${Dn}-filter-dropdown-search`},Me.createElement(pl.default,{prefix:Me.createElement(js.Z,null),placeholder:Sn.filterSearchPlaceholder,onChange:nn,value:St,htmlSize:1,className:`${Dn}-filter-dropdown-search-input`})):null}var hu=Xs,er=me(85108);const Ss=ft=>{const{keyCode:St}=ft;St===er.Z.ENTER&&ft.stopPropagation()};var su=Me.forwardRef((ft,St)=>Me.createElement("div",{className:ft.className,onClick:nn=>nn.stopPropagation(),onKeyDown:Ss,ref:St},ft.children));function fu(ft){let St=[];return(ft||[]).forEach(nn=>{let{value:ln,children:Dn}=nn;St.push(ln),Dn&&(St=[].concat((0,Fi.Z)(St),(0,Fi.Z)(fu(Dn))))}),St}function lu(ft){return ft.some(St=>{let{children:nn}=St;return nn})}function Oo(ft,St){return typeof St=="string"||typeof St=="number"?St==null?void 0:St.toString().toLowerCase().includes(ft.trim().toLowerCase()):!1}function Ru(ft){let{filters:St,prefixCls:nn,filteredKeys:ln,filterMultiple:Dn,searchValue:Sn,filterSearch:ni}=ft;return St.map((ii,Yn)=>{const Ci=String(ii.value);if(ii.children)return{key:Ci||Yn,label:ii.text,popupClassName:`${nn}-dropdown-submenu`,children:Ru({filters:ii.children,prefixCls:nn,filteredKeys:ln,filterMultiple:Dn,searchValue:Sn,filterSearch:ni})};const Bi=Dn?Sa.default:or.ZP,bi={key:ii.value!==void 0?Ci:Yn,label:Me.createElement(Me.Fragment,null,Me.createElement(Bi,{checked:ln.includes(Ci)}),Me.createElement("span",null,ii.text))};return Sn.trim()?typeof ni=="function"?ni(Sn,ii)?bi:null:Oo(Sn,ii.text)?bi:null:bi})}function ul(ft){var St,nn;const{tablePrefixCls:ln,prefixCls:Dn,column:Sn,dropdownPrefixCls:ni,columnKey:ii,filterMultiple:Yn,filterMode:Ci="menu",filterSearch:Bi=!1,filterState:bi,triggerFilter:xr,locale:gr,children:ar,getPopupContainer:oo}=ft,{filterDropdownOpen:dr,onFilterDropdownOpenChange:qr,filterResetToDefaultFilteredValue:Yr,defaultFilteredValue:So,filterDropdownVisible:$o,onFilterDropdownVisibleChange:la}=Sn,[so,Ho]=Me.useState(!1),Na=!!(bi&&(!((St=bi.filteredKeys)===null||St===void 0)&&St.length||bi.forceFiltered)),fo=Ko=>{Ho(Ko),qr==null||qr(Ko),la==null||la(Ko)},ko=(nn=dr!=null?dr:$o)!==null&&nn!==void 0?nn:so,po=bi==null?void 0:bi.filteredKeys,[kr,Fo]=Ql(po||[]),qo=Ko=>{let{selectedKeys:Aa}=Ko;Fo(Aa)},ma=(Ko,Aa)=>{let{node:es,checked:rs}=Aa;qo(Yn?{selectedKeys:Ko}:{selectedKeys:rs&&es.key?[es.key]:[]})};Me.useEffect(()=>{so&&qo({selectedKeys:po||[]})},[po]);const[va,lo]=Me.useState([]),Ba=Ko=>{lo(Ko)},[Wa,Ps]=Me.useState(""),is=Ko=>{const{value:Aa}=Ko.target;Ps(Aa)};Me.useEffect(()=>{so||Ps("")},[so]);const il=Ko=>{const Aa=Ko&&Ko.length?Ko:null;if(Aa===null&&(!bi||!bi.filteredKeys)||(0,lt.Z)(Aa,bi==null?void 0:bi.filteredKeys,!0))return null;xr({column:Sn,key:ii,filteredKeys:Aa})},Ls=()=>{fo(!1),il(kr())},_a=function(){let{confirm:Ko,closeDropdown:Aa}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};Ko&&il([]),Aa&&fo(!1),Ps(""),Fo(Yr?(So||[]).map(es=>String(es)):[])},oa=function(){let{closeDropdown:Ko}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};Ko&&fo(!1),il(kr())},as=Ko=>{Ko&&po!==void 0&&Fo(po||[]),fo(Ko),!Ko&&!Sn.filterDropdown&&Ls()},rl=et()({[`${ni}-menu-without-submenu`]:!lu(Sn.filters||[])}),Gs=Ko=>{if(Ko.target.checked){const Aa=fu(Sn==null?void 0:Sn.filters).map(es=>String(es));Fo(Aa)}else Fo([])},xl=Ko=>{let{filters:Aa}=Ko;return(Aa||[]).map((es,rs)=>{const zl=String(es.value),Ol={title:es.text,key:es.value!==void 0?zl:rs};return es.children&&(Ol.children=xl({filters:es.children})),Ol})},Pa=Ko=>{var Aa;return Object.assign(Object.assign({},Ko),{text:Ko.title,value:Ko.key,children:((Aa=Ko.children)===null||Aa===void 0?void 0:Aa.map(es=>Pa(es)))||[]})};let ha;if(typeof Sn.filterDropdown=="function")ha=Sn.filterDropdown({prefixCls:`${ni}-custom`,setSelectedKeys:Ko=>qo({selectedKeys:Ko}),selectedKeys:kr(),confirm:oa,clearFilters:_a,filters:Sn.filters,visible:ko,close:()=>{fo(!1)}});else if(Sn.filterDropdown)ha=Sn.filterDropdown;else{const Ko=kr()||[],Aa=()=>(Sn.filters||[]).length===0?Me.createElement(Wo.Z,{image:Wo.Z.PRESENTED_IMAGE_SIMPLE,description:gr.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):Ci==="tree"?Me.createElement(Me.Fragment,null,Me.createElement(hu,{filterSearch:Bi,value:Wa,onChange:is,tablePrefixCls:ln,locale:gr}),Me.createElement("div",{className:`${ln}-filter-dropdown-tree`},Yn?Me.createElement(Sa.default,{checked:Ko.length===fu(Sn.filters).length,indeterminate:Ko.length>0&&Ko.length<fu(Sn.filters).length,className:`${ln}-filter-dropdown-checkall`,onChange:Gs},gr.filterCheckall):null,Me.createElement(_s.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:Yn,checkStrictly:!Yn,className:`${ni}-menu`,onCheck:ma,checkedKeys:Ko,selectedKeys:Ko,showIcon:!1,treeData:xl({filters:Sn.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Wa.trim()?rs=>typeof Bi=="function"?Bi(Wa,Pa(rs)):Oo(Wa,rs.title):void 0}))):Me.createElement(Me.Fragment,null,Me.createElement(hu,{filterSearch:Bi,value:Wa,onChange:is,tablePrefixCls:ln,locale:gr}),Me.createElement(Ia.default,{selectable:!0,multiple:Yn,prefixCls:`${ni}-menu`,className:rl,onSelect:qo,onDeselect:qo,selectedKeys:Ko,getPopupContainer:oo,openKeys:va,onOpenChange:Ba,items:Ru({filters:Sn.filters||[],filterSearch:Bi,prefixCls:Dn,filteredKeys:kr(),filterMultiple:Yn,searchValue:Wa})})),es=()=>Yr?(0,lt.Z)((So||[]).map(rs=>String(rs)),Ko,!0):Ko.length===0;ha=Me.createElement(Me.Fragment,null,Aa(),Me.createElement("div",{className:`${Dn}-dropdown-btns`},Me.createElement(us.ZP,{type:"link",size:"small",disabled:es(),onClick:()=>_a()},gr.filterReset),Me.createElement(us.ZP,{type:"primary",size:"small",onClick:Ls},gr.filterConfirm)))}Sn.filterDropdown&&(ha=Me.createElement(aa.J,{selectable:void 0},ha));const ya=()=>Me.createElement(su,{className:`${Dn}-dropdown`},ha);let Vo;typeof Sn.filterIcon=="function"?Vo=Sn.filterIcon(Na):Sn.filterIcon?Vo=Sn.filterIcon:Vo=Me.createElement(gl,null);const{direction:vs}=Me.useContext(Jr.E_);return Me.createElement("div",{className:`${Dn}-column`},Me.createElement("span",{className:`${ln}-column-title`},ar),Me.createElement(Il.Z,{dropdownRender:ya,trigger:["click"],open:ko,onOpenChange:as,getPopupContainer:oo,placement:vs==="rtl"?"bottomLeft":"bottomRight"},Me.createElement("span",{role:"button",tabIndex:-1,className:et()(`${Dn}-trigger`,{active:Na}),onClick:Ko=>{Ko.stopPropagation()}},Vo)))}var zs=ul;function wl(ft,St,nn){let ln=[];return(ft||[]).forEach((Dn,Sn)=>{var ni;const ii=fs(Sn,nn);if(Dn.filters||"filterDropdown"in Dn||"onFilter"in Dn)if("filteredValue"in Dn){let Yn=Dn.filteredValue;"filterDropdown"in Dn||(Yn=(ni=Yn==null?void 0:Yn.map(String))!==null&&ni!==void 0?ni:Yn),ln.push({column:Dn,key:hs(Dn,ii),filteredKeys:Yn,forceFiltered:Dn.filtered})}else ln.push({column:Dn,key:hs(Dn,ii),filteredKeys:St&&Dn.defaultFilteredValue?Dn.defaultFilteredValue:void 0,forceFiltered:Dn.filtered});"children"in Dn&&(ln=[].concat((0,Fi.Z)(ln),(0,Fi.Z)(wl(Dn.children,St,ii))))}),ln}function kn(ft,St,nn,ln,Dn,Sn,ni,ii){return nn.map((Yn,Ci)=>{const Bi=fs(Ci,ii),{filterMultiple:bi=!0,filterMode:xr,filterSearch:gr}=Yn;let ar=Yn;if(ar.filters||ar.filterDropdown){const oo=hs(ar,Bi),dr=ln.find(qr=>{let{key:Yr}=qr;return oo===Yr});ar=Object.assign(Object.assign({},ar),{title:qr=>Me.createElement(zs,{tablePrefixCls:ft,prefixCls:`${ft}-filter`,dropdownPrefixCls:St,column:ar,columnKey:oo,filterState:dr,filterMultiple:bi,filterMode:xr,filterSearch:gr,triggerFilter:Sn,locale:Dn,getPopupContainer:ni},ll(Yn.title,qr))})}return"children"in ar&&(ar=Object.assign(Object.assign({},ar),{children:kn(ft,St,ar.children,ln,Dn,Sn,ni,Bi)})),ar})}function Tn(ft){const St={};return ft.forEach(nn=>{let{key:ln,filteredKeys:Dn,column:Sn}=nn;const{filters:ni,filterDropdown:ii}=Sn;if(ii)St[ln]=Dn||null;else if(Array.isArray(Dn)){const Yn=fu(ni);St[ln]=Yn.filter(Ci=>Dn.includes(String(Ci)))}else St[ln]=null}),St}function Qn(ft,St){return St.reduce((nn,ln)=>{const{column:{onFilter:Dn,filters:Sn},filteredKeys:ni}=ln;return Dn&&ni&&ni.length?nn.filter(ii=>ni.some(Yn=>{const Ci=fu(Sn),Bi=Ci.findIndex(xr=>String(xr)===String(Yn)),bi=Bi!==-1?Ci[Bi]:Yn;return Dn(bi,ii)})):nn},ft)}const zi=ft=>ft.flatMap(St=>"children"in St?[St].concat((0,Fi.Z)(zi(St.children||[]))):[St]);function Xi(ft){let{prefixCls:St,dropdownPrefixCls:nn,mergedColumns:ln,onFilterChange:Dn,getPopupContainer:Sn,locale:ni}=ft;const ii=Me.useMemo(()=>zi(ln||[]),[ln]),[Yn,Ci]=Me.useState(()=>wl(ii,!0)),Bi=Me.useMemo(()=>{const ar=wl(ii,!1);if(ar.length===0)return ar;let oo=!0,dr=!0;if(ar.forEach(qr=>{let{filteredKeys:Yr}=qr;Yr!==void 0?oo=!1:dr=!1}),oo){const qr=(ii||[]).map((Yr,So)=>hs(Yr,fs(So)));return Yn.filter(Yr=>{let{key:So}=Yr;return qr.includes(So)}).map(Yr=>{const So=ii[qr.findIndex($o=>$o===Yr.key)];return Object.assign(Object.assign({},Yr),{column:Object.assign(Object.assign({},Yr.column),So),forceFiltered:So.filtered})})}return ar},[ii,Yn]),bi=Me.useMemo(()=>Tn(Bi),[Bi]),xr=ar=>{const oo=Bi.filter(dr=>{let{key:qr}=dr;return qr!==ar.key});oo.push(ar),Ci(oo),Dn(Tn(oo),oo)};return[ar=>kn(St,nn,ar,Bi,ni,xr,Sn),Bi,bi]}var $i=Xi;function Ri(ft,St,nn){const ln=Me.useRef({});function Dn(Sn){if(!ln.current||ln.current.data!==ft||ln.current.childrenColumnName!==St||ln.current.getRowKey!==nn){let ii=function(Yn){Yn.forEach((Ci,Bi)=>{const bi=nn(Ci,Bi);ni.set(bi,Ci),Ci&&typeof Ci=="object"&&St in Ci&&ii(Ci[St]||[])})};const ni=new Map;ii(ft),ln.current={data:ft,childrenColumnName:St,kvMap:ni,getRowKey:nn}}return ln.current.kvMap.get(Sn)}return[Dn]}var ri=me(50371),yi=function(ft,St){var nn={};for(var ln in ft)Object.prototype.hasOwnProperty.call(ft,ln)&&St.indexOf(ln)<0&&(nn[ln]=ft[ln]);if(ft!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Dn=0,ln=Object.getOwnPropertySymbols(ft);Dn<ln.length;Dn++)St.indexOf(ln[Dn])<0&&Object.prototype.propertyIsEnumerable.call(ft,ln[Dn])&&(nn[ln[Dn]]=ft[ln[Dn]]);return nn};const Ji=10;function mr(ft,St){const nn={current:ft.current,pageSize:ft.pageSize};return Object.keys(St&&typeof St=="object"?St:{}).forEach(Dn=>{const Sn=ft[Dn];typeof Sn!="function"&&(nn[Dn]=Sn)}),nn}function sa(ft,St,nn){const ln=nn&&typeof nn=="object"?nn:{},{total:Dn=0}=ln,Sn=yi(ln,["total"]),[ni,ii]=(0,Me.useState)(()=>({current:"defaultCurrent"in Sn?Sn.defaultCurrent:1,pageSize:"defaultPageSize"in Sn?Sn.defaultPageSize:Ji})),Yn=(0,ri.Z)(ni,Sn,{total:Dn>0?Dn:ft}),Ci=Math.ceil((Dn||ft)/Yn.pageSize);Yn.current>Ci&&(Yn.current=Ci||1);const Bi=(xr,gr)=>{ii({current:xr!=null?xr:1,pageSize:gr||Yn.pageSize})},bi=(xr,gr)=>{var ar;nn&&((ar=nn.onChange)===null||ar===void 0||ar.call(nn,xr,gr)),Bi(xr,gr),St(xr,gr||(Yn==null?void 0:Yn.pageSize))};return nn===!1?[{},()=>{}]:[Object.assign(Object.assign({},Yn),{onChange:bi}),Bi]}var Ma=sa,Qt=me(18290),cn=me(35654),Jt=me(90782),dn=me(71430),xi=me(35788);const tr={},yr="SELECT_ALL",vr="SELECT_INVERT",br="SELECT_NONE",Lr=[],Mr=(ft,St)=>{let nn=[];return(St||[]).forEach(ln=>{nn.push(ln),ln&&typeof ln=="object"&&ft in ln&&(nn=[].concat((0,Fi.Z)(nn),(0,Fi.Z)(Mr(ft,ln[ft]))))}),nn};var Sr=(ft,St)=>{const{preserveSelectedRowKeys:nn,selectedRowKeys:ln,defaultSelectedRowKeys:Dn,getCheckboxProps:Sn,onChange:ni,onSelect:ii,onSelectAll:Yn,onSelectInvert:Ci,onSelectNone:Bi,onSelectMultiple:bi,columnWidth:xr,type:gr,selections:ar,fixed:oo,renderCell:dr,hideSelectAll:qr,checkStrictly:Yr=!0}=St||{},{prefixCls:So,data:$o,pageData:la,getRecordByKey:so,getRowKey:Ho,expandType:Na,childrenColumnName:fo,locale:ko,getPopupContainer:po}=ft,[kr,Fo]=(0,xi.Z)(ln||Dn||Lr,{value:ln}),qo=Me.useRef(new Map),ma=(0,Me.useCallback)(Pa=>{if(nn){const ha=new Map;Pa.forEach(ya=>{let Vo=so(ya);!Vo&&qo.current.has(ya)&&(Vo=qo.current.get(ya)),ha.set(ya,Vo)}),qo.current=ha}},[so,nn]);Me.useEffect(()=>{ma(kr)},[kr]);const{keyEntities:va}=(0,Me.useMemo)(()=>{if(Yr)return{keyEntities:null};let Pa=$o;if(nn){const ha=new Set($o.map((Vo,vs)=>Ho(Vo,vs))),ya=Array.from(qo.current).reduce((Vo,vs)=>{let[Ko,Aa]=vs;return ha.has(Ko)?Vo:Vo.concat(Aa)},[]);Pa=[].concat((0,Fi.Z)(Pa),(0,Fi.Z)(ya))}return(0,dn.I8)(Pa,{externalGetKey:Ho,childrenPropName:fo})},[$o,Ho,Yr,fo,nn]),lo=(0,Me.useMemo)(()=>Mr(fo,la),[fo,la]),Ba=(0,Me.useMemo)(()=>{const Pa=new Map;return lo.forEach((ha,ya)=>{const Vo=Ho(ha,ya),vs=(Sn?Sn(ha):null)||{};Pa.set(Vo,vs)}),Pa},[lo,Ho,Sn]),Wa=(0,Me.useCallback)(Pa=>{var ha;return!!(!((ha=Ba.get(Ho(Pa)))===null||ha===void 0)&&ha.disabled)},[Ba,Ho]),[Ps,is]=(0,Me.useMemo)(()=>{if(Yr)return[kr||[],[]];const{checkedKeys:Pa,halfCheckedKeys:ha}=(0,Jt.S)(kr,!0,va,Wa);return[Pa||[],ha]},[kr,Yr,va,Wa]),il=(0,Me.useMemo)(()=>{const Pa=gr==="radio"?Ps.slice(0,1):Ps;return new Set(Pa)},[Ps,gr]),Ls=(0,Me.useMemo)(()=>gr==="radio"?new Set:new Set(is),[is,gr]),[_a,oa]=(0,Me.useState)(null);Me.useEffect(()=>{St||Fo(Lr)},[!!St]);const as=(0,Me.useCallback)((Pa,ha)=>{let ya,Vo;ma(Pa),nn?(ya=Pa,Vo=Pa.map(vs=>qo.current.get(vs))):(ya=[],Vo=[],Pa.forEach(vs=>{const Ko=so(vs);Ko!==void 0&&(ya.push(vs),Vo.push(Ko))})),Fo(ya),ni==null||ni(ya,Vo,{type:ha})},[Fo,so,ni,nn]),rl=(0,Me.useCallback)((Pa,ha,ya,Vo)=>{if(ii){const vs=ya.map(Ko=>so(Ko));ii(so(Pa),ha,vs,Vo)}as(ya,"single")},[ii,so,as]),Gs=(0,Me.useMemo)(()=>!ar||qr?null:(ar===!0?[yr,vr,br]:ar).map(ha=>ha===yr?{key:"all",text:ko.selectionAll,onSelect(){as($o.map((ya,Vo)=>Ho(ya,Vo)).filter(ya=>{const Vo=Ba.get(ya);return!(Vo!=null&&Vo.disabled)||il.has(ya)}),"all")}}:ha===vr?{key:"invert",text:ko.selectInvert,onSelect(){const ya=new Set(il);la.forEach((vs,Ko)=>{const Aa=Ho(vs,Ko),es=Ba.get(Aa);es!=null&&es.disabled||(ya.has(Aa)?ya.delete(Aa):ya.add(Aa))});const Vo=Array.from(ya);Ci&&Ci(Vo),as(Vo,"invert")}}:ha===br?{key:"none",text:ko.selectNone,onSelect(){Bi==null||Bi(),as(Array.from(il).filter(ya=>{const Vo=Ba.get(ya);return Vo==null?void 0:Vo.disabled}),"none")}}:ha).map(ha=>Object.assign(Object.assign({},ha),{onSelect:function(){for(var ya,Vo,vs=arguments.length,Ko=new Array(vs),Aa=0;Aa<vs;Aa++)Ko[Aa]=arguments[Aa];(Vo=ha.onSelect)===null||Vo===void 0||(ya=Vo).call.apply(ya,[ha].concat(Ko)),oa(null)}})),[ar,il,la,Ho,Ci,as]);return[(0,Me.useCallback)(Pa=>{var ha;if(!St)return Pa.filter(Cs=>Cs!==tr);let ya=(0,Fi.Z)(Pa);const Vo=new Set(il),vs=lo.map(Ho).filter(Cs=>!Ba.get(Cs).disabled),Ko=vs.every(Cs=>Vo.has(Cs)),Aa=vs.some(Cs=>Vo.has(Cs)),es=()=>{const Cs=[];Ko?vs.forEach(bs=>{Vo.delete(bs),Cs.push(bs)}):vs.forEach(bs=>{Vo.has(bs)||(Vo.add(bs),Cs.push(bs))});const ks=Array.from(Vo);Yn==null||Yn(!Ko,ks.map(bs=>so(bs)),Cs.map(bs=>so(bs))),as(ks,"all"),oa(null)};let rs;if(gr!=="radio"){let Cs;if(Gs){const Qa={getPopupContainer:po,items:Gs.map((Hs,Hl)=>{const{key:tu,text:Yu,onSelect:_u}=Hs;return{key:tu!=null?tu:Hl,onClick:()=>{_u==null||_u(vs)},label:Yu}})};Cs=Me.createElement("div",{className:`${So}-selection-extra`},Me.createElement(Il.Z,{menu:Qa,getPopupContainer:po},Me.createElement("span",null,Me.createElement(Qt.Z,null))))}const ks=lo.map((Qa,Hs)=>{const Hl=Ho(Qa,Hs),tu=Ba.get(Hl)||{};return Object.assign({checked:Vo.has(Hl)},tu)}).filter(Qa=>{let{disabled:Hs}=Qa;return Hs}),bs=!!ks.length&&ks.length===lo.length,$s=bs&&ks.every(Qa=>{let{checked:Hs}=Qa;return Hs}),bl=bs&&ks.some(Qa=>{let{checked:Hs}=Qa;return Hs});rs=!qr&&Me.createElement("div",{className:`${So}-selection`},Me.createElement(Sa.default,{checked:bs?$s:!!lo.length&&Ko,indeterminate:bs?!$s&&bl:!Ko&&Aa,onChange:es,disabled:lo.length===0||bs,"aria-label":Cs?"Custom selection":"Select all",skipGroup:!0}),Cs)}let zl;gr==="radio"?zl=(Cs,ks,bs)=>{const $s=Ho(ks,bs),bl=Vo.has($s);return{node:Me.createElement(or.ZP,Object.assign({},Ba.get($s),{checked:bl,onClick:Qa=>Qa.stopPropagation(),onChange:Qa=>{Vo.has($s)||rl($s,!0,[$s],Qa.nativeEvent)}})),checked:bl}}:zl=(Cs,ks,bs)=>{var $s;const bl=Ho(ks,bs),Qa=Vo.has(bl),Hs=Ls.has(bl),Hl=Ba.get(bl);let tu;return Na==="nest"?tu=Hs:tu=($s=Hl==null?void 0:Hl.indeterminate)!==null&&$s!==void 0?$s:Hs,{node:Me.createElement(Sa.default,Object.assign({},Hl,{indeterminate:tu,checked:Qa,skipGroup:!0,onClick:Yu=>Yu.stopPropagation(),onChange:Yu=>{let{nativeEvent:_u}=Yu;const{shiftKey:El}=_u;let ju=-1,zu=-1;if(El&&Yr){const Fs=new Set([_a,bl]);vs.some((Yl,Ks)=>{if(Fs.has(Yl))if(ju===-1)ju=Ks;else return zu=Ks,!0;return!1})}if(zu!==-1&&ju!==zu&&Yr){const Fs=vs.slice(ju,zu+1),Yl=[];Qa?Fs.forEach(Zs=>{Vo.has(Zs)&&(Yl.push(Zs),Vo.delete(Zs))}):Fs.forEach(Zs=>{Vo.has(Zs)||(Yl.push(Zs),Vo.add(Zs))});const Ks=Array.from(Vo);bi==null||bi(!Qa,Ks.map(Zs=>so(Zs)),Yl.map(Zs=>so(Zs))),as(Ks,"multiple")}else{const Fs=Ps;if(Yr){const Yl=Qa?(0,cn._5)(Fs,bl):(0,cn.L0)(Fs,bl);rl(bl,!Qa,Yl,_u)}else{const Yl=(0,Jt.S)([].concat((0,Fi.Z)(Fs),[bl]),!0,va,Wa),{checkedKeys:Ks,halfCheckedKeys:Zs}=Yl;let Xu=Ks;if(Qa){const Yc=new Set(Ks);Yc.delete(bl),Xu=(0,Jt.S)(Array.from(Yc),{checked:!1,halfCheckedKeys:Zs},va,Wa).checkedKeys}rl(bl,!Qa,Xu,_u)}}oa(Qa?null:bl)}})),checked:Qa}};const Ol=(Cs,ks,bs)=>{const{node:$s,checked:bl}=zl(Cs,ks,bs);return dr?dr(bl,ks,bs,$s):$s};if(!ya.includes(tr))if(ya.findIndex(Cs=>{var ks;return((ks=Cs[_r])===null||ks===void 0?void 0:ks.columnType)==="EXPAND_COLUMN"})===0){const[Cs,...ks]=ya;ya=[Cs,tr].concat((0,Fi.Z)(ks))}else ya=[tr].concat((0,Fi.Z)(ya));const eu=ya.indexOf(tr);ya=ya.filter((Cs,ks)=>Cs!==tr||ks===eu);const ws=ya[eu-1],Ul=ya[eu+1];let Sl=oo;Sl===void 0&&((Ul==null?void 0:Ul.fixed)!==void 0?Sl=Ul.fixed:(ws==null?void 0:ws.fixed)!==void 0&&(Sl=ws.fixed)),Sl&&ws&&((ha=ws[_r])===null||ha===void 0?void 0:ha.columnType)==="EXPAND_COLUMN"&&ws.fixed===void 0&&(ws.fixed=Sl);const kl=et()(`${So}-selection-col`,{[`${So}-selection-col-with-dropdown`]:ar&&gr==="checkbox"}),Rc={fixed:Sl,width:xr,className:`${So}-selection-column`,title:St.columnTitle||rs,render:Ol,onCell:St.onCell,[_r]:{className:kl}};return ya.map(Cs=>Cs===tr?Rc:Cs)},[Ho,lo,St,Ps,il,Ls,xr,Gs,Na,_a,Ba,bi,rl,Wa]),il]},Tr=me(35323),ro=me(19155),ia=me(6848);const da="ascend",ur="descend";function Go(ft){return typeof ft.sorter=="object"&&typeof ft.sorter.multiple=="number"?ft.sorter.multiple:!1}function _t(ft){return typeof ft=="function"?ft:ft&&typeof ft=="object"&&ft.compare?ft.compare:!1}function Zn(ft,St){return St?ft[ft.indexOf(St)+1]:ft[0]}function Fr(ft,St,nn){let ln=[];function Dn(Sn,ni){ln.push({column:Sn,key:hs(Sn,ni),multiplePriority:Go(Sn),sortOrder:Sn.sortOrder})}return(ft||[]).forEach((Sn,ni)=>{const ii=fs(ni,nn);Sn.children?("sortOrder"in Sn&&Dn(Sn,ii),ln=[].concat((0,Fi.Z)(ln),(0,Fi.Z)(Fr(Sn.children,St,ii)))):Sn.sorter&&("sortOrder"in Sn?Dn(Sn,ii):St&&Sn.defaultSortOrder&&ln.push({column:Sn,key:hs(Sn,ii),multiplePriority:Go(Sn),sortOrder:Sn.defaultSortOrder}))}),ln}function Ai(ft,St,nn,ln,Dn,Sn,ni,ii){return(St||[]).map((Yn,Ci)=>{const Bi=fs(Ci,ii);let bi=Yn;if(bi.sorter){const xr=bi.sortDirections||Dn,gr=bi.showSorterTooltip===void 0?ni:bi.showSorterTooltip,ar=hs(bi,Bi),oo=nn.find(Na=>{let{key:fo}=Na;return fo===ar}),dr=oo?oo.sortOrder:null,qr=Zn(xr,dr);let Yr;if(Yn.sortIcon)Yr=Yn.sortIcon({sortOrder:dr});else{const Na=xr.includes(da)&&Me.createElement(ro.Z,{className:et()(`${ft}-column-sorter-up`,{active:dr===da})}),fo=xr.includes(ur)&&Me.createElement(Tr.Z,{className:et()(`${ft}-column-sorter-down`,{active:dr===ur})});Yr=Me.createElement("span",{className:et()(`${ft}-column-sorter`,{[`${ft}-column-sorter-full`]:!!(Na&&fo)})},Me.createElement("span",{className:`${ft}-column-sorter-inner`,"aria-hidden":"true"},Na,fo))}const{cancelSort:So,triggerAsc:$o,triggerDesc:la}=Sn||{};let so=So;qr===ur?so=la:qr===da&&(so=$o);const Ho=typeof gr=="object"?gr:{title:so};bi=Object.assign(Object.assign({},bi),{className:et()(bi.className,{[`${ft}-column-sort`]:dr}),title:Na=>{const fo=Me.createElement("div",{className:`${ft}-column-sorters`},Me.createElement("span",{className:`${ft}-column-title`},ll(Yn.title,Na)),Yr);return gr?Me.createElement(ia.Z,Object.assign({},Ho),fo):fo},onHeaderCell:Na=>{const fo=Yn.onHeaderCell&&Yn.onHeaderCell(Na)||{},ko=fo.onClick,po=fo.onKeyDown;fo.onClick=qo=>{ln({column:Yn,key:ar,sortOrder:qr,multiplePriority:Go(Yn)}),ko==null||ko(qo)},fo.onKeyDown=qo=>{qo.keyCode===er.Z.ENTER&&(ln({column:Yn,key:ar,sortOrder:qr,multiplePriority:Go(Yn)}),po==null||po(qo))};const kr=Ys(Yn.title,{}),Fo=kr==null?void 0:kr.toString();return dr?fo["aria-sort"]=dr==="ascend"?"ascending":"descending":fo["aria-label"]=Fo||"",fo.className=et()(fo.className,`${ft}-column-has-sorters`),fo.tabIndex=0,Yn.ellipsis&&(fo.title=(kr!=null?kr:"").toString()),fo}})}return"children"in bi&&(bi=Object.assign(Object.assign({},bi),{children:Ai(ft,bi.children,nn,ln,Dn,Sn,ni,Bi)})),bi})}function Ki(ft){const{column:St,sortOrder:nn}=ft;return{column:St,order:nn,field:St.dataIndex,columnKey:St.key}}function ir(ft){const St=ft.filter(nn=>{let{sortOrder:ln}=nn;return ln}).map(Ki);return St.length===0&&ft.length?Object.assign(Object.assign({},Ki(ft[ft.length-1])),{column:void 0}):St.length<=1?St[0]||{}:St}function no(ft,St,nn){const ln=St.slice().sort((ni,ii)=>ii.multiplePriority-ni.multiplePriority),Dn=ft.slice(),Sn=ln.filter(ni=>{let{column:{sorter:ii},sortOrder:Yn}=ni;return _t(ii)&&Yn});return Sn.length?Dn.sort((ni,ii)=>{for(let Yn=0;Yn<Sn.length;Yn+=1){const Ci=Sn[Yn],{column:{sorter:Bi},sortOrder:bi}=Ci,xr=_t(Bi);if(xr&&bi){const gr=xr(ni,ii,bi);if(gr!==0)return bi===da?gr:-gr}}return 0}).map(ni=>{const ii=ni[nn];return ii?Object.assign(Object.assign({},ni),{[nn]:no(ii,St,nn)}):ni}):Dn}function Lo(ft){let{prefixCls:St,mergedColumns:nn,onSorterChange:ln,sortDirections:Dn,tableLocale:Sn,showSorterTooltip:ni}=ft;const[ii,Yn]=Me.useState(Fr(nn,!0)),Ci=Me.useMemo(()=>{let ar=!0;const oo=Fr(nn,!1);if(!oo.length)return ii;const dr=[];function qr(So){ar?dr.push(So):dr.push(Object.assign(Object.assign({},So),{sortOrder:null}))}let Yr=null;return oo.forEach(So=>{Yr===null?(qr(So),So.sortOrder&&(So.multiplePriority===!1?ar=!1:Yr=!0)):(Yr&&So.multiplePriority!==!1||(ar=!1),qr(So))}),dr},[nn,ii]),Bi=Me.useMemo(()=>{const ar=Ci.map(oo=>{let{column:dr,sortOrder:qr}=oo;return{column:dr,order:qr}});return{sortColumns:ar,sortColumn:ar[0]&&ar[0].column,sortOrder:ar[0]&&ar[0].order}},[Ci]);function bi(ar){let oo;ar.multiplePriority===!1||!Ci.length||Ci[0].multiplePriority===!1?oo=[ar]:oo=[].concat((0,Fi.Z)(Ci.filter(dr=>{let{key:qr}=dr;return qr!==ar.key})),[ar]),Yn(oo),ln(ir(oo),oo)}return[ar=>Ai(St,ar,Ci,bi,Dn,Sn,ni),Ci,Bi,()=>ir(Ci)]}function nr(ft,St){return ft.map(nn=>{const ln=Object.assign({},nn);return ln.title=ll(nn.title,St),"children"in ln&&(ln.children=nr(ln.children,St)),ln})}function Zr(ft){return[Me.useCallback(nn=>nr(nn,ft),[ft])]}var Mi=io((ft,St)=>{const{_renderTimes:nn}=ft,{_renderTimes:ln}=St;return nn!==ln}),Ca=Ra((ft,St)=>{const{_renderTimes:nn}=ft,{_renderTimes:ln}=St;return nn!==ln}),Ja=me(64993),wo=me(17313),Cr=me(83116),fr=me(37613),pa=ft=>{const{componentCls:St}=ft,nn=`${ft.lineWidth}px ${ft.lineType} ${ft.tableBorderColor}`,ln=(Dn,Sn,ni)=>({[`&${St}-${Dn}`]:{[`> ${St}-container`]:{[`> ${St}-content, > ${St}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${St}-expanded-row-fixed`]:{margin:`-${Sn}px -${ni+ft.lineWidth}px`}}}}}});return{[`${St}-wrapper`]:{[`${St}${St}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${St}-title`]:{border:nn,borderBottom:0},[`> ${St}-container`]:{borderInlineStart:nn,borderTop:nn,[`
|
|
|
> ${St}-content,
|
|
|
> ${St}-header,
|
|
|
> ${St}-body,
|
|
|
> ${St}-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:nn},"> thead":{"> tr:not(:last-child) > th":{borderBottom:nn},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${St}-cell-fix-right-first::after`]:{borderInlineEnd:nn}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${St}-expanded-row-fixed`]:{margin:`-${ft.tablePaddingVertical}px -${ft.tablePaddingHorizontal+ft.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:ft.lineWidth,bottom:0,borderInlineEnd:nn,content:'""'}}}}}},[`&${St}-scroll-horizontal`]:{[`> ${St}-container > ${St}-body`]:{"> table > tbody":{[`
|
|
|
> tr${St}-expanded-row,
|
|
|
> tr${St}-placeholder
|
|
|
`]:{"> th, > td":{borderInlineEnd:0}}}}}},ln("middle",ft.tablePaddingVerticalMiddle,ft.tablePaddingHorizontalMiddle)),ln("small",ft.tablePaddingVerticalSmall,ft.tablePaddingHorizontalSmall)),{[`> ${St}-footer`]:{border:nn,borderTop:0}}),[`${St}-cell`]:{[`${St}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${ft.lineWidth}px 0 ${ft.lineWidth}px ${ft.tableHeaderBg}`}},[`${St}-bordered ${St}-cell-scrollbar`]:{borderInlineEnd:nn}}}},La=ft=>{const{componentCls:St}=ft;return{[`${St}-wrapper`]:{[`${St}-cell-ellipsis`]:Object.assign(Object.assign({},wo.vS),{wordBreak:"keep-all",[`
|
|
|
&${St}-cell-fix-left-last,
|
|
|
&${St}-cell-fix-right-first
|
|
|
`]:{overflow:"visible",[`${St}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${St}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},Ea=ft=>{const{componentCls:St}=ft;return{[`${St}-wrapper`]:{[`${St}-tbody > tr${St}-placeholder`]:{textAlign:"center",color:ft.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:ft.colorBgContainer}}}}},Js=me(15969),ts=ft=>{const{componentCls:St,antCls:nn,controlInteractiveSize:ln,motionDurationSlow:Dn,lineWidth:Sn,paddingXS:ni,lineType:ii,tableBorderColor:Yn,tableExpandIconBg:Ci,tableExpandColumnWidth:Bi,borderRadius:bi,fontSize:xr,fontSizeSM:gr,lineHeight:ar,tablePaddingVertical:oo,tablePaddingHorizontal:dr,tableExpandedRowBg:qr,paddingXXS:Yr}=ft,So=ln/2-Sn,$o=So*2+Sn*3,la=`${Sn}px ${ii} ${Yn}`,so=Yr-Sn;return{[`${St}-wrapper`]:{[`${St}-expand-icon-col`]:{width:Bi},[`${St}-row-expand-icon-cell`]:{textAlign:"center",[`${St}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${St}-row-indent`]:{height:1,float:"left"},[`${St}-row-expand-icon`]:Object.assign(Object.assign({},(0,Js.N)(ft)),{position:"relative",float:"left",boxSizing:"border-box",width:$o,height:$o,padding:0,color:"inherit",lineHeight:`${$o}px`,background:Ci,border:la,borderRadius:bi,transform:`scale(${ln/$o})`,transition:`all ${Dn}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${Dn} ease-out`,content:'""'},"&::before":{top:So,insetInlineEnd:so,insetInlineStart:so,height:Sn},"&::after":{top:so,bottom:so,insetInlineStart:So,width:Sn,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"}}),[`${St}-row-indent + ${St}-row-expand-icon`]:{marginTop:(xr*ar-Sn*3)/2-Math.ceil((gr*1.4-Sn*3)/2),marginInlineEnd:ni},[`tr${St}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:qr}},[`${nn}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${St}-expanded-row-fixed`]:{position:"relative",margin:`-${oo}px -${dr}px`,padding:`${oo}px ${dr}px`}}}},Rs=ft=>{const{componentCls:St,antCls:nn,iconCls:ln,tableFilterDropdownWidth:Dn,tableFilterDropdownSearchWidth:Sn,paddingXXS:ni,paddingXS:ii,colorText:Yn,lineWidth:Ci,lineType:Bi,tableBorderColor:bi,tableHeaderIconColor:xr,fontSizeSM:gr,tablePaddingHorizontal:ar,borderRadius:oo,motionDurationSlow:dr,colorTextDescription:qr,colorPrimary:Yr,tableHeaderFilterActiveBg:So,colorTextDisabled:$o,tableFilterDropdownBg:la,tableFilterDropdownHeight:so,controlItemBgHover:Ho,controlItemBgActive:Na,boxShadowSecondary:fo,filterDropdownMenuBg:ko}=ft,po=`${nn}-dropdown`,kr=`${St}-filter-dropdown`,Fo=`${nn}-tree`,qo=`${Ci}px ${Bi} ${bi}`;return[{[`${St}-wrapper`]:{[`${St}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${St}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-ni,marginInline:`${ni}px ${-ar/2}px`,padding:`0 ${ni}px`,color:xr,fontSize:gr,borderRadius:oo,cursor:"pointer",transition:`all ${dr}`,"&:hover":{color:qr,background:So},"&.active":{color:Yr}}}},{[`${nn}-dropdown`]:{[kr]:Object.assign(Object.assign({},(0,wo.Wf)(ft)),{minWidth:Dn,backgroundColor:la,borderRadius:oo,boxShadow:fo,overflow:"hidden",[`${po}-menu`]:{maxHeight:so,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:ko,"&:empty::after":{display:"block",padding:`${ii}px 0`,color:$o,fontSize:gr,textAlign:"center",content:'"Not Found"'}},[`${kr}-tree`]:{paddingBlock:`${ii}px 0`,paddingInline:ii,[Fo]:{padding:0},[`${Fo}-treenode ${Fo}-node-content-wrapper:hover`]:{backgroundColor:Ho},[`${Fo}-treenode-checkbox-checked ${Fo}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:Na}}},[`${kr}-search`]:{padding:ii,borderBottom:qo,"&-input":{input:{minWidth:Sn},[ln]:{color:$o}}},[`${kr}-checkall`]:{width:"100%",marginBottom:ni,marginInlineStart:ni},[`${kr}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${ii-Ci}px ${ii}px`,overflow:"hidden",borderTop:qo}})}},{[`${nn}-dropdown ${kr}, ${kr}-submenu`]:{[`${nn}-checkbox-wrapper + span`]:{paddingInlineStart:ii,color:Yn},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},Kc=ft=>{const{componentCls:St,lineWidth:nn,colorSplit:ln,motionDurationSlow:Dn,zIndexTableFixed:Sn,tableBg:ni,zIndexTableSticky:ii}=ft,Yn=ln;return{[`${St}-wrapper`]:{[`
|
|
|
${St}-cell-fix-left,
|
|
|
${St}-cell-fix-right
|
|
|
`]:{position:"sticky !important",zIndex:Sn,background:ni},[`
|
|
|
${St}-cell-fix-left-first::after,
|
|
|
${St}-cell-fix-left-last::after
|
|
|
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-nn,width:30,transform:"translateX(100%)",transition:`box-shadow ${Dn}`,content:'""',pointerEvents:"none"},[`${St}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
|
${St}-cell-fix-right-first::after,
|
|
|
${St}-cell-fix-right-last::after
|
|
|
`]:{position:"absolute",top:0,bottom:-nn,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${Dn}`,content:'""',pointerEvents:"none"},[`${St}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:ii+1,width:30,transition:`box-shadow ${Dn}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${St}-ping-left`]:{[`&:not(${St}-has-fix-left) ${St}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${Yn}`}},[`
|
|
|
${St}-cell-fix-left-first::after,
|
|
|
${St}-cell-fix-left-last::after
|
|
|
`]:{boxShadow:`inset 10px 0 8px -8px ${Yn}`},[`${St}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${St}-ping-right`]:{[`&:not(${St}-has-fix-right) ${St}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${Yn}`}},[`
|
|
|
${St}-cell-fix-right-first::after,
|
|
|
${St}-cell-fix-right-last::after
|
|
|
`]:{boxShadow:`inset -10px 0 8px -8px ${Yn}`}}}}},Rd=ft=>{const{componentCls:St,antCls:nn}=ft;return{[`${St}-wrapper`]:{[`${St}-pagination${nn}-pagination`]:{margin:`${ft.margin}px 0`},[`${St}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:ft.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Th=ft=>{const{componentCls:St,tableRadius:nn}=ft;return{[`${St}-wrapper`]:{[St]:{[`${St}-title, ${St}-header`]:{borderRadius:`${nn}px ${nn}px 0 0`},[`${St}-title + ${St}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${St}-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:nn,borderStartEndRadius:nn,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:nn},"> *:last-child":{borderStartEndRadius:nn}}},"&-footer":{borderRadius:`0 0 ${nn}px ${nn}px`}}}}},Uc=ft=>{const{componentCls:St}=ft;return{[`${St}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${St}-pagination-left`]:{justifyContent:"flex-end"},[`${St}-pagination-right`]:{justifyContent:"flex-start"},[`${St}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${St}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${St}-row-indent`]:{float:"right"}}}}},mi=ft=>{const{componentCls:St,antCls:nn,iconCls:ln,fontSizeIcon:Dn,padding:Sn,paddingXS:ni,tableHeaderIconColor:ii,tableHeaderIconColorHover:Yn,tableSelectionColumnWidth:Ci}=ft;return{[`${St}-wrapper`]:{[`${St}-selection-col`]:{width:Ci,[`&${St}-selection-col-with-dropdown`]:{width:Ci+Dn+Sn/4}},[`${St}-bordered ${St}-selection-col`]:{width:Ci+ni*2,[`&${St}-selection-col-with-dropdown`]:{width:Ci+Dn+Sn/4+ni*2}},[`
|
|
|
table tr th${St}-selection-column,
|
|
|
table tr td${St}-selection-column
|
|
|
`]:{paddingInlineEnd:ft.paddingXS,paddingInlineStart:ft.paddingXS,textAlign:"center",[`${nn}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${St}-selection-column${St}-cell-fix-left`]:{zIndex:ft.zIndexTableFixed+1},[`table tr th${St}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${St}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${St}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${ft.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${ft.tablePaddingHorizontal/4}px`,[ln]:{color:ii,fontSize:Dn,verticalAlign:"baseline","&:hover":{color:Yn}}}}}},Za=ft=>{const{componentCls:St}=ft,nn=(ln,Dn,Sn,ni)=>({[`${St}${St}-${ln}`]:{fontSize:ni,[`
|
|
|
${St}-title,
|
|
|
${St}-footer,
|
|
|
${St}-cell,
|
|
|
${St}-thead > tr > th,
|
|
|
${St}-tbody > tr > th,
|
|
|
${St}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{padding:`${Dn}px ${Sn}px`},[`${St}-filter-trigger`]:{marginInlineEnd:`-${Sn/2}px`},[`${St}-expanded-row-fixed`]:{margin:`-${Dn}px -${Sn}px`},[`${St}-tbody`]:{[`${St}-wrapper:only-child ${St}`]:{marginBlock:`-${Dn}px`,marginInline:`${ft.tableExpandColumnWidth-Sn}px -${Sn}px`}},[`${St}-selection-column`]:{paddingInlineStart:`${Sn/4}px`}}});return{[`${St}-wrapper`]:Object.assign(Object.assign({},nn("middle",ft.tablePaddingVerticalMiddle,ft.tablePaddingHorizontalMiddle,ft.tableFontSizeMiddle)),nn("small",ft.tablePaddingVerticalSmall,ft.tablePaddingHorizontalSmall,ft.tableFontSizeSmall))}},Nr=ft=>{const{componentCls:St,marginXXS:nn,fontSizeIcon:ln,tableHeaderIconColor:Dn,tableHeaderIconColorHover:Sn}=ft;return{[`${St}-wrapper`]:{[`${St}-thead th${St}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${ft.motionDurationSlow}`,"&:hover":{background:ft.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:ft.colorPrimary},[`
|
|
|
&${St}-cell-fix-left:hover,
|
|
|
&${St}-cell-fix-right:hover
|
|
|
`]:{background:ft.tableFixedHeaderSortActiveBg}},[`${St}-thead th${St}-column-sort`]:{background:ft.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${St}-column-sort`]:{background:ft.tableBodySortBg},[`${St}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${St}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${St}-column-sorter`]:{marginInlineStart:nn,color:Dn,fontSize:0,transition:`color ${ft.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:ln,"&.active":{color:ft.colorPrimary}},[`${St}-column-sorter-up + ${St}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${St}-column-sorters:hover ${St}-column-sorter`]:{color:Sn}}}},Os=ft=>{const{componentCls:St,opacityLoading:nn,tableScrollThumbBg:ln,tableScrollThumbBgHover:Dn,tableScrollThumbSize:Sn,tableScrollBg:ni,zIndexTableSticky:ii,stickyScrollBarBorderRadius:Yn}=ft,Ci=`${ft.lineWidth}px ${ft.lineType} ${ft.tableBorderColor}`;return{[`${St}-wrapper`]:{[`${St}-sticky`]:{"&-holder":{position:"sticky",zIndex:ii,background:ft.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Sn}px !important`,zIndex:ii,display:"flex",alignItems:"center",background:ni,borderTop:Ci,opacity:nn,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:Sn,backgroundColor:ln,borderRadius:Yn,transition:`all ${ft.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:Dn}}}}}}},ba=ft=>{const{componentCls:St,lineWidth:nn,tableBorderColor:ln}=ft,Dn=`${nn}px ${ft.lineType} ${ln}`;return{[`${St}-wrapper`]:{[`${St}-summary`]:{position:"relative",zIndex:ft.zIndexTableFixed,background:ft.tableBg,"> tr":{"> th, > td":{borderBottom:Dn}}},[`div${St}-summary`]:{boxShadow:`0 -${nn}px 0 ${ln}`}}}},ps=ft=>{const{componentCls:St}=ft,nn=`${ft.lineWidth}px ${ft.lineType} ${ft.tableBorderColor}`,ln=`${St}-expanded-row-cell`;return{[`${St}-wrapper`]:{[`${St}-tbody-virtual`]:{[`${St}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${St}-cell`]:{borderBottom:nn},[`${St}-expanded-row`]:{[`${ln}${ln}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${ft.lineWidth}px)`,borderInlineEnd:"none"}}},[`${St}-bordered`]:{[`${St}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:nn,position:"absolute"},[`${St}-cell`]:{borderInlineEnd:nn,[`&${St}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-ft.lineWidth,borderInlineStart:nn}}}}}}};const Vl=ft=>{const{componentCls:St,fontWeightStrong:nn,tablePaddingVertical:ln,tablePaddingHorizontal:Dn,lineWidth:Sn,lineType:ni,tableBorderColor:ii,tableFontSize:Yn,tableBg:Ci,tableRadius:Bi,tableHeaderTextColor:bi,motionDurationMid:xr,tableHeaderBg:gr,tableHeaderCellSplitColor:ar,tableRowHoverBg:oo,tableSelectedRowBg:dr,tableSelectedRowHoverBg:qr,tableFooterTextColor:Yr,tableFooterBg:So,paddingContentVerticalLG:$o}=ft,la=`${Sn}px ${ni} ${ii}`;return{[`${St}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,wo.dF)()),{[St]:Object.assign(Object.assign({},(0,wo.Wf)(ft)),{fontSize:Yn,background:Ci,borderRadius:`${Bi}px ${Bi}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${Bi}px ${Bi}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
|
${St}-cell,
|
|
|
${St}-thead > tr > th,
|
|
|
${St}-tbody > tr > th,
|
|
|
${St}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{position:"relative",padding:`${$o}px ${Dn}px`,overflowWrap:"break-word"},[`${St}-title`]:{padding:`${ln}px ${Dn}px`},[`${St}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:bi,fontWeight:nn,textAlign:"start",background:gr,borderBottom:la,transition:`background ${xr} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${St}-selection-column):not(${St}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:ar,transform:"translateY(-50%)",transition:`background-color ${xr}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${St}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${xr}, border-color ${xr}`,borderBottom:la,[`
|
|
|
> ${St}-wrapper:only-child,
|
|
|
> ${St}-expanded-row-fixed > ${St}-wrapper:only-child
|
|
|
`]:{[St]:{marginBlock:`-${ln}px`,marginInline:`${ft.tableExpandColumnWidth-Dn}px -${Dn}px`,[`${St}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:bi,fontWeight:nn,textAlign:"start",background:gr,borderBottom:la,transition:`background ${xr} ease`},[`
|
|
|
&${St}-row:hover > th,
|
|
|
&${St}-row:hover > td,
|
|
|
> th${St}-cell-row-hover,
|
|
|
> td${St}-cell-row-hover
|
|
|
`]:{background:oo},[`&${St}-row-selected`]:{"> th, > td":{background:dr},"&:hover > th, &:hover > td":{background:qr}}}},[`${St}-footer`]:{padding:`${ln}px ${Dn}px`,color:Yr,background:So}})}};var lc=(0,Cr.Z)("Table",ft=>{const{colorTextHeading:St,colorSplit:nn,colorIcon:ln,colorIconHover:Dn,opacityLoading:Sn,colorBgContainer:ni,controlInteractiveSize:ii,headerBg:Yn,headerColor:Ci,headerSortActiveBg:Bi,headerSortHoverBg:bi,bodySortBg:xr,rowHoverBg:gr,rowSelectedBg:ar,rowSelectedHoverBg:oo,rowExpandedBg:dr,cellPaddingBlock:qr,cellPaddingInline:Yr,cellPaddingBlockMD:So,cellPaddingInlineMD:$o,cellPaddingBlockSM:la,cellPaddingInlineSM:so,borderColor:Ho,footerBg:Na,footerColor:fo,headerBorderRadius:ko,cellFontSize:po,cellFontSizeMD:kr,cellFontSizeSM:Fo,headerSplitColor:qo,fixedHeaderSortActiveBg:ma,headerFilterHoverBg:va,filterDropdownBg:lo,expandIconBg:Ba,selectionColumnWidth:Wa,stickyScrollBarBg:Ps}=ft,is=new Ja.C(ln),il=new Ja.C(Dn),Ls=2,_a=(0,fr.TS)(ft,{tableFontSize:po,tableBg:ni,tableRadius:ko,tablePaddingVertical:qr,tablePaddingHorizontal:Yr,tablePaddingVerticalMiddle:So,tablePaddingHorizontalMiddle:$o,tablePaddingVerticalSmall:la,tablePaddingHorizontalSmall:so,tableBorderColor:Ho,tableHeaderTextColor:Ci,tableHeaderBg:Yn,tableFooterTextColor:fo,tableFooterBg:Na,tableHeaderCellSplitColor:qo,tableHeaderSortBg:Bi,tableHeaderSortHoverBg:bi,tableHeaderIconColor:is.clone().setAlpha(is.getAlpha()*Sn).toRgbString(),tableHeaderIconColorHover:il.clone().setAlpha(il.getAlpha()*Sn).toRgbString(),tableBodySortBg:xr,tableFixedHeaderSortActiveBg:ma,tableHeaderFilterActiveBg:va,tableFilterDropdownBg:lo,tableRowHoverBg:gr,tableSelectedRowBg:ar,tableSelectedRowHoverBg:oo,zIndexTableFixed:Ls,zIndexTableSticky:Ls+1,tableFontSizeMiddle:kr,tableFontSizeSmall:Fo,tableSelectionColumnWidth:Wa,tableExpandIconBg:Ba,tableExpandColumnWidth:ii+2*ft.padding,tableExpandedRowBg:dr,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:Ps,tableScrollThumbBgHover:St,tableScrollBg:nn});return[Vl(_a),Rd(_a),ba(_a),Nr(_a),Rs(_a),pa(_a),Th(_a),ts(_a),ba(_a),Ea(_a),mi(_a),Kc(_a),Os(_a),La(_a),Za(_a),Uc(_a),ps(_a)]},ft=>{const{colorFillAlter:St,colorBgContainer:nn,colorTextHeading:ln,colorFillSecondary:Dn,colorFillContent:Sn,controlItemBgActive:ni,controlItemBgActiveHover:ii,padding:Yn,paddingSM:Ci,paddingXS:Bi,colorBorderSecondary:bi,borderRadiusLG:xr,fontSize:gr,controlHeight:ar,colorTextPlaceholder:oo}=ft,dr=new Ja.C(Dn).onBackground(nn).toHexShortString(),qr=new Ja.C(Sn).onBackground(nn).toHexShortString(),Yr=new Ja.C(St).onBackground(nn).toHexShortString();return{headerBg:Yr,headerColor:ln,headerSortActiveBg:dr,headerSortHoverBg:qr,bodySortBg:Yr,rowHoverBg:Yr,rowSelectedBg:ni,rowSelectedHoverBg:ii,rowExpandedBg:St,cellPaddingBlock:Yn,cellPaddingInline:Yn,cellPaddingBlockMD:Ci,cellPaddingInlineMD:Bi,cellPaddingBlockSM:Bi,cellPaddingInlineSM:Bi,borderColor:bi,headerBorderRadius:xr,footerBg:Yr,footerColor:ln,cellFontSize:gr,cellFontSizeMD:gr,cellFontSizeSM:gr,headerSplitColor:bi,fixedHeaderSortActiveBg:dr,headerFilterHoverBg:Sn,filterDropdownMenuBg:nn,filterDropdownBg:nn,expandIconBg:nn,selectionColumnWidth:ar,stickyScrollBarBg:oo,stickyScrollBarBorderRadius:100}});const ra=[],Cu=(ft,St)=>{const{prefixCls:nn,className:ln,rootClassName:Dn,style:Sn,size:ni,bordered:ii,dropdownPrefixCls:Yn,dataSource:Ci,pagination:Bi,rowSelection:bi,rowKey:xr="key",rowClassName:gr,columns:ar,children:oo,childrenColumnName:dr,onChange:qr,getPopupContainer:Yr,loading:So,expandIcon:$o,expandable:la,expandedRowRender:so,expandIconColumnIndex:Ho,indentSize:Na,scroll:fo,sortDirections:ko,locale:po,showSorterTooltip:kr=!0,virtual:Fo}=ft,qo=Me.useMemo(()=>ar||un(oo),[ar,oo]),ma=Me.useMemo(()=>qo.some(ys=>ys.responsive),[qo]),va=(0,ci.Z)(ma),lo=Me.useMemo(()=>{const ys=new Set(Object.keys(va).filter(Qs=>va[Qs]));return qo.filter(Qs=>!Qs.responsive||Qs.responsive.some(Ml=>ys.has(Ml)))},[qo,va]),Ba=(0,Ao.Z)(ft,["className","style","columns"]),{locale:Wa=xa.Z,direction:Ps,table:is,renderEmpty:il,getPrefixCls:Ls,getPopupContainer:_a}=Me.useContext(Jr.E_),oa=(0,Eo.Z)(ni),as=Object.assign(Object.assign({},Wa.Table),po),rl=Ci||ra,Gs=Ls("table",nn),xl=Ls("dropdown",Yn),Pa=Object.assign({childrenColumnName:dr,expandIconColumnIndex:Ho},la),{childrenColumnName:ha="children"}=Pa,ya=Me.useMemo(()=>rl.some(ys=>ys==null?void 0:ys[ha])?"nest":so||la&&la.expandedRowRender?"row":null,[rl]),Vo={body:Me.useRef()},vs=Me.useMemo(()=>typeof xr=="function"?xr:ys=>ys==null?void 0:ys[xr],[xr]),[Ko]=Ri(rl,ha,vs),Aa={},es=function(ys,Qs){let Ml=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var qs,cs,Ll;const Eu=Object.assign(Object.assign({},Aa),ys);Ml&&((qs=Aa.resetPagination)===null||qs===void 0||qs.call(Aa),!((cs=Eu.pagination)===null||cs===void 0)&&cs.current&&(Eu.pagination.current=1),Bi&&Bi.onChange&&Bi.onChange(1,(Ll=Eu.pagination)===null||Ll===void 0?void 0:Ll.pageSize)),fo&&fo.scrollToFirstRowOnChange!==!1&&Vo.body.current&&(0,Va.Z)(0,{getContainer:()=>Vo.body.current}),qr==null||qr(Eu.pagination,Eu.filters,Eu.sorter,{currentDataSource:Qn(no(rl,Eu.sorterStates,ha),Eu.filterStates),action:Qs})},rs=(ys,Qs)=>{es({sorter:ys,sorterStates:Qs},"sort",!1)},[zl,Ol,eu,ws]=Lo({prefixCls:Gs,mergedColumns:lo,onSorterChange:rs,sortDirections:ko||["ascend","descend"],tableLocale:as,showSorterTooltip:kr}),Ul=Me.useMemo(()=>no(rl,Ol,ha),[rl,Ol]);Aa.sorter=ws(),Aa.sorterStates=Ol;const Sl=(ys,Qs)=>{es({filters:ys,filterStates:Qs},"filter",!0)},[kl,Rc,Cs]=$i({prefixCls:Gs,locale:as,dropdownPrefixCls:xl,mergedColumns:lo,onFilterChange:Sl,getPopupContainer:Yr||_a}),ks=Qn(Ul,Rc);Aa.filters=Cs,Aa.filterStates=Rc;const bs=Me.useMemo(()=>{const ys={};return Object.keys(Cs).forEach(Qs=>{Cs[Qs]!==null&&(ys[Qs]=Cs[Qs])}),Object.assign(Object.assign({},eu),{filters:ys})},[eu,Cs]),[$s]=Zr(bs),bl=(ys,Qs)=>{es({pagination:Object.assign(Object.assign({},Aa.pagination),{current:ys,pageSize:Qs})},"paginate")},[Qa,Hs]=Ma(ks.length,bl,Bi);Aa.pagination=Bi===!1?{}:mr(Qa,Bi),Aa.resetPagination=Hs;const Hl=Me.useMemo(()=>{if(Bi===!1||!Qa.pageSize)return ks;const{current:ys=1,total:Qs,pageSize:Ml=Ji}=Qa;return ks.length<Qs?ks.length>Ml?ks.slice((ys-1)*Ml,ys*Ml):ks:ks.slice((ys-1)*Ml,ys*Ml)},[!!Bi,ks,Qa&&Qa.current,Qa&&Qa.pageSize,Qa&&Qa.total]),[tu,Yu]=Sr({prefixCls:Gs,data:ks,pageData:Hl,getRowKey:vs,getRecordByKey:Ko,expandType:ya,childrenColumnName:ha,locale:as,getPopupContainer:Yr||_a},bi),_u=(ys,Qs,Ml)=>{let qs;return typeof gr=="function"?qs=et()(gr(ys,Qs,Ml)):qs=et()(gr),et()({[`${Gs}-row-selected`]:Yu.has(vs(ys,Qs))},qs)};Pa.__PARENT_RENDER_ICON__=Pa.expandIcon,Pa.expandIcon=Pa.expandIcon||$o||ja(as),ya==="nest"&&Pa.expandIconColumnIndex===void 0?Pa.expandIconColumnIndex=bi?1:0:Pa.expandIconColumnIndex>0&&bi&&(Pa.expandIconColumnIndex-=1),typeof Pa.indentSize!="number"&&(Pa.indentSize=typeof Na=="number"?Na:15);const El=Me.useCallback(ys=>$s(tu(kl(zl(ys)))),[zl,kl,tu]);let ju,zu;if(Bi!==!1&&(Qa!=null&&Qa.total)){let ys;Qa.size?ys=Qa.size:ys=oa==="small"||oa==="middle"?"small":void 0;const Qs=cs=>Me.createElement(za.Z,Object.assign({},Qa,{className:et()(`${Gs}-pagination ${Gs}-pagination-${cs}`,Qa.className),size:ys})),Ml=Ps==="rtl"?"left":"right",{position:qs}=Qa;if(qs!==null&&Array.isArray(qs)){const cs=qs.find(Sc=>Sc.includes("top")),Ll=qs.find(Sc=>Sc.includes("bottom")),Eu=qs.every(Sc=>`${Sc}`=="none");!cs&&!Ll&&!Eu&&(zu=Qs(Ml)),cs&&(ju=Qs(cs.toLowerCase().replace("top",""))),Ll&&(zu=Qs(Ll.toLowerCase().replace("bottom","")))}else zu=Qs(Ml)}let Fs;typeof So=="boolean"?Fs={spinning:So}:typeof So=="object"&&(Fs=Object.assign({spinning:!0},So));const[Yl,Ks]=lc(Gs),[,Zs]=(0,ho.Z)(),Xu=et()(`${Gs}-wrapper`,is==null?void 0:is.className,{[`${Gs}-wrapper-rtl`]:Ps==="rtl"},ln,Dn,Ks),Yc=Object.assign(Object.assign({},is==null?void 0:is.style),Sn),cc=po&&po.emptyText||(il==null?void 0:il("Table"))||Me.createElement(eo.Z,{componentName:"Table"}),dc=Fo?Ca:Mi,Ju={},Hu=Me.useMemo(()=>{const{fontSize:ys,lineHeight:Qs,padding:Ml,paddingXS:qs,paddingSM:cs}=Zs,Ll=Math.floor(ys*Qs);switch(oa){case"large":return Ml*2+Ll;case"small":return qs*2+Ll;default:return cs*2+Ll}},[Zs,oa]);return Fo&&(Ju.listItemHeight=Hu),Yl(Me.createElement("div",{ref:St,className:Xu,style:Yc},Me.createElement(xs.Z,Object.assign({spinning:!1},Fs),ju,Me.createElement(dc,Object.assign({},Ju,Ba,{columns:lo,direction:Ps,expandable:Pa,prefixCls:Gs,className:et()({[`${Gs}-middle`]:oa==="middle",[`${Gs}-small`]:oa==="small",[`${Gs}-bordered`]:ii,[`${Gs}-empty`]:rl.length===0}),data:Hl,rowKey:vs,rowClassName:_u,emptyText:cc,internalHooks:Re,internalRefs:Vo,transformColumns:El})),zu)))};var bu=Me.forwardRef(Cu);const ql=(ft,St)=>{const nn=Me.useRef(0);return nn.current+=1,Me.createElement(bu,Object.assign({},ft,{ref:St,_renderTimes:nn.current}))},Cl=Me.forwardRef(ql);Cl.SELECTION_COLUMN=tr,Cl.EXPAND_COLUMN=ue,Cl.SELECTION_ALL=yr,Cl.SELECTION_INVERT=vr,Cl.SELECTION_NONE=br,Cl.Column=xo,Cl.ColumnGroup=Da,Cl.Summary=it;var uc=Cl,Md=uc},12563:function(zn,En,me){"use strict";me.d(En,{default:function(){return dt}});var ue=me(59301),Re=me(72119),Ze=me(92310),ot=me.n(Ze),We=me(36785),lt=me(47729),Me=me(14088),Mt=me(36355),Ct=me(17313),Ye=me(37613),st=me(83116);const pt=He=>{const{paddingXXS:bt,lineWidth:et,tagPaddingHorizontal:It,componentCls:xt}=He,Bt=It-et,Ut=bt-et;return{[xt]:Object.assign(Object.assign({},(0,Ct.Wf)(He)),{display:"inline-block",height:"auto",marginInlineEnd:He.marginXS,paddingInline:Bt,fontSize:He.tagFontSize,lineHeight:He.tagLineHeight,whiteSpace:"nowrap",background:He.defaultBg,border:`${He.lineWidth}px ${He.lineType} ${He.colorBorder}`,borderRadius:He.borderRadiusSM,opacity:1,transition:`all ${He.motionDurationMid}`,textAlign:"start",position:"relative",[`&${xt}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:He.defaultColor},[`${xt}-close-icon`]:{marginInlineStart:Ut,color:He.colorTextDescription,fontSize:He.tagIconSize,cursor:"pointer",transition:`all ${He.motionDurationMid}`,"&:hover":{color:He.colorTextHeading}},[`&${xt}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${He.iconCls}-close, ${He.iconCls}-close:hover`]:{color:He.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${xt}-checkable-checked):hover`]:{color:He.colorPrimary,backgroundColor:He.colorFillSecondary},"&:active, &-checked":{color:He.colorTextLightSolid},"&-checked":{backgroundColor:He.colorPrimary,"&:hover":{backgroundColor:He.colorPrimaryHover}},"&:active":{backgroundColor:He.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${He.iconCls} + span, > span + ${He.iconCls}`]:{marginInlineStart:Bt}}),[`${xt}-borderless`]:{borderColor:"transparent",background:He.tagBorderlessBg}}},wt=He=>{const{lineWidth:bt,fontSizeIcon:et}=He,It=He.fontSizeSM,xt=`${He.lineHeightSM*It}px`;return(0,Ye.TS)(He,{tagFontSize:It,tagLineHeight:xt,tagIconSize:et-2*bt,tagPaddingHorizontal:8,tagBorderlessBg:He.colorFillTertiary})},Ie=He=>({defaultBg:He.colorFillQuaternary,defaultColor:He.colorText});var te=(0,st.Z)("Tag",He=>{const bt=wt(He);return pt(bt)},Ie),ee=function(He,bt){var et={};for(var It in He)Object.prototype.hasOwnProperty.call(He,It)&&bt.indexOf(It)<0&&(et[It]=He[It]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xt=0,It=Object.getOwnPropertySymbols(He);xt<It.length;xt++)bt.indexOf(It[xt])<0&&Object.prototype.propertyIsEnumerable.call(He,It[xt])&&(et[It[xt]]=He[It[xt]]);return et},se=He=>{const{prefixCls:bt,style:et,className:It,checked:xt,onChange:Bt,onClick:Ut}=He,Nt=ee(He,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:qe,tag:Ke}=ue.useContext(Mt.E_),Tt=xn=>{Bt==null||Bt(!xt),Ut==null||Ut(xn)},Ln=qe("tag",bt),[Mn,zt]=te(Ln),rn=ot()(Ln,`${Ln}-checkable`,{[`${Ln}-checkable-checked`]:xt},Ke==null?void 0:Ke.className,It,zt);return Mn(ue.createElement("span",Object.assign({},Nt,{style:Object.assign(Object.assign({},et),Ke==null?void 0:Ke.style),className:rn,onClick:Tt})))},he=me(45157);const ve=He=>(0,he.Z)(He,(bt,et)=>{let{textColor:It,lightBorderColor:xt,lightColor:Bt,darkColor:Ut}=et;return{[`${He.componentCls}-${bt}`]:{color:It,background:Bt,borderColor:xt,"&-inverse":{color:He.colorTextLightSolid,background:Ut,borderColor:Ut},[`&${He.componentCls}-borderless`]:{borderColor:"transparent"}}}});var be=(0,st.b)(["Tag","preset"],He=>{const bt=wt(He);return ve(bt)},Ie);function Ne(He){return typeof He!="string"?He:He.charAt(0).toUpperCase()+He.slice(1)}const Fe=(He,bt,et)=>{const It=Ne(et);return{[`${He.componentCls}-${bt}`]:{color:He[`color${et}`],background:He[`color${It}Bg`],borderColor:He[`color${It}Border`],[`&${He.componentCls}-borderless`]:{borderColor:"transparent"}}}};var je=(0,st.b)(["Tag","status"],He=>{const bt=wt(He);return[Fe(bt,"success","Success"),Fe(bt,"processing","Info"),Fe(bt,"error","Error"),Fe(bt,"warning","Warning")]},Ie),ze=function(He,bt){var et={};for(var It in He)Object.prototype.hasOwnProperty.call(He,It)&&bt.indexOf(It)<0&&(et[It]=He[It]);if(He!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xt=0,It=Object.getOwnPropertySymbols(He);xt<It.length;xt++)bt.indexOf(It[xt])<0&&Object.prototype.propertyIsEnumerable.call(He,It[xt])&&(et[It[xt]]=He[It[xt]]);return et};const Xe=(He,bt)=>{const{prefixCls:et,className:It,rootClassName:xt,style:Bt,children:Ut,icon:Nt,color:qe,onClose:Ke,closeIcon:Tt,closable:Ln,bordered:Mn=!0}=He,zt=ze(He,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:rn,direction:xn,tag:Un}=ue.useContext(Mt.E_),[yn,sn]=ue.useState(!0);ue.useEffect(()=>{"visible"in zt&&sn(zt.visible)},[zt.visible]);const Lt=(0,We.o2)(qe),ti=(0,We.yT)(qe),gi=Lt||ti,Pn=Object.assign(Object.assign({backgroundColor:qe&&!gi?qe:void 0},Un==null?void 0:Un.style),Bt),Xt=rn("tag",et),[Kt,Ot]=te(Xt),rt=ot()(Xt,Un==null?void 0:Un.className,{[`${Xt}-${qe}`]:gi,[`${Xt}-has-color`]:qe&&!gi,[`${Xt}-hidden`]:!yn,[`${Xt}-rtl`]:xn==="rtl",[`${Xt}-borderless`]:!Mn},It,xt,Ot),Ue=Pe=>{Pe.stopPropagation(),Ke==null||Ke(Pe),!Pe.defaultPrevented&&sn(!1)},[,$t]=(0,lt.Z)(Ln,Tt,Pe=>Pe===null?ue.createElement(Re.Z,{className:`${Xt}-close-icon`,onClick:Ue}):ue.createElement("span",{className:`${Xt}-close-icon`,onClick:Ue},Pe),null,!1),Gt=typeof zt.onClick=="function"||Ut&&Ut.type==="a",it=Nt||null,at=it?ue.createElement(ue.Fragment,null,it,Ut&&ue.createElement("span",null,Ut)):Ut,Te=ue.createElement("span",Object.assign({},zt,{ref:bt,className:rt,style:Pn}),at,$t,Lt&&ue.createElement(be,{key:"preset",prefixCls:Xt}),ti&&ue.createElement(je,{key:"status",prefixCls:Xt}));return Kt(Gt?ue.createElement(Me.Z,{component:"Tag"},Te):Te)},Je=ue.forwardRef(Xe);Je.CheckableTag=se;var dt=Je},10777:function(zn,En,me){"use strict";me.d(En,{Z:function(){return je}});var ue=me(92310),Re=me.n(ue),Ze=me(59301),ot=me(36355),We=function(ze,Xe){var Je={};for(var dt in ze)Object.prototype.hasOwnProperty.call(ze,dt)&&Xe.indexOf(dt)<0&&(Je[dt]=ze[dt]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,dt=Object.getOwnPropertySymbols(ze);He<dt.length;He++)Xe.indexOf(dt[He])<0&&Object.prototype.propertyIsEnumerable.call(ze,dt[He])&&(Je[dt[He]]=ze[dt[He]]);return Je},Me=ze=>{var{prefixCls:Xe,className:Je,color:dt="blue",dot:He,pending:bt=!1,position:et,label:It,children:xt}=ze,Bt=We(ze,["prefixCls","className","color","dot","pending","position","label","children"]);const{getPrefixCls:Ut}=Ze.useContext(ot.E_),Nt=Ut("timeline",Xe),qe=Re()(`${Nt}-item`,{[`${Nt}-item-pending`]:bt},Je),Ke=/blue|red|green|gray/.test(dt||"")?void 0:dt,Tt=Re()(`${Nt}-item-head`,{[`${Nt}-item-head-custom`]:!!He,[`${Nt}-item-head-${dt}`]:!Ke});return Ze.createElement("li",Object.assign({},Bt,{className:qe}),It&&Ze.createElement("div",{className:`${Nt}-item-label`},It),Ze.createElement("div",{className:`${Nt}-item-tail`}),Ze.createElement("div",{className:Tt,style:{borderColor:Ke,color:Ke}},He),Ze.createElement("div",{className:`${Nt}-item-content`},xt))},Mt=me(26390),Ct=me(50023),Ye=function(ze,Xe){var Je={};for(var dt in ze)Object.prototype.hasOwnProperty.call(ze,dt)&&Xe.indexOf(dt)<0&&(Je[dt]=ze[dt]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,dt=Object.getOwnPropertySymbols(ze);He<dt.length;He++)Xe.indexOf(dt[He])<0&&Object.prototype.propertyIsEnumerable.call(ze,dt[He])&&(Je[dt[He]]=ze[dt[He]]);return Je},pt=ze=>{var{prefixCls:Xe,className:Je,pending:dt=!1,children:He,items:bt,rootClassName:et,reverse:It=!1,direction:xt,hashId:Bt,pendingDot:Ut,mode:Nt=""}=ze,qe=Ye(ze,["prefixCls","className","pending","children","items","rootClassName","reverse","direction","hashId","pendingDot","mode"]);const Ke=(yn,sn)=>Nt==="alternate"?yn==="right"?`${Xe}-item-right`:yn==="left"?`${Xe}-item-left`:sn%2===0?`${Xe}-item-left`:`${Xe}-item-right`:Nt==="left"?`${Xe}-item-left`:Nt==="right"?`${Xe}-item-right`:yn==="right"?`${Xe}-item-right`:"",Tt=(0,Mt.Z)(bt||[]),Ln=typeof dt=="boolean"?null:dt;dt&&Tt.push({pending:!!dt,dot:Ut||Ze.createElement(Ct.Z,null),children:Ln}),It&&Tt.reverse();const Mn=Tt.length,zt=`${Xe}-item-last`,rn=Tt.filter(yn=>!!yn).map((yn,sn)=>{var Lt;const ti=sn===Mn-2?zt:"",gi=sn===Mn-1?zt:"",{className:Pn}=yn,Xt=Ye(yn,["className"]);return Ze.createElement(Me,Object.assign({},Xt,{className:Re()([Pn,!It&&dt?ti:gi,Ke((Lt=yn==null?void 0:yn.position)!==null&&Lt!==void 0?Lt:"",sn)]),key:(yn==null?void 0:yn.key)||sn}))}),xn=Tt.some(yn=>!!(yn!=null&&yn.label)),Un=Re()(Xe,{[`${Xe}-pending`]:!!dt,[`${Xe}-reverse`]:!!It,[`${Xe}-${Nt}`]:!!Nt&&!xn,[`${Xe}-label`]:xn,[`${Xe}-rtl`]:xt==="rtl"},Je,et,Bt);return Ze.createElement("ul",Object.assign({},qe,{className:Un}),rn)},wt=me(38298);function Ie(ze,Xe){return ze&&Array.isArray(ze)?ze:(0,wt.Z)(Xe).map(Je=>{var dt,He;return Object.assign({children:(He=(dt=Je==null?void 0:Je.props)===null||dt===void 0?void 0:dt.children)!==null&&He!==void 0?He:""},Je.props)})}var te=Ie,ee=me(17313),de=me(83116),se=me(37613);const he=ze=>{const{componentCls:Xe}=ze;return{[Xe]:Object.assign(Object.assign({},(0,ee.Wf)(ze)),{margin:0,padding:0,listStyle:"none",[`${Xe}-item`]:{position:"relative",margin:0,paddingBottom:ze.itemPaddingBottom,fontSize:ze.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:ze.itemHeadSize,insetInlineStart:(ze.itemHeadSize-ze.tailWidth)/2,height:`calc(100% - ${ze.itemHeadSize}px)`,borderInlineStart:`${ze.tailWidth}px ${ze.lineType} ${ze.tailColor}`},"&-pending":{[`${Xe}-item-head`]:{fontSize:ze.fontSizeSM,backgroundColor:"transparent"},[`${Xe}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:ze.itemHeadSize,height:ze.itemHeadSize,backgroundColor:ze.dotBg,border:`${ze.dotBorderWidth}px ${ze.lineType} transparent`,borderRadius:"50%","&-blue":{color:ze.colorPrimary,borderColor:ze.colorPrimary},"&-red":{color:ze.colorError,borderColor:ze.colorError},"&-green":{color:ze.colorSuccess,borderColor:ze.colorSuccess},"&-gray":{color:ze.colorTextDisabled,borderColor:ze.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:ze.itemHeadSize/2,insetInlineStart:ze.itemHeadSize/2,width:"auto",height:"auto",marginBlockStart:0,paddingBlock:ze.customHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:-(ze.fontSize*ze.lineHeight-ze.fontSize)+ze.lineWidth,marginInlineStart:ze.margin+ze.itemHeadSize,marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${Xe}-item-tail`]:{display:"none"},[`> ${Xe}-item-content`]:{minHeight:ze.controlHeightLG*1.2}}},[`&${Xe}-alternate,
|
|
|
&${Xe}-right,
|
|
|
&${Xe}-label`]:{[`${Xe}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:`-${ze.marginXXS}px`,"&-custom":{marginInlineStart:ze.tailWidth/2}},"&-left":{[`${Xe}-item-content`]:{insetInlineStart:`calc(50% - ${ze.marginXXS}px)`,width:`calc(50% - ${ze.marginSM}px)`,textAlign:"start"}},"&-right":{[`${Xe}-item-content`]:{width:`calc(50% - ${ze.marginSM}px)`,margin:0,textAlign:"end"}}}},[`&${Xe}-right`]:{[`${Xe}-item-right`]:{[`${Xe}-item-tail,
|
|
|
${Xe}-item-head,
|
|
|
${Xe}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(ze.itemHeadSize+ze.tailWidth)/2}px)`},[`${Xe}-item-content`]:{width:`calc(100% - ${ze.itemHeadSize+ze.marginXS}px)`}}},[`&${Xe}-pending
|
|
|
${Xe}-item-last
|
|
|
${Xe}-item-tail`]:{display:"block",height:`calc(100% - ${ze.margin}px)`,borderInlineStart:`${ze.tailWidth}px dotted ${ze.tailColor}`},[`&${Xe}-reverse
|
|
|
${Xe}-item-last
|
|
|
${Xe}-item-tail`]:{display:"none"},[`&${Xe}-reverse ${Xe}-item-pending`]:{[`${Xe}-item-tail`]:{insetBlockStart:ze.margin,display:"block",height:`calc(100% - ${ze.margin}px)`,borderInlineStart:`${ze.tailWidth}px dotted ${ze.tailColor}`},[`${Xe}-item-content`]:{minHeight:ze.controlHeightLG*1.2}},[`&${Xe}-label`]:{[`${Xe}-item-label`]:{position:"absolute",insetBlockStart:-(ze.fontSize*ze.lineHeight-ze.fontSize)+ze.tailWidth,width:`calc(50% - ${ze.marginSM}px)`,textAlign:"end"},[`${Xe}-item-right`]:{[`${Xe}-item-label`]:{insetInlineStart:`calc(50% + ${ze.marginSM}px)`,width:`calc(50% - ${ze.marginSM}px)`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${Xe}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}};var ve=(0,de.Z)("Timeline",ze=>{const Xe=(0,se.TS)(ze,{itemHeadSize:10,customHeadPaddingVertical:ze.paddingXXS,paddingInlineEnd:2});return[he(Xe)]},ze=>({tailColor:ze.colorSplit,tailWidth:ze.lineWidthBold,dotBorderWidth:ze.wireframe?ze.lineWidthBold:ze.lineWidth*3,dotBg:ze.colorBgContainer,itemPaddingBottom:ze.padding*1.25})),be=function(ze,Xe){var Je={};for(var dt in ze)Object.prototype.hasOwnProperty.call(ze,dt)&&Xe.indexOf(dt)<0&&(Je[dt]=ze[dt]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var He=0,dt=Object.getOwnPropertySymbols(ze);He<dt.length;He++)Xe.indexOf(dt[He])<0&&Object.prototype.propertyIsEnumerable.call(ze,dt[He])&&(Je[dt[He]]=ze[dt[He]]);return Je};const Ne=ze=>{const{getPrefixCls:Xe,direction:Je,timeline:dt}=Ze.useContext(ot.E_),{prefixCls:He,children:bt,items:et,className:It,style:xt}=ze,Bt=be(ze,["prefixCls","children","items","className","style"]),Ut=Xe("timeline",He),[Nt,qe]=ve(Ut),Ke=te(et,bt);return Nt(Ze.createElement(pt,Object.assign({},Bt,{className:Re()(dt==null?void 0:dt.className,It),style:Object.assign(Object.assign({},dt==null?void 0:dt.style),xt),prefixCls:Ut,direction:Je,items:Ke,hashId:qe})))};Ne.Item=Me;var Fe=Ne,je=Fe},86914:function(zn,En,me){"use strict";me.d(En,{default:function(){return qe}});var ue=me(99581),Re=me(26390),Ze=me(43971),ot=me(58358),We=me(5891),lt=me(59301),Me={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},Mt=Me,Ct=me(88853),Ye=function(Tt,Ln){return lt.createElement(Ct.Z,(0,We.Z)({},Tt,{ref:Ln,icon:Mt}))},st=lt.forwardRef(Ye),pt=st,wt=me(92310),Ie=me.n(wt),te=me(35654),ee=me(71430),de=me(36355),se=me(44757),he=me(62892),ve=me(20648);const be=4;function Ne(Ke){const{dropPosition:Tt,dropLevelOffset:Ln,prefixCls:Mn,indent:zt,direction:rn="ltr"}=Ke,xn=rn==="ltr"?"left":"right",Un=rn==="ltr"?"right":"left",yn={[xn]:-Ln*zt+be,[Un]:0};switch(Tt){case-1:yn.top=-3;break;case 1:yn.bottom=-3;break;default:yn.bottom=-3,yn[xn]=zt+be;break}return lt.createElement("div",{style:yn,className:`${Mn}-drop-indicator`})}var Fe=me(48610),ze=lt.forwardRef((Ke,Tt)=>{const{getPrefixCls:Ln,direction:Mn,virtual:zt,tree:rn}=lt.useContext(de.E_),{prefixCls:xn,className:Un,showIcon:yn=!1,showLine:sn,switcherIcon:Lt,blockNode:ti=!1,children:gi,checkable:Pn=!1,selectable:Xt=!0,draggable:Kt,motion:Ot,style:rt}=Ke,Ue=Ln("tree",xn),$t=Ln(),Gt=Ot!=null?Ot:Object.assign(Object.assign({},(0,he.Z)($t)),{motionAppear:!1}),it=Object.assign(Object.assign({},Ke),{checkable:Pn,selectable:Xt,showIcon:yn,motion:Gt,blockNode:ti,showLine:!!sn,dropIndicatorRender:Ne}),[at,Te]=(0,ve.ZP)(Ue),Pe=lt.useMemo(()=>{if(!Kt)return!1;let ke={};switch(typeof Kt){case"function":ke.nodeDraggable=Kt;break;case"object":ke=Object.assign({},Kt);break;default:break}return ke.icon!==!1&&(ke.icon=ke.icon||lt.createElement(se.Z,null)),ke},[Kt]),ye=ke=>lt.createElement(Fe.Z,{prefixCls:Ue,switcherIcon:Lt,treeNodeProps:ke,showLine:sn});return at(lt.createElement(ue.Z,Object.assign({itemHeight:20,ref:Tt,virtual:zt},it,{style:Object.assign(Object.assign({},rn==null?void 0:rn.style),rt),prefixCls:Ue,className:Ie()({[`${Ue}-icon-hide`]:!yn,[`${Ue}-block-node`]:ti,[`${Ue}-unselectable`]:!Xt,[`${Ue}-rtl`]:Mn==="rtl"},rn==null?void 0:rn.className,Un,Te),direction:Mn,checkable:Pn&<.createElement("span",{className:`${Ue}-checkbox-inner`}),selectable:Xt,switcherIcon:ye,draggable:Pe}),gi))}),Xe;(function(Ke){Ke[Ke.None=0]="None",Ke[Ke.Start=1]="Start",Ke[Ke.End=2]="End"})(Xe||(Xe={}));function Je(Ke,Tt){function Ln(Mn){const{key:zt,children:rn}=Mn;Tt(zt,Mn)!==!1&&Je(rn||[],Tt)}Ke.forEach(Ln)}function dt(Ke){let{treeData:Tt,expandedKeys:Ln,startKey:Mn,endKey:zt}=Ke;const rn=[];let xn=Xe.None;if(Mn&&Mn===zt)return[Mn];if(!Mn||!zt)return[];function Un(yn){return yn===Mn||yn===zt}return Je(Tt,yn=>{if(xn===Xe.End)return!1;if(Un(yn)){if(rn.push(yn),xn===Xe.None)xn=Xe.Start;else if(xn===Xe.Start)return xn=Xe.End,!1}else xn===Xe.Start&&rn.push(yn);return Ln.includes(yn)}),rn}function He(Ke,Tt){const Ln=(0,Re.Z)(Tt),Mn=[];return Je(Ke,(zt,rn)=>{const xn=Ln.indexOf(zt);return xn!==-1&&(Mn.push(rn),Ln.splice(xn,1)),!!Ln.length}),Mn}var bt=function(Ke,Tt){var Ln={};for(var Mn in Ke)Object.prototype.hasOwnProperty.call(Ke,Mn)&&Tt.indexOf(Mn)<0&&(Ln[Mn]=Ke[Mn]);if(Ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var zt=0,Mn=Object.getOwnPropertySymbols(Ke);zt<Mn.length;zt++)Tt.indexOf(Mn[zt])<0&&Object.prototype.propertyIsEnumerable.call(Ke,Mn[zt])&&(Ln[Mn[zt]]=Ke[Mn[zt]]);return Ln};function et(Ke){const{isLeaf:Tt,expanded:Ln}=Ke;return Tt?lt.createElement(Ze.Z,null):Ln?lt.createElement(ot.Z,null):lt.createElement(pt,null)}function It(Ke){let{treeData:Tt,children:Ln}=Ke;return Tt||(0,ee.zn)(Ln)}const xt=(Ke,Tt)=>{var{defaultExpandAll:Ln,defaultExpandParent:Mn,defaultExpandedKeys:zt}=Ke,rn=bt(Ke,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const xn=lt.useRef(),Un=lt.useRef(),yn=()=>{const{keyEntities:Pe}=(0,ee.I8)(It(rn));let ye;return Ln?ye=Object.keys(Pe):Mn?ye=(0,te.r7)(rn.expandedKeys||zt||[],Pe):ye=rn.expandedKeys||zt,ye},[sn,Lt]=lt.useState(rn.selectedKeys||rn.defaultSelectedKeys||[]),[ti,gi]=lt.useState(()=>yn());lt.useEffect(()=>{"selectedKeys"in rn&&Lt(rn.selectedKeys)},[rn.selectedKeys]),lt.useEffect(()=>{"expandedKeys"in rn&&gi(rn.expandedKeys)},[rn.expandedKeys]);const Pn=(Pe,ye)=>{var ke;return"expandedKeys"in rn||gi(Pe),(ke=rn.onExpand)===null||ke===void 0?void 0:ke.call(rn,Pe,ye)},Xt=(Pe,ye)=>{var ke;const{multiple:$e}=rn,{node:Le,nativeEvent:vt}=ye,{key:an=""}=Le,bn=It(rn),en=Object.assign(Object.assign({},ye),{selected:!0}),wn=(vt==null?void 0:vt.ctrlKey)||(vt==null?void 0:vt.metaKey),ai=vt==null?void 0:vt.shiftKey;let _n;$e&&wn?(_n=Pe,xn.current=an,Un.current=_n,en.selectedNodes=He(bn,_n)):$e&&ai?(_n=Array.from(new Set([].concat((0,Re.Z)(Un.current||[]),(0,Re.Z)(dt({treeData:bn,expandedKeys:ti,startKey:an,endKey:xn.current}))))),en.selectedNodes=He(bn,_n)):(_n=[an],xn.current=an,Un.current=_n,en.selectedNodes=He(bn,_n)),(ke=rn.onSelect)===null||ke===void 0||ke.call(rn,_n,en),"selectedKeys"in rn||Lt(_n)},{getPrefixCls:Kt,direction:Ot}=lt.useContext(de.E_),{prefixCls:rt,className:Ue,showIcon:$t=!0,expandAction:Gt="click"}=rn,it=bt(rn,["prefixCls","className","showIcon","expandAction"]),at=Kt("tree",rt),Te=Ie()(`${at}-directory`,{[`${at}-directory-rtl`]:Ot==="rtl"},Ue);return lt.createElement(ze,Object.assign({icon:et,ref:Tt,blockNode:!0},it,{showIcon:$t,expandAction:Gt,prefixCls:at,className:Te,expandedKeys:ti,selectedKeys:sn,onSelect:Xt,onExpand:Pn}))};var Ut=lt.forwardRef(xt);const Nt=ze;Nt.DirectoryTree=Ut,Nt.TreeNode=ue.O;var qe=Nt},20648:function(zn,En,me){"use strict";me.d(En,{TM:function(){return wt},Yk:function(){return pt}});var ue=me(9792),Re=me(98447),Ze=me(17313),ot=me(8378),We=me(37613),lt=me(83116);const Me=new ue.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),Mt=(Ie,te)=>({[`.${Ie}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${te.motionDurationSlow}`}}}),Ct=(Ie,te)=>({[`.${Ie}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:te.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${te.lineWidthBold}px solid ${te.colorPrimary}`,borderRadius:"50%",content:'""'}}}),Ye=(Ie,te)=>{const{treeCls:ee,treeNodeCls:de,treeNodePadding:se,titleHeight:he,nodeSelectedBg:ve,nodeHoverBg:be}=te,Ne=te.paddingXS;return{[ee]:Object.assign(Object.assign({},(0,Ze.Wf)(te)),{background:te.colorBgContainer,borderRadius:te.borderRadius,transition:`background-color ${te.motionDurationSlow}`,[`&${ee}-rtl`]:{[`${ee}-switcher`]:{"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${ee}-active-focused)`]:Object.assign({},(0,Ze.oN)(te)),[`${ee}-list-holder-inner`]:{alignItems:"flex-start"},[`&${ee}-block-node`]:{[`${ee}-list-holder-inner`]:{alignItems:"stretch",[`${ee}-node-content-wrapper`]:{flex:"auto"},[`${de}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:se,insetInlineStart:0,border:`1px solid ${te.colorPrimary}`,opacity:0,animationName:Me,animationDuration:te.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${de}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${se}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${ee}-node-content-wrapper`]:{color:te.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${ee}-node-content-wrapper`]:Object.assign({},(0,Ze.oN)(te)),[`&:not(${de}-disabled).filter-node ${ee}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${ee}-draggable-icon`]:{flexShrink:0,width:he,lineHeight:`${he}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${te.motionDurationSlow}`,[`${de}:hover &`]:{opacity:.45}},[`&${de}-disabled`]:{[`${ee}-draggable-icon`]:{visibility:"hidden"}}}},[`${ee}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:he}},[`${ee}-draggable-icon`]:{visibility:"hidden"},[`${ee}-switcher`]:Object.assign(Object.assign({},Mt(Ie,te)),{position:"relative",flex:"none",alignSelf:"stretch",width:he,margin:0,lineHeight:`${he}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:te.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:he/2,bottom:-se,marginInlineStart:-1,borderInlineEnd:`1px solid ${te.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:he/2*.8,height:he/2,borderBottom:`1px solid ${te.colorBorder}`,content:'""'}}}),[`${ee}-checkbox`]:{top:"initial",marginInlineEnd:Ne},[`${ee}-node-content-wrapper, ${ee}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:he,margin:0,padding:`0 ${te.paddingXS/2}px`,color:"inherit",lineHeight:`${he}px`,background:"transparent",borderRadius:te.borderRadius,cursor:"pointer",transition:`all ${te.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:be},[`&${ee}-node-selected`]:{backgroundColor:ve},[`${ee}-iconEle`]:{display:"inline-block",width:he,height:he,lineHeight:`${he}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${ee}-unselectable ${ee}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${ee}-node-content-wrapper`]:Object.assign({lineHeight:`${he}px`,userSelect:"none"},Ct(Ie,te)),[`${de}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${te.colorPrimary}`}},"&-show-line":{[`${ee}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:he/2,bottom:-se,borderInlineEnd:`1px solid ${te.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${ee}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${de}-leaf-last`]:{[`${ee}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${he/2}px !important`}}}}})}},st=Ie=>{const{treeCls:te,treeNodeCls:ee,treeNodePadding:de,directoryNodeSelectedBg:se,directoryNodeSelectedColor:he}=Ie;return{[`${te}${te}-directory`]:{[ee]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:de,insetInlineStart:0,transition:`background-color ${Ie.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:Ie.controlItemBgHover}},"> *":{zIndex:1},[`${te}-switcher`]:{transition:`color ${Ie.motionDurationMid}`},[`${te}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${te}-node-selected`]:{color:he,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:se},[`${te}-switcher`]:{color:he},[`${te}-node-content-wrapper`]:{color:he,background:"transparent"}}}}}},pt=(Ie,te)=>{const ee=`.${Ie}`,de=`${ee}-treenode`,se=te.paddingXS/2,he=(0,We.TS)(te,{treeCls:ee,treeNodeCls:de,treeNodePadding:se});return[Ye(Ie,he),st(he)]},wt=Ie=>{const{controlHeightSM:te}=Ie;return{titleHeight:te,nodeHoverBg:Ie.controlItemBgHover,nodeSelectedBg:Ie.controlItemBgActive}};En.ZP=(0,lt.Z)("Tree",(Ie,te)=>{let{prefixCls:ee}=te;return[{[Ie.componentCls]:(0,Re.C2)(`${ee}-checkbox`,Ie)},pt(ee,Ie),(0,ot.Z)(Ie)]},Ie=>{const{colorTextLightSolid:te,colorPrimary:ee}=Ie;return Object.assign(Object.assign({},wt(Ie)),{directoryNodeSelectedColor:te,directoryNodeSelectedBg:ee})})},48610:function(zn,En,me){"use strict";me.d(En,{Z:function(){return de}});var ue=me(5891),Re=me(59301),Ze={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},ot=Ze,We=me(88853),lt=function(he,ve){return Re.createElement(We.Z,(0,ue.Z)({},he,{ref:ve,icon:ot}))},Me=Re.forwardRef(lt),Mt=Me,Ct=me(43971),Ye=me(50023),st=me(77042),pt=me(5527),wt=me(92310),Ie=me.n(wt),te=me(92343),de=se=>{const{prefixCls:he,switcherIcon:ve,treeNodeProps:be,showLine:Ne}=se,{isLeaf:Fe,expanded:je,loading:ze}=be;if(ze)return Re.createElement(Ye.Z,{className:`${he}-switcher-loading-icon`});let Xe;if(Ne&&typeof Ne=="object"&&(Xe=Ne.showLeafIcon),Fe){if(!Ne)return null;if(typeof Xe!="boolean"&&Xe){const He=typeof Xe=="function"?Xe(be):Xe,bt=`${he}-switcher-line-custom-icon`;return(0,te.l$)(He)?(0,te.Tm)(He,{className:Ie()(He.props.className||"",bt)}):He}return Xe?Re.createElement(Ct.Z,{className:`${he}-switcher-line-icon`}):Re.createElement("span",{className:`${he}-switcher-leaf-line`})}const Je=`${he}-switcher-icon`,dt=typeof ve=="function"?ve(be):ve;return(0,te.l$)(dt)?(0,te.Tm)(dt,{className:Ie()(dt.props.className||"",Je)}):dt!==void 0?dt:Ne?je?Re.createElement(st.Z,{className:`${he}-switcher-line-icon`}):Re.createElement(pt.Z,{className:`${he}-switcher-line-icon`}):Re.createElement(Mt,{className:Je})}},99498:function(zn,En,me){(function(ue){ue(me(89780))})(function(ue){ue.defineOption("placeholder","",function(Mt,Ct,Ye){var st=Ye&&Ye!=ue.Init;if(Ct&&!st)Mt.on("blur",We),Mt.on("change",lt),Mt.on("swapDoc",lt),ue.on(Mt.getInputField(),"compositionupdate",Mt.state.placeholderCompose=function(){ot(Mt)}),lt(Mt);else if(!Ct&&st){Mt.off("blur",We),Mt.off("change",lt),Mt.off("swapDoc",lt),ue.off(Mt.getInputField(),"compositionupdate",Mt.state.placeholderCompose),Re(Mt);var pt=Mt.getWrapperElement();pt.className=pt.className.replace(" CodeMirror-empty","")}Ct&&!Mt.hasFocus()&&We(Mt)});function Re(Mt){Mt.state.placeholder&&(Mt.state.placeholder.parentNode.removeChild(Mt.state.placeholder),Mt.state.placeholder=null)}function Ze(Mt){Re(Mt);var Ct=Mt.state.placeholder=document.createElement("pre");Ct.style.cssText="height: 0; overflow: visible",Ct.style.direction=Mt.getOption("direction"),Ct.className="CodeMirror-placeholder CodeMirror-line-like";var Ye=Mt.getOption("placeholder");typeof Ye=="string"&&(Ye=document.createTextNode(Ye)),Ct.appendChild(Ye),Mt.display.lineSpace.insertBefore(Ct,Mt.display.lineSpace.firstChild)}function ot(Mt){setTimeout(function(){var Ct=!1,Ye=Mt.getInputField();Ye.nodeName=="TEXTAREA"?Ct=!Ye.value:Mt.lineCount()==1&&(Ct=!/[^\u200b]/.test(Ye.querySelector(".CodeMirror-line").textContent)),Ct?Ze(Mt):Re(Mt)},20)}function We(Mt){Me(Mt)&&Ze(Mt)}function lt(Mt){var Ct=Mt.getWrapperElement(),Ye=Me(Mt);Ct.className=Ct.className.replace(" CodeMirror-empty","")+(Ye?" CodeMirror-empty":""),Ye?Ze(Mt):Re(Mt)}function Me(Mt){return Mt.lineCount()===1&&Mt.getLine(0)===""}})},25717:function(zn,En,me){(function(ue){ue(me(89780))})(function(ue){var Re={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ze=ue.Pos;ue.defineOption("autoCloseBrackets",!1,function(te,ee,de){de&&de!=ue.Init&&(te.removeKeyMap(We),te.state.closeBrackets=null),ee&&(lt(ot(ee,"pairs")),te.state.closeBrackets=ee,te.addKeyMap(We))});function ot(te,ee){return ee=="pairs"&&typeof te=="string"?te:typeof te=="object"&&te[ee]!=null?te[ee]:Re[ee]}var We={Backspace:Ct,Enter:Ye};function lt(te){for(var ee=0;ee<te.length;ee++){var de=te.charAt(ee),se="'"+de+"'";We[se]||(We[se]=Me(de))}}lt(Re.pairs+"`");function Me(te){return function(ee){return pt(ee,te)}}function Mt(te){var ee=te.state.closeBrackets;if(!ee||ee.override)return ee;var de=te.getModeAt(te.getCursor());return de.closeBrackets||ee}function Ct(te){var ee=Mt(te);if(!ee||te.getOption("disableInput"))return ue.Pass;for(var de=ot(ee,"pairs"),se=te.listSelections(),he=0;he<se.length;he++){if(!se[he].empty())return ue.Pass;var ve=wt(te,se[he].head);if(!ve||de.indexOf(ve)%2!=0)return ue.Pass}for(var he=se.length-1;he>=0;he--){var be=se[he].head;te.replaceRange("",Ze(be.line,be.ch-1),Ze(be.line,be.ch+1),"+delete")}}function Ye(te){var ee=Mt(te),de=ee&&ot(ee,"explode");if(!de||te.getOption("disableInput"))return ue.Pass;for(var se=te.listSelections(),he=0;he<se.length;he++){if(!se[he].empty())return ue.Pass;var ve=wt(te,se[he].head);if(!ve||de.indexOf(ve)%2!=0)return ue.Pass}te.operation(function(){var be=te.lineSeparator()||`
|
|
|
`;te.replaceSelection(be+be,null),te.execCommand("goCharLeft"),se=te.listSelections();for(var Ne=0;Ne<se.length;Ne++){var Fe=se[Ne].head.line;te.indentLine(Fe,null,!0),te.indentLine(Fe+1,null,!0)}})}function st(te){var ee=ue.cmpPos(te.anchor,te.head)>0;return{anchor:new Ze(te.anchor.line,te.anchor.ch+(ee?-1:1)),head:new Ze(te.head.line,te.head.ch+(ee?1:-1))}}function pt(te,ee){var de=Mt(te);if(!de||te.getOption("disableInput"))return ue.Pass;var se=ot(de,"pairs"),he=se.indexOf(ee);if(he==-1)return ue.Pass;for(var ve=ot(de,"closeBefore"),be=ot(de,"triples"),Ne=se.charAt(he+1)==ee,Fe=te.listSelections(),je=he%2==0,ze,Xe=0;Xe<Fe.length;Xe++){var Je=Fe[Xe],dt=Je.head,He,bt=te.getRange(dt,Ze(dt.line,dt.ch+1));if(je&&!Je.empty())He="surround";else if((Ne||!je)&&bt==ee)Ne&&Ie(te,dt)?He="both":be.indexOf(ee)>=0&&te.getRange(dt,Ze(dt.line,dt.ch+3))==ee+ee+ee?He="skipThree":He="skip";else if(Ne&&dt.ch>1&&be.indexOf(ee)>=0&&te.getRange(Ze(dt.line,dt.ch-2),dt)==ee+ee){if(dt.ch>2&&/\bstring/.test(te.getTokenTypeAt(Ze(dt.line,dt.ch-2))))return ue.Pass;He="addFour"}else if(Ne){var et=dt.ch==0?" ":te.getRange(Ze(dt.line,dt.ch-1),dt);if(!ue.isWordChar(bt)&&et!=ee&&!ue.isWordChar(et))He="both";else return ue.Pass}else if(je&&(bt.length===0||/\s/.test(bt)||ve.indexOf(bt)>-1))He="both";else return ue.Pass;if(!ze)ze=He;else if(ze!=He)return ue.Pass}var It=he%2?se.charAt(he-1):ee,xt=he%2?ee:se.charAt(he+1);te.operation(function(){if(ze=="skip")te.execCommand("goCharRight");else if(ze=="skipThree")for(var Bt=0;Bt<3;Bt++)te.execCommand("goCharRight");else if(ze=="surround"){for(var Ut=te.getSelections(),Bt=0;Bt<Ut.length;Bt++)Ut[Bt]=It+Ut[Bt]+xt;te.replaceSelections(Ut,"around"),Ut=te.listSelections().slice();for(var Bt=0;Bt<Ut.length;Bt++)Ut[Bt]=st(Ut[Bt]);te.setSelections(Ut)}else ze=="both"?(te.replaceSelection(It+xt,null),te.triggerElectric(It+xt),te.execCommand("goCharLeft")):ze=="addFour"&&(te.replaceSelection(It+It+It+It,"before"),te.execCommand("goCharRight"))})}function wt(te,ee){var de=te.getRange(Ze(ee.line,ee.ch-1),Ze(ee.line,ee.ch+1));return de.length==2?de:null}function Ie(te,ee){var de=te.getTokenAt(Ze(ee.line,ee.ch+1));return/\bstring/.test(de.type)&&de.start==ee.ch&&(ee.ch==0||!/\bstring/.test(te.getTokenTypeAt(ee)))}})},6313:function(zn,En,me){(function(ue){ue(me(89780),me(32855))})(function(ue){ue.defineOption("autoCloseTags",!1,function(Ct,Ye,st){if(st!=ue.Init&&st&&Ct.removeKeyMap("autoCloseTags"),!!Ye){var pt={name:"autoCloseTags"};(typeof Ye!="object"||Ye.whenClosing!==!1)&&(pt["'/'"]=function(wt){return lt(wt)}),(typeof Ye!="object"||Ye.whenOpening!==!1)&&(pt["'>'"]=function(wt){return ot(wt)}),Ct.addKeyMap(pt)}});var Re=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ze=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function ot(Ct){if(Ct.getOption("disableInput"))return ue.Pass;for(var Ye=Ct.listSelections(),st=[],pt=Ct.getOption("autoCloseTags"),wt=0;wt<Ye.length;wt++){if(!Ye[wt].empty())return ue.Pass;var Ie=Ye[wt].head,te=Ct.getTokenAt(Ie),ee=ue.innerMode(Ct.getMode(),te.state),de=ee.state,se=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(de),he=se&&se.name;if(!he)return ue.Pass;var ve=ee.mode.configuration=="html",be=typeof pt=="object"&&pt.dontCloseTags||ve&&Re,Ne=typeof pt=="object"&&pt.indentTags||ve&&Ze;te.end>Ie.ch&&(he=he.slice(0,he.length-te.end+Ie.ch));var Fe=he.toLowerCase();if(!he||te.type=="string"&&(te.end!=Ie.ch||!/[\"\']/.test(te.string.charAt(te.string.length-1))||te.string.length==1)||te.type=="tag"&&se.close||te.string.indexOf("/")==Ie.ch-te.start-1||be&&Me(be,Fe)>-1||Mt(Ct,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(de)||[],he,Ie,!0))return ue.Pass;var je=typeof pt=="object"&&pt.emptyTags;if(je&&Me(je,he)>-1){st[wt]={text:"/>",newPos:ue.Pos(Ie.line,Ie.ch+2)};continue}var ze=Ne&&Me(Ne,Fe)>-1;st[wt]={indent:ze,text:">"+(ze?`
|
|
|
|
|
|
`:"")+"</"+he+">",newPos:ze?ue.Pos(Ie.line+1,0):ue.Pos(Ie.line,Ie.ch+1)}}for(var Xe=typeof pt=="object"&&pt.dontIndentOnAutoClose,wt=Ye.length-1;wt>=0;wt--){var Je=st[wt];Ct.replaceRange(Je.text,Ye[wt].head,Ye[wt].anchor,"+insert");var dt=Ct.listSelections().slice(0);dt[wt]={head:Je.newPos,anchor:Je.newPos},Ct.setSelections(dt),!Xe&&Je.indent&&(Ct.indentLine(Je.newPos.line,null,!0),Ct.indentLine(Je.newPos.line+1,null,!0))}}function We(Ct,Ye){for(var st=Ct.listSelections(),pt=[],wt=Ye?"/":"</",Ie=Ct.getOption("autoCloseTags"),te=typeof Ie=="object"&&Ie.dontIndentOnSlash,ee=0;ee<st.length;ee++){if(!st[ee].empty())return ue.Pass;var de=st[ee].head,se=Ct.getTokenAt(de),he=ue.innerMode(Ct.getMode(),se.state),ve=he.state;if(Ye&&(se.type=="string"||se.string.charAt(0)!="<"||se.start!=de.ch-1))return ue.Pass;var be,Ne=he.mode.name!="xml"&&Ct.getMode().name=="htmlmixed";if(Ne&&he.mode.name=="javascript")be=wt+"script";else if(Ne&&he.mode.name=="css")be=wt+"style";else{var Fe=he.mode.xmlCurrentContext&&he.mode.xmlCurrentContext(ve);if(!Fe||Fe.length&&Mt(Ct,Fe,Fe[Fe.length-1],de))return ue.Pass;be=wt+Fe[Fe.length-1]}Ct.getLine(de.line).charAt(se.end)!=">"&&(be+=">"),pt[ee]=be}if(Ct.replaceSelections(pt),st=Ct.listSelections(),!te)for(var ee=0;ee<st.length;ee++)(ee==st.length-1||st[ee].head.line<st[ee+1].head.line)&&Ct.indentLine(st[ee].head.line)}function lt(Ct){return Ct.getOption("disableInput")?ue.Pass:We(Ct,!0)}ue.commands.closeTag=function(Ct){return We(Ct)};function Me(Ct,Ye){if(Ct.indexOf)return Ct.indexOf(Ye);for(var st=0,pt=Ct.length;st<pt;++st)if(Ct[st]==Ye)return st;return-1}function Mt(Ct,Ye,st,pt,wt){if(!ue.scanForClosingTag)return!1;var Ie=Math.min(Ct.lastLine()+1,pt.line+500),te=ue.scanForClosingTag(Ct,pt,null,Ie);if(!te||te.tag!=st)return!1;for(var ee=wt?1:0,de=Ye.length-1;de>=0&&Ye[de]==st;de--)++ee;pt=te.to;for(var de=1;de<ee;de++){var se=ue.scanForClosingTag(Ct,pt,null,Ie);if(!se||se.tag!=st)return!1;pt=se.to}return!0}})},32855:function(zn,En,me){(function(ue){ue(me(89780))})(function(ue){"use strict";var Re=ue.Pos;function Ze(de,se){return de.line-se.line||de.ch-se.ch}var ot="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",We=ot+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",lt=new RegExp("<(/?)(["+ot+"]["+We+"]*)","g");function Me(de,se,he,ve){this.line=se,this.ch=he,this.cm=de,this.text=de.getLine(se),this.min=ve?Math.max(ve.from,de.firstLine()):de.firstLine(),this.max=ve?Math.min(ve.to-1,de.lastLine()):de.lastLine()}function Mt(de,se){var he=de.cm.getTokenTypeAt(Re(de.line,se));return he&&/\btag\b/.test(he)}function Ct(de){if(!(de.line>=de.max))return de.ch=0,de.text=de.cm.getLine(++de.line),!0}function Ye(de){if(!(de.line<=de.min))return de.text=de.cm.getLine(--de.line),de.ch=de.text.length,!0}function st(de){for(;;){var se=de.text.indexOf(">",de.ch);if(se==-1){if(Ct(de))continue;return}if(!Mt(de,se+1)){de.ch=se+1;continue}var he=de.text.lastIndexOf("/",se),ve=he>-1&&!/\S/.test(de.text.slice(he+1,se));return de.ch=se+1,ve?"selfClose":"regular"}}function pt(de){for(;;){var se=de.ch?de.text.lastIndexOf("<",de.ch-1):-1;if(se==-1){if(Ye(de))continue;return}if(!Mt(de,se+1)){de.ch=se;continue}lt.lastIndex=se,de.ch=se;var he=lt.exec(de.text);if(he&&he.index==se)return he}}function wt(de){for(;;){lt.lastIndex=de.ch;var se=lt.exec(de.text);if(!se){if(Ct(de))continue;return}if(!Mt(de,se.index+1)){de.ch=se.index+1;continue}return de.ch=se.index+se[0].length,se}}function Ie(de){for(;;){var se=de.ch?de.text.lastIndexOf(">",de.ch-1):-1;if(se==-1){if(Ye(de))continue;return}if(!Mt(de,se+1)){de.ch=se;continue}var he=de.text.lastIndexOf("/",se),ve=he>-1&&!/\S/.test(de.text.slice(he+1,se));return de.ch=se+1,ve?"selfClose":"regular"}}function te(de,se){for(var he=[];;){var ve=wt(de),be,Ne=de.line,Fe=de.ch-(ve?ve[0].length:0);if(!ve||!(be=st(de)))return;if(be!="selfClose")if(ve[1]){for(var je=he.length-1;je>=0;--je)if(he[je]==ve[2]){he.length=je;break}if(je<0&&(!se||se==ve[2]))return{tag:ve[2],from:Re(Ne,Fe),to:Re(de.line,de.ch)}}else he.push(ve[2])}}function ee(de,se){for(var he=[];;){var ve=Ie(de);if(!ve)return;if(ve=="selfClose"){pt(de);continue}var be=de.line,Ne=de.ch,Fe=pt(de);if(!Fe)return;if(Fe[1])he.push(Fe[2]);else{for(var je=he.length-1;je>=0;--je)if(he[je]==Fe[2]){he.length=je;break}if(je<0&&(!se||se==Fe[2]))return{tag:Fe[2],from:Re(de.line,de.ch),to:Re(be,Ne)}}}}ue.registerHelper("fold","xml",function(de,se){for(var he=new Me(de,se.line,0);;){var ve=wt(he);if(!ve||he.line!=se.line)return;var be=st(he);if(!be)return;if(!ve[1]&&be!="selfClose"){var Ne=Re(he.line,he.ch),Fe=te(he,ve[2]);return Fe&&Ze(Fe.from,Ne)>0?{from:Ne,to:Fe.from}:null}}}),ue.findMatchingTag=function(de,se,he){var ve=new Me(de,se.line,se.ch,he);if(!(ve.text.indexOf(">")==-1&&ve.text.indexOf("<")==-1)){var be=st(ve),Ne=be&&Re(ve.line,ve.ch),Fe=be&&pt(ve);if(!(!be||!Fe||Ze(ve,se)>0)){var je={from:Re(ve.line,ve.ch),to:Ne,tag:Fe[2]};return be=="selfClose"?{open:je,close:null,at:"open"}:Fe[1]?{open:ee(ve,Fe[2]),close:je,at:"close"}:(ve=new Me(de,Ne.line,Ne.ch,he),{open:je,close:te(ve,Fe[2]),at:"open"})}}},ue.findEnclosingTag=function(de,se,he,ve){for(var be=new Me(de,se.line,se.ch,he);;){var Ne=ee(be,ve);if(!Ne)break;var Fe=new Me(de,se.line,se.ch,he),je=te(Fe,Ne.tag);if(je)return{open:Ne,close:je}}},ue.scanForClosingTag=function(de,se,he,ve){var be=new Me(de,se.line,se.ch,ve?{from:0,to:ve}:null);return te(be,he)}})},89780:function(zn){(function(En,me){zn.exports=me()})(this,function(){"use strict";var En=navigator.userAgent,me=navigator.platform,ue=/gecko\/\d/i.test(En),Re=/MSIE \d/.test(En),Ze=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(En),ot=/Edge\/(\d+)/.exec(En),We=Re||Ze||ot,lt=We&&(Re?document.documentMode||6:+(ot||Ze)[1]),Me=!ot&&/WebKit\//.test(En),Mt=Me&&/Qt\/\d+\.\d+/.test(En),Ct=!ot&&/Chrome\//.test(En),Ye=/Opera\//.test(En),st=/Apple Computer/.test(navigator.vendor),pt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(En),wt=/PhantomJS/.test(En),Ie=!ot&&/AppleWebKit/.test(En)&&/Mobile\/\w+/.test(En),te=/Android/.test(En),ee=Ie||te||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(En),de=Ie||/Mac/.test(me),se=/\bCrOS\b/.test(En),he=/win/i.test(me),ve=Ye&&En.match(/Version\/(\d*\.\d*)/);ve&&(ve=Number(ve[1])),ve&&ve>=15&&(Ye=!1,Me=!0);var be=de&&(Mt||Ye&&(ve==null||ve<12.11)),Ne=ue||We&<>=9;function Fe(ie){return new RegExp("(^|\\s)"+ie+"(?:$|\\s)\\s*")}var je=function(ie,ae){var ge=ie.className,fe=Fe(ae).exec(ge);if(fe){var xe=ge.slice(fe.index+fe[0].length);ie.className=ge.slice(0,fe.index)+(xe?fe[1]+xe:"")}};function ze(ie){for(var ae=ie.childNodes.length;ae>0;--ae)ie.removeChild(ie.firstChild);return ie}function Xe(ie,ae){return ze(ie).appendChild(ae)}function Je(ie,ae,ge,fe){var xe=document.createElement(ie);if(ge&&(xe.className=ge),fe&&(xe.style.cssText=fe),typeof ae=="string")xe.appendChild(document.createTextNode(ae));else if(ae)for(var Oe=0;Oe<ae.length;++Oe)xe.appendChild(ae[Oe]);return xe}function dt(ie,ae,ge,fe){var xe=Je(ie,ae,ge,fe);return xe.setAttribute("role","presentation"),xe}var He;document.createRange?He=function(ie,ae,ge,fe){var xe=document.createRange();return xe.setEnd(fe||ie,ge),xe.setStart(ie,ae),xe}:He=function(ie,ae,ge){var fe=document.body.createTextRange();try{fe.moveToElementText(ie.parentNode)}catch(xe){return fe}return fe.collapse(!0),fe.moveEnd("character",ge),fe.moveStart("character",ae),fe};function bt(ie,ae){if(ae.nodeType==3&&(ae=ae.parentNode),ie.contains)return ie.contains(ae);do if(ae.nodeType==11&&(ae=ae.host),ae==ie)return!0;while(ae=ae.parentNode)}function et(){var ie;try{ie=document.activeElement}catch(ae){ie=document.body||null}for(;ie&&ie.shadowRoot&&ie.shadowRoot.activeElement;)ie=ie.shadowRoot.activeElement;return ie}function It(ie,ae){var ge=ie.className;Fe(ae).test(ge)||(ie.className+=(ge?" ":"")+ae)}function xt(ie,ae){for(var ge=ie.split(" "),fe=0;fe<ge.length;fe++)ge[fe]&&!Fe(ge[fe]).test(ae)&&(ae+=" "+ge[fe]);return ae}var Bt=function(ie){ie.select()};Ie?Bt=function(ie){ie.selectionStart=0,ie.selectionEnd=ie.value.length}:We&&(Bt=function(ie){try{ie.select()}catch(ae){}});function Ut(ie){var ae=Array.prototype.slice.call(arguments,1);return function(){return ie.apply(null,ae)}}function Nt(ie,ae,ge){ae||(ae={});for(var fe in ie)ie.hasOwnProperty(fe)&&(ge!==!1||!ae.hasOwnProperty(fe))&&(ae[fe]=ie[fe]);return ae}function qe(ie,ae,ge,fe,xe){ae==null&&(ae=ie.search(/[^\s\u00a0]/),ae==-1&&(ae=ie.length));for(var Oe=fe||0,Ve=xe||0;;){var ht=ie.indexOf(" ",Oe);if(ht<0||ht>=ae)return Ve+(ae-Oe);Ve+=ht-Oe,Ve+=ge-Ve%ge,Oe=ht+1}}var Ke=function(){this.id=null,this.f=null,this.time=0,this.handler=Ut(this.onTimeout,this)};Ke.prototype.onTimeout=function(ie){ie.id=0,ie.time<=+new Date?ie.f():setTimeout(ie.handler,ie.time-+new Date)},Ke.prototype.set=function(ie,ae){this.f=ae;var ge=+new Date+ie;(!this.id||ge<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,ie),this.time=ge)};function Tt(ie,ae){for(var ge=0;ge<ie.length;++ge)if(ie[ge]==ae)return ge;return-1}var Ln=50,Mn={toString:function(){return"CodeMirror.Pass"}},zt={scroll:!1},rn={origin:"*mouse"},xn={origin:"+move"};function Un(ie,ae,ge){for(var fe=0,xe=0;;){var Oe=ie.indexOf(" ",fe);Oe==-1&&(Oe=ie.length);var Ve=Oe-fe;if(Oe==ie.length||xe+Ve>=ae)return fe+Math.min(Ve,ae-xe);if(xe+=Oe-fe,xe+=ge-xe%ge,fe=Oe+1,xe>=ae)return fe}}var yn=[""];function sn(ie){for(;yn.length<=ie;)yn.push(Lt(yn)+" ");return yn[ie]}function Lt(ie){return ie[ie.length-1]}function ti(ie,ae){for(var ge=[],fe=0;fe<ie.length;fe++)ge[fe]=ae(ie[fe],fe);return ge}function gi(ie,ae,ge){for(var fe=0,xe=ge(ae);fe<ie.length&&ge(ie[fe])<=xe;)fe++;ie.splice(fe,0,ae)}function Pn(){}function Xt(ie,ae){var ge;return Object.create?ge=Object.create(ie):(Pn.prototype=ie,ge=new Pn),ae&&Nt(ae,ge),ge}var Kt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ot(ie){return/\w/.test(ie)||ie>"\x80"&&(ie.toUpperCase()!=ie.toLowerCase()||Kt.test(ie))}function rt(ie,ae){return ae?ae.source.indexOf("\\w")>-1&&Ot(ie)?!0:ae.test(ie):Ot(ie)}function Ue(ie){for(var ae in ie)if(ie.hasOwnProperty(ae)&&ie[ae])return!1;return!0}var $t=/[\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 Gt(ie){return ie.charCodeAt(0)>=768&&$t.test(ie)}function it(ie,ae,ge){for(;(ge<0?ae>0:ae<ie.length)&&Gt(ie.charAt(ae));)ae+=ge;return ae}function at(ie,ae,ge){for(var fe=ae>ge?-1:1;;){if(ae==ge)return ae;var xe=(ae+ge)/2,Oe=fe<0?Math.ceil(xe):Math.floor(xe);if(Oe==ae)return ie(Oe)?ae:ge;ie(Oe)?ge=Oe:ae=Oe+fe}}function Te(ie,ae,ge,fe){if(!ie)return fe(ae,ge,"ltr",0);for(var xe=!1,Oe=0;Oe<ie.length;++Oe){var Ve=ie[Oe];(Ve.from<ge&&Ve.to>ae||ae==ge&&Ve.to==ae)&&(fe(Math.max(Ve.from,ae),Math.min(Ve.to,ge),Ve.level==1?"rtl":"ltr",Oe),xe=!0)}xe||fe(ae,ge,"ltr")}var Pe=null;function ye(ie,ae,ge){var fe;Pe=null;for(var xe=0;xe<ie.length;++xe){var Oe=ie[xe];if(Oe.from<ae&&Oe.to>ae)return xe;Oe.to==ae&&(Oe.from!=Oe.to&&ge=="before"?fe=xe:Pe=xe),Oe.from==ae&&(Oe.from!=Oe.to&&ge!="before"?fe=xe:Pe=xe)}return fe!=null?fe:Pe}var ke=function(){var ie="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ae="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ge(kt){return kt<=247?ie.charAt(kt):1424<=kt&&kt<=1524?"R":1536<=kt&&kt<=1785?ae.charAt(kt-1536):1774<=kt&&kt<=2220?"r":8192<=kt&&kt<=8203?"w":kt==8204?"b":"L"}var fe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,xe=/[stwN]/,Oe=/[LRr]/,Ve=/[Lb1n]/,ht=/[1n]/;function ut(kt,An,Yt){this.level=kt,this.from=An,this.to=Yt}return function(kt,An){var Yt=An=="ltr"?"L":"R";if(kt.length==0||An=="ltr"&&!fe.test(kt))return!1;for(var oi=kt.length,ei=[],rr=0;rr<oi;++rr)ei.push(ge(kt.charCodeAt(rr)));for(var hr=0,Br=Yt;hr<oi;++hr){var uo=ei[hr];uo=="m"?ei[hr]=Br:Br=uo}for(var zo=0,No=Yt;zo<oi;++zo){var Yo=ei[zo];Yo=="1"&&No=="r"?ei[zo]="n":Oe.test(Yo)&&(No=Yo,Yo=="r"&&(ei[zo]="R"))}for(var Oa=1,Bo=ei[0];Oa<oi-1;++Oa){var qa=ei[Oa];qa=="+"&&Bo=="1"&&ei[Oa+1]=="1"?ei[Oa]="1":qa==","&&Bo==ei[Oa+1]&&(Bo=="1"||Bo=="n")&&(ei[Oa]=Bo),Bo=qa}for(var dl=0;dl<oi;++dl){var du=ei[dl];if(du==",")ei[dl]="N";else if(du=="%"){var Fl=void 0;for(Fl=dl+1;Fl<oi&&ei[Fl]=="%";++Fl);for(var qu=dl&&ei[dl-1]=="!"||Fl<oi&&ei[Fl]=="1"?"1":"N",Lu=dl;Lu<Fl;++Lu)ei[Lu]=qu;dl=Fl-1}}for(var iu=0,ec=Yt;iu<oi;++iu){var vu=ei[iu];ec=="L"&&vu=="1"?ei[iu]="L":Oe.test(vu)&&(ec=vu)}for(var ru=0;ru<oi;++ru)if(xe.test(ei[ru])){var Bs=void 0;for(Bs=ru+1;Bs<oi&&xe.test(ei[Bs]);++Bs);for(var Nl=(ru?ei[ru-1]:Yt)=="L",pu=(Bs<oi?ei[Bs]:Yt)=="L",yu=Nl==pu?Nl?"L":"R":Yt,_c=ru;_c<Bs;++_c)ei[_c]=yu;ru=Bs-1}for(var Bl=[],wc,Se=0;Se<oi;)if(Ve.test(ei[Se])){var Ce=Se;for(++Se;Se<oi&&Ve.test(ei[Se]);++Se);Bl.push(new ut(0,Ce,Se))}else{var De=Se,Ge=Bl.length,mt=An=="rtl"?1:0;for(++Se;Se<oi&&ei[Se]!="L";++Se);for(var gt=De;gt<Se;)if(ht.test(ei[gt])){De<gt&&(Bl.splice(Ge,0,new ut(1,De,gt)),Ge+=mt);var Ft=gt;for(++gt;gt<Se&&ht.test(ei[gt]);++gt);Bl.splice(Ge,0,new ut(2,Ft,gt)),Ge+=mt,De=gt}else++gt;De<Se&&Bl.splice(Ge,0,new ut(1,De,Se))}return An=="ltr"&&(Bl[0].level==1&&(wc=kt.match(/^\s+/))&&(Bl[0].from=wc[0].length,Bl.unshift(new ut(0,0,wc[0].length))),Lt(Bl).level==1&&(wc=kt.match(/\s+$/))&&(Lt(Bl).to-=wc[0].length,Bl.push(new ut(0,oi-wc[0].length,oi)))),An=="rtl"?Bl.reverse():Bl}}();function $e(ie,ae){var ge=ie.order;return ge==null&&(ge=ie.order=ke(ie.text,ae)),ge}var Le=[],vt=function(ie,ae,ge){if(ie.addEventListener)ie.addEventListener(ae,ge,!1);else if(ie.attachEvent)ie.attachEvent("on"+ae,ge);else{var fe=ie._handlers||(ie._handlers={});fe[ae]=(fe[ae]||Le).concat(ge)}};function an(ie,ae){return ie._handlers&&ie._handlers[ae]||Le}function bn(ie,ae,ge){if(ie.removeEventListener)ie.removeEventListener(ae,ge,!1);else if(ie.detachEvent)ie.detachEvent("on"+ae,ge);else{var fe=ie._handlers,xe=fe&&fe[ae];if(xe){var Oe=Tt(xe,ge);Oe>-1&&(fe[ae]=xe.slice(0,Oe).concat(xe.slice(Oe+1)))}}}function en(ie,ae){var ge=an(ie,ae);if(ge.length)for(var fe=Array.prototype.slice.call(arguments,2),xe=0;xe<ge.length;++xe)ge[xe].apply(null,fe)}function wn(ie,ae,ge){return typeof ae=="string"&&(ae={type:ae,preventDefault:function(){this.defaultPrevented=!0}}),en(ie,ge||ae.type,ie,ae),_i(ae)||ae.codemirrorIgnore}function ai(ie){var ae=ie._handlers&&ie._handlers.cursorActivity;if(ae)for(var ge=ie.curOp.cursorActivityHandlers||(ie.curOp.cursorActivityHandlers=[]),fe=0;fe<ae.length;++fe)Tt(ge,ae[fe])==-1&&ge.push(ae[fe])}function _n(ie,ae){return an(ie,ae).length>0}function Hn(ie){ie.prototype.on=function(ae,ge){vt(this,ae,ge)},ie.prototype.off=function(ae,ge){bn(this,ae,ge)}}function wi(ie){ie.preventDefault?ie.preventDefault():ie.returnValue=!1}function Hi(ie){ie.stopPropagation?ie.stopPropagation():ie.cancelBubble=!0}function _i(ie){return ie.defaultPrevented!=null?ie.defaultPrevented:ie.returnValue==!1}function cr(ie){wi(ie),Hi(ie)}function _r(ie){return ie.target||ie.srcElement}function vi(ie){var ae=ie.which;return ae==null&&(ie.button&1?ae=1:ie.button&2?ae=3:ie.button&4&&(ae=2)),de&&ie.ctrlKey&&ae==1&&(ae=3),ae}var si=function(){if(We&<<9)return!1;var ie=Je("div");return"draggable"in ie||"dragDrop"in ie}(),fi;function Ui(ie){if(fi==null){var ae=Je("span","\u200B");Xe(ie,Je("span",[ae,document.createTextNode("x")])),ie.firstChild.offsetHeight!=0&&(fi=ae.offsetWidth<=1&&ae.offsetHeight>2&&!(We&<<8))}var ge=fi?Je("span","\u200B"):Je("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ge.setAttribute("cm-text",""),ge}var Fi;function ao(ie){if(Fi!=null)return Fi;var ae=Xe(ie,document.createTextNode("A\u062EA")),ge=He(ae,0,1).getBoundingClientRect(),fe=He(ae,1,2).getBoundingClientRect();return ze(ie),!ge||ge.left==ge.right?!1:Fi=fe.right-ge.right<3}var wr=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(ie){for(var ae=0,ge=[],fe=ie.length;ae<=fe;){var xe=ie.indexOf(`
|
|
|
`,ae);xe==-1&&(xe=ie.length);var Oe=ie.slice(ae,ie.charAt(xe-1)=="\r"?xe-1:xe),Ve=Oe.indexOf("\r");Ve!=-1?(ge.push(Oe.slice(0,Ve)),ae+=Ve+1):(ge.push(Oe),ae=xe+1)}return ge}:function(ie){return ie.split(/\r\n?|\n/)},Be=window.getSelection?function(ie){try{return ie.selectionStart!=ie.selectionEnd}catch(ae){return!1}}:function(ie){var ae;try{ae=ie.ownerDocument.selection.createRange()}catch(ge){}return!ae||ae.parentElement()!=ie?!1:ae.compareEndPoints("StartToEnd",ae)!=0},Xr=function(){var ie=Je("div");return"oncopy"in ie?!0:(ie.setAttribute("oncopy","return;"),typeof ie.oncopy=="function")}(),Hr=null;function jn(ie){if(Hr!=null)return Hr;var ae=Xe(ie,Je("span","x")),ge=ae.getBoundingClientRect(),fe=He(ae,0,1).getBoundingClientRect();return Hr=Math.abs(ge.left-fe.left)>1}var Li={},Wi={};function ji(ie,ae){arguments.length>2&&(ae.dependencies=Array.prototype.slice.call(arguments,2)),Li[ie]=ae}function Gn(ie,ae){Wi[ie]=ae}function Ht(ie){if(typeof ie=="string"&&Wi.hasOwnProperty(ie))ie=Wi[ie];else if(ie&&typeof ie.name=="string"&&Wi.hasOwnProperty(ie.name)){var ae=Wi[ie.name];typeof ae=="string"&&(ae={name:ae}),ie=Xt(ae,ie),ie.name=ae.name}else{if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(ie))return Ht("application/xml");if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(ie))return Ht("application/json")}return typeof ie=="string"?{name:ie}:ie||{name:"null"}}function Wt(ie,ae){ae=Ht(ae);var ge=Li[ae.name];if(!ge)return Wt(ie,"text/plain");var fe=ge(ie,ae);if(Zt.hasOwnProperty(ae.name)){var xe=Zt[ae.name];for(var Oe in xe)xe.hasOwnProperty(Oe)&&(fe.hasOwnProperty(Oe)&&(fe["_"+Oe]=fe[Oe]),fe[Oe]=xe[Oe])}if(fe.name=ae.name,ae.helperType&&(fe.helperType=ae.helperType),ae.modeProps)for(var Ve in ae.modeProps)fe[Ve]=ae.modeProps[Ve];return fe}var Zt={};function yt(ie,ae){var ge=Zt.hasOwnProperty(ie)?Zt[ie]:Zt[ie]={};Nt(ae,ge)}function un(ie,ae){if(ae===!0)return ae;if(ie.copyState)return ie.copyState(ae);var ge={};for(var fe in ae){var xe=ae[fe];xe instanceof Array&&(xe=xe.concat([])),ge[fe]=xe}return ge}function vn(ie,ae){for(var ge;ie.innerMode&&(ge=ie.innerMode(ae),!(!ge||ge.mode==ie));)ae=ge.state,ie=ge.mode;return ge||{mode:ie,state:ae}}function At(ie,ae,ge){return ie.startState?ie.startState(ae,ge):!0}var nt=function(ie,ae,ge){this.pos=this.start=0,this.string=ie,this.tabSize=ae||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ge};nt.prototype.eol=function(){return this.pos>=this.string.length},nt.prototype.sol=function(){return this.pos==this.lineStart},nt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},nt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},nt.prototype.eat=function(ie){var ae=this.string.charAt(this.pos),ge;if(typeof ie=="string"?ge=ae==ie:ge=ae&&(ie.test?ie.test(ae):ie(ae)),ge)return++this.pos,ae},nt.prototype.eatWhile=function(ie){for(var ae=this.pos;this.eat(ie););return this.pos>ae},nt.prototype.eatSpace=function(){for(var ie=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>ie},nt.prototype.skipToEnd=function(){this.pos=this.string.length},nt.prototype.skipTo=function(ie){var ae=this.string.indexOf(ie,this.pos);if(ae>-1)return this.pos=ae,!0},nt.prototype.backUp=function(ie){this.pos-=ie},nt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=qe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?qe(this.string,this.lineStart,this.tabSize):0)},nt.prototype.indentation=function(){return qe(this.string,null,this.tabSize)-(this.lineStart?qe(this.string,this.lineStart,this.tabSize):0)},nt.prototype.match=function(ie,ae,ge){if(typeof ie=="string"){var fe=function(Ve){return ge?Ve.toLowerCase():Ve},xe=this.string.substr(this.pos,ie.length);if(fe(xe)==fe(ie))return ae!==!1&&(this.pos+=ie.length),!0}else{var Oe=this.string.slice(this.pos).match(ie);return Oe&&Oe.index>0?null:(Oe&&ae!==!1&&(this.pos+=Oe[0].length),Oe)}},nt.prototype.current=function(){return this.string.slice(this.start,this.pos)},nt.prototype.hideFirstChars=function(ie,ae){this.lineStart+=ie;try{return ae()}finally{this.lineStart-=ie}},nt.prototype.lookAhead=function(ie){var ae=this.lineOracle;return ae&&ae.lookAhead(ie)},nt.prototype.baseToken=function(){var ie=this.lineOracle;return ie&&ie.baseToken(this.pos)};function on(ie,ae){if(ae-=ie.first,ae<0||ae>=ie.size)throw new Error("There is no line "+(ae+ie.first)+" in the document.");for(var ge=ie;!ge.lines;)for(var fe=0;;++fe){var xe=ge.children[fe],Oe=xe.chunkSize();if(ae<Oe){ge=xe;break}ae-=Oe}return ge.lines[ae]}function fn(ie,ae,ge){var fe=[],xe=ae.line;return ie.iter(ae.line,ge.line+1,function(Oe){var Ve=Oe.text;xe==ge.line&&(Ve=Ve.slice(0,ge.ch)),xe==ae.line&&(Ve=Ve.slice(ae.ch)),fe.push(Ve),++xe}),fe}function Jn(ie,ae,ge){var fe=[];return ie.iter(ae,ge,function(xe){fe.push(xe.text)}),fe}function pn(ie,ae){var ge=ae-ie.height;if(ge)for(var fe=ie;fe;fe=fe.parent)fe.height+=ge}function Rt(ie){if(ie.parent==null)return null;for(var ae=ie.parent,ge=Tt(ae.lines,ie),fe=ae.parent;fe;ae=fe,fe=fe.parent)for(var xe=0;fe.children[xe]!=ae;++xe)ge+=fe.children[xe].chunkSize();return ge+ae.first}function In(ie,ae){var ge=ie.first;e:do{for(var fe=0;fe<ie.children.length;++fe){var xe=ie.children[fe],Oe=xe.height;if(ae<Oe){ie=xe;continue e}ae-=Oe,ge+=xe.chunkSize()}return ge}while(!ie.lines);for(var Ve=0;Ve<ie.lines.length;++Ve){var ht=ie.lines[Ve],ut=ht.height;if(ae<ut)break;ae-=ut}return ge+Ve}function Vn(ie,ae){return ae>=ie.first&&ae<ie.first+ie.size}function Pi(ie,ae){return String(ie.lineNumberFormatter(ae+ie.firstLineNumber))}function tn(ie,ae,ge){if(ge===void 0&&(ge=null),!(this instanceof tn))return new tn(ie,ae,ge);this.line=ie,this.ch=ae,this.sticky=ge}function hn(ie,ae){return ie.line-ae.line||ie.ch-ae.ch}function Rn(ie,ae){return ie.sticky==ae.sticky&&hn(ie,ae)==0}function Oi(ie){return tn(ie.line,ie.ch)}function Ii(ie,ae){return hn(ie,ae)<0?ae:ie}function Si(ie,ae){return hn(ie,ae)<0?ie:ae}function Ni(ie,ae){return Math.max(ie.first,Math.min(ae,ie.first+ie.size-1))}function Zi(ie,ae){if(ae.line<ie.first)return tn(ie.first,0);var ge=ie.first+ie.size-1;return ae.line>ge?tn(ge,on(ie,ge).text.length):sr(ae,on(ie,ae.line).text.length)}function sr(ie,ae){var ge=ie.ch;return ge==null||ge>ae?tn(ie.line,ae):ge<0?tn(ie.line,0):ie}function Wr(ie,ae){for(var ge=[],fe=0;fe<ae.length;fe++)ge[fe]=Zi(ie,ae[fe]);return ge}var li=function(ie,ae){this.state=ie,this.lookAhead=ae},Vi=function(ie,ae,ge,fe){this.state=ae,this.doc=ie,this.line=ge,this.maxLookAhead=fe||0,this.baseTokens=null,this.baseTokenPos=1};Vi.prototype.lookAhead=function(ie){var ae=this.doc.getLine(this.line+ie);return ae!=null&&ie>this.maxLookAhead&&(this.maxLookAhead=ie),ae},Vi.prototype.baseToken=function(ie){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=ie;)this.baseTokenPos+=2;var ae=this.baseTokens[this.baseTokenPos+1];return{type:ae&&ae.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-ie}},Vi.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Vi.fromSaved=function(ie,ae,ge){return ae instanceof li?new Vi(ie,un(ie.mode,ae.state),ge,ae.lookAhead):new Vi(ie,un(ie.mode,ae),ge)},Vi.prototype.save=function(ie){var ae=ie!==!1?un(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new li(ae,this.maxLookAhead):ae};function vo(ie,ae,ge,fe){var xe=[ie.state.modeGen],Oe={};io(ie,ae.text,ie.doc.mode,ge,function(kt,An){return xe.push(kt,An)},Oe,fe);for(var Ve=ge.state,ht=function(kt){ge.baseTokens=xe;var An=ie.state.overlays[kt],Yt=1,oi=0;ge.state=!0,io(ie,ae.text,An.mode,ge,function(ei,rr){for(var hr=Yt;oi<ei;){var Br=xe[Yt];Br>ei&&xe.splice(Yt,1,ei,xe[Yt+1],Br),Yt+=2,oi=Math.min(ei,Br)}if(rr)if(An.opaque)xe.splice(hr,Yt-hr,ei,"overlay "+rr),Yt=hr+2;else for(;hr<Yt;hr+=2){var uo=xe[hr+1];xe[hr+1]=(uo?uo+" ":"")+"overlay "+rr}},Oe),ge.state=Ve,ge.baseTokens=null,ge.baseTokenPos=1},ut=0;ut<ie.state.overlays.length;++ut)ht(ut);return{styles:xe,classes:Oe.bgClass||Oe.textClass?Oe:null}}function Qr(ie,ae,ge){if(!ae.styles||ae.styles[0]!=ie.state.modeGen){var fe=Er(ie,Rt(ae)),xe=ae.text.length>ie.options.maxHighlightLength&&un(ie.doc.mode,fe.state),Oe=vo(ie,ae,fe);xe&&(fe.state=xe),ae.stateAfter=fe.save(!xe),ae.styles=Oe.styles,Oe.classes?ae.styleClasses=Oe.classes:ae.styleClasses&&(ae.styleClasses=null),ge===ie.doc.highlightFrontier&&(ie.doc.modeFrontier=Math.max(ie.doc.modeFrontier,++ie.doc.highlightFrontier))}return ae.styles}function Er(ie,ae,ge){var fe=ie.doc,xe=ie.display;if(!fe.mode.startState)return new Vi(fe,!0,ae);var Oe=Kr(ie,ae,ge),Ve=Oe>fe.first&&on(fe,Oe-1).stateAfter,ht=Ve?Vi.fromSaved(fe,Ve,Oe):new Vi(fe,At(fe.mode),Oe);return fe.iter(Oe,ae,function(ut){qt(ie,ut.text,ht);var kt=ht.line;ut.stateAfter=kt==ae-1||kt%5==0||kt>=xe.viewFrom&&kt<xe.viewTo?ht.save():null,ht.nextLine()}),ge&&(fe.modeFrontier=ht.line),ht}function qt(ie,ae,ge,fe){var xe=ie.doc.mode,Oe=new nt(ae,ie.options.tabSize,ge);for(Oe.start=Oe.pos=fe||0,ae==""&&pi(xe,ge.state);!Oe.eol();)pr(xe,Oe,ge.state),Oe.start=Oe.pos}function pi(ie,ae){if(ie.blankLine)return ie.blankLine(ae);if(ie.innerMode){var ge=vn(ie,ae);if(ge.mode.blankLine)return ge.mode.blankLine(ge.state)}}function pr(ie,ae,ge,fe){for(var xe=0;xe<10;xe++){fe&&(fe[0]=vn(ie,ge).mode);var Oe=ie.token(ae,ge);if(ae.pos>ae.start)return Oe}throw new Error("Mode "+ie.name+" failed to advance stream.")}var qi=function(ie,ae,ge){this.start=ie.start,this.end=ie.pos,this.string=ie.current(),this.type=ae||null,this.state=ge};function $r(ie,ae,ge,fe){var xe=ie.doc,Oe=xe.mode,Ve;ae=Zi(xe,ae);var ht=on(xe,ae.line),ut=Er(ie,ae.line,ge),kt=new nt(ht.text,ie.options.tabSize,ut),An;for(fe&&(An=[]);(fe||kt.pos<ae.ch)&&!kt.eol();)kt.start=kt.pos,Ve=pr(Oe,kt,ut.state),fe&&An.push(new qi(kt,Ve,un(xe.mode,ut.state)));return fe?An:new qi(kt,Ve,ut.state)}function Ar(ie,ae){if(ie)for(;;){var ge=ie.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ge)break;ie=ie.slice(0,ge.index)+ie.slice(ge.index+ge[0].length);var fe=ge[1]?"bgClass":"textClass";ae[fe]==null?ae[fe]=ge[2]:new RegExp("(?:^|\\s)"+ge[2]+"(?:$|\\s)").test(ae[fe])||(ae[fe]+=" "+ge[2])}return ie}function io(ie,ae,ge,fe,xe,Oe,Ve){var ht=ge.flattenSpans;ht==null&&(ht=ie.options.flattenSpans);var ut=0,kt=null,An=new nt(ae,ie.options.tabSize,fe),Yt,oi=ie.options.addModeClass&&[null];for(ae==""&&Ar(pi(ge,fe.state),Oe);!An.eol();){if(An.pos>ie.options.maxHighlightLength?(ht=!1,Ve&&qt(ie,ae,fe,An.pos),An.pos=ae.length,Yt=null):Yt=Ar(pr(ge,An,fe.state,oi),Oe),oi){var ei=oi[0].name;ei&&(Yt="m-"+(Yt?ei+" "+Yt:ei))}if(!ht||kt!=Yt){for(;ut<An.start;)ut=Math.min(An.start,ut+5e3),xe(ut,kt);kt=Yt}An.start=An.pos}for(;ut<An.pos;){var rr=Math.min(An.pos,ut+5e3);xe(rr,kt),ut=rr}}function Kr(ie,ae,ge){for(var fe,xe,Oe=ie.doc,Ve=ge?-1:ae-(ie.doc.mode.innerMode?1e3:100),ht=ae;ht>Ve;--ht){if(ht<=Oe.first)return Oe.first;var ut=on(Oe,ht-1),kt=ut.stateAfter;if(kt&&(!ge||ht+(kt instanceof li?kt.lookAhead:0)<=Oe.modeFrontier))return ht;var An=qe(ut.text,null,ie.options.tabSize);(xe==null||fe>An)&&(xe=ht-1,fe=An)}return xe}function jr(ie,ae){if(ie.modeFrontier=Math.min(ie.modeFrontier,ae),!(ie.highlightFrontier<ae-10)){for(var ge=ie.first,fe=ae-1;fe>ge;fe--){var xe=on(ie,fe).stateAfter;if(xe&&(!(xe instanceof li)||fe+xe.lookAhead<ae)){ge=fe+1;break}}ie.highlightFrontier=Math.min(ie.highlightFrontier,ge)}}var yo=!1,$n=!1;function Xo(){yo=!0}function Kn(){$n=!0}function Io(ie,ae,ge){this.marker=ie,this.from=ae,this.to=ge}function Jo(ie,ae){if(ie)for(var ge=0;ge<ie.length;++ge){var fe=ie[ge];if(fe.marker==ae)return fe}}function Yi(ie,ae){for(var ge,fe=0;fe<ie.length;++fe)ie[fe]!=ae&&(ge||(ge=[])).push(ie[fe]);return ge}function ua(ie,ae){ie.markedSpans=ie.markedSpans?ie.markedSpans.concat([ae]):[ae],ae.marker.attachLine(ie)}function Zo(ie,ae,ge){var fe;if(ie)for(var xe=0;xe<ie.length;++xe){var Oe=ie[xe],Ve=Oe.marker,ht=Oe.from==null||(Ve.inclusiveLeft?Oe.from<=ae:Oe.from<ae);if(ht||Oe.from==ae&&Ve.type=="bookmark"&&(!ge||!Oe.marker.insertLeft)){var ut=Oe.to==null||(Ve.inclusiveRight?Oe.to>=ae:Oe.to>ae);(fe||(fe=[])).push(new Io(Ve,Oe.from,ut?null:Oe.to))}}return fe}function Dr(ie,ae,ge){var fe;if(ie)for(var xe=0;xe<ie.length;++xe){var Oe=ie[xe],Ve=Oe.marker,ht=Oe.to==null||(Ve.inclusiveRight?Oe.to>=ae:Oe.to>ae);if(ht||Oe.from==ae&&Ve.type=="bookmark"&&(!ge||Oe.marker.insertLeft)){var ut=Oe.from==null||(Ve.inclusiveLeft?Oe.from<=ae:Oe.from<ae);(fe||(fe=[])).push(new Io(Ve,ut?null:Oe.from-ae,Oe.to==null?null:Oe.to-ae))}}return fe}function Ir(ie,ae){if(ae.full)return null;var ge=Vn(ie,ae.from.line)&&on(ie,ae.from.line).markedSpans,fe=Vn(ie,ae.to.line)&&on(ie,ae.to.line).markedSpans;if(!ge&&!fe)return null;var xe=ae.from.ch,Oe=ae.to.ch,Ve=hn(ae.from,ae.to)==0,ht=Zo(ge,xe,Ve),ut=Dr(fe,Oe,Ve),kt=ae.text.length==1,An=Lt(ae.text).length+(kt?xe:0);if(ht)for(var Yt=0;Yt<ht.length;++Yt){var oi=ht[Yt];if(oi.to==null){var ei=Jo(ut,oi.marker);ei?kt&&(oi.to=ei.to==null?null:ei.to+An):oi.to=xe}}if(ut)for(var rr=0;rr<ut.length;++rr){var hr=ut[rr];if(hr.to!=null&&(hr.to+=An),hr.from==null){var Br=Jo(ht,hr.marker);Br||(hr.from=An,kt&&(ht||(ht=[])).push(hr))}else hr.from+=An,kt&&(ht||(ht=[])).push(hr)}ht&&(ht=Do(ht)),ut&&ut!=ht&&(ut=Do(ut));var uo=[ht];if(!kt){var zo=ae.text.length-2,No;if(zo>0&&ht)for(var Yo=0;Yo<ht.length;++Yo)ht[Yo].to==null&&(No||(No=[])).push(new Io(ht[Yo].marker,null,null));for(var Oa=0;Oa<zo;++Oa)uo.push(No);uo.push(ut)}return uo}function Do(ie){for(var ae=0;ae<ie.length;++ae){var ge=ie[ae];ge.from!=null&&ge.from==ge.to&&ge.marker.clearWhenEmpty!==!1&&ie.splice(ae--,1)}return ie.length?ie:null}function _o(ie,ae,ge){var fe=null;if(ie.iter(ae.line,ge.line+1,function(ei){if(ei.markedSpans)for(var rr=0;rr<ei.markedSpans.length;++rr){var hr=ei.markedSpans[rr].marker;hr.readOnly&&(!fe||Tt(fe,hr)==-1)&&(fe||(fe=[])).push(hr)}}),!fe)return null;for(var xe=[{from:ae,to:ge}],Oe=0;Oe<fe.length;++Oe)for(var Ve=fe[Oe],ht=Ve.find(0),ut=0;ut<xe.length;++ut){var kt=xe[ut];if(!(hn(kt.to,ht.from)<0||hn(kt.from,ht.to)>0)){var An=[ut,1],Yt=hn(kt.from,ht.from),oi=hn(kt.to,ht.to);(Yt<0||!Ve.inclusiveLeft&&!Yt)&&An.push({from:kt.from,to:ht.from}),(oi>0||!Ve.inclusiveRight&&!oi)&&An.push({from:ht.to,to:kt.to}),xe.splice.apply(xe,An),ut+=An.length-3}}return xe}function Ti(ie){var ae=ie.markedSpans;if(ae){for(var ge=0;ge<ae.length;++ge)ae[ge].marker.detachLine(ie);ie.markedSpans=null}}function tt(ie,ae){if(ae){for(var ge=0;ge<ae.length;++ge)ae[ge].marker.attachLine(ie);ie.markedSpans=ae}}function jo(ie){return ie.inclusiveLeft?-1:0}function Ra(ie){return ie.inclusiveRight?1:0}function $a(ie,ae){var ge=ie.lines.length-ae.lines.length;if(ge!=0)return ge;var fe=ie.find(),xe=ae.find(),Oe=hn(fe.from,xe.from)||jo(ie)-jo(ae);if(Oe)return-Oe;var Ve=hn(fe.to,xe.to)||Ra(ie)-Ra(ae);return Ve||ae.id-ie.id}function ls(ie,ae){var ge=$n&&ie.markedSpans,fe;if(ge)for(var xe=void 0,Oe=0;Oe<ge.length;++Oe)xe=ge[Oe],xe.marker.collapsed&&(ae?xe.from:xe.to)==null&&(!fe||$a(fe,xe.marker)<0)&&(fe=xe.marker);return fe}function Or(ie){return ls(ie,!0)}function xo(ie){return ls(ie,!1)}function na(ie,ae){var ge=$n&&ie.markedSpans,fe;if(ge)for(var xe=0;xe<ge.length;++xe){var Oe=ge[xe];Oe.marker.collapsed&&(Oe.from==null||Oe.from<ae)&&(Oe.to==null||Oe.to>ae)&&(!fe||$a(fe,Oe.marker)<0)&&(fe=Oe.marker)}return fe}function Da(ie,ae,ge,fe,xe){var Oe=on(ie,ae),Ve=$n&&Oe.markedSpans;if(Ve)for(var ht=0;ht<Ve.length;++ht){var ut=Ve[ht];if(ut.marker.collapsed){var kt=ut.marker.find(0),An=hn(kt.from,ge)||jo(ut.marker)-jo(xe),Yt=hn(kt.to,fe)||Ra(ut.marker)-Ra(xe);if(!(An>=0&&Yt<=0||An<=0&&Yt>=0)&&(An<=0&&(ut.marker.inclusiveRight&&xe.inclusiveLeft?hn(kt.to,ge)>=0:hn(kt.to,ge)>0)||An>=0&&(ut.marker.inclusiveRight&&xe.inclusiveLeft?hn(kt.from,fe)<=0:hn(kt.from,fe)<0)))return!0}}}function Ao(ie){for(var ae;ae=Or(ie);)ie=ae.find(-1,!0).line;return ie}function Va(ie){for(var ae;ae=xo(ie);)ie=ae.find(1,!0).line;return ie}function Jr(ie){for(var ae,ge;ae=xo(ie);)ie=ae.find(1,!0).line,(ge||(ge=[])).push(ie);return ge}function eo(ie,ae){var ge=on(ie,ae),fe=Ao(ge);return ge==fe?ae:Rt(fe)}function Eo(ie,ae){if(ae>ie.lastLine())return ae;var ge=on(ie,ae),fe;if(!ci(ie,ge))return ae;for(;fe=xo(ge);)ge=fe.find(1,!0).line;return Rt(ge)+1}function ci(ie,ae){var ge=$n&&ae.markedSpans;if(ge){for(var fe=void 0,xe=0;xe<ge.length;++xe)if(fe=ge[xe],!!fe.marker.collapsed){if(fe.from==null)return!0;if(!fe.marker.widgetNode&&fe.from==0&&fe.marker.inclusiveLeft&&xa(ie,ae,fe))return!0}}}function xa(ie,ae,ge){if(ge.to==null){var fe=ge.marker.find(1,!0);return xa(ie,fe.line,Jo(fe.line.markedSpans,ge.marker))}if(ge.marker.inclusiveRight&&ge.to==ae.text.length)return!0;for(var xe=void 0,Oe=0;Oe<ae.markedSpans.length;++Oe)if(xe=ae.markedSpans[Oe],xe.marker.collapsed&&!xe.marker.widgetNode&&xe.from==ge.to&&(xe.to==null||xe.to!=ge.from)&&(xe.marker.inclusiveLeft||ge.marker.inclusiveRight)&&xa(ie,ae,xe))return!0}function za(ie){ie=Ao(ie);for(var ae=0,ge=ie.parent,fe=0;fe<ge.lines.length;++fe){var xe=ge.lines[fe];if(xe==ie)break;ae+=xe.height}for(var Oe=ge.parent;Oe;ge=Oe,Oe=ge.parent)for(var Ve=0;Ve<Oe.children.length;++Ve){var ht=Oe.children[Ve];if(ht==ge)break;ae+=ht.height}return ae}function xs(ie){if(ie.height==0)return 0;for(var ae=ie.text.length,ge,fe=ie;ge=Or(fe);){var xe=ge.find(0,!0);fe=xe.from.line,ae+=xe.from.ch-xe.to.ch}for(fe=ie;ge=xo(fe);){var Oe=ge.find(0,!0);ae-=fe.text.length-Oe.from.ch,fe=Oe.to.line,ae+=fe.text.length-Oe.to.ch}return ae}function ho(ie){var ae=ie.display,ge=ie.doc;ae.maxLine=on(ge,ge.first),ae.maxLineLength=xs(ae.maxLine),ae.maxLineChanged=!0,ge.iter(function(fe){var xe=xs(fe);xe>ae.maxLineLength&&(ae.maxLineLength=xe,ae.maxLine=fe)})}var ca=function(ie,ae,ge){this.text=ie,tt(this,ae),this.height=ge?ge(this):1};ca.prototype.lineNo=function(){return Rt(this)},Hn(ca);function ja(ie,ae,ge,fe){ie.text=ae,ie.stateAfter&&(ie.stateAfter=null),ie.styles&&(ie.styles=null),ie.order!=null&&(ie.order=null),Ti(ie),tt(ie,ge);var xe=fe?fe(ie):1;xe!=ie.height&&pn(ie,xe)}function hs(ie){ie.parent=null,Ti(ie)}var fs={},ll={};function Ys(ie,ae){if(!ie||/^\s*$/.test(ie))return null;var ge=ae.addModeClass?ll:fs;return ge[ie]||(ge[ie]=ie.replace(/\S+/g,"cm-$&"))}function Bn(ie,ae){var ge=dt("span",null,null,Me?"padding-right: .1px":null),fe={pre:dt("pre",[ge],"CodeMirror-line"),content:ge,col:0,pos:0,cm:ie,trailingSpace:!1,splitSpaces:ie.getOption("lineWrapping")};ae.measure={};for(var xe=0;xe<=(ae.rest?ae.rest.length:0);xe++){var Oe=xe?ae.rest[xe-1]:ae.line,Ve=void 0;fe.pos=0,fe.addToken=Pl,ao(ie.display.measure)&&(Ve=$e(Oe,ie.doc.direction))&&(fe.addToken=Mo(fe.addToken,Ve)),fe.map=[];var ht=ae!=ie.display.externalMeasured&&Rt(Oe);Tu(Oe,fe,Qr(ie,Oe,ht)),Oe.styleClasses&&(Oe.styleClasses.bgClass&&(fe.bgClass=xt(Oe.styleClasses.bgClass,fe.bgClass||"")),Oe.styleClasses.textClass&&(fe.textClass=xt(Oe.styleClasses.textClass,fe.textClass||""))),fe.map.length==0&&fe.map.push(0,0,fe.content.appendChild(Ui(ie.display.measure))),xe==0?(ae.measure.map=fe.map,ae.measure.cache={}):((ae.measure.maps||(ae.measure.maps=[])).push(fe.map),(ae.measure.caches||(ae.measure.caches=[])).push({}))}if(Me){var ut=fe.content.lastChild;(/\bcm-tab\b/.test(ut.className)||ut.querySelector&&ut.querySelector(".cm-tab"))&&(fe.content.className="cm-tab-wrap-hack")}return en(ie,"renderLine",ie,ae.line,fe.pre),fe.pre.className&&(fe.textClass=xt(fe.pre.className,fe.textClass||"")),fe}function Es(ie){var ae=Je("span","\u2022","cm-invalidchar");return ae.title="\\u"+ie.charCodeAt(0).toString(16),ae.setAttribute("aria-label",ae.title),ae}function Pl(ie,ae,ge,fe,xe,Oe,Ve){if(ae){var ht=ie.splitSpaces?Wl(ae,ie.trailingSpace):ae,ut=ie.cm.state.specialChars,kt=!1,An;if(!ut.test(ae))ie.col+=ae.length,An=document.createTextNode(ht),ie.map.push(ie.pos,ie.pos+ae.length,An),We&<<9&&(kt=!0),ie.pos+=ae.length;else{An=document.createDocumentFragment();for(var Yt=0;;){ut.lastIndex=Yt;var oi=ut.exec(ae),ei=oi?oi.index-Yt:ae.length-Yt;if(ei){var rr=document.createTextNode(ht.slice(Yt,Yt+ei));We&<<9?An.appendChild(Je("span",[rr])):An.appendChild(rr),ie.map.push(ie.pos,ie.pos+ei,rr),ie.col+=ei,ie.pos+=ei}if(!oi)break;Yt+=ei+1;var hr=void 0;if(oi[0]==" "){var Br=ie.cm.options.tabSize,uo=Br-ie.col%Br;hr=An.appendChild(Je("span",sn(uo),"cm-tab")),hr.setAttribute("role","presentation"),hr.setAttribute("cm-text"," "),ie.col+=uo}else oi[0]=="\r"||oi[0]==`
|
|
|
`?(hr=An.appendChild(Je("span",oi[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),hr.setAttribute("cm-text",oi[0]),ie.col+=1):(hr=ie.cm.options.specialCharPlaceholder(oi[0]),hr.setAttribute("cm-text",oi[0]),We&<<9?An.appendChild(Je("span",[hr])):An.appendChild(hr),ie.col+=1);ie.map.push(ie.pos,ie.pos+1,hr),ie.pos++}}if(ie.trailingSpace=ht.charCodeAt(ae.length-1)==32,ge||fe||xe||kt||Oe||Ve){var zo=ge||"";fe&&(zo+=fe),xe&&(zo+=xe);var No=Je("span",[An],zo,Oe);if(Ve)for(var Yo in Ve)Ve.hasOwnProperty(Yo)&&Yo!="style"&&Yo!="class"&&No.setAttribute(Yo,Ve[Yo]);return ie.content.appendChild(No)}ie.content.appendChild(An)}}function Wl(ie,ae){if(ie.length>1&&!/ /.test(ie))return ie;for(var ge=ae,fe="",xe=0;xe<ie.length;xe++){var Oe=ie.charAt(xe);Oe==" "&&ge&&(xe==ie.length-1||ie.charCodeAt(xe+1)==32)&&(Oe="\xA0"),fe+=Oe,ge=Oe==" "}return fe}function Mo(ie,ae){return function(ge,fe,xe,Oe,Ve,ht,ut){xe=xe?xe+" cm-force-border":"cm-force-border";for(var kt=ge.pos,An=kt+fe.length;;){for(var Yt=void 0,oi=0;oi<ae.length&&(Yt=ae[oi],!(Yt.to>kt&&Yt.from<=kt));oi++);if(Yt.to>=An)return ie(ge,fe,xe,Oe,Ve,ht,ut);ie(ge,fe.slice(0,Yt.to-kt),xe,Oe,null,ht,ut),Oe=null,fe=fe.slice(Yt.to-kt),kt=Yt.to}}}function gl(ie,ae,ge,fe){var xe=!fe&&ge.widgetNode;xe&&ie.map.push(ie.pos,ie.pos+ae,xe),!fe&&ie.cm.display.input.needsContentAttribute&&(xe||(xe=ie.content.appendChild(document.createElement("span"))),xe.setAttribute("cm-marker",ge.id)),xe&&(ie.cm.display.input.setUneditable(xe),ie.content.appendChild(xe)),ie.pos+=ae,ie.trailingSpace=!1}function Tu(ie,ae,ge){var fe=ie.markedSpans,xe=ie.text,Oe=0;if(!fe){for(var Ve=1;Ve<ge.length;Ve+=2)ae.addToken(ae,xe.slice(Oe,Oe=ge[Ve]),Ys(ge[Ve+1],ae.cm.options));return}for(var ht=xe.length,ut=0,kt=1,An="",Yt,oi,ei=0,rr,hr,Br,uo,zo;;){if(ei==ut){rr=hr=Br=oi="",zo=null,uo=null,ei=1/0;for(var No=[],Yo=void 0,Oa=0;Oa<fe.length;++Oa){var Bo=fe[Oa],qa=Bo.marker;if(qa.type=="bookmark"&&Bo.from==ut&&qa.widgetNode)No.push(qa);else if(Bo.from<=ut&&(Bo.to==null||Bo.to>ut||qa.collapsed&&Bo.to==ut&&Bo.from==ut)){if(Bo.to!=null&&Bo.to!=ut&&ei>Bo.to&&(ei=Bo.to,hr=""),qa.className&&(rr+=" "+qa.className),qa.css&&(oi=(oi?oi+";":"")+qa.css),qa.startStyle&&Bo.from==ut&&(Br+=" "+qa.startStyle),qa.endStyle&&Bo.to==ei&&(Yo||(Yo=[])).push(qa.endStyle,Bo.to),qa.title&&((zo||(zo={})).title=qa.title),qa.attributes)for(var dl in qa.attributes)(zo||(zo={}))[dl]=qa.attributes[dl];qa.collapsed&&(!uo||$a(uo.marker,qa)<0)&&(uo=Bo)}else Bo.from>ut&&ei>Bo.from&&(ei=Bo.from)}if(Yo)for(var du=0;du<Yo.length;du+=2)Yo[du+1]==ei&&(hr+=" "+Yo[du]);if(!uo||uo.from==ut)for(var Fl=0;Fl<No.length;++Fl)gl(ae,0,No[Fl]);if(uo&&(uo.from||0)==ut){if(gl(ae,(uo.to==null?ht+1:uo.to)-ut,uo.marker,uo.from==null),uo.to==null)return;uo.to==ut&&(uo=!1)}}if(ut>=ht)break;for(var qu=Math.min(ht,ei);;){if(An){var Lu=ut+An.length;if(!uo){var iu=Lu>qu?An.slice(0,qu-ut):An;ae.addToken(ae,iu,Yt?Yt+rr:rr,Br,ut+iu.length==ei?hr:"",oi,zo)}if(Lu>=qu){An=An.slice(qu-ut),ut=qu;break}ut=Lu,Br=""}An=xe.slice(Oe,Oe=ge[kt++]),Yt=Ys(ge[kt++],ae.cm.options)}}}function Ql(ie,ae,ge){this.line=ae,this.rest=Jr(ae),this.size=this.rest?Rt(Lt(this.rest))-ge+1:1,this.node=this.text=null,this.hidden=ci(ie,ae)}function us(ie,ae,ge){for(var fe=[],xe,Oe=ae;Oe<ge;Oe=xe){var Ve=new Ql(ie.doc,on(ie.doc,Oe),Oe);xe=Oe+Ve.size,fe.push(Ve)}return fe}var Sa=null;function Il(ie){Sa?Sa.ops.push(ie):ie.ownsGroup=Sa={ops:[ie],delayedCallbacks:[]}}function Wo(ie){var ae=ie.delayedCallbacks,ge=0;do{for(;ge<ae.length;ge++)ae[ge].call(null);for(var fe=0;fe<ie.ops.length;fe++){var xe=ie.ops[fe];if(xe.cursorActivityHandlers)for(;xe.cursorActivityCalled<xe.cursorActivityHandlers.length;)xe.cursorActivityHandlers[xe.cursorActivityCalled++].call(null,xe.cm)}}while(ge<ae.length)}function Ia(ie,ae){var ge=ie.ownsGroup;if(ge)try{Wo(ge)}finally{Sa=null,ae(ge)}}var aa=null;function or(ie,ae){var ge=an(ie,ae);if(ge.length){var fe=Array.prototype.slice.call(arguments,2),xe;Sa?xe=Sa.delayedCallbacks:aa?xe=aa:(xe=aa=[],setTimeout(_s,0));for(var Oe=function(ht){xe.push(function(){return ge[ht].apply(null,fe)})},Ve=0;Ve<ge.length;++Ve)Oe(Ve)}}function _s(){var ie=aa;aa=null;for(var ae=0;ae<ie.length;++ae)ie[ae]()}function js(ie,ae,ge,fe){for(var xe=0;xe<ae.changes.length;xe++){var Oe=ae.changes[xe];Oe=="text"?er(ie,ae):Oe=="gutter"?Ws(ie,ae,ge,fe):Oe=="class"?Ss(ie,ae):Oe=="widget"&&su(ie,ae,fe)}ae.changes=null}function pl(ie){return ie.node==ie.text&&(ie.node=Je("div",null,null,"position: relative"),ie.text.parentNode&&ie.text.parentNode.replaceChild(ie.node,ie.text),ie.node.appendChild(ie.text),We&<<8&&(ie.node.style.zIndex=2)),ie.node}function Xs(ie,ae){var ge=ae.bgClass?ae.bgClass+" "+(ae.line.bgClass||""):ae.line.bgClass;if(ge&&(ge+=" CodeMirror-linebackground"),ae.background)ge?ae.background.className=ge:(ae.background.parentNode.removeChild(ae.background),ae.background=null);else if(ge){var fe=pl(ae);ae.background=fe.insertBefore(Je("div",null,ge),fe.firstChild),ie.display.input.setUneditable(ae.background)}}function hu(ie,ae){var ge=ie.display.externalMeasured;return ge&&ge.line==ae.line?(ie.display.externalMeasured=null,ae.measure=ge.measure,ge.built):Bn(ie,ae)}function er(ie,ae){var ge=ae.text.className,fe=hu(ie,ae);ae.text==ae.node&&(ae.node=fe.pre),ae.text.parentNode.replaceChild(fe.pre,ae.text),ae.text=fe.pre,fe.bgClass!=ae.bgClass||fe.textClass!=ae.textClass?(ae.bgClass=fe.bgClass,ae.textClass=fe.textClass,Ss(ie,ae)):ge&&(ae.text.className=ge)}function Ss(ie,ae){Xs(ie,ae),ae.line.wrapClass?pl(ae).className=ae.line.wrapClass:ae.node!=ae.text&&(ae.node.className="");var ge=ae.textClass?ae.textClass+" "+(ae.line.textClass||""):ae.line.textClass;ae.text.className=ge||""}function Ws(ie,ae,ge,fe){if(ae.gutter&&(ae.node.removeChild(ae.gutter),ae.gutter=null),ae.gutterBackground&&(ae.node.removeChild(ae.gutterBackground),ae.gutterBackground=null),ae.line.gutterClass){var xe=pl(ae);ae.gutterBackground=Je("div",null,"CodeMirror-gutter-background "+ae.line.gutterClass,"left: "+(ie.options.fixedGutter?fe.fixedPos:-fe.gutterTotalWidth)+"px; width: "+fe.gutterTotalWidth+"px"),ie.display.input.setUneditable(ae.gutterBackground),xe.insertBefore(ae.gutterBackground,ae.text)}var Oe=ae.line.gutterMarkers;if(ie.options.lineNumbers||Oe){var Ve=pl(ae),ht=ae.gutter=Je("div",null,"CodeMirror-gutter-wrapper","left: "+(ie.options.fixedGutter?fe.fixedPos:-fe.gutterTotalWidth)+"px");if(ie.display.input.setUneditable(ht),Ve.insertBefore(ht,ae.text),ae.line.gutterClass&&(ht.className+=" "+ae.line.gutterClass),ie.options.lineNumbers&&(!Oe||!Oe["CodeMirror-linenumbers"])&&(ae.lineNumber=ht.appendChild(Je("div",Pi(ie.options,ge),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+fe.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+ie.display.lineNumInnerWidth+"px"))),Oe)for(var ut=0;ut<ie.display.gutterSpecs.length;++ut){var kt=ie.display.gutterSpecs[ut].className,An=Oe.hasOwnProperty(kt)&&Oe[kt];An&&ht.appendChild(Je("div",[An],"CodeMirror-gutter-elt","left: "+fe.gutterLeft[kt]+"px; width: "+fe.gutterWidth[kt]+"px"))}}}function su(ie,ae,ge){ae.alignable&&(ae.alignable=null);for(var fe=Fe("CodeMirror-linewidget"),xe=ae.node.firstChild,Oe=void 0;xe;xe=Oe)Oe=xe.nextSibling,fe.test(xe.className)&&ae.node.removeChild(xe);lu(ie,ae,ge)}function fu(ie,ae,ge,fe){var xe=hu(ie,ae);return ae.text=ae.node=xe.pre,xe.bgClass&&(ae.bgClass=xe.bgClass),xe.textClass&&(ae.textClass=xe.textClass),Ss(ie,ae),Ws(ie,ae,ge,fe),lu(ie,ae,fe),ae.node}function lu(ie,ae,ge){if(Oo(ie,ae.line,ae,ge,!0),ae.rest)for(var fe=0;fe<ae.rest.length;fe++)Oo(ie,ae.rest[fe],ae,ge,!1)}function Oo(ie,ae,ge,fe,xe){if(ae.widgets)for(var Oe=pl(ge),Ve=0,ht=ae.widgets;Ve<ht.length;++Ve){var ut=ht[Ve],kt=Je("div",[ut.node],"CodeMirror-linewidget"+(ut.className?" "+ut.className:""));ut.handleMouseEvents||kt.setAttribute("cm-ignore-events","true"),Ru(ut,kt,ge,fe),ie.display.input.setUneditable(kt),xe&&ut.above?Oe.insertBefore(kt,ge.gutter||ge.text):Oe.appendChild(kt),or(ut,"redraw")}}function Ru(ie,ae,ge,fe){if(ie.noHScroll){(ge.alignable||(ge.alignable=[])).push(ae);var xe=fe.wrapperWidth;ae.style.left=fe.fixedPos+"px",ie.coverGutter||(xe-=fe.gutterTotalWidth,ae.style.paddingLeft=fe.gutterTotalWidth+"px"),ae.style.width=xe+"px"}ie.coverGutter&&(ae.style.zIndex=5,ae.style.position="relative",ie.noHScroll||(ae.style.marginLeft=-fe.gutterTotalWidth+"px"))}function ul(ie){if(ie.height!=null)return ie.height;var ae=ie.doc.cm;if(!ae)return 0;if(!bt(document.body,ie.node)){var ge="position: relative;";ie.coverGutter&&(ge+="margin-left: -"+ae.display.gutters.offsetWidth+"px;"),ie.noHScroll&&(ge+="width: "+ae.display.wrapper.clientWidth+"px;"),Xe(ae.display.measure,Je("div",[ie.node],null,ge))}return ie.height=ie.node.parentNode.offsetHeight}function zs(ie,ae){for(var ge=_r(ae);ge!=ie.wrapper;ge=ge.parentNode)if(!ge||ge.nodeType==1&&ge.getAttribute("cm-ignore-events")=="true"||ge.parentNode==ie.sizer&&ge!=ie.mover)return!0}function wl(ie){return ie.lineSpace.offsetTop}function kn(ie){return ie.mover.offsetHeight-ie.lineSpace.offsetHeight}function Tn(ie){if(ie.cachedPaddingH)return ie.cachedPaddingH;var ae=Xe(ie.measure,Je("pre","x","CodeMirror-line-like")),ge=window.getComputedStyle?window.getComputedStyle(ae):ae.currentStyle,fe={left:parseInt(ge.paddingLeft),right:parseInt(ge.paddingRight)};return!isNaN(fe.left)&&!isNaN(fe.right)&&(ie.cachedPaddingH=fe),fe}function Qn(ie){return Ln-ie.display.nativeBarWidth}function zi(ie){return ie.display.scroller.clientWidth-Qn(ie)-ie.display.barWidth}function Xi(ie){return ie.display.scroller.clientHeight-Qn(ie)-ie.display.barHeight}function $i(ie,ae,ge){var fe=ie.options.lineWrapping,xe=fe&&zi(ie);if(!ae.measure.heights||fe&&ae.measure.width!=xe){var Oe=ae.measure.heights=[];if(fe){ae.measure.width=xe;for(var Ve=ae.text.firstChild.getClientRects(),ht=0;ht<Ve.length-1;ht++){var ut=Ve[ht],kt=Ve[ht+1];Math.abs(ut.bottom-kt.bottom)>2&&Oe.push((ut.bottom+kt.top)/2-ge.top)}}Oe.push(ge.bottom-ge.top)}}function Ri(ie,ae,ge){if(ie.line==ae)return{map:ie.measure.map,cache:ie.measure.cache};for(var fe=0;fe<ie.rest.length;fe++)if(ie.rest[fe]==ae)return{map:ie.measure.maps[fe],cache:ie.measure.caches[fe]};for(var xe=0;xe<ie.rest.length;xe++)if(Rt(ie.rest[xe])>ge)return{map:ie.measure.maps[xe],cache:ie.measure.caches[xe],before:!0}}function ri(ie,ae){ae=Ao(ae);var ge=Rt(ae),fe=ie.display.externalMeasured=new Ql(ie.doc,ae,ge);fe.lineN=ge;var xe=fe.built=Bn(ie,fe);return fe.text=xe.pre,Xe(ie.display.lineMeasure,xe.pre),fe}function yi(ie,ae,ge,fe){return sa(ie,mr(ie,ae),ge,fe)}function Ji(ie,ae){if(ae>=ie.display.viewFrom&&ae<ie.display.viewTo)return ie.display.view[Ja(ie,ae)];var ge=ie.display.externalMeasured;if(ge&&ae>=ge.lineN&&ae<ge.lineN+ge.size)return ge}function mr(ie,ae){var ge=Rt(ae),fe=Ji(ie,ge);fe&&!fe.text?fe=null:fe&&fe.changes&&(js(ie,fe,ge,Lo(ie)),ie.curOp.forceUpdate=!0),fe||(fe=ri(ie,ae));var xe=Ri(fe,ae,ge);return{line:ae,view:fe,rect:null,map:xe.map,cache:xe.cache,before:xe.before,hasHeights:!1}}function sa(ie,ae,ge,fe,xe){ae.before&&(ge=-1);var Oe=ge+(fe||""),Ve;return ae.cache.hasOwnProperty(Oe)?Ve=ae.cache[Oe]:(ae.rect||(ae.rect=ae.view.text.getBoundingClientRect()),ae.hasHeights||($i(ie,ae.view,ae.rect),ae.hasHeights=!0),Ve=Jt(ie,ae,ge,fe),Ve.bogus||(ae.cache[Oe]=Ve)),{left:Ve.left,right:Ve.right,top:xe?Ve.rtop:Ve.top,bottom:xe?Ve.rbottom:Ve.bottom}}var Ma={left:0,right:0,top:0,bottom:0};function Qt(ie,ae,ge){for(var fe,xe,Oe,Ve,ht,ut,kt=0;kt<ie.length;kt+=3)if(ht=ie[kt],ut=ie[kt+1],ae<ht?(xe=0,Oe=1,Ve="left"):ae<ut?(xe=ae-ht,Oe=xe+1):(kt==ie.length-3||ae==ut&&ie[kt+3]>ae)&&(Oe=ut-ht,xe=Oe-1,ae>=ut&&(Ve="right")),xe!=null){if(fe=ie[kt+2],ht==ut&&ge==(fe.insertLeft?"left":"right")&&(Ve=ge),ge=="left"&&xe==0)for(;kt&&ie[kt-2]==ie[kt-3]&&ie[kt-1].insertLeft;)fe=ie[(kt-=3)+2],Ve="left";if(ge=="right"&&xe==ut-ht)for(;kt<ie.length-3&&ie[kt+3]==ie[kt+4]&&!ie[kt+5].insertLeft;)fe=ie[(kt+=3)+2],Ve="right";break}return{node:fe,start:xe,end:Oe,collapse:Ve,coverStart:ht,coverEnd:ut}}function cn(ie,ae){var ge=Ma;if(ae=="left")for(var fe=0;fe<ie.length&&(ge=ie[fe]).left==ge.right;fe++);else for(var xe=ie.length-1;xe>=0&&(ge=ie[xe]).left==ge.right;xe--);return ge}function Jt(ie,ae,ge,fe){var xe=Qt(ae.map,ge,fe),Oe=xe.node,Ve=xe.start,ht=xe.end,ut=xe.collapse,kt;if(Oe.nodeType==3){for(var An=0;An<4;An++){for(;Ve&&Gt(ae.line.text.charAt(xe.coverStart+Ve));)--Ve;for(;xe.coverStart+ht<xe.coverEnd&&Gt(ae.line.text.charAt(xe.coverStart+ht));)++ht;if(We&<<9&&Ve==0&&ht==xe.coverEnd-xe.coverStart?kt=Oe.parentNode.getBoundingClientRect():kt=cn(He(Oe,Ve,ht).getClientRects(),fe),kt.left||kt.right||Ve==0)break;ht=Ve,Ve=Ve-1,ut="right"}We&<<11&&(kt=dn(ie.display.measure,kt))}else{Ve>0&&(ut=fe="right");var Yt;ie.options.lineWrapping&&(Yt=Oe.getClientRects()).length>1?kt=Yt[fe=="right"?Yt.length-1:0]:kt=Oe.getBoundingClientRect()}if(We&<<9&&!Ve&&(!kt||!kt.left&&!kt.right)){var oi=Oe.parentNode.getClientRects()[0];oi?kt={left:oi.left,right:oi.left+no(ie.display),top:oi.top,bottom:oi.bottom}:kt=Ma}for(var ei=kt.top-ae.rect.top,rr=kt.bottom-ae.rect.top,hr=(ei+rr)/2,Br=ae.view.measure.heights,uo=0;uo<Br.length-1&&!(hr<Br[uo]);uo++);var zo=uo?Br[uo-1]:0,No=Br[uo],Yo={left:(ut=="right"?kt.right:kt.left)-ae.rect.left,right:(ut=="left"?kt.left:kt.right)-ae.rect.left,top:zo,bottom:No};return!kt.left&&!kt.right&&(Yo.bogus=!0),ie.options.singleCursorHeightPerLine||(Yo.rtop=ei,Yo.rbottom=rr),Yo}function dn(ie,ae){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!jn(ie))return ae;var ge=screen.logicalXDPI/screen.deviceXDPI,fe=screen.logicalYDPI/screen.deviceYDPI;return{left:ae.left*ge,right:ae.right*ge,top:ae.top*fe,bottom:ae.bottom*fe}}function xi(ie){if(ie.measure&&(ie.measure.cache={},ie.measure.heights=null,ie.rest))for(var ae=0;ae<ie.rest.length;ae++)ie.measure.caches[ae]={}}function tr(ie){ie.display.externalMeasure=null,ze(ie.display.lineMeasure);for(var ae=0;ae<ie.display.view.length;ae++)xi(ie.display.view[ae])}function yr(ie){tr(ie),ie.display.cachedCharWidth=ie.display.cachedTextHeight=ie.display.cachedPaddingH=null,ie.options.lineWrapping||(ie.display.maxLineChanged=!0),ie.display.lineNumChars=null}function vr(){return Ct&&te?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function br(){return Ct&&te?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Lr(ie){var ae=0;if(ie.widgets)for(var ge=0;ge<ie.widgets.length;++ge)ie.widgets[ge].above&&(ae+=ul(ie.widgets[ge]));return ae}function Mr(ie,ae,ge,fe,xe){if(!xe){var Oe=Lr(ae);ge.top+=Oe,ge.bottom+=Oe}if(fe=="line")return ge;fe||(fe="local");var Ve=za(ae);if(fe=="local"?Ve+=wl(ie.display):Ve-=ie.display.viewOffset,fe=="page"||fe=="window"){var ht=ie.display.lineSpace.getBoundingClientRect();Ve+=ht.top+(fe=="window"?0:br());var ut=ht.left+(fe=="window"?0:vr());ge.left+=ut,ge.right+=ut}return ge.top+=Ve,ge.bottom+=Ve,ge}function zr(ie,ae,ge){if(ge=="div")return ae;var fe=ae.left,xe=ae.top;if(ge=="page")fe-=vr(),xe-=br();else if(ge=="local"||!ge){var Oe=ie.display.sizer.getBoundingClientRect();fe+=Oe.left,xe+=Oe.top}var Ve=ie.display.lineSpace.getBoundingClientRect();return{left:fe-Ve.left,top:xe-Ve.top}}function Sr(ie,ae,ge,fe,xe){return fe||(fe=on(ie.doc,ae.line)),Mr(ie,fe,yi(ie,fe,ae.ch,xe),ge)}function Tr(ie,ae,ge,fe,xe,Oe){fe=fe||on(ie.doc,ae.line),xe||(xe=mr(ie,fe));function Ve(rr,hr){var Br=sa(ie,xe,rr,hr?"right":"left",Oe);return hr?Br.left=Br.right:Br.right=Br.left,Mr(ie,fe,Br,ge)}var ht=$e(fe,ie.doc.direction),ut=ae.ch,kt=ae.sticky;if(ut>=fe.text.length?(ut=fe.text.length,kt="before"):ut<=0&&(ut=0,kt="after"),!ht)return Ve(kt=="before"?ut-1:ut,kt=="before");function An(rr,hr,Br){var uo=ht[hr],zo=uo.level==1;return Ve(Br?rr-1:rr,zo!=Br)}var Yt=ye(ht,ut,kt),oi=Pe,ei=An(ut,Yt,kt=="before");return oi!=null&&(ei.other=An(ut,oi,kt!="before")),ei}function ro(ie,ae){var ge=0;ae=Zi(ie.doc,ae),ie.options.lineWrapping||(ge=no(ie.display)*ae.ch);var fe=on(ie.doc,ae.line),xe=za(fe)+wl(ie.display);return{left:ge,right:ge,top:xe,bottom:xe+fe.height}}function ia(ie,ae,ge,fe,xe){var Oe=tn(ie,ae,ge);return Oe.xRel=xe,fe&&(Oe.outside=fe),Oe}function da(ie,ae,ge){var fe=ie.doc;if(ge+=ie.display.viewOffset,ge<0)return ia(fe.first,0,null,-1,-1);var xe=In(fe,ge),Oe=fe.first+fe.size-1;if(xe>Oe)return ia(fe.first+fe.size-1,on(fe,Oe).text.length,null,1,1);ae<0&&(ae=0);for(var Ve=on(fe,xe);;){var ht=Zn(ie,Ve,xe,ae,ge),ut=na(Ve,ht.ch+(ht.xRel>0||ht.outside>0?1:0));if(!ut)return ht;var kt=ut.find(1);if(kt.line==xe)return kt;Ve=on(fe,xe=kt.line)}}function ur(ie,ae,ge,fe){fe-=Lr(ae);var xe=ae.text.length,Oe=at(function(Ve){return sa(ie,ge,Ve-1).bottom<=fe},xe,0);return xe=at(function(Ve){return sa(ie,ge,Ve).top>fe},Oe,xe),{begin:Oe,end:xe}}function Go(ie,ae,ge,fe){ge||(ge=mr(ie,ae));var xe=Mr(ie,ae,sa(ie,ge,fe),"line").top;return ur(ie,ae,ge,xe)}function _t(ie,ae,ge,fe){return ie.bottom<=ge?!1:ie.top>ge?!0:(fe?ie.left:ie.right)>ae}function Zn(ie,ae,ge,fe,xe){xe-=za(ae);var Oe=mr(ie,ae),Ve=Lr(ae),ht=0,ut=ae.text.length,kt=!0,An=$e(ae,ie.doc.direction);if(An){var Yt=(ie.options.lineWrapping?Ai:Fr)(ie,ae,ge,Oe,An,fe,xe);kt=Yt.level!=1,ht=kt?Yt.from:Yt.to-1,ut=kt?Yt.to:Yt.from-1}var oi=null,ei=null,rr=at(function(Oa){var Bo=sa(ie,Oe,Oa);return Bo.top+=Ve,Bo.bottom+=Ve,_t(Bo,fe,xe,!1)?(Bo.top<=xe&&Bo.left<=fe&&(oi=Oa,ei=Bo),!0):!1},ht,ut),hr,Br,uo=!1;if(ei){var zo=fe-ei.left<ei.right-fe,No=zo==kt;rr=oi+(No?0:1),Br=No?"after":"before",hr=zo?ei.left:ei.right}else{!kt&&(rr==ut||rr==ht)&&rr++,Br=rr==0?"after":rr==ae.text.length?"before":sa(ie,Oe,rr-(kt?1:0)).bottom+Ve<=xe==kt?"after":"before";var Yo=Tr(ie,tn(ge,rr,Br),"line",ae,Oe);hr=Yo.left,uo=xe<Yo.top?-1:xe>=Yo.bottom?1:0}return rr=it(ae.text,rr,1),ia(ge,rr,Br,uo,fe-hr)}function Fr(ie,ae,ge,fe,xe,Oe,Ve){var ht=at(function(Yt){var oi=xe[Yt],ei=oi.level!=1;return _t(Tr(ie,tn(ge,ei?oi.to:oi.from,ei?"before":"after"),"line",ae,fe),Oe,Ve,!0)},0,xe.length-1),ut=xe[ht];if(ht>0){var kt=ut.level!=1,An=Tr(ie,tn(ge,kt?ut.from:ut.to,kt?"after":"before"),"line",ae,fe);_t(An,Oe,Ve,!0)&&An.top>Ve&&(ut=xe[ht-1])}return ut}function Ai(ie,ae,ge,fe,xe,Oe,Ve){var ht=ur(ie,ae,fe,Ve),ut=ht.begin,kt=ht.end;/\s/.test(ae.text.charAt(kt-1))&&kt--;for(var An=null,Yt=null,oi=0;oi<xe.length;oi++){var ei=xe[oi];if(!(ei.from>=kt||ei.to<=ut)){var rr=ei.level!=1,hr=sa(ie,fe,rr?Math.min(kt,ei.to)-1:Math.max(ut,ei.from)).right,Br=hr<Oe?Oe-hr+1e9:hr-Oe;(!An||Yt>Br)&&(An=ei,Yt=Br)}}return An||(An=xe[xe.length-1]),An.from<ut&&(An={from:ut,to:An.to,level:An.level}),An.to>kt&&(An={from:An.from,to:kt,level:An.level}),An}var Ki;function ir(ie){if(ie.cachedTextHeight!=null)return ie.cachedTextHeight;if(Ki==null){Ki=Je("pre",null,"CodeMirror-line-like");for(var ae=0;ae<49;++ae)Ki.appendChild(document.createTextNode("x")),Ki.appendChild(Je("br"));Ki.appendChild(document.createTextNode("x"))}Xe(ie.measure,Ki);var ge=Ki.offsetHeight/50;return ge>3&&(ie.cachedTextHeight=ge),ze(ie.measure),ge||1}function no(ie){if(ie.cachedCharWidth!=null)return ie.cachedCharWidth;var ae=Je("span","xxxxxxxxxx"),ge=Je("pre",[ae],"CodeMirror-line-like");Xe(ie.measure,ge);var fe=ae.getBoundingClientRect(),xe=(fe.right-fe.left)/10;return xe>2&&(ie.cachedCharWidth=xe),xe||10}function Lo(ie){for(var ae=ie.display,ge={},fe={},xe=ae.gutters.clientLeft,Oe=ae.gutters.firstChild,Ve=0;Oe;Oe=Oe.nextSibling,++Ve){var ht=ie.display.gutterSpecs[Ve].className;ge[ht]=Oe.offsetLeft+Oe.clientLeft+xe,fe[ht]=Oe.clientWidth}return{fixedPos:nr(ae),gutterTotalWidth:ae.gutters.offsetWidth,gutterLeft:ge,gutterWidth:fe,wrapperWidth:ae.wrapper.clientWidth}}function nr(ie){return ie.scroller.getBoundingClientRect().left-ie.sizer.getBoundingClientRect().left}function Zr(ie){var ae=ir(ie.display),ge=ie.options.lineWrapping,fe=ge&&Math.max(5,ie.display.scroller.clientWidth/no(ie.display)-3);return function(xe){if(ci(ie.doc,xe))return 0;var Oe=0;if(xe.widgets)for(var Ve=0;Ve<xe.widgets.length;Ve++)xe.widgets[Ve].height&&(Oe+=xe.widgets[Ve].height);return ge?Oe+(Math.ceil(xe.text.length/fe)||1)*ae:Oe+ae}}function Mi(ie){var ae=ie.doc,ge=Zr(ie);ae.iter(function(fe){var xe=ge(fe);xe!=fe.height&&pn(fe,xe)})}function Ca(ie,ae,ge,fe){var xe=ie.display;if(!ge&&_r(ae).getAttribute("cm-not-content")=="true")return null;var Oe,Ve,ht=xe.lineSpace.getBoundingClientRect();try{Oe=ae.clientX-ht.left,Ve=ae.clientY-ht.top}catch(Yt){return null}var ut=da(ie,Oe,Ve),kt;if(fe&&ut.xRel>0&&(kt=on(ie.doc,ut.line).text).length==ut.ch){var An=qe(kt,kt.length,ie.options.tabSize)-kt.length;ut=tn(ut.line,Math.max(0,Math.round((Oe-Tn(ie.display).left)/no(ie.display))-An))}return ut}function Ja(ie,ae){if(ae>=ie.display.viewTo||(ae-=ie.display.viewFrom,ae<0))return null;for(var ge=ie.display.view,fe=0;fe<ge.length;fe++)if(ae-=ge[fe].size,ae<0)return fe}function wo(ie,ae,ge,fe){ae==null&&(ae=ie.doc.first),ge==null&&(ge=ie.doc.first+ie.doc.size),fe||(fe=0);var xe=ie.display;if(fe&&ge<xe.viewTo&&(xe.updateLineNumbers==null||xe.updateLineNumbers>ae)&&(xe.updateLineNumbers=ae),ie.curOp.viewChanged=!0,ae>=xe.viewTo)$n&&eo(ie.doc,ae)<xe.viewTo&&fr(ie);else if(ge<=xe.viewFrom)$n&&Eo(ie.doc,ge+fe)>xe.viewFrom?fr(ie):(xe.viewFrom+=fe,xe.viewTo+=fe);else if(ae<=xe.viewFrom&&ge>=xe.viewTo)fr(ie);else if(ae<=xe.viewFrom){var Oe=Rr(ie,ge,ge+fe,1);Oe?(xe.view=xe.view.slice(Oe.index),xe.viewFrom=Oe.lineN,xe.viewTo+=fe):fr(ie)}else if(ge>=xe.viewTo){var Ve=Rr(ie,ae,ae,-1);Ve?(xe.view=xe.view.slice(0,Ve.index),xe.viewTo=Ve.lineN):fr(ie)}else{var ht=Rr(ie,ae,ae,-1),ut=Rr(ie,ge,ge+fe,1);ht&&ut?(xe.view=xe.view.slice(0,ht.index).concat(us(ie,ht.lineN,ut.lineN)).concat(xe.view.slice(ut.index)),xe.viewTo+=fe):fr(ie)}var kt=xe.externalMeasured;kt&&(ge<kt.lineN?kt.lineN+=fe:ae<kt.lineN+kt.size&&(xe.externalMeasured=null))}function Cr(ie,ae,ge){ie.curOp.viewChanged=!0;var fe=ie.display,xe=ie.display.externalMeasured;if(xe&&ae>=xe.lineN&&ae<xe.lineN+xe.size&&(fe.externalMeasured=null),!(ae<fe.viewFrom||ae>=fe.viewTo)){var Oe=fe.view[Ja(ie,ae)];if(Oe.node!=null){var Ve=Oe.changes||(Oe.changes=[]);Tt(Ve,ge)==-1&&Ve.push(ge)}}}function fr(ie){ie.display.viewFrom=ie.display.viewTo=ie.doc.first,ie.display.view=[],ie.display.viewOffset=0}function Rr(ie,ae,ge,fe){var xe=Ja(ie,ae),Oe,Ve=ie.display.view;if(!$n||ge==ie.doc.first+ie.doc.size)return{index:xe,lineN:ge};for(var ht=ie.display.viewFrom,ut=0;ut<xe;ut++)ht+=Ve[ut].size;if(ht!=ae){if(fe>0){if(xe==Ve.length-1)return null;Oe=ht+Ve[xe].size-ae,xe++}else Oe=ht-ae;ae+=Oe,ge+=Oe}for(;eo(ie.doc,ge)!=ge;){if(xe==(fe<0?0:Ve.length-1))return null;ge+=fe*Ve[xe-(fe<0?1:0)].size,xe+=fe}return{index:xe,lineN:ge}}function pa(ie,ae,ge){var fe=ie.display,xe=fe.view;xe.length==0||ae>=fe.viewTo||ge<=fe.viewFrom?(fe.view=us(ie,ae,ge),fe.viewFrom=ae):(fe.viewFrom>ae?fe.view=us(ie,ae,fe.viewFrom).concat(fe.view):fe.viewFrom<ae&&(fe.view=fe.view.slice(Ja(ie,ae))),fe.viewFrom=ae,fe.viewTo<ge?fe.view=fe.view.concat(us(ie,fe.viewTo,ge)):fe.viewTo>ge&&(fe.view=fe.view.slice(0,Ja(ie,ge)))),fe.viewTo=ge}function Is(ie){for(var ae=ie.display.view,ge=0,fe=0;fe<ae.length;fe++){var xe=ae[fe];!xe.hidden&&(!xe.node||xe.changes)&&++ge}return ge}function La(ie){ie.display.input.showSelection(ie.display.input.prepareSelection())}function yl(ie,ae){ae===void 0&&(ae=!0);for(var ge=ie.doc,fe={},xe=fe.cursors=document.createDocumentFragment(),Oe=fe.selection=document.createDocumentFragment(),Ve=0;Ve<ge.sel.ranges.length;Ve++)if(!(!ae&&Ve==ge.sel.primIndex)){var ht=ge.sel.ranges[Ve];if(!(ht.from().line>=ie.display.viewTo||ht.to().line<ie.display.viewFrom)){var ut=ht.empty();(ut||ie.options.showCursorWhenSelecting)&&Ea(ie,ht.head,xe),ut||Ha(ie,ht,Oe)}}return fe}function Ea(ie,ae,ge){var fe=Tr(ie,ae,"div",null,null,!ie.options.singleCursorHeightPerLine),xe=ge.appendChild(Je("div","\xA0","CodeMirror-cursor"));if(xe.style.left=fe.left+"px",xe.style.top=fe.top+"px",xe.style.height=Math.max(0,fe.bottom-fe.top)*ie.options.cursorHeight+"px",fe.other){var Oe=ge.appendChild(Je("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Oe.style.display="",Oe.style.left=fe.other.left+"px",Oe.style.top=fe.other.top+"px",Oe.style.height=(fe.other.bottom-fe.other.top)*.85+"px"}}function Js(ie,ae){return ie.top-ae.top||ie.left-ae.left}function Ha(ie,ae,ge){var fe=ie.display,xe=ie.doc,Oe=document.createDocumentFragment(),Ve=Tn(ie.display),ht=Ve.left,ut=Math.max(fe.sizerWidth,zi(ie)-fe.sizer.offsetLeft)-Ve.right,kt=xe.direction=="ltr";function An(No,Yo,Oa,Bo){Yo<0&&(Yo=0),Yo=Math.round(Yo),Bo=Math.round(Bo),Oe.appendChild(Je("div",null,"CodeMirror-selected","position: absolute; left: "+No+`px;
|
|
|
top: `+Yo+"px; width: "+(Oa==null?ut-No:Oa)+`px;
|
|
|
height: `+(Bo-Yo)+"px"))}function Yt(No,Yo,Oa){var Bo=on(xe,No),qa=Bo.text.length,dl,du;function Fl(iu,ec){return Sr(ie,tn(No,iu),"div",Bo,ec)}function qu(iu,ec,vu){var ru=Go(ie,Bo,null,iu),Bs=ec=="ltr"==(vu=="after")?"left":"right",Nl=vu=="after"?ru.begin:ru.end-(/\s/.test(Bo.text.charAt(ru.end-1))?2:1);return Fl(Nl,Bs)[Bs]}var Lu=$e(Bo,xe.direction);return Te(Lu,Yo||0,Oa==null?qa:Oa,function(iu,ec,vu,ru){var Bs=vu=="ltr",Nl=Fl(iu,Bs?"left":"right"),pu=Fl(ec-1,Bs?"right":"left"),yu=Yo==null&&iu==0,_c=Oa==null&&ec==qa,Bl=ru==0,wc=!Lu||ru==Lu.length-1;if(pu.top-Nl.top<=3){var Se=(kt?yu:_c)&&Bl,Ce=(kt?_c:yu)&&wc,De=Se?ht:(Bs?Nl:pu).left,Ge=Ce?ut:(Bs?pu:Nl).right;An(De,Nl.top,Ge-De,Nl.bottom)}else{var mt,gt,Ft,jt;Bs?(mt=kt&&yu&&Bl?ht:Nl.left,gt=kt?ut:qu(iu,vu,"before"),Ft=kt?ht:qu(ec,vu,"after"),jt=kt&&_c&&wc?ut:pu.right):(mt=kt?qu(iu,vu,"before"):ht,gt=!kt&&yu&&Bl?ut:Nl.right,Ft=!kt&&_c&&wc?ht:pu.left,jt=kt?qu(ec,vu,"after"):ut),An(mt,Nl.top,gt-mt,Nl.bottom),Nl.bottom<pu.top&&An(ht,Nl.bottom,null,pu.top),An(Ft,pu.top,jt-Ft,pu.bottom)}(!dl||Js(Nl,dl)<0)&&(dl=Nl),Js(pu,dl)<0&&(dl=pu),(!du||Js(Nl,du)<0)&&(du=Nl),Js(pu,du)<0&&(du=pu)}),{start:dl,end:du}}var oi=ae.from(),ei=ae.to();if(oi.line==ei.line)Yt(oi.line,oi.ch,ei.ch);else{var rr=on(xe,oi.line),hr=on(xe,ei.line),Br=Ao(rr)==Ao(hr),uo=Yt(oi.line,oi.ch,Br?rr.text.length+1:null).end,zo=Yt(ei.line,Br?0:null,ei.ch).start;Br&&(uo.top<zo.top-2?(An(uo.right,uo.top,null,uo.bottom),An(ht,zo.top,zo.left,zo.bottom)):An(uo.right,uo.top,zo.left-uo.right,uo.bottom)),uo.bottom<zo.top&&An(ht,uo.bottom,null,zo.top)}ge.appendChild(Oe)}function ts(ie){if(ie.state.focused){var ae=ie.display;clearInterval(ae.blinker);var ge=!0;ae.cursorDiv.style.visibility="",ie.options.cursorBlinkRate>0?ae.blinker=setInterval(function(){ie.hasFocus()||Kc(ie),ae.cursorDiv.style.visibility=(ge=!ge)?"":"hidden"},ie.options.cursorBlinkRate):ie.options.cursorBlinkRate<0&&(ae.cursorDiv.style.visibility="hidden")}}function Ms(ie){ie.state.focused||(ie.display.input.focus(),ns(ie))}function Rs(ie){ie.state.delayingBlurEvent=!0,setTimeout(function(){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1,Kc(ie))},100)}function ns(ie,ae){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1),ie.options.readOnly!="nocursor"&&(ie.state.focused||(en(ie,"focus",ie,ae),ie.state.focused=!0,It(ie.display.wrapper,"CodeMirror-focused"),!ie.curOp&&ie.display.selForContextMenu!=ie.doc.sel&&(ie.display.input.reset(),Me&&setTimeout(function(){return ie.display.input.reset(!0)},20)),ie.display.input.receivedFocus()),ts(ie))}function Kc(ie,ae){ie.state.delayingBlurEvent||(ie.state.focused&&(en(ie,"blur",ie,ae),ie.state.focused=!1,je(ie.display.wrapper,"CodeMirror-focused")),clearInterval(ie.display.blinker),setTimeout(function(){ie.state.focused||(ie.display.shift=!1)},150))}function Qo(ie){for(var ae=ie.display,ge=ae.lineDiv.offsetTop,fe=0;fe<ae.view.length;fe++){var xe=ae.view[fe],Oe=ie.options.lineWrapping,Ve=void 0,ht=0;if(!xe.hidden){if(We&<<8){var ut=xe.node.offsetTop+xe.node.offsetHeight;Ve=ut-ge,ge=ut}else{var kt=xe.node.getBoundingClientRect();Ve=kt.bottom-kt.top,!Oe&&xe.text.firstChild&&(ht=xe.text.firstChild.getBoundingClientRect().right-kt.left-1)}var An=xe.line.height-Ve;if((An>.005||An<-.005)&&(pn(xe.line,Ve),Rd(xe.line),xe.rest))for(var Yt=0;Yt<xe.rest.length;Yt++)Rd(xe.rest[Yt]);if(ht>ie.display.sizerWidth){var oi=Math.ceil(ht/no(ie.display));oi>ie.display.maxLineLength&&(ie.display.maxLineLength=oi,ie.display.maxLine=xe.line,ie.display.maxLineChanged=!0)}}}}function Rd(ie){if(ie.widgets)for(var ae=0;ae<ie.widgets.length;++ae){var ge=ie.widgets[ae],fe=ge.node.parentNode;fe&&(ge.height=fe.offsetHeight)}}function Ua(ie,ae,ge){var fe=ge&&ge.top!=null?Math.max(0,ge.top):ie.scroller.scrollTop;fe=Math.floor(fe-wl(ie));var xe=ge&&ge.bottom!=null?ge.bottom:fe+ie.wrapper.clientHeight,Oe=In(ae,fe),Ve=In(ae,xe);if(ge&&ge.ensure){var ht=ge.ensure.from.line,ut=ge.ensure.to.line;ht<Oe?(Oe=ht,Ve=In(ae,za(on(ae,ht))+ie.wrapper.clientHeight)):Math.min(ut,ae.lastLine())>=Ve&&(Oe=In(ae,za(on(ae,ut))-ie.wrapper.clientHeight),Ve=ut)}return{from:Oe,to:Math.max(Ve,Oe+1)}}function Th(ie,ae){if(!wn(ie,"scrollCursorIntoView")){var ge=ie.display,fe=ge.sizer.getBoundingClientRect(),xe=null;if(ae.top+fe.top<0?xe=!0:ae.bottom+fe.top>(window.innerHeight||document.documentElement.clientHeight)&&(xe=!1),xe!=null&&!wt){var Oe=Je("div","\u200B",null,`position: absolute;
|
|
|
top: `+(ae.top-ge.viewOffset-wl(ie.display))+`px;
|
|
|
height: `+(ae.bottom-ae.top+Qn(ie)+ge.barHeight)+`px;
|
|
|
left: `+ae.left+"px; width: "+Math.max(2,ae.right-ae.left)+"px;");ie.display.lineSpace.appendChild(Oe),Oe.scrollIntoView(xe),ie.display.lineSpace.removeChild(Oe)}}}function Vc(ie,ae,ge,fe){fe==null&&(fe=0);var xe;!ie.options.lineWrapping&&ae==ge&&(ae=ae.ch?tn(ae.line,ae.sticky=="before"?ae.ch-1:ae.ch,"after"):ae,ge=ae.sticky=="before"?tn(ae.line,ae.ch+1,"before"):ae);for(var Oe=0;Oe<5;Oe++){var Ve=!1,ht=Tr(ie,ae),ut=!ge||ge==ae?ht:Tr(ie,ge);xe={left:Math.min(ht.left,ut.left),top:Math.min(ht.top,ut.top)-fe,right:Math.max(ht.left,ut.left),bottom:Math.max(ht.bottom,ut.bottom)+fe};var kt=uh(ie,xe),An=ie.doc.scrollTop,Yt=ie.doc.scrollLeft;if(kt.scrollTop!=null&&(Os(ie,kt.scrollTop),Math.abs(ie.doc.scrollTop-An)>1&&(Ve=!0)),kt.scrollLeft!=null&&(ba(ie,kt.scrollLeft),Math.abs(ie.doc.scrollLeft-Yt)>1&&(Ve=!0)),!Ve)break}return xe}function Uc(ie,ae){var ge=uh(ie,ae);ge.scrollTop!=null&&Os(ie,ge.scrollTop),ge.scrollLeft!=null&&ba(ie,ge.scrollLeft)}function uh(ie,ae){var ge=ie.display,fe=ir(ie.display);ae.top<0&&(ae.top=0);var xe=ie.curOp&&ie.curOp.scrollTop!=null?ie.curOp.scrollTop:ge.scroller.scrollTop,Oe=Xi(ie),Ve={};ae.bottom-ae.top>Oe&&(ae.bottom=ae.top+Oe);var ht=ie.doc.height+kn(ge),ut=ae.top<fe,kt=ae.bottom>ht-fe;if(ae.top<xe)Ve.scrollTop=ut?0:ae.top;else if(ae.bottom>xe+Oe){var An=Math.min(ae.top,(kt?ht:ae.bottom)-Oe);An!=xe&&(Ve.scrollTop=An)}var Yt=ie.options.fixedGutter?0:ge.gutters.offsetWidth,oi=ie.curOp&&ie.curOp.scrollLeft!=null?ie.curOp.scrollLeft:ge.scroller.scrollLeft-Yt,ei=zi(ie)-ge.gutters.offsetWidth,rr=ae.right-ae.left>ei;return rr&&(ae.right=ae.left+ei),ae.left<10?Ve.scrollLeft=0:ae.left<oi?Ve.scrollLeft=Math.max(0,ae.left+Yt-(rr?0:10)):ae.right>ei+oi-3&&(Ve.scrollLeft=ae.right+(rr?0:10)-ei),Ve}function mi(ie,ae){ae!=null&&(Nr(ie),ie.curOp.scrollTop=(ie.curOp.scrollTop==null?ie.doc.scrollTop:ie.curOp.scrollTop)+ae)}function Co(ie){Nr(ie);var ae=ie.getCursor();ie.curOp.scrollToPos={from:ae,to:ae,margin:ie.options.cursorScrollMargin}}function Za(ie,ae,ge){(ae!=null||ge!=null)&&Nr(ie),ae!=null&&(ie.curOp.scrollLeft=ae),ge!=null&&(ie.curOp.scrollTop=ge)}function Gr(ie,ae){Nr(ie),ie.curOp.scrollToPos=ae}function Nr(ie){var ae=ie.curOp.scrollToPos;if(ae){ie.curOp.scrollToPos=null;var ge=ro(ie,ae.from),fe=ro(ie,ae.to);gs(ie,ge,fe,ae.margin)}}function gs(ie,ae,ge,fe){var xe=uh(ie,{left:Math.min(ae.left,ge.left),top:Math.min(ae.top,ge.top)-fe,right:Math.max(ae.right,ge.right),bottom:Math.max(ae.bottom,ge.bottom)+fe});Za(ie,xe.scrollLeft,xe.scrollTop)}function Os(ie,ae){Math.abs(ie.doc.scrollTop-ae)<2||(ue||qr(ie,{top:ae}),cl(ie,ae,!0),ue&&qr(ie),Ci(ie,100))}function cl(ie,ae,ge){ae=Math.max(0,Math.min(ie.display.scroller.scrollHeight-ie.display.scroller.clientHeight,ae)),!(ie.display.scroller.scrollTop==ae&&!ge)&&(ie.doc.scrollTop=ae,ie.display.scrollbars.setScrollTop(ae),ie.display.scroller.scrollTop!=ae&&(ie.display.scroller.scrollTop=ae))}function ba(ie,ae,ge,fe){ae=Math.max(0,Math.min(ae,ie.display.scroller.scrollWidth-ie.display.scroller.clientWidth)),!((ge?ae==ie.doc.scrollLeft:Math.abs(ie.doc.scrollLeft-ae)<2)&&!fe)&&(ie.doc.scrollLeft=ae,la(ie),ie.display.scroller.scrollLeft!=ae&&(ie.display.scroller.scrollLeft=ae),ie.display.scrollbars.setScrollLeft(ae))}function el(ie){var ae=ie.display,ge=ae.gutters.offsetWidth,fe=Math.round(ie.doc.height+kn(ie.display));return{clientHeight:ae.scroller.clientHeight,viewHeight:ae.wrapper.clientHeight,scrollWidth:ae.scroller.scrollWidth,clientWidth:ae.scroller.clientWidth,viewWidth:ae.wrapper.clientWidth,barLeft:ie.options.fixedGutter?ge:0,docHeight:fe,scrollHeight:fe+Qn(ie)+ae.barHeight,nativeBarWidth:ae.nativeBarWidth,gutterWidth:ge}}var ps=function(ie,ae,ge){this.cm=ge;var fe=this.vert=Je("div",[Je("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),xe=this.horiz=Je("div",[Je("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");fe.tabIndex=xe.tabIndex=-1,ie(fe),ie(xe),vt(fe,"scroll",function(){fe.clientHeight&&ae(fe.scrollTop,"vertical")}),vt(xe,"scroll",function(){xe.clientWidth&&ae(xe.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,We&<<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ps.prototype.update=function(ie){var ae=ie.scrollWidth>ie.clientWidth+1,ge=ie.scrollHeight>ie.clientHeight+1,fe=ie.nativeBarWidth;if(ge){this.vert.style.display="block",this.vert.style.bottom=ae?fe+"px":"0";var xe=ie.viewHeight-(ae?fe:0);this.vert.firstChild.style.height=Math.max(0,ie.scrollHeight-ie.clientHeight+xe)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ae){this.horiz.style.display="block",this.horiz.style.right=ge?fe+"px":"0",this.horiz.style.left=ie.barLeft+"px";var Oe=ie.viewWidth-ie.barLeft-(ge?fe:0);this.horiz.firstChild.style.width=Math.max(0,ie.scrollWidth-ie.clientWidth+Oe)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&ie.clientHeight>0&&(fe==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ge?fe:0,bottom:ae?fe:0}},ps.prototype.setScrollLeft=function(ie){this.horiz.scrollLeft!=ie&&(this.horiz.scrollLeft=ie),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ps.prototype.setScrollTop=function(ie){this.vert.scrollTop!=ie&&(this.vert.scrollTop=ie),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ps.prototype.zeroWidthHack=function(){var ie=de&&!pt?"12px":"18px";this.horiz.style.height=this.vert.style.width=ie,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ke,this.disableVert=new Ke},ps.prototype.enableZeroWidthBar=function(ie,ae,ge){ie.style.pointerEvents="auto";function fe(){var xe=ie.getBoundingClientRect(),Oe=ge=="vert"?document.elementFromPoint(xe.right-1,(xe.top+xe.bottom)/2):document.elementFromPoint((xe.right+xe.left)/2,xe.bottom-1);Oe!=ie?ie.style.pointerEvents="none":ae.set(1e3,fe)}ae.set(1e3,fe)},ps.prototype.clear=function(){var ie=this.horiz.parentNode;ie.removeChild(this.horiz),ie.removeChild(this.vert)};var Vl=function(){};Vl.prototype.update=function(){return{bottom:0,right:0}},Vl.prototype.setScrollLeft=function(){},Vl.prototype.setScrollTop=function(){},Vl.prototype.clear=function(){};function lc(ie,ae){ae||(ae=el(ie));var ge=ie.display.barWidth,fe=ie.display.barHeight;ra(ie,ae);for(var xe=0;xe<4&&ge!=ie.display.barWidth||fe!=ie.display.barHeight;xe++)ge!=ie.display.barWidth&&ie.options.lineWrapping&&Qo(ie),ra(ie,el(ie)),ge=ie.display.barWidth,fe=ie.display.barHeight}function ra(ie,ae){var ge=ie.display,fe=ge.scrollbars.update(ae);ge.sizer.style.paddingRight=(ge.barWidth=fe.right)+"px",ge.sizer.style.paddingBottom=(ge.barHeight=fe.bottom)+"px",ge.heightForcer.style.borderBottom=fe.bottom+"px solid transparent",fe.right&&fe.bottom?(ge.scrollbarFiller.style.display="block",ge.scrollbarFiller.style.height=fe.bottom+"px",ge.scrollbarFiller.style.width=fe.right+"px"):ge.scrollbarFiller.style.display="",fe.bottom&&ie.options.coverGutterNextToScrollbar&&ie.options.fixedGutter?(ge.gutterFiller.style.display="block",ge.gutterFiller.style.height=fe.bottom+"px",ge.gutterFiller.style.width=ae.gutterWidth+"px"):ge.gutterFiller.style.display=""}var Cu={native:ps,null:Vl};function bu(ie){ie.display.scrollbars&&(ie.display.scrollbars.clear(),ie.display.scrollbars.addClass&&je(ie.display.wrapper,ie.display.scrollbars.addClass)),ie.display.scrollbars=new Cu[ie.options.scrollbarStyle](function(ae){ie.display.wrapper.insertBefore(ae,ie.display.scrollbarFiller),vt(ae,"mousedown",function(){ie.state.focused&&setTimeout(function(){return ie.display.input.focus()},0)}),ae.setAttribute("cm-not-content","true")},function(ae,ge){ge=="horizontal"?ba(ie,ae):Os(ie,ae)},ie),ie.display.scrollbars.addClass&&It(ie.display.wrapper,ie.display.scrollbars.addClass)}var ql=0;function Cl(ie){ie.curOp={cm:ie,viewChanged:!1,startHeight:ie.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ql},Il(ie.curOp)}function uc(ie){var ae=ie.curOp;ae&&Ia(ae,function(ge){for(var fe=0;fe<ge.ops.length;fe++)ge.ops[fe].cm.curOp=null;Md(ge)})}function Md(ie){for(var ae=ie.ops,ge=0;ge<ae.length;ge++)ft(ae[ge]);for(var fe=0;fe<ae.length;fe++)St(ae[fe]);for(var xe=0;xe<ae.length;xe++)nn(ae[xe]);for(var Oe=0;Oe<ae.length;Oe++)ln(ae[Oe]);for(var Ve=0;Ve<ae.length;Ve++)Dn(ae[Ve])}function ft(ie){var ae=ie.cm,ge=ae.display;xr(ae),ie.updateMaxLine&&ho(ae),ie.mustUpdate=ie.viewChanged||ie.forceUpdate||ie.scrollTop!=null||ie.scrollToPos&&(ie.scrollToPos.from.line<ge.viewFrom||ie.scrollToPos.to.line>=ge.viewTo)||ge.maxLineChanged&&ae.options.lineWrapping,ie.update=ie.mustUpdate&&new bi(ae,ie.mustUpdate&&{top:ie.scrollTop,ensure:ie.scrollToPos},ie.forceUpdate)}function St(ie){ie.updatedDisplay=ie.mustUpdate&&oo(ie.cm,ie.update)}function nn(ie){var ae=ie.cm,ge=ae.display;ie.updatedDisplay&&Qo(ae),ie.barMeasure=el(ae),ge.maxLineChanged&&!ae.options.lineWrapping&&(ie.adjustWidthTo=yi(ae,ge.maxLine,ge.maxLine.text.length).left+3,ae.display.sizerWidth=ie.adjustWidthTo,ie.barMeasure.scrollWidth=Math.max(ge.scroller.clientWidth,ge.sizer.offsetLeft+ie.adjustWidthTo+Qn(ae)+ae.display.barWidth),ie.maxScrollLeft=Math.max(0,ge.sizer.offsetLeft+ie.adjustWidthTo-zi(ae))),(ie.updatedDisplay||ie.selectionChanged)&&(ie.preparedSelection=ge.input.prepareSelection())}function ln(ie){var ae=ie.cm;ie.adjustWidthTo!=null&&(ae.display.sizer.style.minWidth=ie.adjustWidthTo+"px",ie.maxScrollLeft<ae.doc.scrollLeft&&ba(ae,Math.min(ae.display.scroller.scrollLeft,ie.maxScrollLeft),!0),ae.display.maxLineChanged=!1);var ge=ie.focus&&ie.focus==et();ie.preparedSelection&&ae.display.input.showSelection(ie.preparedSelection,ge),(ie.updatedDisplay||ie.startHeight!=ae.doc.height)&&lc(ae,ie.barMeasure),ie.updatedDisplay&&$o(ae,ie.barMeasure),ie.selectionChanged&&ts(ae),ae.state.focused&&ie.updateInput&&ae.display.input.reset(ie.typing),ge&&Ms(ie.cm)}function Dn(ie){var ae=ie.cm,ge=ae.display,fe=ae.doc;if(ie.updatedDisplay&&dr(ae,ie.update),ge.wheelStartX!=null&&(ie.scrollTop!=null||ie.scrollLeft!=null||ie.scrollToPos)&&(ge.wheelStartX=ge.wheelStartY=null),ie.scrollTop!=null&&cl(ae,ie.scrollTop,ie.forceScroll),ie.scrollLeft!=null&&ba(ae,ie.scrollLeft,!0,!0),ie.scrollToPos){var xe=Vc(ae,Zi(fe,ie.scrollToPos.from),Zi(fe,ie.scrollToPos.to),ie.scrollToPos.margin);Th(ae,xe)}var Oe=ie.maybeHiddenMarkers,Ve=ie.maybeUnhiddenMarkers;if(Oe)for(var ht=0;ht<Oe.length;++ht)Oe[ht].lines.length||en(Oe[ht],"hide");if(Ve)for(var ut=0;ut<Ve.length;++ut)Ve[ut].lines.length&&en(Ve[ut],"unhide");ge.wrapper.offsetHeight&&(fe.scrollTop=ae.display.scroller.scrollTop),ie.changeObjs&&en(ae,"changes",ae,ie.changeObjs),ie.update&&ie.update.finish()}function Sn(ie,ae){if(ie.curOp)return ae();Cl(ie);try{return ae()}finally{uc(ie)}}function ni(ie,ae){return function(){if(ie.curOp)return ae.apply(ie,arguments);Cl(ie);try{return ae.apply(ie,arguments)}finally{uc(ie)}}}function ii(ie){return function(){if(this.curOp)return ie.apply(this,arguments);Cl(this);try{return ie.apply(this,arguments)}finally{uc(this)}}}function Yn(ie){return function(){var ae=this.cm;if(!ae||ae.curOp)return ie.apply(this,arguments);Cl(ae);try{return ie.apply(this,arguments)}finally{uc(ae)}}}function Ci(ie,ae){ie.doc.highlightFrontier<ie.display.viewTo&&ie.state.highlight.set(ae,Ut(Bi,ie))}function Bi(ie){var ae=ie.doc;if(!(ae.highlightFrontier>=ie.display.viewTo)){var ge=+new Date+ie.options.workTime,fe=Er(ie,ae.highlightFrontier),xe=[];ae.iter(fe.line,Math.min(ae.first+ae.size,ie.display.viewTo+500),function(Oe){if(fe.line>=ie.display.viewFrom){var Ve=Oe.styles,ht=Oe.text.length>ie.options.maxHighlightLength?un(ae.mode,fe.state):null,ut=vo(ie,Oe,fe,!0);ht&&(fe.state=ht),Oe.styles=ut.styles;var kt=Oe.styleClasses,An=ut.classes;An?Oe.styleClasses=An:kt&&(Oe.styleClasses=null);for(var Yt=!Ve||Ve.length!=Oe.styles.length||kt!=An&&(!kt||!An||kt.bgClass!=An.bgClass||kt.textClass!=An.textClass),oi=0;!Yt&&oi<Ve.length;++oi)Yt=Ve[oi]!=Oe.styles[oi];Yt&&xe.push(fe.line),Oe.stateAfter=fe.save(),fe.nextLine()}else Oe.text.length<=ie.options.maxHighlightLength&&qt(ie,Oe.text,fe),Oe.stateAfter=fe.line%5==0?fe.save():null,fe.nextLine();if(+new Date>ge)return Ci(ie,ie.options.workDelay),!0}),ae.highlightFrontier=fe.line,ae.modeFrontier=Math.max(ae.modeFrontier,fe.line),xe.length&&Sn(ie,function(){for(var Oe=0;Oe<xe.length;Oe++)Cr(ie,xe[Oe],"text")})}}var bi=function(ie,ae,ge){var fe=ie.display;this.viewport=ae,this.visible=Ua(fe,ie.doc,ae),this.editorIsHidden=!fe.wrapper.offsetWidth,this.wrapperHeight=fe.wrapper.clientHeight,this.wrapperWidth=fe.wrapper.clientWidth,this.oldDisplayWidth=zi(ie),this.force=ge,this.dims=Lo(ie),this.events=[]};bi.prototype.signal=function(ie,ae){_n(ie,ae)&&this.events.push(arguments)},bi.prototype.finish=function(){for(var ie=0;ie<this.events.length;ie++)en.apply(null,this.events[ie])};function xr(ie){var ae=ie.display;!ae.scrollbarsClipped&&ae.scroller.offsetWidth&&(ae.nativeBarWidth=ae.scroller.offsetWidth-ae.scroller.clientWidth,ae.heightForcer.style.height=Qn(ie)+"px",ae.sizer.style.marginBottom=-ae.nativeBarWidth+"px",ae.sizer.style.borderRightWidth=Qn(ie)+"px",ae.scrollbarsClipped=!0)}function gr(ie){if(ie.hasFocus())return null;var ae=et();if(!ae||!bt(ie.display.lineDiv,ae))return null;var ge={activeElt:ae};if(window.getSelection){var fe=window.getSelection();fe.anchorNode&&fe.extend&&bt(ie.display.lineDiv,fe.anchorNode)&&(ge.anchorNode=fe.anchorNode,ge.anchorOffset=fe.anchorOffset,ge.focusNode=fe.focusNode,ge.focusOffset=fe.focusOffset)}return ge}function ar(ie){if(!(!ie||!ie.activeElt||ie.activeElt==et())&&(ie.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(ie.activeElt.nodeName)&&ie.anchorNode&&bt(document.body,ie.anchorNode)&&bt(document.body,ie.focusNode))){var ae=window.getSelection(),ge=document.createRange();ge.setEnd(ie.anchorNode,ie.anchorOffset),ge.collapse(!1),ae.removeAllRanges(),ae.addRange(ge),ae.extend(ie.focusNode,ie.focusOffset)}}function oo(ie,ae){var ge=ie.display,fe=ie.doc;if(ae.editorIsHidden)return fr(ie),!1;if(!ae.force&&ae.visible.from>=ge.viewFrom&&ae.visible.to<=ge.viewTo&&(ge.updateLineNumbers==null||ge.updateLineNumbers>=ge.viewTo)&&ge.renderedView==ge.view&&Is(ie)==0)return!1;so(ie)&&(fr(ie),ae.dims=Lo(ie));var xe=fe.first+fe.size,Oe=Math.max(ae.visible.from-ie.options.viewportMargin,fe.first),Ve=Math.min(xe,ae.visible.to+ie.options.viewportMargin);ge.viewFrom<Oe&&Oe-ge.viewFrom<20&&(Oe=Math.max(fe.first,ge.viewFrom)),ge.viewTo>Ve&&ge.viewTo-Ve<20&&(Ve=Math.min(xe,ge.viewTo)),$n&&(Oe=eo(ie.doc,Oe),Ve=Eo(ie.doc,Ve));var ht=Oe!=ge.viewFrom||Ve!=ge.viewTo||ge.lastWrapHeight!=ae.wrapperHeight||ge.lastWrapWidth!=ae.wrapperWidth;pa(ie,Oe,Ve),ge.viewOffset=za(on(ie.doc,ge.viewFrom)),ie.display.mover.style.top=ge.viewOffset+"px";var ut=Is(ie);if(!ht&&ut==0&&!ae.force&&ge.renderedView==ge.view&&(ge.updateLineNumbers==null||ge.updateLineNumbers>=ge.viewTo))return!1;var kt=gr(ie);return ut>4&&(ge.lineDiv.style.display="none"),Yr(ie,ge.updateLineNumbers,ae.dims),ut>4&&(ge.lineDiv.style.display=""),ge.renderedView=ge.view,ar(kt),ze(ge.cursorDiv),ze(ge.selectionDiv),ge.gutters.style.height=ge.sizer.style.minHeight=0,ht&&(ge.lastWrapHeight=ae.wrapperHeight,ge.lastWrapWidth=ae.wrapperWidth,Ci(ie,400)),ge.updateLineNumbers=null,!0}function dr(ie,ae){for(var ge=ae.viewport,fe=!0;;fe=!1){if(!fe||!ie.options.lineWrapping||ae.oldDisplayWidth==zi(ie)){if(ge&&ge.top!=null&&(ge={top:Math.min(ie.doc.height+kn(ie.display)-Xi(ie),ge.top)}),ae.visible=Ua(ie.display,ie.doc,ge),ae.visible.from>=ie.display.viewFrom&&ae.visible.to<=ie.display.viewTo)break}else fe&&(ae.visible=Ua(ie.display,ie.doc,ge));if(!oo(ie,ae))break;Qo(ie);var xe=el(ie);La(ie),lc(ie,xe),$o(ie,xe),ae.force=!1}ae.signal(ie,"update",ie),(ie.display.viewFrom!=ie.display.reportedViewFrom||ie.display.viewTo!=ie.display.reportedViewTo)&&(ae.signal(ie,"viewportChange",ie,ie.display.viewFrom,ie.display.viewTo),ie.display.reportedViewFrom=ie.display.viewFrom,ie.display.reportedViewTo=ie.display.viewTo)}function qr(ie,ae){var ge=new bi(ie,ae);if(oo(ie,ge)){Qo(ie),dr(ie,ge);var fe=el(ie);La(ie),lc(ie,fe),$o(ie,fe),ge.finish()}}function Yr(ie,ae,ge){var fe=ie.display,xe=ie.options.lineNumbers,Oe=fe.lineDiv,Ve=Oe.firstChild;function ht(rr){var hr=rr.nextSibling;return Me&&de&&ie.display.currentWheelTarget==rr?rr.style.display="none":rr.parentNode.removeChild(rr),hr}for(var ut=fe.view,kt=fe.viewFrom,An=0;An<ut.length;An++){var Yt=ut[An];if(!Yt.hidden)if(!Yt.node||Yt.node.parentNode!=Oe){var oi=fu(ie,Yt,kt,ge);Oe.insertBefore(oi,Ve)}else{for(;Ve!=Yt.node;)Ve=ht(Ve);var ei=xe&&ae!=null&&ae<=kt&&Yt.lineNumber;Yt.changes&&(Tt(Yt.changes,"gutter")>-1&&(ei=!1),js(ie,Yt,kt,ge)),ei&&(ze(Yt.lineNumber),Yt.lineNumber.appendChild(document.createTextNode(Pi(ie.options,kt)))),Ve=Yt.node.nextSibling}kt+=Yt.size}for(;Ve;)Ve=ht(Ve)}function So(ie){var ae=ie.gutters.offsetWidth;ie.sizer.style.marginLeft=ae+"px"}function $o(ie,ae){ie.display.sizer.style.minHeight=ae.docHeight+"px",ie.display.heightForcer.style.top=ae.docHeight+"px",ie.display.gutters.style.height=ae.docHeight+ie.display.barHeight+Qn(ie)+"px"}function la(ie){var ae=ie.display,ge=ae.view;if(!(!ae.alignWidgets&&(!ae.gutters.firstChild||!ie.options.fixedGutter))){for(var fe=nr(ae)-ae.scroller.scrollLeft+ie.doc.scrollLeft,xe=ae.gutters.offsetWidth,Oe=fe+"px",Ve=0;Ve<ge.length;Ve++)if(!ge[Ve].hidden){ie.options.fixedGutter&&(ge[Ve].gutter&&(ge[Ve].gutter.style.left=Oe),ge[Ve].gutterBackground&&(ge[Ve].gutterBackground.style.left=Oe));var ht=ge[Ve].alignable;if(ht)for(var ut=0;ut<ht.length;ut++)ht[ut].style.left=Oe}ie.options.fixedGutter&&(ae.gutters.style.left=fe+xe+"px")}}function so(ie){if(!ie.options.lineNumbers)return!1;var ae=ie.doc,ge=Pi(ie.options,ae.first+ae.size-1),fe=ie.display;if(ge.length!=fe.lineNumChars){var xe=fe.measure.appendChild(Je("div",[Je("div",ge)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Oe=xe.firstChild.offsetWidth,Ve=xe.offsetWidth-Oe;return fe.lineGutter.style.width="",fe.lineNumInnerWidth=Math.max(Oe,fe.lineGutter.offsetWidth-Ve)+1,fe.lineNumWidth=fe.lineNumInnerWidth+Ve,fe.lineNumChars=fe.lineNumInnerWidth?ge.length:-1,fe.lineGutter.style.width=fe.lineNumWidth+"px",So(ie.display),!0}return!1}function Ho(ie,ae){for(var ge=[],fe=!1,xe=0;xe<ie.length;xe++){var Oe=ie[xe],Ve=null;if(typeof Oe!="string"&&(Ve=Oe.style,Oe=Oe.className),Oe=="CodeMirror-linenumbers")if(ae)fe=!0;else continue;ge.push({className:Oe,style:Ve})}return ae&&!fe&&ge.push({className:"CodeMirror-linenumbers",style:null}),ge}function Na(ie){var ae=ie.gutters,ge=ie.gutterSpecs;ze(ae),ie.lineGutter=null;for(var fe=0;fe<ge.length;++fe){var xe=ge[fe],Oe=xe.className,Ve=xe.style,ht=ae.appendChild(Je("div",null,"CodeMirror-gutter "+Oe));Ve&&(ht.style.cssText=Ve),Oe=="CodeMirror-linenumbers"&&(ie.lineGutter=ht,ht.style.width=(ie.lineNumWidth||1)+"px")}ae.style.display=ge.length?"":"none",So(ie)}function fo(ie){Na(ie.display),wo(ie),la(ie)}function ko(ie,ae,ge,fe){var xe=this;this.input=ge,xe.scrollbarFiller=Je("div",null,"CodeMirror-scrollbar-filler"),xe.scrollbarFiller.setAttribute("cm-not-content","true"),xe.gutterFiller=Je("div",null,"CodeMirror-gutter-filler"),xe.gutterFiller.setAttribute("cm-not-content","true"),xe.lineDiv=dt("div",null,"CodeMirror-code"),xe.selectionDiv=Je("div",null,null,"position: relative; z-index: 1"),xe.cursorDiv=Je("div",null,"CodeMirror-cursors"),xe.measure=Je("div",null,"CodeMirror-measure"),xe.lineMeasure=Je("div",null,"CodeMirror-measure"),xe.lineSpace=dt("div",[xe.measure,xe.lineMeasure,xe.selectionDiv,xe.cursorDiv,xe.lineDiv],null,"position: relative; outline: none");var Oe=dt("div",[xe.lineSpace],"CodeMirror-lines");xe.mover=Je("div",[Oe],null,"position: relative"),xe.sizer=Je("div",[xe.mover],"CodeMirror-sizer"),xe.sizerWidth=null,xe.heightForcer=Je("div",null,null,"position: absolute; height: "+Ln+"px; width: 1px;"),xe.gutters=Je("div",null,"CodeMirror-gutters"),xe.lineGutter=null,xe.scroller=Je("div",[xe.sizer,xe.heightForcer,xe.gutters],"CodeMirror-scroll"),xe.scroller.setAttribute("tabIndex","-1"),xe.wrapper=Je("div",[xe.scrollbarFiller,xe.gutterFiller,xe.scroller],"CodeMirror"),We&<<8&&(xe.gutters.style.zIndex=-1,xe.scroller.style.paddingRight=0),!Me&&!(ue&&ee)&&(xe.scroller.draggable=!0),ie&&(ie.appendChild?ie.appendChild(xe.wrapper):ie(xe.wrapper)),xe.viewFrom=xe.viewTo=ae.first,xe.reportedViewFrom=xe.reportedViewTo=ae.first,xe.view=[],xe.renderedView=null,xe.externalMeasured=null,xe.viewOffset=0,xe.lastWrapHeight=xe.lastWrapWidth=0,xe.updateLineNumbers=null,xe.nativeBarWidth=xe.barHeight=xe.barWidth=0,xe.scrollbarsClipped=!1,xe.lineNumWidth=xe.lineNumInnerWidth=xe.lineNumChars=null,xe.alignWidgets=!1,xe.cachedCharWidth=xe.cachedTextHeight=xe.cachedPaddingH=null,xe.maxLine=null,xe.maxLineLength=0,xe.maxLineChanged=!1,xe.wheelDX=xe.wheelDY=xe.wheelStartX=xe.wheelStartY=null,xe.shift=!1,xe.selForContextMenu=null,xe.activeTouch=null,xe.gutterSpecs=Ho(fe.gutters,fe.lineNumbers),Na(xe),ge.init(xe)}var po=0,kr=null;We?kr=-.53:ue?kr=15:Ct?kr=-.7:st&&(kr=-1/3);function Fo(ie){var ae=ie.wheelDeltaX,ge=ie.wheelDeltaY;return ae==null&&ie.detail&&ie.axis==ie.HORIZONTAL_AXIS&&(ae=ie.detail),ge==null&&ie.detail&&ie.axis==ie.VERTICAL_AXIS?ge=ie.detail:ge==null&&(ge=ie.wheelDelta),{x:ae,y:ge}}function qo(ie){var ae=Fo(ie);return ae.x*=kr,ae.y*=kr,ae}function ma(ie,ae){var ge=Fo(ae),fe=ge.x,xe=ge.y,Oe=ie.display,Ve=Oe.scroller,ht=Ve.scrollWidth>Ve.clientWidth,ut=Ve.scrollHeight>Ve.clientHeight;if(fe&&ht||xe&&ut){if(xe&&de&&Me){e:for(var kt=ae.target,An=Oe.view;kt!=Ve;kt=kt.parentNode)for(var Yt=0;Yt<An.length;Yt++)if(An[Yt].node==kt){ie.display.currentWheelTarget=kt;break e}}if(fe&&!ue&&!Ye&&kr!=null){xe&&ut&&Os(ie,Math.max(0,Ve.scrollTop+xe*kr)),ba(ie,Math.max(0,Ve.scrollLeft+fe*kr)),(!xe||xe&&ut)&&wi(ae),Oe.wheelStartX=null;return}if(xe&&kr!=null){var oi=xe*kr,ei=ie.doc.scrollTop,rr=ei+Oe.wrapper.clientHeight;oi<0?ei=Math.max(0,ei+oi-50):rr=Math.min(ie.doc.height,rr+oi+50),qr(ie,{top:ei,bottom:rr})}po<20&&(Oe.wheelStartX==null?(Oe.wheelStartX=Ve.scrollLeft,Oe.wheelStartY=Ve.scrollTop,Oe.wheelDX=fe,Oe.wheelDY=xe,setTimeout(function(){if(Oe.wheelStartX!=null){var hr=Ve.scrollLeft-Oe.wheelStartX,Br=Ve.scrollTop-Oe.wheelStartY,uo=Br&&Oe.wheelDY&&Br/Oe.wheelDY||hr&&Oe.wheelDX&&hr/Oe.wheelDX;Oe.wheelStartX=Oe.wheelStartY=null,uo&&(kr=(kr*po+uo)/(po+1),++po)}},200)):(Oe.wheelDX+=fe,Oe.wheelDY+=xe))}}var va=function(ie,ae){this.ranges=ie,this.primIndex=ae};va.prototype.primary=function(){return this.ranges[this.primIndex]},va.prototype.equals=function(ie){if(ie==this)return!0;if(ie.primIndex!=this.primIndex||ie.ranges.length!=this.ranges.length)return!1;for(var ae=0;ae<this.ranges.length;ae++){var ge=this.ranges[ae],fe=ie.ranges[ae];if(!Rn(ge.anchor,fe.anchor)||!Rn(ge.head,fe.head))return!1}return!0},va.prototype.deepCopy=function(){for(var ie=[],ae=0;ae<this.ranges.length;ae++)ie[ae]=new lo(Oi(this.ranges[ae].anchor),Oi(this.ranges[ae].head));return new va(ie,this.primIndex)},va.prototype.somethingSelected=function(){for(var ie=0;ie<this.ranges.length;ie++)if(!this.ranges[ie].empty())return!0;return!1},va.prototype.contains=function(ie,ae){ae||(ae=ie);for(var ge=0;ge<this.ranges.length;ge++){var fe=this.ranges[ge];if(hn(ae,fe.from())>=0&&hn(ie,fe.to())<=0)return ge}return-1};var lo=function(ie,ae){this.anchor=ie,this.head=ae};lo.prototype.from=function(){return Si(this.anchor,this.head)},lo.prototype.to=function(){return Ii(this.anchor,this.head)},lo.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ba(ie,ae,ge){var fe=ie&&ie.options.selectionsMayTouch,xe=ae[ge];ae.sort(function(oi,ei){return hn(oi.from(),ei.from())}),ge=Tt(ae,xe);for(var Oe=1;Oe<ae.length;Oe++){var Ve=ae[Oe],ht=ae[Oe-1],ut=hn(ht.to(),Ve.from());if(fe&&!Ve.empty()?ut>0:ut>=0){var kt=Si(ht.from(),Ve.from()),An=Ii(ht.to(),Ve.to()),Yt=ht.empty()?Ve.from()==Ve.head:ht.from()==ht.head;Oe<=ge&&--ge,ae.splice(--Oe,2,new lo(Yt?An:kt,Yt?kt:An))}}return new va(ae,ge)}function Wa(ie,ae){return new va([new lo(ie,ae||ie)],0)}function Ps(ie){return ie.text?tn(ie.from.line+ie.text.length-1,Lt(ie.text).length+(ie.text.length==1?ie.from.ch:0)):ie.to}function is(ie,ae){if(hn(ie,ae.from)<0)return ie;if(hn(ie,ae.to)<=0)return Ps(ae);var ge=ie.line+ae.text.length-(ae.to.line-ae.from.line)-1,fe=ie.ch;return ie.line==ae.to.line&&(fe+=Ps(ae).ch-ae.to.ch),tn(ge,fe)}function il(ie,ae){for(var ge=[],fe=0;fe<ie.sel.ranges.length;fe++){var xe=ie.sel.ranges[fe];ge.push(new lo(is(xe.anchor,ae),is(xe.head,ae)))}return Ba(ie.cm,ge,ie.sel.primIndex)}function Ls(ie,ae,ge){return ie.line==ae.line?tn(ge.line,ie.ch-ae.ch+ge.ch):tn(ge.line+(ie.line-ae.line),ie.ch)}function _a(ie,ae,ge){for(var fe=[],xe=tn(ie.first,0),Oe=xe,Ve=0;Ve<ae.length;Ve++){var ht=ae[Ve],ut=Ls(ht.from,xe,Oe),kt=Ls(Ps(ht),xe,Oe);if(xe=ht.to,Oe=kt,ge=="around"){var An=ie.sel.ranges[Ve],Yt=hn(An.head,An.anchor)<0;fe[Ve]=new lo(Yt?kt:ut,Yt?ut:kt)}else fe[Ve]=new lo(ut,ut)}return new va(fe,ie.sel.primIndex)}function oa(ie){ie.doc.mode=Wt(ie.options,ie.doc.modeOption),as(ie)}function as(ie){ie.doc.iter(function(ae){ae.stateAfter&&(ae.stateAfter=null),ae.styles&&(ae.styles=null)}),ie.doc.modeFrontier=ie.doc.highlightFrontier=ie.doc.first,Ci(ie,100),ie.state.modeGen++,ie.curOp&&wo(ie)}function rl(ie,ae){return ae.from.ch==0&&ae.to.ch==0&&Lt(ae.text)==""&&(!ie.cm||ie.cm.options.wholeLineUpdateBefore)}function Gs(ie,ae,ge,fe){function xe(zo){return ge?ge[zo]:null}function Oe(zo,No,Yo){ja(zo,No,Yo,fe),or(zo,"change",zo,ae)}function Ve(zo,No){for(var Yo=[],Oa=zo;Oa<No;++Oa)Yo.push(new ca(kt[Oa],xe(Oa),fe));return Yo}var ht=ae.from,ut=ae.to,kt=ae.text,An=on(ie,ht.line),Yt=on(ie,ut.line),oi=Lt(kt),ei=xe(kt.length-1),rr=ut.line-ht.line;if(ae.full)ie.insert(0,Ve(0,kt.length)),ie.remove(kt.length,ie.size-kt.length);else if(rl(ie,ae)){var hr=Ve(0,kt.length-1);Oe(Yt,Yt.text,ei),rr&&ie.remove(ht.line,rr),hr.length&&ie.insert(ht.line,hr)}else if(An==Yt)if(kt.length==1)Oe(An,An.text.slice(0,ht.ch)+oi+An.text.slice(ut.ch),ei);else{var Br=Ve(1,kt.length-1);Br.push(new ca(oi+An.text.slice(ut.ch),ei,fe)),Oe(An,An.text.slice(0,ht.ch)+kt[0],xe(0)),ie.insert(ht.line+1,Br)}else if(kt.length==1)Oe(An,An.text.slice(0,ht.ch)+kt[0]+Yt.text.slice(ut.ch),xe(0)),ie.remove(ht.line+1,rr);else{Oe(An,An.text.slice(0,ht.ch)+kt[0],xe(0)),Oe(Yt,oi+Yt.text.slice(ut.ch),ei);var uo=Ve(1,kt.length-1);rr>1&&ie.remove(ht.line+1,rr-1),ie.insert(ht.line+1,uo)}or(ie,"change",ie,ae)}function xl(ie,ae,ge){function fe(xe,Oe,Ve){if(xe.linked)for(var ht=0;ht<xe.linked.length;++ht){var ut=xe.linked[ht];if(ut.doc!=Oe){var kt=Ve&&ut.sharedHist;ge&&!kt||(ae(ut.doc,kt),fe(ut.doc,xe,kt))}}}fe(ie,null,!0)}function Pa(ie,ae){if(ae.cm)throw new Error("This document is already in use.");ie.doc=ae,ae.cm=ie,Mi(ie),oa(ie),ha(ie),ie.options.lineWrapping||ho(ie),ie.options.mode=ae.modeOption,wo(ie)}function ha(ie){(ie.doc.direction=="rtl"?It:je)(ie.display.lineDiv,"CodeMirror-rtl")}function ya(ie){Sn(ie,function(){ha(ie),wo(ie)})}function Vo(ie){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=ie||1}function vs(ie,ae){var ge={from:Oi(ae.from),to:Ps(ae),text:fn(ie,ae.from,ae.to)};return eu(ie,ge,ae.from.line,ae.to.line+1),xl(ie,function(fe){return eu(fe,ge,ae.from.line,ae.to.line+1)},!0),ge}function Ko(ie){for(;ie.length;){var ae=Lt(ie);if(ae.ranges)ie.pop();else break}}function Aa(ie,ae){if(ae)return Ko(ie.done),Lt(ie.done);if(ie.done.length&&!Lt(ie.done).ranges)return Lt(ie.done);if(ie.done.length>1&&!ie.done[ie.done.length-2].ranges)return ie.done.pop(),Lt(ie.done)}function es(ie,ae,ge,fe){var xe=ie.history;xe.undone.length=0;var Oe=+new Date,Ve,ht;if((xe.lastOp==fe||xe.lastOrigin==ae.origin&&ae.origin&&(ae.origin.charAt(0)=="+"&&xe.lastModTime>Oe-(ie.cm?ie.cm.options.historyEventDelay:500)||ae.origin.charAt(0)=="*"))&&(Ve=Aa(xe,xe.lastOp==fe)))ht=Lt(Ve.changes),hn(ae.from,ae.to)==0&&hn(ae.from,ht.to)==0?ht.to=Ps(ae):Ve.changes.push(vs(ie,ae));else{var ut=Lt(xe.done);for((!ut||!ut.ranges)&&Ol(ie.sel,xe.done),Ve={changes:[vs(ie,ae)],generation:xe.generation},xe.done.push(Ve);xe.done.length>xe.undoDepth;)xe.done.shift(),xe.done[0].ranges||xe.done.shift()}xe.done.push(ge),xe.generation=++xe.maxGeneration,xe.lastModTime=xe.lastSelTime=Oe,xe.lastOp=xe.lastSelOp=fe,xe.lastOrigin=xe.lastSelOrigin=ae.origin,ht||en(ie,"historyAdded")}function rs(ie,ae,ge,fe){var xe=ae.charAt(0);return xe=="*"||xe=="+"&&ge.ranges.length==fe.ranges.length&&ge.somethingSelected()==fe.somethingSelected()&&new Date-ie.history.lastSelTime<=(ie.cm?ie.cm.options.historyEventDelay:500)}function zl(ie,ae,ge,fe){var xe=ie.history,Oe=fe&&fe.origin;ge==xe.lastSelOp||Oe&&xe.lastSelOrigin==Oe&&(xe.lastModTime==xe.lastSelTime&&xe.lastOrigin==Oe||rs(ie,Oe,Lt(xe.done),ae))?xe.done[xe.done.length-1]=ae:Ol(ae,xe.done),xe.lastSelTime=+new Date,xe.lastSelOrigin=Oe,xe.lastSelOp=ge,fe&&fe.clearRedo!==!1&&Ko(xe.undone)}function Ol(ie,ae){var ge=Lt(ae);ge&&ge.ranges&&ge.equals(ie)||ae.push(ie)}function eu(ie,ae,ge,fe){var xe=ae["spans_"+ie.id],Oe=0;ie.iter(Math.max(ie.first,ge),Math.min(ie.first+ie.size,fe),function(Ve){Ve.markedSpans&&((xe||(xe=ae["spans_"+ie.id]={}))[Oe]=Ve.markedSpans),++Oe})}function ws(ie){if(!ie)return null;for(var ae,ge=0;ge<ie.length;++ge)ie[ge].marker.explicitlyCleared?ae||(ae=ie.slice(0,ge)):ae&&ae.push(ie[ge]);return ae?ae.length?ae:null:ie}function Ul(ie,ae){var ge=ae["spans_"+ie.id];if(!ge)return null;for(var fe=[],xe=0;xe<ae.text.length;++xe)fe.push(ws(ge[xe]));return fe}function Sl(ie,ae){var ge=Ul(ie,ae),fe=Ir(ie,ae);if(!ge)return fe;if(!fe)return ge;for(var xe=0;xe<ge.length;++xe){var Oe=ge[xe],Ve=fe[xe];if(Oe&&Ve)e:for(var ht=0;ht<Ve.length;++ht){for(var ut=Ve[ht],kt=0;kt<Oe.length;++kt)if(Oe[kt].marker==ut.marker)continue e;Oe.push(ut)}else Ve&&(ge[xe]=Ve)}return ge}function kl(ie,ae,ge){for(var fe=[],xe=0;xe<ie.length;++xe){var Oe=ie[xe];if(Oe.ranges){fe.push(ge?va.prototype.deepCopy.call(Oe):Oe);continue}var Ve=Oe.changes,ht=[];fe.push({changes:ht});for(var ut=0;ut<Ve.length;++ut){var kt=Ve[ut],An=void 0;if(ht.push({from:kt.from,to:kt.to,text:kt.text}),ae)for(var Yt in kt)(An=Yt.match(/^spans_(\d+)$/))&&Tt(ae,Number(An[1]))>-1&&(Lt(ht)[Yt]=kt[Yt],delete kt[Yt])}}return fe}function Rc(ie,ae,ge,fe){if(fe){var xe=ie.anchor;if(ge){var Oe=hn(ae,xe)<0;Oe!=hn(ge,xe)<0?(xe=ae,ae=ge):Oe!=hn(ae,ge)<0&&(ae=ge)}return new lo(xe,ae)}else return new lo(ge||ae,ae)}function Cs(ie,ae,ge,fe,xe){xe==null&&(xe=ie.cm&&(ie.cm.display.shift||ie.extend)),Hs(ie,new va([Rc(ie.sel.primary(),ae,ge,xe)],0),fe)}function ks(ie,ae,ge){for(var fe=[],xe=ie.cm&&(ie.cm.display.shift||ie.extend),Oe=0;Oe<ie.sel.ranges.length;Oe++)fe[Oe]=Rc(ie.sel.ranges[Oe],ae[Oe],null,xe);var Ve=Ba(ie.cm,fe,ie.sel.primIndex);Hs(ie,Ve,ge)}function bs(ie,ae,ge,fe){var xe=ie.sel.ranges.slice(0);xe[ae]=ge,Hs(ie,Ba(ie.cm,xe,ie.sel.primIndex),fe)}function $s(ie,ae,ge,fe){Hs(ie,Wa(ae,ge),fe)}function bl(ie,ae,ge){var fe={ranges:ae.ranges,update:function(xe){this.ranges=[];for(var Oe=0;Oe<xe.length;Oe++)this.ranges[Oe]=new lo(Zi(ie,xe[Oe].anchor),Zi(ie,xe[Oe].head))},origin:ge&&ge.origin};return en(ie,"beforeSelectionChange",ie,fe),ie.cm&&en(ie.cm,"beforeSelectionChange",ie.cm,fe),fe.ranges!=ae.ranges?Ba(ie.cm,fe.ranges,fe.ranges.length-1):ae}function Qa(ie,ae,ge){var fe=ie.history.done,xe=Lt(fe);xe&&xe.ranges?(fe[fe.length-1]=ae,Hl(ie,ae,ge)):Hs(ie,ae,ge)}function Hs(ie,ae,ge){Hl(ie,ae,ge),zl(ie,ie.sel,ie.cm?ie.cm.curOp.id:NaN,ge)}function Hl(ie,ae,ge){(_n(ie,"beforeSelectionChange")||ie.cm&&_n(ie.cm,"beforeSelectionChange"))&&(ae=bl(ie,ae,ge));var fe=ge&&ge.bias||(hn(ae.primary().head,ie.sel.primary().head)<0?-1:1);tu(ie,_u(ie,ae,fe,!0)),!(ge&&ge.scroll===!1)&&ie.cm&&Co(ie.cm)}function tu(ie,ae){ae.equals(ie.sel)||(ie.sel=ae,ie.cm&&(ie.cm.curOp.updateInput=1,ie.cm.curOp.selectionChanged=!0,ai(ie.cm)),or(ie,"cursorActivity",ie))}function Yu(ie){tu(ie,_u(ie,ie.sel,null,!1))}function _u(ie,ae,ge,fe){for(var xe,Oe=0;Oe<ae.ranges.length;Oe++){var Ve=ae.ranges[Oe],ht=ae.ranges.length==ie.sel.ranges.length&&ie.sel.ranges[Oe],ut=ju(ie,Ve.anchor,ht&&ht.anchor,ge,fe),kt=ju(ie,Ve.head,ht&&ht.head,ge,fe);(xe||ut!=Ve.anchor||kt!=Ve.head)&&(xe||(xe=ae.ranges.slice(0,Oe)),xe[Oe]=new lo(ut,kt))}return xe?Ba(ie.cm,xe,ae.primIndex):ae}function El(ie,ae,ge,fe,xe){var Oe=on(ie,ae.line);if(Oe.markedSpans)for(var Ve=0;Ve<Oe.markedSpans.length;++Ve){var ht=Oe.markedSpans[Ve],ut=ht.marker,kt="selectLeft"in ut?!ut.selectLeft:ut.inclusiveLeft,An="selectRight"in ut?!ut.selectRight:ut.inclusiveRight;if((ht.from==null||(kt?ht.from<=ae.ch:ht.from<ae.ch))&&(ht.to==null||(An?ht.to>=ae.ch:ht.to>ae.ch))){if(xe&&(en(ut,"beforeCursorEnter"),ut.explicitlyCleared))if(Oe.markedSpans){--Ve;continue}else break;if(!ut.atomic)continue;if(ge){var Yt=ut.find(fe<0?1:-1),oi=void 0;if((fe<0?An:kt)&&(Yt=zu(ie,Yt,-fe,Yt&&Yt.line==ae.line?Oe:null)),Yt&&Yt.line==ae.line&&(oi=hn(Yt,ge))&&(fe<0?oi<0:oi>0))return El(ie,Yt,ae,fe,xe)}var ei=ut.find(fe<0?-1:1);return(fe<0?kt:An)&&(ei=zu(ie,ei,fe,ei.line==ae.line?Oe:null)),ei?El(ie,ei,ae,fe,xe):null}}return ae}function ju(ie,ae,ge,fe,xe){var Oe=fe||1,Ve=El(ie,ae,ge,Oe,xe)||!xe&&El(ie,ae,ge,Oe,!0)||El(ie,ae,ge,-Oe,xe)||!xe&&El(ie,ae,ge,-Oe,!0);return Ve||(ie.cantEdit=!0,tn(ie.first,0))}function zu(ie,ae,ge,fe){return ge<0&&ae.ch==0?ae.line>ie.first?Zi(ie,tn(ae.line-1)):null:ge>0&&ae.ch==(fe||on(ie,ae.line)).text.length?ae.line<ie.first+ie.size-1?tn(ae.line+1,0):null:new tn(ae.line,ae.ch+ge)}function Fs(ie){ie.setSelection(tn(ie.firstLine(),0),tn(ie.lastLine()),zt)}function Yl(ie,ae,ge){var fe={canceled:!1,from:ae.from,to:ae.to,text:ae.text,origin:ae.origin,cancel:function(){return fe.canceled=!0}};return ge&&(fe.update=function(xe,Oe,Ve,ht){xe&&(fe.from=Zi(ie,xe)),Oe&&(fe.to=Zi(ie,Oe)),Ve&&(fe.text=Ve),ht!==void 0&&(fe.origin=ht)}),en(ie,"beforeChange",ie,fe),ie.cm&&en(ie.cm,"beforeChange",ie.cm,fe),fe.canceled?(ie.cm&&(ie.cm.curOp.updateInput=2),null):{from:fe.from,to:fe.to,text:fe.text,origin:fe.origin}}function Ks(ie,ae,ge){if(ie.cm){if(!ie.cm.curOp)return ni(ie.cm,Ks)(ie,ae,ge);if(ie.cm.state.suppressEdits)return}if(!((_n(ie,"beforeChange")||ie.cm&&_n(ie.cm,"beforeChange"))&&(ae=Yl(ie,ae,!0),!ae))){var fe=yo&&!ge&&_o(ie,ae.from,ae.to);if(fe)for(var xe=fe.length-1;xe>=0;--xe)Zs(ie,{from:fe[xe].from,to:fe[xe].to,text:xe?[""]:ae.text,origin:ae.origin});else Zs(ie,ae)}}function Zs(ie,ae){if(!(ae.text.length==1&&ae.text[0]==""&&hn(ae.from,ae.to)==0)){var ge=il(ie,ae);es(ie,ae,ge,ie.cm?ie.cm.curOp.id:NaN),cc(ie,ae,ge,Ir(ie,ae));var fe=[];xl(ie,function(xe,Oe){!Oe&&Tt(fe,xe.history)==-1&&(Qs(xe.history,ae),fe.push(xe.history)),cc(xe,ae,null,Ir(xe,ae))})}}function Xu(ie,ae,ge){var fe=ie.cm&&ie.cm.state.suppressEdits;if(!(fe&&!ge)){for(var xe=ie.history,Oe,Ve=ie.sel,ht=ae=="undo"?xe.done:xe.undone,ut=ae=="undo"?xe.undone:xe.done,kt=0;kt<ht.length&&(Oe=ht[kt],!(ge?Oe.ranges&&!Oe.equals(ie.sel):!Oe.ranges));kt++);if(kt!=ht.length){for(xe.lastOrigin=xe.lastSelOrigin=null;;)if(Oe=ht.pop(),Oe.ranges){if(Ol(Oe,ut),ge&&!Oe.equals(ie.sel)){Hs(ie,Oe,{clearRedo:!1});return}Ve=Oe}else if(fe){ht.push(Oe);return}else break;var An=[];Ol(Ve,ut),ut.push({changes:An,generation:xe.generation}),xe.generation=Oe.generation||++xe.maxGeneration;for(var Yt=_n(ie,"beforeChange")||ie.cm&&_n(ie.cm,"beforeChange"),oi=function(hr){var Br=Oe.changes[hr];if(Br.origin=ae,Yt&&!Yl(ie,Br,!1))return ht.length=0,{};An.push(vs(ie,Br));var uo=hr?il(ie,Br):Lt(ht);cc(ie,Br,uo,Sl(ie,Br)),!hr&&ie.cm&&ie.cm.scrollIntoView({from:Br.from,to:Ps(Br)});var zo=[];xl(ie,function(No,Yo){!Yo&&Tt(zo,No.history)==-1&&(Qs(No.history,Br),zo.push(No.history)),cc(No,Br,null,Sl(No,Br))})},ei=Oe.changes.length-1;ei>=0;--ei){var rr=oi(ei);if(rr)return rr.v}}}}function Yc(ie,ae){if(ae!=0&&(ie.first+=ae,ie.sel=new va(ti(ie.sel.ranges,function(xe){return new lo(tn(xe.anchor.line+ae,xe.anchor.ch),tn(xe.head.line+ae,xe.head.ch))}),ie.sel.primIndex),ie.cm)){wo(ie.cm,ie.first,ie.first-ae,ae);for(var ge=ie.cm.display,fe=ge.viewFrom;fe<ge.viewTo;fe++)Cr(ie.cm,fe,"gutter")}}function cc(ie,ae,ge,fe){if(ie.cm&&!ie.cm.curOp)return ni(ie.cm,cc)(ie,ae,ge,fe);if(ae.to.line<ie.first){Yc(ie,ae.text.length-1-(ae.to.line-ae.from.line));return}if(!(ae.from.line>ie.lastLine())){if(ae.from.line<ie.first){var xe=ae.text.length-1-(ie.first-ae.from.line);Yc(ie,xe),ae={from:tn(ie.first,0),to:tn(ae.to.line+xe,ae.to.ch),text:[Lt(ae.text)],origin:ae.origin}}var Oe=ie.lastLine();ae.to.line>Oe&&(ae={from:ae.from,to:tn(Oe,on(ie,Oe).text.length),text:[ae.text[0]],origin:ae.origin}),ae.removed=fn(ie,ae.from,ae.to),ge||(ge=il(ie,ae)),ie.cm?dc(ie.cm,ae,fe):Gs(ie,ae,fe),Hl(ie,ge,zt),ie.cantEdit&&ju(ie,tn(ie.firstLine(),0))&&(ie.cantEdit=!1)}}function dc(ie,ae,ge){var fe=ie.doc,xe=ie.display,Oe=ae.from,Ve=ae.to,ht=!1,ut=Oe.line;ie.options.lineWrapping||(ut=Rt(Ao(on(fe,Oe.line))),fe.iter(ut,Ve.line+1,function(ei){if(ei==xe.maxLine)return ht=!0,!0})),fe.sel.contains(ae.from,ae.to)>-1&&ai(ie),Gs(fe,ae,ge,Zr(ie)),ie.options.lineWrapping||(fe.iter(ut,Oe.line+ae.text.length,function(ei){var rr=xs(ei);rr>xe.maxLineLength&&(xe.maxLine=ei,xe.maxLineLength=rr,xe.maxLineChanged=!0,ht=!1)}),ht&&(ie.curOp.updateMaxLine=!0)),jr(fe,Oe.line),Ci(ie,400);var kt=ae.text.length-(Ve.line-Oe.line)-1;ae.full?wo(ie):Oe.line==Ve.line&&ae.text.length==1&&!rl(ie.doc,ae)?Cr(ie,Oe.line,"text"):wo(ie,Oe.line,Ve.line+1,kt);var An=_n(ie,"changes"),Yt=_n(ie,"change");if(Yt||An){var oi={from:Oe,to:Ve,text:ae.text,removed:ae.removed,origin:ae.origin};Yt&&or(ie,"change",ie,oi),An&&(ie.curOp.changeObjs||(ie.curOp.changeObjs=[])).push(oi)}ie.display.selForContextMenu=null}function Ju(ie,ae,ge,fe,xe){var Oe;fe||(fe=ge),hn(fe,ge)<0&&(Oe=[fe,ge],ge=Oe[0],fe=Oe[1]),typeof ae=="string"&&(ae=ie.splitLines(ae)),Ks(ie,{from:ge,to:fe,text:ae,origin:xe})}function Hu(ie,ae,ge,fe){ge<ie.line?ie.line+=fe:ae<ie.line&&(ie.line=ae,ie.ch=0)}function ys(ie,ae,ge,fe){for(var xe=0;xe<ie.length;++xe){var Oe=ie[xe],Ve=!0;if(Oe.ranges){Oe.copied||(Oe=ie[xe]=Oe.deepCopy(),Oe.copied=!0);for(var ht=0;ht<Oe.ranges.length;ht++)Hu(Oe.ranges[ht].anchor,ae,ge,fe),Hu(Oe.ranges[ht].head,ae,ge,fe);continue}for(var ut=0;ut<Oe.changes.length;++ut){var kt=Oe.changes[ut];if(ge<kt.from.line)kt.from=tn(kt.from.line+fe,kt.from.ch),kt.to=tn(kt.to.line+fe,kt.to.ch);else if(ae<=kt.to.line){Ve=!1;break}}Ve||(ie.splice(0,xe+1),xe=0)}}function Qs(ie,ae){var ge=ae.from.line,fe=ae.to.line,xe=ae.text.length-(fe-ge)-1;ys(ie.done,ge,fe,xe),ys(ie.undone,ge,fe,xe)}function Ml(ie,ae,ge,fe){var xe=ae,Oe=ae;return typeof ae=="number"?Oe=on(ie,Ni(ie,ae)):xe=Rt(ae),xe==null?null:(fe(Oe,xe)&&ie.cm&&Cr(ie.cm,xe,ge),Oe)}function qs(ie){this.lines=ie,this.parent=null;for(var ae=0,ge=0;ge<ie.length;++ge)ie[ge].parent=this,ae+=ie[ge].height;this.height=ae}qs.prototype={chunkSize:function(){return this.lines.length},removeInner:function(ie,ae){for(var ge=ie,fe=ie+ae;ge<fe;++ge){var xe=this.lines[ge];this.height-=xe.height,hs(xe),or(xe,"delete")}this.lines.splice(ie,ae)},collapse:function(ie){ie.push.apply(ie,this.lines)},insertInner:function(ie,ae,ge){this.height+=ge,this.lines=this.lines.slice(0,ie).concat(ae).concat(this.lines.slice(ie));for(var fe=0;fe<ae.length;++fe)ae[fe].parent=this},iterN:function(ie,ae,ge){for(var fe=ie+ae;ie<fe;++ie)if(ge(this.lines[ie]))return!0}};function cs(ie){this.children=ie;for(var ae=0,ge=0,fe=0;fe<ie.length;++fe){var xe=ie[fe];ae+=xe.chunkSize(),ge+=xe.height,xe.parent=this}this.size=ae,this.height=ge,this.parent=null}cs.prototype={chunkSize:function(){return this.size},removeInner:function(ie,ae){this.size-=ae;for(var ge=0;ge<this.children.length;++ge){var fe=this.children[ge],xe=fe.chunkSize();if(ie<xe){var Oe=Math.min(ae,xe-ie),Ve=fe.height;if(fe.removeInner(ie,Oe),this.height-=Ve-fe.height,xe==Oe&&(this.children.splice(ge--,1),fe.parent=null),(ae-=Oe)==0)break;ie=0}else ie-=xe}if(this.size-ae<25&&(this.children.length>1||!(this.children[0]instanceof qs))){var ht=[];this.collapse(ht),this.children=[new qs(ht)],this.children[0].parent=this}},collapse:function(ie){for(var ae=0;ae<this.children.length;++ae)this.children[ae].collapse(ie)},insertInner:function(ie,ae,ge){this.size+=ae.length,this.height+=ge;for(var fe=0;fe<this.children.length;++fe){var xe=this.children[fe],Oe=xe.chunkSize();if(ie<=Oe){if(xe.insertInner(ie,ae,ge),xe.lines&&xe.lines.length>50){for(var Ve=xe.lines.length%25+25,ht=Ve;ht<xe.lines.length;){var ut=new qs(xe.lines.slice(ht,ht+=25));xe.height-=ut.height,this.children.splice(++fe,0,ut),ut.parent=this}xe.lines=xe.lines.slice(0,Ve),this.maybeSpill()}break}ie-=Oe}},maybeSpill:function(){if(!(this.children.length<=10)){var ie=this;do{var ae=ie.children.splice(ie.children.length-5,5),ge=new cs(ae);if(ie.parent){ie.size-=ge.size,ie.height-=ge.height;var xe=Tt(ie.parent.children,ie);ie.parent.children.splice(xe+1,0,ge)}else{var fe=new cs(ie.children);fe.parent=ie,ie.children=[fe,ge],ie=fe}ge.parent=ie.parent}while(ie.children.length>10);ie.parent.maybeSpill()}},iterN:function(ie,ae,ge){for(var fe=0;fe<this.children.length;++fe){var xe=this.children[fe],Oe=xe.chunkSize();if(ie<Oe){var Ve=Math.min(ae,Oe-ie);if(xe.iterN(ie,Ve,ge))return!0;if((ae-=Ve)==0)break;ie=0}else ie-=Oe}}};var Ll=function(ie,ae,ge){if(ge)for(var fe in ge)ge.hasOwnProperty(fe)&&(this[fe]=ge[fe]);this.doc=ie,this.node=ae};Ll.prototype.clear=function(){var ie=this.doc.cm,ae=this.line.widgets,ge=this.line,fe=Rt(ge);if(!(fe==null||!ae)){for(var xe=0;xe<ae.length;++xe)ae[xe]==this&&ae.splice(xe--,1);ae.length||(ge.widgets=null);var Oe=ul(this);pn(ge,Math.max(0,ge.height-Oe)),ie&&(Sn(ie,function(){Eu(ie,ge,-Oe),Cr(ie,fe,"widget")}),or(ie,"lineWidgetCleared",ie,this,fe))}},Ll.prototype.changed=function(){var ie=this,ae=this.height,ge=this.doc.cm,fe=this.line;this.height=null;var xe=ul(this)-ae;xe&&(ci(this.doc,fe)||pn(fe,fe.height+xe),ge&&Sn(ge,function(){ge.curOp.forceUpdate=!0,Eu(ge,fe,xe),or(ge,"lineWidgetChanged",ge,ie,Rt(fe))}))},Hn(Ll);function Eu(ie,ae,ge){za(ae)<(ie.curOp&&ie.curOp.scrollTop||ie.doc.scrollTop)&&mi(ie,ge)}function Sc(ie,ae,ge,fe){var xe=new Ll(ie,ge,fe),Oe=ie.cm;return Oe&&xe.noHScroll&&(Oe.display.alignWidgets=!0),Ml(ie,ae,"widget",function(Ve){var ht=Ve.widgets||(Ve.widgets=[]);if(xe.insertAt==null?ht.push(xe):ht.splice(Math.min(ht.length-1,Math.max(0,xe.insertAt)),0,xe),xe.line=Ve,Oe&&!ci(ie,Ve)){var ut=za(Ve)<ie.scrollTop;pn(Ve,Ve.height+ul(xe)),ut&&mi(Oe,xe.height),Oe.curOp.forceUpdate=!0}return!0}),Oe&&or(Oe,"lineWidgetAdded",Oe,xe,typeof ae=="number"?ae:Rt(ae)),xe}var _d=0,gn=function(ie,ae){this.lines=[],this.type=ae,this.doc=ie,this.id=++_d};gn.prototype.clear=function(){if(!this.explicitlyCleared){var ie=this.doc.cm,ae=ie&&!ie.curOp;if(ae&&Cl(ie),_n(this,"clear")){var ge=this.find();ge&&or(this,"clear",ge.from,ge.to)}for(var fe=null,xe=null,Oe=0;Oe<this.lines.length;++Oe){var Ve=this.lines[Oe],ht=Jo(Ve.markedSpans,this);ie&&!this.collapsed?Cr(ie,Rt(Ve),"text"):ie&&(ht.to!=null&&(xe=Rt(Ve)),ht.from!=null&&(fe=Rt(Ve))),Ve.markedSpans=Yi(Ve.markedSpans,ht),ht.from==null&&this.collapsed&&!ci(this.doc,Ve)&&ie&&pn(Ve,ir(ie.display))}if(ie&&this.collapsed&&!ie.options.lineWrapping)for(var ut=0;ut<this.lines.length;++ut){var kt=Ao(this.lines[ut]),An=xs(kt);An>ie.display.maxLineLength&&(ie.display.maxLine=kt,ie.display.maxLineLength=An,ie.display.maxLineChanged=!0)}fe!=null&&ie&&this.collapsed&&wo(ie,fe,xe+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,ie&&Yu(ie.doc)),ie&&or(ie,"markerCleared",ie,this,fe,xe),ae&&uc(ie),this.parent&&this.parent.clear()}},gn.prototype.find=function(ie,ae){ie==null&&this.type=="bookmark"&&(ie=1);for(var ge,fe,xe=0;xe<this.lines.length;++xe){var Oe=this.lines[xe],Ve=Jo(Oe.markedSpans,this);if(Ve.from!=null&&(ge=tn(ae?Oe:Rt(Oe),Ve.from),ie==-1))return ge;if(Ve.to!=null&&(fe=tn(ae?Oe:Rt(Oe),Ve.to),ie==1))return fe}return ge&&{from:ge,to:fe}},gn.prototype.changed=function(){var ie=this,ae=this.find(-1,!0),ge=this,fe=this.doc.cm;!ae||!fe||Sn(fe,function(){var xe=ae.line,Oe=Rt(ae.line),Ve=Ji(fe,Oe);if(Ve&&(xi(Ve),fe.curOp.selectionChanged=fe.curOp.forceUpdate=!0),fe.curOp.updateMaxLine=!0,!ci(ge.doc,xe)&&ge.height!=null){var ht=ge.height;ge.height=null;var ut=ul(ge)-ht;ut&&pn(xe,xe.height+ut)}or(fe,"markerChanged",fe,ie)})},gn.prototype.attachLine=function(ie){if(!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(!ae.maybeHiddenMarkers||Tt(ae.maybeHiddenMarkers,this)==-1)&&(ae.maybeUnhiddenMarkers||(ae.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(ie)},gn.prototype.detachLine=function(ie){if(this.lines.splice(Tt(this.lines,ie),1),!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(ae.maybeHiddenMarkers||(ae.maybeHiddenMarkers=[])).push(this)}},Hn(gn);function ld(ie,ae,ge,fe,xe){if(fe&&fe.shared)return df(ie,ae,ge,fe,xe);if(ie.cm&&!ie.cm.curOp)return ni(ie.cm,ld)(ie,ae,ge,fe,xe);var Oe=new gn(ie,xe),Ve=hn(ae,ge);if(fe&&Nt(fe,Oe,!1),Ve>0||Ve==0&&Oe.clearWhenEmpty!==!1)return Oe;if(Oe.replacedWith&&(Oe.collapsed=!0,Oe.widgetNode=dt("span",[Oe.replacedWith],"CodeMirror-widget"),fe.handleMouseEvents||Oe.widgetNode.setAttribute("cm-ignore-events","true"),fe.insertLeft&&(Oe.widgetNode.insertLeft=!0)),Oe.collapsed){if(Da(ie,ae.line,ae,ge,Oe)||ae.line!=ge.line&&Da(ie,ge.line,ae,ge,Oe))throw new Error("Inserting collapsed marker partially overlapping an existing one");Kn()}Oe.addToHistory&&es(ie,{from:ae,to:ge,origin:"markText"},ie.sel,NaN);var ht=ae.line,ut=ie.cm,kt;if(ie.iter(ht,ge.line+1,function(Yt){ut&&Oe.collapsed&&!ut.options.lineWrapping&&Ao(Yt)==ut.display.maxLine&&(kt=!0),Oe.collapsed&&ht!=ae.line&&pn(Yt,0),ua(Yt,new Io(Oe,ht==ae.line?ae.ch:null,ht==ge.line?ge.ch:null)),++ht}),Oe.collapsed&&ie.iter(ae.line,ge.line+1,function(Yt){ci(ie,Yt)&&pn(Yt,0)}),Oe.clearOnEnter&&vt(Oe,"beforeCursorEnter",function(){return Oe.clear()}),Oe.readOnly&&(Xo(),(ie.history.done.length||ie.history.undone.length)&&ie.clearHistory()),Oe.collapsed&&(Oe.id=++_d,Oe.atomic=!0),ut){if(kt&&(ut.curOp.updateMaxLine=!0),Oe.collapsed)wo(ut,ae.line,ge.line+1);else if(Oe.className||Oe.startStyle||Oe.endStyle||Oe.css||Oe.attributes||Oe.title)for(var An=ae.line;An<=ge.line;An++)Cr(ut,An,"text");Oe.atomic&&Yu(ut.doc),or(ut,"markerAdded",ut,Oe)}return Oe}var Fc=function(ie,ae){this.markers=ie,this.primary=ae;for(var ge=0;ge<ie.length;++ge)ie[ge].parent=this};Fc.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var ie=0;ie<this.markers.length;++ie)this.markers[ie].clear();or(this,"clear")}},Fc.prototype.find=function(ie,ae){return this.primary.find(ie,ae)},Hn(Fc);function df(ie,ae,ge,fe,xe){fe=Nt(fe),fe.shared=!1;var Oe=[ld(ie,ae,ge,fe,xe)],Ve=Oe[0],ht=fe.widgetNode;return xl(ie,function(ut){ht&&(fe.widgetNode=ht.cloneNode(!0)),Oe.push(ld(ut,Zi(ut,ae),Zi(ut,ge),fe,xe));for(var kt=0;kt<ut.linked.length;++kt)if(ut.linked[kt].isParent)return;Ve=Lt(Oe)}),new Fc(Oe,Ve)}function jd(ie){return ie.findMarks(tn(ie.first,0),ie.clipPos(tn(ie.lastLine())),function(ae){return ae.parent})}function zd(ie,ae){for(var ge=0;ge<ae.length;ge++){var fe=ae[ge],xe=fe.find(),Oe=ie.clipPos(xe.from),Ve=ie.clipPos(xe.to);if(hn(Oe,Ve)){var ht=ld(ie,Oe,Ve,fe.primary,fe.primary.type);fe.markers.push(ht),ht.parent=fe}}}function Rh(ie){for(var ae=function(fe){var xe=ie[fe],Oe=[xe.primary.doc];xl(xe.primary.doc,function(ut){return Oe.push(ut)});for(var Ve=0;Ve<xe.markers.length;Ve++){var ht=xe.markers[Ve];Tt(Oe,ht.doc)==-1&&(ht.parent=null,xe.markers.splice(Ve--,1))}},ge=0;ge<ie.length;ge++)ae(ge)}var Qg=0,Tl=function(ie,ae,ge,fe,xe){if(!(this instanceof Tl))return new Tl(ie,ae,ge,fe,xe);ge==null&&(ge=0),cs.call(this,[new qs([new ca("",null)])]),this.first=ge,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ge;var Oe=tn(ge,0);this.sel=Wa(Oe),this.history=new Vo(null),this.id=++Qg,this.modeOption=ae,this.lineSep=fe,this.direction=xe=="rtl"?"rtl":"ltr",this.extend=!1,typeof ie=="string"&&(ie=this.splitLines(ie)),Gs(this,{from:Oe,to:Oe,text:ie}),Hs(this,Wa(Oe),zt)};Tl.prototype=Xt(cs.prototype,{constructor:Tl,iter:function(ie,ae,ge){ge?this.iterN(ie-this.first,ae-ie,ge):this.iterN(this.first,this.first+this.size,ie)},insert:function(ie,ae){for(var ge=0,fe=0;fe<ae.length;++fe)ge+=ae[fe].height;this.insertInner(ie-this.first,ae,ge)},remove:function(ie,ae){this.removeInner(ie-this.first,ae)},getValue:function(ie){var ae=Jn(this,this.first,this.first+this.size);return ie===!1?ae:ae.join(ie||this.lineSeparator())},setValue:Yn(function(ie){var ae=tn(this.first,0),ge=this.first+this.size-1;Ks(this,{from:ae,to:tn(ge,on(this,ge).text.length),text:this.splitLines(ie),origin:"setValue",full:!0},!0),this.cm&&Za(this.cm,0,0),Hs(this,Wa(ae),zt)}),replaceRange:function(ie,ae,ge,fe){ae=Zi(this,ae),ge=ge?Zi(this,ge):ae,Ju(this,ie,ae,ge,fe)},getRange:function(ie,ae,ge){var fe=fn(this,Zi(this,ie),Zi(this,ae));return ge===!1?fe:fe.join(ge||this.lineSeparator())},getLine:function(ie){var ae=this.getLineHandle(ie);return ae&&ae.text},getLineHandle:function(ie){if(Vn(this,ie))return on(this,ie)},getLineNumber:function(ie){return Rt(ie)},getLineHandleVisualStart:function(ie){return typeof ie=="number"&&(ie=on(this,ie)),Ao(ie)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(ie){return Zi(this,ie)},getCursor:function(ie){var ae=this.sel.primary(),ge;return ie==null||ie=="head"?ge=ae.head:ie=="anchor"?ge=ae.anchor:ie=="end"||ie=="to"||ie===!1?ge=ae.to():ge=ae.from(),ge},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Yn(function(ie,ae,ge){$s(this,Zi(this,typeof ie=="number"?tn(ie,ae||0):ie),null,ge)}),setSelection:Yn(function(ie,ae,ge){$s(this,Zi(this,ie),Zi(this,ae||ie),ge)}),extendSelection:Yn(function(ie,ae,ge){Cs(this,Zi(this,ie),ae&&Zi(this,ae),ge)}),extendSelections:Yn(function(ie,ae){ks(this,Wr(this,ie),ae)}),extendSelectionsBy:Yn(function(ie,ae){var ge=ti(this.sel.ranges,ie);ks(this,Wr(this,ge),ae)}),setSelections:Yn(function(ie,ae,ge){if(ie.length){for(var fe=[],xe=0;xe<ie.length;xe++)fe[xe]=new lo(Zi(this,ie[xe].anchor),Zi(this,ie[xe].head));ae==null&&(ae=Math.min(ie.length-1,this.sel.primIndex)),Hs(this,Ba(this.cm,fe,ae),ge)}}),addSelection:Yn(function(ie,ae,ge){var fe=this.sel.ranges.slice(0);fe.push(new lo(Zi(this,ie),Zi(this,ae||ie))),Hs(this,Ba(this.cm,fe,fe.length-1),ge)}),getSelection:function(ie){for(var ae=this.sel.ranges,ge,fe=0;fe<ae.length;fe++){var xe=fn(this,ae[fe].from(),ae[fe].to());ge=ge?ge.concat(xe):xe}return ie===!1?ge:ge.join(ie||this.lineSeparator())},getSelections:function(ie){for(var ae=[],ge=this.sel.ranges,fe=0;fe<ge.length;fe++){var xe=fn(this,ge[fe].from(),ge[fe].to());ie!==!1&&(xe=xe.join(ie||this.lineSeparator())),ae[fe]=xe}return ae},replaceSelection:function(ie,ae,ge){for(var fe=[],xe=0;xe<this.sel.ranges.length;xe++)fe[xe]=ie;this.replaceSelections(fe,ae,ge||"+input")},replaceSelections:Yn(function(ie,ae,ge){for(var fe=[],xe=this.sel,Oe=0;Oe<xe.ranges.length;Oe++){var Ve=xe.ranges[Oe];fe[Oe]={from:Ve.from(),to:Ve.to(),text:this.splitLines(ie[Oe]),origin:ge}}for(var ht=ae&&ae!="end"&&_a(this,fe,ae),ut=fe.length-1;ut>=0;ut--)Ks(this,fe[ut]);ht?Qa(this,ht):this.cm&&Co(this.cm)}),undo:Yn(function(){Xu(this,"undo")}),redo:Yn(function(){Xu(this,"redo")}),undoSelection:Yn(function(){Xu(this,"undo",!0)}),redoSelection:Yn(function(){Xu(this,"redo",!0)}),setExtending:function(ie){this.extend=ie},getExtending:function(){return this.extend},historySize:function(){for(var ie=this.history,ae=0,ge=0,fe=0;fe<ie.done.length;fe++)ie.done[fe].ranges||++ae;for(var xe=0;xe<ie.undone.length;xe++)ie.undone[xe].ranges||++ge;return{undo:ae,redo:ge}},clearHistory:function(){var ie=this;this.history=new Vo(this.history.maxGeneration),xl(this,function(ae){return ae.history=ie.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(ie){return ie&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(ie){return this.history.generation==(ie||this.cleanGeneration)},getHistory:function(){return{done:kl(this.history.done),undone:kl(this.history.undone)}},setHistory:function(ie){var ae=this.history=new Vo(this.history.maxGeneration);ae.done=kl(ie.done.slice(0),null,!0),ae.undone=kl(ie.undone.slice(0),null,!0)},setGutterMarker:Yn(function(ie,ae,ge){return Ml(this,ie,"gutter",function(fe){var xe=fe.gutterMarkers||(fe.gutterMarkers={});return xe[ae]=ge,!ge&&Ue(xe)&&(fe.gutterMarkers=null),!0})}),clearGutter:Yn(function(ie){var ae=this;this.iter(function(ge){ge.gutterMarkers&&ge.gutterMarkers[ie]&&Ml(ae,ge,"gutter",function(){return ge.gutterMarkers[ie]=null,Ue(ge.gutterMarkers)&&(ge.gutterMarkers=null),!0})})}),lineInfo:function(ie){var ae;if(typeof ie=="number"){if(!Vn(this,ie)||(ae=ie,ie=on(this,ie),!ie))return null}else if(ae=Rt(ie),ae==null)return null;return{line:ae,handle:ie,text:ie.text,gutterMarkers:ie.gutterMarkers,textClass:ie.textClass,bgClass:ie.bgClass,wrapClass:ie.wrapClass,widgets:ie.widgets}},addLineClass:Yn(function(ie,ae,ge){return Ml(this,ie,ae=="gutter"?"gutter":"class",function(fe){var xe=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass";if(!fe[xe])fe[xe]=ge;else{if(Fe(ge).test(fe[xe]))return!1;fe[xe]+=" "+ge}return!0})}),removeLineClass:Yn(function(ie,ae,ge){return Ml(this,ie,ae=="gutter"?"gutter":"class",function(fe){var xe=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass",Oe=fe[xe];if(Oe)if(ge==null)fe[xe]=null;else{var Ve=Oe.match(Fe(ge));if(!Ve)return!1;var ht=Ve.index+Ve[0].length;fe[xe]=Oe.slice(0,Ve.index)+(!Ve.index||ht==Oe.length?"":" ")+Oe.slice(ht)||null}else return!1;return!0})}),addLineWidget:Yn(function(ie,ae,ge){return Sc(this,ie,ae,ge)}),removeLineWidget:function(ie){ie.clear()},markText:function(ie,ae,ge){return ld(this,Zi(this,ie),Zi(this,ae),ge,ge&&ge.type||"range")},setBookmark:function(ie,ae){var ge={replacedWith:ae&&(ae.nodeType==null?ae.widget:ae),insertLeft:ae&&ae.insertLeft,clearWhenEmpty:!1,shared:ae&&ae.shared,handleMouseEvents:ae&&ae.handleMouseEvents};return ie=Zi(this,ie),ld(this,ie,ie,ge,"bookmark")},findMarksAt:function(ie){ie=Zi(this,ie);var ae=[],ge=on(this,ie.line).markedSpans;if(ge)for(var fe=0;fe<ge.length;++fe){var xe=ge[fe];(xe.from==null||xe.from<=ie.ch)&&(xe.to==null||xe.to>=ie.ch)&&ae.push(xe.marker.parent||xe.marker)}return ae},findMarks:function(ie,ae,ge){ie=Zi(this,ie),ae=Zi(this,ae);var fe=[],xe=ie.line;return this.iter(ie.line,ae.line+1,function(Oe){var Ve=Oe.markedSpans;if(Ve)for(var ht=0;ht<Ve.length;ht++){var ut=Ve[ht];!(ut.to!=null&&xe==ie.line&&ie.ch>=ut.to||ut.from==null&&xe!=ie.line||ut.from!=null&&xe==ae.line&&ut.from>=ae.ch)&&(!ge||ge(ut.marker))&&fe.push(ut.marker.parent||ut.marker)}++xe}),fe},getAllMarks:function(){var ie=[];return this.iter(function(ae){var ge=ae.markedSpans;if(ge)for(var fe=0;fe<ge.length;++fe)ge[fe].from!=null&&ie.push(ge[fe].marker)}),ie},posFromIndex:function(ie){var ae,ge=this.first,fe=this.lineSeparator().length;return this.iter(function(xe){var Oe=xe.text.length+fe;if(Oe>ie)return ae=ie,!0;ie-=Oe,++ge}),Zi(this,tn(ge,ae))},indexFromPos:function(ie){ie=Zi(this,ie);var ae=ie.ch;if(ie.line<this.first||ie.ch<0)return 0;var ge=this.lineSeparator().length;return this.iter(this.first,ie.line,function(fe){ae+=fe.text.length+ge}),ae},copy:function(ie){var ae=new Tl(Jn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return ae.scrollTop=this.scrollTop,ae.scrollLeft=this.scrollLeft,ae.sel=this.sel,ae.extend=!1,ie&&(ae.history.undoDepth=this.history.undoDepth,ae.setHistory(this.getHistory())),ae},linkedDoc:function(ie){ie||(ie={});var ae=this.first,ge=this.first+this.size;ie.from!=null&&ie.from>ae&&(ae=ie.from),ie.to!=null&&ie.to<ge&&(ge=ie.to);var fe=new Tl(Jn(this,ae,ge),ie.mode||this.modeOption,ae,this.lineSep,this.direction);return ie.sharedHist&&(fe.history=this.history),(this.linked||(this.linked=[])).push({doc:fe,sharedHist:ie.sharedHist}),fe.linked=[{doc:this,isParent:!0,sharedHist:ie.sharedHist}],zd(fe,jd(this)),fe},unlinkDoc:function(ie){if(ie instanceof Ns&&(ie=ie.doc),this.linked)for(var ae=0;ae<this.linked.length;++ae){var ge=this.linked[ae];if(ge.doc==ie){this.linked.splice(ae,1),ie.unlinkDoc(this),Rh(jd(this));break}}if(ie.history==this.history){var fe=[ie.id];xl(ie,function(xe){return fe.push(xe.id)},!0),ie.history=new Vo(null),ie.history.done=kl(this.history.done,fe),ie.history.undone=kl(this.history.undone,fe)}},iterLinkedDocs:function(ie){xl(this,ie)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(ie){return this.lineSep?ie.split(this.lineSep):wr(ie)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Yn(function(ie){ie!="rtl"&&(ie="ltr"),ie!=this.direction&&(this.direction=ie,this.iter(function(ae){return ae.order=null}),this.cm&&ya(this.cm))})}),Tl.prototype.eachLine=Tl.prototype.iter;var ch=0;function Hd(ie){var ae=this;if(Zf(ae),!(wn(ae,ie)||zs(ae.display,ie))){wi(ie),We&&(ch=+new Date);var ge=Ca(ae,ie,!0),fe=ie.dataTransfer.files;if(!(!ge||ae.isReadOnly()))if(fe&&fe.length&&window.FileReader&&window.File)for(var xe=fe.length,Oe=Array(xe),Ve=0,ht=function(){++Ve==xe&&ni(ae,function(){ge=Zi(ae.doc,ge);var ei={from:ge,to:ge,text:ae.doc.splitLines(Oe.filter(function(rr){return rr!=null}).join(ae.doc.lineSeparator())),origin:"paste"};Ks(ae.doc,ei),Qa(ae.doc,Wa(Zi(ae.doc,ge),Zi(ae.doc,Ps(ei))))})()},ut=function(ei,rr){if(ae.options.allowDropFileTypes&&Tt(ae.options.allowDropFileTypes,ei.type)==-1){ht();return}var hr=new FileReader;hr.onerror=function(){return ht()},hr.onload=function(){var Br=hr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Br)){ht();return}Oe[rr]=Br,ht()},hr.readAsText(ei)},kt=0;kt<fe.length;kt++)ut(fe[kt],kt);else{if(ae.state.draggingText&&ae.doc.sel.contains(ge)>-1){ae.state.draggingText(ie),setTimeout(function(){return ae.display.input.focus()},20);return}try{var An=ie.dataTransfer.getData("Text");if(An){var Yt;if(ae.state.draggingText&&!ae.state.draggingText.copy&&(Yt=ae.listSelections()),Hl(ae.doc,Wa(ge,ge)),Yt)for(var oi=0;oi<Yt.length;++oi)Ju(ae.doc,"",Yt[oi].anchor,Yt[oi].head,"drag");ae.replaceSelection(An,"around","paste"),ae.display.input.focus()}}catch(ei){}}}}function dh(ie,ae){if(We&&(!ie.state.draggingText||+new Date-ch<100)){cr(ae);return}if(!(wn(ie,ae)||zs(ie.display,ae))&&(ae.dataTransfer.setData("Text",ie.getSelection()),ae.dataTransfer.effectAllowed="copyMove",ae.dataTransfer.setDragImage&&!st)){var ge=Je("img",null,null,"position: fixed; left: 0; top: 0;");ge.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Ye&&(ge.width=ge.height=1,ie.display.wrapper.appendChild(ge),ge._top=ge.offsetTop),ae.dataTransfer.setDragImage(ge,0,0),Ye&&ge.parentNode.removeChild(ge)}}function hf(ie,ae){var ge=Ca(ie,ae);if(ge){var fe=document.createDocumentFragment();Ea(ie,ge,fe),ie.display.dragCursor||(ie.display.dragCursor=Je("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),ie.display.lineSpace.insertBefore(ie.display.dragCursor,ie.display.cursorDiv)),Xe(ie.display.dragCursor,fe)}}function Zf(ie){ie.display.dragCursor&&(ie.display.lineSpace.removeChild(ie.display.dragCursor),ie.display.dragCursor=null)}function hh(ie){if(document.getElementsByClassName){for(var ae=document.getElementsByClassName("CodeMirror"),ge=[],fe=0;fe<ae.length;fe++){var xe=ae[fe].CodeMirror;xe&&ge.push(xe)}ge.length&&ge[0].operation(function(){for(var Oe=0;Oe<ge.length;Oe++)ie(ge[Oe])})}}var fh=!1;function Qu(){fh||(Zd(),fh=!0)}function Zd(){var ie;vt(window,"resize",function(){ie==null&&(ie=setTimeout(function(){ie=null,hh(ff)},100))}),vt(window,"blur",function(){return hh(Kc)})}function ff(ie){var ae=ie.display;ae.cachedCharWidth=ae.cachedTextHeight=ae.cachedPaddingH=null,ae.scrollbarsClipped=!1,ie.setSize()}for(var Nc={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"},ud=0;ud<10;ud++)Nc[ud+48]=Nc[ud+96]=String(ud);for(var Wd=65;Wd<=90;Wd++)Nc[Wd]=String.fromCharCode(Wd);for(var Ld=1;Ld<=12;Ld++)Nc[Ld+111]=Nc[Ld+63235]="F"+Ld;var Mu={};Mu.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"},Mu.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"},Mu.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"},Mu.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"]},Mu.default=de?Mu.macDefault:Mu.pcDefault;function Fd(ie){var ae=ie.split(/-(?!$)/);ie=ae[ae.length-1];for(var ge,fe,xe,Oe,Ve=0;Ve<ae.length-1;Ve++){var ht=ae[Ve];if(/^(cmd|meta|m)$/i.test(ht))Oe=!0;else if(/^a(lt)?$/i.test(ht))ge=!0;else if(/^(c|ctrl|control)$/i.test(ht))fe=!0;else if(/^s(hift)?$/i.test(ht))xe=!0;else throw new Error("Unrecognized modifier name: "+ht)}return ge&&(ie="Alt-"+ie),fe&&(ie="Ctrl-"+ie),Oe&&(ie="Cmd-"+ie),xe&&(ie="Shift-"+ie),ie}function _h(ie){var ae={};for(var ge in ie)if(ie.hasOwnProperty(ge)){var fe=ie[ge];if(/^(name|fallthrough|(de|at)tach)$/.test(ge))continue;if(fe=="..."){delete ie[ge];continue}for(var xe=ti(ge.split(" "),Fd),Oe=0;Oe<xe.length;Oe++){var Ve=void 0,ht=void 0;Oe==xe.length-1?(ht=xe.join(" "),Ve=fe):(ht=xe.slice(0,Oe+1).join(" "),Ve="...");var ut=ae[ht];if(!ut)ae[ht]=Ve;else if(ut!=Ve)throw new Error("Inconsistent bindings for "+ht)}delete ie[ge]}for(var kt in ae)ie[kt]=ae[kt];return ie}function Zu(ie,ae,ge,fe){ae=cd(ae);var xe=ae.call?ae.call(ie,fe):ae[ie];if(xe===!1)return"nothing";if(xe==="...")return"multi";if(xe!=null&&ge(xe))return"handled";if(ae.fallthrough){if(Object.prototype.toString.call(ae.fallthrough)!="[object Array]")return Zu(ie,ae.fallthrough,ge,fe);for(var Oe=0;Oe<ae.fallthrough.length;Oe++){var Ve=Zu(ie,ae.fallthrough[Oe],ge,fe);if(Ve)return Ve}}}function Xc(ie){var ae=typeof ie=="string"?ie:Nc[ie.keyCode];return ae=="Ctrl"||ae=="Alt"||ae=="Shift"||ae=="Mod"}function gh(ie,ae,ge){var fe=ie;return ae.altKey&&fe!="Alt"&&(ie="Alt-"+ie),(be?ae.metaKey:ae.ctrlKey)&&fe!="Ctrl"&&(ie="Ctrl-"+ie),(be?ae.ctrlKey:ae.metaKey)&&fe!="Mod"&&(ie="Cmd-"+ie),!ge&&ae.shiftKey&&fe!="Shift"&&(ie="Shift-"+ie),ie}function ph(ie,ae){if(Ye&&ie.keyCode==34&&ie.char)return!1;var ge=Nc[ie.keyCode];return ge==null||ie.altGraphKey?!1:(ie.keyCode==3&&ie.code&&(ge=ie.code),gh(ge,ie,ae))}function cd(ie){return typeof ie=="string"?Mu[ie]:ie}function gu(ie,ae){for(var ge=ie.doc.sel.ranges,fe=[],xe=0;xe<ge.length;xe++){for(var Oe=ae(ge[xe]);fe.length&&hn(Oe.from,Lt(fe).to)<=0;){var Ve=fe.pop();if(hn(Ve.from,Oe.from)<0){Oe.from=Ve.from;break}}fe.push(Oe)}Sn(ie,function(){for(var ht=fe.length-1;ht>=0;ht--)Ju(ie.doc,"",fe[ht].from,fe[ht].to,"+delete");Co(ie)})}function jh(ie,ae,ge){var fe=it(ie.text,ae+ge,ge);return fe<0||fe>ie.text.length?null:fe}function Rl(ie,ae,ge){var fe=jh(ie,ae.ch,ge);return fe==null?null:new tn(ae.line,fe,ge<0?"after":"before")}function ss(ie,ae,ge,fe,xe){if(ie){ae.doc.direction=="rtl"&&(xe=-xe);var Oe=$e(ge,ae.doc.direction);if(Oe){var Ve=xe<0?Lt(Oe):Oe[0],ht=xe<0==(Ve.level==1),ut=ht?"after":"before",kt;if(Ve.level>0||ae.doc.direction=="rtl"){var An=mr(ae,ge);kt=xe<0?ge.text.length-1:0;var Yt=sa(ae,An,kt).top;kt=at(function(oi){return sa(ae,An,oi).top==Yt},xe<0==(Ve.level==1)?Ve.from:Ve.to-1,kt),ut=="before"&&(kt=jh(ge,kt,1))}else kt=xe<0?Ve.to:Ve.from;return new tn(fe,kt,ut)}}return new tn(fe,xe<0?ge.text.length:0,xe<0?"before":"after")}function tl(ie,ae,ge,fe){var xe=$e(ae,ie.doc.direction);if(!xe)return Rl(ae,ge,fe);ge.ch>=ae.text.length?(ge.ch=ae.text.length,ge.sticky="before"):ge.ch<=0&&(ge.ch=0,ge.sticky="after");var Oe=ye(xe,ge.ch,ge.sticky),Ve=xe[Oe];if(ie.doc.direction=="ltr"&&Ve.level%2==0&&(fe>0?Ve.to>ge.ch:Ve.from<ge.ch))return Rl(ae,ge,fe);var ht=function(uo,zo){return jh(ae,uo instanceof tn?uo.ch:uo,zo)},ut,kt=function(uo){return ie.options.lineWrapping?(ut=ut||mr(ie,ae),Go(ie,ae,ut,uo)):{begin:0,end:ae.text.length}},An=kt(ge.sticky=="before"?ht(ge,-1):ge.ch);if(ie.doc.direction=="rtl"||Ve.level==1){var Yt=Ve.level==1==fe<0,oi=ht(ge,Yt?1:-1);if(oi!=null&&(Yt?oi<=Ve.to&&oi<=An.end:oi>=Ve.from&&oi>=An.begin)){var ei=Yt?"before":"after";return new tn(ge.line,oi,ei)}}var rr=function(uo,zo,No){for(var Yo=function(dl,du){return du?new tn(ge.line,ht(dl,1),"before"):new tn(ge.line,dl,"after")};uo>=0&&uo<xe.length;uo+=zo){var Oa=xe[uo],Bo=zo>0==(Oa.level!=1),qa=Bo?No.begin:ht(No.end,-1);if(Oa.from<=qa&&qa<Oa.to||(qa=Bo?Oa.from:ht(Oa.to,-1),No.begin<=qa&&qa<No.end))return Yo(qa,Bo)}},hr=rr(Oe+fe,fe,An);if(hr)return hr;var Br=fe>0?An.end:ht(An.begin,-1);return Br!=null&&!(fe>0&&Br==ae.text.length)&&(hr=rr(fe>0?0:xe.length-1,fe,kt(Br)),hr)?hr:null}var uu={selectAll:Fs,singleSelection:function(ie){return ie.setSelection(ie.getCursor("anchor"),ie.getCursor("head"),zt)},killLine:function(ie){return gu(ie,function(ae){if(ae.empty()){var ge=on(ie.doc,ae.head.line).text.length;return ae.head.ch==ge&&ae.head.line<ie.lastLine()?{from:ae.head,to:tn(ae.head.line+1,0)}:{from:ae.head,to:tn(ae.head.line,ge)}}else return{from:ae.from(),to:ae.to()}})},deleteLine:function(ie){return gu(ie,function(ae){return{from:tn(ae.from().line,0),to:Zi(ie.doc,tn(ae.to().line+1,0))}})},delLineLeft:function(ie){return gu(ie,function(ae){return{from:tn(ae.from().line,0),to:ae.from()}})},delWrappedLineLeft:function(ie){return gu(ie,function(ae){var ge=ie.charCoords(ae.head,"div").top+5,fe=ie.coordsChar({left:0,top:ge},"div");return{from:fe,to:ae.from()}})},delWrappedLineRight:function(ie){return gu(ie,function(ae){var ge=ie.charCoords(ae.head,"div").top+5,fe=ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:ge},"div");return{from:ae.from(),to:fe}})},undo:function(ie){return ie.undo()},redo:function(ie){return ie.redo()},undoSelection:function(ie){return ie.undoSelection()},redoSelection:function(ie){return ie.redoSelection()},goDocStart:function(ie){return ie.extendSelection(tn(ie.firstLine(),0))},goDocEnd:function(ie){return ie.extendSelection(tn(ie.lastLine()))},goLineStart:function(ie){return ie.extendSelectionsBy(function(ae){return hc(ie,ae.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(ie){return ie.extendSelectionsBy(function(ae){return Gd(ie,ae.head)},{origin:"+move",bias:1})},goLineEnd:function(ie){return ie.extendSelectionsBy(function(ae){return fc(ie,ae.head.line)},{origin:"+move",bias:-1})},goLineRight:function(ie){return ie.extendSelectionsBy(function(ae){var ge=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:ge},"div")},xn)},goLineLeft:function(ie){return ie.extendSelectionsBy(function(ae){var ge=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:0,top:ge},"div")},xn)},goLineLeftSmart:function(ie){return ie.extendSelectionsBy(function(ae){var ge=ie.cursorCoords(ae.head,"div").top+5,fe=ie.coordsChar({left:0,top:ge},"div");return fe.ch<ie.getLine(fe.line).search(/\S/)?Gd(ie,ae.head):fe},xn)},goLineUp:function(ie){return ie.moveV(-1,"line")},goLineDown:function(ie){return ie.moveV(1,"line")},goPageUp:function(ie){return ie.moveV(-1,"page")},goPageDown:function(ie){return ie.moveV(1,"page")},goCharLeft:function(ie){return ie.moveH(-1,"char")},goCharRight:function(ie){return ie.moveH(1,"char")},goColumnLeft:function(ie){return ie.moveH(-1,"column")},goColumnRight:function(ie){return ie.moveH(1,"column")},goWordLeft:function(ie){return ie.moveH(-1,"word")},goGroupRight:function(ie){return ie.moveH(1,"group")},goGroupLeft:function(ie){return ie.moveH(-1,"group")},goWordRight:function(ie){return ie.moveH(1,"word")},delCharBefore:function(ie){return ie.deleteH(-1,"codepoint")},delCharAfter:function(ie){return ie.deleteH(1,"char")},delWordBefore:function(ie){return ie.deleteH(-1,"word")},delWordAfter:function(ie){return ie.deleteH(1,"word")},delGroupBefore:function(ie){return ie.deleteH(-1,"group")},delGroupAfter:function(ie){return ie.deleteH(1,"group")},indentAuto:function(ie){return ie.indentSelection("smart")},indentMore:function(ie){return ie.indentSelection("add")},indentLess:function(ie){return ie.indentSelection("subtract")},insertTab:function(ie){return ie.replaceSelection(" ")},insertSoftTab:function(ie){for(var ae=[],ge=ie.listSelections(),fe=ie.options.tabSize,xe=0;xe<ge.length;xe++){var Oe=ge[xe].from(),Ve=qe(ie.getLine(Oe.line),Oe.ch,fe);ae.push(sn(fe-Ve%fe))}ie.replaceSelections(ae)},defaultTab:function(ie){ie.somethingSelected()?ie.indentSelection("add"):ie.execCommand("insertTab")},transposeChars:function(ie){return Sn(ie,function(){for(var ae=ie.listSelections(),ge=[],fe=0;fe<ae.length;fe++)if(ae[fe].empty()){var xe=ae[fe].head,Oe=on(ie.doc,xe.line).text;if(Oe){if(xe.ch==Oe.length&&(xe=new tn(xe.line,xe.ch-1)),xe.ch>0)xe=new tn(xe.line,xe.ch+1),ie.replaceRange(Oe.charAt(xe.ch-1)+Oe.charAt(xe.ch-2),tn(xe.line,xe.ch-2),xe,"+transpose");else if(xe.line>ie.doc.first){var Ve=on(ie.doc,xe.line-1).text;Ve&&(xe=new tn(xe.line,1),ie.replaceRange(Oe.charAt(0)+ie.doc.lineSeparator()+Ve.charAt(Ve.length-1),tn(xe.line-1,Ve.length-1),xe,"+transpose"))}}ge.push(new lo(xe,xe))}ie.setSelections(ge)})},newlineAndIndent:function(ie){return Sn(ie,function(){for(var ae=ie.listSelections(),ge=ae.length-1;ge>=0;ge--)ie.replaceRange(ie.doc.lineSeparator(),ae[ge].anchor,ae[ge].head,"+input");ae=ie.listSelections();for(var fe=0;fe<ae.length;fe++)ie.indentLine(ae[fe].from().line,null,!0);Co(ie)})},openLine:function(ie){return ie.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(ie){return ie.toggleOverwrite()}};function hc(ie,ae){var ge=on(ie.doc,ae),fe=Ao(ge);return fe!=ge&&(ae=Rt(fe)),ss(!0,ie,fe,ae,1)}function fc(ie,ae){var ge=on(ie.doc,ae),fe=Va(ge);return fe!=ge&&(ae=Rt(fe)),ss(!0,ie,ge,ae,-1)}function Gd(ie,ae){var ge=hc(ie,ae.line),fe=on(ie.doc,ge.line),xe=$e(fe,ie.doc.direction);if(!xe||xe[0].level==0){var Oe=Math.max(ge.ch,fe.text.search(/\S/)),Ve=ae.line==ge.line&&ae.ch<=Oe&&ae.ch;return tn(ge.line,Ve?0:Oe,ge.sticky)}return ge}function dd(ie,ae,ge){if(typeof ae=="string"&&(ae=uu[ae],!ae))return!1;ie.display.input.ensurePolled();var fe=ie.display.shift,xe=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),ge&&(ie.display.shift=!1),xe=ae(ie)!=Mn}finally{ie.display.shift=fe,ie.state.suppressEdits=!1}return xe}function mh(ie,ae,ge){for(var fe=0;fe<ie.state.keyMaps.length;fe++){var xe=Zu(ae,ie.state.keyMaps[fe],ge,ie);if(xe)return xe}return ie.options.extraKeys&&Zu(ae,ie.options.extraKeys,ge,ie)||Zu(ae,ie.options.keyMap,ge,ie)}var Pc=new Ke;function Jc(ie,ae,ge,fe){var xe=ie.state.keySeq;if(xe){if(Xc(ae))return"handled";if(/\'$/.test(ae)?ie.state.keySeq=null:Pc.set(50,function(){ie.state.keySeq==xe&&(ie.state.keySeq=null,ie.display.input.reset())}),Wf(ie,xe+" "+ae,ge,fe))return!0}return Wf(ie,ae,ge,fe)}function Wf(ie,ae,ge,fe){var xe=mh(ie,ae,fe);return xe=="multi"&&(ie.state.keySeq=ae),xe=="handled"&&or(ie,"keyHandled",ie,ae,ge),(xe=="handled"||xe=="multi")&&(wi(ge),ts(ie)),!!xe}function Gf(ie,ae){var ge=ph(ae,!0);return ge?ae.shiftKey&&!ie.state.keySeq?Jc(ie,"Shift-"+ge,ae,function(fe){return dd(ie,fe,!0)})||Jc(ie,ge,ae,function(fe){if(typeof fe=="string"?/^go[A-Z]/.test(fe):fe.motion)return dd(ie,fe)}):Jc(ie,ge,ae,function(fe){return dd(ie,fe)}):!1}function $f(ie,ae,ge){return Jc(ie,"'"+ge+"'",ae,function(fe){return dd(ie,fe,!0)})}var $d=null;function hg(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&(ae.curOp.focus=et(),!wn(ae,ie))){We&<<11&&ie.keyCode==27&&(ie.returnValue=!1);var ge=ie.keyCode;ae.display.shift=ge==16||ie.shiftKey;var fe=Gf(ae,ie);Ye&&($d=fe?ge:null,!fe&&ge==88&&!Xr&&(de?ie.metaKey:ie.ctrlKey)&&ae.replaceSelection("",null,"cut")),ue&&!de&&!fe&&ge==46&&ie.shiftKey&&!ie.ctrlKey&&document.execCommand&&document.execCommand("cut"),ge==18&&!/\bCodeMirror-crosshair\b/.test(ae.display.lineDiv.className)&&fg(ae)}}function fg(ie){var ae=ie.display.lineDiv;It(ae,"CodeMirror-crosshair");function ge(fe){(fe.keyCode==18||!fe.altKey)&&(je(ae,"CodeMirror-crosshair"),bn(document,"keyup",ge),bn(document,"mouseover",ge))}vt(document,"keyup",ge),vt(document,"mouseover",ge)}function gg(ie){ie.keyCode==16&&(this.doc.sel.shift=!1),wn(this,ie)}function Qc(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&!(zs(ae.display,ie)||wn(ae,ie)||ie.ctrlKey&&!ie.altKey||de&&ie.metaKey)){var ge=ie.keyCode,fe=ie.charCode;if(Ye&&ge==$d){$d=null,wi(ie);return}if(!(Ye&&(!ie.which||ie.which<10)&&Gf(ae,ie))){var xe=String.fromCharCode(fe==null?ge:fe);xe!="\b"&&($f(ae,ie,xe)||ae.display.input.onKeyPress(ie))}}}var pg=400,mg=function(ie,ae,ge){this.time=ie,this.pos=ae,this.button=ge};mg.prototype.compare=function(ie,ae,ge){return this.time+pg>ie&&hn(ae,this.pos)==0&&ge==this.button};var zh,vh;function vg(ie,ae){var ge=+new Date;return vh&&vh.compare(ge,ie,ae)?(zh=vh=null,"triple"):zh&&zh.compare(ge,ie,ae)?(vh=new mg(ge,ie,ae),zh=null,"double"):(zh=new mg(ge,ie,ae),vh=null,"single")}function qc(ie){var ae=this,ge=ae.display;if(!(wn(ae,ie)||ge.activeTouch&&ge.input.supportsTouch())){if(ge.input.ensurePolled(),ge.shift=ie.shiftKey,zs(ge,ie)){Me||(ge.scroller.draggable=!1,setTimeout(function(){return ge.scroller.draggable=!0},100));return}if(!Kf(ae,ie)){var fe=Ca(ae,ie),xe=vi(ie),Oe=fe?vg(fe,xe):"single";window.focus(),xe==1&&ae.state.selectingText&&ae.state.selectingText(ie),!(fe&&yg(ae,xe,fe,Oe,ie))&&(xe==1?fe?xg(ae,fe,Oe,ie):_r(ie)==ge.scroller&&wi(ie):xe==2?(fe&&Cs(ae.doc,fe),setTimeout(function(){return ge.input.focus()},20)):xe==3&&(Ne?ae.display.input.onContextMenu(ie):Rs(ae)))}}}function yg(ie,ae,ge,fe,xe){var Oe="Click";return fe=="double"?Oe="Double"+Oe:fe=="triple"&&(Oe="Triple"+Oe),Oe=(ae==1?"Left":ae==2?"Middle":"Right")+Oe,Jc(ie,gh(Oe,xe),xe,function(Ve){if(typeof Ve=="string"&&(Ve=uu[Ve]),!Ve)return!1;var ht=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),ht=Ve(ie,ge)!=Mn}finally{ie.state.suppressEdits=!1}return ht})}function yh(ie,ae,ge){var fe=ie.getOption("configureMouse"),xe=fe?fe(ie,ae,ge):{};if(xe.unit==null){var Oe=se?ge.shiftKey&&ge.metaKey:ge.altKey;xe.unit=Oe?"rectangle":ae=="single"?"char":ae=="double"?"word":"line"}return(xe.extend==null||ie.doc.extend)&&(xe.extend=ie.doc.extend||ge.shiftKey),xe.addNew==null&&(xe.addNew=de?ge.metaKey:ge.ctrlKey),xe.moveOnDrag==null&&(xe.moveOnDrag=!(de?ge.altKey:ge.ctrlKey)),xe}function xg(ie,ae,ge,fe){We?setTimeout(Ut(Ms,ie),0):ie.curOp.focus=et();var xe=yh(ie,ge,fe),Oe=ie.doc.sel,Ve;ie.options.dragDrop&&si&&!ie.isReadOnly()&&ge=="single"&&(Ve=Oe.contains(ae))>-1&&(hn((Ve=Oe.ranges[Ve]).from(),ae)<0||ae.xRel>0)&&(hn(Ve.to(),ae)>0||ae.xRel<0)?Sg(ie,fe,ae,xe):Zp(ie,fe,ae,xe)}function Sg(ie,ae,ge,fe){var xe=ie.display,Oe=!1,Ve=ni(ie,function(kt){Me&&(xe.scroller.draggable=!1),ie.state.draggingText=!1,bn(xe.wrapper.ownerDocument,"mouseup",Ve),bn(xe.wrapper.ownerDocument,"mousemove",ht),bn(xe.scroller,"dragstart",ut),bn(xe.scroller,"drop",Ve),Oe||(wi(kt),fe.addNew||Cs(ie.doc,ge,null,null,fe.extend),Me&&!st||We&<==9?setTimeout(function(){xe.wrapper.ownerDocument.body.focus({preventScroll:!0}),xe.input.focus()},20):xe.input.focus())}),ht=function(kt){Oe=Oe||Math.abs(ae.clientX-kt.clientX)+Math.abs(ae.clientY-kt.clientY)>=10},ut=function(){return Oe=!0};Me&&(xe.scroller.draggable=!0),ie.state.draggingText=Ve,Ve.copy=!fe.moveOnDrag,xe.scroller.dragDrop&&xe.scroller.dragDrop(),vt(xe.wrapper.ownerDocument,"mouseup",Ve),vt(xe.wrapper.ownerDocument,"mousemove",ht),vt(xe.scroller,"dragstart",ut),vt(xe.scroller,"drop",Ve),Rs(ie),setTimeout(function(){return xe.input.focus()},20)}function Pg(ie,ae,ge){if(ge=="char")return new lo(ae,ae);if(ge=="word")return ie.findWordAt(ae);if(ge=="line")return new lo(tn(ae.line,0),Zi(ie.doc,tn(ae.line+1,0)));var fe=ge(ie,ae);return new lo(fe.from,fe.to)}function Zp(ie,ae,ge,fe){var xe=ie.display,Oe=ie.doc;wi(ae);var Ve,ht,ut=Oe.sel,kt=ut.ranges;if(fe.addNew&&!fe.extend?(ht=Oe.sel.contains(ge),ht>-1?Ve=kt[ht]:Ve=new lo(ge,ge)):(Ve=Oe.sel.primary(),ht=Oe.sel.primIndex),fe.unit=="rectangle")fe.addNew||(Ve=new lo(ge,ge)),ge=Ca(ie,ae,!0,!0),ht=-1;else{var An=Pg(ie,ge,fe.unit);fe.extend?Ve=Rc(Ve,An.anchor,An.head,fe.extend):Ve=An}fe.addNew?ht==-1?(ht=kt.length,Hs(Oe,Ba(ie,kt.concat([Ve]),ht),{scroll:!1,origin:"*mouse"})):kt.length>1&&kt[ht].empty()&&fe.unit=="char"&&!fe.extend?(Hs(Oe,Ba(ie,kt.slice(0,ht).concat(kt.slice(ht+1)),0),{scroll:!1,origin:"*mouse"}),ut=Oe.sel):bs(Oe,ht,Ve,rn):(ht=0,Hs(Oe,new va([Ve],0),rn),ut=Oe.sel);var Yt=ge;function oi(No){if(hn(Yt,No)!=0)if(Yt=No,fe.unit=="rectangle"){for(var Yo=[],Oa=ie.options.tabSize,Bo=qe(on(Oe,ge.line).text,ge.ch,Oa),qa=qe(on(Oe,No.line).text,No.ch,Oa),dl=Math.min(Bo,qa),du=Math.max(Bo,qa),Fl=Math.min(ge.line,No.line),qu=Math.min(ie.lastLine(),Math.max(ge.line,No.line));Fl<=qu;Fl++){var Lu=on(Oe,Fl).text,iu=Un(Lu,dl,Oa);dl==du?Yo.push(new lo(tn(Fl,iu),tn(Fl,iu))):Lu.length>iu&&Yo.push(new lo(tn(Fl,iu),tn(Fl,Un(Lu,du,Oa))))}Yo.length||Yo.push(new lo(ge,ge)),Hs(Oe,Ba(ie,ut.ranges.slice(0,ht).concat(Yo),ht),{origin:"*mouse",scroll:!1}),ie.scrollIntoView(No)}else{var ec=Ve,vu=Pg(ie,No,fe.unit),ru=ec.anchor,Bs;hn(vu.anchor,ru)>0?(Bs=vu.head,ru=Si(ec.from(),vu.anchor)):(Bs=vu.anchor,ru=Ii(ec.to(),vu.head));var Nl=ut.ranges.slice(0);Nl[ht]=qg(ie,new lo(Zi(Oe,ru),Bs)),Hs(Oe,Ba(ie,Nl,ht),rn)}}var ei=xe.wrapper.getBoundingClientRect(),rr=0;function hr(No){var Yo=++rr,Oa=Ca(ie,No,!0,fe.unit=="rectangle");if(Oa)if(hn(Oa,Yt)!=0){ie.curOp.focus=et(),oi(Oa);var Bo=Ua(xe,Oe);(Oa.line>=Bo.to||Oa.line<Bo.from)&&setTimeout(ni(ie,function(){rr==Yo&&hr(No)}),150)}else{var qa=No.clientY<ei.top?-20:No.clientY>ei.bottom?20:0;qa&&setTimeout(ni(ie,function(){rr==Yo&&(xe.scroller.scrollTop+=qa,hr(No))}),50)}}function Br(No){ie.state.selectingText=!1,rr=1/0,No&&(wi(No),xe.input.focus()),bn(xe.wrapper.ownerDocument,"mousemove",uo),bn(xe.wrapper.ownerDocument,"mouseup",zo),Oe.history.lastSelOrigin=null}var uo=ni(ie,function(No){No.buttons===0||!vi(No)?Br(No):hr(No)}),zo=ni(ie,Br);ie.state.selectingText=zo,vt(xe.wrapper.ownerDocument,"mousemove",uo),vt(xe.wrapper.ownerDocument,"mouseup",zo)}function qg(ie,ae){var ge=ae.anchor,fe=ae.head,xe=on(ie.doc,ge.line);if(hn(ge,fe)==0&&ge.sticky==fe.sticky)return ae;var Oe=$e(xe);if(!Oe)return ae;var Ve=ye(Oe,ge.ch,ge.sticky),ht=Oe[Ve];if(ht.from!=ge.ch&&ht.to!=ge.ch)return ae;var ut=Ve+(ht.from==ge.ch==(ht.level!=1)?0:1);if(ut==0||ut==Oe.length)return ae;var kt;if(fe.line!=ge.line)kt=(fe.line-ge.line)*(ie.doc.direction=="ltr"?1:-1)>0;else{var An=ye(Oe,fe.ch,fe.sticky),Yt=An-Ve||(fe.ch-ge.ch)*(ht.level==1?-1:1);An==ut-1||An==ut?kt=Yt<0:kt=Yt>0}var oi=Oe[ut+(kt?-1:0)],ei=kt==(oi.level==1),rr=ei?oi.from:oi.to,hr=ei?"after":"before";return ge.ch==rr&&ge.sticky==hr?ae:new lo(new tn(ge.line,rr,hr),fe)}function Kd(ie,ae,ge,fe){var xe,Oe;if(ae.touches)xe=ae.touches[0].clientX,Oe=ae.touches[0].clientY;else try{xe=ae.clientX,Oe=ae.clientY}catch(oi){return!1}if(xe>=Math.floor(ie.display.gutters.getBoundingClientRect().right))return!1;fe&&wi(ae);var Ve=ie.display,ht=Ve.lineDiv.getBoundingClientRect();if(Oe>ht.bottom||!_n(ie,ge))return _i(ae);Oe-=ht.top-Ve.viewOffset;for(var ut=0;ut<ie.display.gutterSpecs.length;++ut){var kt=Ve.gutters.childNodes[ut];if(kt&&kt.getBoundingClientRect().right>=xe){var An=In(ie.doc,Oe),Yt=ie.display.gutterSpecs[ut];return en(ie,ge,ie,An,Yt.className,ae),_i(ae)}}}function Kf(ie,ae){return Kd(ie,ae,"gutterClick",!0)}function gf(ie,ae){zs(ie.display,ae)||ep(ie,ae)||wn(ie,ae,"contextmenu")||Ne||ie.display.input.onContextMenu(ae)}function ep(ie,ae){return _n(ie,"gutterContextMenu")?Kd(ie,ae,"gutterContextMenu",!1):!1}function Vf(ie){ie.display.wrapper.className=ie.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+ie.options.theme.replace(/(^|\s)\s*/g," cm-s-"),yr(ie)}var xh={toString:function(){return"CodeMirror.Init"}},wg={},Sh={};function tp(ie){var ae=ie.optionHandlers;function ge(fe,xe,Oe,Ve){ie.defaults[fe]=xe,Oe&&(ae[fe]=Ve?function(ht,ut,kt){kt!=xh&&Oe(ht,ut,kt)}:Oe)}ie.defineOption=ge,ie.Init=xh,ge("value","",function(fe,xe){return fe.setValue(xe)},!0),ge("mode",null,function(fe,xe){fe.doc.modeOption=xe,oa(fe)},!0),ge("indentUnit",2,oa,!0),ge("indentWithTabs",!1),ge("smartIndent",!0),ge("tabSize",4,function(fe){as(fe),yr(fe),wo(fe)},!0),ge("lineSeparator",null,function(fe,xe){if(fe.doc.lineSep=xe,!!xe){var Oe=[],Ve=fe.doc.first;fe.doc.iter(function(ut){for(var kt=0;;){var An=ut.text.indexOf(xe,kt);if(An==-1)break;kt=An+xe.length,Oe.push(tn(Ve,An))}Ve++});for(var ht=Oe.length-1;ht>=0;ht--)Ju(fe.doc,xe,Oe[ht],tn(Oe[ht].line,Oe[ht].ch+xe.length))}}),ge("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(fe,xe,Oe){fe.state.specialChars=new RegExp(xe.source+(xe.test(" ")?"":"| "),"g"),Oe!=xh&&fe.refresh()}),ge("specialCharPlaceholder",Es,function(fe){return fe.refresh()},!0),ge("electricChars",!0),ge("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ge("spellcheck",!1,function(fe,xe){return fe.getInputField().spellcheck=xe},!0),ge("autocorrect",!1,function(fe,xe){return fe.getInputField().autocorrect=xe},!0),ge("autocapitalize",!1,function(fe,xe){return fe.getInputField().autocapitalize=xe},!0),ge("rtlMoveVisually",!he),ge("wholeLineUpdateBefore",!0),ge("theme","default",function(fe){Vf(fe),fo(fe)},!0),ge("keyMap","default",function(fe,xe,Oe){var Ve=cd(xe),ht=Oe!=xh&&cd(Oe);ht&&ht.detach&&ht.detach(fe,Ve),Ve.attach&&Ve.attach(fe,ht||null)}),ge("extraKeys",null),ge("configureMouse",null),ge("lineWrapping",!1,np,!0),ge("gutters",[],function(fe,xe){fe.display.gutterSpecs=Ho(xe,fe.options.lineNumbers),fo(fe)},!0),ge("fixedGutter",!0,function(fe,xe){fe.display.gutters.style.left=xe?nr(fe.display)+"px":"0",fe.refresh()},!0),ge("coverGutterNextToScrollbar",!1,function(fe){return lc(fe)},!0),ge("scrollbarStyle","native",function(fe){bu(fe),lc(fe),fe.display.scrollbars.setScrollTop(fe.doc.scrollTop),fe.display.scrollbars.setScrollLeft(fe.doc.scrollLeft)},!0),ge("lineNumbers",!1,function(fe,xe){fe.display.gutterSpecs=Ho(fe.options.gutters,xe),fo(fe)},!0),ge("firstLineNumber",1,fo,!0),ge("lineNumberFormatter",function(fe){return fe},fo,!0),ge("showCursorWhenSelecting",!1,La,!0),ge("resetSelectionOnContextMenu",!0),ge("lineWiseCopyCut",!0),ge("pasteLinesPerSelection",!0),ge("selectionsMayTouch",!1),ge("readOnly",!1,function(fe,xe){xe=="nocursor"&&(Kc(fe),fe.display.input.blur()),fe.display.input.readOnlyChanged(xe)}),ge("screenReaderLabel",null,function(fe,xe){xe=xe===""?null:xe,fe.display.input.screenReaderLabelChanged(xe)}),ge("disableInput",!1,function(fe,xe){xe||fe.display.input.reset()},!0),ge("dragDrop",!0,Uf),ge("allowDropFileTypes",null),ge("cursorBlinkRate",530),ge("cursorScrollMargin",0),ge("cursorHeight",1,La,!0),ge("singleCursorHeightPerLine",!0,La,!0),ge("workTime",100),ge("workDelay",100),ge("flattenSpans",!0,as,!0),ge("addModeClass",!1,as,!0),ge("pollInterval",100),ge("undoDepth",200,function(fe,xe){return fe.doc.history.undoDepth=xe}),ge("historyEventDelay",1250),ge("viewportMargin",10,function(fe){return fe.refresh()},!0),ge("maxHighlightLength",1e4,as,!0),ge("moveInputWithCursor",!0,function(fe,xe){xe||fe.display.input.resetPosition()}),ge("tabindex",null,function(fe,xe){return fe.display.input.getField().tabIndex=xe||""}),ge("autofocus",null),ge("direction","ltr",function(fe,xe){return fe.doc.setDirection(xe)},!0),ge("phrases",null)}function Uf(ie,ae,ge){var fe=ge&&ge!=xh;if(!ae!=!fe){var xe=ie.display.dragFunctions,Oe=ae?vt:bn;Oe(ie.display.scroller,"dragstart",xe.start),Oe(ie.display.scroller,"dragenter",xe.enter),Oe(ie.display.scroller,"dragover",xe.over),Oe(ie.display.scroller,"dragleave",xe.leave),Oe(ie.display.scroller,"drop",xe.drop)}}function np(ie){ie.options.lineWrapping?(It(ie.display.wrapper,"CodeMirror-wrap"),ie.display.sizer.style.minWidth="",ie.display.sizerWidth=null):(je(ie.display.wrapper,"CodeMirror-wrap"),ho(ie)),Mi(ie),wo(ie),yr(ie),setTimeout(function(){return lc(ie)},100)}function Ns(ie,ae){var ge=this;if(!(this instanceof Ns))return new Ns(ie,ae);this.options=ae=ae?Nt(ae):{},Nt(wg,ae,!1);var fe=ae.value;typeof fe=="string"?fe=new Tl(fe,ae.mode,null,ae.lineSeparator,ae.direction):ae.mode&&(fe.modeOption=ae.mode),this.doc=fe;var xe=new Ns.inputStyles[ae.inputStyle](this),Oe=this.display=new ko(ie,fe,xe,ae);Oe.wrapper.CodeMirror=this,Vf(this),ae.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),bu(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 Ke,keySeq:null,specialChars:null},ae.autofocus&&!ee&&Oe.input.focus(),We&<<11&&setTimeout(function(){return ge.display.input.reset(!0)},20),Hh(this),Qu(),Cl(this),this.curOp.forceUpdate=!0,Pa(this,fe),ae.autofocus&&!ee||this.hasFocus()?setTimeout(function(){ge.hasFocus()&&!ge.state.focused&&ns(ge)},20):Kc(this);for(var Ve in Sh)Sh.hasOwnProperty(Ve)&&Sh[Ve](this,ae[Ve],xh);so(this),ae.finishInit&&ae.finishInit(this);for(var ht=0;ht<Vd.length;++ht)Vd[ht](this);uc(this),Me&&ae.lineWrapping&&getComputedStyle(Oe.lineDiv).textRendering=="optimizelegibility"&&(Oe.lineDiv.style.textRendering="auto")}Ns.defaults=wg,Ns.optionHandlers=Sh;function Hh(ie){var ae=ie.display;vt(ae.scroller,"mousedown",ni(ie,qc)),We&<<11?vt(ae.scroller,"dblclick",ni(ie,function(ut){if(!wn(ie,ut)){var kt=Ca(ie,ut);if(!(!kt||Kf(ie,ut)||zs(ie.display,ut))){wi(ut);var An=ie.findWordAt(kt);Cs(ie.doc,An.anchor,An.head)}}})):vt(ae.scroller,"dblclick",function(ut){return wn(ie,ut)||wi(ut)}),vt(ae.scroller,"contextmenu",function(ut){return gf(ie,ut)}),vt(ae.input.getField(),"contextmenu",function(ut){ae.scroller.contains(ut.target)||gf(ie,ut)});var ge,fe={end:0};function xe(){ae.activeTouch&&(ge=setTimeout(function(){return ae.activeTouch=null},1e3),fe=ae.activeTouch,fe.end=+new Date)}function Oe(ut){if(ut.touches.length!=1)return!1;var kt=ut.touches[0];return kt.radiusX<=1&&kt.radiusY<=1}function Ve(ut,kt){if(kt.left==null)return!0;var An=kt.left-ut.left,Yt=kt.top-ut.top;return An*An+Yt*Yt>20*20}vt(ae.scroller,"touchstart",function(ut){if(!wn(ie,ut)&&!Oe(ut)&&!Kf(ie,ut)){ae.input.ensurePolled(),clearTimeout(ge);var kt=+new Date;ae.activeTouch={start:kt,moved:!1,prev:kt-fe.end<=300?fe:null},ut.touches.length==1&&(ae.activeTouch.left=ut.touches[0].pageX,ae.activeTouch.top=ut.touches[0].pageY)}}),vt(ae.scroller,"touchmove",function(){ae.activeTouch&&(ae.activeTouch.moved=!0)}),vt(ae.scroller,"touchend",function(ut){var kt=ae.activeTouch;if(kt&&!zs(ae,ut)&&kt.left!=null&&!kt.moved&&new Date-kt.start<300){var An=ie.coordsChar(ae.activeTouch,"page"),Yt;!kt.prev||Ve(kt,kt.prev)?Yt=new lo(An,An):!kt.prev.prev||Ve(kt,kt.prev.prev)?Yt=ie.findWordAt(An):Yt=new lo(tn(An.line,0),Zi(ie.doc,tn(An.line+1,0))),ie.setSelection(Yt.anchor,Yt.head),ie.focus(),wi(ut)}xe()}),vt(ae.scroller,"touchcancel",xe),vt(ae.scroller,"scroll",function(){ae.scroller.clientHeight&&(Os(ie,ae.scroller.scrollTop),ba(ie,ae.scroller.scrollLeft,!0),en(ie,"scroll",ie))}),vt(ae.scroller,"mousewheel",function(ut){return ma(ie,ut)}),vt(ae.scroller,"DOMMouseScroll",function(ut){return ma(ie,ut)}),vt(ae.wrapper,"scroll",function(){return ae.wrapper.scrollTop=ae.wrapper.scrollLeft=0}),ae.dragFunctions={enter:function(ut){wn(ie,ut)||cr(ut)},over:function(ut){wn(ie,ut)||(hf(ie,ut),cr(ut))},start:function(ut){return dh(ie,ut)},drop:ni(ie,Hd),leave:function(ut){wn(ie,ut)||Zf(ie)}};var ht=ae.input.getField();vt(ht,"keyup",function(ut){return gg.call(ie,ut)}),vt(ht,"keydown",ni(ie,hg)),vt(ht,"keypress",ni(ie,Qc)),vt(ht,"focus",function(ut){return ns(ie,ut)}),vt(ht,"blur",function(ut){return Kc(ie,ut)})}var Vd=[];Ns.defineInitHook=function(ie){return Vd.push(ie)};function cu(ie,ae,ge,fe){var xe=ie.doc,Oe;ge==null&&(ge="add"),ge=="smart"&&(xe.mode.indent?Oe=Er(ie,ae).state:ge="prev");var Ve=ie.options.tabSize,ht=on(xe,ae),ut=qe(ht.text,null,Ve);ht.stateAfter&&(ht.stateAfter=null);var kt=ht.text.match(/^\s*/)[0],An;if(!fe&&!/\S/.test(ht.text))An=0,ge="not";else if(ge=="smart"&&(An=xe.mode.indent(Oe,ht.text.slice(kt.length),ht.text),An==Mn||An>150)){if(!fe)return;ge="prev"}ge=="prev"?ae>xe.first?An=qe(on(xe,ae-1).text,null,Ve):An=0:ge=="add"?An=ut+ie.options.indentUnit:ge=="subtract"?An=ut-ie.options.indentUnit:typeof ge=="number"&&(An=ut+ge),An=Math.max(0,An);var Yt="",oi=0;if(ie.options.indentWithTabs)for(var ei=Math.floor(An/Ve);ei;--ei)oi+=Ve,Yt+=" ";if(oi<An&&(Yt+=sn(An-oi)),Yt!=kt)return Ju(xe,Yt,tn(ae,0),tn(ae,kt.length),"+input"),ht.stateAfter=null,!0;for(var rr=0;rr<xe.sel.ranges.length;rr++){var hr=xe.sel.ranges[rr];if(hr.head.line==ae&&hr.head.ch<kt.length){var Br=tn(ae,kt.length);bs(xe,rr,new lo(Br,Br));break}}}var Wu=null;function Zh(ie){Wu=ie}function Ph(ie,ae,ge,fe,xe){var Oe=ie.doc;ie.display.shift=!1,fe||(fe=Oe.sel);var Ve=+new Date-200,ht=xe=="paste"||ie.state.pasteIncoming>Ve,ut=wr(ae),kt=null;if(ht&&fe.ranges.length>1)if(Wu&&Wu.text.join(`
|
|
|
`)==ae){if(fe.ranges.length%Wu.text.length==0){kt=[];for(var An=0;An<Wu.text.length;An++)kt.push(Oe.splitLines(Wu.text[An]))}}else ut.length==fe.ranges.length&&ie.options.pasteLinesPerSelection&&(kt=ti(ut,function(uo){return[uo]}));for(var Yt=ie.curOp.updateInput,oi=fe.ranges.length-1;oi>=0;oi--){var ei=fe.ranges[oi],rr=ei.from(),hr=ei.to();ei.empty()&&(ge&&ge>0?rr=tn(rr.line,rr.ch-ge):ie.state.overwrite&&!ht?hr=tn(hr.line,Math.min(on(Oe,hr.line).text.length,hr.ch+Lt(ut).length)):ht&&Wu&&Wu.lineWise&&Wu.text.join(`
|
|
|
`)==ut.join(`
|
|
|
`)&&(rr=hr=tn(rr.line,0)));var Br={from:rr,to:hr,text:kt?kt[oi%kt.length]:ut,origin:xe||(ht?"paste":ie.state.cutIncoming>Ve?"cut":"+input")};Ks(ie.doc,Br),or(ie,"inputRead",ie,Br)}ae&&!ht&&bg(ie,ae),Co(ie),ie.curOp.updateInput<2&&(ie.curOp.updateInput=Yt),ie.curOp.typing=!0,ie.state.pasteIncoming=ie.state.cutIncoming=-1}function Cg(ie,ae){var ge=ie.clipboardData&&ie.clipboardData.getData("Text");if(ge)return ie.preventDefault(),!ae.isReadOnly()&&!ae.options.disableInput&&Sn(ae,function(){return Ph(ae,ge,0,null,"paste")}),!0}function bg(ie,ae){if(!(!ie.options.electricChars||!ie.options.smartIndent))for(var ge=ie.doc.sel,fe=ge.ranges.length-1;fe>=0;fe--){var xe=ge.ranges[fe];if(!(xe.head.ch>100||fe&&ge.ranges[fe-1].head.line==xe.head.line)){var Oe=ie.getModeAt(xe.head),Ve=!1;if(Oe.electricChars){for(var ht=0;ht<Oe.electricChars.length;ht++)if(ae.indexOf(Oe.electricChars.charAt(ht))>-1){Ve=cu(ie,xe.head.line,"smart");break}}else Oe.electricInput&&Oe.electricInput.test(on(ie.doc,xe.head.line).text.slice(0,xe.head.ch))&&(Ve=cu(ie,xe.head.line,"smart"));Ve&&or(ie,"electricInput",ie,xe.head.line)}}}function Eg(ie){for(var ae=[],ge=[],fe=0;fe<ie.doc.sel.ranges.length;fe++){var xe=ie.doc.sel.ranges[fe].head.line,Oe={anchor:tn(xe,0),head:tn(xe+1,0)};ge.push(Oe),ae.push(ie.getRange(Oe.anchor,Oe.head))}return{text:ae,ranges:ge}}function Mg(ie,ae,ge,fe){ie.setAttribute("autocorrect",ge?"":"off"),ie.setAttribute("autocapitalize",fe?"":"off"),ie.setAttribute("spellcheck",!!ae)}function Lg(){var ie=Je("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ae=Je("div",[ie],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Me?ie.style.width="1000px":ie.setAttribute("wrap","off"),Ie&&(ie.style.border="1px solid black"),Mg(ie),ae}function Ud(ie){var ae=ie.optionHandlers,ge=ie.helpers={};ie.prototype={constructor:ie,focus:function(){window.focus(),this.display.input.focus()},setOption:function(fe,xe){var Oe=this.options,Ve=Oe[fe];Oe[fe]==xe&&fe!="mode"||(Oe[fe]=xe,ae.hasOwnProperty(fe)&&ni(this,ae[fe])(this,xe,Ve),en(this,"optionChange",this,fe))},getOption:function(fe){return this.options[fe]},getDoc:function(){return this.doc},addKeyMap:function(fe,xe){this.state.keyMaps[xe?"push":"unshift"](cd(fe))},removeKeyMap:function(fe){for(var xe=this.state.keyMaps,Oe=0;Oe<xe.length;++Oe)if(xe[Oe]==fe||xe[Oe].name==fe)return xe.splice(Oe,1),!0},addOverlay:ii(function(fe,xe){var Oe=fe.token?fe:ie.getMode(this.options,fe);if(Oe.startState)throw new Error("Overlays may not be stateful.");gi(this.state.overlays,{mode:Oe,modeSpec:fe,opaque:xe&&xe.opaque,priority:xe&&xe.priority||0},function(Ve){return Ve.priority}),this.state.modeGen++,wo(this)}),removeOverlay:ii(function(fe){for(var xe=this.state.overlays,Oe=0;Oe<xe.length;++Oe){var Ve=xe[Oe].modeSpec;if(Ve==fe||typeof fe=="string"&&Ve.name==fe){xe.splice(Oe,1),this.state.modeGen++,wo(this);return}}}),indentLine:ii(function(fe,xe,Oe){typeof xe!="string"&&typeof xe!="number"&&(xe==null?xe=this.options.smartIndent?"smart":"prev":xe=xe?"add":"subtract"),Vn(this.doc,fe)&&cu(this,fe,xe,Oe)}),indentSelection:ii(function(fe){for(var xe=this.doc.sel.ranges,Oe=-1,Ve=0;Ve<xe.length;Ve++){var ht=xe[Ve];if(ht.empty())ht.head.line>Oe&&(cu(this,ht.head.line,fe,!0),Oe=ht.head.line,Ve==this.doc.sel.primIndex&&Co(this));else{var ut=ht.from(),kt=ht.to(),An=Math.max(Oe,ut.line);Oe=Math.min(this.lastLine(),kt.line-(kt.ch?0:1))+1;for(var Yt=An;Yt<Oe;++Yt)cu(this,Yt,fe);var oi=this.doc.sel.ranges;ut.ch==0&&xe.length==oi.length&&oi[Ve].from().ch>0&&bs(this.doc,Ve,new lo(ut,oi[Ve].to()),zt)}}}),getTokenAt:function(fe,xe){return $r(this,fe,xe)},getLineTokens:function(fe,xe){return $r(this,tn(fe),xe,!0)},getTokenTypeAt:function(fe){fe=Zi(this.doc,fe);var xe=Qr(this,on(this.doc,fe.line)),Oe=0,Ve=(xe.length-1)/2,ht=fe.ch,ut;if(ht==0)ut=xe[2];else for(;;){var kt=Oe+Ve>>1;if((kt?xe[kt*2-1]:0)>=ht)Ve=kt;else if(xe[kt*2+1]<ht)Oe=kt+1;else{ut=xe[kt*2+2];break}}var An=ut?ut.indexOf("overlay "):-1;return An<0?ut:An==0?null:ut.slice(0,An-1)},getModeAt:function(fe){var xe=this.doc.mode;return xe.innerMode?ie.innerMode(xe,this.getTokenAt(fe).state).mode:xe},getHelper:function(fe,xe){return this.getHelpers(fe,xe)[0]},getHelpers:function(fe,xe){var Oe=[];if(!ge.hasOwnProperty(xe))return Oe;var Ve=ge[xe],ht=this.getModeAt(fe);if(typeof ht[xe]=="string")Ve[ht[xe]]&&Oe.push(Ve[ht[xe]]);else if(ht[xe])for(var ut=0;ut<ht[xe].length;ut++){var kt=Ve[ht[xe][ut]];kt&&Oe.push(kt)}else ht.helperType&&Ve[ht.helperType]?Oe.push(Ve[ht.helperType]):Ve[ht.name]&&Oe.push(Ve[ht.name]);for(var An=0;An<Ve._global.length;An++){var Yt=Ve._global[An];Yt.pred(ht,this)&&Tt(Oe,Yt.val)==-1&&Oe.push(Yt.val)}return Oe},getStateAfter:function(fe,xe){var Oe=this.doc;return fe=Ni(Oe,fe==null?Oe.first+Oe.size-1:fe),Er(this,fe+1,xe).state},cursorCoords:function(fe,xe){var Oe,Ve=this.doc.sel.primary();return fe==null?Oe=Ve.head:typeof fe=="object"?Oe=Zi(this.doc,fe):Oe=fe?Ve.from():Ve.to(),Tr(this,Oe,xe||"page")},charCoords:function(fe,xe){return Sr(this,Zi(this.doc,fe),xe||"page")},coordsChar:function(fe,xe){return fe=zr(this,fe,xe||"page"),da(this,fe.left,fe.top)},lineAtHeight:function(fe,xe){return fe=zr(this,{top:fe,left:0},xe||"page").top,In(this.doc,fe+this.display.viewOffset)},heightAtLine:function(fe,xe,Oe){var Ve=!1,ht;if(typeof fe=="number"){var ut=this.doc.first+this.doc.size-1;fe<this.doc.first?fe=this.doc.first:fe>ut&&(fe=ut,Ve=!0),ht=on(this.doc,fe)}else ht=fe;return Mr(this,ht,{top:0,left:0},xe||"page",Oe||Ve).top+(Ve?this.doc.height-za(ht):0)},defaultTextHeight:function(){return ir(this.display)},defaultCharWidth:function(){return no(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(fe,xe,Oe,Ve,ht){var ut=this.display;fe=Tr(this,Zi(this.doc,fe));var kt=fe.bottom,An=fe.left;if(xe.style.position="absolute",xe.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(xe),ut.sizer.appendChild(xe),Ve=="over")kt=fe.top;else if(Ve=="above"||Ve=="near"){var Yt=Math.max(ut.wrapper.clientHeight,this.doc.height),oi=Math.max(ut.sizer.clientWidth,ut.lineSpace.clientWidth);(Ve=="above"||fe.bottom+xe.offsetHeight>Yt)&&fe.top>xe.offsetHeight?kt=fe.top-xe.offsetHeight:fe.bottom+xe.offsetHeight<=Yt&&(kt=fe.bottom),An+xe.offsetWidth>oi&&(An=oi-xe.offsetWidth)}xe.style.top=kt+"px",xe.style.left=xe.style.right="",ht=="right"?(An=ut.sizer.clientWidth-xe.offsetWidth,xe.style.right="0px"):(ht=="left"?An=0:ht=="middle"&&(An=(ut.sizer.clientWidth-xe.offsetWidth)/2),xe.style.left=An+"px"),Oe&&Uc(this,{left:An,top:kt,right:An+xe.offsetWidth,bottom:kt+xe.offsetHeight})},triggerOnKeyDown:ii(hg),triggerOnKeyPress:ii(Qc),triggerOnKeyUp:gg,triggerOnMouseDown:ii(qc),execCommand:function(fe){if(uu.hasOwnProperty(fe))return uu[fe].call(null,this)},triggerElectric:ii(function(fe){bg(this,fe)}),findPosH:function(fe,xe,Oe,Ve){var ht=1;xe<0&&(ht=-1,xe=-xe);for(var ut=Zi(this.doc,fe),kt=0;kt<xe&&(ut=pf(this.doc,ut,ht,Oe,Ve),!ut.hitSide);++kt);return ut},moveH:ii(function(fe,xe){var Oe=this;this.extendSelectionsBy(function(Ve){return Oe.display.shift||Oe.doc.extend||Ve.empty()?pf(Oe.doc,Ve.head,fe,xe,Oe.options.rtlMoveVisually):fe<0?Ve.from():Ve.to()},xn)}),deleteH:ii(function(fe,xe){var Oe=this.doc.sel,Ve=this.doc;Oe.somethingSelected()?Ve.replaceSelection("",null,"+delete"):gu(this,function(ht){var ut=pf(Ve,ht.head,fe,xe,!1);return fe<0?{from:ut,to:ht.head}:{from:ht.head,to:ut}})}),findPosV:function(fe,xe,Oe,Ve){var ht=1,ut=Ve;xe<0&&(ht=-1,xe=-xe);for(var kt=Zi(this.doc,fe),An=0;An<xe;++An){var Yt=Tr(this,kt,"div");if(ut==null?ut=Yt.left:Yt.left=ut,kt=Nd(this,Yt,ht,Oe),kt.hitSide)break}return kt},moveV:ii(function(fe,xe){var Oe=this,Ve=this.doc,ht=[],ut=!this.display.shift&&!Ve.extend&&Ve.sel.somethingSelected();if(Ve.extendSelectionsBy(function(An){if(ut)return fe<0?An.from():An.to();var Yt=Tr(Oe,An.head,"div");An.goalColumn!=null&&(Yt.left=An.goalColumn),ht.push(Yt.left);var oi=Nd(Oe,Yt,fe,xe);return xe=="page"&&An==Ve.sel.primary()&&mi(Oe,Sr(Oe,oi,"div").top-Yt.top),oi},xn),ht.length)for(var kt=0;kt<Ve.sel.ranges.length;kt++)Ve.sel.ranges[kt].goalColumn=ht[kt]}),findWordAt:function(fe){var xe=this.doc,Oe=on(xe,fe.line).text,Ve=fe.ch,ht=fe.ch;if(Oe){var ut=this.getHelper(fe,"wordChars");(fe.sticky=="before"||ht==Oe.length)&&Ve?--Ve:++ht;for(var kt=Oe.charAt(Ve),An=rt(kt,ut)?function(Yt){return rt(Yt,ut)}:/\s/.test(kt)?function(Yt){return/\s/.test(Yt)}:function(Yt){return!/\s/.test(Yt)&&!rt(Yt)};Ve>0&&An(Oe.charAt(Ve-1));)--Ve;for(;ht<Oe.length&&An(Oe.charAt(ht));)++ht}return new lo(tn(fe.line,Ve),tn(fe.line,ht))},toggleOverwrite:function(fe){fe!=null&&fe==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?It(this.display.cursorDiv,"CodeMirror-overwrite"):je(this.display.cursorDiv,"CodeMirror-overwrite"),en(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==et()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ii(function(fe,xe){Za(this,fe,xe)}),getScrollInfo:function(){var fe=this.display.scroller;return{left:fe.scrollLeft,top:fe.scrollTop,height:fe.scrollHeight-Qn(this)-this.display.barHeight,width:fe.scrollWidth-Qn(this)-this.display.barWidth,clientHeight:Xi(this),clientWidth:zi(this)}},scrollIntoView:ii(function(fe,xe){fe==null?(fe={from:this.doc.sel.primary().head,to:null},xe==null&&(xe=this.options.cursorScrollMargin)):typeof fe=="number"?fe={from:tn(fe,0),to:null}:fe.from==null&&(fe={from:fe,to:null}),fe.to||(fe.to=fe.from),fe.margin=xe||0,fe.from.line!=null?Gr(this,fe):gs(this,fe.from,fe.to,fe.margin)}),setSize:ii(function(fe,xe){var Oe=this,Ve=function(ut){return typeof ut=="number"||/^\d+$/.test(String(ut))?ut+"px":ut};fe!=null&&(this.display.wrapper.style.width=Ve(fe)),xe!=null&&(this.display.wrapper.style.height=Ve(xe)),this.options.lineWrapping&&tr(this);var ht=this.display.viewFrom;this.doc.iter(ht,this.display.viewTo,function(ut){if(ut.widgets){for(var kt=0;kt<ut.widgets.length;kt++)if(ut.widgets[kt].noHScroll){Cr(Oe,ht,"widget");break}}++ht}),this.curOp.forceUpdate=!0,en(this,"refresh",this)}),operation:function(fe){return Sn(this,fe)},startOperation:function(){return Cl(this)},endOperation:function(){return uc(this)},refresh:ii(function(){var fe=this.display.cachedTextHeight;wo(this),this.curOp.forceUpdate=!0,yr(this),Za(this,this.doc.scrollLeft,this.doc.scrollTop),So(this.display),(fe==null||Math.abs(fe-ir(this.display))>.5||this.options.lineWrapping)&&Mi(this),en(this,"refresh",this)}),swapDoc:ii(function(fe){var xe=this.doc;return xe.cm=null,this.state.selectingText&&this.state.selectingText(),Pa(this,fe),yr(this),this.display.input.reset(),Za(this,fe.scrollLeft,fe.scrollTop),this.curOp.forceScroll=!0,or(this,"swapDoc",this,xe),xe}),phrase:function(fe){var xe=this.options.phrases;return xe&&Object.prototype.hasOwnProperty.call(xe,fe)?xe[fe]:fe},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Hn(ie),ie.registerHelper=function(fe,xe,Oe){ge.hasOwnProperty(fe)||(ge[fe]=ie[fe]={_global:[]}),ge[fe][xe]=Oe},ie.registerGlobalHelper=function(fe,xe,Oe,Ve){ie.registerHelper(fe,xe,Ve),ge[fe]._global.push({pred:Oe,val:Ve})}}function pf(ie,ae,ge,fe,xe){var Oe=ae,Ve=ge,ht=on(ie,ae.line),ut=xe&&ie.direction=="rtl"?-ge:ge;function kt(){var zo=ae.line+ut;return zo<ie.first||zo>=ie.first+ie.size?!1:(ae=new tn(zo,ae.ch,ae.sticky),ht=on(ie,zo))}function An(zo){var No;if(fe=="codepoint"){var Yo=ht.text.charCodeAt(ae.ch+(fe>0?0:-1));isNaN(Yo)?No=null:No=new tn(ae.line,Math.max(0,Math.min(ht.text.length,ae.ch+ge*(Yo>=55296&&Yo<56320?2:1))),-ge)}else xe?No=tl(ie.cm,ht,ae,ge):No=Rl(ht,ae,ge);if(No==null)if(!zo&&kt())ae=ss(xe,ie.cm,ht,ae.line,ut);else return!1;else ae=No;return!0}if(fe=="char"||fe=="codepoint")An();else if(fe=="column")An(!0);else if(fe=="word"||fe=="group")for(var Yt=null,oi=fe=="group",ei=ie.cm&&ie.cm.getHelper(ae,"wordChars"),rr=!0;!(ge<0&&!An(!rr));rr=!1){var hr=ht.text.charAt(ae.ch)||`
|
|
|
`,Br=rt(hr,ei)?"w":oi&&hr==`
|
|
|
`?"n":!oi||/\s/.test(hr)?null:"p";if(oi&&!rr&&!Br&&(Br="s"),Yt&&Yt!=Br){ge<0&&(ge=1,An(),ae.sticky="after");break}if(Br&&(Yt=Br),ge>0&&!An(!rr))break}var uo=ju(ie,ae,Oe,Ve,!0);return Rn(Oe,uo)&&(uo.hitSide=!0),uo}function Nd(ie,ae,ge,fe){var xe=ie.doc,Oe=ae.left,Ve;if(fe=="page"){var ht=Math.min(ie.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ut=Math.max(ht-.5*ir(ie.display),3);Ve=(ge>0?ae.bottom:ae.top)+ge*ut}else fe=="line"&&(Ve=ge>0?ae.bottom+3:ae.top-3);for(var kt;kt=da(ie,Oe,Ve),!!kt.outside;){if(ge<0?Ve<=0:Ve>=xe.height){kt.hitSide=!0;break}Ve+=ge*5}return kt}var Vs=function(ie){this.cm=ie,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ke,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Vs.prototype.init=function(ie){var ae=this,ge=this,fe=ge.cm,xe=ge.div=ie.lineDiv;Mg(xe,fe.options.spellcheck,fe.options.autocorrect,fe.options.autocapitalize);function Oe(ht){for(var ut=ht.target;ut;ut=ut.parentNode){if(ut==xe)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ut.className))break}return!1}vt(xe,"paste",function(ht){!Oe(ht)||wn(fe,ht)||Cg(ht,fe)||lt<=11&&setTimeout(ni(fe,function(){return ae.updateFromDOM()}),20)}),vt(xe,"compositionstart",function(ht){ae.composing={data:ht.data,done:!1}}),vt(xe,"compositionupdate",function(ht){ae.composing||(ae.composing={data:ht.data,done:!1})}),vt(xe,"compositionend",function(ht){ae.composing&&(ht.data!=ae.composing.data&&ae.readFromDOMSoon(),ae.composing.done=!0)}),vt(xe,"touchstart",function(){return ge.forceCompositionEnd()}),vt(xe,"input",function(){ae.composing||ae.readFromDOMSoon()});function Ve(ht){if(!(!Oe(ht)||wn(fe,ht))){if(fe.somethingSelected())Zh({lineWise:!1,text:fe.getSelections()}),ht.type=="cut"&&fe.replaceSelection("",null,"cut");else if(fe.options.lineWiseCopyCut){var ut=Eg(fe);Zh({lineWise:!0,text:ut.text}),ht.type=="cut"&&fe.operation(function(){fe.setSelections(ut.ranges,0,zt),fe.replaceSelection("",null,"cut")})}else return;if(ht.clipboardData){ht.clipboardData.clearData();var kt=Wu.text.join(`
|
|
|
`);if(ht.clipboardData.setData("Text",kt),ht.clipboardData.getData("Text")==kt){ht.preventDefault();return}}var An=Lg(),Yt=An.firstChild;fe.display.lineSpace.insertBefore(An,fe.display.lineSpace.firstChild),Yt.value=Wu.text.join(`
|
|
|
`);var oi=document.activeElement;Bt(Yt),setTimeout(function(){fe.display.lineSpace.removeChild(An),oi.focus(),oi==xe&&ge.showPrimarySelection()},50)}}vt(xe,"copy",Ve),vt(xe,"cut",Ve)},Vs.prototype.screenReaderLabelChanged=function(ie){ie?this.div.setAttribute("aria-label",ie):this.div.removeAttribute("aria-label")},Vs.prototype.prepareSelection=function(){var ie=yl(this.cm,!1);return ie.focus=document.activeElement==this.div,ie},Vs.prototype.showSelection=function(ie,ae){!ie||!this.cm.display.view.length||((ie.focus||ae)&&this.showPrimarySelection(),this.showMultipleSelections(ie))},Vs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Vs.prototype.showPrimarySelection=function(){var ie=this.getSelection(),ae=this.cm,ge=ae.doc.sel.primary(),fe=ge.from(),xe=ge.to();if(ae.display.viewTo==ae.display.viewFrom||fe.line>=ae.display.viewTo||xe.line<ae.display.viewFrom){ie.removeAllRanges();return}var Oe=mf(ae,ie.anchorNode,ie.anchorOffset),Ve=mf(ae,ie.focusNode,ie.focusOffset);if(!(Oe&&!Oe.bad&&Ve&&!Ve.bad&&hn(Si(Oe,Ve),fe)==0&&hn(Ii(Oe,Ve),xe)==0)){var ht=ae.display.view,ut=fe.line>=ae.display.viewFrom&&wh(ae,fe)||{node:ht[0].measure.map[2],offset:0},kt=xe.line<ae.display.viewTo&&wh(ae,xe);if(!kt){var An=ht[ht.length-1].measure,Yt=An.maps?An.maps[An.maps.length-1]:An.map;kt={node:Yt[Yt.length-1],offset:Yt[Yt.length-2]-Yt[Yt.length-3]}}if(!ut||!kt){ie.removeAllRanges();return}var oi=ie.rangeCount&&ie.getRangeAt(0),ei;try{ei=He(ut.node,ut.offset,kt.offset,kt.node)}catch(rr){}ei&&(!ue&&ae.state.focused?(ie.collapse(ut.node,ut.offset),ei.collapsed||(ie.removeAllRanges(),ie.addRange(ei))):(ie.removeAllRanges(),ie.addRange(ei)),oi&&ie.anchorNode==null?ie.addRange(oi):ue&&this.startGracePeriod()),this.rememberSelection()}},Vs.prototype.startGracePeriod=function(){var ie=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){ie.gracePeriod=!1,ie.selectionChanged()&&ie.cm.operation(function(){return ie.cm.curOp.selectionChanged=!0})},20)},Vs.prototype.showMultipleSelections=function(ie){Xe(this.cm.display.cursorDiv,ie.cursors),Xe(this.cm.display.selectionDiv,ie.selection)},Vs.prototype.rememberSelection=function(){var ie=this.getSelection();this.lastAnchorNode=ie.anchorNode,this.lastAnchorOffset=ie.anchorOffset,this.lastFocusNode=ie.focusNode,this.lastFocusOffset=ie.focusOffset},Vs.prototype.selectionInEditor=function(){var ie=this.getSelection();if(!ie.rangeCount)return!1;var ae=ie.getRangeAt(0).commonAncestorContainer;return bt(this.div,ae)},Vs.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Vs.prototype.blur=function(){this.div.blur()},Vs.prototype.getField=function(){return this.div},Vs.prototype.supportsTouch=function(){return!0},Vs.prototype.receivedFocus=function(){var ie=this;this.selectionInEditor()?this.pollSelection():Sn(this.cm,function(){return ie.cm.curOp.selectionChanged=!0});function ae(){ie.cm.state.focused&&(ie.pollSelection(),ie.polling.set(ie.cm.options.pollInterval,ae))}this.polling.set(this.cm.options.pollInterval,ae)},Vs.prototype.selectionChanged=function(){var ie=this.getSelection();return ie.anchorNode!=this.lastAnchorNode||ie.anchorOffset!=this.lastAnchorOffset||ie.focusNode!=this.lastFocusNode||ie.focusOffset!=this.lastFocusOffset},Vs.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var ie=this.getSelection(),ae=this.cm;if(te&&Ct&&this.cm.display.gutterSpecs.length&&Fg(ie.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ge=mf(ae,ie.anchorNode,ie.anchorOffset),fe=mf(ae,ie.focusNode,ie.focusOffset);ge&&fe&&Sn(ae,function(){Hs(ae.doc,Wa(ge,fe),zt),(ge.bad||fe.bad)&&(ae.curOp.selectionChanged=!0)})}}},Vs.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var ie=this.cm,ae=ie.display,ge=ie.doc.sel.primary(),fe=ge.from(),xe=ge.to();if(fe.ch==0&&fe.line>ie.firstLine()&&(fe=tn(fe.line-1,on(ie.doc,fe.line-1).length)),xe.ch==on(ie.doc,xe.line).text.length&&xe.line<ie.lastLine()&&(xe=tn(xe.line+1,0)),fe.line<ae.viewFrom||xe.line>ae.viewTo-1)return!1;var Oe,Ve,ht;fe.line==ae.viewFrom||(Oe=Ja(ie,fe.line))==0?(Ve=Rt(ae.view[0].line),ht=ae.view[0].node):(Ve=Rt(ae.view[Oe].line),ht=ae.view[Oe-1].node.nextSibling);var ut=Ja(ie,xe.line),kt,An;if(ut==ae.view.length-1?(kt=ae.viewTo-1,An=ae.lineDiv.lastChild):(kt=Rt(ae.view[ut+1].line)-1,An=ae.view[ut+1].node.previousSibling),!ht)return!1;for(var Yt=ie.doc.splitLines(Ch(ie,ht,An,Ve,kt)),oi=fn(ie.doc,tn(Ve,0),tn(kt,on(ie.doc,kt).text.length));Yt.length>1&&oi.length>1;)if(Lt(Yt)==Lt(oi))Yt.pop(),oi.pop(),kt--;else if(Yt[0]==oi[0])Yt.shift(),oi.shift(),Ve++;else break;for(var ei=0,rr=0,hr=Yt[0],Br=oi[0],uo=Math.min(hr.length,Br.length);ei<uo&&hr.charCodeAt(ei)==Br.charCodeAt(ei);)++ei;for(var zo=Lt(Yt),No=Lt(oi),Yo=Math.min(zo.length-(Yt.length==1?ei:0),No.length-(oi.length==1?ei:0));rr<Yo&&zo.charCodeAt(zo.length-rr-1)==No.charCodeAt(No.length-rr-1);)++rr;if(Yt.length==1&&oi.length==1&&Ve==fe.line)for(;ei&&ei>fe.ch&&zo.charCodeAt(zo.length-rr-1)==No.charCodeAt(No.length-rr-1);)ei--,rr++;Yt[Yt.length-1]=zo.slice(0,zo.length-rr).replace(/^\u200b+/,""),Yt[0]=Yt[0].slice(ei).replace(/\u200b+$/,"");var Oa=tn(Ve,ei),Bo=tn(kt,oi.length?Lt(oi).length-rr:0);if(Yt.length>1||Yt[0]||hn(Oa,Bo))return Ju(ie.doc,Yt,Oa,Bo,"+input"),!0},Vs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Vs.prototype.reset=function(){this.forceCompositionEnd()},Vs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Vs.prototype.readFromDOMSoon=function(){var ie=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(ie.readDOMTimeout=null,ie.composing)if(ie.composing.done)ie.composing=null;else return;ie.updateFromDOM()},80))},Vs.prototype.updateFromDOM=function(){var ie=this;(this.cm.isReadOnly()||!this.pollContent())&&Sn(this.cm,function(){return wo(ie.cm)})},Vs.prototype.setUneditable=function(ie){ie.contentEditable="false"},Vs.prototype.onKeyPress=function(ie){ie.charCode==0||this.composing||(ie.preventDefault(),this.cm.isReadOnly()||ni(this.cm,Ph)(this.cm,String.fromCharCode(ie.charCode==null?ie.keyCode:ie.charCode),0))},Vs.prototype.readOnlyChanged=function(ie){this.div.contentEditable=String(ie!="nocursor")},Vs.prototype.onContextMenu=function(){},Vs.prototype.resetPosition=function(){},Vs.prototype.needsContentAttribute=!0;function wh(ie,ae){var ge=Ji(ie,ae.line);if(!ge||ge.hidden)return null;var fe=on(ie.doc,ae.line),xe=Ri(ge,fe,ae.line),Oe=$e(fe,ie.doc.direction),Ve="left";if(Oe){var ht=ye(Oe,ae.ch);Ve=ht%2?"right":"left"}var ut=Qt(xe.map,ae.ch,Ve);return ut.offset=ut.collapse=="right"?ut.end:ut.start,ut}function Fg(ie){for(var ae=ie;ae;ae=ae.parentNode)if(/CodeMirror-gutter-wrapper/.test(ae.className))return!0;return!1}function Yd(ie,ae){return ae&&(ie.bad=!0),ie}function Ch(ie,ae,ge,fe,xe){var Oe="",Ve=!1,ht=ie.doc.lineSeparator(),ut=!1;function kt(ei){return function(rr){return rr.id==ei}}function An(){Ve&&(Oe+=ht,ut&&(Oe+=ht),Ve=ut=!1)}function Yt(ei){ei&&(An(),Oe+=ei)}function oi(ei){if(ei.nodeType==1){var rr=ei.getAttribute("cm-text");if(rr){Yt(rr);return}var hr=ei.getAttribute("cm-marker"),Br;if(hr){var uo=ie.findMarks(tn(fe,0),tn(xe+1,0),kt(+hr));uo.length&&(Br=uo[0].find(0))&&Yt(fn(ie.doc,Br.from,Br.to).join(ht));return}if(ei.getAttribute("contenteditable")=="false")return;var zo=/^(pre|div|p|li|table|br)$/i.test(ei.nodeName);if(!/^br$/i.test(ei.nodeName)&&ei.textContent.length==0)return;zo&&An();for(var No=0;No<ei.childNodes.length;No++)oi(ei.childNodes[No]);/^(pre|p)$/i.test(ei.nodeName)&&(ut=!0),zo&&(Ve=!0)}else ei.nodeType==3&&Yt(ei.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;oi(ae),ae!=ge;)ae=ae.nextSibling,ut=!1;return Oe}function mf(ie,ae,ge){var fe;if(ae==ie.display.lineDiv){if(fe=ie.display.lineDiv.childNodes[ge],!fe)return Yd(ie.clipPos(tn(ie.display.viewTo-1)),!0);ae=null,ge=0}else for(fe=ae;;fe=fe.parentNode){if(!fe||fe==ie.display.lineDiv)return null;if(fe.parentNode&&fe.parentNode==ie.display.lineDiv)break}for(var xe=0;xe<ie.display.view.length;xe++){var Oe=ie.display.view[xe];if(Oe.node==fe)return ip(Oe,ae,ge)}}function ip(ie,ae,ge){var fe=ie.text.firstChild,xe=!1;if(!ae||!bt(fe,ae))return Yd(tn(Rt(ie.line),0),!0);if(ae==fe&&(xe=!0,ae=fe.childNodes[ge],ge=0,!ae)){var Oe=ie.rest?Lt(ie.rest):ie.line;return Yd(tn(Rt(Oe),Oe.text.length),xe)}var Ve=ae.nodeType==3?ae:null,ht=ae;for(!Ve&&ae.childNodes.length==1&&ae.firstChild.nodeType==3&&(Ve=ae.firstChild,ge&&(ge=Ve.nodeValue.length));ht.parentNode!=fe;)ht=ht.parentNode;var ut=ie.measure,kt=ut.maps;function An(Br,uo,zo){for(var No=-1;No<(kt?kt.length:0);No++)for(var Yo=No<0?ut.map:kt[No],Oa=0;Oa<Yo.length;Oa+=3){var Bo=Yo[Oa+2];if(Bo==Br||Bo==uo){var qa=Rt(No<0?ie.line:ie.rest[No]),dl=Yo[Oa]+zo;return(zo<0||Bo!=Br)&&(dl=Yo[Oa+(zo?1:0)]),tn(qa,dl)}}}var Yt=An(Ve,ht,ge);if(Yt)return Yd(Yt,xe);for(var oi=ht.nextSibling,ei=Ve?Ve.nodeValue.length-ge:0;oi;oi=oi.nextSibling){if(Yt=An(oi,oi.firstChild,0),Yt)return Yd(tn(Yt.line,Yt.ch-ei),xe);ei+=oi.textContent.length}for(var rr=ht.previousSibling,hr=ge;rr;rr=rr.previousSibling){if(Yt=An(rr,rr.firstChild,-1),Yt)return Yd(tn(Yt.line,Yt.ch+hr),xe);hr+=rr.textContent.length}}var nu=function(ie){this.cm=ie,this.prevInput="",this.pollingFast=!1,this.polling=new Ke,this.hasSelection=!1,this.composing=null};nu.prototype.init=function(ie){var ae=this,ge=this,fe=this.cm;this.createField(ie);var xe=this.textarea;ie.wrapper.insertBefore(this.wrapper,ie.wrapper.firstChild),Ie&&(xe.style.width="0px"),vt(xe,"input",function(){We&<>=9&&ae.hasSelection&&(ae.hasSelection=null),ge.poll()}),vt(xe,"paste",function(Ve){wn(fe,Ve)||Cg(Ve,fe)||(fe.state.pasteIncoming=+new Date,ge.fastPoll())});function Oe(Ve){if(!wn(fe,Ve)){if(fe.somethingSelected())Zh({lineWise:!1,text:fe.getSelections()});else if(fe.options.lineWiseCopyCut){var ht=Eg(fe);Zh({lineWise:!0,text:ht.text}),Ve.type=="cut"?fe.setSelections(ht.ranges,null,zt):(ge.prevInput="",xe.value=ht.text.join(`
|
|
|
`),Bt(xe))}else return;Ve.type=="cut"&&(fe.state.cutIncoming=+new Date)}}vt(xe,"cut",Oe),vt(xe,"copy",Oe),vt(ie.scroller,"paste",function(Ve){if(!(zs(ie,Ve)||wn(fe,Ve))){if(!xe.dispatchEvent){fe.state.pasteIncoming=+new Date,ge.focus();return}var ht=new Event("paste");ht.clipboardData=Ve.clipboardData,xe.dispatchEvent(ht)}}),vt(ie.lineSpace,"selectstart",function(Ve){zs(ie,Ve)||wi(Ve)}),vt(xe,"compositionstart",function(){var Ve=fe.getCursor("from");ge.composing&&ge.composing.range.clear(),ge.composing={start:Ve,range:fe.markText(Ve,fe.getCursor("to"),{className:"CodeMirror-composing"})}}),vt(xe,"compositionend",function(){ge.composing&&(ge.poll(),ge.composing.range.clear(),ge.composing=null)})},nu.prototype.createField=function(ie){this.wrapper=Lg(),this.textarea=this.wrapper.firstChild},nu.prototype.screenReaderLabelChanged=function(ie){ie?this.textarea.setAttribute("aria-label",ie):this.textarea.removeAttribute("aria-label")},nu.prototype.prepareSelection=function(){var ie=this.cm,ae=ie.display,ge=ie.doc,fe=yl(ie);if(ie.options.moveInputWithCursor){var xe=Tr(ie,ge.sel.primary().head,"div"),Oe=ae.wrapper.getBoundingClientRect(),Ve=ae.lineDiv.getBoundingClientRect();fe.teTop=Math.max(0,Math.min(ae.wrapper.clientHeight-10,xe.top+Ve.top-Oe.top)),fe.teLeft=Math.max(0,Math.min(ae.wrapper.clientWidth-10,xe.left+Ve.left-Oe.left))}return fe},nu.prototype.showSelection=function(ie){var ae=this.cm,ge=ae.display;Xe(ge.cursorDiv,ie.cursors),Xe(ge.selectionDiv,ie.selection),ie.teTop!=null&&(this.wrapper.style.top=ie.teTop+"px",this.wrapper.style.left=ie.teLeft+"px")},nu.prototype.reset=function(ie){if(!(this.contextMenuPending||this.composing)){var ae=this.cm;if(ae.somethingSelected()){this.prevInput="";var ge=ae.getSelection();this.textarea.value=ge,ae.state.focused&&Bt(this.textarea),We&<>=9&&(this.hasSelection=ge)}else ie||(this.prevInput=this.textarea.value="",We&<>=9&&(this.hasSelection=null))}},nu.prototype.getField=function(){return this.textarea},nu.prototype.supportsTouch=function(){return!1},nu.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||et()!=this.textarea))try{this.textarea.focus()}catch(ie){}},nu.prototype.blur=function(){this.textarea.blur()},nu.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},nu.prototype.receivedFocus=function(){this.slowPoll()},nu.prototype.slowPoll=function(){var ie=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){ie.poll(),ie.cm.state.focused&&ie.slowPoll()})},nu.prototype.fastPoll=function(){var ie=!1,ae=this;ae.pollingFast=!0;function ge(){var fe=ae.poll();!fe&&!ie?(ie=!0,ae.polling.set(60,ge)):(ae.pollingFast=!1,ae.slowPoll())}ae.polling.set(20,ge)},nu.prototype.poll=function(){var ie=this,ae=this.cm,ge=this.textarea,fe=this.prevInput;if(this.contextMenuPending||!ae.state.focused||Be(ge)&&!fe&&!this.composing||ae.isReadOnly()||ae.options.disableInput||ae.state.keySeq)return!1;var xe=ge.value;if(xe==fe&&!ae.somethingSelected())return!1;if(We&<>=9&&this.hasSelection===xe||de&&/[\uf700-\uf7ff]/.test(xe))return ae.display.input.reset(),!1;if(ae.doc.sel==ae.display.selForContextMenu){var Oe=xe.charCodeAt(0);if(Oe==8203&&!fe&&(fe="\u200B"),Oe==8666)return this.reset(),this.cm.execCommand("undo")}for(var Ve=0,ht=Math.min(fe.length,xe.length);Ve<ht&&fe.charCodeAt(Ve)==xe.charCodeAt(Ve);)++Ve;return Sn(ae,function(){Ph(ae,xe.slice(Ve),fe.length-Ve,null,ie.composing?"*compose":null),xe.length>1e3||xe.indexOf(`
|
|
|
`)>-1?ge.value=ie.prevInput="":ie.prevInput=xe,ie.composing&&(ie.composing.range.clear(),ie.composing.range=ae.markText(ie.composing.start,ae.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},nu.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},nu.prototype.onKeyPress=function(){We&<>=9&&(this.hasSelection=null),this.fastPoll()},nu.prototype.onContextMenu=function(ie){var ae=this,ge=ae.cm,fe=ge.display,xe=ae.textarea;ae.contextMenuPending&&ae.contextMenuPending();var Oe=Ca(ge,ie),Ve=fe.scroller.scrollTop;if(!Oe||Ye)return;var ht=ge.options.resetSelectionOnContextMenu;ht&&ge.doc.sel.contains(Oe)==-1&&ni(ge,Hs)(ge.doc,Wa(Oe),zt);var ut=xe.style.cssText,kt=ae.wrapper.style.cssText,An=ae.wrapper.offsetParent.getBoundingClientRect();ae.wrapper.style.cssText="position: static",xe.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(ie.clientY-An.top-5)+"px; left: "+(ie.clientX-An.left-5)+`px;
|
|
|
z-index: 1000; background: `+(We?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Yt;Me&&(Yt=window.scrollY),fe.input.focus(),Me&&window.scrollTo(null,Yt),fe.input.reset(),ge.somethingSelected()||(xe.value=ae.prevInput=" "),ae.contextMenuPending=ei,fe.selForContextMenu=ge.doc.sel,clearTimeout(fe.detectingSelectAll);function oi(){if(xe.selectionStart!=null){var hr=ge.somethingSelected(),Br="\u200B"+(hr?xe.value:"");xe.value="\u21DA",xe.value=Br,ae.prevInput=hr?"":"\u200B",xe.selectionStart=1,xe.selectionEnd=Br.length,fe.selForContextMenu=ge.doc.sel}}function ei(){if(ae.contextMenuPending==ei&&(ae.contextMenuPending=!1,ae.wrapper.style.cssText=kt,xe.style.cssText=ut,We&<<9&&fe.scrollbars.setScrollTop(fe.scroller.scrollTop=Ve),xe.selectionStart!=null)){(!We||We&<<9)&&oi();var hr=0,Br=function(){fe.selForContextMenu==ge.doc.sel&&xe.selectionStart==0&&xe.selectionEnd>0&&ae.prevInput=="\u200B"?ni(ge,Fs)(ge):hr++<10?fe.detectingSelectAll=setTimeout(Br,500):(fe.selForContextMenu=null,fe.input.reset())};fe.detectingSelectAll=setTimeout(Br,200)}}if(We&<>=9&&oi(),Ne){cr(ie);var rr=function(){bn(window,"mouseup",rr),setTimeout(ei,20)};vt(window,"mouseup",rr)}else setTimeout(ei,50)},nu.prototype.readOnlyChanged=function(ie){ie||this.reset(),this.textarea.disabled=ie=="nocursor",this.textarea.readOnly=!!ie},nu.prototype.setUneditable=function(){},nu.prototype.needsContentAttribute=!1;function rp(ie,ae){if(ae=ae?Nt(ae):{},ae.value=ie.value,!ae.tabindex&&ie.tabIndex&&(ae.tabindex=ie.tabIndex),!ae.placeholder&&ie.placeholder&&(ae.placeholder=ie.placeholder),ae.autofocus==null){var ge=et();ae.autofocus=ge==ie||ie.getAttribute("autofocus")!=null&&ge==document.body}function fe(){ie.value=ht.getValue()}var xe;if(ie.form&&(vt(ie.form,"submit",fe),!ae.leaveSubmitMethodAlone)){var Oe=ie.form;xe=Oe.submit;try{var Ve=Oe.submit=function(){fe(),Oe.submit=xe,Oe.submit(),Oe.submit=Ve}}catch(ut){}}ae.finishInit=function(ut){ut.save=fe,ut.getTextArea=function(){return ie},ut.toTextArea=function(){ut.toTextArea=isNaN,fe(),ie.parentNode.removeChild(ut.getWrapperElement()),ie.style.display="",ie.form&&(bn(ie.form,"submit",fe),!ae.leaveSubmitMethodAlone&&typeof ie.form.submit=="function"&&(ie.form.submit=xe))}},ie.style.display="none";var ht=Ns(function(ut){return ie.parentNode.insertBefore(ut,ie.nextSibling)},ae);return ht}function Xd(ie){ie.off=bn,ie.on=vt,ie.wheelEventPixels=qo,ie.Doc=Tl,ie.splitLines=wr,ie.countColumn=qe,ie.findColumn=Un,ie.isWordChar=Ot,ie.Pass=Mn,ie.signal=en,ie.Line=ca,ie.changeEnd=Ps,ie.scrollbarModel=Cu,ie.Pos=tn,ie.cmpPos=hn,ie.modes=Li,ie.mimeModes=Wi,ie.resolveMode=Ht,ie.getMode=Wt,ie.modeExtensions=Zt,ie.extendMode=yt,ie.copyState=un,ie.startState=At,ie.innerMode=vn,ie.commands=uu,ie.keyMap=Mu,ie.keyName=ph,ie.isModifierKey=Xc,ie.lookupKey=Zu,ie.normalizeKeyMap=_h,ie.StringStream=nt,ie.SharedTextMarker=Fc,ie.TextMarker=gn,ie.LineWidget=Ll,ie.e_preventDefault=wi,ie.e_stopPropagation=Hi,ie.e_stop=cr,ie.addClass=It,ie.contains=bt,ie.rmClass=je,ie.keyNames=Nc}tp(Ns),Ud(Ns);var hd="iter insert remove copy getEditor constructor".split(" ");for(var bh in Tl.prototype)Tl.prototype.hasOwnProperty(bh)&&Tt(hd,bh)<0&&(Ns.prototype[bh]=function(ie){return function(){return ie.apply(this.doc,arguments)}}(Tl.prototype[bh]));return Hn(Tl),Ns.inputStyles={textarea:nu,contenteditable:Vs},Ns.defineMode=function(ie){!Ns.defaults.mode&&ie!="null"&&(Ns.defaults.mode=ie),ji.apply(this,arguments)},Ns.defineMIME=Gn,Ns.defineMode("null",function(){return{token:function(ie){return ie.skipToEnd()}}}),Ns.defineMIME("text/plain","null"),Ns.defineExtension=function(ie,ae){Ns.prototype[ie]=ae},Ns.defineDocExtension=function(ie,ae){Tl.prototype[ie]=ae},Ns.fromTextArea=rp,Xd(Ns),Ns.version="5.58.2",Ns})},25419:function(zn,En,me){(function(ue){ue(me(89780),me(15525),me(98101))})(function(ue){"use strict";ue.defineMode("markdown",function(Re,Ze){var ot=ue.getMode(Re,"text/html"),We=ot.name=="null";function lt(qe){if(ue.findModeByName){var Ke=ue.findModeByName(qe);Ke&&(qe=Ke.mime||Ke.mimes[0])}var Tt=ue.getMode(Re,qe);return Tt.name=="null"?null:Tt}Ze.highlightFormatting===void 0&&(Ze.highlightFormatting=!1),Ze.maxBlockquoteDepth===void 0&&(Ze.maxBlockquoteDepth=0),Ze.taskLists===void 0&&(Ze.taskLists=!1),Ze.strikethrough===void 0&&(Ze.strikethrough=!1),Ze.emoji===void 0&&(Ze.emoji=!1),Ze.fencedCodeBlockHighlighting===void 0&&(Ze.fencedCodeBlockHighlighting=!0),Ze.fencedCodeBlockDefaultMode===void 0&&(Ze.fencedCodeBlockDefaultMode="text/plain"),Ze.xml===void 0&&(Ze.xml=!0),Ze.tokenTypeOverrides===void 0&&(Ze.tokenTypeOverrides={});var Me={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var Mt in Me)Me.hasOwnProperty(Mt)&&Ze.tokenTypeOverrides[Mt]&&(Me[Mt]=Ze.tokenTypeOverrides[Mt]);var Ct=/^([*\-_])(?:\s*\1){2,}\s*$/,Ye=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,st=/^\[(x| )\](?=\s)/i,pt=Ze.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,wt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ie=/^[^#!\[\]*_\\<>` "'(~:]+/,te=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ee=/^\s*\[[^\]]+?\]:.*$/,de=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,se=" ";function he(qe,Ke,Tt){return Ke.f=Ke.inline=Tt,Tt(qe,Ke)}function ve(qe,Ke,Tt){return Ke.f=Ke.block=Tt,Tt(qe,Ke)}function be(qe){return!qe||!/\S/.test(qe.string)}function Ne(qe){if(qe.linkTitle=!1,qe.linkHref=!1,qe.linkText=!1,qe.em=!1,qe.strong=!1,qe.strikethrough=!1,qe.quote=0,qe.indentedCode=!1,qe.f==je){var Ke=We;if(!Ke){var Tt=ue.innerMode(ot,qe.htmlState);Ke=Tt.mode.name=="xml"&&Tt.state.tagStart===null&&!Tt.state.context&&Tt.state.tokenize.isInText}Ke&&(qe.f=dt,qe.block=Fe,qe.htmlState=null)}return qe.trailingSpace=0,qe.trailingSpaceNewLine=!1,qe.prevLine=qe.thisLine,qe.thisLine={stream:null},null}function Fe(qe,Ke){var Tt=qe.column()===Ke.indentation,Ln=be(Ke.prevLine.stream),Mn=Ke.indentedCode,zt=Ke.prevLine.hr,rn=Ke.list!==!1,xn=(Ke.listStack[Ke.listStack.length-1]||0)+3;Ke.indentedCode=!1;var Un=Ke.indentation;if(Ke.indentationDiff===null&&(Ke.indentationDiff=Ke.indentation,rn)){for(Ke.list=null;Un<Ke.listStack[Ke.listStack.length-1];)Ke.listStack.pop(),Ke.listStack.length?Ke.indentation=Ke.listStack[Ke.listStack.length-1]:Ke.list=!1;Ke.list!==!1&&(Ke.indentationDiff=Un-Ke.listStack[Ke.listStack.length-1])}var yn=!Ln&&!zt&&!Ke.prevLine.header&&(!rn||!Mn)&&!Ke.prevLine.fencedCodeEnd,sn=(Ke.list===!1||zt||Ln)&&Ke.indentation<=xn&&qe.match(Ct),Lt=null;if(Ke.indentationDiff>=4&&(Mn||Ke.prevLine.fencedCodeEnd||Ke.prevLine.header||Ln))return qe.skipToEnd(),Ke.indentedCode=!0,Me.code;if(qe.eatSpace())return null;if(Tt&&Ke.indentation<=xn&&(Lt=qe.match(pt))&&Lt[1].length<=6)return Ke.quote=0,Ke.header=Lt[1].length,Ke.thisLine.header=!0,Ze.highlightFormatting&&(Ke.formatting="header"),Ke.f=Ke.inline,Xe(Ke);if(Ke.indentation<=xn&&qe.eat(">"))return Ke.quote=Tt?1:Ke.quote+1,Ze.highlightFormatting&&(Ke.formatting="quote"),qe.eatSpace(),Xe(Ke);if(!sn&&!Ke.setext&&Tt&&Ke.indentation<=xn&&(Lt=qe.match(Ye))){var ti=Lt[1]?"ol":"ul";return Ke.indentation=Un+qe.current().length,Ke.list=!0,Ke.quote=0,Ke.listStack.push(Ke.indentation),Ke.em=!1,Ke.strong=!1,Ke.code=!1,Ke.strikethrough=!1,Ze.taskLists&&qe.match(st,!1)&&(Ke.taskList=!0),Ke.f=Ke.inline,Ze.highlightFormatting&&(Ke.formatting=["list","list-"+ti]),Xe(Ke)}else{if(Tt&&Ke.indentation<=xn&&(Lt=qe.match(te,!0)))return Ke.quote=0,Ke.fencedEndRE=new RegExp(Lt[1]+"+ *$"),Ke.localMode=Ze.fencedCodeBlockHighlighting&<(Lt[2]||Ze.fencedCodeBlockDefaultMode),Ke.localMode&&(Ke.localState=ue.startState(Ke.localMode)),Ke.f=Ke.block=ze,Ze.highlightFormatting&&(Ke.formatting="code-block"),Ke.code=-1,Xe(Ke);if(Ke.setext||(!yn||!rn)&&!Ke.quote&&Ke.list===!1&&!Ke.code&&!sn&&!ee.test(qe.string)&&(Lt=qe.lookAhead(1))&&(Lt=Lt.match(wt)))return Ke.setext?(Ke.header=Ke.setext,Ke.setext=0,qe.skipToEnd(),Ze.highlightFormatting&&(Ke.formatting="header")):(Ke.header=Lt[0].charAt(0)=="="?1:2,Ke.setext=Ke.header),Ke.thisLine.header=!0,Ke.f=Ke.inline,Xe(Ke);if(sn)return qe.skipToEnd(),Ke.hr=!0,Ke.thisLine.hr=!0,Me.hr;if(qe.peek()==="[")return he(qe,Ke,xt)}return he(qe,Ke,Ke.inline)}function je(qe,Ke){var Tt=ot.token(qe,Ke.htmlState);if(!We){var Ln=ue.innerMode(ot,Ke.htmlState);(Ln.mode.name=="xml"&&Ln.state.tagStart===null&&!Ln.state.context&&Ln.state.tokenize.isInText||Ke.md_inside&&qe.current().indexOf(">")>-1)&&(Ke.f=dt,Ke.block=Fe,Ke.htmlState=null)}return Tt}function ze(qe,Ke){var Tt=Ke.listStack[Ke.listStack.length-1]||0,Ln=Ke.indentation<Tt,Mn=Tt+3;if(Ke.fencedEndRE&&Ke.indentation<=Mn&&(Ln||qe.match(Ke.fencedEndRE))){Ze.highlightFormatting&&(Ke.formatting="code-block");var zt;return Ln||(zt=Xe(Ke)),Ke.localMode=Ke.localState=null,Ke.block=Fe,Ke.f=dt,Ke.fencedEndRE=null,Ke.code=0,Ke.thisLine.fencedCodeEnd=!0,Ln?ve(qe,Ke,Ke.block):zt}else return Ke.localMode?Ke.localMode.token(qe,Ke.localState):(qe.skipToEnd(),Me.code)}function Xe(qe){var Ke=[];if(qe.formatting){Ke.push(Me.formatting),typeof qe.formatting=="string"&&(qe.formatting=[qe.formatting]);for(var Tt=0;Tt<qe.formatting.length;Tt++)Ke.push(Me.formatting+"-"+qe.formatting[Tt]),qe.formatting[Tt]==="header"&&Ke.push(Me.formatting+"-"+qe.formatting[Tt]+"-"+qe.header),qe.formatting[Tt]==="quote"&&(!Ze.maxBlockquoteDepth||Ze.maxBlockquoteDepth>=qe.quote?Ke.push(Me.formatting+"-"+qe.formatting[Tt]+"-"+qe.quote):Ke.push("error"))}if(qe.taskOpen)return Ke.push("meta"),Ke.length?Ke.join(" "):null;if(qe.taskClosed)return Ke.push("property"),Ke.length?Ke.join(" "):null;if(qe.linkHref?Ke.push(Me.linkHref,"url"):(qe.strong&&Ke.push(Me.strong),qe.em&&Ke.push(Me.em),qe.strikethrough&&Ke.push(Me.strikethrough),qe.emoji&&Ke.push(Me.emoji),qe.linkText&&Ke.push(Me.linkText),qe.code&&Ke.push(Me.code),qe.image&&Ke.push(Me.image),qe.imageAltText&&Ke.push(Me.imageAltText,"link"),qe.imageMarker&&Ke.push(Me.imageMarker)),qe.header&&Ke.push(Me.header,Me.header+"-"+qe.header),qe.quote&&(Ke.push(Me.quote),!Ze.maxBlockquoteDepth||Ze.maxBlockquoteDepth>=qe.quote?Ke.push(Me.quote+"-"+qe.quote):Ke.push(Me.quote+"-"+Ze.maxBlockquoteDepth)),qe.list!==!1){var Ln=(qe.listStack.length-1)%3;Ln?Ln===1?Ke.push(Me.list2):Ke.push(Me.list3):Ke.push(Me.list1)}return qe.trailingSpaceNewLine?Ke.push("trailing-space-new-line"):qe.trailingSpace&&Ke.push("trailing-space-"+(qe.trailingSpace%2?"a":"b")),Ke.length?Ke.join(" "):null}function Je(qe,Ke){if(qe.match(Ie,!0))return Xe(Ke)}function dt(qe,Ke){var Tt=Ke.text(qe,Ke);if(typeof Tt!="undefined")return Tt;if(Ke.list)return Ke.list=null,Xe(Ke);if(Ke.taskList){var Ln=qe.match(st,!0)[1]===" ";return Ln?Ke.taskOpen=!0:Ke.taskClosed=!0,Ze.highlightFormatting&&(Ke.formatting="task"),Ke.taskList=!1,Xe(Ke)}if(Ke.taskOpen=!1,Ke.taskClosed=!1,Ke.header&&qe.match(/^#+$/,!0))return Ze.highlightFormatting&&(Ke.formatting="header"),Xe(Ke);var Mn=qe.next();if(Ke.linkTitle){Ke.linkTitle=!1;var zt=Mn;Mn==="("&&(zt=")"),zt=(zt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var rn="^\\s*(?:[^"+zt+"\\\\]+|\\\\\\\\|\\\\.)"+zt;if(qe.match(new RegExp(rn),!0))return Me.linkHref}if(Mn==="`"){var xn=Ke.formatting;Ze.highlightFormatting&&(Ke.formatting="code"),qe.eatWhile("`");var Un=qe.current().length;if(Ke.code==0&&(!Ke.quote||Un==1))return Ke.code=Un,Xe(Ke);if(Un==Ke.code){var yn=Xe(Ke);return Ke.code=0,yn}else return Ke.formatting=xn,Xe(Ke)}else if(Ke.code)return Xe(Ke);if(Mn==="\\"&&(qe.next(),Ze.highlightFormatting)){var sn=Xe(Ke),Lt=Me.formatting+"-escape";return sn?sn+" "+Lt:Lt}if(Mn==="!"&&qe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ke.imageMarker=!0,Ke.image=!0,Ze.highlightFormatting&&(Ke.formatting="image"),Xe(Ke);if(Mn==="["&&Ke.imageMarker&&qe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ke.imageMarker=!1,Ke.imageAltText=!0,Ze.highlightFormatting&&(Ke.formatting="image"),Xe(Ke);if(Mn==="]"&&Ke.imageAltText){Ze.highlightFormatting&&(Ke.formatting="image");var sn=Xe(Ke);return Ke.imageAltText=!1,Ke.image=!1,Ke.inline=Ke.f=bt,sn}if(Mn==="["&&!Ke.image)return Ke.linkText&&qe.match(/^.*?\]/)||(Ke.linkText=!0,Ze.highlightFormatting&&(Ke.formatting="link")),Xe(Ke);if(Mn==="]"&&Ke.linkText){Ze.highlightFormatting&&(Ke.formatting="link");var sn=Xe(Ke);return Ke.linkText=!1,Ke.inline=Ke.f=qe.match(/\(.*?\)| ?\[.*?\]/,!1)?bt:dt,sn}if(Mn==="<"&&qe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ke.f=Ke.inline=He,Ze.highlightFormatting&&(Ke.formatting="link");var sn=Xe(Ke);return sn?sn+=" ":sn="",sn+Me.linkInline}if(Mn==="<"&&qe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ke.f=Ke.inline=He,Ze.highlightFormatting&&(Ke.formatting="link");var sn=Xe(Ke);return sn?sn+=" ":sn="",sn+Me.linkEmail}if(Ze.xml&&Mn==="<"&&qe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ti=qe.string.indexOf(">",qe.pos);if(ti!=-1){var gi=qe.string.substring(qe.start,ti);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(gi)&&(Ke.md_inside=!0)}return qe.backUp(1),Ke.htmlState=ue.startState(ot),ve(qe,Ke,je)}if(Ze.xml&&Mn==="<"&&qe.match(/^\/\w*?>/))return Ke.md_inside=!1,"tag";if(Mn==="*"||Mn==="_"){for(var Pn=1,Xt=qe.pos==1?" ":qe.string.charAt(qe.pos-2);Pn<3&&qe.eat(Mn);)Pn++;var Kt=qe.peek()||" ",Ot=!/\s/.test(Kt)&&(!de.test(Kt)||/\s/.test(Xt)||de.test(Xt)),rt=!/\s/.test(Xt)&&(!de.test(Xt)||/\s/.test(Kt)||de.test(Kt)),Ue=null,$t=null;if(Pn%2&&(!Ke.em&&Ot&&(Mn==="*"||!rt||de.test(Xt))?Ue=!0:Ke.em==Mn&&rt&&(Mn==="*"||!Ot||de.test(Kt))&&(Ue=!1)),Pn>1&&(!Ke.strong&&Ot&&(Mn==="*"||!rt||de.test(Xt))?$t=!0:Ke.strong==Mn&&rt&&(Mn==="*"||!Ot||de.test(Kt))&&($t=!1)),$t!=null||Ue!=null){Ze.highlightFormatting&&(Ke.formatting=Ue==null?"strong":$t==null?"em":"strong em"),Ue===!0&&(Ke.em=Mn),$t===!0&&(Ke.strong=Mn);var yn=Xe(Ke);return Ue===!1&&(Ke.em=!1),$t===!1&&(Ke.strong=!1),yn}}else if(Mn===" "&&(qe.eat("*")||qe.eat("_"))){if(qe.peek()===" ")return Xe(Ke);qe.backUp(1)}if(Ze.strikethrough){if(Mn==="~"&&qe.eatWhile(Mn)){if(Ke.strikethrough){Ze.highlightFormatting&&(Ke.formatting="strikethrough");var yn=Xe(Ke);return Ke.strikethrough=!1,yn}else if(qe.match(/^[^\s]/,!1))return Ke.strikethrough=!0,Ze.highlightFormatting&&(Ke.formatting="strikethrough"),Xe(Ke)}else if(Mn===" "&&qe.match(/^~~/,!0)){if(qe.peek()===" ")return Xe(Ke);qe.backUp(2)}}if(Ze.emoji&&Mn===":"&&qe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ke.emoji=!0,Ze.highlightFormatting&&(Ke.formatting="emoji");var Gt=Xe(Ke);return Ke.emoji=!1,Gt}return Mn===" "&&(qe.match(/^ +$/,!1)?Ke.trailingSpace++:Ke.trailingSpace&&(Ke.trailingSpaceNewLine=!0)),Xe(Ke)}function He(qe,Ke){var Tt=qe.next();if(Tt===">"){Ke.f=Ke.inline=dt,Ze.highlightFormatting&&(Ke.formatting="link");var Ln=Xe(Ke);return Ln?Ln+=" ":Ln="",Ln+Me.linkInline}return qe.match(/^[^>]+/,!0),Me.linkInline}function bt(qe,Ke){if(qe.eatSpace())return null;var Tt=qe.next();return Tt==="("||Tt==="["?(Ke.f=Ke.inline=It(Tt==="("?")":"]"),Ze.highlightFormatting&&(Ke.formatting="link-string"),Ke.linkHref=!0,Xe(Ke)):"error"}var et={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function It(qe){return function(Ke,Tt){var Ln=Ke.next();if(Ln===qe){Tt.f=Tt.inline=dt,Ze.highlightFormatting&&(Tt.formatting="link-string");var Mn=Xe(Tt);return Tt.linkHref=!1,Mn}return Ke.match(et[qe]),Tt.linkHref=!0,Xe(Tt)}}function xt(qe,Ke){return qe.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ke.f=Bt,qe.next(),Ze.highlightFormatting&&(Ke.formatting="link"),Ke.linkText=!0,Xe(Ke)):he(qe,Ke,dt)}function Bt(qe,Ke){if(qe.match(/^\]:/,!0)){Ke.f=Ke.inline=Ut,Ze.highlightFormatting&&(Ke.formatting="link");var Tt=Xe(Ke);return Ke.linkText=!1,Tt}return qe.match(/^([^\]\\]|\\.)+/,!0),Me.linkText}function Ut(qe,Ke){return qe.eatSpace()?null:(qe.match(/^[^\s]+/,!0),qe.peek()===void 0?Ke.linkTitle=!0:qe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ke.f=Ke.inline=dt,Me.linkHref+" url")}var Nt={startState:function(){return{f:Fe,prevLine:{stream:null},thisLine:{stream:null},block:Fe,htmlState:null,indentation:0,inline:dt,text:Je,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(qe){return{f:qe.f,prevLine:qe.prevLine,thisLine:qe.thisLine,block:qe.block,htmlState:qe.htmlState&&ue.copyState(ot,qe.htmlState),indentation:qe.indentation,localMode:qe.localMode,localState:qe.localMode?ue.copyState(qe.localMode,qe.localState):null,inline:qe.inline,text:qe.text,formatting:!1,linkText:qe.linkText,linkTitle:qe.linkTitle,linkHref:qe.linkHref,code:qe.code,em:qe.em,strong:qe.strong,strikethrough:qe.strikethrough,emoji:qe.emoji,header:qe.header,setext:qe.setext,hr:qe.hr,taskList:qe.taskList,list:qe.list,listStack:qe.listStack.slice(0),quote:qe.quote,indentedCode:qe.indentedCode,trailingSpace:qe.trailingSpace,trailingSpaceNewLine:qe.trailingSpaceNewLine,md_inside:qe.md_inside,fencedEndRE:qe.fencedEndRE}},token:function(qe,Ke){if(Ke.formatting=!1,qe!=Ke.thisLine.stream){if(Ke.header=0,Ke.hr=!1,qe.match(/^\s*$/,!0))return Ne(Ke),null;if(Ke.prevLine=Ke.thisLine,Ke.thisLine={stream:qe},Ke.taskList=!1,Ke.trailingSpace=0,Ke.trailingSpaceNewLine=!1,!Ke.localState&&(Ke.f=Ke.block,Ke.f!=je)){var Tt=qe.match(/^\s*/,!0)[0].replace(/\t/g,se).length;if(Ke.indentation=Tt,Ke.indentationDiff=null,Tt>0)return null}}return Ke.f(qe,Ke)},innerMode:function(qe){return qe.block==je?{state:qe.htmlState,mode:ot}:qe.localState?{state:qe.localState,mode:qe.localMode}:{state:qe,mode:Nt}},indent:function(qe,Ke,Tt){return qe.block==je&&ot.indent?ot.indent(qe.htmlState,Ke,Tt):qe.localState&&qe.localMode.indent?qe.localMode.indent(qe.localState,Ke,Tt):ue.Pass},blankLine:Ne,getType:Xe,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Nt},"xml"),ue.defineMIME("text/markdown","markdown"),ue.defineMIME("text/x-markdown","markdown")})},98101:function(zn,En,me){(function(ue){ue(me(89780))})(function(ue){"use strict";ue.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 Re=0;Re<ue.modeInfo.length;Re++){var Ze=ue.modeInfo[Re];Ze.mimes&&(Ze.mime=Ze.mimes[0])}ue.findModeByMIME=function(ot){ot=ot.toLowerCase();for(var We=0;We<ue.modeInfo.length;We++){var lt=ue.modeInfo[We];if(lt.mime==ot)return lt;if(lt.mimes){for(var Me=0;Me<lt.mimes.length;Me++)if(lt.mimes[Me]==ot)return lt}}if(/\+xml$/.test(ot))return ue.findModeByMIME("application/xml");if(/\+json$/.test(ot))return ue.findModeByMIME("application/json")},ue.findModeByExtension=function(ot){ot=ot.toLowerCase();for(var We=0;We<ue.modeInfo.length;We++){var lt=ue.modeInfo[We];if(lt.ext){for(var Me=0;Me<lt.ext.length;Me++)if(lt.ext[Me]==ot)return lt}}},ue.findModeByFileName=function(ot){for(var We=0;We<ue.modeInfo.length;We++){var lt=ue.modeInfo[We];if(lt.file&<.file.test(ot))return lt}var Me=ot.lastIndexOf("."),Mt=Me>-1&&ot.substring(Me+1,ot.length);if(Mt)return ue.findModeByExtension(Mt)},ue.findModeByName=function(ot){ot=ot.toLowerCase();for(var We=0;We<ue.modeInfo.length;We++){var lt=ue.modeInfo[We];if(lt.name.toLowerCase()==ot)return lt;if(lt.alias){for(var Me=0;Me<lt.alias.length;Me++)if(lt.alias[Me].toLowerCase()==ot)return lt}}}})},67549:function(zn,En,me){(function(ue){ue(me(89780))})(function(ue){"use strict";ue.defineMode("stex",function(Re,Ze){"use strict";function ot(Ie,te){Ie.cmdState.push(te)}function We(Ie){return Ie.cmdState.length>0?Ie.cmdState[Ie.cmdState.length-1]:null}function lt(Ie){var te=Ie.cmdState.pop();te&&te.closeBracket()}function Me(Ie){for(var te=Ie.cmdState,ee=te.length-1;ee>=0;ee--){var de=te[ee];if(de.name!="DEFAULT")return de}return{styleIdentifier:function(){return null}}}function Mt(Ie,te,ee){return function(){this.name=Ie,this.bracketNo=0,this.style=te,this.styles=ee,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Ct={};Ct.importmodule=Mt("importmodule","tag",["string","builtin"]),Ct.documentclass=Mt("documentclass","tag",["","atom"]),Ct.usepackage=Mt("usepackage","tag",["atom"]),Ct.begin=Mt("begin","tag",["atom"]),Ct.end=Mt("end","tag",["atom"]),Ct.label=Mt("label","tag",["atom"]),Ct.ref=Mt("ref","tag",["atom"]),Ct.eqref=Mt("eqref","tag",["atom"]),Ct.cite=Mt("cite","tag",["atom"]),Ct.bibitem=Mt("bibitem","tag",["atom"]),Ct.Bibitem=Mt("Bibitem","tag",["atom"]),Ct.RBibitem=Mt("RBibitem","tag",["atom"]),Ct.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Ye(Ie,te){Ie.f=te}function st(Ie,te){var ee;if(Ie.match(/^\\[a-zA-Z@]+/)){var de=Ie.current().slice(1);return ee=Ct.hasOwnProperty(de)?Ct[de]:Ct.DEFAULT,ee=new ee,ot(te,ee),Ye(te,wt),ee.style}if(Ie.match(/^\\[$&%#{}_]/)||Ie.match(/^\\[,;!\/\\]/))return"tag";if(Ie.match("\\["))return Ye(te,function(he,ve){return pt(he,ve,"\\]")}),"keyword";if(Ie.match("\\("))return Ye(te,function(he,ve){return pt(he,ve,"\\)")}),"keyword";if(Ie.match("$$"))return Ye(te,function(he,ve){return pt(he,ve,"$$")}),"keyword";if(Ie.match("$"))return Ye(te,function(he,ve){return pt(he,ve,"$")}),"keyword";var se=Ie.next();if(se=="%")return Ie.skipToEnd(),"comment";if(se=="}"||se=="]"){if(ee=We(te),ee)ee.closeBracket(se),Ye(te,wt);else return"error";return"bracket"}else return se=="{"||se=="["?(ee=Ct.DEFAULT,ee=new ee,ot(te,ee),"bracket"):/\d/.test(se)?(Ie.eatWhile(/[\w.%]/),"atom"):(Ie.eatWhile(/[\w\-_]/),ee=Me(te),ee.name=="begin"&&(ee.argument=Ie.current()),ee.styleIdentifier())}function pt(Ie,te,ee){if(Ie.eatSpace())return null;if(ee&&Ie.match(ee))return Ye(te,st),"keyword";if(Ie.match(/^\\[a-zA-Z@]+/))return"tag";if(Ie.match(/^[a-zA-Z]+/))return"variable-2";if(Ie.match(/^\\[$&%#{}_]/)||Ie.match(/^\\[,;!\/]/)||Ie.match(/^[\^_&]/))return"tag";if(Ie.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Ie.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var de=Ie.next();return de=="{"||de=="}"||de=="["||de=="]"||de=="("||de==")"?"bracket":de=="%"?(Ie.skipToEnd(),"comment"):"error"}function wt(Ie,te){var ee=Ie.peek(),de;return ee=="{"||ee=="["?(de=We(te),de.openBracket(ee),Ie.eat(ee),Ye(te,st),"bracket"):/[ \t\r]/.test(ee)?(Ie.eat(ee),null):(Ye(te,st),lt(te),st(Ie,te))}return{startState:function(){var Ie=Ze.inMathMode?function(te,ee){return pt(te,ee)}:st;return{cmdState:[],f:Ie}},copyState:function(Ie){return{cmdState:Ie.cmdState.slice(),f:Ie.f}},token:function(Ie,te){return te.f(Ie,te)},blankLine:function(Ie){Ie.f=st,Ie.cmdState.length=0},lineComment:"%"}}),ue.defineMIME("text/x-stex","stex"),ue.defineMIME("text/x-latex","stex")})},15525:function(zn,En,me){(function(ue){ue(me(89780))})(function(ue){"use strict";var Re={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},Ze={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ue.defineMode("xml",function(ot,We){var lt=ot.indentUnit,Me={},Mt=We.htmlMode?Re:Ze;for(var Ct in Mt)Me[Ct]=Mt[Ct];for(var Ct in We)Me[Ct]=We[Ct];var Ye,st;function pt(He,bt){function et(Bt){return bt.tokenize=Bt,Bt(He,bt)}var It=He.next();if(It=="<")return He.eat("!")?He.eat("[")?He.match("CDATA[")?et(te("atom","]]>")):null:He.match("--")?et(te("comment","-->")):He.match("DOCTYPE",!0,!0)?(He.eatWhile(/[\w\._\-]/),et(ee(1))):null:He.eat("?")?(He.eatWhile(/[\w\._\-]/),bt.tokenize=te("meta","?>"),"meta"):(Ye=He.eat("/")?"closeTag":"openTag",bt.tokenize=wt,"tag bracket");if(It=="&"){var xt;return He.eat("#")?He.eat("x")?xt=He.eatWhile(/[a-fA-F\d]/)&&He.eat(";"):xt=He.eatWhile(/[\d]/)&&He.eat(";"):xt=He.eatWhile(/[\w\.\-:]/)&&He.eat(";"),xt?"atom":"error"}else return He.eatWhile(/[^&<]/),null}pt.isInText=!0;function wt(He,bt){var et=He.next();if(et==">"||et=="/"&&He.eat(">"))return bt.tokenize=pt,Ye=et==">"?"endTag":"selfcloseTag","tag bracket";if(et=="=")return Ye="equals",null;if(et=="<"){bt.tokenize=pt,bt.state=ve,bt.tagName=bt.tagStart=null;var It=bt.tokenize(He,bt);return It?It+" tag error":"tag error"}else return/[\'\"]/.test(et)?(bt.tokenize=Ie(et),bt.stringStartCol=He.column(),bt.tokenize(He,bt)):(He.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ie(He){var bt=function(et,It){for(;!et.eol();)if(et.next()==He){It.tokenize=wt;break}return"string"};return bt.isInAttribute=!0,bt}function te(He,bt){return function(et,It){for(;!et.eol();){if(et.match(bt)){It.tokenize=pt;break}et.next()}return He}}function ee(He){return function(bt,et){for(var It;(It=bt.next())!=null;){if(It=="<")return et.tokenize=ee(He+1),et.tokenize(bt,et);if(It==">")if(He==1){et.tokenize=pt;break}else return et.tokenize=ee(He-1),et.tokenize(bt,et)}return"meta"}}function de(He,bt,et){this.prev=He.context,this.tagName=bt,this.indent=He.indented,this.startOfLine=et,(Me.doNotIndent.hasOwnProperty(bt)||He.context&&He.context.noIndent)&&(this.noIndent=!0)}function se(He){He.context&&(He.context=He.context.prev)}function he(He,bt){for(var et;;){if(!He.context||(et=He.context.tagName,!Me.contextGrabbers.hasOwnProperty(et)||!Me.contextGrabbers[et].hasOwnProperty(bt)))return;se(He)}}function ve(He,bt,et){return He=="openTag"?(et.tagStart=bt.column(),be):He=="closeTag"?Ne:ve}function be(He,bt,et){return He=="word"?(et.tagName=bt.current(),st="tag",ze):Me.allowMissingTagName&&He=="endTag"?(st="tag bracket",ze(He,bt,et)):(st="error",be)}function Ne(He,bt,et){if(He=="word"){var It=bt.current();return et.context&&et.context.tagName!=It&&Me.implicitlyClosed.hasOwnProperty(et.context.tagName)&&se(et),et.context&&et.context.tagName==It||Me.matchClosing===!1?(st="tag",Fe):(st="tag error",je)}else return Me.allowMissingTagName&&He=="endTag"?(st="tag bracket",Fe(He,bt,et)):(st="error",je)}function Fe(He,bt,et){return He!="endTag"?(st="error",Fe):(se(et),ve)}function je(He,bt,et){return st="error",Fe(He,bt,et)}function ze(He,bt,et){if(He=="word")return st="attribute",Xe;if(He=="endTag"||He=="selfcloseTag"){var It=et.tagName,xt=et.tagStart;return et.tagName=et.tagStart=null,He=="selfcloseTag"||Me.autoSelfClosers.hasOwnProperty(It)?he(et,It):(he(et,It),et.context=new de(et,It,xt==et.indented)),ve}return st="error",ze}function Xe(He,bt,et){return He=="equals"?Je:(Me.allowMissing||(st="error"),ze(He,bt,et))}function Je(He,bt,et){return He=="string"?dt:He=="word"&&Me.allowUnquoted?(st="string",ze):(st="error",ze(He,bt,et))}function dt(He,bt,et){return He=="string"?dt:ze(He,bt,et)}return{startState:function(He){var bt={tokenize:pt,state:ve,indented:He||0,tagName:null,tagStart:null,context:null};return He!=null&&(bt.baseIndent=He),bt},token:function(He,bt){if(!bt.tagName&&He.sol()&&(bt.indented=He.indentation()),He.eatSpace())return null;Ye=null;var et=bt.tokenize(He,bt);return(et||Ye)&&et!="comment"&&(st=null,bt.state=bt.state(Ye||et,He,bt),st&&(et=st=="error"?et+" error":st)),et},indent:function(He,bt,et){var It=He.context;if(He.tokenize.isInAttribute)return He.tagStart==He.indented?He.stringStartCol+1:He.indented+lt;if(It&&It.noIndent)return ue.Pass;if(He.tokenize!=wt&&He.tokenize!=pt)return et?et.match(/^(\s*)/)[0].length:0;if(He.tagName)return Me.multilineTagIndentPastTag!==!1?He.tagStart+He.tagName.length+2:He.tagStart+lt*(Me.multilineTagIndentFactor||1);if(Me.alignCDATA&&/<!\[CDATA\[/.test(bt))return 0;var xt=bt&&/^<(\/)?([\w_:\.-]*)/.exec(bt);if(xt&&xt[1])for(;It;)if(It.tagName==xt[2]){It=It.prev;break}else if(Me.implicitlyClosed.hasOwnProperty(It.tagName))It=It.prev;else break;else if(xt)for(;It;){var Bt=Me.contextGrabbers[It.tagName];if(Bt&&Bt.hasOwnProperty(xt[2]))It=It.prev;else break}for(;It&&It.prev&&!It.startOfLine;)It=It.prev;return It?It.indent+lt:He.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Me.htmlMode?"html":"xml",helperType:Me.htmlMode?"html":"xml",skipAttribute:function(He){He.state==Je&&(He.state=ze)},xmlCurrentTag:function(He){return He.tagName?{name:He.tagName,close:He.type=="closeTag"}:null},xmlCurrentContext:function(He){for(var bt=[],et=He.context;et;et=et.prev)et.tagName&&bt.push(et.tagName);return bt.reverse()}}}),ue.defineMIME("text/xml","xml"),ue.defineMIME("application/xml","xml"),ue.mimeModes.hasOwnProperty("text/html")||ue.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(zn,En,me){"use strict";me.d(En,{$u:function(){return Ct},BD:function(){return Pn},E9:function(){return Mt},FF:function(){return fi},FJ:function(){return ve},Hn:function(){return he},KX:function(){return Ne},NB:function(){return Te},S0:function(){return Lt},UL:function(){return Ye},Vk:function(){return se},Vm:function(){return ye},YI:function(){return ti},ZA:function(){return Ze},Zt:function(){return st},al:function(){return Ue},bn:function(){return rt},bx:function(){return Xt},g2:function(){return gi},h1:function(){return Je},hD:function(){return Hn},l4:function(){return lt},rU:function(){return Pe},s_:function(){return Kt},uz:function(){return at},z6:function(){return pt}}),zn=me.hmd(zn),function(){var Be;function Xr(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Hr(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Xr(a)}}function jn(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Li=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Wi;if(typeof Object.setPrototypeOf=="function")Wi=Object.setPrototypeOf;else{var ji;e:{var Gn={a:!0},Ht={};try{Ht.__proto__=Gn,ji=Ht.a;break e}catch(a){}ji=!1}Wi=ji?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Wt=Wi;function Zt(a,y){if(a.prototype=Li(y.prototype),a.prototype.constructor=a,Wt)Wt(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 yt=typeof me.g!="undefined"&&me.g!=null?me.g:self,un=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},vn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function At(a,y){if(y){var x=yt;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&&vn(x,a,{writable:!0,value:y})}}At("Object.assign",function(a){return a||un}),At("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 nt=typeof globalThis=="object"&&globalThis||typeof me.g=="object"&&me.g.global===me.g&&me.g||typeof self=="object"&&self.self===self&&self||{};nt.requestAnimationFrame===void 0&&(nt.setImmediate===void 0?nt.requestAnimationFrame=function(a){nt.setTimeout(a,0)}:nt.requestAnimationFrame=nt.setImmediate);function on(){}function fn(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&nt.clearTimeout(x),x=Jn(function(){x=-1,a.apply(b,E)},y)}}function Jn(a,y){return nt.setTimeout(a,y)}function pn(a){return nt.document.createElement(a)}function Rt(a){throw Error(a)}function In(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Rt(a)}function Vn(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),Rt(x+" is not in the range "+y+": "+a)}function Pi(a){nt.console&&nt.console.log(a)}function tn(a){return typeof a=="object"&&a!==null}function hn(a){return Array.isArray(a)||nt.NodeList&&a instanceof nt.NodeList||nt.HTMLCollection&&a instanceof nt.HTMLCollection}function Rn(a){return Array.prototype.slice.call(a)}function Oi(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Rt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function Ii(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Rt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Si(){var a=Er.pop();return a===void 0?[]:a}function Ni(a){a.length=0,Er.push(a)}function Zi(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(tn(a)&&a.constructor)return Zi(a.constructor);return typeof a}function sr(a){var y=a;return tn(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 Wr(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 li(a,y,x){Object.defineProperty(Ua.prototype,a,{get:y,set:x})}function Vi(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 z="",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,z+=String.fromCharCode(a.charCodeAt(ne)^y[(y[x]+y[b])%256]);return z.indexOf("GoJS 2.1 evaluation")>-1||z.indexOf("\xA9 1998-2021 Northwoods Software")>-1||z.indexOf("Not for distribution or production use")>-1||z.indexOf("gojs.net")>-1?"":z}var vo=nt.navigator!==void 0&&0<nt.navigator.userAgent.indexOf("Trident/7"),Qr=nt.navigator!==void 0&&nt.navigator.platform!==void 0&&nt.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Er=[];Object.freeze([]),on.className="Util",on.Dx="32ab5ff3b26f42dc0ed90f21472913b5",on.adym="gojs.net",on.vfo="28e645fdb266",on.className="Util";function qt(a,y,x){Io(this),this.j=a,this.xa=y,this.o=x}qt.prototype.toString=function(){return"EnumValue."+this.xa};function pi(a,y){return y==null||y===""?null:a[y]}yt.Object.defineProperties(qt.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),qt.className="EnumValue";function pr(){this.ew=[]}pr.prototype.toString=function(){return this.ew.join("")},pr.prototype.add=function(a){a!==""&&this.ew.push(a)},pr.className="StringBuilder";function qi(){}qi.className="PropertyCollection";var $r={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){nt.console&&nt.console.log(a)},HA:function(a,y,x,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 z=Object.getOwnPropertyDescriptor(b.prototype,y.Zl[E.Tj]);z.get!==void 0&&z.set===void 0&&Object.defineProperty(b.prototype,y.Zl[E.Tj],{set:function(ne,re){return function(){throw Error("Property "+ne.Zl[re.Tj]+" of "+ne.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Ar(){}Ar.prototype.reset=function(){},Ar.prototype.next=function(){return!1},Ar.prototype.Ad=function(){return!1},Ar.prototype.first=function(){return null},Ar.prototype.any=function(){return!1},Ar.prototype.all=function(){return!0},Ar.prototype.each=function(){return this},Ar.prototype.map=function(){return this},Ar.prototype.filter=function(){return this},Ar.prototype.de=function(){},Ar.prototype.toString=function(){return"EmptyIterator"},yt.Object.defineProperties(Ar.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Ar.prototype.first=Ar.prototype.first,Ar.prototype.hasNext=Ar.prototype.Ad,Ar.prototype.next=Ar.prototype.next,Ar.prototype.reset=Ar.prototype.reset;var io=null;Ar.className="EmptyIterator",io=new Ar;function Kr(a){this.key=-1,this.value=a}Kr.prototype.reset=function(){this.key=-1},Kr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Kr.prototype.Ad=function(){return this.next()},Kr.prototype.first=function(){return this.key=0,this.value},Kr.prototype.any=function(a){return this.key=-1,a(this.value)},Kr.prototype.all=function(a){return this.key=-1,a(this.value)},Kr.prototype.each=function(a){return this.key=-1,a(this.value),this},Kr.prototype.map=function(a){return new Kr(a(this.value))},Kr.prototype.filter=function(a){return a(this.value)?new Kr(this.value):io},Kr.prototype.de=function(){this.value=null},Kr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},yt.Object.defineProperties(Kr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Kr.prototype.first=Kr.prototype.first,Kr.prototype.hasNext=Kr.prototype.Ad,Kr.prototype.next=Kr.prototype.next,Kr.prototype.reset=Kr.prototype.reset,Kr.className="SingletonIterator";function jr(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}jr.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},jr.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},jr.prototype.Ad=function(){return this.next()},jr.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},jr.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 z=y[E];if((b===null||b(z))&&a(z))return!0}return!1},jr.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 z=y[E];if((b===null||b(z))&&!a(z))return!1}return!0},jr.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 z=y[E];(b===null||b(z))&&a(z)}return this},jr.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,z=0;z<b;z++){var ne=y[z];(E===null||E(ne))&&x.push(a(ne))}return a=new $n,a.s=x,a.xb(),a.iterator},jr.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,z=0;z<b;z++){var ne=y[z];(E===null||E(ne))&&a(ne)&&x.push(ne)}return a=new $n,a.s=x,a.xb(),a.iterator},jr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},jr.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},yt.Object.defineProperties(jr.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}}}),jr.prototype.first=jr.prototype.first,jr.prototype.hasNext=jr.prototype.Ad,jr.prototype.next=jr.prototype.next,jr.prototype.reset=jr.prototype.reset,jr.className="ListIterator";function yo(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}yo.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},yo.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)},yo.prototype.Ad=function(){return this.next()},yo.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},yo.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},yo.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},yo.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},yo.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 $n,a.s=x,a.xb(),a.iterator},yo.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 $n,a.s=x,a.xb(),a.iterator},yo.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},yo.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},yt.Object.defineProperties(yo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),yo.prototype.first=yo.prototype.first,yo.prototype.hasNext=yo.prototype.Ad,yo.prototype.next=yo.prototype.next,yo.prototype.reset=yo.prototype.reset,yo.className="ListIteratorBackwards";function $n(a){Io(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Rt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Be=$n.prototype,Be.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return this._isFrozen=!1,this},Be.toString=function(){return"List()#"+Yi(this)},Be.add=function(a){return a===null?this:(this._isFrozen&&In(this,a),this.s.push(a),this.xb(),this)},Be.push=function(a){this.add(a)},Be.addAll=function(a){if(a===null)return this;this._isFrozen&&In(this);var y=this.s;if(hn(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},Be.clear=function(){this._isFrozen&&In(this),this.s.length=0,this.xb()},Be.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Be.has=function(a){return this.contains(a)},Be.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Be.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Vn(a,"0 <= i < length",$n,"elt:i"),y[a]},Be.get=function(a){return this.M(a)},Be.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Vn(a,"0 <= i < length",$n,"setElt:i"),this._isFrozen&&In(this,a),x[a]=y},Be.set=function(a,y){this.cd(a,y)},Be.first=function(){var a=this.s;return a.length===0?null:a[0]},Be.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Be.pop=function(){this._isFrozen&&In(this);var a=this.s;return 0<a.length?a.pop():null},$n.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},$n.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},$n.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},$n.prototype.map=function(a){for(var y=new $n,x=[],b=this.s,E=b.length,z=0;z<E;z++)x.push(a(b[z]));return y.s=x,y.xb(),y},$n.prototype.filter=function(a){for(var y=new $n,x=[],b=this.s,E=b.length,z=0;z<E;z++){var ne=b[z];a(ne)&&x.push(ne)}return y.s=x,y.xb(),y},Be=$n.prototype,Be.Gb=function(a,y){0>a&&Vn(a,">= 0",$n,"insertAt:i"),this._isFrozen&&In(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Be.remove=function(a){if(a===null)return!1;this._isFrozen&&In(this,a);var y=this.s;return a=y.indexOf(a),a===-1?!1:(a===y.length-1?y.pop():y.splice(a,1),this.xb(),!0)},Be.delete=function(a){return this.remove(a)},Be.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Vn(a,"0 <= i < length",$n,"removeAt:i"),this._isFrozen&&In(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Be.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&&In(this);for(var E=a,z=y+1;z<b;)x[E++]=x[z++];return x.length=b-(y-a+1),this.xb(),this},$n.prototype.copy=function(){var a=new $n,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Be=$n.prototype,Be.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},Be.Iv=function(){for(var a=new Kn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},Be.sort=function(a){return this._isFrozen&&In(this),this.s.sort(a),this.xb(),this},Be.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&In(this);var z=x-y;if(1>=z)return this;if((0>y||y>=E-1)&&Vn(y,"0 <= from < length",$n,"sortRange:from"),z===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},Be.reverse=function(){return this._isFrozen&&In(this),this.s.reverse(),this.xb(),this},yt.Object.defineProperties($n.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 io;var a=this.Sa;return a!==null?(a.reset(),a):new jr(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return io;var a=this.Hg;return a!==null?(a.reset(),a):new yo(this)}}}),$n.prototype.reverse=$n.prototype.reverse,$n.prototype.sortRange=$n.prototype.zi,$n.prototype.sort=$n.prototype.sort,$n.prototype.toSet=$n.prototype.Iv,$n.prototype.toArray=$n.prototype.Fa,$n.prototype.removeRange=$n.prototype.removeRange,$n.prototype.removeAt=$n.prototype.mb,$n.prototype.delete=$n.prototype.delete,$n.prototype.remove=$n.prototype.remove,$n.prototype.insertAt=$n.prototype.Gb,$n.prototype.pop=$n.prototype.pop,$n.prototype.last=$n.prototype.jc,$n.prototype.first=$n.prototype.first,$n.prototype.set=$n.prototype.set,$n.prototype.setElt=$n.prototype.cd,$n.prototype.get=$n.prototype.get,$n.prototype.elt=$n.prototype.M,$n.prototype.indexOf=$n.prototype.indexOf,$n.prototype.has=$n.prototype.has,$n.prototype.contains=$n.prototype.contains,$n.prototype.clear=$n.prototype.clear,$n.prototype.addAll=$n.prototype.addAll,$n.prototype.push=$n.prototype.push,$n.prototype.add=$n.prototype.add,$n.prototype.thaw=$n.prototype.ka,$n.prototype.freeze=$n.prototype.freeze,$n.className="List";function Xo(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Xo.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Xo.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)},Xo.prototype.Ad=function(){return this.next()},Xo.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},Xo.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},Xo.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},Xo.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},Xo.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new $n;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Xo.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new $n;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Xo.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Xo.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},yt.Object.defineProperties(Xo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Xo.prototype.first=Xo.prototype.first,Xo.prototype.hasNext=Xo.prototype.Ad,Xo.prototype.next=Xo.prototype.next,Xo.prototype.reset=Xo.prototype.reset,Xo.className="SetIterator";function Kn(a){Io(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Rt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Be=Kn.prototype,Be.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return this._isFrozen=!1,this},Be.toString=function(){return"Set()#"+Yi(this)},Be.add=function(a){if(a===null)return this;this._isFrozen&&In(this,a);var y=a;return tn(a)&&(y=Jo(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Do(a,a),this.Tb[y]=a,y=this.kf,y===null?this.ea=a:(a.ll=y,y.va=a),this.kf=a,this.xb()),this},Be.addAll=function(a){if(a===null)return this;if(this._isFrozen&&In(this),hn(a))for(var y=a.length,x=0;x<y;x++)this.add(a[x]);else for(a=a.iterator;a.next();)this.add(a.value);return this},Be.contains=function(a){if(a===null)return!1;var y=a;return tn(a)&&(y=Yi(a),y===void 0)?!1:this.Tb[y]!==void 0},Be.has=function(a){return this.contains(a)},Be.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Be.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Be.first=function(){var a=this.ea;return a===null?null:a.value},Kn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Kn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Kn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Kn.prototype.map=function(a){for(var y=new Kn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Kn.prototype.filter=function(a){for(var y=new Kn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},Be=Kn.prototype,Be.remove=function(a){if(a===null)return!1;this._isFrozen&&In(this,a);var y=a;if(tn(a)&&(y=Yi(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},Be.delete=function(a){return this.remove(a)},Be.hp=function(a){if(a===null)return this;if(this._isFrozen&&In(this),hn(a))for(var y=a.length,x=0;x<y;x++)this.remove(a[x]);else for(a=a.iterator;a.next();)this.remove(a.value);return this},Be.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&In(this);var y=new Kn;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},Be.clear=function(){this._isFrozen&&In(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Kn.prototype.copy=function(){var a=new Kn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Kn.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},Kn.prototype.Hv=function(){var a=new $n,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Io(a){a.__gohashid=ua++}function Jo(a){var y=a.__gohashid;return y===void 0&&(y=ua++,a.__gohashid=y),y}function Yi(a){return a.__gohashid}yt.Object.defineProperties(Kn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return io;var a=this.Sa;return a!==null?(a.reset(),a):new Xo(this)}}}),Kn.prototype.toList=Kn.prototype.Hv,Kn.prototype.toArray=Kn.prototype.Fa,Kn.prototype.clear=Kn.prototype.clear,Kn.prototype.retainAll=Kn.prototype.pA,Kn.prototype.removeAll=Kn.prototype.hp,Kn.prototype.delete=Kn.prototype.delete,Kn.prototype.remove=Kn.prototype.remove,Kn.prototype.first=Kn.prototype.first,Kn.prototype.containsAny=Kn.prototype.Ty,Kn.prototype.containsAll=Kn.prototype.Sy,Kn.prototype.has=Kn.prototype.has,Kn.prototype.contains=Kn.prototype.contains,Kn.prototype.addAll=Kn.prototype.addAll,Kn.prototype.add=Kn.prototype.add,Kn.prototype.thaw=Kn.prototype.ka,Kn.prototype.freeze=Kn.prototype.freeze;var ua=1;Kn.className="Set",Kn.uniqueHash=Io,Kn.hashIdUnique=Jo,Kn.hashId=Yi;function Zo(a){this.ma=a,this.qa=a.Ja,this.sa=null}Zo.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Zo.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)},Zo.prototype.Ad=function(){return this.next()},Zo.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},Zo.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},Zo.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},Zo.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},Zo.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new $n;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},Zo.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new $n;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},Zo.prototype.de=function(){this.value=this.key=null,this.qa=-1},Zo.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},yt.Object.defineProperties(Zo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Zo.prototype.first=Zo.prototype.first,Zo.prototype.hasNext=Zo.prototype.Ad,Zo.prototype.next=Zo.prototype.next,Zo.prototype.reset=Zo.prototype.reset,Zo.className="MapKeySetIterator";function Dr(a){Kn.call(this),Io(this),this._isFrozen=!0,this.ma=a}Zt(Dr,Kn),Be=Dr.prototype,Be.freeze=function(){return this},Be.ka=function(){return this},Be.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Be.add=function(){Rt("This Set is read-only: "+this.toString())},Be.contains=function(a){return this.ma.contains(a)},Be.has=function(a){return this.contains(a)},Be.remove=function(){Rt("This Set is read-only: "+this.toString())},Be.delete=function(a){return this.remove(a)},Be.clear=function(){Rt("This Set is read-only: "+this.toString())},Be.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Dr.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Dr.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Dr.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Dr.prototype.map=function(a){for(var y=new Kn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Dr.prototype.filter=function(a){for(var y=new Kn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},Dr.prototype.copy=function(){return new Dr(this.ma)},Dr.prototype.Iv=function(){var a=new Kn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Dr.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},Dr.prototype.Hv=function(){var a=new $n,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},yt.Object.defineProperties(Dr.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?io:new Zo(this.ma)}}}),Dr.prototype.toList=Dr.prototype.Hv,Dr.prototype.toArray=Dr.prototype.Fa,Dr.prototype.toSet=Dr.prototype.Iv,Dr.prototype.first=Dr.prototype.first,Dr.prototype.clear=Dr.prototype.clear,Dr.prototype.delete=Dr.prototype.delete,Dr.prototype.remove=Dr.prototype.remove,Dr.prototype.has=Dr.prototype.has,Dr.prototype.contains=Dr.prototype.contains,Dr.prototype.add=Dr.prototype.add,Dr.prototype.thaw=Dr.prototype.ka,Dr.prototype.freeze=Dr.prototype.freeze,Dr.className="MapKeySet";function Ir(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Ir.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Ir.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)},Ir.prototype.Ad=function(){return this.next()},Ir.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},Ir.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},Ir.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},Ir.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},Ir.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new $n;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Ir.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new $n;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Ir.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Ir.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},yt.Object.defineProperties(Ir.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Ir.prototype.first=Ir.prototype.first,Ir.prototype.hasNext=Ir.prototype.Ad,Ir.prototype.next=Ir.prototype.next,Ir.prototype.reset=Ir.prototype.reset,Ir.className="MapValueSetIterator";function Do(a,y){this.key=a,this.value=y,this.ll=this.va=null}Do.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Do.className="KeyValuePair";function _o(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}_o.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},_o.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)},_o.prototype.Ad=function(){return this.next()},_o.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},_o.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},_o.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},_o.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},_o.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new $n;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},_o.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new $n;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},_o.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},_o.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},yt.Object.defineProperties(_o.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),_o.prototype.first=_o.prototype.first,_o.prototype.hasNext=_o.prototype.Ad,_o.prototype.next=_o.prototype.next,_o.prototype.reset=_o.prototype.reset,_o.className="MapIterator";function Ti(a){Io(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"&&Rt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Be=Ti.prototype,Be.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return this._isFrozen=!1,this},Be.toString=function(){return"Map()#"+Yi(this)},Be.add=function(a,y){this._isFrozen&&In(this,a);var x=a;tn(a)&&(x=Jo(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new Do(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},Be.set=function(a,y){return this.add(a,y)},Be.addAll=function(a){if(a===null)return this;if(hn(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 Ti)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)y=a.value,this.add(y.key,y.value);return this},Be.first=function(){return this.ea},Ti.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Ti.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Ti.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Ti.prototype.map=function(a){for(var y=new Ti,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Ti.prototype.filter=function(a){for(var y=new Ti,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Be=Ti.prototype,Be.contains=function(a){var y=a;return tn(a)&&(y=Yi(a),y===void 0)?!1:this.Tb[y]!==void 0},Be.has=function(a){return this.contains(a)},Be.I=function(a){var y=a;return tn(a)&&(y=Yi(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Be.get=function(a){return this.I(a)},Be.remove=function(a){if(a===null)return!1;this._isFrozen&&In(this,a);var y=a;if(tn(a)&&(y=Yi(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},Be.delete=function(a){return this.remove(a)},Be.clear=function(){this._isFrozen&&In(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()},Ti.prototype.copy=function(){var a=new Ti,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},Ti.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 Do(E.key,E.value),x++}return y},Ti.prototype.Lf=function(){return new Dr(this)},yt.Object.defineProperties(Ti.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return io;var a=this.Sa;return a!==null?(a.reset(),a):new _o(this)}},iteratorKeys:{get:function(){return 0>=this.count?io:new Zo(this)}},iteratorValues:{get:function(){if(0>=this.count)return io;var a=this.jf;return a!==null?(a.reset(),a):new Ir(this)}}}),Ti.prototype.toKeySet=Ti.prototype.Lf,Ti.prototype.toArray=Ti.prototype.Fa,Ti.prototype.clear=Ti.prototype.clear,Ti.prototype.delete=Ti.prototype.delete,Ti.prototype.remove=Ti.prototype.remove,Ti.prototype.get=Ti.prototype.get,Ti.prototype.getValue=Ti.prototype.I,Ti.prototype.has=Ti.prototype.has,Ti.prototype.contains=Ti.prototype.contains,Ti.prototype.first=Ti.prototype.first,Ti.prototype.addAll=Ti.prototype.addAll,Ti.prototype.set=Ti.prototype.set,Ti.prototype.add=Ti.prototype.add,Ti.prototype.thaw=Ti.prototype.ka,Ti.prototype.freeze=Ti.prototype.freeze,Ti.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):Rt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var jo,Ra,$a,ls,Or;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},Be=tt.prototype,Be.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Be.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function xo(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 na(a){return a.x.toString()+" "+a.y.toString()}Be.toString=function(){return"Point("+this.x+","+this.y+")"},Be.D=function(a){return a instanceof tt?this.x===a.x&&this.y===a.y:!1},Be.hi=function(a,y){return this.x===a&&this.y===y},Be.Xa=function(a){return _t.B(this.x,a.x)&&_t.B(this.y,a.y)},Be.add=function(a){return this.x+=a.x,this.y+=a.y,this},Be.re=function(a){return this.x-=a.x,this.y-=a.y,this},Be.offset=function(a,y){return this.x+=a,this.y+=y,this},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},Be=tt.prototype,Be.scale=function(a,y){return this.x*=a,this.y*=y,this},Be.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Be.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Be.normalize=function(){var a=this.x,y=this.y,x=Math.sqrt(a*a+y*y);return 0<x&&(this.x=a/x,this.y=y/x),this},Be.ab=function(a){return Da(a.x-this.x,a.y-this.y)},Be.direction=function(a,y){return Da(a-this.x,y-this.y)};function Da(a,y){if(a===0)return 0<y?90:0>y?270:0;if(y===0)return 0<a?0:180;if(isNaN(a)||isNaN(y))return 0;var x=180*Math.atan(Math.abs(y/a))/Math.PI;return 0>a?x=0>y?x+180:180-x:0>y&&(x=360-x),x}Be.Ry=function(a,y){return _t.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Be.fA=function(a,y,x,b){return _t.qh(a,y,x,b,this.x,this.y,this),this},Be.gA=function(a,y){return _t.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Be.uA=function(a,y,x,b){return _t.No(this.x,this.y,a,y,x,b,this),this},Be.vA=function(a,y){return _t.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Be.xi=function(a,y){return this.x=a.x+y.x*a.width+y.offsetX,this.y=a.y+y.y*a.height+y.offsetY,this},Be.yi=function(a,y,x,b,E){return this.x=a+E.x*x+E.offsetX,this.y=y+E.y*b+E.offsetY,this},Be.transform=function(a){return a.Ga(this),this};function Ao(a,y){return y.Cd(a),a}function Va(a,y,x,b,E,z){var ne=E-x,re=z-b,oe=ne*ne+re*re;x-=a,b-=y;var le=-x*ne-b*re;return 0>=le||le>=oe?(ne=E-a,re=z-y,Math.min(x*x+b*b,ne*ne+re*re)):(a=ne*b-re*x,a*a/oe)}function Jr(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function eo(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)}Be.w=function(){return isFinite(this.x)&&isFinite(this.y)},tt.alloc=function(){var a=Eo.pop();return a===void 0?new tt:a},tt.allocAt=function(a,y){var x=Eo.pop();return x===void 0?new tt(a,y):(x.x=a,x.y=y,x)},tt.free=function(a){Eo.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,z,ne,re){return _t.Rl(a,y,x,b,E,z,ne,re)},tt.prototype.compareWithLineSegmentPoint=tt.prototype.Ry,tt.compareWithLineSegment=function(a,y,x,b,E,z){return _t.Fl(a,y,x,b,E,z)},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 Eo=[];tt.className="Point",tt.parse=xo,tt.stringify=na,tt.distanceLineSegmentSquared=Va,tt.distanceSquared=Jr,tt.direction=eo,tt.Origin=jo=new tt(0,0).ja(),tt.InfiniteTopLeft=Ra=new tt(-1/0,-1/0).ja(),tt.InfiniteBottomRight=$a=new tt(1/0,1/0).ja(),tt.SixPoint=ls=new tt(6,6).ja(),tt.NoPoint=Or=new tt(NaN,NaN).ja(),tt.parse=xo,tt.stringify=na,tt.distanceLineSegmentSquared=Va,tt.distanceSquared=Jr,tt.direction=eo;function ci(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):Rt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var xa,za,xs,ho,ca,ja,hs;ci.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},ci.prototype.h=function(a,y){return this.width=a,this.height=y,this},ci.prototype.sg=function(a,y){return this.width=a,this.height=y,this},ci.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},ci.prototype.copy=function(){var a=new ci;return a.width=this.width,a.height=this.height,a},Be=ci.prototype,Be.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Be.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function fs(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 ci(x,E)}return new ci}function ll(a){return a.width.toString()+" "+a.height.toString()}Be.toString=function(){return"Size("+this.width+","+this.height+")"},Be.D=function(a){return a instanceof ci?this.width===a.width&&this.height===a.height:!1},Be.hi=function(a,y){return this.width===a&&this.height===y},Be.Xa=function(a){return _t.B(this.width,a.width)&&_t.B(this.height,a.height)},Be.Bc=function(a,y){return a=this.width+a,this.width=0<=a?a:0,y=this.height+y,this.height=0<=y?y:0,this},Be.w=function(){return isFinite(this.width)&&isFinite(this.height)},ci.alloc=function(){var a=Ys.pop();return a===void 0?new ci:a},ci.free=function(a){Ys.push(a)},ci.prototype.isReal=ci.prototype.w,ci.prototype.inflate=ci.prototype.Bc,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 Ys=[];ci.className="Size",ci.parse=fs,ci.stringify=ll,ci.ZeroSize=xa=new ci(0,0).ja(),ci.OneSize=za=new ci(1,1).ja(),ci.SixSize=xs=new ci(6,6).ja(),ci.EightSize=ho=new ci(8,8).ja(),ci.TenSize=ca=new ci(10,10).ja(),ci.InfiniteSize=ja=new ci(1/0,1/0).ja(),ci.NoSize=hs=new ci(NaN,NaN).ja(),ci.parse=fs,ci.stringify=ll;function Bn(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 ci?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Rt("Incorrect second argument supplied to Rect constructor "+y)):Rt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Be=Bn.prototype,Be.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Be.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function Es(a,y,x){a.width=y,a.height=x}Be.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},Be.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Be.dd=function(a){return this.x=a.x,this.y=a.y,this},Be.tA=function(a){return this.width=a.width,this.height=a.height,this},Bn.prototype.copy=function(){var a=new Bn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Be=Bn.prototype,Be.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Be.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Pl(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 z=0;a[y]==="";)y++;(b=a[y++])&&(z=parseFloat(b));for(var ne=0;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),new Bn(x,E,z,ne)}return new Bn}function Wl(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Be.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Be.D=function(a){return a instanceof Bn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Be.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},Be.Xa=function(a){return _t.B(this.x,a.x)&&_t.B(this.y,a.y)&&_t.B(this.width,a.width)&&_t.B(this.height,a.height)};function Mo(a,y){return _t.$(a.x,y.x)&&_t.$(a.y,y.y)&&_t.$(a.width,y.width)&&_t.$(a.height,y.height)}Be.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Be.Re=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height},Be.contains=function(a,y,x,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},Be.offset=function(a,y){return this.x+=a,this.y+=y,this},Be.Bc=function(a,y){return gl(this,y,a,y,a)},Be.Co=function(a){return gl(this,a.top,a.right,a.bottom,a.left)},Be.Fv=function(a){return gl(this,-a.top,-a.right,-a.bottom,-a.left)},Be.Hz=function(a,y,x,b){return gl(this,a,y,x,b)};function gl(a,y,x,b,E){var z=a.width;return x+E<=-z?(a.x+=z/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}Be.Ex=function(a){return Tu(this,a.x,a.y,a.width,a.height)},Be.Uu=function(a,y,x,b){return Tu(this,a,y,x,b)};function Tu(a,y,x,b,E){var z=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=z,a.y=ne,a.width=Math.max(0,y-z),a.height=Math.max(0,x-ne),a}Be.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Be.Vu=function(a,y,x,b){var E=this.width,z=this.x;return E!==1/0&&x!==1/0&&(E+=z,x+=a,isNaN(x)||isNaN(E)||z>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 Ql(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))}Be.Ye=function(a){return us(this,a.x,a.y,0,0)},Be.ed=function(a){return us(this,a.x,a.y,a.width,a.height)},Be.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),us(this,a,y,x,b)};function us(a,y,x,b,E){var z=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=z,a.y=ne,a.width=y-z,a.height=x-ne,a}Be.yi=function(a,y,x){return this.x=a-x.offsetX-x.x*this.width,this.y=y-x.offsetY-x.y*this.height,this};function Sa(a,y,x,b,E,z,ne,re){return ne===void 0&&(ne=0),re===void 0&&(re=0),a<=E&&E+ne<=a+x&&y<=z&&z+re<=y+b}function Il(a,y,x,b,E,z,ne,re){return a>ne+E||E>x+a?!1:!(y>re+z||z>b+y)}Be.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Be.Mz=function(){return this.width===0&&this.height===0},Bn.alloc=function(){var a=aa.pop();return a===void 0?new Bn:a},Bn.allocAt=function(a,y,x,b){var E=aa.pop();return E===void 0?new Bn(a,y,x,b):E.h(a,y,x,b)},Bn.free=function(a){aa.push(a)},yt.Object.defineProperties(Bn.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 ci(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}}}),Bn.prototype.isEmpty=Bn.prototype.Mz,Bn.prototype.isReal=Bn.prototype.w,Bn.intersectsLineSegment=function(a,y,x,b,E,z,ne,re){return _t.Fx(a,y,x,b,E,z,ne,re)},Bn.prototype.setSpot=Bn.prototype.yi,Bn.prototype.union=Bn.prototype.Kv,Bn.prototype.unionRect=Bn.prototype.ed,Bn.prototype.unionPoint=Bn.prototype.Ye,Bn.prototype.intersects=Bn.prototype.Vu,Bn.prototype.intersectsRect=Bn.prototype.Yc,Bn.prototype.intersect=Bn.prototype.Uu,Bn.prototype.intersectRect=Bn.prototype.Ex,Bn.prototype.grow=Bn.prototype.Hz,Bn.prototype.subtractMargin=Bn.prototype.Fv,Bn.prototype.addMargin=Bn.prototype.Co,Bn.prototype.inflate=Bn.prototype.Bc,Bn.prototype.offset=Bn.prototype.offset,Bn.prototype.contains=Bn.prototype.contains,Bn.prototype.containsRect=Bn.prototype.Re,Bn.prototype.containsPoint=Bn.prototype.ca,Bn.prototype.equalsApprox=Bn.prototype.Xa,Bn.prototype.equalTo=Bn.prototype.hi,Bn.prototype.equals=Bn.prototype.D,Bn.prototype.setSize=Bn.prototype.tA,Bn.prototype.setPoint=Bn.prototype.dd,Bn.prototype.set=Bn.prototype.set,Bn.prototype.setTo=Bn.prototype.sg;var Wo=null,Ia=null,aa=[];Bn.className="Rect",Bn.parse=Pl,Bn.stringify=Wl,Bn.contains=Sa,Bn.intersects=Il,Bn.ZeroRect=Wo=new Bn(0,0,0,0).ja(),Bn.NoRect=Ia=new Bn(NaN,NaN,NaN,NaN).ja(),Bn.parse=Pl,Bn.stringify=Wl,Bn.contains=Sa,Bn.intersects=Il;function or(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):Rt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}or.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},or.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},or.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},or.prototype.copy=function(){var a=new or;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Be=or.prototype,Be.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Be.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function _s(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 or;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new or(x);for(var z=NaN;a[y]==="";)y++;if((b=a[y++])&&(z=parseFloat(b)),isNaN(z))return new or(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new or(x,E):new or(x,E,z,ne)}return new or}function js(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Be.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Be.D=function(a){return a instanceof or?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Be.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},Be.Xa=function(a){return _t.B(this.top,a.top)&&_t.B(this.right,a.right)&&_t.B(this.bottom,a.bottom)&&_t.B(this.left,a.left)},Be.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},or.alloc=function(){var a=hu.pop();return a===void 0?new or:a},or.free=function(a){hu.push(a)},or.prototype.isReal=or.prototype.w,or.prototype.equalsApprox=or.prototype.Xa,or.prototype.equalTo=or.prototype.hi,or.prototype.equals=or.prototype.D,or.prototype.set=or.prototype.set,or.prototype.setTo=or.prototype.sg;var pl=null,Xs=null,hu=[];or.className="Margin",or.parse=_s,or.stringify=js,or.ZeroMargin=pl=new or(0,0,0,0).ja(),or.TwoMargin=Xs=new or(2,2,2,2).ja(),or.parse=_s,or.stringify=js;function er(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 Ss,Ws,su,fu,lu,Oo,Ru,ul,zs,wl,kn,Tn,Qn,zi,Xi,$i,Ri,ri,yi,Ji,mr,sa,Ma,Qt,cn,Jt,dn,xi,tr,yr,vr,br,Lr,Mr,zr,Sr;er.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},er.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},er.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},er.prototype.copy=function(){var a=new er;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Be=er.prototype,Be.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Be.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Tr(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function ro(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Ss;if(a==="TopLeft")return Ws;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return su;if(a==="TopRight")return fu;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return lu;if(a==="Center")return Oo;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Ru;if(a==="BottomLeft")return ul;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return zs;if(a==="BottomRight")return wl;if(a==="TopSide")return kn;if(a==="LeftSide")return Tn;if(a==="RightSide")return Qn;if(a==="BottomSide")return zi;if(a==="TopBottomSides")return Xi;if(a==="LeftRightSides")return $i;if(a==="TopLeftSides")return Ri;if(a==="TopRightSides")return ri;if(a==="BottomLeftSides")return yi;if(a==="BottomRightSides")return Ji;if(a==="NotTopSide")return mr;if(a==="NotLeftSide")return sa;if(a==="NotRightSide")return Ma;if(a==="NotBottomSide")return Qt;if(a==="AllSides")return cn;if(a==="Default")return Jt;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 z=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(z=parseFloat(b));for(var ne=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(ne=parseFloat(b)),new er(x,E,z,ne)}return new er}function ia(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Be.toString=function(){return this.sb()?this.offsetX===0&&this.offsetY===0?"Spot("+this.x+","+this.y+")":"Spot("+this.x+","+this.y+","+this.offsetX+","+this.offsetY+")":this.D(Ss)?"None":this.D(Ws)?"TopLeft":this.D(su)?"Top":this.D(fu)?"TopRight":this.D(lu)?"Left":this.D(Oo)?"Center":this.D(Ru)?"Right":this.D(ul)?"BottomLeft":this.D(zs)?"Bottom":this.D(wl)?"BottomRight":this.D(kn)?"TopSide":this.D(Tn)?"LeftSide":this.D(Qn)?"RightSide":this.D(zi)?"BottomSide":this.D(Xi)?"TopBottomSides":this.D($i)?"LeftRightSides":this.D(Ri)?"TopLeftSides":this.D(ri)?"TopRightSides":this.D(yi)?"BottomLeftSides":this.D(Ji)?"BottomRightSides":this.D(mr)?"NotTopSide":this.D(sa)?"NotLeftSide":this.D(Ma)?"NotRightSide":this.D(Qt)?"NotBottomSide":this.D(cn)?"AllSides":this.D(Jt)?"Default":"None"},Be.D=function(a){return a instanceof er?(this.x===a.x||isNaN(this.x)&&isNaN(a.x))&&(this.y===a.y||isNaN(this.y)&&isNaN(a.y))&&this.offsetX===a.offsetX&&this.offsetY===a.offsetY:!1},Be.gv=function(){return new er(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Be.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(dn))a=Tn;else if(a.D(xi))a=Qn;else if(a.D(tr))a=kn;else if(a.D(yr))a=zi;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Be.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Be.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Be.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Be.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Be.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},er.alloc=function(){var a=da.pop();return a===void 0?new er:a},er.free=function(a){da.push(a)},er.prototype.isDefault=er.prototype.Xb,er.prototype.isNone=er.prototype.ys,er.prototype.isSide=er.prototype.$c,er.prototype.isNoSpot=er.prototype.Mc,er.prototype.isSpot=er.prototype.sb,er.prototype.includesSide=er.prototype.Hf,er.prototype.opposite=er.prototype.gv,er.prototype.equals=er.prototype.D,er.prototype.set=er.prototype.set,er.prototype.setTo=er.prototype.sg;var da=[];er.className="Spot",er.parse=ro,er.stringify=ia,er.None=Ss=Tr(new er(0,0,0,0),0).ja(),er.Default=Jt=Tr(new er(0,0,-1,0),-1).ja(),er.TopLeft=Ws=new er(0,0,0,0).ja(),er.TopCenter=su=new er(.5,0,0,0).ja(),er.TopRight=fu=new er(1,0,0,0).ja(),er.LeftCenter=lu=new er(0,.5,0,0).ja(),er.Center=Oo=new er(.5,.5,0,0).ja(),er.RightCenter=Ru=new er(1,.5,0,0).ja(),er.BottomLeft=ul=new er(0,1,0,0).ja(),er.BottomCenter=zs=new er(.5,1,0,0).ja(),er.BottomRight=wl=new er(1,1,0,0).ja(),er.MiddleTop=vr=su,er.MiddleLeft=br=lu,er.MiddleRight=Lr=Ru,er.MiddleBottom=Mr=zs,er.Top=tr=su,er.Left=dn=lu,er.Right=xi=Ru,er.Bottom=yr=zs,er.TopSide=kn=Tr(new er(0,0,1,1),1).ja(),er.LeftSide=Tn=Tr(new er(0,0,1,2),1).ja(),er.RightSide=Qn=Tr(new er(0,0,1,4),1).ja(),er.BottomSide=zi=Tr(new er(0,0,1,8),1).ja(),er.TopBottomSides=Xi=Tr(new er(0,0,1,9),1).ja(),er.LeftRightSides=$i=Tr(new er(0,0,1,6),1).ja(),er.TopLeftSides=Ri=Tr(new er(0,0,1,3),1).ja(),er.TopRightSides=ri=Tr(new er(0,0,1,5),1).ja(),er.BottomLeftSides=yi=Tr(new er(0,0,1,10),1).ja(),er.BottomRightSides=Ji=Tr(new er(0,0,1,12),1).ja(),er.NotTopSide=mr=Tr(new er(0,0,1,14),1).ja(),er.NotLeftSide=sa=Tr(new er(0,0,1,13),1).ja(),er.NotRightSide=Ma=Tr(new er(0,0,1,11),1).ja(),er.NotBottomSide=Qt=Tr(new er(0,0,1,7),1).ja(),er.AllSides=cn=Tr(new er(0,0,1,15),1).ja(),zr=new er(.156,.156).ja(),Sr=new er(.844,.844).ja(),er.parse=ro,er.stringify=ia;function ur(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}ur.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},ur.prototype.setTransform=function(a,y,x,b,E,z){return this.m11=a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=z,this},ur.prototype.copy=function(){var a=new ur;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},ur.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},ur.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},ur.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},ur.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},ur.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},ur.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,z=a.m11*y,ne=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*b,x=this.m12*x+this.m22*b,b=this.m11*E+this.m21*z,E=this.m12*E+this.m22*z,this.dx=this.m11*ne+this.m21*a+this.dx,this.dy=this.m12*ne+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},ur.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),z=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=z,this},ur.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,z=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=z,this.m22=ne,this.translate(-y,-x),this},Be=ur.prototype,Be.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Be.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Be.Ga=function(a){var y=a.x,x=a.y;return a.h(y*this.m11+x*this.m21+this.dx,y*this.m12+x*this.m22+this.dy)},Be.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,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))},Be.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))},Be.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,z=this.m11,ne=this.m12,re=this.m21,oe=this.m22,le=this.dx,ce=this.dy,pe=y*z+x*re+le,we=y*ne+x*oe+ce,Ee=b*z+x*re+le,Ae=b*ne+x*oe+ce;return x=y*z+E*re+le,y=y*ne+E*oe+ce,z=b*z+E*re+le,b=b*ne+E*oe+ce,E=Math.min(pe,Ee),pe=Math.max(pe,Ee),Ee=Math.min(we,Ae),we=Math.max(we,Ae),E=Math.min(E,x),pe=Math.max(pe,x),Ee=Math.min(Ee,y),we=Math.max(we,y),E=Math.min(E,z),pe=Math.max(pe,z),Ee=Math.min(Ee,b),we=Math.max(we,b),a.h(E,Ee,pe-E,we-Ee),a},ur.alloc=function(){var a=Go.pop();return a===void 0?new ur:a},ur.free=function(a){Go.push(a)},ur.prototype.transformRect=ur.prototype.pp,ur.prototype.transformPoint=ur.prototype.Ga,ur.prototype.scale=ur.prototype.scale,ur.prototype.translate=ur.prototype.translate,ur.prototype.rotate=ur.prototype.rotate,ur.prototype.invert=ur.prototype.Vj,ur.prototype.multiplyInverted=ur.prototype.bv,ur.prototype.multiply=ur.prototype.multiply,ur.prototype.reset=ur.prototype.reset,ur.prototype.isIdentity=ur.prototype.ws,ur.prototype.equals=ur.prototype.D,ur.prototype.setTransform=ur.prototype.setTransform,ur.prototype.set=ur.prototype.set;var Go=[];ur.className="Transform",ur.xF="54a702f3e53909c447824c6706603faf4c";var _t={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=_t.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);_t.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,z,ne){if(0>=E&&(E=1e-6),a<x)var re=a,oe=x;else re=x,oe=a;if(y<b)var le=y,ce=b;else le=b,ce=y;if(a===x)return le<=ne&&ne<=ce&&a-E<=z&&z<=a+E;if(y===b)return re<=z&&z<=oe&&y-E<=ne&&ne<=y+E;if(oe+=E,re-=E,re<=z&&z<=oe&&(ce+=E,le-=E,le<=ne&&ne<=ce))if(oe-re>ce-le)if(a-x>E||x-a>E){if(z=(b-y)/(x-a)*(z-a)+y,z-E<=ne&&ne<=z+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<=z&&z<=ne+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,z,ne,re,oe,le,ce,pe){if(_t.Yb(a,y,ne,re,pe,x,b)&&_t.Yb(a,y,ne,re,pe,E,z))return _t.Yb(a,y,ne,re,pe,le,ce);var we=(a+x)/2,Ee=(y+b)/2,Ae=(x+E)/2,_e=(b+z)/2;E=(E+ne)/2,z=(z+re)/2,b=(we+Ae)/2,x=(Ee+_e)/2,Ae=(Ae+E)/2,_e=(_e+z)/2;var ct=(b+Ae)/2,Qe=(x+_e)/2;return _t.cs(a,y,we,Ee,b,x,ct,Qe,oe,le,ce,pe)||_t.cs(ct,Qe,Ae,_e,E,z,ne,re,oe,le,ce,pe)},ax:function(a,y,x,b,E,z,ne,re,oe){var le=(x+E)/2,ce=(b+z)/2;return oe.h((((a+x)/2+le)/2+(le+(E+ne)/2)/2)/2,(((y+b)/2+ce)/2+(ce+(z+re)/2)/2)/2),oe},My:function(a,y,x,b,E,z,ne,re){var oe=(x+E)/2,le=(b+z)/2;return eo(((a+x)/2+oe)/2,((y+b)/2+le)/2,(oe+(E+ne)/2)/2,(le+(z+re)/2)/2)},Dl:function(a,y,x,b,E,z,ne,re,oe,le){if(_t.Yb(a,y,ne,re,oe,x,b)&&_t.Yb(a,y,ne,re,oe,E,z))us(le,a,y,0,0),us(le,ne,re,0,0);else{var ce=(a+x)/2,pe=(y+b)/2,we=(x+E)/2,Ee=(b+z)/2;E=(E+ne)/2,z=(z+re)/2,b=(ce+we)/2,x=(pe+Ee)/2,we=(we+E)/2,Ee=(Ee+z)/2;var Ae=(b+we)/2,_e=(x+Ee)/2;_t.Dl(a,y,ce,pe,b,x,Ae,_e,oe,le),_t.Dl(Ae,_e,we,Ee,E,z,ne,re,oe,le)}return le},Qe:function(a,y,x,b,E,z,ne,re,oe,le){if(_t.Yb(a,y,ne,re,oe,x,b)&&_t.Yb(a,y,ne,re,oe,E,z))le.length===0&&(le.push(a),le.push(y)),le.push(ne),le.push(re);else{var ce=(a+x)/2,pe=(y+b)/2,we=(x+E)/2,Ee=(b+z)/2;E=(E+ne)/2,z=(z+re)/2,b=(ce+we)/2,x=(pe+Ee)/2,we=(we+E)/2,Ee=(Ee+z)/2;var Ae=(b+we)/2,_e=(x+Ee)/2;_t.Qe(a,y,ce,pe,b,x,Ae,_e,oe,le),_t.Qe(Ae,_e,we,Ee,E,z,ne,re,oe,le)}return le},jv:function(a,y,x,b,E,z,ne,re,oe,le){if(_t.Yb(a,y,E,z,le,x,b))return _t.Yb(a,y,E,z,le,re,oe);var ce=(a+x)/2,pe=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var we=(ce+x)/2,Ee=(pe+b)/2;return _t.jv(a,y,ce,pe,we,Ee,ne,re,oe,le)||_t.jv(we,Ee,x,b,E,z,ne,re,oe,le)},OA:function(a,y,x,b,E,z,ne){return ne.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+z)/2)/2),ne},iv:function(a,y,x,b,E,z,ne,re){if(_t.Yb(a,y,E,z,ne,x,b))us(re,a,y,0,0),us(re,E,z,0,0);else{var oe=(a+x)/2,le=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var ce=(oe+x)/2,pe=(le+b)/2;_t.iv(a,y,oe,le,ce,pe,ne,re),_t.iv(ce,pe,x,b,E,z,ne,re)}return re},ep:function(a,y,x,b,E,z,ne,re){if(_t.Yb(a,y,E,z,ne,x,b))re.length===0&&(re.push(a),re.push(y)),re.push(E),re.push(z);else{var oe=(a+x)/2,le=(y+b)/2;x=(x+E)/2,b=(b+z)/2;var ce=(oe+x)/2,pe=(le+b)/2;_t.ep(a,y,oe,le,ce,pe,ne,re),_t.ep(ce,pe,x,b,E,z,ne,re)}return re},Eo:function(a,y,x,b,E,z,ne,re,oe,le,ce,pe,we,Ee){if(_t.Yb(a,y,ne,re,we,x,b)&&_t.Yb(a,y,ne,re,we,E,z))return!_t.Rl(a,y,ne,re,oe,le,ce,pe)||(we=(a-ne)*(le-pe)-(y-re)*(oe-ce),we===0)?!1:(Ee.h(((a*re-y*ne)*(oe-ce)-(a-ne)*(oe*pe-le*ce))/we,((a*re-y*ne)*(le-pe)-(y-re)*(oe*pe-le*ce))/we),!0);var Ae=(a+x)/2,_e=(y+b)/2,ct=(x+E)/2,Qe=(b+z)/2;E=(E+ne)/2,z=(z+re)/2,b=(Ae+ct)/2,x=(_e+Qe)/2,ct=(ct+E)/2,Qe=(Qe+z)/2;var Pt=(b+ct)/2,Et=(x+Qe)/2,Dt=1/0,Vt=!1,mn=0,Ei=0;return _t.Eo(a,y,Ae,_e,b,x,Pt,Et,oe,le,ce,pe,we,Ee)&&(a=(Ee.x-oe)*(Ee.x-oe)+(Ee.y-le)*(Ee.y-le),a<Dt&&(Dt=a,Vt=!0,mn=Ee.x,Ei=Ee.y)),_t.Eo(Pt,Et,ct,Qe,E,z,ne,re,oe,le,ce,pe,we,Ee)&&(Ee.x-oe)*(Ee.x-oe)+(Ee.y-le)*(Ee.y-le)<Dt&&(Vt=!0,mn=Ee.x,Ei=Ee.y),Vt&&(Ee.x=mn,Ee.y=Ei),Vt},Fo:function(a,y,x,b,E,z,ne,re,oe,le,ce,pe,we){var Ee=0;if(_t.Yb(a,y,ne,re,we,x,b)&&_t.Yb(a,y,ne,re,we,E,z)){if(we=(a-ne)*(le-pe)-(y-re)*(oe-ce),we===0)return Ee;var Ae=((a*re-y*ne)*(oe-ce)-(a-ne)*(oe*pe-le*ce))/we,_e=((a*re-y*ne)*(le-pe)-(y-re)*(oe*pe-le*ce))/we;if(Ae>=ce)return Ee;if((oe>ce?oe-ce:ce-oe)<(le>pe?le-pe:pe-le)){if(y<re?(oe=y,a=re):(oe=re,a=y),_e<oe||_e>a)return Ee}else if(a<ne?(oe=a,a=ne):oe=ne,Ae<oe||Ae>a)return Ee;0<we?Ee++:0>we&&Ee--}else{Ae=(a+x)/2,_e=(y+b)/2;var ct=(x+E)/2,Qe=(b+z)/2;E=(E+ne)/2,z=(z+re)/2,b=(Ae+ct)/2,x=(_e+Qe)/2,ct=(ct+E)/2,Qe=(Qe+z)/2;var Pt=(b+ct)/2,Et=(x+Qe)/2;Ee+=_t.Fo(a,y,Ae,_e,b,x,Pt,Et,oe,le,ce,pe,we),Ee+=_t.Fo(Pt,Et,ct,Qe,E,z,ne,re,oe,le,ce,pe,we)}return Ee},qh:function(a,y,x,b,E,z,ne){return _t.$(a,x)?(y<b?(x=y,y=b):x=b,z<x?(ne.h(a,x),!1):z>y?(ne.h(a,y),!1):(ne.h(a,z),!0)):_t.$(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-z)*(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,z,ne,re,oe){return _t.B(a,x)&&_t.B(y,b)?(oe.h(a,y),!1):_t.$(E,ne)?_t.$(a,x)?(_t.qh(a,y,x,b,E,z,oe),!1):_t.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,oe):(re=(re-z)/(ne-E),_t.$(a,x)?(x=re*(a-E)+z,y<b?(E=y,y=b):E=b,x<E?(oe.h(a,E),!1):x>y?(oe.h(a,y),!1):(oe.h(a,x),!0)):(ne=(b-y)/(x-a),_t.$(re,ne)?(_t.qh(a,y,x,b,E,z,oe),!1):(E=(ne*a-re*E+z-y)/(ne-re),_t.$(ne,0)?(a<x?(b=a,a=x):b=x,E<b?(oe.h(b,y),!1):E>a?(oe.h(a,y),!1):(oe.h(E,y),!0)):_t.qh(a,y,x,b,E,ne*(E-a)+y,oe))))},MA:function(a,y,x,b,E){return _t.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,z,ne,re,oe,le){function ce(ct,Qe){var Pt=(ct-a)*(ct-a)+(Qe-y)*(Qe-y);Pt<pe&&(pe=Pt,oe.h(ct,Qe))}var pe=1/0;ce(oe.x,oe.y);var we=0,Ee=0,Ae=0,_e=0;if(E<ne?(we=E,Ee=ne):(we=ne,Ee=E),z<re?(Ae=E,_e=ne):(Ae=ne,_e=E),we=(Ee-we)/2+le,le=(_e-Ae)/2+le,E=(E+ne)/2,z=(z+re)/2,we===0||le===0)return oe;if(.5>(x>a?x-a:a-x)){if(we=1-(x-E)*(x-E)/(we*we),0>we)return oe;we=Math.sqrt(we),b=-le*we+z,ce(x,le*we+z),ce(x,b)}else{if(x=(b-y)/(x-a),b=1/(we*we)+x*x/(le*le),re=2*x*(y-x*a)/(le*le)-2*x*z/(le*le)-2*E/(we*we),we=re*re-4*b*(2*x*a*z/(le*le)-2*y*z/(le*le)+z*z/(le*le)+E*E/(we*we)-1+(y-x*a)*(y-x*a)/(le*le)),0>we)return oe;we=Math.sqrt(we),le=(-re+we)/(2*b),ce(le,x*le-x*a+y),we=(-re-we)/(2*b),ce(we,x*we-x*a+y)}return oe},Ff:function(a,y,x,b,E,z,ne,re,oe){var le=1e21,ce=a,pe=y;if(_t.Ve(a,y,a,b,E,z,ne,re,oe)){var we=(oe.x-E)*(oe.x-E)+(oe.y-z)*(oe.y-z);we<le&&(le=we,ce=oe.x,pe=oe.y)}return _t.Ve(x,y,x,b,E,z,ne,re,oe)&&(we=(oe.x-E)*(oe.x-E)+(oe.y-z)*(oe.y-z),we<le&&(le=we,ce=oe.x,pe=oe.y)),_t.Ve(a,y,x,y,E,z,ne,re,oe)&&(y=(oe.x-E)*(oe.x-E)+(oe.y-z)*(oe.y-z),y<le&&(le=y,ce=oe.x,pe=oe.y)),_t.Ve(a,b,x,b,E,z,ne,re,oe)&&(a=(oe.x-E)*(oe.x-E)+(oe.y-z)*(oe.y-z),a<le&&(le=a,ce=oe.x,pe=oe.y)),oe.h(ce,pe),1e21>le},us:function(a,y,x){return _t.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,z,ne,re){var oe=a+x,le=y+b;return E===ne?(z<re?(ne=z,z=re):ne=re,a<=E&&E<=oe&&ne<=le&&z>=y):z===re?(E<ne?(re=E,E=ne):re=ne,y<=z&&z<=le&&re<=oe&&E>=a):!!(Sa(a,y,x,b,E,z)||Sa(a,y,x,b,ne,re)||_t.Rl(a,y,oe,y,E,z,ne,re)||_t.Rl(oe,y,oe,le,E,z,ne,re)||_t.Rl(oe,le,a,le,E,z,ne,re)||_t.Rl(a,le,a,y,E,z,ne,re))},Rl:function(a,y,x,b,E,z,ne,re){return a===x&&y===b&&E===ne&&z===re?a===E&&y===z:0>=_t.Fl(a,y,x,b,E,z)*_t.Fl(a,y,x,b,ne,re)&&0>=_t.Fl(E,z,ne,re,a,y)*_t.Fl(E,z,ne,re,x,b)},Fl:function(a,y,x,b,E,z){return x-=a,b-=y,a=E-a,y=z-y,z=a*b-y*x,z===0&&(z=a*x+y*b,0<z&&(z=(a-x)*x+(y-b)*b,0>z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,z){var ne=Math.PI;z||(b*=ne/180,E*=ne/180);var re=b>E?-1:1;z=[];var oe=ne/2,le=b;if(b=Math.min(2*ne,Math.abs(E-b)),1e-5>b)return oe=le+re*Math.min(b,oe),re=a+x*Math.cos(le),le=y+x*Math.sin(le),a+=x*Math.cos(oe),y+=x*Math.sin(oe),x=(re+a)/2,oe=(le+y)/2,z.push([re,le,x,oe,x,oe,a,y]),z;for(;1e-5<b;)E=le+re*Math.min(b,oe),z.push(_t.Vy(x,le,E,a,y)),b-=Math.abs(E-le),le=E;return z},Vy:function(a,y,x,b,E){var z=(x-y)/2,ne=a*Math.cos(z),re=a*Math.sin(z),oe=-re,le=ne*ne+oe*oe,ce=le+ne*ne+oe*re;return le=4/3*(Math.sqrt(2*le*ce)-ce)/(ne*re-oe*ne),re=ne-le*oe,ne=oe+le*ne,oe=-ne,le=z+y,z=Math.cos(le),le=Math.sin(le),[b+a*Math.cos(y),E+a*Math.sin(y),b+re*z-ne*le,E+re*le+ne*z,b+re*z-oe*le,E+re*le+oe*z,b+a*Math.cos(x),E+a*Math.sin(x)]},No:function(a,y,x,b,E,z,ne){x=Math.floor((a-x)/E)*E+x,b=Math.floor((y-b)/z)*z+b;var re=x;return x+E-a<E/2&&(re=x+E),a=b,b+z-y<z/2&&(a=b+z),ne.h(re,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,z=0>b;if(a<y)var ne=1,re=0;else ne=0,re=1;var oe=ne===0?a:y,le=ne===0?x:b;return(ne===0?E:z)&&(le=-le),ne=re,x=ne===0?x:b,(ne===0?E:z)&&(x=-x),_t.az(oe,ne===0?a:y,le,x,0,0)},az:function(a,y,x,b,E,z){if(0<b)if(0<x){E=a*a,z=y*y,a*=x;var ne=y*b,re=-z+ne,oe=-z+Math.sqrt(a*a+ne*ne);y=re;for(var le=0;9999999999>le&&(y=.5*(re+oe),!(y===re||y===oe));++le){var ce=a/(y+E),pe=ne/(y+z);if(ce=ce*ce+pe*pe-1,0<ce)re=y;else if(0>ce)oe=y;else break}x=E*x/(y+E)-x,b=z*b/(y+z)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,z=a*x,z<b?(b=z/b,z=y*Math.sqrt(Math.abs(1-b*b)),x=a*b-x,x=Math.sqrt(x*x+z*z)):x=Math.abs(x-a);return x},Ze:new qi,um:new qi,Mf:new qi,Nf:0,vm:100};_t.za=_t.AA;function Zn(a){Io(this),this.l=2,a===void 0&&(a=Zn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Zn.o?this.ee=new $n:(Zn.V===null&&(Zn.V=new $n().freeze()),this.ee=Zn.V),this.aq=this.ee.Ja,this.Ip=new Bn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Ws,this.gg=wl,this.Rk=this.Sk=NaN,this.Uf=oi}Zn.prototype.copy=function(){var a=new Zn;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===Zn.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},Zn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Zn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Zn.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},Zn.prototype.ka=function(){if(Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Zn.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},Zn.prototype.Xa=function(a){if(!(a instanceof Zn))return!1;if(this.type!==a.type)return this.type===Zn.j&&a.type===Zn.o?Fr(this,a):a.type===Zn.j&&this.type===Zn.o?Fr(a,this):!1;if(this.type===Zn.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 _t.B(this.startX,a.startX)&&_t.B(this.startY,a.startY)&&_t.B(this.endX,a.endX)&&_t.B(this.endY,a.endY)};function Fr(a,y){return a.type!==Zn.j||y.type!==Zn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&_t.B(a.startX,y.startX)&&_t.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Cr&&_t.B(a.endX,y.endX)&&_t.B(a.endY,y.endY))))}Zn.ia=function(a){return a.toString()},Zn.prototype.qb=function(a){a.classType===Zn&&(this.type=a)},Zn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Zn.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 Zn.u:var y=new Bn(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 Zn.F:if(y=new Bn(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 Zn.o:y="",x=this.figures.s;for(var b=x.length,E=0;E<b;E++){var z=x[E];0<E&&(y+=" x "),z.isFilled&&(y+="F "),y+=z.toString(a)}return y;default:return this.type.toString()}},Zn.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},Zn.parse=function(a,y){function x(){return _e>=Dt-1?!0:le[_e+1].match(Vt)!==null}function b(){return _e++,le[_e]}function E(co){var Ur=parseFloat(b()),wa=parseFloat(b());ct===ct.toLowerCase()&&(Ur=Et.x+Ur,wa=Et.y+wa),co.h(Ur,wa)}function z(){return E(Et),Et}function ne(){return E(Pt),Pt}function re(){var co=Qe.toLowerCase();return co!=="c"&&co!=="s"&&co!=="q"&&co!=="t"?Et:new tt(2*Et.x-Pt.x,2*Et.y-Pt.y)}y===void 0&&(y=!1);var oe=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(oe,"$1 $2"),a=a.replace(oe,"$1 $2"),a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2"),a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2"),a=a.replace(/([0-9])([+\-])/gm,"$1 $2"),a=a.replace(/[\s\r\t\n]+/gm," "),a=a.replace(/^\s+|\s+$/g,"");var le=a.split(" ");for(a=0;a<le.length;a++){var ce=le[a];if(ce.match(/(\.[0-9]*)(\.)/gm)!==null){oe=Si();for(var pe="",we=!1,Ee=0;Ee<ce.length;Ee++){var Ae=ce[Ee];Ae!=="."||we?Ae==="."?(oe.push(pe),pe="."):pe+=Ae:(we=!0,pe+=Ae)}for(oe.push(pe),le.splice(a,1),ce=0;ce<oe.length;ce++)le.splice(a+ce,0,oe[ce]);a+=oe.length-1,Ni(oe)}}var _e=-1,ct="",Qe="";oe=new tt(0,0);var Pt=new tt(0,0),Et=new tt(0,0),Dt=le.length;a=A1(null),we=pe=ce=!1,Ee=!0,Ae=null;for(var Vt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(_e>=Dt-1);)if(Qe=ct,ct=b(),ct!=="")switch(ct.toUpperCase()){case"X":Ee=!0,pe=ce=!1;break;case"M":for(Ae=z(),a.mc===null||Ee===!0?(pp(a,Ae.x,Ae.y,ce,!pe,we),Ee=!1):a.moveTo(Ae.x,Ae.y),oe.assign(Et);!x();)Ae=z(),a.lineTo(Ae.x,Ae.y);break;case"L":for(;!x();)Ae=z(),a.lineTo(Ae.x,Ae.y);break;case"H":for(;!x();)Et=new tt((ct===ct.toLowerCase()?Et.x:0)+parseFloat(b()),Et.y),a.lineTo(Et.x,Et.y);break;case"V":for(;!x();)Et=new tt(Et.x,(ct===ct.toLowerCase()?Et.y:0)+parseFloat(b())),a.lineTo(Et.x,Et.y);break;case"C":for(;!x();){Ae=new tt,E(Ae);var mn=ne(),Ei=z();Kh(a,Ae.x,Ae.y,mn.x,mn.y,Ei.x,Ei.y)}break;case"S":for(;!x();)Ae=re(),mn=ne(),Ei=z(),Kh(a,Ae.x,Ae.y,mn.x,mn.y,Ei.x,Ei.y);break;case"Q":for(;!x();)Ae=ne(),mn=z(),u0(a,Ae.x,Ae.y,mn.x,mn.y);break;case"T":for(;!x();)Pt=Ae=re(),mn=z(),u0(a,Ae.x,Ae.y,mn.x,mn.y);break;case"B":for(;!x();){Ae=parseFloat(b()),mn=parseFloat(b()),Ei=parseFloat(b());var Qi=parseFloat(b()),Gi=parseFloat(b()),di=Gi,Xn=!1;x()||(di=parseFloat(b()),x()||(Xn=parseFloat(b())!==0)),ct===ct.toLowerCase()&&(Ei+=Et.x,Qi+=Et.y),a.arcTo(Ae,mn,Ei,Qi,Gi,di,Xn)}break;case"A":for(;!x();)Ae=Math.abs(parseFloat(b())),mn=Math.abs(parseFloat(b())),Ei=parseFloat(b()),Gi=Qi=!1,Xn=di=0,di=b(),di.length===1?(Qi=!!parseFloat(di),Gi=!!parseFloat(b()),di=parseFloat(b())):di.length===2?(Qi=!!parseFloat(di[0]),Gi=!!parseFloat(di[1]),di=parseFloat(b())):(Qi=!!parseFloat(di[0]),Gi=!!parseFloat(di[1]),di=parseFloat(di.slice(2))),Xn=parseFloat(b()),ct===ct.toLowerCase()&&(di=Et.x+di,Xn=Et.y+Xn),Et.h(di,Xn),wS(a,Ae,mn,Ei,Qi,Gi,di,Xn);break;case"Z":PS(a),Et.assign(oe);break;case"F":for(Ae="",mn=1;le[_e+mn];)if(le[_e+mn]==="0")we=!0,mn++;else if(le[_e+mn].match(/[Uu]/)!==null)mn++;else if(le[_e+mn].match(Vt)===null)mn++;else{Ae=le[_e+mn];break}Ae.match(/[Mm]/)?ce=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Ae="",mn=1;le[_e+mn];)if(le[_e+mn].match(/[Ff]/)!==null)mn++;else if(le[_e+mn].match(Vt)===null)mn++;else{Ae=le[_e+mn];break}Ae.match(/[Mm]/)?pe=!0:a.mc.isShadowed=!1}if(oe=a.os,c0=a,y)for(y=oe.figures.iterator;y.next();)y.value.isFilled=!0;return oe},Zn.Ha=function(a,y){for(var x=a.length,b=tt.alloc(),E=0;E<x;E++){var z=a[E];b.x=z[0],b.y=z[1],y.Ga(b),z[0]=b.x,z[1]=b.y,b.x=z[2],b.y=z[3],y.Ga(b),z[2]=b.x,z[3]=b.y,b.x=z[4],b.y=z[5],y.Ga(b),z[4]=b.x,z[5]=b.y,b.x=z[6],b.y=z[7],y.Ga(b),z[6]=b.x,z[7]=b.y}tt.free(b)},Zn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Zn.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},Zn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Zn.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 z=0;z<E;z++){var ne=b[z];ne._isInvalidBounds=!1,ne.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),Ai(this,a,!1),us(a,0,0,0,0),a.freeze()},Zn.prototype.ix=function(){var a=new Bn;return Ai(this,a,!0),a};function Ai(a,y,x){switch(a.type){case Zn.j:case Zn.u:case Zn.F:x?y.h(a.od,a.pd,0,0):us(y,a.od,a.pd,0,0),us(y,a.Dc,a.Ec,0,0);break;case Zn.o:var b=a.figures;a=b.s,b=b.length;for(var E=0;E<b;E++){var z=a[E];x&&E===0?y.h(z.startX,z.startY,0,0):us(y,z.startX,z.startY,0,0);for(var ne=z.segments.s,re=ne.length,oe=z.startX,le=z.startY,ce=0;ce<re;ce++){var pe=ne[ce];switch(pe.type){case Cr:case wo:oe=pe.endX,le=pe.endY,us(y,oe,le,0,0);break;case fr:_t.Dl(oe,le,pe.point1X,pe.point1Y,pe.point2X,pe.point2Y,pe.endX,pe.endY,.5,y),oe=pe.endX,le=pe.endY;break;case Rr:_t.iv(oe,le,pe.point1X,pe.point1Y,pe.endX,pe.endY,.5,y),oe=pe.endX,le=pe.endY;break;case pa:case Is:var we=pe.type===pa?Ca(pe,z):Ja(pe,z,oe,le),Ee=we.length;if(Ee===0){oe=pe.type===pa?pe.centerX:pe.endX,le=pe.type===pa?pe.centerY:pe.endY,us(y,oe,le,0,0);break}pe=null;for(var Ae=0;Ae<Ee;Ae++)pe=we[Ae],_t.Dl(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5],pe[6],pe[7],.5,y);pe!==null&&(oe=pe[6],le=pe[7]);break;default:Rt("Unknown Segment type: "+pe.type)}}}break;default:Rt("Unknown Geometry type: "+a.type)}}Zn.prototype.normalize=function(){this._isFrozen&&In(this);var a=this.ix();return this.offset(-a.x,-a.y),new tt(-a.x,-a.y)},Zn.prototype.offset=function(a,y){return this._isFrozen&&In(this),this.transform(1,0,0,1,a,y),this},Zn.prototype.scale=function(a,y){return this._isFrozen&&In(this),this.transform(a,0,0,y,0,0),this},Zn.prototype.rotate=function(a,y,x){this._isFrozen&&In(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=ur.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),ur.free(b),this},Be=Zn.prototype,Be.transform=function(a,y,x,b,E,z){switch(this.type){case Zn.j:case Zn.u:case Zn.F:var ne=this.od,re=this.pd;this.od=ne*a+re*x+E,this.pd=ne*y+re*b+z,ne=this.Dc,re=this.Ec,this.Dc=ne*a+re*x+E,this.Ec=ne*y+re*b+z;break;case Zn.o:for(var oe=this.figures.s,le=oe.length,ce=0;ce<le;ce++){var pe=oe[ce];ne=pe.startX,re=pe.startY,pe.startX=ne*a+re*x+E,pe.startY=ne*y+re*b+z,pe=pe.segments.s;for(var we=pe.length,Ee=0;Ee<we;Ee++){var Ae=pe[Ee];switch(Ae.type){case Cr:case wo:ne=Ae.endX,re=Ae.endY,Ae.endX=ne*a+re*x+E,Ae.endY=ne*y+re*b+z;break;case fr:ne=Ae.point1X,re=Ae.point1Y,Ae.point1X=ne*a+re*x+E,Ae.point1Y=ne*y+re*b+z,ne=Ae.point2X,re=Ae.point2Y,Ae.point2X=ne*a+re*x+E,Ae.point2Y=ne*y+re*b+z,ne=Ae.endX,re=Ae.endY,Ae.endX=ne*a+re*x+E,Ae.endY=ne*y+re*b+z;break;case Rr:ne=Ae.point1X,re=Ae.point1Y,Ae.point1X=ne*a+re*x+E,Ae.point1Y=ne*y+re*b+z,ne=Ae.endX,re=Ae.endY,Ae.endX=ne*a+re*x+E,Ae.endY=ne*y+re*b+z;break;case pa:ne=Ae.centerX,re=Ae.centerY,Ae.centerX=ne*a+re*x+E,Ae.centerY=ne*y+re*b+z,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Ae.startAngle+=ne),0>a&&(Ae.startAngle=180-Ae.startAngle,Ae.sweepAngle=-Ae.sweepAngle),0>b&&(Ae.startAngle=-Ae.startAngle,Ae.sweepAngle=-Ae.sweepAngle),Ae.radiusX*=Math.sqrt(a*a+x*x),Ae.radiusY!==void 0&&(Ae.radiusY*=Math.sqrt(y*y+b*b));break;case Is:if(ne=Ae.endX,re=Ae.endY,Ae.endX=ne*a+re*x+E,Ae.endY=ne*y+re*b+z,Ae.radiusX===0||Ae.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Ae.xAxisRotation+=ne),0>a&&(Ae.xAxisRotation=180-Ae.xAxisRotation,Ae.isClockwiseArc=!Ae.isClockwiseArc),0>b&&(Ae.xAxisRotation=-Ae.xAxisRotation,Ae.isClockwiseArc=!Ae.isClockwiseArc),Ae.radiusX*=Math.sqrt(a*a+x*x),Ae.radiusY*=Math.sqrt(y*y+b*b);break;default:Rt("Unknown Segment type: "+Ae.type)}}}}return this._isInvalidBounds=!0,this},Be.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,z=this.Ec;switch(this.type){case Zn.j:return _t.Yb(x,b,E,z,y,a.x,a.y);case Zn.u:var ne=Bn.allocAt(Math.min(x,E)-y,Math.min(b,z)-y,Math.abs(E-x)+2*y,Math.abs(z-b)+2*y);return a=ne.ca(a),Bn.free(ne),a;case Zn.F:ne=Math.min(x,E)-y;var re=Math.min(b,z)-y;return x=(Math.abs(E-x)+2*y)/2,y=(Math.abs(z-b)+2*y)/2,0>=x||0>=y?!1:(ne=a.x-(ne+x),re=a.y-(re+y),1>=ne*ne/(x*x)+re*re/(y*y));case Zn.o:return Ki(this,a,y,!0,!1);default:return!1}};function Ki(a,y,x,b,E){var z=y.x;y=y.y;for(var ne=a.bounds.x-20,re=0,oe,le,ce,pe,we=a.figures.s,Ee=we.length,Ae=0;Ae<Ee;Ae++){var _e=we[Ae],ct=!_e.isEvenOdd;if(_e.isFilled){if(b&&_e.ca(z,y,x))return!0;var Qe=_e.segments;oe=_e.startX,le=_e.startY;for(var Pt=oe,Et=le,Dt=Qe.s,Vt=0;Vt<=Qe.length;Vt++){var mn=void 0;if(Vt!==Qe.length){mn=Dt[Vt];var Ei=mn.type;a=mn.endX,pe=mn.endY}else Ei=Cr,a=Pt,pe=Et;switch(Ei){case wo:if(Pt=ir(z,y,ne,y,oe,le,Pt,Et),isNaN(Pt))return!0;re+=Pt,Pt=a,Et=pe;break;case Cr:if(oe=ir(z,y,ne,y,oe,le,a,pe),isNaN(oe))return!0;re+=oe;break;case fr:ce=_t.Fo(oe,le,mn.point1X,mn.point1Y,mn.point2X,mn.point2Y,a,pe,ne,y,z,y,.5),re+=ce;break;case Rr:ce=_t.Fo(oe,le,(oe+2*mn.point1X)/3,(le+2*mn.point1Y)/3,(2*mn.point1X+a)/3,(2*mn.point1Y+pe)/3,a,pe,ne,y,z,y,.5),re+=ce;break;case pa:case Is:Ei=mn.type===pa?Ca(mn,_e):Ja(mn,_e,oe,le);var Qi=Ei.length;if(Qi===0){if(oe=ir(z,y,ne,y,oe,le,mn.type===pa?mn.centerX:mn.endX,mn.type===pa?mn.centerY:mn.endY),isNaN(oe))return!0;re+=oe;break}mn=null;for(var Gi=0;Gi<Qi;Gi++){if(mn=Ei[Gi],Gi===0){if(ce=ir(z,y,ne,y,oe,le,mn[0],mn[1]),isNaN(ce))return!0;re+=ce}ce=_t.Fo(mn[0],mn[1],mn[2],mn[3],mn[4],mn[5],mn[6],mn[7],ne,y,z,y,.5),re+=ce}mn!==null&&(a=mn[6],pe=mn[7]);break;default:Rt("Unknown Segment type: "+mn.type)}oe=a,le=pe}if(ct){if(re!==0)return!0}else if(re%2!==0)return!0;re=0}else if(_e.ca(z,y,E?x:x+2))return!0}return!1}function ir(a,y,x,b,E,z,ne,re){if(_t.Yb(E,z,ne,re,.05,a,y))return NaN;var oe=(a-x)*(z-re);if(oe===0)return 0;var le=((a*b-y*x)*(E-ne)-(a-x)*(E*re-z*ne))/oe;if(y=(a*b-y*x)*(z-re)/oe,le>=a)return 0;if((E>ne?E-ne:ne-E)<(z>re?z-re:re-z)){if(z<re){if(y<z||y>re)return 0}else if(y<re||y>z)return 0}else if(E<ne){if(le<E||le>ne)return 0}else if(le<ne||le>E)return 0;return 0<oe?1:-1}function no(a,y,x,b){a=a.figures.s;for(var E=a.length,z=0;z<E;z++)if(a[z].ca(y,x,b))return!0;return!1}Be.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new tt),this.type===Zn.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,z=this.flattenedTotalLength*a,ne=0,re=0;re<E;re++){var oe=b[re],le=oe.length;for(a=0;a<le;a++){var ce=oe[a];if(ne+ce>=z)return b=z-ne,b=ce===0?0:b/ce,x=x[re],re=x[2*a],E=x[2*a+1],y.h(re+(x[2*a+2]-re)*b,E+(x[2*a+3]-E)*b),y;ne+=ce}}return y},Be.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Zn.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,z=0,ne=0;ne<b;ne++){var re=x[ne],oe=re.length;for(a=0;a<oe;a++){var le=re[a];if(z+le>=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;z+=le}}return NaN},Be.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Zn.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,z=this.flattenedTotalLength*a,ne=0,re=0;re<E;re++){var oe=b[re],le=oe.length;for(a=0;a<le;a++){var ce=oe[a];if(ne+ce>=z)return b=z-ne,b=ce===0?0:b/ce,ce=x[re],x=ce[2*a],re=ce[2*a+1],E=ce[2*a+2],a=ce[2*a+3],y[0]=x+(E-x)*b,y[1]=re+(a-re)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-re)?0:1>Math.abs(E-x)?0<=a-re?90:270:1>Math.abs(a-re)?0<=E-x?0:180:180*Math.atan2(a-re,E-x)/Math.PI,y;ne+=ce}}return y},Be.xx=function(a){if(this.type===Zn.j){var y=this.startX,x=this.startY,b=this.endX,E=this.endY;if(y!==b||x!==E){var z=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),z<=ne?ne===y?0:1:z>=b?b===y?0:1:Math.abs(z-y)/(b-ne);ne=(b-y)*(b-y)+(E-x)*(E-x);var re=tt.alloc();return _t.qh(y,x,b,E,z,a,re),a=re.x,z=re.y,tt.free(re),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/ne)}}else if(this.type===Zn.u){ne=this.startX,re=this.startY;var oe=this.endX;if(E=this.endY,ne!==oe||re!==E){y=oe-ne,x=E-re,z=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,ne),oe),a=Math.min(Math.max(a,re),E),ne=Math.abs(b-ne),oe=Math.abs(b-oe),re=Math.abs(a-re),E=Math.abs(a-E);var le=Math.min(ne,oe,re,E);if(le===re)return b/z;if(le===oe)return(y+a)/z;if(le===E)return(2*y+x-b)/z;if(le===ne)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,b=tt.alloc(),E=1/0,re=ne=0,oe=y.length;for(var ce=le=0,pe=0;pe<oe;pe++)for(var we=y[pe],Ee=x[pe],Ae=we.length,_e=0;_e<Ae;_e+=2){var ct=we[_e],Qe=we[_e+1];if(_e!==0){_t.qh(le,ce,ct,Qe,a.x,a.y,b);var Pt=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);Pt<E&&(E=Pt,ne=re,ne+=Math.sqrt((b.x-le)*(b.x-le)+(b.y-ce)*(b.y-ce))),re+=Ee[(_e-2)/2]}le=ct,ce=Qe}return tt.free(b),a=ne/z,0>a?0:1<a?1:a}return 0};function Lo(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===Zn.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===Zn.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===Zn.F){var z=new Zr;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var ne=new Mi(pa);if(ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(a.startX+a.endX)/2,ne.centerY=(a.startY+a.endY)/2,ne.radiusX=Math.abs(a.startX-a.endX)/2,ne.radiusY=Math.abs(a.startY-a.endY)/2,z.add(ne),a=Ca(ne,z),E=a.length,E===0)b.push(ne.centerX),b.push(ne.centerY);else{ne=z.startX,z=z.startY;for(var re=0;re<E;re++){var oe=a[re];_t.Qe(ne,z,oe[2],oe[3],oe[4],oe[5],oe[6],oe[7],.5,b),ne=oe[6],z=oe[7]}}y.push(b),x.push(nr(b))}else for(a=a.figures.iterator;a.next();){E=a.value,b=[],b.push(E.startX),b.push(E.startY),ne=E.startX,z=E.startY,re=ne,oe=z;for(var le=E.segments.s,ce=le.length,pe=0;pe<ce;pe++){var we=le[pe];switch(we.type){case wo:4<=b.length&&(y.push(b),x.push(nr(b))),b=[],b.push(we.endX),b.push(we.endY),ne=we.endX,z=we.endY,re=ne,oe=z;break;case Cr:b.push(we.endX),b.push(we.endY),ne=we.endX,z=we.endY;break;case fr:_t.Qe(ne,z,we.point1X,we.point1Y,we.point2X,we.point2Y,we.endX,we.endY,.5,b),ne=we.endX,z=we.endY;break;case Rr:_t.ep(ne,z,we.point1X,we.point1Y,we.endX,we.endY,.5,b),ne=we.endX,z=we.endY;break;case pa:var Ee=Ca(we,E),Ae=Ee.length;if(Ae===0){b.push(we.centerX),b.push(we.centerY),ne=we.centerX,z=we.centerY;break}for(var _e=0;_e<Ae;_e++){var ct=Ee[_e];_t.Qe(ne,z,ct[2],ct[3],ct[4],ct[5],ct[6],ct[7],.5,b),ne=ct[6],z=ct[7]}break;case Is:if(Ee=Ja(we,E,ne,z),Ae=Ee.length,_e=we.endX,ct=we.endY,Ae===0){b.push(_e),b.push(ct),ne=_e,z=ct;break}for(_e=0;_e<Ae;_e++)ct=Ee[_e],_t.Qe(ne,z,ct[2],ct[3],ct[4],ct[5],ct[6],ct[7],.5,b),ne=ct[6],z=ct[7];break;default:Rt("Segment not of valid type: "+we.type)}we.isClosed&&(b.push(re),b.push(oe))}4<=b.length&&(y.push(b),x.push(nr(b)))}}}function nr(a){for(var y=[],x=0,b=0,E=a.length,z=0;z<E;z+=2){var ne=a[z],re=a[z+1];z!==0&&y.push(Math.sqrt(Jr(x,b,ne,re))),x=ne,b=re}return y}Be.add=function(a){return this.ee.add(a),this},Be.pm=function(a,y,x,b,E,z,ne,re){return this._isFrozen&&In(this),this.fg=new er(a,y,E,z).freeze(),this.gg=new er(x,b,ne,re).freeze(),this},yt.Object.defineProperties(Zn.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 Lo(this),this.tk}},flattenedLengths:{get:function(){return Lo(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===Zn.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===Zn.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],z=E.length,ne=0;ne<z;ne++)a+=E[ne]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&In(this,a),this.na=a,a===Zn.o?this.ee=new $n:(Zn.V===null&&(Zn.V=new $n().freeze()),this.ee=Zn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&In(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&In(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&In(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&In(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&In(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&In(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&In(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&In(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Zn.prototype.setSpots=Zn.prototype.pm,Zn.prototype.add=Zn.prototype.add,Zn.prototype.getFractionForPoint=Zn.prototype.xx,Zn.prototype.getPointAndAngleAlongPath=Zn.prototype.Qu,Zn.prototype.getAngleAlongPath=Zn.prototype.wx,Zn.prototype.getPointAlongPath=Zn.prototype.Pu,Zn.prototype.containsPoint=Zn.prototype.ca,Zn.prototype.transform=Zn.prototype.transform,Zn.prototype.rotate=Zn.prototype.rotate,Zn.prototype.scale=Zn.prototype.scale,Zn.prototype.offset=Zn.prototype.offset,Zn.prototype.normalize=Zn.prototype.normalize,Zn.prototype.computeBoundsWithoutOrigin=Zn.prototype.ix,Zn.prototype.equalsApprox=Zn.prototype.Xa,Zn.className="Geometry",Zn.j=new qt(Zn,"Line",0),Zn.u=new qt(Zn,"Rectangle",1),Zn.F=new qt(Zn,"Ellipse",2),Zn.o=new qt(Zn,"Path",3),Zn.V=null,Zn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Zn.className="Geometry",Zn.stringify=Zn.ia,Zn.fillPath=Zn.nb,Zn.parse=Zn.parse,Zn.Line=Zn.j,Zn.Rectangle=Zn.u,Zn.Ellipse=Zn.F,Zn.Path=Zn.o;function Zr(a,y,x,b,E){Io(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 $n,this.sr=this.pl.Ja,this.fw=null}Zr.prototype.copy=function(){var a=new Zr;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 z=y[E].copy();b.add(z)}return a.sr=this.sr,a.fw=this.fw,a},Be=Zr.prototype,Be.Xa=function(a){if(!(a instanceof Zr&&_t.B(this.startX,a.startX)&&_t.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},Be.toString=function(a){a===void 0&&(a=-1);for(var y=0>a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,b=x.length,E=0;E<b;E++)y+=" "+x[E].toString(a);return y},Be.freeze=function(){this._isFrozen=!0;var a=this.segments;a.freeze();var y=a.s;a=a.length;for(var x=0;x<a;x++)y[x].freeze();return this},Be.ka=function(){this._isFrozen=!1;var a=this.segments;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},Be.Zu=function(){if(this._isInvalidBounds)return!0;var a=this.segments;if(this.sr!==a.Ja)return!0;a=a.s;for(var y=a.length,x=0;x<y;x++)if(a[x]._isInvalidBounds)return!0;return!1},Be.add=function(a){return this.pl.add(a),this},Be.ca=function(a,y,x){for(var b=this.startX,E=this.startY,z=b,ne=E,re=this.segments.s,oe=re.length,le=0;le<oe;le++){var ce=re[le];switch(ce.type){case wo:z=ce.endX,ne=ce.endY,b=ce.endX,E=ce.endY;break;case Cr:if(_t.Yb(b,E,ce.endX,ce.endY,x,a,y))return!0;b=ce.endX,E=ce.endY;break;case fr:if(_t.cs(b,E,ce.point1X,ce.point1Y,ce.point2X,ce.point2Y,ce.endX,ce.endY,.5,a,y,x))return!0;b=ce.endX,E=ce.endY;break;case Rr:if(_t.jv(b,E,ce.point1X,ce.point1Y,ce.endX,ce.endY,.5,a,y,x))return!0;b=ce.endX,E=ce.endY;break;case pa:case Is:var pe=ce.type===pa?Ca(ce,this):Ja(ce,this,b,E),we=pe.length,Ee=ce.type===pa?ce.centerX:ce.endX,Ae=ce.type===pa?ce.centerY:ce.endY;if(we===0){if(_t.Yb(b,E,Ee,Ae,x,a,y))return!0;b=Ee,E=Ae;break}for(Ee=null,Ae=0;Ae<we;Ae++)if(Ee=pe[Ae],Ae===0&&_t.Yb(b,E,Ee[0],Ee[1],x,a,y)||_t.cs(Ee[0],Ee[1],Ee[2],Ee[3],Ee[4],Ee[5],Ee[6],Ee[7],.5,a,y,x))return!0;Ee!==null&&(b=Ee[6],E=Ee[7]);break;default:Rt("Unknown Segment type: "+ce.type)}if(ce.isClosed&&(b!==z||E!==ne)&&_t.Yb(b,E,z,ne,x,a,y))return!0}return!1},yt.Object.defineProperties(Zr.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isFilled:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&In(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&In(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&In(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&In(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&In(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&In(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Zr.prototype.add=Zr.prototype.add,Zr.prototype.equalsApprox=Zr.prototype.Xa,Zr.className="PathFigure";function Mi(a,y,x,b,E,z,ne,re){Io(this),a===void 0&&(a=Cr),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),z===void 0&&(z=0),ne===void 0&&(ne=0),a===Is?(a=z%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),re&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===pa&&(z=Math.max(z,0)),this.Wh=z,typeof ne=="number"?(a===pa&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}Mi.prototype.copy=function(){var a=new Mi;return a.na=this.na,a.l=this.l&-2,a.Dc=this.Dc,a.Ec=this.Ec,a.Ne=this.Ne,a.Vh=this.Vh,a.Wh=this.Wh,a.Pg=this.Pg,a},Be=Mi.prototype,Be.Xa=function(a){if(!(a instanceof Mi)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case wo:case Cr:return _t.B(this.endX,a.endX)&&_t.B(this.endY,a.endY);case fr:return _t.B(this.endX,a.endX)&&_t.B(this.endY,a.endY)&&_t.B(this.point1X,a.point1X)&&_t.B(this.point1Y,a.point1Y)&&_t.B(this.point2X,a.point2X)&&_t.B(this.point2Y,a.point2Y);case Rr:return _t.B(this.endX,a.endX)&&_t.B(this.endY,a.endY)&&_t.B(this.point1X,a.point1X)&&_t.B(this.point1Y,a.point1Y);case pa:return _t.B(this.startAngle,a.startAngle)&&_t.B(this.sweepAngle,a.sweepAngle)&&_t.B(this.centerX,a.centerX)&&_t.B(this.centerY,a.centerY)&&_t.B(this.radiusX,a.radiusX)&&_t.B(this.radiusY,a.radiusY);case Is:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&_t.B(this.xAxisRotation,a.xAxisRotation)&&_t.B(this.endX,a.endX)&&_t.B(this.endY,a.endY)&&_t.B(this.radiusX,a.radiusX)&&_t.B(this.radiusY,a.radiusY);default:return!1}},Be.qb=function(a){a.classType===Mi&&(this.type=a)},Be.toString=function(a){switch(a===void 0&&(a=-1),this.type){case wo:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Cr:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case fr: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 Rr: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 pa: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 Is:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return this._isFrozen=!1,this},Be.close=function(){return this.isClosed=!0,this};function Ca(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,z=_t.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=ur.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),Zn.Ha(z,ne),ur.free(ne)}for(x=z.length,b=0;b<x;b++)ne=z[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=z,a.ae}function Ja(a,y,x,b){function E(_e,ct,Qe,Pt){return(_e*Pt<ct*Qe?-1:1)*Math.acos((_e*Qe+ct*Pt)/(Math.sqrt(_e*_e+ct*ct)*Math.sqrt(Qe*Qe+Pt*Pt)))}if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;if(a.radiusX===0||a.radiusY===0)return a.ae=[],a.ae;y=a.Wh;var z=a.Pg;y===0&&(y=1e-4),z===0&&(z=1e-4);var ne=Math.PI/180*a.Ne,re=a.isLargeArc,oe=a.isClockwiseArc,le=a.Dc,ce=a.Ec,pe=Math.cos(ne),we=Math.sin(ne),Ee=pe*(x-le)/2+we*(b-ce)/2;ne=-we*(x-le)/2+pe*(b-ce)/2;var Ae=Ee*Ee/(y*y)+ne*ne/(z*z);return 1<Ae&&(y*=Math.sqrt(Ae),z*=Math.sqrt(Ae)),Ae=(re===oe?-1:1)*Math.sqrt((y*y*z*z-y*y*ne*ne-z*z*Ee*Ee)/(y*y*ne*ne+z*z*Ee*Ee)),isNaN(Ae)&&(Ae=0),re=Ae*y*ne/z,Ae=Ae*-z*Ee/y,isNaN(re)&&(re=0),isNaN(Ae)&&(Ae=0),x=(x+le)/2+pe*re-we*Ae,b=(b+ce)/2+we*re+pe*Ae,ce=E(1,0,(Ee-re)/y,(ne-Ae)/z),pe=(Ee-re)/y,le=(ne-Ae)/z,Ee=(-Ee-re)/y,re=(-ne-Ae)/z,ne=E(pe,le,Ee,re),Ee=(pe*Ee+le*re)/(Math.sqrt(pe*pe+le*le)*Math.sqrt(Ee*Ee+re*re)),-1>=Ee?ne=Math.PI:1<=Ee&&(ne=0),!oe&&0<ne&&(ne-=2*Math.PI),oe&&0>ne&&(ne+=2*Math.PI),oe=y>z?1:y/z,Ee=y>z?z/y:1,y=_t.jx(0,0,y>z?y:z,ce,ce+ne,!0),z=ur.alloc(),z.reset(),z.translate(x,b),z.rotate(a.Ne,0,0),z.scale(oe,Ee),Zn.Ha(y,z),ur.free(z),a.ae=y,a.ae}yt.Object.defineProperties(Mi.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&&In(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&In(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&In(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&In(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&In(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&In(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&In(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&In(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&In(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Vn(a,">= zero",Mi,"radiusX"),this._isFrozen&&In(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Vn(a,">= zero",Mi,"radiusY"),this._isFrozen&&In(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&In(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&&In(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&&In(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&&In(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&&In(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Mi.prototype.equalsApprox=Mi.prototype.Xa;var wo=new qt(Mi,"Move",0),Cr=new qt(Mi,"Line",1),fr=new qt(Mi,"Bezier",2),Rr=new qt(Mi,"QuadraticBezier",3),pa=new qt(Mi,"Arc",4),Is=new qt(Mi,"SvgArc",4);Mi.className="PathSegment",Mi.Move=wo,Mi.Line=Cr,Mi.Bezier=fr,Mi.QuadraticBezier=Rr,Mi.Arc=pa,Mi.SvgArc=Is;function La(){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}La.prototype.copy=function(){var a=new La;return this.clone(a)},La.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},La.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},La.prototype.So=function(a,y){var x=this.diagram;return x===null||gh(x,a,y),y},La.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(gh(x,a,y),y.assign(x.Ps(y))),y},yt.Object.defineProperties(La.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}}}),La.prototype.getMultiTouchDocumentPoint=La.prototype.Bz,La.prototype.getMultiTouchViewPoint=La.prototype.So,La.className="InputEvent";function yl(){this.H=null,this.xa="",this.ar=this.Lr=null}yl.prototype.copy=function(){var a=new yl;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},yl.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},yt.Object.defineProperties(yl.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}}}),yl.className="DiagramEvent";function Ea(){this.Fm=Ha,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Ea.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Ea.prototype.copy=function(){var a=new Ea;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=tn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=tn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=tn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=tn(y)&&typeof y.J=="function"?y.J():y,a},Ea.prototype.qb=function(a){a.classType===Ea&&(this.change=a)},Ea.prototype.toString=function(){var a="";return a=this.change===Js?a+"* ":this.change===Ha?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===Js?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=sr(this.object)),this.oldValue!==null&&(a+=" old: "+sr(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+sr(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Ea.prototype.I=function(a){return a?this.oldValue:this.newValue},Ea.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Ea.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Ea.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Ea.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Ea.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},yt.Object.defineProperties(Ea.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===Js&&(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}}}),Ea.prototype.redo=Ea.prototype.redo,Ea.prototype.canRedo=Ea.prototype.canRedo,Ea.prototype.undo=Ea.prototype.undo,Ea.prototype.canUndo=Ea.prototype.canUndo,Ea.prototype.getParam=Ea.prototype.Dz,Ea.prototype.getValue=Ea.prototype.I,Ea.prototype.clear=Ea.prototype.clear;var Js=new qt(Ea,"Transaction",-1),Ha=new qt(Ea,"Property",0),ts=new qt(Ea,"Insert",1),Ms=new qt(Ea,"Remove",2);Ea.className="ChangedEvent",Ea.Transaction=Js,Ea.Property=Ha,Ea.Insert=ts,Ea.Remove=Ms;function Rs(){this.o=new $n().freeze(),this.xa="",this.j=!1}Rs.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0<a){a=this.changes.count;for(var x=0;x<a;x++){var b=this.changes.M(x);b!==null&&(y+=`
|
|
|
`+b.toString())}}return y},Rs.prototype.clear=function(){var a=this.changes;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),a.freeze()},Rs.prototype.canUndo=function(){return this.isComplete},Rs.prototype.undo=function(){if(this.canUndo())for(var a=this.changes.count-1;0<=a;a--){var y=this.changes.M(a);y!==null&&y.undo()}},Rs.prototype.canRedo=function(){return this.isComplete},Rs.prototype.redo=function(){if(this.canRedo())for(var a=this.changes.count,y=0;y<a;y++){var x=this.changes.M(y);x!==null&&x.redo()}},Rs.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Ti,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===Ha&&b.object){var E=y.get(b.object);E||(E=new Ti,y.set(b.object,E));var z=E.get(b.propertyName);z===null?E.set(b.propertyName,-1):(0<z&&a.cd(z,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()}},yt.Object.defineProperties(Rs.prototype,{changes:{get:function(){return this.o}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}}),Rs.prototype.optimize=Rs.prototype.ak,Rs.prototype.redo=Rs.prototype.redo,Rs.prototype.canRedo=Rs.prototype.canRedo,Rs.prototype.undo=Rs.prototype.undo,Rs.prototype.canUndo=Rs.prototype.canUndo,Rs.prototype.clear=Rs.prototype.clear,Rs.className="Transaction";function ns(){this.Pt=new Kn,this.Jd=!1,this.u=new $n().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new $n().freeze(),this.hl=new $n,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}ns.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},ns.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},ns.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Be=ns.prototype,Be.Xw=function(a){this.Pt.add(a)},Be.Rx=function(a){this.Pt.remove(a)},Be.Ea=function(a){if(a===void 0&&(a=""),a===null&&(a=""),this.isUndoingRedoing)return!1;this.tt===!0&&(this.tt=!1,this.bi++,this.isInternalTransaction||this.Ob("StartingFirstTransaction",a,this.currentTransaction),0<this.bi&&this.bi--),this.isEnabled&&(this.Ie.ka(),this.Ie.add(a),this.Ie.freeze(),this.currentTransaction===null?this.hl.add(0):this.hl.add(this.currentTransaction.changes.count)),this.bi++;var y=this.transactionLevel===1;return y&&(this.isInternalTransaction||this.Ob("StartedTransaction",a,this.currentTransaction)),y},Be.eb=function(a){return a===void 0&&(a=""),Kc(this,!0,a)},Be.Kf=function(){return Kc(this,!1,"")};function Kc(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Pi("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 z=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var ne=a.Ie.count;0<ne&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(ne-1),a.Ie.freeze()),ne=a.hl.count,0<ne&&(z=a.hl.M(ne-1),a.hl.mb(ne-1))}if(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&&(z=y.M(0),z!==null&&z.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=z,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}Be.lx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.ka();for(var y=a.count-1;y>this.historyIndex;y--){var x=a.M(y);x!==null&&x.clear(),a.mb(y),this.rq=!0}a.freeze()}},ns.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},ns.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){Pi("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},ns.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},ns.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){Pi("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},ns.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new Ea;for(b.change=Js,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},ns.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Rs);var x=a.copy();y=y.changes,y.ka(),y.add(x),y.freeze(),this.checksTransactionLevel&&0>=this.transactionLevel&&!this.tt&&(a=a.diagram,a!==null&&a.pi===!1||Pi("Change not within a transaction: "+x.toString()))}},ns.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},yt.Object.defineProperties(ns.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}}}),ns.prototype.handleChanged=ns.prototype.Tu,ns.prototype.redo=ns.prototype.redo,ns.prototype.undo=ns.prototype.undo,ns.prototype.canUndo=ns.prototype.canUndo,ns.prototype.discardHistoryAfterIndex=ns.prototype.lx,ns.prototype.rollbackTransaction=ns.prototype.Kf,ns.prototype.commitTransaction=ns.prototype.eb,ns.prototype.startTransaction=ns.prototype.Ea,ns.prototype.removeModel=ns.prototype.Rx,ns.prototype.addModel=ns.prototype.Xw,ns.prototype.clear=ns.prototype.clear,ns.className="UndoManager";function Qo(){Io(this),this.H=Fc,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new La,this.Zr=-1}Qo.prototype.toString=function(){return this.name!==""?this.name+" Tool":Zi(this.constructor)},Qo.prototype.updateAdornments=function(){},Qo.prototype.canStart=function(){return this.isEnabled},Qo.prototype.doStart=function(){},Qo.prototype.doActivate=function(){this.isActive=!0},Qo.prototype.doDeactivate=function(){this.isActive=!1},Qo.prototype.doStop=function(){},Qo.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Qo.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Qo.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Qo.prototype.doMouseMove=function(){},Qo.prototype.doMouseUp=function(){this.stopTool()},Qo.prototype.doMouseWheel=function(){},Qo.prototype.canStartMultiTouch=function(){return!0},Qo.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,z=b.y-x.y;a.Jw=Math.sqrt(E*E+z*z),y.bubbles=!1}tt.free(x),tt.free(b)},Qo.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,z=b.y-x.y;z=Math.sqrt(E*E+z*z)/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),z*=a.Bw;var ne=a.commandHandler;if(z!==a.scale&&ne.canResetZoom(z)){var re=a.zoomPoint;a.zoomPoint=E,ne.resetZoom(z),a.zoomPoint=re}y.bubbles=!1}tt.free(x),tt.free(b)},Qo.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Qo.prototype.doKeyUp=function(){},Qo.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Qo.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Qo.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Qr?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||(Qr?y.meta:y.control)||y.shift||a.clearSelection()}},Qo.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,Rd(a,b,x),b.handled};function Rd(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)}}}Qo.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 z=a.Ck,ne=z;for(a.Ck=b,this.doCurrentObjectChanged(z,b),y.handled=!1;z!==null;){var re=z.mouseLeave;if(re!==null&&(b===z||b!==null&&b.rg(z)||(re(y,z,b),E=!0,y.handled)))break;z=z.panel}for(z=ne,y.handled=!1;b!==null&&(ne=b.mouseEnter,!(ne!==null&&(z===b||z!==null&&z.rg(b)||(ne(y,b,z),E=!0,y.handled))));)b=b.panel;b=a.Ck}if(b!==null){for(z=b,ne="";z!==null&&(ne=z.cursor,ne==="");)z=z.panel;for(a.currentCursor=ne,y.handled=!1,z=b;z!==null&&(b=z.mouseOver,!(b!==null&&(b(y,z),E=!0,y.handled)));)z=z.panel}else this.doUpdateCursor(null),b=a.mouseOver,b!==null&&(b(y),E=!0);E&&a.$b(),a.skipsUndoManager=x}},Qo.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Qo.prototype.doCurrentObjectChanged=function(){},Qo.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===Uc&&!y.shift||E===Vc&&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===Uc&&y.shift||E===Vc&&!y.control){b=a.position.copy();var z=y.event;E=z.deltaMode;var ne=z.deltaX;z=z.deltaY;var re="pixel";if(ne===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(re,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(re,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:re="pixel";break;case 1:re="line";break;case 2:re="page"}ne!==0&&a.allowHorizontalScroll&&(ne*=a.scrollHorizontalLineChange/16,a.scroll(re,0<ne?"right":"left",Math.abs(ne))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(re,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,b,y)}}},Qo.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Qo.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=Jn(function(){x.doWaitAfter(b)},a)},Qo.prototype.cancelWaitAfter=function(){this.Zr!==-1&&nt.clearTimeout(this.Zr),this.Zr=-1},Qo.prototype.doWaitAfter=function(){},Qo.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof ga);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Qo.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},yt.Object.defineProperties(Qo.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof gn&&(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}}}),Qo.prototype.startTransaction=Qo.prototype.Ea,Qo.className="Tool";function Ua(){Qo.call(this),this.name="ToolManager",this.hb=new $n,this.ob=new $n,this.Hb=new $n,this.F=this.V=850,this.o=new ci(2,2).ja(),this.Ha=5e3,this.ia=Vc,this.u=mi,this.Mp=this.j=null,this.zj=-1}Zt(Ua,Qo),Ua.prototype.initializeStandardTools=function(){},Ua.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof ga&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Ua.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Co&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Za){y.bubbles=!0;return}if(this.gestureBehavior===Co)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===Vc?this.mouseWheelBehavior=Uc:this.mouseWheelBehavior===Uc&&(this.mouseWheelBehavior=Vc)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Ua.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===Za){y.bubbles=!0;return}if(this.gestureBehavior===Co)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}}Th(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Th(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Ua.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof ga&&(y===a||y.rg(a))||this.hideToolTip()},Ua.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()))},Ua.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)},Ua.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 ga)||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()},Ua.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof ga){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 Fo&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(nt.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=Jn(function(){E.hideToolTip()},a)}},Ua.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}},Ua.prototype.hideToolTip=function(){this.zj!==-1&&(nt.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof ga?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Fo&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Ua.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()},Ua.prototype.doMouseWheel=function(){this.standardMouseWheel()},Ua.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Ua.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Ua.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},Ua.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},Ua.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)},yt.Object.defineProperties(Ua.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 ga?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}}}),Ua.prototype.replaceStandardTool=Ua.prototype.gb;var Vc=new qt(Ua,"WheelScroll",0),Uc=new qt(Ua,"WheelZoom",1),uh=new qt(Ua,"WheelNone",2),mi=new qt(Ua,"GestureZoom",3),Co=new qt(Ua,"GestureCancel",4),Za=new qt(Ua,"GestureNone",5);Ua.className="ToolManager",Ua.WheelScroll=Vc,Ua.WheelZoom=Uc,Ua.WheelNone=uh,Ua.GestureZoom=mi,Ua.GestureCancel=Co,Ua.GestureNone=Za;function Gr(){Qo.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 Kn().freeze(),this.ia=new ae,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Nr;Zt(Gr,Qo),Gr.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},Gr.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},Gr.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,(Qr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},Gr.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),ln=null,this.isActive=!0,this.tl.set(a.position),gs(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&&Tl(a),$f(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,ln=this,Dn=this.diagram,this.doSimulatedDragOut()))};function gs(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof hi?(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 ar,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}Gr.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},Gr.prototype.Pd=function(a){return a===void 0?new hd(jo):this.isGridSnapEnabled?new hd(new tt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new hd(a.copy())},Gr.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Os(this),$d(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<Nr.count){for(var y=Nr,x=y.length,b=0;b<x;b++){var E=y.M(b);ps(E),el(E),Os(E),E.diagram.ug()}y.clear()}ps(this),this.tl.h(NaN,NaN),Dn!==null&&(Dn.currentCursor=""),ln=Dn=null,el(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),ch(a,!0)},Gr.prototype.stopTransaction=function(){var a=this.diagram,y=Qo.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Os(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Cu(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function cl(){var a=ln;el(a),lc(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Gr.prototype.doCancel=function(){el(this),lc(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},Gr.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},Gr.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function ba(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")):lc(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 Ti,b=a.draggedParts.iterator;b.next();){var E=b.key;if(E.Zc()&&E.canCopy()){var z=y.I(E);z!==null&&(z.location=E.location,z.Va(),x.add(z,a.Pd(z.location)))}}for(y=y.iterator;y.next();)b=y.value,b instanceof hi&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,gs(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Yh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function el(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 hi&&(x.value.point=new tt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function ps(a){if(a.draggedLink!==null){if(a.dragsLink&&a.Oe!==null){var y=a.Oe;y.diagram.remove(y.temporaryFromNode),y.diagram.remove(y.temporaryToNode),a.Oe.originalLink=null}a.draggedLink=null,a.Oe=null}}function Vl(a,y,x){var b=a.diagram,E=a.startPoint,z=tt.alloc();z.assign(b.lastInput.documentPoint),a.moveParts(y,z.re(E),x),tt.free(z),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(Tl(b),b.hk())}Gr.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&Jc(b,a,y,this.dragOptions,x)};function lc(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 hi&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),Yh(b,-E.x,-E.y)}y.bd()}}function ra(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),Cl(a,!1));var b=a.findDragOverObject(y),E=x.lastInput;E.targetObject=b,a.doUpdateCursor(b);var z=x.skipsUndoManager,ne=!1;try{if(x.skipsUndoManager=!0,ne=Cu(a,E,b),!a.isActive&&ln===null)return;var re=b!==null?b.part:null;if(re===null||x.handlesDragDropForTopLevelParts&&re.isTopLevel&&!(re instanceof mo)){var oe=x.mouseDragOver;oe!==null&&(oe(E),ne=!0)}if(!a.isActive&&ln===null||(a.doDragOver(y,b),!a.isActive&&ln===null))return}finally{x.skipsUndoManager=z,ne&&x.bd()}a.Bn=b,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(E.viewPoint)}Gr.prototype.findDragOverObject=function(a){var y=this;return Nc(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof ga||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},Gr.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 Cu(a,y,x){var b=!1,E=a.Cg.length,z=0<E?a.Cg[0]:null;if(x===z)return!1;y.handled=!1;for(var ne=0;ne<E;ne++){var re=a.Cg[ne],oe=re.mouseDragLeave;if(oe!==null&&(oe(y,re,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&ln===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=bu(E);for(E=a.Cg.length,x=0;x<E&&(ne=a.Cg[x],re=ne.mouseDragEnter,re===null||(re(y,ne,z),b=!0,!y.handled));x++);return b}function bu(a){var y=a.panel;return y!==null?y:a instanceof Pr&&!(a instanceof mo)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function ql(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(le){return b.findValidLinkablePort(le,x)});a=tt.alloc();var z=1/0,ne=null;for(E=E.iterator;E.next();){var re=E.value;if(re.part!==null){var oe=re.ga(Oo,a);oe=y.Bf(oe),oe<z&&(ne=re,z=oe)}}return tt.free(a),ne}function Cl(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 z=null,ne=null;x.fromNode===null&&(z=ql(a,x.i(0),!1),z!==null&&(ne=z.part));var re=null,oe=null;x.toNode===null&&(re=ql(a,x.i(x.pointsCount-1),!0),re!==null&&(oe=re.part)),E.isValidLink(ne,z,oe,re)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=ne,z!==null&&(x.fromPortId=z.portId),x.toNode=oe,re!==null&&(x.toPortId=re.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):oo(E,ne,z,oe,re):oo(E,null,null,null,null)}}}}Gr.prototype.doDragOver=function(){};function uc(a,y){var x=a.diagram;a.dragsLink&&Cl(a,!0),Os(a);var b=a.findDragOverObject(y),E=x.lastInput;if(E.targetObject=b,b!==null){E.handled=!1;for(var z=b;z!==null;){var ne=z.mouseDrop;if(ne!==null&&(ne(E,z),E.handled))break;Md(a,E,z),z=bu(z)}}else z=x.mouseDrop,z!==null&&z(E);if(a.isActive||ln!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)z=E.key,z instanceof Di&&z.linksConnected.each(function(re){re.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||ln!==null){for(a=Bn.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Di&&ft(x,b,a);Bn.free(a)}}}function Md(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof mo||(x=a.mouseDrop,x!==null&&x(y))}function ft(a,y,x){var b=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(b=!0),a=a.Nu(x,function(E){return E.part},function(E){return E instanceof hi},!0,function(E){return E instanceof hi},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Gr.prototype.doDropOnto=function(){},Gr.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()?(ba(this,!1),$f(a,this.copiedParts),Vl(this,this.copiedParts,!1),$d(a,this.copiedParts)):this.mayMove()?(el(this),Vl(this,this.draggedParts,!0)):this.mayDragOut()?(ba(this,!1),Vl(this,this.copiedParts,!1)):el(this),ra(this,a.lastInput.documentPoint))}},Gr.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?(el(this),ba(this,!0),$f(a,this.copiedParts),Vl(this,this.copiedParts,!1),$d(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,el(this),this.mayMove()&&(Vl(this,this.draggedParts,!0),ra(this,a.lastInput.documentPoint))),this.Ym=!0,uc(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&St(this),a.Ya(),$d(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Gr.prototype.simulatedMouseMove=function(a,y,x){if(ln===null)return!1;var b=ln.diagram;x instanceof gn||(x=null);var E=Dn;return x!==E&&(E!==null&&E!==b&&(E.ug(),ln.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),Dn=x,x!==null&&x!==b&&(cl(),E=x.toolManager.findTool("Dragging"),E!==null&&(Nr.contains(E)||Nr.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)},Gr.prototype.simulatedMouseUp=function(a,y,x){if(ln===null)return!1;var b=Dn,E=ln.diagram;if(x===null)return ln.doCancel(),!0;if(x!==b){var z=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&z!==null)return b.ug(),ln.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;Dn=x,b=x.toolManager.findTool("Dragging"),b!==null&&(cl(),Nr.contains(b)||Nr.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=ln,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function St(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Di&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}Gr.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Qr?!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())},Gr.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())},Gr.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())},Gr.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},Gr.prototype.Az=function(){return ln},Gr.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=ln;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Gr.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),gu(a),a.animationManager.Cc(),a=ln,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Gr.prototype.doSimulatedDragLeave=function(){var a=ln;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Gr.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=ln;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;nn(this,y.draggedParts.Lf(),!1,a.firstInput),Vl(this,this.copiedParts,!1),ra(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Gr.prototype.doSimulatedDrop=function(){var a=this.diagram,y=ln;if(y!==null){var x=y.diagram;if(y.Ym=!0,el(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),nn(this,y.draggedParts.Lf(),!0,a.lastInput),Vl(this,this.copiedParts,!1);var b=new Kn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),uc(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 nn(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 z=Bn.alloc();E=b=1/0;for(var ne=-1/0,re=-1/0,oe=y.iterator;oe.next();){var le=oe.value;if(le.isVisible()){var ce=le.location;le=ce.x,ce=ce.y,isNaN(le)||isNaN(ce)||(le<b&&(b=le),ce<E&&(E=ce),le>ne&&(ne=le),ce>re&&(re=ce))}}for(b===1/0?z.h(0,0,0,0):z.h(b,E,ne-b,re-E),b=z.x+z.width/2,E=z.y+z.height/2,Bn.free(z),z=a.Fr,ne=new Ti,re=tt.alloc(),oe=y.iterator;oe.next();)le=oe.value,le instanceof hi&&le.canCopy()&&(ce=x.I(le),ce!==null&&(ce.points=le.points,Yh(ce,z.x-b,z.y-E),ce.suspendsRouting=!0,ne.add(ce,a.Pd())));for(y=y.iterator;y.next();)le=y.value,le.Zc()&&le.canCopy()&&(oe=x.I(le),oe!==null&&(le=le.location,re.h(z.x-(b-le.x),z.y-(E-le.y)),oe.location=re,oe.Va(),ne.add(oe,a.Pd(re))));tt.free(re),a.copiedParts=ne,gs(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Yh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Gr.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Gr.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new tt},yt.Object.defineProperties(Gr.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}}}),Gr.prototype.getDraggingSource=Gr.prototype.Az;var ln=null,Dn=null;Gr.className="DraggingTool",Nr=new $n,li("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Ua.prototype.doCancel=function(){ln!==null&&ln.doCancel(),Qo.prototype.doCancel.call(this)};function Sn(){Qo.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new hi,y=new bo;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new bo,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Di,y=new bo,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=za,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Di,y=new bo,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=za,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 Ti,this.Of=this.gj=this.Pf=null}Zt(Sn,Qo),Sn.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Sn.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var z=y.Df(),ne=ci.alloc();ne.width=y.naturalBounds.width*z,ne.height=y.naturalBounds.height*z,b.desiredSize=ne,ci.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Oo,z=tt.alloc(),x.location=y.ga(Oo,z),tt.free(z),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},Sn.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=za,y.fromSpot=Ss,y.toSpot=Ss),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Sn.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Sn.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Di){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)}},Sn.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Di))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof Di)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},Sn.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,b=this.portGravity;0>=b&&(b=.1);var E=this,z=y.og(x,b,function(pe){return E.findValidLinkablePort(pe,a)},null,!0);for(b=1/0,y=null,z=z.iterator;z.next();){var ne=z.value,re=ne.part;if(re instanceof Di){var oe=ne.ga(Oo,tt.alloc()),le=x.x-oe.x,ce=x.y-oe.y;tt.free(oe),oe=le*le+ce*ce,oe<b&&(le=this.validPortsCache.I(ne),le!==null?le&&(y=ne,b=oe):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,re,ne)||!a&&this.isValidLink(re,ne,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(ne,!0),y=ne,b=oe):this.validPortsCache.add(ne,!1))}}return y!==null&&(x=y.part,x instanceof Di&&(x.layer===null||x.layer.allowLink))?y:null},Sn.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},Sn.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},Sn.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Sn.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Di))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof Di))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},Sn.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)},Sn.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 Kn;return b.add(a),ni(this,x,y,b)};function ni(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),ni(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),ni(a,y.labeledLink,x,b))))}Sn.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!==Ph){if(b===Mg){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!ii(this,a,y,x,!0)}if(b===Lg){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!ii(this,a,y,x,!0)}if(b===Cg)return a===y?a=!0:(b=new Kn,b.add(y),a=Yn(this,b,a,y,x)),!a;if(b===bg)return!ii(this,a,y,x,!1);if(b===Eg)return a===y?a=!0:(b=new Kn,b.add(y),a=Ci(this,b,a,y,x)),!a}return!0};function ii(a,y,x,b,E){if(y===x)return!0;if(y===null||x===null)return!1;for(var z=y.linksConnected;z.next();){var ne=z.value;if(ne!==b&&(!E||ne.isTreeLink)&&ne.toNode===y&&(ne=ne.fromNode,ne!==y&&ii(a,ne,x,b,E)))return!0}return!1}function Yn(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 z=x.linksConnected;z.next();){var ne=z.value;if(ne!==E&&ne.toNode===x&&(ne=ne.fromNode,ne!==x&&Yn(a,y,ne,b,E)))return!0}return!1}function Ci(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 z=x.linksConnected;z.next();){var ne=z.value;if(ne!==E){var re=ne.fromNode;if(ne=ne.toNode,re=re===x?ne:re,re!==x&&Ci(a,y,re,b,E))return!0}}return!1}yt.Object.defineProperties(Sn.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}}}),Sn.className="LinkingBaseTool";function Bi(){Sn.call(this),this.name="Linking",this.V={},this.F=null,this.K=bi,this.Xd=null}Zt(Bi,Sn),Bi.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},Bi.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 Di)))return null;var x=this.direction;if(x===bi||x===xr){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===bi||x===gr)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Bi.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 Di&&(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 Di&&(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)},Bi.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()},Bi.prototype.doStop=function(){Sn.prototype.doStop.call(this),this.startObject=null},Bi.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,z=null;try{var ne=this.targetPort=this.findTargetPort(this.isForwards);if(ne!==null){var re=ne.part;re instanceof Di&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=re,E=ne):(y=re,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?(z=this.insertLink(y,x,b,E),z!==null?(ne===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),z.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",z)):this.doNoLink(y,x,b,E)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),z&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},Bi.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof hi)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)},Bi.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},Bi.prototype.doNoLink=function(){},yt.Object.defineProperties(Bi.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 bi=new qt(Bi,"Either",0),xr=new qt(Bi,"ForwardsOnly",0),gr=new qt(Bi,"BackwardsOnly",0);Bi.className="LinkingTool",Bi.Either=bi,Bi.ForwardsOnly=xr,Bi.BackwardsOnly=gr;function ar(){Sn.call(this),this.name="Relinking";var a=new bo;a.figure="Diamond",a.desiredSize=ho,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new bo,a.figure="Diamond",a.desiredSize=ho,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Bn}Zt(ar,Sn),ar.prototype.updateAdornments=function(a){if(a!==null&&a instanceof hi){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)}},ar.prototype.makeAdornment=function(a,y){var x=new ga;return x.type=ui.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},ar.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},ar.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 ga&&x.adornedPart instanceof hi))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=xa),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=xa),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},ar.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===yp||x===Xh)&&(x=Nu),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}},ar.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()},ar.prototype.doStop=function(){Sn.prototype.doStop.call(this),this.handle=null},ar.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,z=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var ne=this.targetPort.part;ne instanceof Di&&(this.isForwards?(b=ne,E=this.targetPort):(y=ne,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?E=b=null:x=y=null:z=null;z!==null?(this.reconnectLink(z,this.isForwards?b:y,this.isForwards?E:x,this.isForwards),this.targetPort===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint,z.bb()),this.transactionResult=this.name,a.R("LinkRelinked",z,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},ar.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},ar.prototype.doNoRelink=function(){};function oo(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)}yt.Object.defineProperties(ar.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 ga))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),ar.className="RelinkingTool",li("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),li("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function dr(){Qo.call(this),this.name="LinkReshaping";var a=new bo;a.figure="Rectangle",a.desiredSize=xs,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new bo,a.figure="Diamond",a.desiredSize=ho,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 $n}Zt(dr,Qo),dr.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:Yr},dr.prototype.om=function(a,y){a.reshapingBehavior=y},dr.prototype.updateAdornments=function(a){if(a!==null&&a instanceof hi){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)}},dr.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new ga,E.type=ui.Link,x=y.firstPickIndex;var z=y.lastPickIndex,ne=b?1:0;if(y.resegmentable&&y.computeCurve()!==Ec)for(var re=x+ne;re<z-ne;re++){var oe=this.makeResegmentHandle(a,re);oe!==null&&(oe.segmentIndex=re,oe.segmentFraction=.5,oe.fromMaxLinks=999,E.add(oe))}for(ne=x+1;ne<z;ne++)if(re=this.makeHandle(a,ne),re!==null){if(re.segmentIndex=ne,ne!==x)if(ne===x+1&&b){oe=y.i(x);var le=y.i(x+1);_t.B(oe.x,le.x)&&_t.B(oe.y,le.y)&&(le=y.i(x-1)),_t.B(oe.x,le.x)?(this.om(re,$o),re.cursor="n-resize"):_t.B(oe.y,le.y)&&(this.om(re,So),re.cursor="w-resize")}else ne===z-1&&b?(oe=y.i(z-1),le=y.i(z),_t.B(oe.x,le.x)&&_t.B(oe.y,le.y)&&(oe=y.i(z+1)),_t.B(oe.x,le.x)?(this.om(re,$o),re.cursor="n-resize"):_t.B(oe.y,le.y)&&(this.om(re,So),re.cursor="w-resize")):ne!==z&&(this.om(re,la),re.cursor="move");E.add(re)}E.adornedObject=a}return E},dr.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},dr.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},dr.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},dr.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 hi){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}}},dr.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},dr.prototype.stopTransaction=function(){var a=this.diagram,y=Qo.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},dr.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},dr.prototype.getResegmentingPoint=function(){return this.handle.ga(Oo)},dr.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},dr.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),z=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var ne=y.i(x-2);if(Math.abs(b.x-E.x)<this.resegmentingDistance&&Math.abs(b.y-E.y)<this.resegmentingDistance&&(qr(this,ne,b,E,z,!0)||qr(this,ne,b,E,z,!1))){var re=y.points.copy();qr(this,ne,b,E,z,!0)?(re.cd(x-2,new tt(ne.x,(z.y+ne.y)/2)),re.cd(x+1,new tt(z.x,(z.y+ne.y)/2))):(re.cd(x-2,new tt((z.x+ne.x)/2,ne.y)),re.cd(x+1,new tt((z.x+ne.x)/2,z.y))),re.mb(x),re.mb(x-1),y.points=re,y.Wb()}else ne=y.i(x+2),Math.abs(E.x-z.x)<this.resegmentingDistance&&Math.abs(E.y-z.y)<this.resegmentingDistance&&(qr(this,b,E,z,ne,!0)||qr(this,b,E,z,ne,!1))&&(re=y.points.copy(),qr(this,b,E,z,ne,!0)?(re.cd(x-1,new tt(b.x,(b.y+ne.y)/2)),re.cd(x+2,new tt(ne.x,(b.y+ne.y)/2))):(re.cd(x-1,new tt((b.x+ne.x)/2,b.y)),re.cd(x+2,new tt((b.x+ne.x)/2,ne.y))),re.mb(x+1),re.mb(x),y.points=re,y.Wb())}}else ne=tt.alloc(),_t.qh(b.x,b.y,z.x,z.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 qr(a,y,x,b,E,z){return z?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}dr.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===$o?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===So&&(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===$o?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===So&&(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),z=y.i(b-1),ne=y.i(b+1);_t.B(z.x,E.x)&&_t.B(E.y,ne.y)?(_t.B(z.x,y.i(b-2).x)&&!_t.B(z.y,y.i(b-2).y)?(y.m(b,a.x,z.y),x++,b++):y.L(b-1,a.x,z.y),_t.B(ne.y,y.i(b+2).y)&&!_t.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):_t.B(z.y,E.y)&&_t.B(E.x,ne.x)?(_t.B(z.y,y.i(b-2).y)&&!_t.B(z.x,y.i(b-2).x)?(y.m(b,z.x,a.y),x++,b++):y.L(b-1,z.x,a.y),_t.B(ne.x,y.i(b+2).x)&&!_t.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):_t.B(z.x,E.x)&&_t.B(E.x,ne.x)?(_t.B(z.x,y.i(b-2).x)&&!_t.B(z.y,y.i(b-2).y)?(y.m(b,a.x,z.y),x++,b++):y.L(b-1,a.x,z.y),_t.B(ne.x,y.i(b+2).x)&&!_t.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):_t.B(z.y,E.y)&&_t.B(E.y,ne.y)&&(_t.B(z.y,y.i(b-2).y)&&!_t.B(z.x,y.i(b-2).x)?(y.m(b,z.x,a.y),x++,b++):y.L(b-1,z.x,a.y),_t.B(ne.y,y.i(b+2).y)&&!_t.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&&(z=b.findVisibleNode(),z!==null&&z!==b&&(b=z,E=b.port)),x===1&&y.computeSpot(!0,E).Mc()&&(z=E.ga(Oo,tt.alloc()),b=y.getLinkPointFromPoint(b,E,z,a,!0,tt.alloc()),y.L(0,b.x,b.y),tt.free(z),tt.free(b)),b=y.toNode,E=y.toPort,b!==null&&(z=b.findVisibleNode(),z!==null&&z!==b&&(b=z,E=b.port)),x===y.pointsCount-2&&y.computeSpot(!1,E).Mc()&&(x=E.ga(Oo,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()},dr.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case la:return a;case $o:return new tt(y.i(x).x,a.y);case So:return new tt(a.x,y.i(x).y);default:case Yr:return y.i(x)}},yt.Object.defineProperties(dr.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 ga))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}}}),dr.prototype.setReshapingBehavior=dr.prototype.om,dr.prototype.getReshapingBehavior=dr.prototype.Ru;var Yr=new qt(dr,"None",0),So=new qt(dr,"Horizontal",1),$o=new qt(dr,"Vertical",2),la=new qt(dr,"All",3);dr.className="LinkReshapingTool",dr.None=Yr,dr.Horizontal=So,dr.Vertical=$o,dr.All=la,li("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function so(){Qo.call(this),this.name="Resizing",this.o=new ci(1,1).freeze(),this.j=new ci(9999,9999).freeze(),this.yg=new ci(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new bo;a.alignmentFocus=Oo,a.figure="Rectangle",a.desiredSize=xs,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 ci,this.Tn=new tt,this.rt=new ci(0,0),this.qt=new ci(1/0,1/0),this.pt=new ci(1,1)}Zt(so,Qo),so.prototype.updateAdornments=function(a){if(!(a===null||a instanceof hi)){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(),wf(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},so.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new ga,y.type=ui.Spot,y.locationSpot=Oo;var x=new Fu;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Ws)),y.add(this.makeHandle(a,fu)),y.add(this.makeHandle(a,wl)),y.add(this.makeHandle(a,ul)),y.add(this.makeHandle(a,vr)),y.add(this.makeHandle(a,Lr)),y.add(this.makeHandle(a,Mr)),y.add(this.makeHandle(a,br))}else if(zc(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},so.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},so.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=Oo),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 ui)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},so.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},so.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))},so.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},so.prototype.stopTransaction=function(){var a=this.diagram,y=Qo.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},so.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},so.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()),z=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,z),this.resize(y),a.bd(),tt.free(E)}},so.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()),z=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,z),this.resize(y),tt.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},so.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 mo){var b=new $n;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new ae;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()}},so.prototype.computeResize=function(a,y,x,b,E,z){y.Mc()&&(y=Oo);var ne=this.adornedObject.naturalBounds,re=ne.x,oe=ne.y,le=ne.x+ne.width,ce=ne.y+ne.height,pe=1;if(!z){pe=ne.width;var we=ne.height;0>=pe&&(pe=1),0>=we&&(we=1),pe=we/pe}return we=tt.alloc(),_t.No(a.x,a.y,re,oe,E.width,E.height,we),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(we.x,le-b.width),a.x=Math.min(a.x,le-x.width),a.width=Math.max(le-a.x,x.width),a.y=Math.max(we.y,ce-b.height),a.y=Math.min(a.y,ce-x.height),a.height=Math.max(ce-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(pe*a.width,b.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,b.width),x.width),a.height=pe*a.width),a.x=le-a.width,a.y=ce-a.height)):1<=y.y?(a.x=Math.max(we.x,le-b.width),a.x=Math.min(a.x,le-x.width),a.width=Math.max(le-a.x,x.width),a.height=Math.max(Math.min(we.y-oe,b.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(pe*a.width,b.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,b.width),x.width),a.height=pe*a.width),a.x=le-a.width)):(a.x=Math.max(we.x,le-b.width),a.x=Math.min(a.x,le-x.width),a.width=le-a.x,z||(a.height=Math.max(Math.min(pe*a.width,b.height),x.height),a.width=a.height/pe,a.y=oe+.5*(ce-oe-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(we.x-re,b.width),x.width),a.y=Math.max(we.y,ce-b.height),a.y=Math.min(a.y,ce-x.height),a.height=Math.max(ce-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(pe*a.width,b.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,b.width),x.width),a.height=pe*a.width),a.y=ce-a.height)):1<=y.y?(a.width=Math.max(Math.min(we.x-re,b.width),x.width),a.height=Math.max(Math.min(we.y-oe,b.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(pe*a.width,b.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,b.width),x.width),a.height=pe*a.width))):(a.width=Math.max(Math.min(we.x-re,b.width),x.width),z||(a.height=Math.max(Math.min(pe*a.width,b.height),x.height),a.width=a.height/pe,a.y=oe+.5*(ce-oe-a.height))):0>=y.y?(a.y=Math.max(we.y,ce-b.height),a.y=Math.min(a.y,ce-x.height),a.height=ce-a.y,z||(a.width=Math.max(Math.min(a.height/pe,b.width),x.width),a.height=pe*a.width,a.x=re+.5*(le-re-a.width))):1<=y.y&&(a.height=Math.max(Math.min(we.y-oe,b.height),x.height),z||(a.width=Math.max(Math.min(a.height/pe,b.width),x.width),a.height=pe*a.width,a.x=re+.5*(le-re-a.width))),tt.free(we),a},so.prototype.computeReshape=function(){var a=ei;return this.adornedObject instanceof bo&&(a=Ov(this.adornedObject)),!(a===rr||this.diagram.lastInput.shift)},so.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},so.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},so.prototype.computeCellSize=function(){var a=new ci(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},yt.Object.defineProperties(so.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 ga))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 ga)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}}}),so.className="ResizingTool",li("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ho(){Qo.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new tt,this.ue=null;var a=new bo;a.figure="Ellipse",a.desiredSize=ho,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}Zt(Ho,Qo),Ho.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)}},Ho.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new ga,y.type=ui.Position,y.locationSpot=Oo;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(zc(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ho.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},Ho.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)},Ho.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(Oo)},Ho.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)},Ho.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},Ho.prototype.stopTransaction=function(){var a=this.diagram,y=Qo.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ho.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Ho.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Ho.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()},Ho.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()}},Ho.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},yt.Object.defineProperties(Ho.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 ga))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 ga)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}}}),Ho.className="RotatingTool",li("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Na(){Qo.call(this),this.name="ClickSelecting"}Zt(Na,Qo),Na.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Na.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Na.className="ClickSelectingTool";function fo(){Qo.call(this),this.name="Action",this.pk=null}Zt(fo,Qo),fo.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},fo.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()},fo.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))}},fo.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()},fo.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())},fo.prototype.doStop=function(){this.pk=null},fo.className="ActionTool";function ko(){Qo.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new tt(0,0)}Zt(ko,Qo),ko.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)},ko.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},ko.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 Pr)x.Zc()&&(zc(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);tn(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var z=tt.allocAt(a.x,a.y);this.isGridSnapEnabled&&Gf(this.diagram,b,a,z),b.location=z,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),tt.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},yt.Object.defineProperties(ko.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}}}),ko.className="ClickCreatingTool";function po(){Qo.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Pr;a.layerName="Tool",a.selectable=!1;var y=new bo;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Zt(po,Qo),po.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))},po.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},po.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},po.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=ci.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),ci.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},po.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()},po.prototype.computeBoxBounds=function(){var a=this.diagram;return new Bn(a.firstInput.documentPoint,a.lastInput.documentPoint)},po.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Qr?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 $n,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)}},yt.Object.defineProperties(po.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}}}),po.className="DragSelectingTool";function kr(){Qo.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(nt.document,"scroll",a.Kw,!1),a.stopTool()}}Zt(kr,Qo),kr.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())},kr.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(nt.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},kr.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},kr.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},kr.prototype.doMouseMove=function(){this.move()},kr.prototype.doMouseUp=function(){this.move(),this.stopTool()},kr.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)}},yt.Object.defineProperties(kr.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),kr.className="PanningTool",li("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),li("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),li("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),li("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),li("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Fo(){this.F=this.u=this.j=this.o=null}yt.Object.defineProperties(Fo.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}}}),Fo.className="HTMLInfo";function qo(a,y,x){this.text=a,this.hx=y,this.visible=x}qo.className="ContextMenuButtonInfo";function ma(){Qo.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()}}Zt(ma,Qo);function va(a){var y=new Fo;y.show=function(E,z,ne){ne.showDefaultContextMenu()},y.hide=function(E,z){z.hideDefaultContextMenu()},is=y,a.tu=function(){a.stopTool()},y=pn("div");var x=pn("div");y.style.cssText="top: 0px;z-index:10002;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px",x.style.cssText="z-index:10001;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;opacity: 0.8;";var b=pn("style");nt.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",lo,!1),b.addEventListener(y,"selectstart",lo,!1),b.addEventListener(x,"contextmenu",lo,!1)),y.className="goCXforeground",x.className="goCXbackground",nt.document.body&&(nt.document.body.appendChild(y),nt.document.body.appendChild(x)),_a=y,Ls=x,il=!0}function lo(a){return a.preventDefault(),!1}ma.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)},ma.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},ma.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},ma.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof gn||(a instanceof Yt?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},ma.prototype.doActivate=function(){},ma.prototype.doMouseDown=function(){if(Qo.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof ga){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Ba(this)},ma.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof ga){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Ba(this)};function Ba(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Fo||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(Wa(a,!0),a.isActive||a.stopTool())}ma.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Wa(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=is,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof Yt?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof ga&&!a.currentContextMenu.visible&&a.stopTool()}}ma.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},ma.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof ga){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 Fo&&a.show(y,x,this);this.currentContextMenu=a},ma.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}},ma.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof ga?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Fo&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function Ps(a){var y=new $n;return y.add(new qo("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new qo("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new qo("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new qo("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new qo("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new qo("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new qo("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new qo("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new qo("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new qo("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new qo("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new qo("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new qo("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}ma.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=Ps(this)),_a.innerHTML="",Ls.addEventListener("pointerdown",this.tu,!1);var y=this,x=pn("ul");x.className="goCXul",_a.appendChild(x),x.innerHTML="";for(var b=this.jt.iterator;b.next();){var E=b.value,z=E.visible;if(typeof E.hx=="function"&&(typeof z!="function"||z(a))){z=pn("li"),z.className="goCXli";var ne=pn("a");ne.className="goCXa",ne.href="#",ne.ky=E.hx,ne.addEventListener("pointerdown",function(re){return this.ky(a),y.stopTool(),re.preventDefault(),!1},!1),ne.textContent=E.text,z.appendChild(ne),x.appendChild(z)}}_a.style.display="block",Ls.style.display="block"},ma.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===is){_a.style.display="none",Ls.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Ls,"pointerdown",this.tu,!1),this.currentContextMenu=null}},yt.Object.defineProperties(ma.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof ga?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return il===!1&&is===null&&Ns&&va(this),is},set:function(a){a===null&&(il=!0),is=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var is=null,il=!1,Ls=null,_a=null;ma.className="ContextMenuTool",li("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function oa(){Qo.call(this),this.name="TextEditing",this.Zh=new Ya,this.ia=null,this.V=Vo,this.vj=null,this.qa=Ko,this.u=1,this.F=!0,this.o=null,this.j=new Fo,this.kt=null,as(this,this.j)}Zt(oa,Qo);function as(a,y){if(Ns){var x=pn("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var b=a.Lx(this.value);this.style.width=20+b.measuredBounds.width*this.wA+"px",this.rows=b.lineCount}},!1),x.addEventListener("keydown",function(b){if(!b.isComposing&&a.textBlock!==null){var E=b.key;E==="Enter"?(a.textBlock.isMultiline===!1&&b.preventDefault(),a.acceptText(ha)):E==="Tab"?(a.acceptText(Pa),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Ko){var b=a.kt;a.qa===Aa&&(a.qa=es),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Ko){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,z){if(b instanceof Ya&&z instanceof oa)if(z.state===zl)x.style.border="3px solid red",x.focus();else{var ne=b.ga(Oo),re=E.position,oe=E.scale,le=b.Df()*oe;le<z.minimumEditorScale&&(le=z.minimumEditorScale);var ce=b.naturalBounds.width*le+6,pe=b.naturalBounds.height*le+2,we=(ne.x-re.x)*oe;ne=(ne.y-re.y)*oe,re=b.verticalAlignment,oe=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*le,pe=re.y*pe-re.y*oe+re.offsetY-(.5*pe-.5*oe)-oe/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*le+"%",x.style.lineHeight="normal",x.style.width=ce+"px",x.style.left=(we-ce/2|0)-1+"px",x.style.top=(ne+pe|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=le,x.className="goTXarea",E.div.appendChild(x),x.focus(),z.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(b){b.div.removeChild(x)}}}oa.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||eu&&eu!==this&&(eu.acceptText(xl),eu&&eu!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Ya&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Vo&&!y.isSelected||this.starting===vs&&2>a.lastInput.clickCount)):!1},oa.prototype.doStart=function(){eu=this,this.textBlock!==null&&this.doActivate()},oa.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 Ya&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=Aa;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new Bn(this.textBlock.ga(Ws),this.textBlock.ga(wl));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},oa.prototype.doCancel=function(){this.stopTool()},oa.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},oa.prototype.doMouseDown=function(){this.isActive&&this.acceptText(xl)},oa.prototype.acceptText=function(a){switch(a){case xl:this.qa===Ol?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===Aa||this.qa===zl||this.qa===es)&&(this.qa=rs,rl(this));break;case Gs:case ha:case Pa:(ha!==a||this.textBlock.isMultiline!==!0)&&(this.qa===Aa||this.qa===zl||this.qa===es)&&(this.qa=rs,rl(this))}};function rl(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,z="";b.valueFunction!==null&&(z=b.valueFunction()),a.isValidText(y,E,z)?(a.Ea(a.name),a.qa=Ol,a.transactionResult=a.name,y.text=z,a.doSuccess(E,z),x!==null&&x.R("TextEdited",y,E),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=zl,a.doError(E,z))}}oa.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)},oa.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},oa.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Ko,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},oa.prototype.doStop=function(){eu=null},oa.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)))},oa.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},yt.Object.defineProperties(oa.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)}}}),oa.prototype.measureTemporaryTextBlock=oa.prototype.Lx;var Gs=new qt(oa,"LostFocus",0),xl=new qt(oa,"MouseDown",1),Pa=new qt(oa,"Tab",2),ha=new qt(oa,"Enter",3),ya=new qt(oa,"SingleClick",0),Vo=new qt(oa,"SingleClickSelected",1),vs=new qt(oa,"DoubleClick",2),Ko=new qt(oa,"StateNone",0),Aa=new qt(oa,"StateActive",1),es=new qt(oa,"StateEditing",2),rs=new qt(oa,"StateValidating",3),zl=new qt(oa,"StateInvalid",4),Ol=new qt(oa,"StateValidated",5),eu=null;oa.className="TextEditingTool",oa.LostFocus=Gs,oa.MouseDown=xl,oa.Tab=Pa,oa.Enter=ha,oa.SingleClick=ya,oa.SingleClickSelected=Vo,oa.DoubleClick=vs,oa.StateNone=Ko,oa.StateActive=Aa,oa.StateEditing=es,oa.StateValidating=rs,oa.StateInvalid=zl,oa.StateValidated=Ol,li("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function ws(a){_u||(tu(),_u=!0),this.H=Fc,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=El,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Kn,this.ce=new Fs,this.ce.Yd=this,this.Ei=new Kn,this.pu=new Kn,this.Sr=new Kn,this.pr=new Kn,a&&Object.assign(this,a)}ws.prototype.Xe=function(a){this.H=a},ws.prototype.canStart=function(){return!0};function Ul(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Rl(a.H),a.zb=!0)}function Sl(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===El?(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===zu&&y.vc.clear(),a.Qw=!!(a.Pk===ju&&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(),Yl(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==cu&&b!==null&&(delete b.start.scale,delete b.end.scale),nt.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Tl(x),Hd(x),a.zb=!1,y.start(),y.bc&&(bs(a),x.Ya(),Yc(y,0),gu(x,!0),$s(a),x.R("AnimationStarting",a)))}))}}function kl(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Rc(a,y,x,b){a.isTicking||kl(a)||y instanceof hi&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}Be=ws.prototype,Be.fv=function(a){return this.ce.fv(a)},Be.Xu=function(a){return this.ce.Xu(a)};function Cs(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 z=E.pu.iterator;z.next();){var ne=z.value;if(ne.bc!==!1){e:if(0<ne.yl.count)var re=!0;else{for(re=ne.vc.iterator;re.next();){var oe=re.key;if(oe instanceof Yt&&oe.diagram!==null||oe instanceof gn){re=!0;break e}}re=!1}re?Xu(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(bs(E),gu(E.H),$s(E)),nt.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),nt.requestAnimationFrame(function(){x()}))}function ks(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function bs(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 $s(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Be.Cc=function(a){var y=this.ce;if(this.zb===!0&&(this.Ok=this.zb=!1,this.Zd.clear(),0<y.vc.count&&this.H.$b()),this.bc){if(y.Ml(!0),y.vc.clear(),Yl(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Yl(y,this.H)},Be.Ml=function(a){a===this.defaultAnimation&&this.defaultAnimation.vc.clear(),this.Ei.remove(a),this.Ei.count===0&&(this.bc=!1,this.H.$b()),a===this.defaultAnimation&&(this.defaultAnimation.vc.clear(),this.H.R("AnimationFinished",this))},Be.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Hs(this,a))},Be.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),Ks(this.ce,y,"position",y.position,y.position),Hs(this,a))};function bl(a,y,x){!a.zb||y.D(x)||kl(a)||(a.H.pi||(y=x.copy()),Ks(a.ce,a.H,"position",y,x))}function Qa(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Hs(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Hl(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],ne=a[1],re=a[2];a=a[3];var oe=y[0],le=y[1],ce=y[2];return y=y[3],re===0||re===100?(z=oe,ne=le):(ce===0||ce===100)&&(oe=z,le=ne),180<Math.abs(oe-z)&&(oe>z?z+=360:oe+=360),z=E(x,z,oe-z,b)%360,ne=E(x,ne,le-ne,b),re=E(x,re,ce-re,b),x=E(x,a,y-a,b),"hsla("+z+", "+ne+"%, "+re+"%, "+x+")"}function tu(){function a(x,b,E,z,ne,re){x.position=new tt(z(ne,b.x,E.x-b.x,re),z(ne,b.y,E.y-b.y,re))}var y=new Ti;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,z,ne,re){ne<re?x.mm(z(ne,b.x,E.x-b.x,re),z(ne,b.y,E.y-b.y,re),!1):x.position=new tt(z(ne,b.x,E.x-b.x,re),z(ne,b.y,E.y-b.y,re))}),y.add("location",function(x,b,E,z,ne,re){ne<re?x.mm(z(ne,b.x,E.x-b.x,re),z(ne,b.y,E.y-b.y,re),!0):x.location=new tt(z(ne,b.x,E.x-b.x,re),z(ne,b.y,E.y-b.y,re))}),y.add("position:placeholder",function(x,b,E,z,ne,re){ne<re?x.mm(z(ne,b.x,E.x-b.x,re),z(ne,b.y,E.y-b.y,re),!1):x.position=new tt(z(ne,b.x,E.x-b.x,re),z(ne,b.y,E.y-b.y,re))}),y.add("position:nodeCollapse",function(x,b,E,z,ne,re){var oe=x.actualBounds,le=E.actualBounds;E=le.x+le.width/2-oe.width/2,oe=le.y+le.height/2-oe.height/2,ne<re?x.mm(z(ne,b.x,E-b.x,re),z(ne,b.y,oe-b.y,re),!1):x.position=new tt(z(ne,b.x,E-b.x,re),z(ne,b.y,oe-b.y,re))}),y.add("desiredSize",function(x,b,E,z,ne,re){x.desiredSize=new Bn(z(ne,b.width,E.width-b.width,re),z(ne,b.height,E.height-b.height,re))}),y.add("width",function(x,b,E,z,ne,re){x.width=z(ne,b,E-b,re)}),y.add("height",function(x,b,E,z,ne,re){x.height=z(ne,b,E-b,re)}),y.add("fill",function(x,b,E,z,ne,re){x.fill=Hl(b,E,ne,re,z)}),y.add("stroke",function(x,b,E,z,ne,re){x.stroke=Hl(b,E,ne,re,z)}),y.add("strokeWidth",function(x,b,E,z,ne,re){x.strokeWidth=z(ne,b,E-b,re)}),y.add("strokeDashOffset",function(x,b,E,z,ne,re){x.strokeDashOffset=z(ne,b,E-b,re)}),y.add("background",function(x,b,E,z,ne,re){x.background=Hl(b,E,ne,re,z)}),y.add("areaBackground",function(x,b,E,z,ne,re){x.areaBackground=Hl(b,E,ne,re,z)}),y.add("opacity",function(x,b,E,z,ne,re){x.opacity=z(ne,b,E-b,re)}),y.add("scale",function(x,b,E,z,ne,re){x.scale=z(ne,b,E-b,re)}),y.add("angle",function(x,b,E,z,ne,re){x.angle=z(ne,b,E-b,re)}),Yu=y}yt.Object.defineProperties(ws.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&&Vn(a,">= 1",ws,"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}}}),ws.prototype.stopAnimation=ws.prototype.Cc;var Yu=null,_u=!1,El=new qt(ws,"Default",1),ju=new qt(ws,"AnimateLocations",2),zu=new qt(ws,"None",3);ws.className="AnimationManager",ws.defineAnimationEffect=function(a,y){_u||(tu(),_u=!0),Yu.add(a,y)},ws.Default=El,ws.AnimateLocations=ju,ws.None=zu;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=cc,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=jo,this.vc=new Ti,this.Tt=new Ti,this.yl=new Kn,this.Ut=new Kn,this.dw=Ud,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,Xu(this,!0),bs(this.Yd),gu(this.H),$s(this.Yd),this.H.redraw()};function Yl(a,y){if(a.Tt.clear(),a.Wk=!1,a.au=0,a.Gd=NaN,0<a.yl.count&&a.yl.clear(),0<a.Ut.count&&a.Ut.clear(),y!==null)for(a=y.links;a.next();)a.value.Tg=null}Be=Fs.prototype,Be.start=function(){if(this.vc.count===0||this.bc)return this;for(var a=this.H,y=this.vc.iterator;y.next();){var x=y.key;a===null&&(x instanceof gn?a=x:x instanceof Yt&&(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===El&&this===y.defaultAnimation&&(this.Lp=dc,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=pf),bs(y),this.yl.each(function(b){b.data=null,a.add(b)}),$s(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Cs(y,this),this)},Be.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Be.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof gn?this.H=a:a instanceof Yt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Pr){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return Ks(this,a,y,x,b,E),this};function Ks(a,y,x,b,E,z){var ne=a.vc;if(y instanceof gn&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(bc(b),Yf(),b=[nc.j,nc.u,nc.o,nc.F],bc(E),Yf(),E=[nc.j,nc.u,nc.o,nc.F]),ne.contains(y)){var re=ne.I(y),oe=re.start,le=re.end;oe[x]===void 0&&(oe[x]=Zs(b)),le[x]=Zs(E)}else oe={},le={},oe[x]=Zs(b),le[x]=Zs(E),re=oe.position,y instanceof Yt&&re instanceof tt&&!re.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&re.assign(le.position),re=new Ju(oe,le,z),ne.add(y,re);ne=oe[x],ne instanceof tt&&!ne.w()&&ne.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof Pr?re.Ku.location=Zs(y.location):z&&(re.Ku[x]=Zs(b))}function Zs(a){return a instanceof tt||a instanceof ci?a.copy():a}Be.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Be.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function Xu(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),bs(x),Yc(a,E),gu(a.H,!0),$s(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 Yc(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var z=b.key;if(!(z instanceof Yt&&z.diagram===null)){var ne=b.value,re=E?ne.end:ne.start;ne=E?ne.start:ne.end;var oe=Yu,le;for(le in ne)le==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||oe.get(le)===null||oe.get(le)(z,re[le],ne[le],a.Lp,y,x,a)}}}Be.stop=function(){return this.bc?(this.Ml(!0),this):this},Be.Ml=function(a){if(this.vu!==null&&this.vu.jo.remove(this.Nw),this.bc){var y=this.H,x=this.Yd;this.Xk=this.bc=x.Ok=!1,bs(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 z=Yu;b.next();){var ne=b.key,re=b.value,oe=E?re.end:re.start,le=E?re.start:re.end,ce=re.Ku,pe;for(pe in le)if(z.get(pe)!==null){var we=pe;!re.Hu||we!=="position:nodeCollapse"&&we!=="position:placeholder"||(we="position"),z.get(we)(ne,oe[pe],ce[pe]!==void 0?ce[pe]:re.Hu?oe[pe]:le[pe],this.Lp,this.Gd,this.Gd,this)}re.Hu&&ce.location!==void 0&&ne instanceof Pr&&(ne.location=ce.location),re.nv&&ne instanceof Pr&&ne.Zb(!1)}if(y.As.clear(),ch(y,!1),y.Ya(),y.N(),gu(y,!0),x.defaultAnimation===this){for(pe=x.pr.iterator;pe.next();)E=pe.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}gu(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),$s(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Yl(this,null),x.Ml(this),y.$b())}},Be.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof mo&&(b=y.placeholder),b!==null?(x=b.ga(Ws),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 mo)for(a=a.memberParts;a.next();)b=a.value,b instanceof Di&&this.Cj(b,y)},Be.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof mo&&(x=y.placeholder),x!==null){var b=x.ga(Ws);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 mo)for(a=a.memberParts;a.next();)b=a.value,b instanceof Di&&this.Aj(b,y)}},Be.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},yt.Object.defineProperties(Fs.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Vn(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:Rt("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 cc(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function dc(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=cc,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=dc;function Ju(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Ju.className="AnimationState";function Hu(a,y,x){this.xd=null,this.rf=a,this.so=x||Qs,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Ml))}Hu.prototype.copy=function(){var a=new Hu(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 ys(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))}yt.Object.defineProperties(Hu.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 Qs=new qt(Hu,"Default",1),Ml=new qt(Hu,"Immediate",2),qs=new qt(Hu,"Bundled",3);Hu.className="AnimationTrigger",Hu.Default=Qs,Hu.Immediate=Ml,Hu.Bundled=qs;function cs(a){Io(this),this.H=null,this.Pa=new $n,this.xa="",this.pb=1,this.o=!1,this.j=this.Uh=this.u=this.Oi=this.Ni=this.Mi=this.Li=this.Ji=this.Ki=this.Ii=this.Qi=this.Hi=this.Pi=this.Gi=this.Fi=!0,this.Zq=[],a&&Object.assign(this,a)}Be=cs.prototype,Be.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,ru(x)}a.clear(),this.Zq.length=0},Be.Xe=function(a){this.H=a},Be.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,b=0,E=0,z=0,ne=0,re=this.Pa.iterator;re.next();){var oe=re.value;oe instanceof mo?E++:oe instanceof Di?b++:oe instanceof hi?z++:oe instanceof ga?ne++:x++}if(re="",0<x&&(re+=x+" Parts "),0<b&&(re+=b+" Nodes "),0<E&&(re+=E+" Groups "),0<z&&(re+=z+" Links "),0<ne&&(re+=ne+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,re+=`
|
|
|
`+x.toString(),b=x.data,b!==null&&Yi(b)&&(re+=" #"+Yi(b)),x instanceof Di?re+=" "+sr(b):x instanceof hi&&(re+=" "+sr(x.fromNode)+" "+sr(x.toNode));return y+" "+this.Pa.count+": "+re},Be.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var E=tt.alloc(),z=this.Pa.s,ne=z.length;ne--;){var re=z[ne];if((b!==!0||wf(re)!==!1)&&re.isVisible()&&(E.assign(a),Ao(E,re.oe),re=re.ic(E,y,x),re!==null&&(y!==null&&(re=y(re)),re!==null&&(x===null||x(re)))))return tt.free(E),re}return tt.free(E),null},Be.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof $n||b instanceof Kn||(b=new Kn),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var z=tt.alloc(),ne=this.Pa.s,re=ne.length;re--;){var oe=ne[re];if((E!==!0||wf(oe)!==!1)&&oe.isVisible()){z.assign(a),Ao(z,oe.oe);var le=oe;oe.ji(z,y,x,b)&&(y!==null&&(le=y(le)),le===null||x!==null&&!x(le)||b.add(le))}}return tt.free(z),b},Be.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 $n||E instanceof Kn||(E=new Kn),this.Uh===!1)return E;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var ne=this.Pa.s,re=ne.length;re--;){var oe=ne[re];if((z!==!0||wf(oe)!==!1)&&oe.isVisible()){var le=oe;oe.Cf(a,y,x,b,E)&&(y!==null&&(le=y(le)),le===null||x!==null&&!x(le)||E.add(le))}}return E},Be.Nu=function(a,y,x,b,E,z,ne){if(this.Uh===!1)return E;for(var re=this.Pa.s,oe=re.length;oe--;){var le=re[oe];if((ne!==!0||wf(le)!==!1)&&z(le)&&le.isVisible()){var ce=le;le.Cf(a,y,x,b,E)&&(y!==null&&(ce=y(ce)),ce===null||x!==null&&!x(ce)||E.add(ce))}}return E},Be.og=function(a,y,x,b,E,z){if(x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof $n||E instanceof Kn)&&(z=E),E=!0),z instanceof $n||z instanceof Kn||(z=new Kn),this.Uh===!1)return z;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var re=tt.alloc(),oe=tt.alloc(),le=this.Pa.s,ce=le.length;ce--;){var pe=le[ce];if((ne!==!0||wf(pe)!==!1)&&pe.isVisible()){re.assign(a),Ao(re,pe.oe),oe.h(a.x+y,a.y),Ao(oe,pe.oe);var we=pe;pe.og(re,oe,x,b,E,z)&&(x!==null&&(we=x(we)),we===null||b!==null&&!b(we)||z.add(we))}}return tt.free(re),tt.free(oe),z},Be.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=Si();for(var E=Si(),z=0;z<b;z++){var ne=x[z];if(ne.vw=z,ne instanceof hi){if(ne.fd===!1)continue}else if(ne instanceof ga&&ne.adornedPart!==null)continue;var re=ne.actualBounds;ne.isVisible()&&Ql(re,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],$v(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++)$v(E[y]);Ni(a),Ni(E)}}};function Ll(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Be.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var b=x.length;if(b!==0){if(a.isTemporary)for(var E=0;E<b;E++)x[E].Gj();E=Ll(this,a);var z=this.Zq;z.length=0;for(var ne=y.scale,re=Bn.alloc(),oe=0;oe<b;oe++)this.Oj(a,x[oe],y,z,ne,re,!0);if(Bn.free(re),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function Eu(a,y,x,b,E){if(a.visible&&a.pb!==0&&(E||!a.isTemporary)){E=a.Pa.s;var z=E.length;if(z!==0){var ne=Ll(a,y),re=a.Zq;re.length=0;for(var oe=x.scale,le=Bn.alloc(),ce=0;ce<z;ce++){var pe=E[ce];b.contains(pe)&&a.Oj(y,pe,x,re,oe,le,!1)}Bn.free(le),y.globalAlpha=ne}}}Be.Oj=function(a,y,x,b,E,z,ne){if(ne&&!wf(y))a.Hs(y);else{if(b!==null&&y instanceof hi&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(ne=!1,b=y.containingGroup;b!==null;)ne?b.tb!==null&&z.Ex(b.tb):b.tb!==null&&(ne=!0,z.assign(b.tb)),b=b.containingGroup;var re=y.actualBounds;if(b=!1,ne&&y.isVisible()){if(!z.Yc(re)){a.Hs(y);return}b=!z.Re(re)}b&&(a.save(),a instanceof Fa?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),re.width*E>x.Oq||re.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,z=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,z,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,z,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,z,E),a.fillRect(0,0,z.width/2,z.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),b&&(a.restore(),a.Vc(!0))}},Be.g=function(a,y,x,b,E){var z=this.diagram;z!==null&&z.cb(Ha,a,this,y,x,b,E)},Be.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&ru(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)),Sc(this,a,y),a},Be.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var 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,ru(y),a};function Sc(a,y,x){if(y=_d(a,y,x),x instanceof mo&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,z=E.length,ne=0;ne<z;ne++){var re=E[ne];if(re===x&&(y=ne,0<=b)||0>b&&re.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&&Sc(a,-1,y)}x.svg!==null&&x.svg.remove()}function _d(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 z=y-1,ne=NaN;0<=z&&(ne=a.M(z).zOrder,!!isNaN(ne));)z--;for(var re=y+1,oe=NaN;re<E&&(oe=a.M(re).zOrder,!!isNaN(oe));)re++;if(!isNaN(ne)&&ne>b)for(;;){if(z===-1||ne<=b){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(ne=NaN;0<=--z&&(ne=a.M(z).zOrder,isNaN(ne)););}else if(!isNaN(oe)&&oe<b)for(;;){if(re===E||oe>=b){if(re--,re===y)break;return a.mb(y),a.Gb(re,x),re}for(oe=NaN;++re<E&&(oe=a.M(re).zOrder,isNaN(oe)););}return y}yt.Object.defineProperties(cs.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===""&&Rt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Rt("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)&&Vn(a,"0 <= value <= 1",cs,"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))}}}),cs.prototype.findObjectsNear=cs.prototype.og,cs.prototype.findObjectsIn=cs.prototype.Cf,cs.prototype.findObjectsAt=cs.prototype.ji,cs.prototype.findObjectAt=cs.prototype.ic,cs.className="Layer";function gn(a,y){if(ip||(nu(),ip=!0),Io(this),Fc=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Ns){var x=this,b=function(){x.removeEventListener(nt.document,"DOMContentLoaded",b,!1),x.setRTL()};nt.document.body!==null?this.setRTL():x.addEventListener(nt.document,"DOMContentLoaded",b,!1)}this.ol=null,Uf.add("Model",ka);var E=this;return this.Hb=function(z){var ne=E.partManager;if(z.model===ne.diagram.model&&ne.diagram.aa){ne.diagram.aa=!1;try{var re=z.change;z.modelChange===""&&re===Ha&&ne.updateDataBindings(z.object,z.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(z){E.partManager.doModelChanged(z)},this.hu=this.ku=null,df(this),this.model=Sy(),this.Wg=!0,dh(this),this.layout=new ms,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 rp,a!==void 0&&(typeof a=="string"||nt.Element&&a instanceof Element?Rh(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var ld,Fc;function df(a){a.Yd=new ws,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new $n,a.pj=new Ti,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 ur,a.zu=new tt(NaN,NaN).freeze(),a.ut=new Bn(NaN,NaN,NaN,NaN).freeze(),a.rj=new or(0,0,0,0).freeze(),a.sj=Ud,a.nu=!1,a.Zt=null,a.fu=null,a.yh=cu,a.zk=Jt,a.Fg=cu,a.pq=Jt,a.yt=Ws,a.Bt=Ws,a.Fc=!0,a.pn=!1,a.De=new Kn,a.Eh=new Ti,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new or(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new La,a.bq.diagram=a,a.Qg=new La,a.Qg.diagram=a,a.cj=new La,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,Zp(a),a.ai=new Kn,a.Ht=!0,a.uu=Nd,a.pw=!1,a.wu=Ph,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 Ti,a.Xn=new $n,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 or(5).freeze(),a.Hw=new Kn().freeze(),a.Nt=999999999,a.nw=new Kn().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 Kn,a.ow=new Kn,a.Xh=null,a.aw=new ci(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new tt,bounds:new Bn,Py:new ci,bA:new ci,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Bn(NaN,NaN,NaN,NaN).freeze(),a.wo=new ci(NaN,NaN).freeze(),a.Sp=new Bn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Ti;var y=new Di,x=new Ya;x.bind(new ol("text","",sr)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Di,x=new Ya,x.stroke="brown",x.bind(new ol("text","",sr)),y.add(x),a.Lg.add("Comment",y),y=new Di,y.selectable=!1,y.avoidable=!1,x=new bo,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new ci(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Ti,y=new mo,y.selectionObjectName="GROUPPANEL",y.type=ui.Vertical,x=new Ya,x.font="bold 12pt sans-serif",x.bind(new ol("text","",sr)),y.add(x),x=new ui(ui.Auto),x.name="GROUPPANEL";var b=new bo;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new Fu,b.padding=new or(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Ti,y=new hi,x=new bo,x.isPanelMain=!0,y.add(x),x=new bo,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new hi,x=new bo,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new ga,y.type=ui.Auto,x=new bo,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Fu,x.margin=new or(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new ga,y.type=ui.Link,x=new bo,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 ka,a.toolManager=new Ua,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new ae,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=zd(),a.eq=null,a.fq=Or,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}gn.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Hh=null,Vd="",jd(this,!1),this.Xn.clear(),fp(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function jd(a,y){a.animationManager.Cc(!0),a.Hw=new Kn().freeze(),a.nw=new Kn().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 z=[],ne=a.Wa.length;if(y){for(y=0;y<ne;y++)for(var re=a.Wa.s[y].parts;re.next();){var oe=re.value;oe!==E&&oe.data===null&&z.push(oe)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<ne;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),fp(),a.Og.clear(),Er=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),z}function zd(){return null}gn.prototype.reset=function(){this.clear(),this.vb=!0,df(this),qc(this),this.Wg=!0,dh(this),this.layout=new ms,this.Wg=!1,this.model=Sy(),this.model.undoManager=new ns,this.vb=this.rn=!1,this.N()},gn.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=nt.document.body);var y=pn("div");y.dir="rtl",y.style.cssText="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll;",y.textContent="A",a.appendChild(y);var x="reverse";0<y.scrollLeft?x="default":(y.scrollLeft=1,y.scrollLeft===0&&(x="negative")),a.removeChild(y),this.bu=x},gn.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=nt.document.body);var y=0;if(Ns){var x=np;y=ld,x===null&&(x=np=pn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=ld=pn("div"),y.style.position="absolute",y.style.visibility="hidden",y.style.width="200px",y.style.height="150px",y.style.boxSizing="content-box",y.appendChild(x)),y.style.overflow="hidden",a.appendChild(y);var b=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,b===x&&(x=y.clientWidth),a.removeChild(y),y=b-x,y!==0||Qr||(y=11)}this.Db=y,this.Gw=!0},gn.prototype.qb=function(a){a.classType===gn&&(this.autoScale=a)},gn.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 Rh(a,y){if(Ns){if(y!=null||Rt("Diagram setup requires an argument DIV."),a.Ka!==null&&Rt("Diagram has already completed setup."),typeof y=="string"?a.Ka=nt.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Rt("No DIV or DIV id supplied: "+y),a.Ka===null&&Rt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Rt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&nt.ResizeObserver){var x=fn(function(){a.$b()},250);a.ol=new nt.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}nt.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var 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=nt.go;var E=new Jl(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",nt.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),Gd(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new Jl(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,Ns){E=pn("div");var z=pn("div");E.style.position="absolute",E.style.overflow="auto",E.style.width=a.Aa+"px",E.style.height=a.ya+"px",E.style.zIndex="1",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(E),E.appendChild(z),E.onscroll=Zf,E.addEventListener("pointerdown",hh),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=z}a.hk=fn(function(){a.Yh=null,a.N()},300),a.Ov=fn(function(){Hd(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var re=Mu(a,ne,!0);re.bubbles=!0;var oe=0,le=0;re.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(oe=0<ne.deltaX?1:-1),ne.deltaY!==0&&(le=0<ne.deltaY?1:-1),re.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-oe:-le):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(oe=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(le=0<ne.wheelDeltaY?-1:1),re.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-oe:-le):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(re.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),Zu(re,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,Mu(a,ne,!0),ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())},a.ui=function(ne){if(a.isEnabled){a.Vk=!0;var re=a.Yt;re[ne.pointerId]===void 0&&(re[ne.pointerId]=ne),re=a.oj;var oe=!1;if(re[0]===null||re[0].pointerId!==ne.pointerId&&re[0].pointerType===ne.pointerType)if(re[1]!==null&&re[1].pointerId===ne.pointerId)re[1]=ne,oe=!0;else if(re[0]===null)re[0]=ne;else if(re[1]===null)re[1]=ne,oe=!0;else{ne.preventDefault();return}else re[0]=ne;(re=ne.pointerType==="touch"||ne.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var le=oe;oe=_h(a,ne,!0,!1,!0,le),Xc(a,ne,oe),oe.targetDiagram=Fd(ne,ne.target),oe.targetObject=null,le||oe.clone(a.bq),le=a.uw,re=re?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(le.x-ne.screenX)>re||Math.abs(le.y-ne.screenY)>re)?a.yq++:a.yq=1,oe.clickCount=a.yq,a.tw=ne.timeStamp,a.uw.sg(ne.screenX,ne.screenY),a.doMouseDown(),ne.button===1?ne.preventDefault():Zu(oe,ne)}},a.dk=function(ne){if(a.isEnabled){a.Vk=!0;var re=a.oj;if(re[0]===null||re[0].pointerId!==ne.pointerId&&re[0].pointerType===ne.pointerType){if(re[1]!==null&&re[1].pointerId===ne.pointerId){re[1]=ne;return}if(re[0]===null)re[0]=ne;else return}else re[0]=ne;if(re[0].pointerId===ne.pointerId){re=_h(a,ne,!1,!1,!1,re[1]!==null);var oe=nt.document.elementFromPoint(ne.clientX,ne.clientY)||null;oe!==null&&oe.shadowRoot!==void 0&&oe.shadowRoot!==null&&(oe=oe.shadowRoot.elementFromPoint(ne.clientX,ne.clientY));var le=a,ce=ne;oe&&oe.H&&(ce=ne,le=oe.H),re.targetDiagram=le,Xc(a,ce,re),re.targetObject=null,a.doMouseMove(),Zu(re,ne)}}},a.fk=function(ne){if(a.isEnabled){a.Vk=!0;var re=ne.pointerType==="touch"||ne.pointerType==="pen",oe=a.Yt;if(re&&a.qu)delete oe[ne.pointerId],ne.preventDefault();else if(oe=a.oj,oe[0]===null||oe[0].pointerId!==ne.pointerId&&oe[0].pointerType===ne.pointerType)oe[1]!==null&&oe[1].pointerId===ne.pointerId&&(oe[1]=null);else{oe[0]=null,oe=_h(a,ne,!1,!0,!0,!1);var le=nt.document.elementFromPoint(ne.clientX,ne.clientY)||null;le!==null&&le.shadowRoot!==void 0&&le.shadowRoot!==null&&(le=le.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),le!==null&&le.H instanceof gn&&le.H!==a&&Xc(le.H,ne,oe),le===null&&(le=ne.target),Xc(a,ne,oe),oe.clickCount=a.yq,oe.targetDiagram=Fd(ne,le),oe.targetObject=null,a.doMouseUp(),Zu(oe,ne),re&&(a.wq=!1)}}},a.ek=function(ne){if(a.isEnabled){a.Vk=!1;var re=a.Yt;re[ne.pointerId]&&delete re[ne.pointerId],re=a.oj,re[0]!==null&&re[0].pointerId===ne.pointerId&&(re[0]=null),re[1]!==null&&re[1].pointerId===ne.pointerId&&(re[1]=null),ne.pointerType!=="touch"&&ne.pointerType!=="pen"&&(ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())}},a.ck=function(ne){var re=a.oj;re[0]!==null&&re[0].pointerId===ne.pointerId?(re[0]=null,a.wq=!1):re[1]!==null&&re[1].pointerId===ne.pointerId&&(re[1]=null)},a.Vp=b.Z["d"+bh[1]+bh[2]+"wI"+Ch.slice(1,5)]["b"+DS.slice(1,y)](b.Z,mf,y,y),b.Vc(!0),Qg(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}gn.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},gn.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function Qg(a){var y=a.ta.Oa;y instanceof HTMLCanvasElement||(y=a.div),a.addEventListener(y,"pointerdown",a.ui,!1),a.addEventListener(y,"pointermove",a.dk,!1),a.addEventListener(y,"pointerup",a.fk,!1),a.addEventListener(y,"pointerout",a.ek,!1),a.addEventListener(y,"pointercancel",a.ck,!1),a.addEventListener(y,"pointerenter",a.bz,!1),a.addEventListener(y,"pointerleave",a.cz,!1),a.addEventListener(y,"wheel",a.$j,!1),a.addEventListener(y,"keydown",a.Qz,!1),a.addEventListener(y,"keyup",a.Rz,!1),a.addEventListener(y,"blur",a.Ny,!1),a.addEventListener(y,"focus",a.Oy,!1),a.addEventListener(y,"selectstart",function(x){return x.preventDefault(),!1},!1),a.addEventListener(y,"contextmenu",function(x){return x.preventDefault(),!1},!1),a.addEventListener(nt,"resize",a.Ov,!1)}function Tl(a){30<a.Sq&&(a.Yh=1)}function ch(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),$r&&$r.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}gn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:nt.devicePixelRatio||1},gn.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},gn.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},gn.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},gn.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},gn.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},gn.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},gn.prototype.doFocus=function(){this.focus()},gn.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=nt.scrollX||nt.pageXOffset,y=nt.scrollY||nt.pageYOffset;this.ta.focus(),nt.scrollTo(a,y)}},gn.prototype.Oy=function(){this.H.R("GainedFocus")},gn.prototype.Ny=function(){this.H.R("LostFocus")};function Hd(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===cu&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function dh(a){var y=new cs;y.name="Background",a.Al(y),y=new cs,y.name="",a.Al(y),y=new cs,y.name="Foreground",a.Al(y),y=new cs,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new cs,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new cs,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function hf(a){var y=new ui(ui.Grid);y.name="GRID";var x=new bo;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new bo,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new bo,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new bo,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new bo,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new bo,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Pr,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 Zf(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):dd(this.H)}function hh(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):dd(this.H)}gn.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,z=this.rj,ne=b.x-z.left,re=b.y-z.top,oe=b.width+z.left+z.right,le=b.height+z.top+z.bottom,ce=b.right+z.right;z=b.bottom+z.bottom;var pe=E.x;b=E.y;var we=E.width,Ee=E.height,Ae=E.right,_e=E.bottom;E=this.scale;var ct=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":ct=ct+a.scrollWidth-a.clientWidth;break;case"reverse":ct=a.scrollWidth-ct-a.clientWidth}var Qe=ct;we<oe||Ee<le?(ct=tt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Qe&&(ct.x=Qe/E+ne,this.ju=Qe),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(ct.y=a.scrollTop/E+re,this.lu=a.scrollTop),this.position=ct,tt.free(ct),this.Ee=this.qr=!1):(ct=tt.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<pe&&(this.position=ct.h(Qe+ne,this.position.y)),ce>Ae&&(this.position=ct.h(-(y.scrollWidth-this.Aa)+Qe-this.Aa/E+ce,this.position.y))),a.vy&&this.allowVerticalScroll&&(re<b&&(this.position=ct.h(this.position.x,a.scrollTop+re)),z>_e&&(this.position=ct.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+z))),tt.free(ct),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,ce=b.right,Ae=E.right,z=b.bottom,_e=E.bottom,ne=b.x,pe=E.x,re=b.y,b=E.y,we>=oe&&ne>=pe&&ce<=Ae&&(x.style.width="1px"),Ee>=le&&re>=b&&z<=_e&&(x.style.height="1px"))}},gn.prototype.computeBounds=function(a){return a===void 0&&(a=new Bn),Rl(this),fh(this,a)};function fh(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,z=0;z<E;z++){var ne=b[z];if(ne.visible&&ne.isInDocumentBounds){ne=ne.Pa.s;for(var re=ne.length,oe=0;oe<re;oe++){var le=ne[oe];le.isInDocumentBounds&&le.isVisible()&&(le=le.actualBounds,le.w()&&(x?(x=!1,y.assign(le)):y.ed(le)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}gn.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(hn(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof hi||(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 hi||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new Bn(NaN,NaN,0,0):x};function Qu(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=Bn.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,Bn.free(b),tt.free(E),tt.free(x)}x=a.yh,y&&a.Fg!==cu&&(x=a.Fg);var z=x!==cu?Zd(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/z;var ne=a.ya/z,re=a.zk,oe=a.pq;y&&!re.sb()&&(oe.sb()||oe.Xb())&&(re=oe.Xb()?Oo:oe),ff(a,a.documentBounds,E,ne,re,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,_t.B(z.x,x)&&_t.B(z.y,b)&&_t.B(z.width,E)&&_t.B(z.height,ne)||a.onViewportBoundsChanged(new Bn(x,b,E,ne),z,y,!1)}}function Zd(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 z=a.Aa+(a.gf?a.Db:0),ne=a.ya+(a.Be?a.Db:0),re=z/E,oe=ne/b;return y===Wu?(y=Math.min(oe,re),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===Zh?(y=oe>re?(ne-a.Db)/b:(z-a.Db)/E,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}gn.prototype.zoomToFit=function(){var a=this.sj;this.sj=Ud,this.scale=Zd(this,Wu),a!==Ud&&(Qu(this,!1),ff(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Be=gn.prototype,Be.BA=function(a,y){y===void 0&&(y=Wu);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===Wu||y===Zh)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 z=this.ya;E=y===Zh?z/b>E/x?(z-(this.Be?this.Db:0))/b:(E-(this.gf?this.Db:0))/x:Math.min(z/b,E/x)}this.scale=E,this.position=new tt(a.x,a.y)}},Be.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))},Be.zz=function(a){if(a instanceof Yt){this.eq=a;var y=tt.alloc();this.fq=this.op(a.ga(Ws,y)),tt.free(y)}else this.eq=null,this.fq=Or};function ff(a,y,x,b,E,z){var ne=tt.allocAt(a.pa.x,a.pa.y),re=ne.x,oe=ne.y;if(a.eq!==null){var le=tt.alloc();le=a.eq.ga(Ws,le),re=le.x-a.fq.x/a.scale,oe=le.y-a.fq.y/a.scale,E=Ss,tt.free(le)}(z||a.scrollMode===Ud)&&(E.sb()&&(x>y.width&&(re=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(oe=y.y+(E.y*y.height+E.offsetY)-(E.y*b-E.offsetY))),E=a.rj,z=x-y.width,x<y.width+E.left+E.right?(re=Math.min(re+x/2,y.right+Math.max(z,E.right)-x/2),re=Math.max(re,y.left-Math.max(z,E.left)+x/2),re-=x/2):re>y.left?re=y.left:re<y.right-x&&(re=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(oe=Math.min(oe+b/2,y.bottom+Math.max(x,E.bottom)-b/2),oe=Math.max(oe,y.top-Math.max(x,E.top)+b/2),oe-=b/2):oe>y.top?oe=y.top:oe<y.bottom-b&&(oe=y.bottom-b)),ne.x=isFinite(re)?re:-a.yb.left,ne.y=isFinite(oe)?oe:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,ne),ne.x=y.x,ne.y=y.y),bl(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),qc(a),tt.free(ne)}Be.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Nc(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Pr)return a}else if(a=Nc(this,a,function(x){return x.part}),a instanceof Pr)return a;return null},Be.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),Rl(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 Nc(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),Rl(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}Be.lz=function(a,y,x){return y===void 0&&(y=!0),ud(this,a,function(b){return b.part},y?function(b){return b instanceof Pr&&b.canSelect()}:null,x)};function ud(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof $n||E instanceof Kn||(E=new Kn),Rl(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,b,E)}return E}Be.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof $n||b instanceof Kn||(b=new Kn),Rl(this);for(var E=this.Wa.iteratorBackwards;E.next();){var z=E.value;z.visible&&z.ji(a,y,x,b)}return b},Be.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),Wd(this,a,function(E){return E instanceof Pr&&(!x||E.canSelect())},y,b)},Be.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof $n||E instanceof Kn||(E=new Kn),Rl(this);for(var z=this.Wa.iteratorBackwards;z.next();){var ne=z.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},Be.Nu=function(a,y,x,b,E,z){var ne=new Kn;Rl(this);for(var re=this.Wa.iteratorBackwards;re.next();){var oe=re.value;oe.visible&&oe.Nu(a,y,x,b,ne,E,z)}return ne};function Wd(a,y,x,b,E){var z=null;for(z===void 0&&(z=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof $n||E instanceof Kn||(E=new Kn),Rl(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,z,x,b,E)}return E}Be.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),Ld(this,a,y,function(z){return z instanceof Pr&&(!b||z.canSelect())},x,E)},Be.og=function(a,y,x,b,E,z){x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof $n||E instanceof Kn)&&(z=E),E=!0),z instanceof $n||z instanceof Kn||(z=new Kn),Rl(this);for(var ne=this.Wa.iteratorBackwards;ne.next();){var re=ne.value;re.visible&&re.og(a,y,x,b,E,z)}return z};function Ld(a,y,x,b,E,z){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 $n||E instanceof Kn)&&(z=E),E=!0),z instanceof $n||z instanceof Kn||(z=new Kn),Rl(a),a=a.Wa.iteratorBackwards;a.next();){var re=a.value;re.visible&&!re.isTemporary&&re.og(y,x,ne,b,E,z)}return z}gn.prototype.acceptEvent=function(a){return Mu(this,a,a instanceof MouseEvent)};function Mu(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?Xc(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),Qr&&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=Fd(y,y.target),b.targetObject=null,b}function Fd(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 _h(a,y,x,b,E,z){var ne=a.Qg;return a.Qg=a.cj,a.cj=ne,ne.diagram=a,ne.clickCount=1,a=ne.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),ne.modifiers=a,ne.event=y,ne.timestamp=y.timeStamp,ne.button=y.button,ne.buttons=y.buttons,Qr&&y.button===0&&y.ctrlKey&&(ne.button=2),ne.down=x,ne.up=b,ne.handled=!1,ne.bubbles=E,ne.isMultiTouch=z,ne}function Zu(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}gn.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Mu(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(),Zu(x,a)},gn.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Mu(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(),Zu(x,a)},gn.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Mu(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Zu(x,a)},gn.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Mu(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Zu(x,a)},gn.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?Ao(new tt(y,a),this.Ab):new tt(y,a)};function Xc(a,y,x){var b=a.ta,E=a.Aa,z=a.ya,ne=0,re=0;b!==null&&(b=b.getBoundingClientRect(),ne=y.clientX-E/b.width*b.left,re=y.clientY-z/b.height*b.top),x.viewPoint.h(ne,re),a.Ab!==null?(y=tt.allocAt(ne,re),a.Ab.Cd(y),x.documentPoint.assign(y),tt.free(y)):x.documentPoint.h(ne,re)}function gh(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))}}gn.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function ph(a){a.ld||Rl(a),a.Va()}gn.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Be=gn.prototype,Be.Pz=function(){return this.kg},Be.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,gu(this),this.hf=!1,this.du=new tt(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&Jn(function(){b.ld=!1,Ul(y,"Model"),a(b)},1)},Be.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;nt.requestAnimationFrame(function(){y.kg&&y.bd()})}},Be.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),gu(this))};function cd(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||dd(a)||(y&&Rl(a),x&&Qu(a,!1))}function gu(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,z=E.length,ne=0;ne<z;ne++){var re=E[ne];gt(re,!1),re.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(oe){oe.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Hd(a),cd(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Qc(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),Rl(a),z=!1,(!a.hf||a.xh)&&(a.hf?Sg(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Sg(a,!1)),z=!0),a.Jk=!1,Rl(a),a.ou||ph(a),cd(a,!0,!1),ne=!1,z?(x=Bn.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,jh(a)),a.R("LayoutCompleted"),cd(a,!0,!1),Bn.free(x)):x.Ok&&x.Qw&&(a.Fg!==cu?a.scale=Zd(a,a.Fg):a.yh!==cu?a.scale=Zd(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Qu(a,!0)),z&&ne&&a.eb("Initial Layout"),Rl(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function jh(a){if(a.Fg!==cu)a.scale=Zd(a,a.Fg);else if(a.yh!==cu)a.scale=Zd(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}Qu(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Qc(a)}function Rl(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 Kn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof mo&&b.U&65536&&(b.U=b.U^65536)})}}Be.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof mo||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof mo&&x.isVisible()&&ss(this,x);for(a.reset();a.next();)x=a.value,x instanceof hi&&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 ga&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function ss(a,y){for(var x=Si(),b=Si(),E=y.memberParts;E.next();){var z=E.value;z.isVisible()&&(z instanceof mo?(mt(z)||Ft(z)||Pf(z))&&ss(a,z):z instanceof hi?z.fromNode===y||z.toNode===y?b.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,E=0;E<a;E++)z=x[E],z.measure(1/0,1/0),z.arrange();for(Ni(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();Ni(b)}Be.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},Be.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Rt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){fc(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,z=Math.round(y.x*E)/E,ne=Math.round(y.y*E)/E,re=this.Ab;for(re.reset(),E!==1&&re.scale(E),y.x===0&&y.y===0||re.translate(-z,-ne),a.ti=null,os(a,re.m11,re.m12,re.m21,re.m22,re.dx,re.dy),this.pb!==1&&(a.globalAlpha=this.pb),uu(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?Xd(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(ur.prototype.Cd=ur.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,fc(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&&!z.isAnimating)break e;z=this.Ab,z.reset(),ne=this.Mb,re=this.pa;var oe=this.Ca,le=Math.round(re.x*oe)/oe,ce=Math.round(re.y*oe)/oe;for(oe!==1&&z.scale(oe),re.x===0&&re.y===0||z.translate(-le,-ce),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),uu(this,a),re=0;re<E;re++)a.setTransform(ne,0,0,ne,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[re].gc(a,this);if(y=!1,this.Yf?Xd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(ur.prototype.Cd=ur.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=$r&&$r.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 tl(a,y,x,b,E,z,ne,re,oe,le){if(a.Ka!==null){a.ta===null&&Rt("No canvas specified"),ne===void 0&&(ne=null),re===void 0&&(re=null),oe===void 0&&(oe=!1),le===void 0&&(le=!1),fc(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ce=a.Ca;a.Ca=E;var pe=a.Wa.s,we=pe.length;try{var Ee=new Bn(z.x,z.y,b.width/E,b.height/E),Ae=Ee.copy();Ae.Co(x),Qc(a,Ae),Rl(a),a.Fd(pe,we,a,Ee),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),re!==null&&re!==""&&(y.fillStyle=re,y.ox(0,0,b.width,b.height));var _e=a.Mb;y.scale(_e,_e);var ct=ur.alloc();ct.reset(),ct.translate(x.left,x.top),ct.scale(E),z.x===0&&z.y===0||ct.translate(-z.x,-z.y),y.setTransform(ct.m11,ct.m12,ct.m21,ct.m22,ct.dx,ct.dy),y.yc(),y instanceof Fa&&os(y,ct.m11,ct.m12,ct.m21,ct.m22,ct.dx,ct.dy),ur.free(ct),uu(a,y),y.globalAlpha=a.pb;var Qe=a.Qj("Grid");if(ne){var Pt=new Kn,Et=ne.iterator;for(Et.reset();Et.next();){var Dt=Et.value;Dt instanceof Pr&&(le||Dt.layer!==Qe)&&(Dt.Gj(),Pt.add(Dt))}for(le=0;le<we;le++)Eu(pe[le],y,a,Pt,oe);Pt.each(function(mn){return mn.Gj()})}else for(Pt=0;Pt<we;Pt++){var Vt=pe[Pt];Vt===Qe?le&&Vt.gc(y,a,!0):Vt.gc(y,a,oe)}a.$i=!1,a.Yf&&Xd(a.Yf,a)&&a.Vp()}finally{a.Ca=ce,a.ib.Vc(!0),a.vd=!0,a.Fd(pe,we,a,a.viewportBounds),Qc(a),a.ib instanceof Fa&&(a.ib.Nj.PA(),a.redraw())}}}Be.Gf=function(a){return this.Rg[a]},Be.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Be.Tx=function(){this.Rg=new qi,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Qr||vo),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function uu(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Be.Ql=function(a){return this.on[a]},Be.sA=function(a,y){this.on[a]=y},Be.Sx=function(){this.on=new qi,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Be.set=function(a){return Object.assign(this,a),this},Be.Du=function(a){return this.nm(a)},Be.nm=function(a){return hc(this,a),this};function hc(a,y){var x=a instanceof ui,b=a instanceof gn,E;for(E in y){E===""&&Rt("Setting properties requires non-empty property names");var z=a,ne=E;if(x||b){var re=E.indexOf(".");if(0<re){var oe=E.substring(0,re);x?z=a.fb(oe):(z=a[oe],z==null&&(z=a.toolManager[oe])),tn(z)?ne=E.substr(re+1):Rt("Unable to find object named: "+oe+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!Wr(z,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&Wr(a.toolManager,ne))z=a.toolManager;else if(b&&qg(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof lr&&ne==="Changed"){a.Pe(y[ne]);continue}else Rt('Trying to set undefined property "'+ne+'" on object: '+z.toString());z[ne]=y[E],ne[0]==="_"&&z instanceof Yt&&z.Vw(ne)}}Be.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Ti,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Be.N=function(a){if(a===void 0)this.Fc=!0,this.$b();else{var y=this.viewportBounds;a.w()&&y.Yc(a)&&(this.Fc=!0,this.$b())}this.R("InvalidateDraw")},gn.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!==pf&&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),z=Math.min(a.y+a.height,y.y+y.height);if(0<Math.max(0,Math.min(a.x+a.width,y.x+y.width)-Math.max(a.x,y.x))*b&&0<Math.max(0,z-E)*b){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(b=Bn.alloc(),yg(this,this.computeBounds(b)),Bn.free(b)),b=this.ta,b===null||b instanceof Uo)))){var ne=this.Mb;E=this.Aa*ne;var re=this.ya*ne,oe=this.scale*ne;z=Math.round(Math.round(y.x*oe)-Math.round(a.x*oe)),y=Math.round(Math.round(y.y*oe)-Math.round(a.y*oe)),oe=this.jw,a=this.oy,oe.width!==E&&(oe.width=E),oe.height!==re&&(oe.height=re),a.clearRect(0,0,E,re),oe=190*ne;var le=70*ne,ce=Math.max(z,0),pe=Math.max(y,0),we=Math.floor(E-ce),Ee=Math.floor(re-pe);a.drawImage(b.Oa,ce,pe,we,Ee,0,0,we,Ee),Xd(this.Yf,this)&&a.clearRect(0,0,oe,le),b=Si(),a=Si(),Ee=Math.abs(z),we=Math.abs(y);var Ae=ce===0?0:E-Ee;ce=tt.allocAt(Ae,0),Ee=tt.allocAt(Ee+Ae,re),a.push(new Bn(Math.min(ce.x,Ee.x),Math.min(ce.y,Ee.y),Math.abs(ce.x-Ee.x),Math.abs(ce.y-Ee.y)));var _e=this.Ab;if(_e.reset(),_e.scale(ne,ne),this.Ca!==1&&_e.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&_e.translate(-ne.x,-ne.y),Ao(ce,_e),Ao(Ee,_e),b.push(new Bn(Math.min(ce.x,Ee.x),Math.min(ce.y,Ee.y),Math.abs(ce.x-Ee.x),Math.abs(ce.y-Ee.y))),Ae=pe===0?0:re-we,ce.h(0,Ae),Ee.h(E,we+Ae),a.push(new Bn(Math.min(ce.x,Ee.x),Math.min(ce.y,Ee.y),Math.abs(ce.x-Ee.x),Math.abs(ce.y-Ee.y))),Ao(ce,_e),Ao(Ee,_e),b.push(new Bn(Math.min(ce.x,Ee.x),Math.min(ce.y,Ee.y),Math.abs(ce.x-Ee.x),Math.abs(ce.y-Ee.y))),Xd(this.Yf,this)&&(E=0<z?0:-z,re=0<y?0:-y,ce.h(E,re),Ee.h(oe+E,le+re),a.push(new Bn(Math.min(ce.x,Ee.x),Math.min(ce.y,Ee.y),Math.abs(ce.x-Ee.x),Math.abs(ce.y-Ee.y))),Ao(ce,_e),Ao(Ee,_e),b.push(new Bn(Math.min(ce.x,Ee.x),Math.min(ce.y,Ee.y),Math.abs(ce.x-Ee.x),Math.abs(ce.y-Ee.y)))),tt.free(ce),tt.free(Ee),cd(this,!1,!0),this.Ka===null&&Rt("No div specified"),this.ta===null&&Rt("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(fc(this),re=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*re,this.ya*re),E.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,ne=this.Ca,oe=Math.round(z.x*ne)/ne,le=Math.round(z.y*ne)/ne,y=this.Ab,y.reset(),ne!==1&&y.scale(ne),z.x===0&&z.y===0||y.translate(-oe,-le),E.save(),E.beginPath(),z=a.length,ne=0;ne<z;ne++)oe=a[ne],oe.width!==0&&oe.height!==0&&E.rect(Math.floor(oe.x),Math.floor(oe.y),Math.ceil(oe.width),Math.ceil(oe.height));for(E.clip(),E.setTransform(re,0,0,re,0,0),E.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),E.yc(),y=this.Wa.s,z=y.length,this.Fd(y,z,this,this.viewportBounds),uu(this,E),E.globalAlpha=this.pb,re=0;re<z;re++)if(ne=y[re],oe=b,ne.visible&&ne.pb!==0){le=Ll(ne,E),pe=ne.Zq,pe.length=0,ce=this.scale,we=Bn.alloc(),Ee=ne.Pa.s,_e=Ee.length,Ae=oe.length;for(var ct=0;ct<_e;ct++){var Qe=Ee[ct],Pt=eg(Qe,Qe.actualBounds);e:{for(var Et=2/ce,Dt=4/ce,Vt=0;Vt<Ae;Vt++){var mn=oe[Vt];if(mn.width!==0&&mn.height!==0&&Pt.Vu(mn.x-Et,mn.y-Et,mn.width+Dt,mn.height+Dt)){Pt=!0;break e}}Pt=!1}Pt&&ne.Oj(E,Qe,this,pe,ce,we,!0)}Bn.free(we),E.globalAlpha=le}E.restore(),E.Vc(!0),this.Yf&&Xd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Ni(b),Ni(a),this.ld=!1}}else this.bd();x&&(Tl(this),this.bd(),ch(this,!0))}else x?(Tl(this),this.bd(),ch(this,!0)):this.bd()}};function fc(a){a.pn!==!1&&(a.pn=!1,Gd(a,a.Aa,a.ya))}function Gd(a,y,x){qc(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function dd(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,b=a.ya,E=a.Ka,z=!1,ne=a.gf?a.Db:0,re=a.Be?a.Db:0,oe=E.clientWidth||x+ne,le=E.clientHeight||b+re,ce=a.viewportBounds;E=ce.x;var pe=ce.y,we=ce.width,Ee=ce.height;if((oe!==x+ne||le!==b+re)&&(a.gf=!1,a.Be=!1,re=ne=0,a.Aa=oe,a.ya=le,z=a.pn=!0,qc(a)),!a.hf||!a.viewportBounds.w())return!0;var Ae=a.ku,_e=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var ct=a.documentBounds,Qe=0,Pt=0,Et=0,Dt=0,Vt=ce.width,mn=ce.height,Ei=a.rj;a.contentAlignment.sb()?(ct.width>Vt&&(Qe=Ei.left,Pt=Ei.right),ct.height>mn&&(Et=Ei.top,Dt=Ei.bottom)):(Qe=Ei.left,Pt=Ei.right,Et=Ei.top,Dt=Ei.bottom);var Qi=ct.width+Qe+Pt,Gi=ct.height+Et+Dt;Ei=a.scale;var di=Qi>oe/Ei,Xn=Gi>le/Ei;if(!(z||a.gf||a.Be||di||Xn))return!0;Qe=ct.x-Qe,oe=ce.x,Pt=ct.right+Pt,le=ce.right+ne,Et=ct.y-Et;var co=ce.y;ct=ct.bottom+Dt,ce=ce.bottom+re;var Ur="1px";if(Dt="1px",a.scrollMode===Ud&&(di||Xn)&&(di&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(di=1,Qe+1<oe&&(di=Math.max((oe-Qe)*Ei+a.Aa,di)),Pt>le+1&&(di=Math.max((Pt-le)*Ei+a.Aa,di)),Vt+ne+1<Qi&&(di=Math.max((Qi-Vt)*Ei+a.Aa,di)),Ur=di.toString()+"px"),Xn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(di=1,Et+1<co&&(di=Math.max((co-Et)*Ei+a.ya,di)),ct>ce+1&&(di=Math.max((ct-ce)*Ei+a.ya,di)),mn+re+1<Gi&&(di=Math.max((Gi-mn)*Ei+a.ya,di)),Dt=di.toString()+"px")),di=Ur!=="1px",Xn=Dt!=="1px",di&&Xn||!di&&!Xn||(Xn&&(le-=a.Db),di&&(ce-=a.Db),Qi<Vt+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,Qe+1<oe&&(ne=Math.max((oe-Qe)*Ei+a.Aa,ne)),Pt>le+1&&(ne=Math.max((Pt-le)*Ei+a.Aa,ne)),Vt+1<Qi&&(ne=Math.max((Qi-Vt)*Ei+a.Aa,ne)),Ur=ne.toString()+"px"),di=Ur!=="1px",ne=a.ya,di!==a.Be&&(ne=di?a.ya-a.Db:a.ya+a.Db),Gi<mn+re||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(re=1,Et+1<co&&(re=Math.max((co-Et)*Ei+ne,re)),ct>ce+1&&(re=Math.max((ct-ce)*Ei+ne,re)),mn+1<Gi&&(re=Math.max((Gi-mn)*Ei+ne,re)),Dt=re.toString()+"px"),Xn=Dt!=="1px"),a.qr&&di===a.Be&&Xn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(di!==a.Be&&(Ur==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=di,_e.style.width=Ur,Xn!==a.gf&&(Dt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(re=tt.alloc(),Xn?(y.style.left=a.Db+"px",a.position=re.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=re.h(a.pa.x-a.Db/a.scale,a.pa.y)),tt.free(re))),z&&qc(a),a.gf=Xn,_e.style.height=Dt,a.gu=!0,z&&(a.pn=!0),y=Ae.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Vt+1<Qi?y=(a.position.x-Qe)*Ei:Qe+1<oe?y=Ae.scrollWidth-Ae.clientWidth:Pt>le+1&&(y=a.position.x*Ei)),a.tn)switch(a.bu){case"negative":y=-(Ae.scrollWidth-y-Ae.clientWidth);break;case"reverse":y=Ae.scrollWidth-y-Ae.clientWidth}return Ae.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(mn+1<Gi?Ae.scrollTop=(a.position.y-Et)*Ei:Et+1<co?Ae.scrollTop=Ae.scrollHeight-Ae.clientHeight:ct>ce+1&&(Ae.scrollTop=a.position.y*Ei)),oe=a.Aa,le=a.ya,Ae.style.width=oe+(a.gf?a.Db:0)+"px",Ae.style.height=le+(a.Be?a.Db:0)+"px",x!==oe||b!==le||a.animationManager.zb?(x=Bn.allocAt(E,pe,we,Ee),a.onViewportBoundsChanged(x,a.viewportBounds,Ei,z),Bn.free(x),!1):!0}Be=gn.prototype,Be.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Rt("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&&Rt('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(ts,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Be.oi=function(a){this.partManager.oi(a);var y=this;Jf(a,function(x){zh(y,x)}),(a instanceof ga||a instanceof mo&&a.placeholder!==null)&&a.v(),a.data!==null&&Jf(a,function(x){vy(y.partManager,x)}),Ft(a)!==!0&&Pf(a)!==!0||this.De.add(a),_1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(eg(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(eg(a,a.actualBounds)),this.$b()},Be.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Jf(a,function(x){yy(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(eg(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(eg(a,a.actualBounds)),this.$b()},Be.remove=function(a){mh(this,a,!0)};function mh(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(Ms,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}Be.Is=function(a,y){if(y===void 0&&(y=!1),hn(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 Kn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Be.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},gn.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=Wf(this)),this.toolManager!==null){var E=new Ti;if(a!==null)if(hn(a))for(var z=0;z<a.length;z++)Pc(this,E,a[z],x,b);else for(a=a.iterator;a.next();)Pc(this,E,a.value,x,b);else{for(a=this.parts;a.next();)Pc(this,E,a.value,x,b);for(a=this.nodes;a.next();)Pc(this,E,a.value,x,b);for(a=this.links;a.next();)Pc(this,E,a.value,x,b)}Jc(this,E,y,b,x)}};function Pc(a,y,x,b,E,z){if(!y.contains(x)&&(z===void 0&&(z=!1),!b||z||x.canMove()||x.canCopy()))if(E===void 0&&(E=Wf(a)),x instanceof Di){if(y.add(x,a.Pd(E,x,x.location)),x instanceof mo&&(x.placeholder!==null||E.dragsMembers))for(z=x.memberParts;z.next();)Pc(a,y,z.value,b,E,E.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var ne=z.value;if(!y.contains(ne)){var re=ne.fromNode,oe=ne.toNode;re!==null&&y.contains(re)&&oe!==null&&y.contains(oe)&&Pc(a,y,ne,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)Pc(a,y,x.value,b,E)}else if(x instanceof hi)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)Pc(a,y,x.value,b,E);else x instanceof ga||y.add(x,a.Pd(E,x,x.location))}function Jc(a,y,x,b,E){if(y!==null&&y.count!==0){var z=tt.alloc(),ne=tt.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||$f(a,y);for(var re=Si(),oe=Si(),le=y.iterator,ce=tt.alloc();le.next();){var pe=le.key,we=le.value;if(pe.Zc()){var Ee=hg(a,pe,y);Ee!==null?re.push(new ie(pe,we,Ee)):(!E||pe.canMove())&&(Ee=we.point,z.assign(Ee),a.computeMove(pe,z.add(ne),b,ce),pe.location=ce,we.shifted===void 0&&(we.shifted=new tt),we.shifted.assign(ce.re(Ee)))}else le.key instanceof hi&&oe.push(le.sa)}for(tt.free(ce),E=re.length,le=0;le<E;le++)pe=re[le],z.assign(pe.info.point),pe.Su.shifted===void 0&&(pe.Su.shifted=new tt),pe.node.location=z.add(pe.Su.shifted);for(E=tt.alloc(),le=tt.alloc(),pe=oe.length,we=0;we<pe;we++){var Ae=oe[we];if(Ee=Ae.key,Ee instanceof hi)if(Ee.suspendsRouting){Ee.Tg=null,ce=Ee.fromNode;var _e=Ee.toNode;if(a.draggedLink!==null&&b.dragsLink)if(_e=Ae.value.point,Ee.dragComputation===null)y.add(Ee,a.Pd(b,Ee,ne)),Yh(Ee,ne.x-_e.x,ne.y-_e.y);else{Ae=tt.allocAt(0,0),(ce=Ee.i(0))&&ce.w()&&Ae.assign(ce);var ct=ce=tt.alloc().assign(Ae).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(ct=tt.alloc(),Gf(a,Ee,ce,ct,b)),ce.assign(Ee.dragComputation(Ee,ce,ct)).re(Ae),y.add(Ee,a.Pd(b,Ee,ce)),Yh(Ee,ce.x-_e.x,ce.y-_e.y),tt.free(Ae),tt.free(ce),ct!==ce&&tt.free(ct)}else ce!==null&&(E.assign(ce.location),ct=y.I(ce),ct!==null&&E.re(ct.point)),_e!==null&&(le.assign(_e.location),ct=y.I(_e),ct!==null&&le.re(ct.point)),ce!==null&&_e!==null?E.Xa(le)?(ce=Ae.value.point,_e=z,_e.assign(E),_e.re(ce),y.add(Ee,a.Pd(b,Ee,E)),Yh(Ee,_e.x,_e.y)):(Ee.suspendsRouting=!1,Ee.bb()):(Ae=Ae.value.point,ce=ce!==null?E:_e!==null?le:ne,y.add(Ee,a.Pd(b,Ee,ce)),Yh(Ee,ce.x-Ae.x,ce.y-Ae.y))}else(Ee.fromNode===null||Ee.toNode===null)&&(ce=Ae.value.point,y.add(Ee,a.Pd(b,Ee,ne)),Yh(Ee,ne.x-ce.x,ne.y-ce.y))}tt.free(z),tt.free(ne),tt.free(E),tt.free(le),Ni(re),Ni(oe),x||(Rl(a),$d(a,y))}}gn.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new tt),b.assign(y),a===null)return b;var E=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=tt.alloc(),Gf(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var ne=a.minLocation,re=ne.x;isNaN(re)&&(re=z?Math.round(1e3*a.location.x)/1e3:a.location.x),ne=ne.y,isNaN(ne)&&(ne=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var oe=a.maxLocation,le=oe.x;return isNaN(le)&&(le=z?Math.round(1e3*a.location.x)/1e3:a.location.x),oe=oe.y,isNaN(oe)&&(oe=z?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(re,Math.min(x.x,le)),Math.max(ne,Math.min(x.y,oe))),E!==y&&tt.free(E),b};function Wf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Gf(a,y,x,b,E){if(E===void 0&&(E=Wf(a)),b.assign(x),y!==null){var z=a.grid;y=E.gridSnapCellSize,a=y.width,y=y.height;var ne=E.gridSnapOrigin,re=ne.x;if(ne=ne.y,E=E.gridSnapCellSpot,z!==null){var oe=z.gridCellSize;isNaN(a)&&(a=oe.width),isNaN(y)&&(y=oe.height),z=z.gridOrigin,isNaN(re)&&(re=z.x),isNaN(ne)&&(ne=z.y)}z=tt.allocAt(0,0),z.yi(0,0,a,y,E),_t.No(x.x,x.y,re+z.x,ne+z.y,a,y,b),tt.free(z)}}function $f(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof hi&&(y.suspendsRouting=!0)}function $d(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof hi&&(x.suspendsRouting=!1,iy(x)&&x.bb())}a.Mr=!1}}function hg(a,y,x){return y=y.containingGroup,y!==null&&(a=hg(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Be=gn.prototype,Be.Pd=function(a,y,x){if(x===void 0)return new hd(jo);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new hd(new tt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new hd(x.copy())};function fg(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Rt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Rt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Rt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Rt("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&&Rt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Be.Al=function(a){fg(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(ts,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Be.Ww=function(a,y){fg(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Ms,"layers",this,a,null,b,null));var E=x.count,z;for(z=0;z<E;z++)if(x.M(z)===y){x.Gb(z,a);break}return this.cc!==null&&this.cb(ts,"layers",this,null,a,null,z),this.N(),0>b&&this.Ya(),this},Be.Cy=function(a,y){fg(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Ms,"layers",this,a,null,b,null));var E=x.count,z;for(z=0;z<E;z++)if(x.M(z)===y){x.Gb(z+1,a);break}return this.cc!==null&&this.cb(ts,"layers",this,null,a,null,z+1),this.N(),0>b&&this.Ya(),this},Be.kA=function(a){if(a.diagram!==this&&Rt("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(Ms,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Be.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Be.Yw=function(a){return this.pf===null&&(this.pf=new $n),this.pf.add(a),this.model.Pe(a),this},Be.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Be.Pe=function(a){return this.zg===null&&(this.zg=new $n),this.zg.add(a),this},Be.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Be.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Js&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},Be.cb=function(a,y,x,b,E,z,ne){z===void 0&&(z=null),ne===void 0&&(ne=null);var re=new Ea;re.diagram=this,re.change=a,re.propertyName=y,re.object=x,re.oldValue=b,re.oldParam=z,re.newValue=E,re.newParam=ne,this.ds(re)},Be.g=function(a,y,x,b,E){this.cb(Ha,a,this,y,x,b,E)},gn.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===Ha){var E=a.object;if(ds(E,a.propertyName,a.I(y)),E instanceof Yt){var z=E.part;z!==null&&z.Wb()}this.isModified=!0}else if(b===ts){var ne=a.object,re=a.newParam,oe=a.newValue;if(ne instanceof ui)if(typeof re=="number"&&oe instanceof Yt){y?ne.pc(re):ne.Gb(re,oe);var le=ne.part;le!==null&&le.Wb()}else typeof re=="number"&&oe instanceof hl&&(oe.isRow?d1(ne,re,y?void 0:oe):h1(ne,re,y?void 0:oe));else if(ne instanceof cs){var ce=a.oldParam===!0;typeof re=="number"&&oe instanceof Pr&&(y?(oe.isSelected=!1,oe.isHighlighted=!1,oe.Wb(),ne.pc(ce?re:-1,oe,ce)):ne.oi(re,oe,ce))}else ne instanceof gn?typeof re=="number"&&oe instanceof cs&&(y?this.Wa.mb(re):(oe.Xe(this),this.Wa.Gb(re,oe))):Rt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===Ms){var pe=a.object,we=a.oldParam,Ee=a.oldValue;if(pe instanceof ui)typeof we=="number"&&Ee instanceof Yt?y?pe.Gb(we,Ee):pe.pc(we):typeof we=="number"&&Ee instanceof hl&&(Ee.isRow?d1(pe,we,y?Ee:void 0):h1(pe,we,y?Ee:void 0));else if(pe instanceof cs){var Ae=a.newParam===!0;typeof we=="number"&&Ee instanceof Pr&&(y?0>pe.Pa.indexOf(Ee)&&pe.oi(we,Ee,Ae):(Ee.isSelected=!1,Ee.isHighlighted=!1,Ee.Wb(),pe.pc(Ae?we:-1,Ee,Ae)))}else pe instanceof gn?typeof we=="number"&&Ee instanceof cs&&(y?(Ee.Xe(this),this.Wa.Gb(we,Ee)):this.Wa.mb(we)):Rt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==Js&&Rt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},gn.prototype.Ea=function(a){return this.undoManager.Ea(a)},gn.prototype.eb=function(a){return this.undoManager.eb(a)},gn.prototype.Kf=function(){return this.undoManager.Kf()},gn.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}},gn.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},gn.prototype.rp=function(){this.partManager.rp()};function gg(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,qc(a),a.N(),a.Ee=!0,b.zb&&(kl(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,qc(a);else{a.vb=!0;var E=a.viewportBounds.copy(),z=a.Aa,ne=a.ya,re=a.zoomPoint.x,oe=a.zoomPoint.y,le=a.contentAlignment;isNaN(re)&&(le.$c()?le.Hf(Tn)?re=0:le.Hf(Qn)&&(re=z-1):re=le.sb()?le.x*(z-1):z/2),isNaN(oe)&&(le.$c()?le.Hf(kn)?oe=0:le.Hf(zi)&&(oe=ne-1):oe=le.sb()?le.y*(ne-1):ne/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),z=tt.allocAt(a.pa.x+re/y-re/x,a.pa.y+oe/y-oe/x),a.position=z,tt.free(z),a.Ca=x,qc(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),Qu(a,!1),b.zb&&(kl(b)||b.ce.add(b.H,"scale",y,a.Ca))}}gn.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!==cu||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof Ua&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Th(E,this)),this.vb||this.invalidateViewport(a,y),Qc(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(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function Qc(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=ci.alloc(),E=1,z=1,ne=x.O.s,re=ne.length,oe=0;oe<re;oe++){var le=ne[oe],ce=Math.abs(le.interval);2>ce||(Ev(le.figure)?z=z*ce/_t.vx(z,ce):E=E*ce/_t.vx(E,ce))}if(ne=x.gridCellSize,b.h(z*ne.width,E*ne.height),y!==void 0)E=y.width,z=y.height,a=y.x,ne=y.y;else{if(y=Bn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Bn.free(y);return}E=y.width,z=y.height,a=y.x,ne=y.y,Bn.free(y)}x.width=E+2*b.width,x.height=z+2*b.height,y=tt.alloc(),_t.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),ci.free(b),x.part.location=y,tt.free(y)}}gn.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)}},gn.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))},gn.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),hn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof Pr||Rt("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 Pr||Rt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},gn.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()}},Be=gn.prototype,Be.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Be.Jz=function(a){a=new Kn().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 Pr||Rt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Be.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,z=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=z.h(x.x,E.y):y==="left"?this.position=z.h(E.x,x.y):y==="down"?this.position=z.h(x.x,E.bottom-x.height):y==="right"&&(this.position=z.h(E.right-x.width,x.y)),tt.free(z);return}Rt("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}E/=this.scale,x=this.position,y==="up"?this.position=z.h(x.x,x.y-E):y==="down"?this.position=z.h(x.x,x.y+E):y==="left"?this.position=z.h(x.x-E,x.y):y==="right"?this.position=z.h(x.x+E,x.y):Rt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),tt.free(z)},Be.tv=function(a){var y=this.viewportBounds;y.Re(a)||(a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a)},Be.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Be.op=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),a.copy().transform(this.Ab)},Be.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,z=b+a.height,ne=y.m11,re=y.m12,oe=y.m21,le=y.m22,ce=y.dx,pe=y.dy,we=x*ne+b*oe+ce;y=x*re+b*le+pe;var Ee=E*ne+b*oe+ce;return a=E*re+b*le+pe,b=x*ne+z*oe+ce,x=x*re+z*le+pe,ne=E*ne+z*oe+ce,E=E*re+z*le+pe,z=Math.min(we,Ee),we=Math.max(we,Ee),Ee=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,b),we=Math.max(we,b),Ee=Math.min(Ee,x),y=Math.max(y,x),z=Math.min(z,ne),we=Math.max(we,ne),Ee=Math.min(Ee,E),y=Math.max(y,E),new Bn(z,Ee,we-z,y-Ee)},Be.Ps=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),Ao(a.copy(),this.Ab)};function pg(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function mg(a){return a=Uf.get(a),a!==null?new a:new ka}gn.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===Js&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(oe){return oe.diagram=E}),a.mouseMoveTools.each(function(oe){return oe.diagram=E}),a.mouseUpTools.each(function(oe){return oe.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===Js){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),Rl(this));var z=this.animationManager;b==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||Sl(z),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&&(pg(this),this.As.clear(),ks(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var re=this;Jn(function(){re.currentTool.standardMouseOver(),re.Rt=!1},10)}}}finally{this.aa=!0}}}};function zh(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)vh(a,y[b])}function vh(a,y){if(y instanceof Ku){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof Kn&&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 vg(a,y){if(y instanceof Ku){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 z=0;z<E.length;z++)if(E[z]===y){E.splice(z,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 Kn&&x.Bg.remove(a),fp(b));break}}}}}gn.prototype.Wd=function(){this.partManager.Wd()},gn.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},gn.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},gn.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},gn.prototype.Vb=function(a){return this.partManager.Vb(a)},gn.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Be=gn.prototype,Be.Lc=function(a){return this.partManager.Lc(a)},Be.ii=function(a){return this.partManager.ii(a)},Be.Kc=function(a){return this.partManager.Kc(a)},Be.ms=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ms.apply(this.partManager,y instanceof Array?y:jn(Hr(y)))},Be.ls=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ls.apply(this.partManager,y instanceof Array?y:jn(Hr(y)))};function qc(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 yg(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),Qu(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Be.Va=function(){if(this.Zi){var a=Bn.alloc();yg(this,this.computeBounds(a)),Bn.free(a)}},Be.rz=function(){for(var a=new Kn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&a.add(x)}for(y=this.links;y.next();)x=y.value,x.isTopLevel&&a.add(x);return a.iterator},Be.qz=function(){return this.ai.iterator},Be.Uz=function(a){Rl(this),a&&yh(this,!0),this.ld?Sg(this,!1):(this.Jk=!0,gu(this))};function yh(a,y){for(var x=a.ai.iterator;x.next();)xg(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function xg(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)xg(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Sg(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var b=a.undoManager.transactionLevel,E=a.layout,z=a.animationManager;try{b===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=b&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||Ul(z,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)Pg(a,ne.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),Rl(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||Sl(z),a.aa=x}}}function Pg(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)Pg(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),ss(a,y),E.isValidLayout=!0):a.xh=!0)}}Be.yz=function(){for(var a=new $n,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function Zp(a){function y(E){var z=E.toLowerCase(),ne=new $n;x.add(E,ne),x.add(z,ne),b.add(E,E),b.add(z,E)}var x=new Ti,b=new Ti;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 qg(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function Kd(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Rt("Unknown DiagramEvent name: "+y)}Be.Bj=function(a,y){return a=Kd(this,a),a!==null&&a.add(y),this},Be.am=function(a,y){a=Kd(this,a),a!==null&&a.remove(y)},Be.R=function(a,y,x){var b=Kd(this,a),E=new yl;if(E.diagram=this,a=qg(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 Kf(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Be.Yj=function(a,y){return gf(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},gn.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?fh(this,a):a.assign(this.documentBounds)};function gf(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new lm(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=ep(a,x)),x===null){y=Bn.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var z=a.nodes;z.next();){var ne=z.value,re=ne.layer;re!==null&&re.visible&&!re.isTemporary&&Vf(a,ne,b,y)}Bn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=Bn.alloc(),z=x.memberParts;z.next();)ne=z.value,ne instanceof Di&&Vf(a,ne,b,y);Bn.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&ox(E);return E}function ep(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?ep(a,y.containingGroup):null}function Vf(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,z=y.y;if(xp(a,E,z))for(x=(z-a.Od)/a.sc|0,b=Math.min((E+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((z+y.height-a.Od)/a.sc|0,a.ei),E=(E-a.Nd)/a.rc|0;E<=b;E++)if(z=a.ac[E],z.fill)z.fill(Jh,x,y+1);else for(var ne=x;ne<=y;ne++)z[ne]=Jh}else if(y instanceof mo)for(y=y.memberParts;y.next();)E=y.value,E instanceof Di&&Vf(a,E,x,b)}}function xh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}gn.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():wg(this)};function wg(a){a.vk===-1&&(a.vk=Jn(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=Bn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),yg(a,y),Bn.free(y),a.Fc=!0,a.bd(),wg(a))}},a.vp))}gn.prototype.ug=function(){this.vk!==-1&&(nt.clearTimeout(this.vk),this.vk=-1)},gn.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=Bn.allocAt(0,0,b.width*E,b.height*E);var z=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,z.x-=ne,a.x<b.x+x.left/2&&(z.x-=ne),a.x<b.x+x.left/4&&(z.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,z.x+=ne,a.x>b.x+b.width-x.right/2&&(z.x+=ne),a.x>b.x+b.width-x.right/4&&(z.x+=4*ne));return a.y>=b.y&&a.y<b.y+x.top&&this.allowVerticalScroll?(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,z.y-=ne,a.y<b.y+x.top/2&&(z.y-=ne),a.y<b.y+x.top/4&&(z.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,z.y+=ne,a.y>b.y+b.height-x.bottom/2&&(z.y+=ne),a.y>b.y+b.height-x.bottom/4&&(z.y+=4*ne)),z.Xa(jo)||(y=new tt(y.x+z.x/E,y.y+z.y/E)),Bn.free(b),tt.free(z),y},Be=gn.prototype,Be.Cs=function(){return null},Be.av=function(){return null},Be.bs=function(a,y){this.pj.add(a,y)},Be.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof mo&&(y.$p=null)})};function Sh(a,y,x){function b(){var ce=+new Date;for(z=!0,ne.reset();ne.next();)if(!ne.value[0].al){z=!1;break}z||ce-le>oe?y(x,E,re):nt.requestAnimationFrame(b)}for(var E=x.callback,z=!0,ne=a.Og.iterator;ne.next();)if(!ne.value[0].al){z=!1;break}if(typeof E!="function"||z)return y(x,E,a);var re=a,oe=x.callbackTimeout||300,le=+new Date;return nt.requestAnimationFrame(function(){b()}),null}Be.Wz=function(a){return Ns?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Be.Jx=function(a){return a===void 0&&(a={}),Sh(this,this.Xz,a)},Be.Xz=function(a,y,x){var b=tp(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 Ch+"data":E=b.getImageData(0,0,x.width,x.height);break;case Ch:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&Rt('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 tp(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&Rt("properties argument must be an Object.");var E=y.size||null,z=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(z="NaN");var ne=y.maxSize;y.maxSize===void 0&&(ne=x==="SVG"?new ci(1/0,1/0):new ci(2e3,2e3));var re=y.position||null,oe=y.parts||null,le=y.padding===void 0?1:y.padding,ce=y.background||null,pe=y.omitTemporary;pe===void 0&&(pe=!0);var we=y.document||document,Ee=y.elementFinished||null,Ae=y.showTemporary;Ae===void 0&&(Ae=!pe),y=y.showGrid,y===void 0&&(y=Ae),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof le=="number"?le=new or(le):le instanceof or||Rt("MakeImage padding must be a Margin or a number."),le.left=Math.max(le.left,0),le.right=Math.max(le.right,0),le.top=Math.max(le.top,0),le.bottom=Math.max(le.bottom,0),a.ib.Vc(!0),pe=new Jl(null,we,void 0,!0);var _e=pe.context;if(!(E||z||oe||re))return pe.width=a.Aa+Math.ceil(le.left+le.right),pe.height=a.ya+Math.ceil(le.top+le.bottom),x==="SVG"?b===null?null:(b.resize(pe.width,pe.height,pe.width,pe.height),b.ownerDocument=we,b.hs=Ee,tl(a,b.context,le,new ci(pe.width,pe.height),a.Ca,a.pa,oe,ce,Ae,y),b.context):(a.Xm=!1,tl(a,_e,le,new ci(pe.width,pe.height),a.Ca,a.pa,oe,ce,Ae,y),a.Xm=!0,pe.context);var ct=a.Pp,Qe=a.documentBounds.copy();if(Qe.Fv(a.yb),Ae)for(var Pt=a.Wa.s,Et=Pt.length,Dt=0;Dt<Et;Dt++){var Vt=Pt[Dt];if(Vt.visible&&Vt.isTemporary){Vt=Vt.Pa.s;for(var mn=Vt.length,Ei=0;Ei<mn;Ei++){var Qi=Vt[Ei];Qi.isInDocumentBounds&&Qi.isVisible()&&(Qi=Qi.actualBounds,Qi.w()&&Qe.ed(Qi))}}}if(Pt=new tt(Qe.x,Qe.y),oe!==null){for(Et=new Bn(0,0,0,0),Dt=!0,Vt=oe.iterator,Vt.reset();Vt.next();)mn=Vt.value,mn instanceof Pr&&(Ei=mn.layer,Ei!==null&&!Ei.visible||Ei!==null&&!Ae&&Ei.isTemporary||!mn.isVisible()||(mn=mn.actualBounds,mn.w()&&(Dt?(Dt=!1,Et.assign(mn)):Et.ed(mn))));Qe.width=Et.width,Qe.height=Et.height,Pt.x=Et.x,Pt.y=Et.y}return re!==null&&re.w()&&(Pt=re,z||(z=ct)),Et=re=0,le!==null&&(re=le.left+le.right,Et=le.top+le.bottom),Dt=Vt=0,E!==null&&(Vt=E.width,Dt=E.height,isFinite(Vt)&&(Vt=Math.max(0,Vt-re)),isFinite(Dt)&&(Dt=Math.max(0,Dt-Et))),E!==null&&z!==null?(z==="NaN"&&(z=ct),E.w()?(E=Vt,Qe=Dt):isNaN(Dt)?(E=Vt,Qe=Qe.height*z):(E=Qe.width*z,Qe=Dt)):E!==null?E.w()?(z=Math.min(Vt/Qe.width,Dt/Qe.height),E=Vt,Qe=Dt):isNaN(Dt)?(z=Vt/Qe.width,E=Vt,Qe=Qe.height*z):(z=Dt/Qe.height,E=Qe.width*z,Qe=Dt):z!==null?z==="NaN"&&ne.w()?(z=Math.min((ne.width-re)/Qe.width,(ne.height-Et)/Qe.height),z>ct?(z=ct,E=Qe.width,Qe=Qe.height):(E=ne.width,Qe=ne.height)):(E=Qe.width*z,Qe=Qe.height*z):(z=ct,E=Qe.width,Qe=Qe.height),le!==null?(E+=re,Qe+=Et):le=new or(0),ne!==null&&(ct=ne.width,ne=ne.height,isNaN(ct)&&(ct=2e3),isNaN(ne)&&(ne=2e3),isFinite(ct)&&(E=Math.min(E,ct)),isFinite(ne)&&(Qe=Math.min(Qe,ne))),pe.width=Math.ceil(E),pe.height=Math.ceil(Qe),x==="SVG"?b===null?null:(b.resize(pe.width,pe.height,pe.width,pe.height),b.ownerDocument=we,b.hs=Ee,tl(a,b.context,le,new ci(Math.ceil(E),Math.ceil(Qe)),z,Pt,oe,ce,Ae,y),b.context):(a.Xm=!1,tl(a,_e,le,new ci(Math.ceil(E),Math.ceil(Qe)),z,Pt,oe,ce,Ae,y),a.Xm=!0,pe.context)}yt.Object.defineProperties(gn.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof xe||(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 Uo(this,nt.document),this.bs("svg",a)),this.div!==null&&this.div.appendChild(a.Oa),this.ib=a.context,this.ta&&(this.ta.context.setTransform(this.Mb,0,0,this.Mb,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya))):a!=="debug"||this.pj.contains("SVG")||(a=new Uo(this,nt.document),this.bs("SVG",a),a.Oa.style.backgroundColor="whitesmoke",this.div!==null&&this.div.after(a.Oa)),this.hk()))}},div:{get:function(){return this.Ka},set:function(a){if(this.Ka!==a){var y=this.Ka;y!==null?(y.H=void 0,y.goDiagram=void 0,y.go=void 0,y.innerHTML="",this.ta!==null&&(y=this.ta.Oa,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.ta.mx()),this.ol&&(this.ol.disconnect(),this.ol=null),y=this.toolManager,y!==null&&(y.mouseDownTools.each(function(x){x.cancelWaitAfter()}),y.mouseMoveTools.each(function(x){x.cancelWaitAfter()}),y.mouseUpTools.each(function(x){x.cancelWaitAfter()})),y.cancelWaitAfter(),this.currentTool.doCancel(),this.ta=null,this.removeEventListener(nt,"resize",this.Ov,!1),this.removeEventListener(nt,"wheel",this.$j,!0),Fc===this&&(Fc=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Rh(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)&&Vn(a,"0 <= value <= 1",gn,"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),Qu(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),Qu(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),Qu(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),Qu(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Vn(a,">= 0",gn,"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&&Vn(a,">= 0",gn,"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 Vn(a,">= 0",gn,"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||pg(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&&Rt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=jd(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,Ul(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(z){return y.ik(z)}),y.ik(this.Oc)),this.cc=a,this.partManager=mg(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(z){return a.Pe(z)}),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(nt,"pointermove",this.dk,!0),this.addEventListener(nt,"pointerdown",this.ui,!0),this.addEventListener(nt,"pointerup",this.fk,!0),this.addEventListener(nt,"pointerout",this.ek,!0),this.addEventListener(nt,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(nt,"wheel",this.$j,!0),this.addEventListener(nt,"selectstart",this.preventDefault,!1)):(this.removeEventListener(nt,"pointermove",this.dk,!0),this.removeEventListener(nt,"pointerdown",this.ui,!0),this.removeEventListener(nt,"pointerup",this.fk,!0),this.removeEventListener(nt,"pointerout",this.ek,!0),this.removeEventListener(nt,"pointercancel",this.ck,!0),this.addEventListener(y,"pointermove",this.dk,!1),this.addEventListener(y,"pointerdown",this.ui,!1),this.addEventListener(y,"pointerup",this.fk,!1),this.addEventListener(y,"pointerout",this.ek,!1),this.addEventListener(y,"pointercancel",this.ck,!1),this.removeEventListener(nt,"wheel",this.$j,!0),this.removeEventListener(nt,"selectstart",this.preventDefault,!1),this.addEventListener(y,"wheel",this.$j,!1)),this.qw=a))}},position:{get:function(){return this.pa},set:function(a){var y=tt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),bl(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?qc(this):(this.vb=!0,a=this.scale,ff(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=hf(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=hf(this)),a.type!==ui.Grid&&Rt("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),Qc(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),qc(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||Rt("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 or(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===Ud&&Qu(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,Qu(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,gg(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&&gg(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!==cu&&Qu(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()||Rt("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()||Rt("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)):Vn(a,"> 0",gn,"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)):Vn(a,"> 0",gn,"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),Qu(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 or(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&&Rt("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();)Qp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==Nd&&a!==Vs&&a!==wh&&Rt("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 ci(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 or(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),yt.Object.defineProperties(gn,{licenseKey:{get:function(){return Fg.jc()},set:function(a){Fg.add(a.replace(/\s/g,""))}},version:{get:function(){return Yd}}}),gn.prototype.makeImageData=gn.prototype.Jx,gn.prototype.makeImage=gn.prototype.Wz,gn.prototype.cacheGroupExternalLinks=gn.prototype.Fu,gn.prototype.addRenderer=gn.prototype.bs,gn.prototype.makeSVG=gn.prototype.av,gn.prototype.makeSvg=gn.prototype.Cs,gn.prototype.stopAutoScroll=gn.prototype.ug,gn.prototype.doAutoScroll=gn.prototype.gs,gn.prototype.isUnoccupied=gn.prototype.Yj,gn.prototype.raiseDiagramEvent=gn.prototype.R,gn.prototype.removeDiagramListener=gn.prototype.am,gn.prototype.addDiagramListener=gn.prototype.Bj,gn.prototype.findTreeRoots=gn.prototype.yz,gn.prototype.layoutDiagram=gn.prototype.Uz,gn.prototype.findTopLevelGroups=gn.prototype.qz,gn.prototype.findTopLevelNodesAndLinks=gn.prototype.rz,gn.prototype.ensureBounds=gn.prototype.Va,gn.prototype.findLinksByExample=gn.prototype.ls,gn.prototype.findNodesByExample=gn.prototype.ms,gn.prototype.findLinkForData=gn.prototype.Kc,gn.prototype.findNodeForData=gn.prototype.ii,gn.prototype.findPartForData=gn.prototype.Lc,gn.prototype.findLinkForKey=gn.prototype.findLinkForKey,gn.prototype.findNodeForKey=gn.prototype.Vb,gn.prototype.findPartForKey=gn.prototype.findPartForKey,gn.prototype.rebuildParts=gn.prototype.Wd,gn.prototype.transformViewToDoc=gn.prototype.Ps,gn.prototype.transformRectDocToView=gn.prototype.zA,gn.prototype.transformDocToView=gn.prototype.op,gn.prototype.centerRect=gn.prototype.es,gn.prototype.scrollToRect=gn.prototype.tv,gn.prototype.scroll=gn.prototype.scroll,gn.prototype.highlightCollection=gn.prototype.Jz,gn.prototype.highlight=gn.prototype.Iz,gn.prototype.selectCollection=gn.prototype.rA,gn.prototype.select=gn.prototype.select,gn.prototype.updateAllRelationshipsFromData=gn.prototype.rp,gn.prototype.updateAllTargetBindings=gn.prototype.updateAllTargetBindings,gn.prototype.commit=gn.prototype.commit,gn.prototype.rollbackTransaction=gn.prototype.Kf,gn.prototype.commitTransaction=gn.prototype.eb,gn.prototype.startTransaction=gn.prototype.Ea,gn.prototype.raiseChanged=gn.prototype.g,gn.prototype.raiseChangedEvent=gn.prototype.cb,gn.prototype.removeChangedListener=gn.prototype.ik,gn.prototype.addChangedListener=gn.prototype.Pe,gn.prototype.removeModelChangedListener=gn.prototype.mA,gn.prototype.addModelChangedListener=gn.prototype.Yw,gn.prototype.findLayer=gn.prototype.Qj,gn.prototype.removeLayer=gn.prototype.kA,gn.prototype.addLayerAfter=gn.prototype.Cy,gn.prototype.addLayerBefore=gn.prototype.Ww,gn.prototype.addLayer=gn.prototype.Al,gn.prototype.moveParts=gn.prototype.moveParts,gn.prototype.copyParts=gn.prototype.Kj,gn.prototype.removeParts=gn.prototype.Is,gn.prototype.remove=gn.prototype.remove,gn.prototype.add=gn.prototype.add,gn.prototype.clearDelayedGeometries=gn.prototype.bx,gn.prototype.setProperties=gn.prototype.nm,gn.prototype.attach=gn.prototype.Du,gn.prototype.set=gn.prototype.set,gn.prototype.resetInputOptions=gn.prototype.Sx,gn.prototype.setInputOption=gn.prototype.sA,gn.prototype.getInputOption=gn.prototype.Ql,gn.prototype.resetRenderingHints=gn.prototype.Tx,gn.prototype.setRenderingHint=gn.prototype.Xx,gn.prototype.getRenderingHint=gn.prototype.Gf,gn.prototype.maybeUpdate=gn.prototype.bd,gn.prototype.requestUpdate=gn.prototype.$b,gn.prototype.delayInitialization=gn.prototype.Xy,gn.prototype.isUpdateRequested=gn.prototype.Pz,gn.prototype.invalidateDocumentBounds=gn.prototype.Ya,gn.prototype.findObjectsNear=gn.prototype.og,gn.prototype.findPartsNear=gn.prototype.mz,gn.prototype.findObjectsIn=gn.prototype.Cf,gn.prototype.findPartsIn=gn.prototype.ux,gn.prototype.findObjectsAt=gn.prototype.ji,gn.prototype.findPartsAt=gn.prototype.lz,gn.prototype.findObjectAt=gn.prototype.ic,gn.prototype.findPartAt=gn.prototype.Ol,gn.prototype.focusObject=gn.prototype.zz,gn.prototype.alignDocument=gn.prototype.Jy,gn.prototype.zoomToRect=gn.prototype.BA,gn.prototype.zoomToFit=gn.prototype.zoomToFit,gn.prototype.diagramScroll=gn.prototype.kx,gn.prototype.focus=gn.prototype.focus;var Uf=new Ti,np=null,Ns=nt.document!==void 0,Hh=null,Vd="",cu=new qt(gn,"None",0),Wu=new qt(gn,"Uniform",1),Zh=new qt(gn,"UniformToFill",2),Ph=new qt(gn,"CycleAll",10),Cg=new qt(gn,"CycleNotDirected",11),bg=new qt(gn,"CycleNotDirectedFast",12),Eg=new qt(gn,"CycleNotUndirected",13),Mg=new qt(gn,"CycleDestinationTree",14),Lg=new qt(gn,"CycleSourceTree",15),Ud=new qt(gn,"DocumentScroll",1),pf=new qt(gn,"InfiniteScroll",2),Nd=new qt(gn,"TreeParentCollapsed",21),Vs=new qt(gn,"AllParentsCollapsed",22),wh=new qt(gn,"AnyParentsCollapsed",23),Fg=new $n,Yd="2.3.10",Ch="image",mf=null,ip=!1;function nu(){if(Ns){var a=nt.document.createElement("canvas"),y=a.getContext("2d"),x=Vi("7ca11abfd022028846");y[x]=Vi("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",on.Dx+"4ae6247590da4bb21c324ba3a84e385776",ur.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",_t.za],E=1;5>E;E++)y[Vi("7ca11abfd7330390")](Vi(b[E-1]),10,15*E);for(y[x]=Vi("39f046ebb36e4b"),x=1;5>x;x++)y[Vi("7ca11abfd7330390")](Vi(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(ur.prototype.Cd=ur.prototype.Eu),mf=a}}gn.className="Diagram",gn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=nt.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof gn?y.H:null},gn.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},gn.useDOM=function(a){Ns=a?nt.document!==void 0:!1},gn.isUsingDOM=function(){return Ns},gn.None=cu,gn.Uniform=Wu,gn.UniformToFill=Zh,gn.CycleAll=Ph,gn.CycleNotDirected=Cg,gn.CycleNotDirectedFast=bg,gn.CycleNotUndirected=Eg,gn.CycleDestinationTree=Mg,gn.CycleSourceTree=Lg,gn.DocumentScroll=Ud,gn.InfiniteScroll=pf,gn.TreeParentCollapsed=Nd,gn.AllParentsCollapsed=Vs,gn.AnyParentsCollapsed=wh;function rp(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Xd(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)e:{y="f";var x=nt[Vi("76a715b2f73f148a")][Vi("72ba13b5")]||"";if(a.Rc=!0,Ns){var b=gn[Vi("76a115b6ed251eaf4692")];if(b)for(var E=Fg.iterator;E.next()&&(b=E.value,b=Vi(b).split(Vi("39e9")),!(6>b.length));){var z=Vi(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=Vi(on[Vi("6cae19")]).split(".");if(z[0]>ne[0]||z[0]===ne[0]&&z[1]>=ne[1]){var re=nt[Vi("74a900bae4370f8b51")][Vi("6fbb13a1c2311e8a57")].toLowerCase();if(ne=re[Vi("73a612b6fb191d")](Vi("3aad1ab6e022098b4dc4")),z=Vi(b[2]),-1<ne&&(re=re[Vi("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<re&&re<ne),!a.Rc))break;for(ne=x[Vi("76ad18b4f73e")],re=x[Vi("73a612b6fb191d")](Vi("35e7"))+2;re<ne;re++)y+=x[re];if(ne=y[Vi("73a612b6fb191d")](z),0>ne&&z!==Vi("7da71ca0ad381e90")&&(ne=y[Vi("73a612b6fb191d")](Vi("76a715b2ef3e149757"))),0>ne&&(ne=y[Vi("73a612b6fb191d")](Vi("76a715b2ef3e149757"))),0>ne&&(ne=y[Vi("73a612b6fb191d")](Vi("2bfa41fdb3784bca12"))),0>ne&&(ne=x[Vi("73a612b6fb191d")](Vi("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[Vi("73a612b6fb191d")](Vi("35"))||y[Vi("73a612b6fb191d")](Vi("35"))===-1),!a.Rc||x[Vi("73a612b6fb191d")](Vi("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Vi("73a612b6fb191d")](z)),!a.Rc)||(ne=nt[Vi("76a715b2f73f148a")][Vi("69ad17a1e03e")],re=ne[Vi("73a612b6fb191d")](Vi("7fb002b6ed25128b4da25b2e")),-1<re&&(a.Rc=!(ne[Vi("73a612b6fb191d")](z)>re),!a.Rc)))break;if(z[0]==="#"){ne=nt.document.createElement("div");for(var oe=b[0].replace(/[A-Za-z]/g,"");4>oe.length;)oe+="9";if(re=oe,oe=oe.substr(oe.length-4),b="",b+=["gsh","gsf"][parseInt(oe.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(oe.substr(0,1),10)%4],ne[Vi("79a417a0f0181a8946")]=b,nt.document[Vi("78a712aa")]){nt.document[Vi("78a712aa")][Vi("7bb806b6ed32388c4a875b")](ne),oe=nt.getComputedStyle(ne).getPropertyValue(Vi("78a704b7e62456904c9b12701b6532a8"));var le=nt.getComputedStyle(ne).getPropertyValue(Vi("75b817b0ea2202"));if(nt.document[Vi("78a712aa")][Vi("68ad1bbcf533388c4a875b")](ne),oe){if(ne=nt[Vi("77a902b0eb1b1e804a8a")],le==="0."+parseInt(re,10)%100||oe.indexOf(parseInt(z[1]+z[2],16))!==-1&&oe.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(ne&&ne(Vi("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,z=0;z<document.styleSheets.length;z++){ne=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var ce in ne)if(b===ne[ce].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(ce=x[Vi("76ad18b4f73e")],E=x[Vi("73a612b6fb191d")](Vi("35e7"))+2;E<ce;E++)y+=x[E];x=y[Vi("73a612b6fb191d")](Vi("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Vi("73a612b6fb191d")](Vi("35")))}}}return 0<a.Rc&&a!==a.wy}rp.className="DiagramHelper";function hd(a){this.j=a===void 0?new tt:a,this.o=new tt}yt.Object.defineProperties(hd.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 bh="DraggingInfo";hd.className="DraggingInfo";function ie(a,y,x){this.node=a,this.info=y,this.Su=x}ie.className="DraggingNodeInfoPair";function ae(){this.reset()}ae.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new ci(NaN,NaN).freeze(),this.gridSnapCellSpot=Ws,this.gridSnapOrigin=new tt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ae.className="DraggingOptions";function ge(a,y){if(typeof a=="string"||nt.Element&&a instanceof Element)var x=gn.call(this,a)||this;else x=gn.call(this)||this,y=a;return fe(x),y&&x.nm(y),x}Zt(ge,gn);function fe(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=su,a.layout=new $l}ge.prototype.reset=function(){gn.prototype.reset.call(this),fe(this)},ge.className="Palette";function xe(a,y){if(typeof a=="string"||nt.Element&&a instanceof Element)var x=gn.call(this,a)||this;else x=gn.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 Pr;var E=new bo;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 or(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new ht,x.toolManager.mouseMoveTools),x.click=function(){var z=b.observed;if(z!==null){var ne=z.viewportBounds,re=b.lastInput.documentPoint;z.position=new tt(re.x-ne.width/2,re.y-ne.height/2)}},x.Pf=function(){b.Ya(),Ve(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&&Ve(b)},x.autoScale=Wu,x.vb=!1,y&&Object.assign(x,y),x}Zt(xe,gn),xe.prototype.computePixelRatio=function(){return 1},xe.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(fc(this),this.ql===null){var x=new Jl(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),Oe(this)}finally{this.ta=a,this.ib=y}}}gn.prototype.redraw.call(this)},xe.prototype.gc=function(){if(this.Ka===null&&Rt("No div specified"),this.ta===null&&Rt("No canvas specified"),!(this.ta instanceof Uo)&&($v(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){fc(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?Oe(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 Oe(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=Bn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Qc(y,E),Bn.free(E),Rl(y));var z=a.Ab;z.reset(),a.scale!==1&&z.scale(a.scale),a.position.x===0&&a.position.y===0||z.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),E.yc(),y=y.Wa.s,z=y.length;for(var ne=0;ne<z;ne++){var re=y[ne],oe=a;if(re.visible&&re.opacity!==0){var le=re.diagram.grid.part;if(!x&&re.isTemporary)b&&le.layer===re&&(re=Ll(re,E),le.gc(E,oe),E.globalAlpha=re);else{for(var ce=Ll(re,E),pe=oe.scale,we=Bn.alloc(),Ee=re.Pa.s,Ae=Ee.length,_e=0;_e<Ae;_e++){var ct=Ee[_e];(b||ct!==le)&&re.Oj(E,ct,oe,null,pe,we,!1)}Bn.free(we),E.globalAlpha=ce}}}}}function Ve(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=ci.alloc();E.h(x.width,x.height),b.desiredSize=E,ci.free(E),a=2/a.scale,b instanceof bo&&(b.strokeWidth=a),y.location=new tt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}xe.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Wo;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},xe.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},xe.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),Ve(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))},yt.Object.defineProperties(xe.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof xe&&Rt("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),Ve(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),Ve(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)}}}),xe.className="Overview";function ht(){Gr.call(this),this.j=null}Zt(ht,Gr),ht.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)},ht.prototype.doActivate=function(){this.j=null,Gr.prototype.doActivate.call(this)},ht.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},ht.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)}}},ht.className="OverviewDraggingTool";function ut(){Io(this),this.H=Fc,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=Wo,this.hb=!0,this.cg=null,this.ob=200}ut.prototype.toString=function(){return"CommandHandler"},ut.prototype.Xe=function(a){this.H=a},ut.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Qr?y.meta:y.control,b=y.shift,E=y.alt,z=y.key;!x||z!=="C"&&z!=="Insert"?x&&z==="X"||b&&z==="Del"?this.canCutSelection()&&this.cutSelection():x&&z==="V"||b&&z==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&z==="Y"||E&&b&&z==="Backspace"?this.canRedo()&&this.redo():x&&z==="Z"||E&&z==="Backspace"?this.canUndo()&&this.undo():z==="Del"||z==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&z==="A"?this.canSelectAll()&&this.selectAll():z==="Esc"?this.canStopCommand()&&this.stopCommand():z==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):z==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):z==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):z==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):z==="PageUp"?b&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):z==="PageDown"?b&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):z==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):z==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):z===" "?this.canScrollToPart()&&this.scrollToPart():z==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():z==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&z==="0"?this.canResetZoom()&&this.resetZoom():b&&z==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!b&&z==="G"?this.canGroupSelection()&&this.groupSelection():x&&b&&z==="G"?this.canUngroupSelection()&&this.ungroupSelection():z==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():z==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},ut.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},ut.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Ua&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},ut.prototype.canStopCommand=function(){return!0},ut.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=""}},ut.prototype.canSelectAll=function(){return this.diagram.allowSelect},ut.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 Kn,x=a.selection.iterator;x.next();)Cf(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=""}},ut.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},ut.prototype.copySelection=function(){var a=this.diagram,y=new Kn;for(a=a.selection.iterator;a.next();)Cf(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},ut.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},ut.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},ut.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},ut.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Hh=null,Vd="";else{x=y.model;var b=!1,E=!1,z=null;try{x.Tl()&&(b=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(E=x.Ij,x.Ij=this.copiesGroupKey),z=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=b),x.Wj()&&(x.Ij=E),x=new $n,x.addAll(z),Hh=x,Vd=y.model.dataFormat}}y.R("ClipboardChanged",x)},ut.prototype.pasteFromClipboard=function(){var a=new Kn,y=Hh;if(y===null)return a;var x=this.diagram;if(Vd!==x.model.dataFormat)return a;var b=x.model,E=!1,z=!1,ne=null;try{b.Tl()&&(E=b.Jj,b.Jj=this.copiesParentKey),b.Wj()&&(z=b.Ij,b.Ij=this.copiesGroupKey),ne=x.Kj(y,x,!1)}finally{for(b.Tl()&&(b.Jj=E),b.Wj()&&(b.Ij=z),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},ut.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 z=this.computeEffectiveCollection(y.selection,y.Wm);Jc(y,z,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=""}},ut.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Hh===null||Hh.count===0||Vd!==a.model.dataFormat)},ut.prototype.undo=function(){this.diagram.undoManager.undo()},ut.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},ut.prototype.redo=function(){this.diagram.undoManager.redo()},ut.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},ut.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===cu&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},ut.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==cu?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},ut.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===cu&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},ut.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==cu?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},ut.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},ut.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},ut.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;Ul(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=Wo):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Sl(y)},ut.prototype.canZoomToFit=function(){return this.diagram.allowZoom},ut.prototype.scrollToPart=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.Va(),a===null){try{this.cg!==null&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(oe){this.cg=null}a===null&&(0<y.highlighteds.count?this.cg=y.highlighteds.iterator:0<y.selection.count&&(this.cg=y.selection.iterator),this.cg!==null&&this.cg.next()&&(a=this.cg.value))}if(a!==null){var x=y.animationManager;Ul(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=kt(this,a,[a]);if(E.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var z=function(){y.Ea();for(var oe=E.pop();0<E.length&&oe instanceof Di&&oe.isTreeExpanded&&(!(oe instanceof mo)||oe.isSubGraphExpanded);)oe=E.pop();0<E.length?(oe instanceof Pr&&y.tv(oe.actualBounds),oe instanceof Di&&!oe.isTreeExpanded&&(oe.isTreeExpanded=!0),oe instanceof mo&&!oe.isSubGraphExpanded&&(oe.isSubGraphExpanded=!0)):(oe instanceof Pr&&y.es(oe.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){Jn(z,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",ne),z()}}else{var re=y.position.copy();y.es(a.actualBounds),re.Xa(y.position)&&x.Cc()}}};function kt(a,y,x){if(y.isVisible())return x;if(y instanceof ga)kt(a,y.adornedPart,x);else if(y instanceof hi){var b=y.fromNode;b!==null&&kt(a,b,x),y=y.toNode,y!==null&&kt(a,y,x)}else y instanceof Di&&(b=y.labeledLink,b!==null&&kt(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),kt(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),kt(a,y,x));return x}ut.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Pr)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},ut.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Ul(y.animationManager,"Collapse Tree");var x=new $n;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 Di&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},ut.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Di&&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 Di&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},ut.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Ul(y.animationManager,"Expand Tree");var x=new $n;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 Di&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},ut.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Di)||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 Di&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},ut.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 $n,z=a.selection.iterator;z.next();){var ne=z.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var re=new $n,oe=E.iterator;oe.next();){var le=oe.value;z=!1;for(var ce=E.iterator;ce.next();)if(le.Td(ce.value)){z=!0;break}z||re.add(le)}if(0<re.count){var pe=re.first().containingGroup;if(pe!==null)for(;pe!==null;){E=!1;for(var we=re.iterator;we.next();)if(!we.value.Td(pe)){E=!0;break}if(E)pe=pe.containingGroup;else break}if(x instanceof mo)zc(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Ee=y.copyNodeData(x);tn(Ee)&&(y.xf(Ee),b=a.ii(Ee))}if(b!==null){pe!==null&&this.isValidMember(pe,b)&&(b.containingGroup=pe);for(var Ae=re.iterator;Ae.next();){var _e=Ae.value;this.isValidMember(b,_e)&&(_e.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},ut.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 An(a){var y=Si();for(a=a.iterator;a.next();){var x=a.value;x instanceof hi||y.push(x)}a=new Kn,x=y.length;for(var b=0;b<x;b++){for(var E=y[b],z=!0,ne=0;ne<x;ne++)if(E.Td(y[ne])){z=!1;break}z&&a.add(E)}return Ni(y),a}ut.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof hi)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},ut.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 $n;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var z=E.value;z instanceof mo&&z.canUngroup()&&b.add(z)}var ne=new $n;if(0<b.count){y.clearSelection(!0);for(var re=b.iterator;re.next();){var oe=re.value;oe.expandSubGraph();var le=oe.containingGroup,ce=le!==null&&le.data!==null?x.wa(le.data):void 0;ne.addAll(oe.memberParts);for(var pe=ne.iterator;pe.next();){var we=pe.value;if(we.isSelected=!0,!(we instanceof hi)){var Ee=we.data;Ee!==null?x.mp(Ee,ce):we.containingGroup=le}}y.remove(oe)}}y.R("SelectionUngrouped",b,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},ut.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 mo))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof mo&&y.canUngroup())return!0;return!1},ut.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=An(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},ut.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Ul(y.animationManager,"Collapse SubGraph");var x=new $n;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 mo&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},ut.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof mo&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof mo&&y.isSubGraphExpanded)return!0;return!1},ut.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Ul(y.animationManager,"Expand SubGraph");var x=new $n;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 mo&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},ut.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof mo&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof mo&&!y.isSubGraphExpanded)return!0;return!1},ut.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(z){return z instanceof Ya&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},ut.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 Ya))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 Ya&&x.editable}),a!==null))return!0;return!1},ut.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 Yt?E=a.ga(Oo):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,Wa(x,!1,a)}},ut.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)},ut.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 Ti,a===null)return b;for(var z=a.iterator;z.next();)Pc(x,b,z.value,E,y);if(x.draggedLink!==null&&y.dragsLink)return b;for(z=a.iterator;z.next();)a=z.value,a instanceof hi&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},yt.Object.defineProperties(ut.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||Rt("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}}}),ut.className="CommandHandler",zd=function(){return new ut};function Yt(){Io(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new tt(NaN,NaN).freeze(),this.jd=hs,this.Ab=new ur,this.wh=new ur,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=pl,this.uc=new Bn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Bn(NaN,NaN,NaN,NaN).freeze(),this.dc=new Bn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Jt,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 oi,ei,rr,hr,Br,uo,zo,No,Yo,Oa;Yt.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())},Yt.prototype.Vw=function(a){var y=this.Dh;if(hn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Yt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Yt.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},Yt.prototype.copy=function(){return this.clone()},Be=Yt.prototype,Be.qb=function(a){a.classType===hi?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Rt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Yt&&(this.stretch=a)},Be.toString=function(){return Zi(this.constructor)+"#"+Yi(this)},Be.th=function(){this.A!==null&&(this.A.nc=!0)};function Bo(a){a.A===null?a.A=new Vr:a.A.nc&&(a.A=a.A.copy())}Be.Xc=function(){if(this.ba===null){var a=new Po;a.Xi=Ss,a.yj=Ss,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Be.cb=function(a,y,x,b,E,z,ne){var re=this.part;if(re!==null&&(re.gk(a,y,x,b,E,z,ne),x===this&&a===Ha&&Se(this)&&qa(this,re,y),z=this.diagram,this.animationTriggers===null||z===null||!z.pi||z.undoManager.isUndoingRedoing||z.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&z.animationManager.isEnabled&&!z.animationManager.isTicking&&(this.jo===null&&(this.jo=new Ti),ne=z.undoManager.transactionLevel===0,a.startCondition===Ml?ne=!0:a.startCondition===qs&&(ne=!1),ne?(z=new Fs,ys(a,z),ne=this.jo.get(a),ne!==null&&ne.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,b,E),z.start()):(Ul(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof ui&&x===re&&(re.l&16777216)!==0&&re.data!==null))for(x=this.O.s,b=x.length,E=0;E<b;E++)re=x[E],re instanceof ui&&Jf(re,function(oe){oe.data!==null&&oe.l&16777216&&oe.La(y)})};function qa(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var z=E.value,ne=null;if(z.sourceName!==null){if(ne=Lx(z,b,a),ne===null)continue;z.sp(a,ne,x,null)}else if(z.isToModel){var re=y.diagram;re===null||re.skipsModelSourceBindings||z.sp(a,re.model.modelData,x,b)}else{if(re=b.data,re===null)continue;var oe=y.diagram;oe===null||oe.skipsModelSourceBindings||z.sp(a,re,x,b)}ne===a&&(re=b.ks(z.Ai),re!==null&&z.Mv(re,ne,x))}}Be.ks=function(a){return this.bindingId===a?this:null},Be.g=function(a,y,x){this.cb(Ha,a,this,y,x)},Be.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 ur);var z=this.Lb;z.reset(),this.no(z,a,y,x,b),z.pp(E)}};function dl(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}Be.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?Va(a.x,a.y,0,0,0,b.height)<=y||Va(a.x,a.y,0,b.height,b.width,b.height)<=y||Va(a.x,a.y,b.width,b.height,b.width,0)<=y||Va(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},Be.se=function(){return!0},Be.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"),z=b.Ql("extraTouchArea"),ne=z/2,re=this.naturalBounds;b=this.Df()*b.scale;var oe=1/b;if(re.width*b<E&&re.height*b<E)return a=Sa(x.x-ne*oe,x.y-ne*oe,x.width+z*oe,x.height+z*oe,y.x,y.y),tt.free(y),a}return E=!1,(this instanceof ga||this instanceof bo?Sa(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},Be.gh=function(a){var y=this.naturalBounds;return Sa(0,0,y.width,y.height,a.x,a.y)},Be.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Bn.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),Bn.free(y),b},Be.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},Be.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),z=tt.allocAt(x.width,x.height),ne=tt.allocAt(x.width,0),re=!1;if(a.ca(y.Ga(b))||a.ca(y.Ga(E))||a.ca(y.Ga(z))||a.ca(y.Ga(ne)))re=!0;else{x=Bn.allocAt(0,0,x.width,x.height);var oe=tt.allocAt(a.x,a.y);x.ca(y.Cd(oe))?re=!0:(oe.h(a.x,a.bottom),x.ca(y.Cd(oe))?re=!0:(oe.h(a.right,a.bottom),x.ca(y.Cd(oe))?re=!0:(oe.h(a.right,a.y),x.ca(y.Cd(oe))&&(re=!0)))),tt.free(oe),Bn.free(x),!re&&(_t.us(a,b,E)||_t.us(a,E,z)||_t.us(a,z,ne)||_t.us(a,ne,b))&&(re=!0)}return tt.free(b),tt.free(E),tt.free(z),tt.free(ne),re},Be.ga=function(a,y){if(y===void 0&&(y=new tt),a instanceof er){var x=this.naturalBounds;y.h(a.x*x.width+a.offsetX,a.y*x.height+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Be.mi=function(a){a===void 0&&(a=new Bn);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),us(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),us(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),us(a,b.x,b.y,0,0),tt.free(b),a},Be.li=function(){var a=this.oe;return a.m11===1&&a.m12===0?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360)),a},Be.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Be.qs=function(a,y){return y===void 0&&(y=new tt),y.assign(a),this.oe.Cd(y),y},Be.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Be.Sj=function(a,y,x,b,E){var z=this.transform,ne=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*ne,oe=-z.m12*ne,le=-z.m21*ne,ce=z.m11*ne,pe=ne*(z.m21*z.dy-z.m22*z.dx),we=ne*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,_t.Ff(z.left,z.top,z.right,z.bottom,a,y,x,b,E)):(ne=a*re+y*le+pe,a=a*oe+y*ce+we,y=x*re+b*le+pe,x=x*oe+b*ce+we,E.h(0,0),b=this.naturalBounds,x=_t.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(z),x)},Yt.prototype.measure=function(a,y,x,b){if(mt(this)!==!1){var E=this.Kg,z=E.right+E.left;E=E.top+E.bottom,a=Math.max(a-z,0),y=Math.max(y-E,0),x=Math.max((x||0)-z,0),b=Math.max((b||0)-E,0),z=this.angle,E=this.desiredSize;var ne=this.kq();z===90||z===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 re=this instanceof ui;switch(yu(this,!0)){case ei:ne=E=0,re&&(y=a=1/0);break;case oi:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(ne=y);break;case hr:isFinite(a)&&a>x&&(E=a),ne=0,re&&(y=1/0);break;case Br:isFinite(y)&&y>b&&(ne=y),E=0,re&&(a=1/0)}re=this.maxSize;var oe=this.minSize;E>re.width&&oe.width<re.width&&(E=re.width),ne>re.height&&oe.height<re.height&&(ne=re.height),x=Math.max(E,oe.width),b=Math.max(ne,oe.height),re.width<x&&(x=Math.min(oe.width,x)),re.height<b&&(b=Math.min(oe.height,b)),a=Math.min(re.width,a),y=Math.min(re.height,y),a=Math.max(x,a),y=Math.max(b,y),(z===90||z===270)&&(z=a,a=y,y=z,z=x,x=b,b=z),this.uc.ka(),this.Wl(a,y,x,b),this.uc.freeze(),this.uc.w()||Rt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),gt(this,!1)}},Yt.prototype.Wl=function(){},Yt.prototype.Dd=function(){return!1},Yt.prototype.arrange=function(a,y,x,b,E){this.Uk();var z=Bn.alloc();z.assign(this.Ib),this.Ib.ka(),Ft(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&&$h(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 Ya&&(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()||Rt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),jt(this,!1),Bn.free(z)},Be=Yt.prototype,Be.eh=function(){};function du(a,y,x,b,E){if(a.Ib.h(y,x,b,E),!a.desiredSize.w()){var z=a.uc;x=a.Kg,y=x.right+x.left;var ne=x.top+x.bottom;switch(x=z.width+y,z=z.height+ne,b+=y,E+=ne,y=yu(a,!0),x===b&&z===E&&(y=ei),y){case ei:(x>b||z>E)&&(gt(a,!0),a.measure(x>b?b:x,z>E?E:z,0,0));break;case oi:gt(a,!0),a.measure(b,E,0,0);break;case hr:gt(a,!0),a.measure(b,z,0,0);break;case Br:gt(a,!0),a.measure(x,E,0,0)}}}Be.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||Uv(x,!0),this.N(),Mo(a,y)||(x.oh(),this.Pn(x)))},Be.Pn=function(a){this.portId!==null&&(Uv(a,!0),a instanceof Di&&G1(a,this))},Be.gc=function(a,y){if(!ec(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 z=this instanceof ui&&$h(this),ne=this.Ib;if(z){var re=this.Ib,oe=this.dc,le=this.areaBackground,ce=this.Ma;le===null&&ce===null||a.yc(),le!==null&&(Bs(this,a,le,!0,!0,oe,re),le instanceof fa&&le.type===Ac?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(le)):a.fillRect(re.x,re.y,re.width,re.height)),ce!==null&&(Bs(this,a,ce,!0,!1,oe,re),ce instanceof fa&&ce.type===Ac?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(ce)):a.fillRect(re.x,re.y,re.width,re.height)),this.hh(a,y)}if(!z&&(z||ne.width!==0&&ne.height!==0&&!isNaN(ne.x)&&!isNaN(ne.y))){z=this.transform,re=this.panel,this.l&4096&&Nl(this),le=this.part,oe=!1;var pe=0;le&&y.Gf("drawShadows")&&(oe=le.isShadowed)&&(ce=le.shadowOffset,pe=Math.max(ce.y,ce.x)*y.scale*y.Mb),ce=this.Dd();var we;if(!(we=y.$i||!ce)){var Ee=this.naturalBounds;we=this.wh;var Ae=we.m11,_e=we.m21,ct=we.dx,Qe=we.m12,Pt=we.m22,Et=we.dy,Dt,Vt=Dt=0;we=Dt*Ae+Vt*_e+ct;var mn=Dt*Qe+Vt*Pt+Et;Dt=Ee.width+pe,Vt=0;var Ei=Dt*Ae+Vt*_e+ct;Dt=Dt*Qe+Vt*Pt+Et,Vt=Math.min(we,Ei);var Qi=Math.min(mn,Dt),Gi=Math.max(we+0,Ei)-Vt,di=Math.max(mn+0,Dt)-Qi;we=Vt,mn=Qi,Dt=Ee.width+pe,Vt=Ee.height+pe,Ei=Dt*Ae+Vt*_e+ct,Dt=Dt*Qe+Vt*Pt+Et,Vt=Math.min(we,Ei),Qi=Math.min(mn,Dt),Gi=Math.max(we+Gi,Ei)-Vt,di=Math.max(mn+di,Dt)-Qi,we=Vt,mn=Qi,Dt=0,Vt=Ee.height+pe,Ei=Dt*Ae+Vt*_e+ct,Dt=Dt*Qe+Vt*Pt+Et,Vt=Math.min(we,Ei),Qi=Math.min(mn,Dt),Gi=Math.max(we+Gi,Ei)-Vt,di=Math.max(mn+di,Dt)-Qi,we=Vt,mn=Qi,pe=y.viewportBounds,Ee=pe.x,Ae=pe.y,we=!(we>pe.width+Ee||Ee>Gi+we||mn>pe.height+Ae||Ae>di+mn)}if(we){if(we=(this.l&256)!==0,a.clipInsteadOfFill&&(we=!1),this instanceof Ya&&(a.font=this.font),we){if(mn=re.se()?re.naturalBounds:re.actualBounds,Gi=Math.max(ne.x,mn.x),di=Math.max(ne.y,mn.y),pe=Math.min(ne.right,mn.right)-Gi,Ee=Math.min(ne.bottom,mn.bottom)-di,Ae=this.tb,Ae!==null&&(Gi=Ae.x,di=Ae.y,pe=Ae.width,Ee=Ae.height),Gi>ne.width+ne.x||ne.x>mn.width+mn.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(Gi,di,pe,Ee),a.clip()}if(ce){if(!le.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}oe&&(mn=le.shadowOffset,a.Ev(mn.x*y.scale*this.scale*y.Mb,mn.y*y.scale*this.scale*y.Mb,le.shadowBlur),Zl(a),a.shadowColor=le.shadowColor)}oe&&this.shadowVisible===!0?Zl(a):oe&&this.shadowVisible===!1&&xu(a),le=this.naturalBounds,this.areaBackground!==null&&(a.yc(),qu(this,a,le,ne)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),oe&&Fl(this,re)&&this.shadowVisible===null&&xu(a),this.Ma!==null&&(a.yc(),Lu(this,a,le,ne)),oe&&(this.Ma!==null||this.areaBackground!==null||Fl(this,re))?(wc(this,!0),this.shadowVisible===null&&xu(a)):wc(this,!1),this.hh(a,y),oe&&this.l&512&&Zl(a),ce&&oe&&xu(a),we&&(a.restore(),a.Vc(this instanceof ui)),z.ws()||(y=1/(z.m11*z.m22-z.m12*z.m21),a.transform(z.m22*y,-z.m12*y,-z.m21*y,z.m11*y,y*(z.m21*z.dy-z.m22*z.dx),y*(z.m12*z.dx-z.m11*z.dy)))}}x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E)}}};function Fl(a,y){return y===null?!1:($h(y)&&(y=y.panel),(y.l&512)!==0||(y.type===ui.Auto||y.type===ui.Spot)&&y.Pb()!==a)}Be.Dv=function(){};function qu(a,y,x,b){Bs(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof fa&&a.areaBackground.type===Ac?(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 Lu(a,y,x,b){var E=a.kq(),z=x.x,ne=x.y,re=x.width+E,oe=x.height+E;Bs(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof fa&&a.Ma.type===Ac?(y.beginPath(),y.rect(z-E/2,ne-E/2,re,oe),y.ng(a.Ma)):y.fillRect(z-E/2,ne-E/2,re,oe)}function iu(a,y,x){for(var b=y.O.s,E=b.length,z=-1,ne=0;ne<E;ne++)if(b[ne]===a){z=ne;break}if(a=z,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===ui.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 ec(a,y,x){if(!(y instanceof Fa))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&&iu(a,b,a.svg),!0);if(a.Dd()&&a.isShadowed){var z=a.shadowOffset;y.Ev(z.x*x.scale*a.scale*x.Mb,z.y*x.scale*a.scale*x.Mb,a.shadowBlur),Zl(y),y.shadowColor=a.shadowColor}a instanceof Ya&&(y.font=a.font),y.yd=null;var ne=a.transform;z=a instanceof ui;var re=a instanceof ui?$h(a):!1;a.l&4096&&Nl(a);var oe=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,z&&re?(Bc(y,1,0,0,1,0,0),a.svg=y.ad):z?(Bc(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):Bc(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var le=ne.copy().Vj();y.rb.ha=[le.m11,le.m12,le.m21,le.m22,le.dx,le.dy],qu(a,y,E,oe),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),a.background!==null&&(z?(re&&(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),Lu(a,y,E,oe),re&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],Lu(a,y,E,oe)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),ne=y.yd,E=a.part,re=!1,E&&x.Gf("drawShadows")&&(re=E.isShadowed),y.clipInsteadOfFill&&(re=!1),a.Dd()&&re&&Zl(y),re&&a.shadowVisible===!0?Zl(y):re&&a.shadowVisible===!1&&xu(y),E=a.panel,re&&Fl(a,E)&&a.shadowVisible===null&&xu(y),y.Il&&(le=x.computePixelRatio(),le="drop-shadow("+y.shadowOffsetX/le+"px "+y.shadowOffsetY/le+"px "+y.shadowBlur/le/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",le),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",le)),re&&(a.Ma!==null||a.areaBackground!==null||Fl(a,E))?(wc(a,!0),a.shadowVisible===null&&xu(y)):wc(a,!1),E=re,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),ne=y.Gv.hs,re=z?a.svg:y.yd,le=a.svg,!z&&le!==null&&re!==le&&le.parentNode===a.panel.svg?(a.svg.replaceWith(re),a.svg=re,re!==null&&a.$o(y,b,oe,re),vu(y,le),!0):(a.svg=re,ne!==null&&re===null&&(Cc(y),y.nh.pop()),re===null||(a.$o(y,b,oe,re),y.Il&&(x=x.computePixelRatio(),a.Dv(re,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&Zl(y),a.Dd()&&xu(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&re.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&re.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(re):y.Nj.prepend(re),y.ti=re):b!==null&&iu(a,b,re),ne!==null&&ne(a,re)),!0)}Be.$o=function(a,y,x,b){var E=(this.l&256)!==0;if(a.clipInsteadOfFill&&(E=!1),E){var z=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,z.x),E=Math.max(x.y,z.y);var ne=Math.min(x.right,z.right)-y;x=Math.min(x.bottom,z.bottom)-E,z=this.tb,z!==null&&(y=z.x,E=z.y,ne=z.width,x=z.height),z=b.getAttribute("clip-path");var re=null;z!==null&&(re=a.svg.getElementById(z.split("#")[1].slice(0,-1))),re===null?(z="CLIP"+ua++,re=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof ui&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),re.appendChild(y),a.svg.appendChild(re),b.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=re.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"),vu(a,b)};function vu(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function ru(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Hr(y);for(var b=y.next();!b.done;b=y.next())b=x.getElementById(b.value.split("#")[1].slice(0,-1)),b!==null&&b.remove()}a.svg.remove()}}Be.hh=function(){},Be.lv=function(){this.Uc=!0},Be.kk=function(a,y,x){if(this.Uc)return this.lv(),this.Uc=!1;if(y=this.svg,y===null)return!1;if(!this.visible)return y.remove(),!1;if(y.nodeName!=="g"&&x||y.nodeName==="g"&&!x)return!1;var b=this.transform,E=this instanceof ui?$h(this):!1;if(!(this instanceof ui&&E))if(this instanceof Ku){var z=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],z!==null&&Ts(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",ou(a)):y.setAttributeNS(null,"transform",ou(a))}else if(!x||this instanceof ui)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof bo){z=y.getElementsByTagName("path");for(var ne=0;ne<z.length;ne++)z[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 z=this.Dd()?this.opacity*a.globalAlpha:this.opacity,z===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",z.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(z=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(ne=b.copy().Vj(),a.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],qu(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(ne=y.gd.getAttribute("filter"),ne!==null&&a.ad.setAttribute("filter",ne),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&Bd(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(Bd(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof ui))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),Lu(this,a,this.naturalBounds,this.actualBounds),y.Ma?(Bd(a,y.Ma),x=y.Ma.getAttribute("filter"),x!==null&&a.ad.setAttribute("filter",x),y.Ma.replaceWith(a.ad)):y.prepend(a.ad),y.Ma=a.ad),z&&Bd(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},Be.nk=function(a){if(this.background!==null||this.areaBackground!==null)return!0;var y=(this.l&256)!==0;return a.clipInsteadOfFill&&(y=!1),!!y};function Bs(a,y,x,b,E,z,ne){if(x!==null){var re=1,oe=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===Gh)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var le=a.kq();if(re=z.width,oe=z.height,E?(re=ne.width,oe=ne.height):b||(re+=le,oe+=le),(z=y instanceof gd)&&x.xe&&(x.type===lp||x.yk===re&&x.ft===oe))var ce=x.xe;else{var pe=0,we=0,Ee=0,Ae=0,_e=0,ct=0;if(ct=_e=0,E?(_e=ne.x,ct=ne.y):b||(_e-=le/2,ct-=le/2),pe=x.start.x*re+x.start.offsetX,we=x.start.y*oe+x.start.offsetY,Ee=x.end.x*re+x.end.offsetX,Ae=x.end.y*oe+x.end.offsetY,pe+=_e,Ee+=_e,we+=ct,Ae+=ct,x.type===Mh)ce=y.createLinearGradient(pe,we,Ee,Ae);else if(x.type===Ac)ct=isNaN(x.endRadius)?Math.max(re,oe)/2:x.endRadius,isNaN(x.startRadius)?(_e=0,ct=Math.max(re,oe)/2):_e=x.startRadius,ce=y.createRadialGradient(pe,we,_e,Ee,Ae,ct);else if(x.type===lp)try{ce=y.createPattern(x.pattern,"repeat")}catch(Pt){ce=null}if(x.type!==lp&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)ce.addColorStop(E.key,E.value);if(z&&(x.xe=ce,ce!==null&&(x.yk=re,x.ft=oe),ce===null&&x.type===lp&&x.yk!==-1)){x.yk=-1;var Qe=a.diagram;Qe!==null&&x.yk===-1&&Jn(function(){Qe.redraw()},600)}}b?y.fillStyle=ce:y.strokeStyle=ce}}}Be.rg=function(a){if(a instanceof ui)e:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break e}y=y.panel}a=!1}else a=!1;return a},Be.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Be.If=function(){for(var a=this instanceof ui?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Nl(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){De(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)}De(a,!1),Ge(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Ge(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,Ge(a,!1)))}Be.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=tt.alloc();z.yi(y,x,b,E,Oo),a.rotate(this.Kb,z.x,z.y),tt.free(z)}},Be.v=function(a){if(!mt(this)){a===void 0&&(a=!1),gt(this,!0),jt(this,!0);var y=this.panel;y===null||a||y.v()}},Be.Uj=function(){mt(this)||(gt(this,!0),jt(this,!0))};function pu(a){if(!Ft(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Di&&a.Bd(),y.$b())),jt(a,!0)}}Be.Uk=function(){!(this.l&2048)&&(De(this,!0),Ge(this,!0))},Be.Wu=function(){Ge(this,!0)},Be.N=function(){var a=this.part;a!==null&&a.N()};function yu(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===ui.Table?_c(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===ui.Auto&&b.Pb()===a?Bl(a,oi,y):x===uo?b!==null?b.type===ui.Spot&&b.Pb()===a?Bl(a,oi,y):(x=b.defaultStretch,x===uo?Bl(a,ei,y):Bl(a,x,y)):Bl(a,ei,y):Bl(a,x,y)}function _c(a,y,x,b){var E=a.stretch;if(E!==uo)return Bl(a,E,b);var z=E=null;switch(y.stretch){case Br:z=!0;break;case oi:z=!0}switch(x.stretch){case hr:E=!0;break;case oi:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===hr||y===oi),z===null&&(z=y===Br||y===oi),E===!0&&z===!0?Bl(a,oi,b):E===!0?Bl(a,hr,b):z===!0?Bl(a,Br,b):Bl(a,ei,b)}function Bl(a,y,x){if(x)return y;if(y===ei||(x=a.desiredSize,x.w()))return ei;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===hr)return ei;if(y===oi)return Br}else{if(y===Br)return ei;if(y===oi)return hr}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Br)return ei;if(y===oi)return hr}else{if(y===hr)return ei;if(y===oi)return Br}return y}function wc(a,y){a.l=y?a.l|512:a.l&-513}function Se(a){return(a.l&1024)!==0}function Ce(a,y){a.l=y?a.l|1024:a.l&-1025}function De(a,y){a.l=y?a.l|2048:a.l&-2049}function Ge(a,y){a.l=y?a.l|4096:a.l&-4097}function mt(a){return(a.l&8192)!==0}function gt(a,y){a.l=y?a.l|8192:a.l&-8193}function Ft(a){return(a.l&16384)!==0}function jt(a,y){a.l=y?a.l|16384:a.l&-16385}Be.Gj=function(){this.svg=null},Be.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Be.Av=function(){},Be.zv=function(a){return this.pa=a,pu(this),!0},Be.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Be.kq=function(){return 0};function Cn(a){var y=a.part;if(y instanceof Di&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||G1(y,a)}}function Wn(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof ui?a instanceof Di?a.Bd():a.qm(a,function(x){Cn(x)}):Cn(a))}Be.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new ol(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&f1(a)&&Rt("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new $n),this.localBindings.add(E),this},Be.set=function(a){return Object.assign(this,a),this},Be.Du=function(a){return Nn(this,a),this},Be.apply=function(a){return a(this),this},Be.nm=function(a){return hc(this,a),this},Be.pz=function(){return this.ih()},Be.ih=function(){for(var a=this instanceof ui?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Be.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Ti),this.animationTriggers.add(a.propertyName,a),this};function On(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 z=ki.I(a);typeof z=="function"?(x=Rn(arguments),b=z(x),tn(b)||Rt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=nt.go[a]}if(b===null&&(E!=null&&E.constructor||Rt("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 gn&&1<x.length){z=b;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(Rh(z,ne),E++)}for(;E<x.length;E++)z=x[E],z===void 0?Rt("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):Nn(b,z);return b}function Nn(a,y){if(typeof y=="string")if(a instanceof Ya)a.text=y;else if(a instanceof bo)a.figure=y;else if(a instanceof Ku)a.source=y;else if(a instanceof ui)y=ed.I(y),y!==null&&(a.type=y);else if(a instanceof fa){var x=pi(fa,y);x!==null?a.type=x:Rt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Zn?(y=pi(Zn,y),y!==null&&(a.type=y)):a instanceof Mi&&(y=pi(Mi,y),y!==null&&(a.type=y));else if(y instanceof Yt)a instanceof ui||Rt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof hl){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 hl?Qm(b,y):Rt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof qt)typeof a.qb=="function"&&a.qb(y);else if(y instanceof ml)a.type=y;else if(y instanceof ol)a instanceof Yt||a instanceof hl?a.bind(y):Rt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof Hu)a instanceof Yt?a.Jv(y):Rt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Zr)a instanceof Zn&&a.type===Zn.o?a.figures.add(y):Rt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Mi)a instanceof Zr?a.segments.add(y):Rt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof ms)a instanceof gn||a instanceof mo?a.layout=y:Rt("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++)Nn(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof fa){x=new qi;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);hc(a,x)}else if(a instanceof hl){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&Rt("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)&&Rt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new qi;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);hc(a,E)}else hc(a,y);else Rt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Fn(a,y){ki.add(a,y)}function qn(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}yt.Object.defineProperties(Yt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Vr),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 Vr),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 Vr),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Bo(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&&(Bo(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Nu},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new to),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Nu&&(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 to),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 to),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:jo},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new to),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:uo},set:function(a){var y=this.stretch;y!==a&&(Bo(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&&(Bo(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)&&Vn(a,"0 <= value <= 1",Yt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(eg(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(eg(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(),Wn(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&&yf(a,"GraphObject.areaBackground"),a instanceof fa&&a.freeze(),Bo(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&&yf(a,"GraphObject.background"),a instanceof fa&&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 Pr)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&&Rt("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,Wn(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,z=b.height;(E===y||isNaN(E)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof bo&&this.qc(),this.g("desiredSize",b,a),Se(this)&&(a=this.part,a!==null&&(qa(this,a,"width"),qa(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 ci(a,this.jd.height).freeze(),this.v(),this instanceof bo&&this.qc(),this.g("desiredSize",y,a),Se(this)&&(a=this.part,a!==null&&qa(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 ci(this.jd.width,a).freeze(),this.v(),this instanceof bo&&this.qc(),this.g("desiredSize",y,a),Se(this)&&(a=this.part,a!==null&&qa(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:xa},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(),Bo(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:ja},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(),Bo(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 or(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&&Nl(this),this.Ab}},oe:{get:function(){return this.l&4096&&Nl(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Bo(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:ei},set:function(a){this.reshapingBehavior!==a&&(Bo(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()&&Rt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),pu(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&&Vn(a,">= 0",Yt,"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&&Vn(a,">= 1",Yt,"columnSpan"),Bo(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&&Vn(a,">= 0",Yt,"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&&Vn(a,">= 1",Yt,"rowSpan"),Bo(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&&(Bo(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 Di||Rt("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Qv(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:Ss},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Cn(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Vn(a,">= 0",Yt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Cn(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),Cn(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&&Vn(a,">= 0",Yt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Ss},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Cn(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Vn(a,">= 0",Yt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Cn(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),Cn(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&&Vn(a,">= 0",Yt,"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&&(Bo(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&&(Bo(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&&(Bo(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&&(Bo(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&&(Bo(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&&(Bo(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&&(Bo(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&&(Bo(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&&(Bo(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&&(Bo(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&&(Bo(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&&(Bo(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&&(Bo(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&&(Bo(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&&(Bo(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&&(Bo(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&&(Bo(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&&(Bo(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Yt.prototype.trigger=Yt.prototype.Jv,Yt.prototype.findBindingPanel=Yt.prototype.ih,Yt.prototype.findTemplateBinder=Yt.prototype.pz,Yt.prototype.setProperties=Yt.prototype.nm,Yt.prototype.apply=Yt.prototype.apply,Yt.prototype.attach=Yt.prototype.Du,Yt.prototype.set=Yt.prototype.set,Yt.prototype.isEnabledObject=Yt.prototype.If,Yt.prototype.isVisibleObject=Yt.prototype.Ed,Yt.prototype.isContainedBy=Yt.prototype.rg,Yt.prototype.getNearestIntersectionPoint=Yt.prototype.rs,Yt.prototype.getLocalPoint=Yt.prototype.qs,Yt.prototype.getDocumentScale=Yt.prototype.Df,Yt.prototype.getDocumentAngle=Yt.prototype.li,Yt.prototype.getDocumentBounds=Yt.prototype.mi,Yt.prototype.getDocumentPoint=Yt.prototype.ga,Yt.prototype.intersectsRect=Yt.prototype.Yc,Yt.prototype.containedInRect=Yt.prototype.fh,Yt.prototype.containsRect=Yt.prototype.Re,Yt.prototype.containsPoint=Yt.prototype.ca,Yt.prototype.raiseChanged=Yt.prototype.g,Yt.prototype.raiseChangedEvent=Yt.prototype.cb,Yt.prototype.addCopyProperty=Yt.prototype.Vw;var ki=null;Yt.className="GraphObject",ki=new Ti,Fn("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=On(ui,ui.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof ui){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"},On(bo,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new er(0,0,2.76142374915397,2.761423749153969),spot2:new er(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 ui&&(x=b.fb("ButtonBorder"),x instanceof bo)){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 ui&&(x=b.fb("ButtonBorder"),x instanceof bo&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof ui&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof bo){x=x.diagram;var z=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=z}}},y.actionUp=function(x,b){if(b.If()&&b instanceof ui&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof bo){var z=x.diagram,ne=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),z.skipsUndoManager=ne}}},y.actionCancel=function(x,b){if(b.If()&&b instanceof ui&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof bo){var z=x.diagram,ne=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),z.skipsUndoManager=ne}}},y.actionMove=function(x,b){if(b.If()&&b instanceof ui&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof bo))){var z=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=z}}},y}),Fn("TreeExpanderButton",function(){var a=On("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},On(bo,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:ho},new ol("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new ol("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof ga&&(x=x.adornedPart),x instanceof Di){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}),Fn("SubGraphExpanderButton",function(){var a=On("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},On(bo,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:ho},new ol("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 ga&&(x=x.adornedPart),x instanceof mo){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}),Fn("ToolTip",function(){return On(ga,ui.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new tt(0,3),shadowBlur:5},On(bo,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new er(0,0,4,6),spot2:new er(1,1,-4,-4)}))}),Fn("ContextMenu",function(){return On(ga,ui.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new tt(0,3),shadowBlur:5},new ol("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Fn("ContextMenuButton",function(){var a=On("Button");a.stretch=hr;var y=a.fb("ButtonBorder");return y instanceof bo&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new er(0,0,2,3),y.spot2=new er(1,1,-2,-2)),a}),Fn("PanelExpanderButton",function(a){var y=qn(a,"COLLAPSIBLE"),x=On("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},On(bo,{name:"ButtonIcon",strokeWidth:2},new ol("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof bo&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(b,E){var z=E.diagram;if(z!==null&&!z.isReadOnly){var ne=E.ih();ne===null&&(ne=E.part),ne!==null&&(E=ne.fb(y),E!==null&&(b.handled=!0,z.Ea("Collapse/Expand Panel"),E.visible=!E.visible,z.eb("Collapse/Expand Panel")))}},x}),Fn("CheckBoxButton",function(a){var y=qn(a);return a=On("Button",{desiredSize:new ci(14,14)},On(bo,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:oi,geometryStretch:rr,visible:!1},y!==""?new ol("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof ui){var E=x.diagram;if(!(E===null||E.isReadOnly||y!==""&&E.model.isReadOnly)){x.handled=!0;var z=b.fb("ButtonIcon");E.Ea("checkbox"),z.visible=!z.visible,typeof b._doClick=="function"&&b._doClick(x,b),E.eb("checkbox")}}},a}),Fn("CheckBox",function(a){a=qn(a),a=On("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new or(0,1,0,0)});var y=On(ui,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new or(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}),Yt.None=ei=new qt(Yt,"None",0),Yt.Default=uo=new qt(Yt,"Default",0),Yt.Vertical=Br=new qt(Yt,"Vertical",4),Yt.Horizontal=hr=new qt(Yt,"Horizontal",5),Yt.Fill=oi=new qt(Yt,"Fill",3),Yt.Uniform=rr=new qt(Yt,"Uniform",1),Yt.UniformToFill=zo=new qt(Yt,"UniformToFill",2),Yt.FlipVertical=No=new qt(Yt,"FlipVertical",1),Yt.FlipHorizontal=Yo=new qt(Yt,"FlipHorizontal",2),Yt.FlipBoth=Oa=new qt(Yt,"FlipBoth",3),Yt.make=On,Yt.getBuilders=function(){var a=new Ti,y;for(y in ki)if(y!==y.toLowerCase()){var x=ki.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Yt.defineBuilder=Fn,Yt.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=ki.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof Yt))return y&&b.set(y),b;Rt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Yt.takeBuilderArgument=qn;function Vr(){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=xa,this.o=ja,this.hg=uo,this.ob=this.Bi=1,this.Pf=ei,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Vr.prototype.copy=function(){var a=new Vr;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 to(){this.u=-1/0,this.o=0,this.F=jo,this.rr=Nu,this.j=this.V="None"}to.prototype.copy=function(){var a=new to;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},to.className="LinkElementSettings";function Po(){this.yj=this.Xi=Jt,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Po.prototype.copy=function(){var a=new Po;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},Po.className="LinkSettings";function To(){this.ha=[1,0,0,1,0,0]}To.prototype.copy=function(){var a=new To;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},To.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},To.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},To.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,z=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]=z,this.ha[3]=ne,this.translate(-y,-x)}},To.className="STransform";function ea(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}ea.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},ea.className="SGradient";function Uo(a,y,x){this.ownerDocument=a=y===void 0?nt.document:y,this.cA="http://www.w3.org/2000/svg",a!==void 0&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink")),this.hs=null,this.context=new Fa(this,x)}Uo.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},Uo.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),tn(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},Uo.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Uo.prototype.focus=function(){this.Oa.focus()},Uo.prototype.mx=function(){this.ownerDocument=null},yt.Object.defineProperties(Uo.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}}}),Uo.className="SVGSurface";function Fa(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 To,this.j=Cc(this),this.Nj=Cc(this,"gojs-diagram"),this.Hl=this.ti=null;var x=ua++,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 os(a,y,x,b,E,z,ne){a.Nj===void 0?Bc(a,y,x,b,E,z,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+z+", "+ne+")")}Be=Fa.prototype,Be.arc=function(a,y,x,b,E,z,ne,re){var oe=2*Math.PI,le=oe-1e-6,ce=x*Math.cos(b),pe=x*Math.sin(b),we=a+ce,Ee=y+pe,Ae=z?0:1;b=z?b-E:E-b,(1e-6<Math.abs(ne-we)||1e-6<Math.abs(re-Ee))&&this.path.push(["L",we,+Ee]),0>b&&(b=b%oe+oe),b>le?(this.path.push(["A",x,x,0,1,Ae,a-ce,y-pe]),this.path.push(["A",x,x,0,1,Ae,we,Ee])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),Ae,a+x*Math.cos(E),y+x*Math.sin(E)])},Be.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Be.Se=function(a){this.addPath(this.path,this.rb,a||0)},Be.bezierCurveTo=function(a,y,x,b,E,z){this.path.push(["C",a,y,x,b,E,z])},Be.clearRect=function(){},Be.clip=function(){this.Yl.clipPath=!0},Be.closePath=function(){this.path.push(["z"])},Be.createLinearGradient=function(a,y,x,b){var E=new ea("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},Be.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var b="PATTERN"+ua++,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(Ch,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},Be.createRadialGradient=function(a,y,x,b,E,z){var ne=new ea("radial");return ne.x1=a,ne.y1=y,ne.r1=x,ne.x2=b,ne.y2=E,ne.r2=z,ne};function Ts(a,y,x,b,E,z,ne,re,oe){b=re/b,E=oe/E,z===0&&ne===0||a.rb.translate(z,ne),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}Be.drawImage=function(a,y,x,b,E,z,ne,re,oe){var le="";a instanceof HTMLCanvasElement&&(le=a.toDataURL()),a instanceof HTMLImageElement&&(le=a.getAttribute("src"));var ce=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(z=y,ne=x,re=b=ce,oe=E=a),b=b||0,E=E||0,re=re||0,oe=oe||0,Ts(this,y,x,b,E,z||0,ne||0,re,oe),z={x:0,y:0,width:ce||b,height:a||E,href:le},_t.$(b,re)&&_t.$(E,oe)?le.toLowerCase().indexOf(".svg")===-1&&le.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||b!==ce||E!==a)&&(b+=y,E+=x,z["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),As(this,Ch,z,this.rb),this.addElement(Ch,z)},Be.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),Xl(this,this.Yl)},Be.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Be.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},As(this,"fill",a,this.rb),this.addElement("rect",a)},Be.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},As(this,"fill",a,this.rb),Xl(this,a),this.svg.prepend(this.Ud("rect",a))},Be.fillText=function(a,y,x){a=[a,y,x],y=this.textAlign,y==="left"?y="start":y==="right"?y="end":y==="center"&&(y="middle"),y={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":y},As(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Be.lineTo=function(a,y){this.path.push(["L",a,y])},Be.moveTo=function(a,y){this.path.push(["M",a,y])},Be.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},Be.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"])},Be.restore=function(){this.rb=this.stack.pop(),this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle,this.font=a.font,this.globalAlpha=a.globalAlpha,this.lineCap=a.lineCap,this.lineDashOffset=a.lineDashOffset,this.lineJoin=a.lineJoin,this.lineWidth=a.lineWidth,this.miterLimit=a.miterLimit,this.shadowBlur=a.shadowBlur,this.shadowColor=a.shadowColor,this.shadowOffsetX=a.shadowOffsetX,this.shadowOffsetY=a.shadowOffsetY,this.strokeStyle=a.strokeStyle,this.textAlign=a.textAlign,this.bk=a.bk},Be.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign,bk:this.bk});for(var a=[],y=0;y<this.path.length;y++)a.push(this.path[y]);this.stack.push(a),this.stack.push(this.rb.copy())},Be.setTransform=function(a,y,x,b,E,z){a===1&&y===0&&x===0&&b===1&&E===0&&z===0||Bc(this,a,y,x,b,E,z)};function ou(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Be.scale=function(a,y){this.rb.scale(a,y)},Be.translate=function(a,y){this.rb.translate(a,y)},Be.transform=function(){},Be.yc=function(){},Be.stroke=function(){tc(this,this.Yl)},Be.jk=function(){this.clipInsteadOfFill||this.stroke()},Be.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Be.addElement=function(a,y,x){return a=this.Ud(a,y,x),this.yd!==null?this.yd.appendChild(a):this.yd=a,this.ad=a};function As(a,y,x,b){y==="fill"?Xl(a,x):y==="stroke"&&tc(a,x),b!==null&&(a=b.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function Xl(a,y){a.fillStyle instanceof ea?y.fill=fd(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 Gu(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof ea?y.setAttributeNS(null,"fill",fd(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 tc(a,y){if(a.strokeStyle instanceof ea)y.stroke=fd(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 fd(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"+ua++,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 z=[],ne=0;ne<y;ne++){var re=E[ne],oe=re.color;re={offset:re.offset,"stop-color":oe},/^rgba\(/.test(oe)&&(oe=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(oe),re["stop-color"]="rgb("+oe[1]+","+oe[2]+","+oe[3]+")",re["stop-opacity"]=oe[4]),z.push(re)}for(z.sort(function(le,ce){return le.offset>ce.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",z[E]));return a.svg.appendChild(x),"url(#"+b+")"}Be.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var z=Rn(a[E]),ne=[z.shift()];if(ne[0]==="A")ne.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)ne.push(z.shift()+","+z.shift());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,As(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var re in a)re!=="transform"&&y.setAttributeNS(null,re,a[re]);else{re=y.getElementsByTagName("path");for(var oe in a)oe!=="transform"&&re[x].setAttributeNS(null,oe,a[oe])}else this.addElement("path",a)};function Bc(a,y,x,b,E,z,ne){var re=new To;re.ha=[y,x,b,E,z,ne],y={},As(a,"g",y,re),re=a.addElement("g",y),a.nh.push(re)}function Cc(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Be.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function xu(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Zl(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Be.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Be.fs=function(){this.Ct=!1},Be.Vc=function(){},Be.Wx=function(){},Fa.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Fa.prototype.getImageData=function(){return null},Fa.prototype.measureText=function(){return null};function Bd(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()))}Fa.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Fa.className="SVGContext",gn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Uo(this,nt.document));var y=new Uo(this,nt.document,!0);a===void 0&&(a=new qi);var x=this;return Sh(this,function(b,E){return b=tp(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},gn.prototype.makeSvg=gn.prototype.Cs,gn.prototype.av=function(a){return this.Cs(a)},gn.prototype.makeSVG=gn.prototype.av;function Jl(a,y,x,b){this.ownerDocument=y=y===void 0?nt.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new gd(y,x,b),y.H=a}Jl.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},Jl.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Jl.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Jl.prototype.focus=function(){this.Oa.focus()},Jl.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},yt.Object.defineProperties(Jl.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}}}),Jl.className="CanvasSurface";function gd(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Rt("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 ur,this.isTemporary=!!x}Be=gd.prototype,Be.Wx=function(a){this.Z.imageSmoothingEnabled=a},Be.arc=function(a,y,x,b,E,z){this.Z.arc(a,y,x,b,E,z)},Be.beginPath=function(){this.Z.beginPath()},Be.Se=function(){},Be.bezierCurveTo=function(a,y,x,b,E,z){this.Z.bezierCurveTo(a,y,x,b,E,z)},Be.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},Be.clip=function(){this.Z.clip()},Be.closePath=function(){this.Z.closePath()},Be.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},Be.createPattern=function(a,y){return this.Z.createPattern(a,y)},Be.createRadialGradient=function(a,y,x,b,E,z){return this.Z.createRadialGradient(a,y,x,b,E,z)},Be.drawImage=function(a,y,x,b,E,z,ne,re,oe){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,z,ne,re,oe)},Be.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Be.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},Be.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},Be.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Be.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},Be.lineTo=function(a,y){this.Z.lineTo(a,y)},Be.measureText=function(a){return this.Z.measureText(a)},Be.moveTo=function(a,y){this.Z.moveTo(a,y)},Be.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},Be.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},Be.restore=function(){this.Z.restore()},Be.save=function(){this.yc(),this.Z.save()},gd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Be=gd.prototype,Be.setTransform=function(a,y,x,b,E,z){this.El.setTransform(a,y,x,b,E,z)},Be.scale=function(a,y){this.El.scale(a,y)},Be.translate=function(a,y){this.El.translate(a,y)},Be.stroke=function(){this.Z.stroke()},Be.transform=function(a,y,x,b,E,z){if(a!==1||y!==0||x!==0||b!==1||E!==0||z!==0){var ne=this.El,re=ne.m11*a+ne.m21*y;a=ne.m12*a+ne.m22*y,y=ne.m11*x+ne.m21*b,x=ne.m12*x+ne.m22*b,ne.dx=ne.m11*E+ne.m21*z+ne.dx,ne.dy=ne.m12*E+ne.m22*z+ne.dy,ne.m11=re,ne.m12=a,ne.m21=y,ne.m22=x}},Be.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Be.ng=function(a,y){if(a instanceof fa&&a.type===Ac){var x=a.yk;a=a.ft,a>x?(this.scale(x/a,1),this.translate((a-x)/2,0)):x>a&&(this.scale(1,a/x),this.translate(0,(x-a)/2)),this.Hm?this.clip():this.fill(y),a>x?(this.translate(-(a-x)/2,0),this.scale(1/(x/a),1)):x>a&&(this.translate(0,-(x-a)/2),this.scale(1,1/(a/x)))}else this.Hm?this.clip():this.fill(y)},Be.jk=function(){this.Hm||this.stroke()},Be.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Be.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Be.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vf),a.lineDashOffset=0)},Be.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Be.Hs=function(){},yt.Object.defineProperties(gd.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 vf=Object.freeze([]);gd.className="CanvasSurfaceContext";function pd(){this.F=this.o=this.u=this.j=0}pd.className="ColorNumbers";function fa(a,y){sp||(ap(),sp=!0),Io(this),this._isFrozen=!1,a===void 0?(this.na=Gh,this.xk="black"):typeof a=="string"?(this.na=Gh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Mh?(this.Qd=su,this.Lk=zs):this.Lk=a===Ac?this.Qd=Oo:this.Qd=Ss,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}fa.prototype.copy=function(){var a=new fa;return a.na=this.na,a.xk=this.xk,a.Qd=this.Qd.J(),a.Lk=this.Lk.J(),a.Gr=this.Gr,a.Xp=this.Xp,this.we!==null&&(a.we=this.we.copy()),a.cr=this.cr,a},Be=fa.prototype,Be.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Be.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Be.qb=function(a){a.classType===fa&&(this.type=a)},Be.toString=function(){var a="Brush(";if(this.type===Gh)a+=this.color;else if(a=this.type===Mh?a+"Linear ":this.type===Ac?a+"Radial ":this.type===lp?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,this.colorStops!==null)for(var y=this.colorStops.iterator;y.next();)a+=" "+y.key+":"+y.value;return a+")"},Be.addColorStop=function(a,y){return this._isFrozen&&In(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Vn(a,"0 <= loc <= 1",fa,"addColorStop:loc"),this.we===null&&(this.we=new Ti),this.we.add(a,y),this.na===Gh&&(this.type=Mh),this.xe=null,this},Be.Vz=function(a,y){if(this._isFrozen&&In(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?up:y,this.type===Gh)bc(this.color),this.color=Eh(a,y);else if((this.type===Mh||this.type===Ac)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)bc(x.value),this.addColorStop(x.key,Eh(a,y));return this};function Wh(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?up:x,bc(a),Eh(y,x)}Be.Wy=function(a,y){if(this._isFrozen&&In(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?up:y,this.type===Gh)bc(this.color),this.color=Eh(-a,y);else if((this.type===Mh||this.type===Ac)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)bc(x.value),this.addColorStop(x.key,Eh(-a,y));return this};function Ng(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?up:x,bc(a),Eh(-y,x)}function md(a,y,x){bc(a),a=Ga.j;var b=Ga.u,E=Ga.o,z=Ga.F;return bc(y),x===void 0&&(x=.5),"rgba("+Math.round((Ga.j-a)*x+a)+", "+Math.round((Ga.u-b)*x+b)+", "+Math.round((Ga.o-E)*x+E)+", "+Math.round((Ga.F-z)*x+z)+")"}Be.Gx=function(){if(this.type===Gh)return Jd(this.color);if((this.type===Mh||this.type===Ac)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Ac)return Jd(a.first().value);if(a.get(.5)!==null)return Jd(a.get(.5));if(a.count===2)return a=a.Fa(),Jd(md(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,z=1;y.next();){var ne=y.key,re=Math.abs(.5-y.key);E>z&&re<E?(x=ne,E=re):z>=E&&re<z&&(b=ne,z=re)}return x>b&&(z=x,x=b,b=z,z=E),E=b-x,Jd(md(a.get(x),a.get(b),1-z/E))}return!1};function Jd(a){return a?a instanceof fa?a.Gx():(bc(a),128>(299*Ga.j+587*Ga.u+114*Ga.o)/1e3):!1}function Eh(a,y){switch(y){case up:y=100*Xf(Ga.j);var x=100*Xf(Ga.u),b=100*Xf(Ga.o);return Gl.j=.4124564*y+.3575761*x+.1804375*b,Gl.u=.2126729*y+.7151522*x+.072175*b,Gl.o=.0193339*y+.119192*x+.9503041*b,Gl.F=Ga.F,y=Wp(Gl.j/Sf[0]),x=Wp(Gl.u/Sf[1]),b=Wp(Gl.o/Sf[2]),jc.j=116*x-16,jc.u=500*(y-x),jc.o=200*(x-b),jc.F=Gl.F,jc.j=Math.min(100,Math.max(0,jc.j+100*a)),a=(jc.j+16)/116,y=a-jc.o/200,Gl.j=Sf[0]*Bg(jc.u/500+a),Gl.u=Sf[1]*(jc.j>xf*Ag?Math.pow(a,3):jc.j/xf),Gl.o=Sf[2]*Bg(y),Gl.F=jc.F,a=-.969266*Gl.j+1.8760108*Gl.u+.041556*Gl.o,y=.0556434*Gl.j+-.2040259*Gl.u+1.0572252*Gl.o,Ga.j=255*op((3.2404542*Gl.j+-1.5371385*Gl.u+-.4985314*Gl.o)/100),Ga.u=255*op(a/100),Ga.o=255*op(y/100),Ga.F=Gl.F,Ga.j=Math.round(Ga.j),255<Ga.j?Ga.j=255:0>Ga.j&&(Ga.j=0),Ga.u=Math.round(Ga.u),255<Ga.u?Ga.u=255:0>Ga.u&&(Ga.u=0),Ga.o=Math.round(Ga.o),255<Ga.o?Ga.o=255:0>Ga.o&&(Ga.o=0),"rgba("+Ga.j+", "+Ga.u+", "+Ga.o+", "+Ga.F+")";case i1:return Yf(),nc.o=Math.min(100,Math.max(0,nc.o+100*a)),"hsla("+nc.j+", "+nc.u+"%, "+nc.o+"%, "+nc.F+")";default:Rt("Unknown color space: "+y)}}function bc(a){sp||(ap(),sp=!0);var y=Dg;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,Ga.j=a[0],Ga.u=a[1],Ga.o=a[2],Ga.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Ga.j=0,Ga.u=0,Ga.o=0,Ga.F=1)}}function Yf(){var a=Ga.j/255,y=Ga.u/255,x=Ga.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),z=b-E;if(E=(b+E)/2,z===0)var ne=a=0;else{switch(b){case a:ne=(y-x)/z%6;break;case y:ne=(x-a)/z+2;break;case x:ne=(a-y)/z+4}ne*=60,0>ne&&(ne+=360),a=z/(1-Math.abs(2*E-1))}nc.j=Math.round(ne),nc.u=Math.round(100*a),nc.o=Math.round(100*E),nc.F=Ga.F}function Xf(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function op(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function Wp(a){return a>Ag?Math.pow(a,1/3):(xf*a+16)/116}function Bg(a){var y=a*a*a;return y>Ag?y:(116*a-16)/xf}function yf(a,y){typeof a!="string"&&(a instanceof fa||Rt("Value for "+y+" must be a color string or a Brush, not "+a))}function ap(){Dg=Ns?new Jl(null,void 0,{willReadFrequently:!0}).context:null}yt.Object.defineProperties(fa.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&In(this,a),this.na=a,this.start.Mc()&&(a===Mh?this.start=su:a===Ac&&(this.start=Oo)),this.end.Mc()&&(a===Mh?this.end=zs:a===Ac&&(this.end=Oo)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&In(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&In(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&In(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&In(this,a),0>a&&Vn(a,">= zero",fa,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&In(this,a),0>a&&Vn(a,">= zero",fa,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&In(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&In(this,a),this.cr=a,this.xe=null}}}),fa.prototype.isDark=fa.prototype.Gx,fa.prototype.darkenBy=fa.prototype.Wy,fa.prototype.lightenBy=fa.prototype.Vz,fa.prototype.addColorStop=fa.prototype.addColorStop;var Ag=216/24389,xf=24389/27,Sf=[95.047,100,108.883],Dg=null,Ga=new pd,nc=new pd,Gl=new pd,jc=new pd,sp=!1;fa.className="Brush";var Gh;fa.Solid=Gh=new qt(fa,"Solid",0);var Mh;fa.Linear=Mh=new qt(fa,"Linear",1);var Ac;fa.Radial=Ac=new qt(fa,"Radial",2);var lp;fa.Pattern=lp=new qt(fa,"Pattern",4);var up;fa.Lab=up=new qt(fa,"Lab",5);var i1;fa.HSL=i1=new qt(fa,"HSL",6),fa.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},fa.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;sp||(ap(),sp=!0);var y=Dg;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)},fa.lighten=function(a){return Wh(a)},fa.lightenBy=Wh,fa.darken=function(a){return Ng(a)},fa.darkenBy=Ng,fa.mix=md,fa.isDark=Jd;function ml(){this.xa="Base"}ml.prototype.measure=function(){},ml.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},ml.prototype.arrange=function(){},ml.prototype.Ly=function(a,y,x,b,E,z){a.arrange(y,x,b,E,z)},ml.prototype.iA=function(a){a.Uj()},ml.prototype.gc=function(){},yt.Object.defineProperties(ml.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return ui}}}),ml.prototype.remeasureObject=ml.prototype.iA,ml.prototype.arrangeElement=ml.prototype.Ly,ml.prototype.measureElement=ml.prototype.Yz,ml.className="PanelLayout";function _m(){this.xa="Base"}Zt(_m,ml),_m.prototype.measure=function(a,y,x,b,E,z,ne){var re=b.length;a=Lh(a);for(var oe=0;oe<re;oe++){var le=b[oe];if(le.visible||le===a){var ce=le.margin,pe=ce.right+ce.left;ce=ce.top+ce.bottom,le.measure(y,x,z,ne);var we=le.measuredBounds;pe=Math.max(we.width+pe,0),ce=Math.max(we.height+ce,0),we=le.position.x;var Ee=le.position.y;isFinite(we)||(we=0),isFinite(Ee)||(Ee=0),le instanceof bo&&le.isGeometryPositioned&&(le=le.strokeWidth/2,we-=le,Ee-=le),us(E,we,Ee,pe,ce)}}},_m.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 z=y[E],ne=z.measuredBounds,re=z.margin,oe=z.position.x,le=z.position.y;if(oe=isNaN(oe)?-a:oe-a,le=isNaN(le)?-x:le-x,z instanceof bo&&z.isGeometryPositioned){var ce=z.strokeWidth/2;oe-=ce,le-=ce}z.visible&&z.arrange(oe+re.left,le+re.top,ne.width,ne.height)}};function jm(){this.xa="Base"}Zt(jm,ml),jm.prototype.measure=function(a,y,x,b,E,z,ne){var re=b.length;y=Si(),z=Lh(a);for(var oe=0;oe<re;oe++){var le=b[oe];if(le.visible||le===z){var ce=yu(le,!1);if(ce!==ei&&ce!==hr)y.push(le);else{le.measure(1/0,x,0,ne),ce=le.margin,le=le.measuredBounds;var pe=Math.max(le.height+ce.top+ce.bottom,0);E.width+=Math.max(le.width+ce.right+ce.left,0),E.height=Math.max(E.height,pe)}}}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++)oe=y[a],(oe.visible||oe===z)&&(ce=oe.margin,re=ce.right+ce.left,ce=ce.top+ce.bottom,oe.measure(1/0,x,0,ne),oe=oe.measuredBounds,ce=Math.max(oe.height+ce,0),E.width+=Math.max(oe.width+re,0),E.height=Math.max(E.height,ce));Ni(y)},jm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,z=E.top,ne=a.isOpposite,re=ne?x.width:E.left,oe=0;oe<b;oe++){var le=z,ce=y[oe];if(ce.visible){var pe=ce.measuredBounds,we=ce.margin,Ee=we.top+we.bottom,Ae=z+E.bottom,_e=pe.height,ct=yu(ce,!1);(isNaN(ce.desiredSize.height)&&ct===oi||ct===Br)&&(_e=Math.max(x.height-Ee-Ae,0)),Ee=_e+Ee+Ae,Ae=ce.alignment,Ae.Xb()&&(Ae=a.defaultAlignment),Ae.sb()||(Ae=Oo),ne&&(re-=pe.width+we.left+we.right),ce.arrange(re+Ae.offsetX+we.left,le+Ae.offsetY+we.top+(x.height*Ae.y-Ee*Ae.y),pe.width,_e),ne||(re+=pe.width+we.left+we.right)}}};function zm(){this.xa="Base"}Zt(zm,ml),zm.prototype.measure=function(a,y,x,b,E,z){var ne=b.length;x=Si();for(var re=Lh(a),oe=0;oe<ne;oe++){var le=b[oe];if(le.visible||le===re){var ce=yu(le,!1);if(ce!==ei&&ce!==Br)x.push(le);else{var pe=le.margin;ce=pe.right+pe.left,pe=pe.top+pe.bottom,le.measure(y,1/0,z,0),le=le.measuredBounds,Es(E,Math.max(E.width,Math.max(le.width+ce,0)),E.height+Math.max(le.height+pe,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++)oe=x[a],(oe.visible||oe===re)&&(le=oe.margin,ne=le.right+le.left,le=le.top+le.bottom,oe.measure(y,1/0,z,0),oe=oe.measuredBounds,le=Math.max(oe.height+le,0),E.width=Math.max(E.width,Math.max(oe.width+ne,0)),E.height+=le);Ni(x)}},zm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,z=E.left,ne=a.isOpposite,re=ne?x.height:E.top,oe=0;oe<b;oe++){var le=z,ce=y[oe];if(ce.visible){var pe=ce.measuredBounds,we=ce.margin,Ee=we.left+we.right,Ae=z+E.right,_e=pe.width,ct=yu(ce,!1);(isNaN(ce.desiredSize.width)&&ct===oi||ct===hr)&&(_e=Math.max(x.width-Ee-Ae,0)),Ee=_e+Ee+Ae,Ae=ce.alignment,Ae.Xb()&&(Ae=a.defaultAlignment),Ae.sb()||(Ae=Oo),ne&&(re-=pe.height+we.bottom+we.top),ce.arrange(le+Ae.offsetX+we.left+(x.width*Ae.x-Ee*Ae.x),re+Ae.offsetY+we.top,_e,pe.height),ne||(re+=pe.height+we.bottom+we.top)}}};function Hm(){this.xa="Base"}Zt(Hm,ml),Hm.prototype.measure=function(a,y,x,b,E,z,ne){var re=b.length,oe=a.Pb(),le=oe.margin,ce=le.right+le.left,pe=le.top+le.bottom;oe.measure(y,x,z,ne);var we=oe.measuredBounds;z=we.width,ne=we.height;var Ee=Math.max(z+ce,0),Ae=Math.max(ne+pe,0),_e=a.isClipping,ct=Bn.allocAt(-le.left,-le.top,Ee,Ae),Qe=Bn.allocAt(0,0,z,ne);Cv(oe,Qe,!0),z=Qe.width,ne=Qe.height;for(var Pt=!0,Et=Lh(a),Dt=0;Dt<re;Dt++){var Vt=b[Dt];we=y;var mn=x;if(Vt!==oe&&(Vt.visible||Vt===Et)){le=Vt.margin;var Ei=le.left,Qi=le.top;switch(Ee=le.right+le.left,Ae=le.top+le.bottom,le=yu(Vt,!1),le){case oi:we=z,mn=ne,Qi=Ei=Ae=Ee=0;break;case hr:we=z,Ei=Ee=0;break;case Br:mn=ne,Qi=Ae=0}Vt.measure(we,mn,0,0),we=Vt.measuredBounds,Ee=Math.max(we.width+Ee,0),Ae=Math.max(we.height+Ae,0),le=Vt.alignment,le.Xb()&&(le=a.defaultAlignment),le.sb()||(le=Oo);var Gi=Vt.alignmentFocus;if(Gi.Xb()&&(Gi=Oo),mn=null,Vt instanceof ui&&Vt.$e!==""&&(mn=Vt.fb(Vt.$e),mn===Vt&&(mn=null)),Ei=Qe.x-Ei,Qi=Qe.y-Qi,mn!==null){for(Vt.arrange(0,0,we.width,we.height),we=mn.actualBounds,we=tt.allocAt(we.x+(Gi.x*we.width-Gi.offsetX),we.y+(Gi.y*we.height-Gi.offsetY)),mn=mn.panel;mn!==Vt;)mn.transform.Ga(we),mn=mn.panel;Ei+=le.x*z+le.offsetX-we.x,Qi+=le.y*ne+le.offsetY-we.y,tt.free(we)}else Ei+=le.x*z+le.offsetX-(Gi.x*we.width+Gi.offsetX),Qi+=le.y*ne+le.offsetY-(Gi.y*we.height+Gi.offsetY);Pt?(Pt=!1,E.h(Ei,Qi,Ee,Ae)):us(E,Ei,Qi,Ee,Ae)}}switch(Pt?E.assign(ct):_e?E.Uu(Qe.x,Qe.y,Qe.width,Qe.height):us(E,ct.x,ct.y,ct.width,ct.height),Bn.free(ct),Bn.free(Qe),le=oe.stretch,le===uo&&(le=yu(oe,!1)),le){case ei:return;case oi:if(!isFinite(y)&&!isFinite(x))return;break;case hr:if(!isFinite(y))return;break;case Br:if(!isFinite(x))return}for(we=oe.measuredBounds,z=we.width,ne=we.height,Ee=Math.max(z+ce,0),Ae=Math.max(ne+pe,0),le=oe.margin,Qe=Bn.allocAt(-le.left,-le.top,Ee,Ae),Cv(oe,Qe,!0),z=Qe.width,ne=Qe.height,y=0;y<re;y++)x=b[y],x===oe||!x.visible&&x!==Et||(le=x.margin,Ee=le.right+le.left,Ae=le.top+le.bottom,we=x.measuredBounds,Ee=Math.max(we.width+Ee,0),Ae=Math.max(we.height+Ae,0),ce=x.alignment,ce.Xb()&&(ce=a.defaultAlignment),ce.sb()||(ce=Oo),x=x.alignmentFocus,x.Xb()&&(x=Oo),Pt?(Pt=!1,E.h(ce.x*z+ce.offsetX-(x.x*we.width+x.offsetX)-le.left,ce.y*ne+ce.offsetY-(x.y*we.height+x.offsetY)-le.top,Ee,Ae)):us(E,ce.x*z+ce.offsetX-(x.x*we.width+x.offsetX)-le.left,ce.y*ne+ce.offsetY-(x.y*we.height+x.offsetY)-le.top,Ee,Ae));Pt?E.assign(ct):_e?E.Uu(Qe.x,Qe.y,Qe.width,Qe.height):us(E,ct.x,ct.y,ct.width,ct.height),Bn.free(Qe)},Hm.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),z=E.measuredBounds,ne=z.width,re=z.height,oe=a.padding;z=oe.left,oe=oe.top;var le=z-x.x,ce=oe-x.y;for(E.arrange(le,ce,ne,re),ne=Bn.allocAt(0,0,ne,re),Cv(E,ne,!1),re=0;re<b;re++){var pe=y[re];if(pe!==E){le=pe.measuredBounds;var we=le.width,Ee=le.height;ce=pe.alignment,ce.Xb()&&(ce=a.defaultAlignment),ce.sb()||(ce=Oo);var Ae=pe.alignmentFocus;if(Ae.Xb()&&(Ae=Oo),le=null,pe instanceof ui&&pe.$e!==""&&(le=pe.fb(pe.$e),le===pe&&(le=null)),le!==null){var _e=le.actualBounds;for(Ae=tt.allocAt(_e.x+(Ae.x*_e.width-Ae.offsetX),_e.y+(Ae.y*_e.height-Ae.offsetY)),le=le.panel;le!==pe;)le.transform.Ga(Ae),le=le.panel;le=ce.x*ne.width+ce.offsetX-Ae.x,ce=ce.y*ne.height+ce.offsetY-Ae.y,tt.free(Ae)}else le=ce.x*ne.width+ce.offsetX-(Ae.x*we+Ae.offsetX),ce=ce.y*ne.height+ce.offsetY-(Ae.y*Ee+Ae.offsetY);le+=ne.x-x.x,ce+=ne.y-x.y,pe.visible&&pe.arrange(z+le,oe+ce,we,Ee)}}Bn.free(ne)};function Cv(a,y,x){var b=null;if(a instanceof ui&&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 Zm(){this.xa="Base"}Zt(Zm,ml),Zm.prototype.measure=function(a,y,x,b,E,z,ne){var re=b.length,oe=a.Pb(),le=oe.margin,ce=y,pe=x,we=le.right+le.left,Ee=le.top+le.bottom;oe.measure(y,x,z,ne),le=oe.measuredBounds;var Ae=0,_e=null;oe instanceof bo&&(_e=oe,Ae=_e.strokeWidth*_e.scale);var ct=Math.max(le.width+we,0);le=Math.max(le.height+Ee,0);var Qe=Lv(oe),Pt=Qe.x*ct+Qe.offsetX;Qe=Qe.y*le+Qe.offsetY;var Et=Fv(oe),Dt=Et.x*ct+Et.offsetX;for(Et=Et.y*le+Et.offsetY,isFinite(y)&&(ce=Math.max(Math.abs(Pt-Dt)-Ae,0)),isFinite(x)&&(pe=Math.max(Math.abs(Qe-Et)-Ae,0)),Ae=ci.alloc(),Ae.h(0,0),a=Lh(a),Et=0;Et<re;Et++)Qe=b[Et],Qe===oe||!Qe.visible&&Qe!==a||(le=Qe.margin,ct=le.right+le.left,Pt=le.top+le.bottom,Qe.measure(ce,pe,0,0),le=Qe.measuredBounds,ct=Math.max(le.width+ct,0),le=Math.max(le.height+Pt,0),Ae.h(Math.max(ct,Ae.width),Math.max(le,Ae.height)));if(re===1)E.width=ct,E.height=le,ci.free(Ae);else{switch(Qe=Lv(oe),Et=Fv(oe),re=b=0,Et.x!==Qe.x&&Et.y!==Qe.y&&(b=Ae.width/Math.abs(Et.x-Qe.x),re=Ae.height/Math.abs(Et.y-Qe.y)),ci.free(Ae),Ae=0,_e!==null&&(Ae=_e.strokeWidth*_e.scale,Ov(_e)===rr&&(b=re=Math.max(b,re))),b+=Math.abs(Qe.offsetX)+Math.abs(Et.offsetX)+Ae,re+=Math.abs(Qe.offsetY)+Math.abs(Et.offsetY)+Ae,_e=oe.stretch,_e===uo&&(_e=yu(oe,!1)),_e){case ei:ne=z=0;break;case oi:isFinite(y)&&(b=y),isFinite(x)&&(re=x);break;case hr:isFinite(y)&&(b=y),ne=0;break;case Br:z=0,isFinite(x)&&(re=x)}oe.Uj(),oe.measure(b,re,z,ne),E.width=oe.measuredBounds.width+we,E.height=oe.measuredBounds.height+Ee}},Zm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,z=Bn.alloc();z.h(0,0,1,1);var ne=b.margin,re=ne.left;ne=ne.top;var oe=a.padding,le=oe.left;oe=oe.top,b.arrange(le+re,oe+ne,E.width,E.height);var ce=Lv(b),pe=Fv(b),we=ce.y*E.height+ce.offsetY,Ee=pe.x*E.width+pe.offsetX;for(pe=pe.y*E.height+pe.offsetY,z.x=ce.x*E.width+ce.offsetX,z.y=we,us(z,Ee,pe,0,0),z.x+=re+le,z.y+=ne+oe,E=0;E<x;E++)re=y[E],re!==b&&(le=re.measuredBounds,ne=re.margin,oe=Math.max(le.width+ne.right+ne.left,0),ce=Math.max(le.height+ne.top+ne.bottom,0),we=re.alignment,we.Xb()&&(we=a.defaultAlignment),we.sb()||(we=Oo),oe=z.width*we.x+we.offsetX-oe*we.x+ne.left+z.x,ne=z.height*we.y+we.offsetY-ce*we.y+ne.top+z.y,re.visible&&(Sa(z.x,z.y,z.width,z.height,oe,ne,le.width,le.height)?re.arrange(oe,ne,le.width,le.height):re.arrange(oe,ne,le.width,le.height,new Bn(z.x,z.y,z.width,z.height))));Bn.free(z)};function Wm(){this.xa="Base",this.name="Table"}Zt(Wm,ml),Wm.prototype.measure=function(a,y,x,b,E){for(var z=b.length,ne=Si(),re=Si(),oe=0;oe<z;oe++){var le=b[oe],ce=le instanceof ui?le:null;if(ce!==null&&$h(ce)&&le.visible){re.push(ce);for(var pe=ce.O.s,we=pe.length,Ee=0;Ee<we;Ee++){var Ae=pe[Ee];ce.type===ui.TableRow?Ae.row=le.row:ce.type===ui.TableColumn&&(Ae.column=le.column),ne.push(Ae)}}else ne.push(le)}z=ne.length,z===0&&(a.Fb(0),a.Eb(0));for(var _e=[],ct=0;ct<z;ct++){var Qe=ne[ct];Qe.visible&&(gt(Qe,!0),jt(Qe,!0),_e[Qe.row]||(_e[Qe.row]=[]),_e[Qe.row][Qe.column]||(_e[Qe.row][Qe.column]=[]),_e[Qe.row][Qe.column].push(Qe))}Ni(ne);var Pt=Si(),Et=Si(),Dt=Si(),Vt={count:0},mn={count:0},Ei=y,Qi=x,Gi=a.rowDefs,di=a.colDefs,Xn=null;z=Gi.length;for(var co=0;co<z;co++)Xn=Gi[co],Xn!==void 0&&(Xn.actual=0);z=di.length;for(var Ur=0;Ur<z;Ur++)Xn=di[Ur],Xn!==void 0&&(Xn.actual=0);for(var wa=_e.length,Ka=0,Al=0;Al<wa;Al++)_e[Al]&&(Ka=Math.max(Ka,_e[Al].length));var jl=Math.min(a.topIndex,wa-1),Su=Math.min(a.leftIndex,Ka-1),Dl=0;wa=_e.length;for(var tf=Lh(a),al=0;al<wa;al++)if(_e[al]){Ka=_e[al].length;var Pd=a.Fb(al);Pd.actual=0;for(var Pu=Pd.oc=0;Pu<Ka;Pu++)if(_e[al][Pu]){var nf=a.Eb(Pu);Pt[Pu]===void 0&&(nf.actual=0,nf.oc=0,Pt[Pu]=!0);for(var Lc=_e[al][Pu],Wc=Lc.length,mc=0;mc<Wc;mc++){var rc=Lc[mc];if(rc.visible||rc===tf){var Of=1<rc.rowSpan||1<rc.columnSpan;Of&&(al<jl||Pu<Su||Et.push(rc));var wd=rc.margin,Dp=wd.right+wd.left,vc=wd.top+wd.bottom,wu=_c(rc,Pd,nf,!1),Bm=rc.desiredSize,Gg=!isNaN(Bm.height),Id=!isNaN(Bm.width)&⋙if(Of||wu===ei||Id||al<jl||Pu<Su||(Vt[Pu]!==void 0||wu!==oi&&wu!==hr||(Vt[Pu]=-1,Vt.count++),mn[al]!==void 0||wu!==oi&&wu!==Br||(mn[al]=-1,mn.count++),Dt.push(rc)),rc.measure(1/0,1/0,0,0),!(al<jl||Pu<Su)){var oc=rc.measuredBounds,og=Math.max(oc.width+Dp,0),yc=Math.max(oc.height+vc,0);if(rc.rowSpan===1&&(wu===ei||wu===hr)){Xn=a.Fb(al);var kf=Xn.Wc();Dl=Math.max(yc-Xn.actual,0),Dl+kf>Qi&&(Dl=Math.max(Qi-kf,0));var hv=Xn.oa===0;Xn.oc=Xn.oc+Dl,Xn.actual=Xn.oa+Dl,Qi=Math.max(Qi-(Dl+(hv?kf:0)),0)}if(rc.columnSpan===1&&(wu===ei||wu===Br)){Xn=a.Eb(Pu);var Am=Xn.Wc();Dl=Math.max(og-Xn.actual,0),Dl+Am>Ei&&(Dl=Math.max(Ei-Am,0));var Xy=Xn.oa===0;Xn.oc=Xn.oc+Dl,Xn.actual=Xn.oa+Dl,Ei=Math.max(Ei-(Dl+(Xy?Am:0)),0)}Of&&rc.Uj()}}}}}Ni(Pt);var ah=0,Bh=0;z=a.columnCount;for(var $g=0;$g<z;$g++){var Tf=di[$g];Tf!==void 0&&(ah+=isNaN(Tf.Hc)?Tf.oc:Tf.Hc,Tf.oc!==0&&(ah+=Tf.Wc()))}z=a.rowCount;for(var Ip=0;Ip<z;Ip++){var Rf=Gi[Ip];Rf!==void 0&&(Bh+=isNaN(Rf.Hc)?Rf.oc:Rf.Hc,Rf.oc!==0&&(Bh+=Rf.Wc()))}Ei=Math.max(y-ah,0);var sh=Qi=Math.max(x-Bh,0),rf=Ei;z=Dt.length;for(var ac=0;ac<z;ac++){var Od=Dt[ac],fv=a.Fb(Od.row),Ah=a.Eb(Od.column),Op=Od.measuredBounds,Cd=Od.margin,ag=Cd.right+Cd.left,kd=Cd.top+Cd.bottom;Vt[Od.column]=Ah.oc===0&&Vt[Od.column]!==void 0?Math.max(Op.width+ag,Vt[Od.column]):null,mn[Od.row]=fv.oc===0&&mn[Od.row]!==void 0?Math.max(Op.height+kd,mn[Od.row]):null}var Kg=0,kp=0,ad;for(ad in mn)ad!=="count"&&(Kg+=mn[ad]);for(ad in Vt)ad!=="count"&&(kp+=Vt[ad]);for(var Kl=ci.alloc(),Dm=0;Dm<z;Dm++){var Ou=Dt[Dm];if(Ou.visible||Ou===tf){var sl=a.Fb(Ou.row),ku=a.Eb(Ou.column),Dh=0;isFinite(ku.width)?Dh=ku.width:(isFinite(Ei)&&Vt[Ou.column]!==null?kp===0?Dh=ku.actual+Ei:Dh=Vt[Ou.column]/kp*rf:Vt[Ou.column]!==null?Dh=Ei:Dh=ku.actual||Ei,Dh=Math.max(0,Dh-ku.Wc()));var of=0;switch(isFinite(sl.height)?of=sl.height:(isFinite(Qi)&&mn[Ou.row]!==null?Kg===0?of=sl.actual+Qi:of=mn[Ou.row]/Kg*sh:mn[Ou.row]!==null?of=Qi:of=sl.actual||Qi,of=Math.max(0,of-sl.Wc())),Kl.h(Math.max(ku.minimum,Math.min(Dh,ku.maximum)),Math.max(sl.minimum,Math.min(of,sl.maximum))),wu=_c(Ou,sl,ku,!1),wu){case hr:Kl.height=Math.max(Kl.height,sl.actual+Qi);break;case Br:Kl.width=Math.max(Kl.width,ku.actual+Ei)}var sg=Ou.margin,Jy=sg.right+sg.left,gv=sg.top+sg.bottom;Ou.Uj(),Ou.measure(Kl.width,Kl.height,ku.minimum,sl.minimum);var Tp=Ou.measuredBounds,lg=Math.max(Tp.width+Jy,0),Vg=Math.max(Tp.height+gv,0);isFinite(Ei)&&(lg=Math.min(lg,Kl.width)),isFinite(Qi)&&(Vg=Math.min(Vg,Kl.height));var sc=0;sc=sl.actual,sl.actual=Math.max(sl.actual,Vg),sl.oc=Math.max(sl.oc,Vg),Dl=sl.actual-sc,Qi=Math.max(Qi-Dl,0),mn[Ou.row]===null&&(sh=Math.max(sh-Dl,0)),sc=ku.actual,ku.actual=Math.max(ku.actual,lg),ku.oc=Math.max(ku.oc,lg),Dl=ku.actual-sc,Ei=Math.max(Ei-Dl,0),Vt[Ou.column]===null&&(rf=Math.max(rf-Dl,0))}}Ni(Dt);var Ih=ci.alloc(),bd=Si(),Tc=Si();if(z=Et.length,z!==0){for(var _f=0;_f<wa;_f++)if(_e[_f]){Ka=_e[_f].length;var Rp=a.Fb(_f);bd[_f]=Rp.actual;for(var jf=0;jf<Ka;jf++)if(_e[_f][jf]){var pv=a.Eb(jf);Tc[jf]=pv.actual}}}for(var _p=0;_p<z;_p++){var Us=Et[_p];if(Us.visible||Us===tf){var sd=a.Fb(Us.row),Gc=a.Eb(Us.column);switch(Kl.h(Math.max(Gc.minimum,Math.min(y,Gc.maximum)),Math.max(sd.minimum,Math.min(x,sd.maximum))),wu=_c(Us,sd,Gc,!1),wu){case oi:Tc[Gc.index]!==0&&(Kl.width=Math.min(Kl.width,Tc[Gc.index])),bd[sd.index]!==0&&(Kl.height=Math.min(Kl.height,bd[sd.index]));break;case hr:Tc[Gc.index]!==0&&(Kl.width=Math.min(Kl.width,Tc[Gc.index]));break;case Br:bd[sd.index]!==0&&(Kl.height=Math.min(Kl.height,bd[sd.index]))}isFinite(Gc.width)&&(Kl.width=Gc.width),isFinite(sd.height)&&(Kl.height=sd.height),Ih.h(0,0);for(var mv=Gc.minimum,xc=sd.minimum,af=1;af<Us.rowSpan&&!(Us.row+af>=a.rowCount);af++)Xn=a.Fb(Us.row+af),Dl=0,Dl=wu===oi||wu===Br?Math.max(Xn.minimum,bd[Us.row+af]===0?Xn.maximum:Math.min(bd[Us.row+af],Xn.maximum)):Math.max(Xn.minimum,isNaN(Xn.Hc)?Xn.maximum:Math.min(Xn.Hc,Xn.maximum)),Ih.height+=Dl,xc+=Xn.minimum;for(var $c=1;$c<Us.columnSpan&&!(Us.column+$c>=a.columnCount);$c++)Xn=a.Eb(Us.column+$c),Dl=0,Dl=wu===oi||wu===hr?Math.max(Xn.minimum,Tc[Us.column+$c]===0?Xn.maximum:Math.min(Tc[Us.column+$c],Xn.maximum)):Math.max(Xn.minimum,isNaN(Xn.Hc)?Xn.maximum:Math.min(Xn.Hc,Xn.maximum)),Ih.width+=Dl,mv+=Xn.minimum;Kl.width+=Ih.width,Kl.height+=Ih.height;var jp=Us.margin,zf=jp.right+jp.left,Im=jp.top+jp.bottom;Us.measure(Kl.width,Kl.height,mv,xc);for(var zp=Us.measuredBounds,Td=Math.max(zp.width+zf,0),ug=Math.max(zp.height+Im,0),Hf=0,Hp=0;Hp<Us.rowSpan&&!(Us.row+Hp>=a.rowCount);Hp++)Xn=a.Fb(Us.row+Hp),Hf+=Xn.total||0;if(Hf<ug){var sf=ug-Hf,lh=ug-Hf;if(Us.spanAllocation!==null)for(var lf=Us.spanAllocation,Oh=0;Oh<Us.rowSpan&&!(0>=sf)&&!(Us.row+Oh>=a.rowCount);Oh++){Xn=a.Fb(Us.row+Oh);var uf=Xn.oa||0,cg=lf(Us,Xn,lh);Xn.actual=Math.min(Xn.maximum,uf+cg),Xn.oa!==uf&&(sf-=Xn.oa-uf)}for(;0<sf;){var Ed=Xn.oa||0;if(isNaN(Xn.height)&&Xn.maximum>Ed&&(Xn.actual=Math.min(Xn.maximum,Ed+sf),Xn.oa!==Ed&&(sf-=Xn.oa-Ed)),Xn.index===0)break;Xn=a.Fb(Xn.index-1)}}for(var Ug=0,cf=0;cf<Us.columnSpan&&!(Us.column+cf>=a.columnCount);cf++)Xn=a.Eb(Us.column+cf),Ug+=Xn.total||0;if(Ug<Td){var Yg=Td-Ug,Qy=Td-Ug;if(Us.spanAllocation!==null)for(var kh=Us.spanAllocation,dg=0;dg<Us.columnSpan&&!(0>=Yg)&&!(Us.column+dg>=a.columnCount);dg++){Xn=a.Eb(Us.column+dg);var Om=Xn.oa||0,qy=kh(Us,Xn,Qy);Xn.actual=Math.min(Xn.maximum,Om+qy),Xn.oa!==Om&&(Yg-=Xn.oa-Om)}for(;0<Yg;){var vv=Xn.oa||0;if(isNaN(Xn.width)&&Xn.maximum>vv&&(Xn.actual=Math.min(Xn.maximum,vv+Yg),Xn.oa!==vv&&(Yg-=Xn.oa-vv)),Xn.index===0)break;Xn=a.Eb(Xn.index-1)}}}}Ni(Et),ci.free(Ih),ci.free(Kl),bd!==void 0&&Ni(bd),Tc!==void 0&&Ni(Tc);var Xg=0,Jg=0,yv=a.desiredSize,pS=a.maxSize;wu=yu(a,!0);var km=Bh=ah=0,Tm=0;z=a.columnCount;for(var xv=0;xv<z;xv++)di[xv]!==void 0&&(Xn=a.Eb(xv),isFinite(Xn.width)?(km+=Xn.width,km+=Xn.Wc()):qm(Xn)===Vp?(km+=Xn.oa,km+=Xn.Wc()):Xn.oa!==0&&(ah+=Xn.oa,ah+=Xn.Wc()));isFinite(yv.width)?Xg=Math.min(yv.width,pS.width):Xg=wu!==ei&&isFinite(y)?y:ah,Xg=Math.max(Xg,a.minSize.width),Xg=Math.max(Xg-km,0);for(var JS=ah===0?1:Math.max(Xg/ah,1),Sv=0;Sv<z;Sv++)di[Sv]!==void 0&&(Xn=a.Eb(Sv),isFinite(Xn.width)||qm(Xn)===Vp||(Xn.actual=Xn.oa*JS),Xn.position=E.width,Xn.oa!==0&&(E.width+=Xn.oa,E.width+=Xn.Wc()));z=a.rowCount;for(var Pv=0;Pv<z;Pv++)Gi[Pv]!==void 0&&(Xn=a.Fb(Pv),isFinite(Xn.height)?(Tm+=Xn.height,Tm+=Xn.Wc()):qm(Xn)===Vp?(Tm+=Xn.oa,Tm+=Xn.Wc()):Xn.oa!==0&&(Bh+=Xn.oa,Bh+=Xn.Wc()));isFinite(yv.height)?Jg=Math.min(yv.height,pS.height):Jg=wu!==ei&&isFinite(x)?x:Bh,Jg=Math.max(Jg,a.minSize.height),Jg=Math.max(Jg-Tm,0);for(var QS=Bh===0?1:Math.max(Jg/Bh,1),wv=0;wv<z;wv++)Gi[wv]!==void 0&&(Xn=a.Fb(wv),isFinite(Xn.height)||qm(Xn)===Vp||(Xn.actual=Xn.oa*QS),Xn.position=E.height,Xn.oa!==0&&(E.height+=Xn.oa,E.height+=Xn.Wc()));z=re.length;for(var e1=0;e1<z;e1++){var Rm=re[e1],t1=0,n1=0;Rm.type===ui.TableRow?(t1=E.width,Xn=a.Fb(Rm.row),n1=Xn.actual):(Xn=a.Eb(Rm.column),t1=Xn.actual,n1=E.height),Rm.measuredBounds.h(0,0,t1,n1),gt(Rm,!1)}Ni(re),a.inRowsCols=_e},Wm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,z=E.left;E=E.top;var ne=a.inRowsCols;if(ne!==null){for(var re,oe,le=ne.length,ce=0,pe=0;pe<le;pe++)ne[pe]&&(ce=Math.max(ce,ne[pe].length));oe=a.rowDefs,re=a.colDefs;var we=pe=0,Ee=Math.min(a.topIndex,le-1);if(0<oe.length){for(;Ee!==le&&(oe[Ee]===void 0||oe[Ee].oa===0);)Ee++;Ee=Math.max(Math.min(Ee,le-1),0),pe=-oe[Ee].position}var Ae=Math.min(a.leftIndex,ce-1);if(0<re.length){for(;Ae!==ce&&(re[Ae]===void 0||re[Ae].oa===0);)Ae++;Ae=Math.max(Math.min(Ae,ce-1),0),we=-re[Ae].position}for(var _e=0,ct=0;_e!==le&&oe[_e]===void 0;)_e++;for(;ct!==le&&re[ct]===void 0;)ct++;ce=a.part,a.Fb(_e),a.Eb(ct);for(var Qe=0;Qe<y.length;Qe++){var Pt=y[Qe];if(Pt instanceof ui&&Pt.visible&&$h(Pt)){if(Pt.type===ui.TableRow){re=a.Fb(Pt.row);var Et=a.Eb(ct)}else re=a.Fb(_e),Et=a.Eb(Pt.column);oe=re.position+pe+E,re.oa!==0&&(oe+=re.Io(Math.max(_e,Ee))),re=Et.position+we+z,Et.oa!==0&&(re+=Et.Io(Math.max(ct,Ae))),Et=Pt.measuredBounds,Pt.Uk(),Pt.actualBounds.ka();var Dt=Pt.actualBounds,Vt=Bn.allocAt(Dt.x,Dt.y,Dt.width,Dt.height);Dt.x=Pt.type===ui.TableRow?z:re,Dt.y=Pt.type===ui.TableColumn?E:oe,Dt.width=Et.width,Dt.height=Et.height,Pt.actualBounds.freeze(),jt(Pt,!1),Mo(Vt,Dt)||ce===null||(ce.oh(),Pt.Pn(ce)),Bn.free(Vt)}}for(Qe=ci.alloc(),Pt=0;Pt<le;Pt++)if(ne[Pt]){for(ce=ne[Pt].length,Et=a.Fb(Pt),oe=Et.position+pe+E,Et.oa!==0&&(oe+=Et.Io(Math.max(_e,Ee))),Dt=0;Dt<ce;Dt++)if(ne[Pt][Dt]){Vt=a.Eb(Dt),re=Vt.position+we+z,Vt.oa!==0&&(re+=Vt.Io(Math.max(ct,Ae)));for(var mn=ne[Pt][Dt],Ei=mn.length,Qi=0;Qi<Ei;Qi++){var Gi=mn[Qi],di=Gi.measuredBounds;Qe.h(0,0);for(var Xn=1;Xn<Gi.rowSpan&&!(Pt+Xn>=a.rowCount);Xn++){var co=a.Fb(Pt+Xn);co.oa!==0&&(Qe.height+=co.total)}for(Xn=1;Xn<Gi.columnSpan&&!(Dt+Xn>=a.columnCount);Xn++)co=a.Eb(Dt+Xn),co.oa!==0&&(Qe.width+=co.total);var Ur=Vt.oa+Qe.width,wa=Et.oa+Qe.height;Xn=re,co=oe;var Ka=Ur,Al=wa,jl=re,Su=oe,Dl=Ur,tf=wa;re+Ur>x.width&&(Dl=Math.max(x.width-re,0)),oe+wa>x.height&&(tf=Math.max(x.height-oe,0));var al=Gi.alignment;if(al.Xb()){al=a.defaultAlignment,al.sb()||(al=Oo);var Pd=al.x,Pu=al.y,nf=al.offsetX;al=al.offsetY;var Lc=Vt.alignment,Wc=Et.alignment;Lc.sb()&&(Pd=Lc.x,nf=Lc.offsetX),Wc.sb()&&(Pu=Wc.y,al=Wc.offsetY)}else Pd=al.x,Pu=al.y,nf=al.offsetX,al=al.offsetY;(isNaN(Pd)||isNaN(Pu))&&(Pu=Pd=.5,al=nf=0),Lc=di.width,Wc=di.height;var mc=Gi.margin,rc=mc.left+mc.right,Of=mc.top+mc.bottom,wd=_c(Gi,Et,Vt,!1);!isNaN(Gi.desiredSize.width)||wd!==oi&&wd!==hr||(Lc=Math.max(Ur-rc,0)),!isNaN(Gi.desiredSize.height)||wd!==oi&&wd!==Br||(Wc=Math.max(wa-Of,0)),Ur=Gi.maxSize,wa=Gi.minSize,Lc=Math.min(Ur.width,Lc),Wc=Math.min(Ur.height,Wc),Lc=Math.max(wa.width,Lc),Wc=Math.max(wa.height,Wc),Ur=Wc+Of,Xn+=Ka*Pd-(Lc+rc)*Pd+nf+mc.left,co+=Al*Pu-Ur*Pu+al+mc.top,Gi.visible&&(Sa(jl,Su,Dl,tf,Xn,co,di.width,di.height)?Gi.arrange(Xn,co,Lc,Wc):Gi.arrange(Xn,co,Lc,Wc,new Bn(jl,Su,Dl,tf)))}}}for(ci.free(Qe),a=0;a<b;a++)x=y[a],z=x instanceof ui?x:null,z!==null&&$h(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function Gm(){this.xa="Base"}Zt(Gm,ml),Gm.prototype.measure=function(){},Gm.prototype.arrange=function(){};function $m(){this.xa="Base"}Zt($m,ml),$m.prototype.measure=function(){},$m.prototype.arrange=function(){};function Km(){this.xa="Base"}Zt(Km,ml),Km.prototype.measure=function(a,y,x,b,E,z,ne){1<b.length&&Rt("Viewbox Panel cannot contain more than one GraphObject."),b=b[0],b.Ca=1,b.Uj(),b.measure(1/0,1/0,z,ne);var re=b.measuredBounds,oe=b.margin,le=oe.right+oe.left;if(oe=oe.top+oe.bottom,isFinite(y)||isFinite(x)){var ce=b.scale,pe=re.width;re=re.height;var we=Math.max(y-le,0),Ee=Math.max(x-oe,0),Ae=1;a.viewboxStretch===rr?pe!==0&&re!==0&&(Ae=Math.min(we/pe,Ee/re)):pe!==0&&re!==0&&(Ae=Math.max(we/pe,Ee/re)),Ae===0&&(Ae=1e-4),b.Ca*=Ae,ce!==b.scale&&(gt(b,!0),b.measure(1/0,1/0,z,ne))}re=b.measuredBounds,E.width=isFinite(y)?y:Math.max(re.width+le,0),E.height=isFinite(x)?x:Math.max(re.height+oe,0)},Km.prototype.arrange=function(a,y,x){y=y[0];var b=y.measuredBounds,E=y.margin,z=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=Oo),y.arrange(x.width*ne.x-z*ne.x+ne.offsetX,x.height*ne.y-E*ne.y+ne.offsetY,b.width,b.height)};function Gp(){this.xa="Base"}Zt(Gp,ml),Gp.prototype.measure=function(){},Gp.prototype.arrange=function(){},Gp.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 z=a.naturalBounds,ne=a.actualBounds,re=z.width,oe=z.height,le=Math.ceil(re/E),ce=Math.ceil(oe/b),pe=a.gridOrigin,we=pe.x;pe=pe.y,y.save(),y.beginPath(),y.rect(0,0,re,oe),y.clip(),y.Se();for(var Ee=[],Ae=a.O.s,_e=Ae.length,ct=0;ct<_e;ct++){var Qe=Ae[ct],Pt=[];if(Ee.push(Pt),Qe.visible){var Et=Qe.interval;if(!(0>Et)){Qe=Ev(Qe.figure);for(var Dt=0;Dt<_e;Dt++)if(Dt!==ct){var Vt=Ae[Dt];Vt.visible&&Ev(Vt.figure)===Qe&&(Vt=Vt.interval,Vt>Et&&Pt.push(Vt))}}}}for(Ae=a.O.s,_e=Ae.length,ct=0;ct<_e;ct++){var mn=Ae[ct];if(mn.visible&&(Pt=mn.interval||1,Qe=Math.abs(Pt),!(2>E*Qe*x))){if(Et=mn.segmentIndex,(!isFinite(Et)||isNaN(Et))&&(Et=0),0>Et&&(Et=Qe-Math.min(-Et,Qe)),Et=Math.round(Et%Qe),Qe=mn.opacity,Dt=1,Qe!==1){if(Qe===0)continue;Dt=y.globalAlpha,y.globalAlpha=Dt*Qe}Vt=Ee[ct];var Ei=!1,Qi=mn.strokeDashArray;if(Qi!==null&&(Ei=!0,y.js(Qi,mn.strokeDashOffset)),mn.figure==="LineV"&&mn.stroke!==null&&0<mn.strokeWidth){for(y.lineWidth=mn.strokeWidth,Bs(a,y,mn.stroke,!1,!1,z,ne),y.beginPath(),Qi=mn=Math.floor((we-E)/E);Qi<=mn+le;Qi++){var Gi=Qi*E+we;0<=Gi&&Gi<=re&&Vm(Qi,Pt,Et,Vt)&&(y.moveTo(Gi,0),y.lineTo(Gi,oe))}y.stroke(),y.Se()}else if(mn.figure==="LineH"&&mn.stroke!==null&&0<mn.strokeWidth){for(y.lineWidth=mn.strokeWidth,Bs(a,y,mn.stroke,!1,!1,z,ne),y.beginPath(),Qi=mn=Math.floor((pe-b)/b);Qi<=mn+ce;Qi++)Gi=Qi*b+pe,0<=Gi&&Gi<=oe&&Vm(Qi,Pt,Et,Vt)&&(y.moveTo(0,Gi),y.lineTo(re,Gi));y.stroke(),y.Se()}else if(mn.figure==="BarV"&&mn.fill!==null)for(Bs(a,y,mn.fill,!0,!1,z,ne),mn=mn.width,isNaN(mn)&&(mn=E),Gi=Qi=Math.floor((we-E)/E);Gi<=Qi+le;Gi++){var di=Gi*E+we;0<=di+mn&&di<=re&&Vm(Gi,Pt,Et,Vt)&&y.fillRect(di,0,mn,oe)}else if(mn.figure==="BarH"&&mn.fill!==null)for(Bs(a,y,mn.fill,!0,!1,z,ne),mn=mn.height,isNaN(mn)&&(mn=b),Gi=Qi=Math.floor((pe-b)/b);Gi<=Qi+ce;Gi++)di=Gi*b+pe,0<=di+mn&&di<=oe&&Vm(Gi,Pt,Et,Vt)&&y.fillRect(0,di,re,mn);Ei&&y.fs(),Qe!==1&&(y.globalAlpha=Dt)}}y.restore(),y.Vc(!1)};function Vm(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 Um(){this.xa="Base"}Zt(Um,ml),Um.prototype.measure=function(a,y,x,b,E){var z=b.length;if(a instanceof ga||a instanceof hi){var ne=null,re=null;if(a instanceof hi&&(ne=a),a instanceof ga&&(re=a,ne=re.adornedPart,a.j===null&&(a.j=[])),ne instanceof hi){var oe=ne;if(z===0)Es(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var le=a instanceof ga?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ce=oe.points,pe=ne.pointsCount;re!==null?re.Ul(!1):ne!==null&&ne.Ul(!1),re=y.width;var we=y.height,Ee=a.j;if(Ee.length=0,le!==null){r1(a,re,we,le);var Ae=le.measuredBounds;x.ed(Ae),Ee.push(Ae)}Ae=ur.alloc();for(var _e=tt.alloc(),ct=tt.alloc(),Qe=0;Qe<z;Qe++){var Pt=b[Qe];if(Pt!==le)if(Pt.isPanelMain&&Pt instanceof bo){r1(a,re,we,Pt);var Et=Pt.measuredBounds;x.ed(Et),Ee.push(Et)}else if(2>pe)Pt.measure(1/0,1/0,0,0),Et=Pt.measuredBounds,x.ed(Et),Ee.push(Et);else{var Dt=Pt.segmentIndex,Vt=Pt.segmentFraction,mn=Pt.alignmentFocus;mn.Mc()&&(mn=Oo);var Ei=Pt.segmentOrientation,Qi=Pt.segmentOffset;if(isNaN(Dt)){var Gi=oe.ua;Et=Si(),Gi.Qu(Vt,Et);var di=tt.allocAt(Et[0],Et[1]);if(di.add(oe.i(0)),Gi.type===Zn.j?di.offset(-Gi.startX,-Gi.startY):(Gi=Gi.figures.first(),Gi!==null&&di.offset(-Gi.startX,-Gi.startY)),Gi=Et[2],Ei!==Nu){var Xn=oe.computeAngle(Pt,Ei,Gi);Pt.Kb=Xn}Xn=di.x-y.x;var co=di.y-y.y;tt.free(di),Ni(Et)}else if(Dt<-pe||Dt>=pe)Et=tt.alloc(),oe.vg(),oe.computeMidPoint(Et),Gi=oe.midAngle,Ei!==Nu&&(Xn=oe.computeAngle(Pt,Ei,Gi),Pt.Kb=Xn),Xn=Et.x-y.x,co=Et.y-y.y,tt.free(Et);else{if(Xn=0,0<=Dt?(co=ce.M(Dt),Et=Dt<pe-1?ce.M(Dt+1):co):(Xn=pe+Dt,co=ce.M(Xn),Et=0<Xn?ce.M(Xn-1):co),co.Xa(Et)){0<=Dt?(Gi=0<Dt?ce.M(Dt-1):co,Xn=Dt<pe-2?ce.M(Dt+2):Et):(Gi=Xn<pe-1?ce.M(Xn+1):co,Xn=1<Xn?ce.M(Xn-2):Et),di=Gi.Bf(co);var Ur=Et.Bf(Xn);Gi=di>Ur+10?0<=Dt?Gi.ab(co):co.ab(Gi):Ur>di+10?0<=Dt?Et.ab(Xn):Xn.ab(Et):0<=Dt?Gi.ab(Xn):Xn.ab(Gi)}else Gi=0<=Dt?co.ab(Et):Et.ab(co);Ei!==Nu&&(Xn=oe.computeAngle(Pt,Ei,Gi),Pt.Kb=Xn),Xn=co.x+(Et.x-co.x)*Vt-y.x,co=co.y+(Et.y-co.y)*Vt-y.y}Pt.measure(1/0,1/0,0,0),Et=Pt.measuredBounds,di=Pt.naturalBounds;var wa=0;Pt instanceof bo&&(wa=Pt.strokeWidth),Ur=di.width+wa;var Ka=di.height+wa;Ae.reset(),Ae.translate(-Et.x,-Et.y),Ae.scale(Pt.scale,Pt.scale),Ae.rotate(Ei===Nu?Pt.angle:Gi,Ur/2,Ka/2),Ei!==im&&Ei!==om||Ae.rotate(90,Ur/2,Ka/2),Ei!==rm&&Ei!==am||Ae.rotate(-90,Ur/2,Ka/2),Ei===b0&&(45<Gi&&135>Gi||225<Gi&&315>Gi)&&Ae.rotate(-Gi,Ur/2,Ka/2),di=new Bn(0,0,Ur,Ka),_e.xi(di,mn),Ae.Ga(_e),mn=-_e.x+wa/2*Pt.scale,Pt=-_e.y+wa/2*Pt.scale,ct.assign(Qi),wa=isNaN(Qi.x);var Al=isNaN(Qi.y);if(wa||Al){Ur=Ur/2+3,Ka=Ka/2+3;var jl=45<=Gi&&135>=Gi,Su=225<=Gi&&315>=Gi;Ei===Nu&&(jl||Su)?(ct.x=Al?Ur:Qi.y,ct.y=wa?Ka:Qi.x,jl?0<=Dt||isNaN(Dt)&&.5>Vt||!wa||(ct.y=-Ka):Su&&((0<=Dt||isNaN(Dt)&&.5>Vt)&&wa&&(ct.y=-Ka),Al&&(ct.x=-Ur))):(wa&&(ct.x=0<=Dt||isNaN(Dt)&&.5>Vt?Ur:-Ur),Al&&(ct.y=-Ka),ct.rotate(Gi))}else ct.rotate(Gi);Xn+=ct.x,co+=ct.y,di.set(Et),di.h(Xn+mn,co+Pt,Et.width,Et.height),Ee.push(di),x.ed(di)}}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),Es(E,x.width||0,x.height||0),ur.free(Ae),tt.free(_e),tt.free(ct)}}}},Um.prototype.arrange=function(a,y){var x=y.length;if(a instanceof ga||a instanceof hi){var b=a,E=null;a instanceof ga&&(E=a,b=E.adornedPart);var z=a instanceof ga?null:b.path,ne=a.j;if(ne.length!==0){var re=0;if(z!==null&&re<ne.length){var oe=ne[re];re++,z.arrange(oe.x-a.jg.x,oe.y-a.jg.y,oe.width,oe.height)}for(oe=0;oe<x;oe++){var le=y[oe];if(le!==z&&re<ne.length){var ce=ne[re];re++,le.arrange(ce.x-a.jg.x,ce.y-a.jg.y,ce.width,ce.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof hi)for(z=a.labelNodes;z.next();){var pe=a;ne=z.value,re=ne.segmentIndex,oe=ne.segmentFraction;var we=ne.alignmentFocus;if(le=ne.segmentOrientation,ce=ne.segmentOffset,isNaN(re)){var Ee=pe.ua,Ae=Si();Ee.Qu(oe,Ae);var _e=tt.allocAt(Ae[0],Ae[1]);_e.add(pe.i(0)),Ee.type===Zn.j||(Ee=Ee.figures.first()),_e.offset(-Ee.startX,-Ee.startY),Ee=Ae[2],le!==Nu&&(pe=pe.computeAngle(ne,le,Ee),ne.angle=pe),pe=_e.x;var ct=_e.y;tt.free(_e),Ni(Ae)}else if(re<-x||re>=x)Ae=tt.alloc(),Ee=pe,ct=Ae,Ee.vg(),Ee.computeMidPoint(ct),Ee=pe.midAngle,le!==Nu&&(pe=pe.computeAngle(ne,le,Ee),ne.angle=pe),pe=Ae.x,ct=Ae.y,tt.free(Ae);else{if(_e=0,0<=re?(Ae=y.s[re],ct=re<x-1?y.s[re+1]:Ae):(_e=x+re,Ae=y.s[_e],ct=0<_e?y.s[_e-1]:Ae),Ae.Xa(ct)){0<=re?(Ee=0<re?y.s[re-1]:Ae,_e=re<x-2?y.s[re+2]:ct):(Ee=_e<x-1?y.s[_e+1]:Ae,_e=1<_e?y.s[_e-2]:ct);var Qe=Ee.Bf(Ae),Pt=ct.Bf(_e);Ee=Qe>Pt+10?0<=re?Ee.ab(Ae):Ae.ab(Ee):Pt>Qe+10?0<=re?ct.ab(_e):_e.ab(ct):0<=re?Ee.ab(_e):_e.ab(Ee)}else Ee=0<=re?Ae.ab(ct):ct.ab(Ae);le!==Nu&&(pe=pe.computeAngle(ne,le,Ee),ne.angle=pe),pe=Ae.x+(ct.x-Ae.x)*oe,ct=Ae.y+(ct.y-Ae.y)*oe}if(we.ys())ne.location=new tt(pe,ct);else{we.Mc()&&(we=Oo),Ae=ur.alloc(),Ae.reset(),Ae.scale(ne.scale,ne.scale),Ae.rotate(ne.angle,0,0);var Et=ne.naturalBounds;_e=Bn.allocAt(0,0,Et.width,Et.height),Qe=tt.alloc(),Qe.xi(_e,we),Ae.Ga(Qe),we=-Qe.x,Pt=-Qe.y;var Dt=Et.width,Vt=Et.height;Et=tt.alloc(),Et.assign(ce);var mn=isNaN(ce.x),Ei=isNaN(ce.y);if(mn||Ei){Dt=Dt/2+3,Vt=Vt/2+3;var Qi=45<=Ee&&135>=Ee,Gi=225<=Ee&&315>=Ee;le===Nu&&(Qi||Gi)?(Et.x=Ei?Dt:ce.y,Et.y=mn?Vt:ce.x,Qi?0<=re||isNaN(re)&&.5>oe||!mn||(Et.y=-Vt):Gi&&((0<=re||isNaN(re)&&.5>oe)&&mn&&(Et.y=-Vt),Ei&&(Et.x=-Dt))):(mn&&(Et.x=0<=re||isNaN(re)&&.5>oe?Dt:-Dt),Ei&&(Et.y=-Vt),Et.rotate(Ee))}else Et.rotate(Ee);pe+=Et.x,ct+=Et.y,Ae.pp(_e),we+=_e.x,Pt+=_e.y,re=tt.allocAt(pe+we,ct+Pt),ne.move(re),tt.free(re),tt.free(Et),tt.free(Qe),Bn.free(_e),ur.free(Ae)}}E!==null?E.Ul(!1):b.Ul(!1),b=I1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),tt.free(b)}};function r1(a,y,x,b){if(mt(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof ga&&a.type===ui.Link&&a.adornedObject instanceof bo&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof hi&&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 ga&&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),gt(b,!1)}}function $p(){this.xa="Base"}Zt($p,ml),$p.prototype.measure=function(a,y,x,b,E,z,ne){var re=a.Pb();a.graduatedBounds=[];var oe=re.margin,le=oe.right+oe.left,ce=oe.top+oe.bottom;re.measure(y,x,z,ne);var pe=re.measuredBounds,we=new Bn(-oe.left,-oe.top,Math.max(pe.width+le,0),Math.max(pe.height+ce,0));a.graduatedBounds.push(we),E.assign(we);for(var Ee=re.geometry,Ae=re.strokeWidth,_e=Ee.flattenedSegments,ct=Ee.flattenedLengths,Qe=Ee.flattenedTotalLength,Pt=_e.length,Et=0,Dt=0,Vt=Si(),mn=0;mn<Pt;mn++){var Ei=_e[mn],Qi=[];Dt=Et=0;for(var Gi=Ei.length,di=0;di<Gi;di+=2){var Xn=Ei[di],co=Ei[di+1];if(di!==0){var Ur=180*Math.atan2(co-Dt,Xn-Et)/Math.PI;0>Ur&&(Ur+=360),Qi.push(Ur)}Et=Xn,Dt=co}Vt.push(Qi)}if(a.graduatedIntervals===null){for(var wa=[],Ka=a.O.s,Al=Ka.length,jl=0;jl<Al;jl++){var Su=Ka[jl],Dl=[];if(wa.push(Dl),Su.visible){var tf=Su.interval;if(!(0>tf)){for(var al=0;al<Al;al++)if(al!==jl){var Pd=Ka[al];if(Pd.visible&&Su.constructor===Pd.constructor){var Pu=Pd.interval;Pu>tf&&Dl.push(Pu)}}}}}a.graduatedIntervals=wa}var nf=a.graduatedIntervals,Lc=a.O.s,Wc=Lc.length,mc=0,rc=0,Of=Qe;a.graduatedMarks=[];for(var wd,Dp=0;Dp<Wc;Dp++){var vc=Lc[Dp];if(wd=[],vc.visible&&vc!==re){var wu=Math.abs(vc.interval),Bm=a.graduatedTickUnit;if(!(2>Bm*wu*Qe/a.graduatedRange&&vc.graduatedSkip===null)){var Gg=ct[0][0],Id=0,oc=0;rc=Qe*vc.graduatedStart-1e-4,Of=Qe*vc.graduatedEnd+1e-4;var og=Bm*wu,yc=a.graduatedTickBase;if(yc<a.graduatedMin){var kf=(a.graduatedMin-yc)/og;kf=kf%1===0?kf:Math.floor(kf+1),yc+=kf*og}else yc>a.graduatedMin+og&&(yc-=Math.floor((yc-a.graduatedMin)/og)*og);for(var hv=nf[Dp],Am=yc,Xy=1e-6*a.graduatedMax,ah=1;yc<=a.graduatedMax+Xy;ah++){e:{for(var Bh=hv.length,$g=0;$g<Bh;$g++){var Tf=(yc-a.graduatedTickBase)%(hv[$g]*a.graduatedTickUnit),Ip=1e-6*a.graduatedTickUnit;if(Tf<Ip&&Tf>-Ip){var Rf=!1;break e}}Rf=!0}if(Rf&&(yc>a.graduatedMax&&(yc=a.graduatedMax),vc.graduatedSkip===null||vc instanceof Ya&&!vc.graduatedSkip(yc,vc)||vc instanceof bo&&!vc.graduatedSkip(yc,vc))&&(mc=(yc-a.graduatedMin)*Qe/a.graduatedRange,mc>Qe&&(mc=Qe),rc<=mc&&mc<=Of)){for(var sh=Vt[Id][oc],rf=ct[Id][oc];Id<ct.length;){for(;mc>Gg&&oc<ct[Id].length-1;)oc++,sh=Vt[Id][oc],rf=ct[Id][oc],Gg+=rf;if(mc<=Gg)break;Id++,oc=0,sh=Vt[Id][oc],rf=ct[Id][oc],Gg+=rf}var ac=_e[Id],Od=ac[2*oc],fv=ac[2*oc+1],Ah=(mc-(Gg-rf))/rf,Op=new tt(Od+(ac[2*oc+2]-Od)*Ah+Ae/2-Ee.bounds.x,fv+(ac[2*oc+3]-fv)*Ah+Ae/2-Ee.bounds.y);Op.scale(re.scale,re.scale);e:{var Cd=sh,ag=Vt[Id];if(!(.5005>Ah&&.4995<Ah)){var kd=Cd;if(.5>Ah?0<oc?kd=ag[oc-1]:_t.$(ac[0],ac[ac.length-2])&&_t.$(ac[1],ac[ac.length-1])&&(kd=ag[ag.length-1]):.5<Ah&&(oc+1<ag.length?kd=ag[oc+1]:_t.$(ac[0],ac[ac.length-2])&&_t.$(ac[1],ac[ac.length-1])&&(kd=ag[0])),Cd!==kd){var Kg=Math.abs(Cd-kd);if(180<Kg&&(Cd<kd?Cd+=360:kd+=360,Kg=Math.abs(Cd-kd)),5e-4>Ah||.9995<Ah){sh=(Cd+kd)/2%360;break e}if(10>Kg){var kp=1-Math.abs(.5-Ah);sh=(Cd*kp+kd*(1-kp))%360;break e}}}sh=Cd}if(vc instanceof Ya){var ad="";vc.graduatedFunction!==null?(ad=vc.graduatedFunction(yc,vc),ad=ad!=null?ad.toString():""):ad=(+yc.toFixed(2)).toString(),ad!==""&&wd.push({$l:Op,angle:sh,text:ad})}else wd.push({$l:Op,angle:sh})}yc=Am+ah*og}}}a.graduatedMarks.push(wd)}Ni(Vt);var Kl=a.graduatedMarks;if(Kl!==null)for(var Dm=b.length,Ou=0;Ou<Dm;Ou++){var sl=b[Ou],ku=Kl[Ou];if(sl.visible&&sl!==re&&ku.length!==0){if(sl instanceof bo){var Dh=a,of=E,sg=sl.alignmentFocus;sg.Mc()&&(sg=su);var Jy=sl.angle;sl.Kb=0,sl.measure(1/0,1/0,0,0),sl.Kb=Jy;var gv=sl.measuredBounds,Tp=gv.width,lg=gv.height,Vg=Bn.allocAt(0,0,Tp,lg),sc=tt.alloc();sc.xi(Vg,sg),Bn.free(Vg);for(var Ih=-sc.x,bd=-sc.y,Tc=new Bn,_f=ku.length,Rp=0;Rp<_f;Rp++)for(var jf=ku[Rp],pv=jf.$l.x,_p=jf.$l.y,Us=jf.angle,sd=0;4>sd;sd++){switch(sd){case 0:sc.h(Ih,bd);break;case 1:sc.h(Ih+Tp,bd);break;case 2:sc.h(Ih,bd+lg);break;case 3:sc.h(Ih+Tp,bd+lg)}sc.rotate(Us+sl.angle),sc.offset(pv,_p),Rp===0&&sd===0?Tc.h(sc.x,sc.y,0,0):Tc.Ye(sc),sc.offset(-pv,-_p),sc.rotate(-Us-sl.angle)}tt.free(sc),Dh.graduatedBounds!==null&&Dh.graduatedBounds.push(Tc),us(of,Tc.x,Tc.y,Tc.width,Tc.height)}else if(sl instanceof Ya){var Gc=a,mv=E;Gc.temporaryTextBlock===null&&(Gc.temporaryTextBlock=new Ya);var xc=Gc.temporaryTextBlock;x1(xc,sl);var af=sl.alignmentFocus;af.Mc()&&(af=su);for(var $c=sl.segmentOrientation,jp=sl.segmentOffset,zf=new Bn,Im=0,zp=0,Td=0,ug=0,Hf=0,Hp=ku.length,sf=0;sf<Hp;sf++){var lh=ku[sf];Im=lh.$l.x,zp=lh.$l.y,Td=lh.angle,Hf=ug=sl.angle,$c!==Nu&&(Hf=$c===nm||$c===C0?Td+sl.angle:Td,ug=hi.computeAngle($c,Hf)),xc.Kb=ug,xc.text=lh.text||"",xc.measure(1/0,1/0,0,0);var lf=xc.measuredBounds,Oh=xc.naturalBounds,uf=Oh.width,cg=Oh.height,Ed=ur.alloc();Ed.reset(),Ed.translate(-lf.x,-lf.y),Ed.scale(xc.scale,xc.scale),Ed.rotate(Hf,uf/2,cg/2),$c!==im&&$c!==om||Ed.rotate(90,uf/2,cg/2),$c!==rm&&$c!==am||Ed.rotate(-90,uf/2,cg/2),$c===b0&&(45<Td&&135>Td||225<Td&&315>Td)&&Ed.rotate(-Td,uf/2,cg/2);var Ug=Bn.allocAt(0,0,uf,cg),cf=tt.alloc();cf.xi(Ug,af),Ed.Ga(cf);var Yg=-cf.x,Qy=-cf.y,kh=tt.alloc();kh.assign(jp),isNaN(kh.x)&&(kh.x=uf/2+3),isNaN(kh.y)&&(kh.y=-(cg/2+3)),kh.rotate(Td),Im+=kh.x+Yg,zp+=kh.y+Qy;var dg=new Bn(Im,zp,lf.width,lf.height),Om=new Bn(lf.x,lf.y,lf.width,lf.height),qy=new Bn(Oh.x,Oh.y,Oh.width,Oh.height);lh.Sz=ug,lh.lineCount=xc.lineCount,lh.lines=[xc.Cb,xc.Ih,xc.df,xc.Le,xc.Qc,xc.Qb,xc.ze],lh.actualBounds=dg,lh.measuredBounds=Om,lh.naturalBounds=qy,sf===0?zf.assign(dg):zf.ed(dg),tt.free(kh),tt.free(cf),Bn.free(Ug),ur.free(Ed)}Gc.graduatedBounds!==null&&Gc.graduatedBounds.push(zf),us(mv,zf.x,zf.y,zf.width,zf.height)}gt(sl,!1)}}},$p.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var z=a.graduatedBounds,ne=0,re=z[ne];ne++,b!==null&&b.arrange(re.x-x.x,re.y-x.y,re.width,re.height);for(var oe=y.length,le=0;le<oe;le++){var ce=y[le];re=E[le],ce.visible&&ce!==b&&re.length!==0&&(re=z[ne],ne++,ce.arrange(re.x-x.x,re.y-x.y,re.width,re.height))}a.graduatedBounds=null}}},$p.prototype.gc=function(a,y,x){var b=x.$i;x.$i=!0;var E=a.naturalBounds,z=E.width,ne=E.height;E=y instanceof Fa,y.save(),y.beginPath(),y.rect(-1,-1,z+1,ne+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),ne=a.Df()*x.scale,0>=ne&&(ne=1);for(var re=z.actualBounds,oe=a.O.s,le=a.graduatedMarks,ce=oe.length,pe=0;pe<ce;pe++){var we=oe[pe],Ee=le[pe],Ae=Ee.length;if(we.visible&&we!==z&&Ee.length!==0){if(we instanceof bo){if(!(2>a.graduatedTickUnit*we.interval*z.geometry.flattenedTotalLength/a.graduatedRange*ne&&we.graduatedSkip===null)){var _e=we.measuredBounds,ct=we.strokeWidth*we.scale,Qe=we.alignmentFocus;Qe.Mc()&&(Qe=su);for(var Pt=0;Pt<Ae;Pt++){var Et=Ee[Pt].$l,Dt=Ee[Pt].angle,Vt=Qe,mn=we.Ab;mn.reset(),mn.translate(Et.x+re.x,Et.y+re.y),mn.rotate(Dt+we.angle,0,0),mn.translate(-_e.width*Vt.x+Vt.offsetX+ct/2,-_e.height*Vt.y+Vt.offsetY+ct/2),mn.scale(we.scale,we.scale),De(we,!1),we.wh.set(we.Ab),we.Kk=we.scale,Ge(we,!1),we.gc(y,x),E&&(a.svg.appendChild(we.svg),we.svg=null),we.Ab.reset()}}}else if(we instanceof Ya)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Ya),_e=a.temporaryTextBlock,x1(_e,we),ct=0;ct<Ae;ct++)Qe=Ee[ct],Qe.actualBounds&&Qe.measuredBounds&&Qe.naturalBounds&&(_e.ec=Qe.text||"",_e.Kb=Qe.Sz||0,_e.Gc=Qe.lineCount||0,Pt=Qe.lines,Pt!==void 0&&(_e.Cb=Pt[0],_e.Ih=Pt[1],_e.df=Pt[2],_e.Le=Pt[3],_e.Qc=Pt[4],_e.Qb=Pt[5],_e.ze=Pt[6]),Qe.naturalBounds&&(_e.dc=Qe.naturalBounds),Qe.actualBounds&&(Pt=Qe.actualBounds,_e.arrange(Pt.x,Pt.y,Pt.width,Pt.height)),Pt=Qe.actualBounds,_e.arrange(Pt.x,Pt.y,Pt.width,Pt.height),Et=Qe.measuredBounds,Qe=Qe.naturalBounds,Dt=_e.Ab,Dt.reset(),Dt.translate(Pt.x+re.x,Pt.y+re.y),Dt.translate(-Et.x,-Et.y),_e.no(Dt,Qe.x,Qe.y,Qe.width,Qe.height),De(_e,!1),_e.wh.set(_e.Ab),_e.Kk=_e.scale,Ge(_e,!1),_e.Ng=we.part,_e.Me=we.panel,_e.gc(y,x),_e.Me=null,_e.Ng=null,E&&(a.svg.appendChild(_e.svg),_e.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function ui(a,y){if(Yt.call(this),this.na=null,a===void 0)this.na=ui.Position;else if(typeof a=="string"){var x=ed.I(a);x!==null&&(this.na=x)}else a instanceof ml?this.na=a:a&&(this.na=ui.Position,y=a);this.na===null&&Rt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===ui.Grid?1048576:0),this.O=new $n,this.yb=pl,this.Tm=Jt,this.Uf=uo,this.$g=null,this.$e="",this.jg=new Bn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=rr,this.jn=ca,this.kn=jo,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Zt(ui,Yt),ui.prototype.cloneProtected=function(a){Yt.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},ui.prototype.Af=function(a){Yt.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},ui.prototype.copy=function(){var a=Yt.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 z=a.O,ne=z.count;if(z.Gb(ne,E),z=a.part,z!==null){z.Rh=null,E.portId!==null&&z instanceof Di&&(z.Te=!0);var re=a.diagram;re!==null&&re.undoManager.isUndoingRedoing||z.cb(ts,"elements",a,null,E,null,ne)}}return a}return null},Be=ui.prototype,Be.toString=function(){return"Panel("+this.type.name+")#"+Yi(this)},Be.Pn=function(a){Yt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},Be.hh=function(a,y){if(this.na===ui.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===ui.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===ui.Table)if(a.yc(),a instanceof Fa){var x=a.yd;a.yd=Cc(a,"gojs-ts"),bv(this,a),a.nh.pop(),a.yd=x}else bv(this,a);(x=this.isClipping&&this.na===ui.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,z=E.length,ne=0;ne<z;ne++){var re=E[ne];x&&re===b&&(a.clipInsteadOfFill=!0),re.gc(a,y),x&&re===b&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function bv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,b=0<a.columnCount?a.colDefs:null;x!==null&&Ym(a,y,!0,x,!0),b!==null&&Ym(a,y,!1,b,!0),x!==null&&o1(a,y,!0,x),b!==null&&o1(a,y,!1,b),x!==null&&Ym(a,y,!0,x,!1),b!==null&&Ym(a,y,!1,b,!1)}function o1(a,y,x,b){for(var E=b.length,z=a.actualBounds,ne=a.naturalBounds,re=!0,oe=0;oe<E;oe++){var le=b[oe];if(le!==void 0&&le.actual!==0)if(re)re=!1;else{if(x){if(le.position>ne.height)continue}else if(le.position>ne.width)continue;var ce=le.separatorStrokeWidth;isNaN(ce)&&(ce=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var pe=le.separatorStroke;if(pe===null&&(pe=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ce!==0&&pe!==null){Bs(a,y,pe,!1,!1,ne,z),pe=!1;var we=le.separatorDashArray;we===null&&(we=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),we!==null&&(pe=!0,y.js(we,0)),y.beginPath(),we=le.position+ce,x?we>ne.height&&(ce-=we-ne.height):we>ne.width&&(ce-=we-ne.width),le=le.position+ce/2,y.lineWidth=ce,ce=a.yb,x?(le+=ce.top,we=ne.width-ce.right,y.moveTo(ce.left,le),y.lineTo(we,le)):(le+=ce.left,we=ne.height-ce.bottom,y.moveTo(le,ce.top),y.lineTo(le,we)),y.stroke(),y.Se(),pe&&y.fs()}}}}function Ym(a,y,x,b,E){for(var z=b.length,ne=a.actualBounds,re=a.naturalBounds,oe=a1(a,!0),le=a1(a,!1),ce=0;ce<z;ce++){var pe=b[ce];if(pe!==void 0&&pe.background!==null&&pe.coversSeparators!==E&&pe.actual!==0){var we=x?ne.height:ne.width;if(!(pe.position>we)){var Ee=pe.Wc(),Ae=pe.separatorStrokeWidth;isNaN(Ae)&&(Ae=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var _e=pe.separatorStroke;_e===null&&(_e=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(_e===null||pe.index===(x?oe:le))&&(Ae=0),Ee-=Ae,Ae=pe.position+Ae,Ee+=pe.actual,Ae+Ee>we&&(Ee=we-Ae),0>=Ee||(we=a.yb,Bs(a,y,pe.background,!0,!1,re,ne),x?y.fillRect(we.left,Ae+we.top,ne.width-(we.left+we.right),Ee):y.fillRect(Ae+we.left,we.top,Ee,ne.height-(we.top+we.bottom)))}}}}function a1(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 Ev(a){return a==="LineV"||a==="BarV"}Be.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Be.kk=function(a,y,x){if(!Yt.prototype.kk.call(this,a,y,x))return!1;if(this.type===ui.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,bv(this,a),a.yd=null;else if(this.na===ui.Grid||this.na===ui.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},Be.nk=function(){return!0},Be.$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,z=0,ne=0;ne<y.length;ne++)if(y[ne].Ed()){var re=y[ne].actualBounds;E=ne===0?re.x:Math.min(re.x,E),z=ne===0?re.y:Math.min(re.y,z)}b.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-E)+","+(a.y-x.y-z)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else Yt.prototype.$o.call(this,a,y,x,b)},Be.Sj=function(a,y,x,b,E){var z=this.se(),ne=this.transform,re=1/(ne.m11*ne.m22-ne.m12*ne.m21),oe=ne.m22*re,le=-ne.m12*re,ce=-ne.m21*re,pe=ne.m11*re,we=re*(ne.m21*ne.dy-ne.m22*ne.dx),Ee=re*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,_t.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,b,E);if(this.background!==null)return z=a*oe+y*ce+we,re=a*le+y*pe+Ee,a=x*oe+b*ce+we,oe=x*le+b*pe+Ee,E.h(0,0),x=this.naturalBounds,z=_t.Ff(0,0,x.width,x.height,z,re,a,oe,E),E.transform(ne),z;z||(oe=1,ce=le=0,pe=1,Ee=we=0),re=a*oe+y*ce+we,a=a*le+y*pe+Ee,oe=x*oe+b*ce+we,x=x*le+b*pe+Ee,E.h(oe,x),b=(oe-re)*(oe-re)+(x-a)*(x-a),le=!1,pe=this.O.s,Ee=pe.length,ce=tt.alloc(),we=null,y=1/0;var Ae=null,_e=this.isClipping&&this.na===ui.Spot;_e&&(Ae=tt.alloc(),we=this.Pb(),(le=we.Sj(re,a,oe,x,Ae))&&(y=(re-Ae.x)*(re-Ae.x)+(a-Ae.y)*(a-Ae.y)));for(var ct=0;ct<Ee;ct++){var Qe=pe[ct];Qe.visible&&Qe!==we&&Qe.Sj(re,a,oe,x,ce)&&(le=!0,Qe=(re-ce.x)*(re-ce.x)+(a-ce.y)*(a-ce.y),Qe<b&&(b=Qe,E.set(ce)))}return _e&&(y>b&&E.set(Ae),tt.free(Ae)),tt.free(ce),z&&E.transform(ne),le},Be.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Yt.prototype.Gj.call(this)},Be.v=function(a){if(!mt(this)){Yt.prototype.v.call(this,a),a=null,(this.na===ui.Auto||this.na===ui.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 z=yu(E,!1);(E instanceof Fu||E instanceof ui||E instanceof Ya||z!==ei)&&E.v(!0)}}}},Be.Uj=function(){if(!mt(this)){gt(this,!0),jt(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Be.Uk=function(){if(!(this.l&2048)){De(this,!0),Ge(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Be.Wu=function(){Ge(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Be.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var z=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 re=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,re.width)),isNaN(z.height)||(y=Math.min(z.height,re.height)),a=Math.max(x,a),y=Math.max(b,y);var oe=this.yb;a=Math.max(a-oe.left-oe.right,0),y=Math.max(y-oe.top-oe.bottom,0);var le=this.O.s;le.length!==0&&this.na.measure(this,a,y,le,E,x,b),a=E.width+oe.left+oe.right,oe=E.height+oe.top+oe.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(oe=z.height),a=Math.min(re.width,a),oe=Math.min(re.height,oe),a=Math.max(ne.width,a),oe=Math.max(ne.height,oe),a=Math.max(x,a),oe=Math.max(b,oe),Es(E,a,oe),Es(this.naturalBounds,a,oe),this.Ge(0,0,a,oe)},Be.Pb=function(){if(this.$g===null){var a=this.O.s,y=a.length;if(y===0)return null;for(var x=0;x<y;x++){var b=a[x];if(b.isPanelMain===!0)return this.$g=b}this.$g=a[0]}return this.$g};function Lh(a){return a.part!==null?a.part.locationObject:null}Be.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=yu(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var ne=this.Kg,re=ne.left+ne.right;switch(ne=ne.top+ne.bottom,y===x&&z===b&&(a=ei),a){case ei:(y>x||z>b)&&(this.v(),this.measure(y>x?x:y,z>b?b:z,0,0));break;case oi:this.v(!0),this.measure(x+re,b+ne,0,0);break;case hr:this.v(!0),this.measure(x+re,z+ne,0,0);break;case Br:this.v(!0),this.measure(y+re,b+ne,0,0)}}this.na.arrange(this,E,this.jg)}},Be.gh=function(a){var y=this.naturalBounds,x=Lh(this);if(Sa(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 z=y[b];if((z.visible||z===x)&&(Ao(E.set(a),z.transform),z.ca(E)))return tt.free(E),!0}return tt.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},Be.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].ks(a);if(E!==null)return E}return null},Be.qm=function(a,y){if(y(this,a),a instanceof ui){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function Jf(a,y){s1(a,a,y)}function s1(a,y,x){x(y),y=y.O.s;for(var b=y.length,E=0;E<b;E++){var z=y[E];z instanceof ui&&s1(a,z,x)}}function vS(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof ui){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}Be.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof ui){y=y.O.s;for(var b=y.length,E=0;E<b;E++){var z=u1(a,y[E],x);if(z!==null)return z}}return null}Be.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Kp(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof ui){var z=E.fb(a);if(z!==null)return z}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 ui?x=Math.max(x,c1(E)):E instanceof bo&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}Be.se=function(){return!(this.type===ui.TableRow||this.type===ui.TableColumn)};function $h(a){return a.type===ui.TableRow||a.type===ui.TableColumn}Be.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Ft(this)))return null;var b=this.naturalBounds,E=1/this.Df(),z=this.se(),ne=z?a:Ao(tt.allocAt(a.x,a.y),this.transform),re=this.diagram,oe=10,le=5;if(re!==null&&(oe=re.Ql("extraTouchArea"),le=oe/2),Sa(-(le*E),-(le*E),b.width+oe*E,b.height+oe*E,ne.x,ne.y)){if(!this.isAtomic){E=this.O.s;var ce=E.length;if(re=tt.alloc(),le=(oe=this.isClipping&&this.na===ui.Spot)?this.Pb():null,oe&&(le.se()?Ao(re.set(a),le.transform):re.set(a),!le.ca(re)))return tt.free(re),z||tt.free(ne),null;for(var pe=Lh(this);ce--;){var we=E[ce];if((we.visible||we===pe)&&(we.se()?Ao(re.set(a),we.transform):re.set(a),!oe||we!==le)){var Ee=null;if(we instanceof ui?Ee=we.ic(re,y,x):we.pickable===!0&&we.ca(re)&&(Ee=we),Ee!==null&&(y!==null&&(Ee=y(Ee)),Ee!==null&&(x===null||x(Ee))))return tt.free(re),z||tt.free(ne),Ee}}tt.free(re)}return this.background===null&&this.areaBackground===null?(z||tt.free(ne),null):(a=Sa(0,0,b.width,b.height,ne.x,ne.y)?this:null,z||tt.free(ne),a)}return z||tt.free(ne),null},Be.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,z=this.se(),ne=z?a:Ao(tt.allocAt(a.x,a.y),this.transform);if(E=Sa(0,0,E.width,E.height,ne.x,ne.y),$h(this)||E){if(!this.isAtomic){for(var re=this.O.s,oe=re.length,le=tt.alloc(),ce=Lh(this);oe--;){var pe=re[oe];if(pe.visible||pe===ce){pe.se()?Ao(le.set(a),pe.transform):le.set(a);var we=pe;pe=pe instanceof ui?pe:null,(pe!==null?pe.ji(le,y,x,b):we.ca(le))&&we.pickable!==!1&&(y!==null&&(we=y(we)),we===null||x!==null&&!x(we)||b.add(we))}}tt.free(le)}return z||tt.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return z||tt.free(ne),!1},Be.Cf=function(a,y,x,b,E,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=z;if(z===void 0&&(ne=ur.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return Mv(this,y,x,E),z===void 0&&ur.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var re=Lh(this),oe=this.O.s,le=oe.length;le--;){var ce=oe[le];if(ce.visible||ce===re){var pe=ce.actualBounds,we=this.naturalBounds;pe.x>we.width||pe.y>we.height||0>pe.x+pe.width||0>pe.y+pe.height||(pe=ce,ce=ce instanceof ui?ce:null,we=ur.alloc(),we.set(ne),(ce!==null?ce.Cf(a,y,x,b,E,we):dl(pe,a,b,we))&&(y!==null&&(pe=y(pe)),pe===null||x!==null&&!x(pe)||E.add(pe)),ur.free(we))}}return z===void 0&&ur.free(ne),b}return z===void 0&&ur.free(ne),!1};function Mv(a,y,x,b){for(var E=a.O.s,z=E.length;z--;){var ne=E[z];if(ne.visible){var re=ne.actualBounds,oe=a.naturalBounds;re.x>oe.width||re.y>oe.height||0>re.x+re.width||0>re.y+re.height||(ne instanceof ui&&Mv(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}Be.og=function(a,y,x,b,E,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),b===void 0&&(b=null);var ne=this.naturalBounds,re=this.se(),oe=re?a:Ao(tt.allocAt(a.x,a.y),this.transform),le=re?y:Ao(tt.allocAt(y.x,y.y),this.transform),ce=oe.Bf(le),pe=0<oe.x&&oe.x<ne.width&&0<oe.y&&oe.y<ne.height||Va(oe.x,oe.y,0,0,0,ne.height)<=ce||Va(oe.x,oe.y,0,ne.height,ne.width,ne.height)<=ce||Va(oe.x,oe.y,ne.width,ne.height,ne.width,0)<=ce||Va(oe.x,oe.y,ne.width,0,0,0)<=ce;if(ne=oe.zd(0,0)<=ce&&oe.zd(0,ne.height)<=ce&&oe.zd(ne.width,0)<=ce&&oe.zd(ne.width,ne.height)<=ce,re||(tt.free(oe),tt.free(le)),pe){if(!this.isAtomic){oe=tt.alloc(),le=tt.alloc(),ce=Lh(this);for(var we=this.O.s,Ee=we.length;Ee--;){var Ae=we[Ee];if(Ae.visible||Ae===ce){var _e=Ae.actualBounds,ct=this.naturalBounds;(!re||!(_e.x>ct.width||_e.y>ct.height||0>_e.x+_e.width||0>_e.y+_e.height))&&(Ae.se()?(_e=Ae.transform,Ao(oe.set(a),_e),Ao(le.set(y),_e)):(oe.set(a),le.set(y)),_e=Ae,Ae=Ae instanceof ui?Ae:null,(Ae!==null?Ae.og(oe,le,x,b,E,z):_e.tx(oe,le,E))&&(x!==null&&(_e=x(_e)),_e===null||b!==null&&!b(_e)||z.add(_e)))}}tt.free(oe),tt.free(le)}return E?pe:ne}return!1};function Lv(a){var y=null;return a instanceof bo&&(y=a.spot1,y===Jt&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Ws),y}function Fv(a){var y=null;return a instanceof bo&&(y=a.spot2,y===Jt&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=wl),y}Be.add=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];for(x=0;x<y.length;x++)this.Gb(this.O.count,y[x]);return this},Be.M=function(a){return this.O.M(a)},Be.Gb=function(a,y){y instanceof Pr&&Rt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Rt("Cannot make a Panel contain itself: "+this.toString()),Rt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Rt("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!==ui.Grid||y instanceof bo||Rt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==ui.Graduated||y instanceof bo||y instanceof Ya||Rt("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 Ti),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var z=-1,ne=this.O.s,re=ne.length,oe=0;oe<re;oe++)if(ne[oe]===y){z=oe;break}if(z!==-1){if(z===a||z+1>=E.count&&a>=E.count)return;E.mb(z),b=z}else Rt("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),mt(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof ui&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Jm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Di&&(x.Te=!0),x.Te&&x instanceof Di&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(Ms,"elements",this,y,null,b,null),x.cb(ts,"elements",this,null,y,null,a)))};function Nv(a,y){a.l=y?a.l|16777216:a.l&-16777217}Be.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)},Be.mb=function(a){0<=a&&this.pc(a,!0)},Be.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),gt(this,!1),this.v(),this.$g===b&&(this.$g=null),this.graduatedIntervals=null;var z=this.part;z!==null&&(z.Rh=null,z.ag=NaN,z.Wb(),z instanceof Di&&(b instanceof ui?b.qm(b,function(ne,re){Qv(z,re,y)}):Qv(z,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(Ms,"elements",this,b,null,a,null))},Be.Fb=function(a){0>a&&Vn(a,">= 0",ui,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new hl;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(ts,"rowdefs",this,null,x,null,a)}return y[a]},Be.oA=function(a){if(0>a&&Vn(a,">= 0",ui,"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(Ms,"rowdefs",this,x,null,a,null),this.v()}}};function d1(a,y,x){var b=a.rowDefs;if(!(0>y)){if(b[y]=x instanceof hl?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}Be.Eb=function(a){0>a&&Vn(a,">= 0",ui,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new hl;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(ts,"coldefs",this,null,x,null,a)}return y[a]},Be.jA=function(a){if(0>a&&Vn(a,">= 0",ui,"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(Ms,"coldefs",this,x,null,a,null),this.v()}}};function h1(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof hl?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}Be.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Qm(y,a),this},Be.Hy=function(a,y){return(a=this.Fb(a))&&Qm(a,new hl(y)),this},Be.By=function(a,y){return(a=this.Eb(a))&&Qm(a,new hl(y)),this},Be.nz=function(a){if(0>a||this.type!==ui.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,b=x.length,E=this.topIndex;E<b;E++){var z=x[E];if(z!==void 0&&(y+=z.total,a<y))break}return E},Be.fz=function(a){if(0>a||this.type!==ui.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,b=x.length,E=this.leftIndex;E<b;E++){var z=x[E];if(z!==void 0&&(y+=z.total,a<y))break}return E},Be.Fz=function(a,y){if(y===void 0&&(y=new tt(NaN,NaN)),this.type!==ui.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},Be.Gz=function(a){if(this.type!==ui.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 zc(a){var y=a.allBindings;if(y===null)a.data!==null&&Rt("Template cannot have .data be non-null: "+a),a.allBindings=y=new $n;else if(y._isFrozen)return;var x=new $n;Nv(a,!1),a.qm(a,function(le,ce){ce.th();var pe=ce.localBindings;if(pe!==null)for(Ce(ce,!1),pe=pe.iterator;pe.next();){var we=pe.value;we.mode===gm&&Ce(ce,!0);var Ee=we.sourceName;Ee!==null&&(Ee==="/"&&Nv(le,!0),Ee=Lx(we,le,ce),Ee!==null&&(x.add(Ee),Ee.srcBindings===null&&(Ee.srcBindings=new $n),Ee.srcBindings.add(we))),y.add(we)}if(ce instanceof ui&&ce.type===ui.Table){if(0<ce.rowCount){for(le=ce.rowDefs,pe=le.length,we=0;we<pe;we++)if(Ee=le[we],Ee!==void 0&&Ee.be!==null)for(var Ae=Ee.be.iterator;Ae.next();){var _e=Ae.value;_e.xd=Ee,_e.to=2,_e.wl=Ee.index,y.add(_e)}}if(0<ce.columnCount){for(ce=ce.colDefs,le=ce.length,pe=0;pe<le;pe++)if(we=ce[pe],we!==void 0&&we.be!==null)for(Ee=we.be.iterator;Ee.next();)Ae=Ee.value,Ae.xd=we,Ae.to=1,Ae.wl=we.index,y.add(Ae)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){Ce(E,!0);for(var z=E.srcBindings.iterator;z.next();){var ne=z.value;E.localBindings===null&&(E.localBindings=new $n),E.localBindings.add(ne)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,z=E.xd,z!==null){E.xd=null;var re=E.targetProperty,oe=re.indexOf(".");0<oe&&z instanceof ui&&(ne=re.substring(0,oe),re=re.substr(oe+1),oe=z.fb(ne),oe!==null?(z=oe,E.targetProperty=re):Pi('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),z instanceof hl?(ne=Yi(z.panel),E.Ai=ne===void 0?-1:ne,z.panel.bindingId=E.Ai):z instanceof Yt?(ne=Yi(z),E.Ai=ne===void 0?-1:ne,z.bindingId=E.Ai):Rt("Unknown type of binding target: "+z)}y.freeze(),a instanceof Pr&&a.Zc()&&a.Va()}Be.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return vS(y,function(x){x instanceof ui&&(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&&zc(y),y},Be.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,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 z=this,ne=x.Ai;if(ne!==-1){if(z=this.ks(ne),z===null)continue}else x.xd!==null&&(z=x.xd);if(E==="/"?b=z.part:E==="."?b=z:E===".."&&(b=z.panel),E=x.to,E!==0){if(!(z instanceof ui))continue;E===1?z=z.Eb(x.wl):E===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,b)}}},Be.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function yS(a,y){a=a.O.s;for(var x=a.length,b=y.length,E=0,z=null;E<x&&(z=a[E],!(z instanceof ui&&z.data!==null));)E++,z=a[E];if(x-E!==b)return!0;if(z===null)return 0<b;for(var ne=0;E<x&&ne<b;){if(z=a[E],!(z instanceof ui)||z.data!==y[ne])return!0;E++,ne++}return!1}function Kp(a){if(a.type===ui.Spot||a.type===ui.Auto)return Math.min(a.O.length,1);if(a.type===ui.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof bo&&b.isPanelMain))break}return x}return a.type===ui.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof ui&&$h(a))?1:0}Be.mv=function(){for(var a=Kp(this);this.O.length>a;)this.pc(this.O.length-1,!1);g1(this,this.itemArray)};function g1(a,y){var x=Kp(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++)Xm(a,y[b],b,!0)}else{b=x;for(var E=0;E<y.length;E++,b++){var z=y[E],ne=b<a.O.length?a.O.M(b):null;if(ne instanceof ui){if(ne.data!==z){var re=Av(a,ne.data),oe=Av(a,z),le=oe!==re;le||(re=Dv(a,re),le=Dv(a,oe)!==re),le?(a.pc(b,!1),Xm(a,z,E,!1)):ne.data=z}}else Xm(a,z,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,Bv(a,x,0),mt(a)||a.v(),a.graduatedIntervals=null,a.If()||Jm(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Di&&(y.Te=!0),y.Te&&y instanceof Di&&(y.wc=null))}}function Xm(a,y,x,b){if(!(y==null||0>x)){var E=Av(a,y);if(E=Dv(a,E),E!==null){if(zc(E),E=E.copy(),E.l&16777216){var z=a.ih();z!==null&&Nv(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new Ti),a.ge.add(y,E)),z=x+Kp(a),a.Gb(z,E),b&&(E.ub=y,Bv(a,z,x),E.ub=null),E.data=y}}}function Bv(a,y,x){for(a=a.O;y<a.length;){var b=a.M(y);if(b instanceof ui){var E=y,z=x;b.type===ui.TableRow?b.row=E:b.type===ui.TableColumn&&(b.column=E),b.itemIndex=z}y++,x++}}function Av(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=nl(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Rt("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Dv(a,y){var x=a.itemTemplateMap,b=null;return x!==null&&(b=x.I(y)),b===null&&(x!==null&&(b=x.I("")),b===null&&(p1||(p1=!0,Pi('No item template Panel found for category "'+y+'" on '+a),Pi(" Using default item template."),a=new ui,y=new Ya,y.bind(new ol("text","",sr)),a.add(y),m1=a),b=m1)),b}function Jm(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof ui){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var z=y[E];x&&z instanceof ui&&!z.isEnabled||Jm(a,z,x)}}}function Ad(a,y){y.name=a,ed.add(a,y)}yt.Object.defineProperties(ui.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===ui.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&&Vn(a,">= 0",ui,"padding"),a=new or(a)):(0>a.left&&Vn(a.left,">= 0",ui,"padding:value.left"),0>a.right&&Vn(a.right,">= 0",ui,"padding:value.right"),0>a.top&&Vn(a.top,">= 0",ui,"padding:value.top"),0>a.bottom&&Vn(a.bottom,">= 0",ui,"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:pl},set:function(a){typeof a=="number"&&(a=new or(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Dc),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 fa)&&(a instanceof fa&&a.freeze(),this.T===null&&(this.T=new Dc),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 Dc),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 z=a[E];typeof z=="number"&&0<=z&&isFinite(z)||Rt("defaultRowSeparatorDashArray value "+z+" at index "+E+" must be a positive number or zero."),b+=z}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Dc),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 fa)&&(a instanceof fa&&a.freeze(),this.T===null&&(this.T=new Dc),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 Dc),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 z=a[E];typeof z=="number"&&0<=z&&isFinite(z)||Rt("defaultColumnSeparatorDashArray value "+z+" at index "+E+" must be a positive number or zero."),b+=z}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Dc),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 Dc),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||Rt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Qc(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()||Rt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Qc(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 Fh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),Se(this)&&(a=this.part,a!==null&&qa(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 Fh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Se(this)&&(a=this.part,a!==null&&qa(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 Fh),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 Fh),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 Fh,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 Fh,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 Fh,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 Fh,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 Dc),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Dc),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:e0},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new Dc),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:e0},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new Dc),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)&&Rt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Dc),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)&&Rt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Dc),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 Pr&&!(this instanceof ga);zc(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof hi?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Pr&&(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 Vr),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&yS(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&yy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&vy(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||g1(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 Ti}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Pr||a.isPanelMain)&&Rt("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(););Bo(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&&(Bo(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 mo&&(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&&Jm(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))}}}),yt.Object.defineProperties(ui,{Position:{get:function(){return ed.I("Position")}},Horizontal:{get:function(){return ed.I("Horizontal")}},Vertical:{get:function(){return ed.I("Vertical")}},Spot:{get:function(){return ed.I("Spot")}},Auto:{get:function(){return ed.I("Auto")}},Table:{get:function(){return ed.I("Table")}},Viewbox:{get:function(){return ed.I("Viewbox")}},TableRow:{get:function(){return ed.I("TableRow")}},TableColumn:{get:function(){return ed.I("TableColumn")}},Link:{get:function(){return ed.I("Link")}},Grid:{get:function(){return ed.I("Grid")}},Graduated:{get:function(){return ed.I("Graduated")}}}),ui.prototype.rebuildItemElements=ui.prototype.mv,ui.prototype.findItemPanelForData=ui.prototype.sx,ui.prototype.updateTargetBindings=ui.prototype.La,ui.prototype.copyTemplate=ui.prototype.Uy,ui.prototype.graduatedValueForPoint=ui.prototype.Gz,ui.prototype.graduatedPointForValue=ui.prototype.Fz,ui.prototype.findColumnForLocalX=ui.prototype.fz,ui.prototype.findRowForLocalY=ui.prototype.nz,ui.prototype.addColumnDefinition=ui.prototype.By,ui.prototype.addRowDefinition=ui.prototype.Hy,ui.prototype.addRowColumnDefinition=ui.prototype.Gy,ui.prototype.removeColumnDefinition=ui.prototype.jA,ui.prototype.getColumnDefinition=ui.prototype.Eb,ui.prototype.removeRowDefinition=ui.prototype.oA,ui.prototype.getRowDefinition=ui.prototype.Fb,ui.prototype.removeAt=ui.prototype.mb,ui.prototype.remove=ui.prototype.remove,ui.prototype.insertAt=ui.prototype.Gb,ui.prototype.elt=ui.prototype.M,ui.prototype.add=ui.prototype.add,ui.prototype.findObject=ui.prototype.fb,ui.prototype.findInVisualTree=ui.prototype.Nl,ui.prototype.walkVisualTreeFrom=ui.prototype.qm,ui.prototype.findMainElement=ui.prototype.Pb;var p1=!1,m1=null,ed=new Ti;ui.className="Panel",ui.definePanelLayout=Ad,Ad("Position",new _m),Ad("Vertical",new zm),Ad("Auto",new Zm),Ad("Link",new Um);function Fh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Fh.prototype.copy=function(){var a=new Fh;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},Fh.className="GradPanelSettings";function Dc(){this.Pc=[],this.Oc=[],this.j=this.ob=e0,this.hb=this.Hb=0,this.Qp=pl,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Dc.prototype.copy=function(a){for(var y=new Dc,x=this.Pc,b=x.length,E=y.Pc,z=0;z<b;z++)if(x[z]!==void 0){var ne=x[z].copy();ne.wi(a),E[z]=ne}for(x=this.Oc,b=x.length,E=y.Oc,z=0;z<b;z++)x[z]!==void 0&&(ne=x[z].copy(),ne.wi(a),E[z]=ne);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},Dc.className="TablePanelSettings";function hl(a){Io(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Jt,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Iv,this.hg=uo,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))}hl.prototype.copy=function(){var a=new hl;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 Qm(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}Be=hl.prototype,Be.qb=function(a){a.classType===hl&&(this.sizing=a)},Be.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Yi(this)},Be.wi=function(a){this.Me=a},Be.Io=function(a){var y=0,x=this.Me;if(this.index!==a&&(a=this.separatorStroke,a===null&&x!==null&&(a=this.isRow?x.defaultRowSeparatorStroke:x.defaultColumnSeparatorStroke),a!==null&&(y=this.separatorStrokeWidth,isNaN(y)&&(x!==null?y=this.isRow?x.defaultRowSeparatorStrokeWidth:x.defaultColumnSeparatorStrokeWidth:y=0))),a=this.dg,a===null)if(x!==null)a=x.defaultSeparatorPadding;else return y;return y+(this.isRow?a.top:a.left)},Be.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===ui.Table)for(var E=b?y.rowDefs.length:y.colDefs.length,z=0;z<E;z++){var ne=b?y.rowDefs[z]:y.colDefs[z];if(ne!==void 0&&ne.oa!==0){x=ne.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=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)},Be.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(Ha,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 qm(a){if(a.sizing===Iv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Be.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new ol(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&f1(y)&&Rt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new $n),this.be.add(E),this},yt.Object.defineProperties(hl.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&&Vn(a,">= 0",hl,"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&&Vn(a,">= 0",hl,"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))&&Vn(a,">= 0",hl,"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&&Vn(a,">= 0",hl,"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 or(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&&yf(a,"RowColumnDefinition.separatorStroke"),a instanceof fa&&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 z=a[E];typeof z=="number"&&0<=z&&isFinite(z)||Rt("separatorDashArray value "+z+" at index "+E+" must be a positive number or zero."),b+=z}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&&yf(a,"RowColumnDefinition.background"),a instanceof fa&&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}}}),hl.prototype.computeEffectiveSpacing=hl.prototype.Wc,hl.prototype.computeEffectiveSpacingTop=hl.prototype.Io;var Iv=new qt(hl,"Default",0),Vp=new qt(hl,"None",1),e0=new qt(hl,"ProportionalExtra",2);hl.className="RowColumnDefinition",hl.Default=Iv,hl.None=Vp,hl.ProportionalExtra=e0;function bo(a,y){Yt.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)}Zt(bo,Yt),bo.prototype.cloneProtected=function(a){Yt.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 Qf(a){a.Na===null?a.Na=new Tv:a.Na.nc&&(a.Na=a.Na.copy())}Be=bo.prototype,Be.th=function(){Yt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Be.qb=function(a){a===ei||a===rr||a===zo||a===uo?this.geometryStretch=a:Yt.prototype.qb.call(this,a)},Be.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Yi(this)};function cp(a,y,x,b){var E=x.length;if(!(4>E)){var z=b.measuredBounds,ne=Math.max(1,z.width);z=z.height;for(var re=x[0],oe=x[1],le,ce,pe,we,Ee,Ae,_e=0,ct=Si(),Qe=2;Qe<E;Qe+=2)le=x[Qe],ce=x[Qe+1],pe=le-re,re=ce-oe,pe===0&&(pe=.001),we=re/pe,Ee=Math.atan2(re,pe),Ae=Math.sqrt(pe*pe+re*re),ct.push([pe,Ee,we,Ae]),_e+=Ae,re=le,oe=ce;re=x[0],oe=x[1],pe=b.measuredBounds.width,b instanceof bo&&(pe-=b.strokeWidth),1>pe&&(pe=1),E=x=pe,le=ne/2,ce=le!==0,Qe=0,Ae=ct[Qe],pe=Ae[0],Ee=Ae[1],we=Ae[2],Ae=Ae[3];for(var Pt=0;.1<=_e;){if(Pt===0&&(ce?(E=x,E-=le,_e-=le,ce=!1):E=x,E===0&&(E=1)),E>_e){Ni(ct);return}E>Ae?(Pt=E-Ae,E=Ae):Pt=0;var Et=Math.sqrt(E*E/(1+we*we));if(0>pe&&(Et=-Et),re+=Et,oe+=we*Et,a.translate(re,oe),a.rotate(Ee),a.translate(-(ne/2),-(z/2)),Pt===0&&b.hh(a,y),a.translate(ne/2,z/2),a.rotate(-Ee),a.translate(-re,-oe),_e-=E,Ae-=E,Pt!==0){if(Qe++,Qe===ct.length){Ni(ct);return}Ae=ct[Qe],pe=Ae[0],Ee=Ae[1],we=Ae[2],Ae=Ae[3],E=Pt}}Ni(ct)}}Be.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 z=this.actualBounds,ne=this.naturalBounds;b!==null&&Bs(this,a,b,!0,!1,ne,z);var re=this.part,oe=this.ig;if(x===null||oe!==0||re===null||!this.isPanelMain&&re.Pb()!==this||(oe=re.type===ui.Link&&re instanceof ga&&re.category==="Selection"&&re.adornedObject instanceof bo&&re.adornedPart.Pb()===re.adornedObject?re.adornedObject.strokeWidth:0),oe===0&&(x=null),x!==null&&oe!==0&&(Bs(this,a,x,!1,!1,ne,z),a.lineWidth=oe,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,re&&y.Gf("drawShadows")&&(z=re.isShadowed),a.Il===!1&&(z=!1),re=!0,x===null||b!==null&&b!=="transparent"||(re=!1),ne=!1,oe=this.strokeDashArray,oe!==null&&(ne=!0,a.js(oe,this.strokeDashOffset)),E.type===Zn.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===Zn.u){var le=E.startX;oe=E.startY;var ce=E.endX,pe=E.endY;E=Math.min(le,ce);var we=Math.min(oe,pe);le=Math.abs(ce-le),oe=Math.abs(pe-oe),a.beginPath(),a.rect(E,we,le,oe),b!==null&&a.ng(b),x!==null&&(re&&z&&xu(a),a.jk(),re&&z&&Zl(a)),a.Se()}else if(E.type===Zn.F)le=E.startX,oe=E.startY,ce=E.endX,pe=E.endY,E=Math.abs(ce-le)/2,we=Math.abs(pe-oe)/2,le=Math.min(le,ce)+E,oe=Math.min(oe,pe)+we,a.beginPath(),a.moveTo(le,oe-we),a.bezierCurveTo(le+_t.wg*E,oe-we,le+E,oe-_t.wg*we,le+E,oe),a.bezierCurveTo(le+E,oe+_t.wg*we,le+_t.wg*E,oe+we,le,oe+we),a.bezierCurveTo(le-_t.wg*E,oe+we,le-E,oe+_t.wg*we,le-E,oe),a.bezierCurveTo(le-E,oe-_t.wg*we,le-_t.wg*E,oe-we,le,oe-we),a.closePath(),b!==null&&a.ng(b),x!==null&&(re&&z&&xu(a),a.jk(),re&&z&&Zl(a)),a.Se();else if(E.type===Zn.o)for(E=E.figures,oe=E.length,we=0;we<oe;we++){le=E.s[we],a.beginPath(),a.moveTo(le.startX,le.startY),ce=le.segments.s,pe=ce.length;for(var Ee=null,Ae=0;Ae<pe;Ae++){var _e=ce[Ae];switch(_e.type){case wo:a.moveTo(_e.endX,_e.endY);break;case Cr:a.lineTo(_e.endX,_e.endY);break;case fr:a.bezierCurveTo(_e.point1X,_e.point1Y,_e.point2X,_e.point2Y,_e.endX,_e.endY);break;case Rr:a.quadraticCurveTo(_e.point1X,_e.point1Y,_e.endX,_e.endY);break;case pa:if(_e.radiusX===_e.radiusY){var ct=Math.PI/180;a.arc(_e.point1X,_e.point1Y,_e.radiusX,_e.startAngle*ct,(_e.startAngle+_e.sweepAngle)*ct,0>_e.sweepAngle,Ee!==null?Ee.endX:le.startX,Ee!==null?Ee.endY:le.startY)}else if(Ee=Ca(_e,le),ct=Ee.length,ct===0)a.lineTo(_e.centerX,_e.centerY);else for(var Qe=0;Qe<ct;Qe++){var Pt=Ee[Qe];Qe===0&&a.lineTo(Pt[0],Pt[1]),a.bezierCurveTo(Pt[2],Pt[3],Pt[4],Pt[5],Pt[6],Pt[7])}break;case Is:if(Qe=ct=0,Ee!==null&&Ee.type===pa){if(Ee=Ca(Ee,le),Pt=Ee.length,Pt===0){a.lineTo(_e.endX,_e.endY);break}Ee=Ee[Pt-1]||null,Ee!==null&&(ct=Ee[6],Qe=Ee[7])}else ct=Ee!==null?Ee.endX:le.startX,Qe=Ee!==null?Ee.endY:le.startY;if(Ee=Ja(_e,le,ct,Qe),ct=Ee.length,ct===0){a.lineTo(_e.endX,_e.endY);break}for(Qe=0;Qe<ct;Qe++)Pt=Ee[Qe],a.bezierCurveTo(Pt[2],Pt[3],Pt[4],Pt[5],Pt[6],Pt[7]);break;default:Rt("Segment not of valid type: "+_e.type)}_e.isClosed&&a.closePath(),Ee=_e}ce=le.isFilled,z?le.isShadowed?(ce===!0&&b!=="transparent"&&b!==null&&a.ng(b,le.isEvenOdd),x!==null&&(ce&&re&&xu(a),a.jk(),ce&&re&&Zl(a))):(xu(a),ce&&b!=="transparent"&&b!==null&&a.ng(b,le.isEvenOdd),x!==null&&a.jk(),Zl(a)):(ce&&b!==null&&a.ng(b,le.isEvenOdd),x!==null&&a.jk()),a.Se(we)}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),z=this.geometry,a.save(),a.beginPath(),b=Si(),z.type===Zn.j)b.push(z.startX),b.push(z.startY),b.push(z.endX),b.push(z.endY),cp(a,y,b,x);else if(z.type===Zn.o)for(z=z.figures.iterator;z.next();){for(re=z.value,b.length=0,b.push(re.startX),b.push(re.startY),ne=re.startX,E=re.startY,oe=ne,we=E,le=re.segments.s,ce=le.length,pe=0;pe<ce;pe++){switch(Ae=le[pe],Ae.type){case wo:cp(a,y,b,x),b.length=0,b.push(Ae.endX),b.push(Ae.endY),ne=Ae.endX,E=Ae.endY,oe=ne,we=E;break;case Cr:b.push(Ae.endX),b.push(Ae.endY),ne=Ae.endX,E=Ae.endY;break;case fr:_t.Qe(ne,E,Ae.point1X,Ae.point1Y,Ae.point2X,Ae.point2Y,Ae.endX,Ae.endY,.5,b),ne=Ae.endX,E=Ae.endY;break;case Rr:_t.ep(ne,E,Ae.point1X,Ae.point1Y,Ae.endX,Ae.endY,.5,b),ne=Ae.endX,E=Ae.endY;break;case pa:if(_e=Ca(Ae,re),Ee=_e.length,Ee===0){b.push(Ae.centerX),b.push(Ae.centerY),ne=Ae.centerX,E=Ae.centerY;break}for(ct=0;ct<Ee;ct++)Qe=_e[ct],_t.Qe(ne,E,Qe[2],Qe[3],Qe[4],Qe[5],Qe[6],Qe[7],.5,b),ne=Qe[6],E=Qe[7];break;case Is:if(_e=Ja(Ae,re,ne,E),Ee=_e.length,Ee===0){b.push(Ae.endX),b.push(Ae.endY),ne=Ae.endX,E=Ae.endY;break}for(ct=0;ct<Ee;ct++)Qe=_e[ct],_t.Qe(ne,E,Qe[2],Qe[3],Qe[4],Qe[5],Qe[6],Qe[7],.5,b),ne=Qe[6],E=Qe[7];break;default:Rt("Segment not of valid type: "+Ae.type)}Ae.isClosed&&(b.push(oe),b.push(we),cp(a,y,b,x))}cp(a,y,b,x)}else if(z.type===Zn.u)b.push(z.startX),b.push(z.startY),b.push(z.endX),b.push(z.startY),b.push(z.endX),b.push(z.endY),b.push(z.startX),b.push(z.endY),b.push(z.startX),b.push(z.startY),cp(a,y,b,x);else if(z.type===Zn.F){if(E=new Zr,E.startX=z.endX,E.startY=(z.startY+z.endY)/2,ne=new Mi(pa),ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(z.startX+z.endX)/2,ne.centerY=(z.startY+z.endY)/2,ne.radiusX=Math.abs(z.startX-z.endX)/2,ne.radiusY=Math.abs(z.startY-z.endY)/2,E.add(ne),z=Ca(ne,E),re=z.length,re===0)b.push(ne.centerX),b.push(ne.centerY);else for(ne=E.startX,E=E.startY,oe=0;oe<re;oe++)we=z[oe],_t.Qe(ne,E,we[2],we[3],we[4],we[5],we[6],we[7],.5,b),ne=we[6],E=we[7];cp(a,y,b,x)}Ni(b),a.restore(),a.Vc(!1)}}}},Be.kk=function(a,y,x){return!Yt.prototype.kk.call(this,a,y,x)||this.xc===null&&this.Ui===null||this.ua===null||this.pathPattern!==null||this.geometry.figures.length!==this.svg.getElementsByTagName("path").length?!1:(a.Hl=this.svg,this.hh(a,y),a.Hl=null,!0)},Be.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Yt.prototype.nk.call(this,a)},Be.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("path");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},Be.ga=function(a,y){if(y===void 0&&(y=new tt),a instanceof er){a.Mc()&&Rt("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},Be.mi=function(a){a===void 0&&(a=new Bn);var y=this.naturalBounds,x=this.oe;y=Bn.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),us(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),us(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),us(a,b.x,b.y,0,0),Bn.free(y),tt.free(b),a},Be.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!==Zn.j||y||(E+=2);var z=Bn.alloc();if(z.assign(b),z.Bc(E+2,E+2),!z.ca(a))return Bn.free(z),!1;if(b=E+1e-4,x.type===Zn.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:(Bn.free(z),_t.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===Zn.u){y=x.startX;var ne=x.startY,re=x.endX;if(x=x.endY,z.x=Math.min(y,re),z.y=Math.min(ne,x),z.width=Math.abs(re-y),z.height=Math.abs(x-ne),this.fill===null){if(z.Bc(-b,-b),z.ca(a))return Bn.free(z),!1;z.Bc(b,b)}return this.stroke!==null&&z.Bc(E,E),a=z.ca(a),Bn.free(z),a}if(x.type===Zn.F){ne=x.startX,E=x.startY,re=x.endX;var oe=x.endY;if(x=Math.min(ne,re),y=Math.min(E,oe),ne=Math.abs(re-ne)/2,E=Math.abs(oe-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 Bn.free(z),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),Bn.free(z),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===Zn.o)return Bn.free(z),this.fill===null?no(x,a.x,a.y,E):Ki(x,a,E,1<this.strokeWidth,y);Rt("Unknown Geometry type: "+x.type)},Be.Wl=function(a,y,x,b){var E=this.desiredSize,z=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var ne=this.geometry.bounds;else{var re=this.figure,oe=kv[re];if(oe===void 0){var le=_t.Ze[re];typeof le=="string"&&(le=_t.Ze[le]),typeof le=="function"?(oe=le(null,100,100),kv[re]=oe):Rt("Unsupported Figure: "+re)}ne=oe.bounds}re=ne.width,oe=ne.height,le=ne.width;var ce=ne.height;switch(yu(this,!0)){case ei:b=x=0;break;case oi:le=Math.max(a-z,0),ce=Math.max(y-z,0);break;case hr:le=Math.max(a-z,0),b=0;break;case Br:x=0,ce=Math.max(y-z,0)}isFinite(E.width)&&(le=E.width),isFinite(E.height)&&(ce=E.height);var pe=this.maxSize,we=this.minSize;switch(x=Math.max(x-z,we.width),b=Math.max(b-z,we.height),le=Math.min(pe.width,le),ce=Math.min(pe.height,ce),le=isFinite(le)?Math.max(x,le):Math.max(re,x),ce=isFinite(ce)?Math.max(b,ce):Math.max(oe,b),x=Ov(this),x){case ei:break;case oi:re=le,oe=ce;break;case rr:x=Math.min(le/re,ce/oe),isFinite(x)||(x=1),re*=x,oe*=x;break;default:Rt(x+" is not a valid geometryStretch.")}this.Rd!==null?(re===0&&(re=.001),oe===0&&(oe=.001),x=this.Rd!==null?this.Rd:this.ua,ne=x.bounds,b=re/ne.width,ne=oe/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&&_t.$(this.ua.Sk,a-z)&&_t.$(this.ua.Rk,y-z)||(this.ua=bo.makeGeometry(this,re,oe)),ne=this.ua.bounds,a===1/0||y===1/0?this.Ge(ne.x-z/2,ne.y-z/2,a===0&&re===0?0:ne.width+z,y===0&&oe===0?0:ne.height+z):this.Ge(-(z/2),-(z/2),le+z,ce+z),E.w()?(le=E.width,ce=E.height,le=Math.min(pe.width,le),ce=Math.min(pe.height,ce),le=Math.max(we.width,le),ce=Math.max(we.height,ce),this.dc.h(0,0,le,ce)):this.dc.assign(ne)};function Ov(a){var y=a.geometryStretch;return a.Rd!==null?y===uo?oi:y:y===uo?kv[a.figure].defaultStretch:y}Be.eh=function(a,y,x,b){du(this,a,y,x,b)},Be.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Be.Sj=function(a,y,x,b,E){var z=this.transform,ne=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*ne,oe=-z.m12*ne,le=-z.m21*ne,ce=z.m11*ne,pe=ne*(z.m21*z.dy-z.m22*z.dx),we=ne*(z.m12*z.dx-z.m11*z.dy);z=a*re+y*le+pe,ne=a*oe+y*ce+we,re=x*re+b*le+pe,oe=x*oe+b*ce+we,pe=this.ig/2,le=this.ua,le===null&&(this.measure(1/0,1/0),le=this.ua);var Ee=le.bounds;if(ce=!1,le.type===Zn.j)if(1.5>=this.strokeWidth)ce=_t.Ve(le.startX,le.startY,le.endX,le.endY,z,ne,re,oe,E);else{if(le.startX===le.endX?(b=pe,ce=0):(y=(le.endY-le.startY)/(le.endX-le.startX),ce=pe/Math.sqrt(1+y*y),b=ce*y),y=Si(),a=new tt,_t.Ve(le.startX+b,le.startY+ce,le.endX+b,le.endY+ce,z,ne,re,oe,a)&&y.push(a),a=new tt,_t.Ve(le.startX-b,le.startY-ce,le.endX-b,le.endY-ce,z,ne,re,oe,a)&&y.push(a),a=new tt,_t.Ve(le.startX+b,le.startY+ce,le.startX-b,le.startY-ce,z,ne,re,oe,a)&&y.push(a),a=new tt,_t.Ve(le.endX+b,le.endY+ce,le.endX-b,le.endY-ce,z,ne,re,oe,a)&&y.push(a),re=y.length,re===0)return Ni(y),!1;for(ce=!0,oe=1/0,b=0;b<re;b++)a=y[b],x=(a.x-z)*(a.x-z)+(a.y-ne)*(a.y-ne),x<oe&&(oe=x,E.x=a.x,E.y=a.y);Ni(y)}else if(le.type===Zn.u)ce=_t.Ff(Ee.x-pe,Ee.y-pe,Ee.x+Ee.width+pe,Ee.y+Ee.height+pe,z,ne,re,oe,E);else if(le.type===Zn.F){y=Bn.allocAt(Ee.x,Ee.y,Ee.width,Ee.height).Bc(pe,pe);e:if(y.width===0)ce=_t.Ve(y.x,y.y,y.x,y.y+y.height,z,ne,re,oe,E);else if(y.height===0)ce=_t.Ve(y.x,y.y,y.x+y.width,y.y,z,ne,re,oe,E);else{if(a=y.width/2,le=y.height/2,b=y.x+a,ce=y.y+le,x=9999,z!==re&&(x=(ne-oe)/(z-re)),9999>Math.abs(x)){if(oe=ne-ce-x*(z-b),0>a*a*x*x+le*le-oe*oe){E.x=NaN,E.y=NaN,ce=!1;break e}pe=Math.sqrt(a*a*x*x+le*le-oe*oe),re=(-(a*a*x*oe)+a*le*pe)/(le*le+a*a*x*x)+b,a=(-(a*a*x*oe)-a*le*pe)/(le*le+a*a*x*x)+b,le=x*(re-b)+oe+ce,oe=x*(a-b)+oe+ce,Math.abs((z-re)*(z-re))+Math.abs((ne-le)*(ne-le))<Math.abs((z-a)*(z-a))+Math.abs((ne-oe)*(ne-oe))?(E.x=re,E.y=le):(E.x=a,E.y=oe)}else{if(re=le*le,oe=z-b,re-=re/(a*a)*oe*oe,0>re){E.x=NaN,E.y=NaN,ce=!1;break e}oe=Math.sqrt(re),re=ce+oe,oe=ce-oe,Math.abs(re-ne)<Math.abs(oe-ne)?(E.x=z,E.y=re):(E.x=z,E.y=oe)}ce=!0}Bn.free(y)}else if(le.type===Zn.o){we=tt.alloc();var Ae=re-z,_e=oe-ne,ct=Ae*Ae+_e*_e,Qe=z,Pt=ne;if(0<ct&&Ee.contains(Qe,Pt)&&(we.x=Qe,we.y=Pt,this.ca(we)))for(Ae!==0&&.5>Math.abs(Ae)?(_e*=.5/Ae,Ae=.5):_e!==0&&.5>Math.abs(_e)&&(Ae*=.5/_e,_e=.5),Qe-=Ae,Pt-=_e;Ee.contains(Qe,Pt);)Qe-=Ae,Pt-=_e;for(E.x=re,E.y=oe,_e=0;_e<le.figures.count;_e++){var Et=le.figures.s[_e],Dt=Et.isFilled?Qe:z,Vt=Et.isFilled?Pt:ne,mn=Et.segments;Ee=Et.startX,Ae=Et.startY;for(var Ei=Ee,Qi=Ae,Gi=0;Gi<mn.count;Gi++){var di=mn.s[Gi],Xn=di.type,co=di.endX,Ur=di.endY,wa=!1;switch(Xn){case wo:Ei=co,Qi=Ur;break;case Cr:wa=n0(Ee,Ae,co,Ur,Dt,Vt,re,oe,we);break;case fr:wa=_t.Eo(Ee,Ae,di.point1X,di.point1Y,di.point2X,di.point2Y,co,Ur,Dt,Vt,re,oe,.6,we);break;case Rr:wa=_t.Eo(Ee,Ae,Ee+2/3*(di.point1X-Ee),Ae+2/3*(di.point1Y-Ae),co+2/3*(di.point1X-co),Ur+2/3*(di.point1Y-Ur),co,Ur,Dt,Vt,re,oe,.6,we);break;case pa:case Is:Xn=di.type===pa?Ca(di,Et):Ja(di,Et,Ee,Ae);var Ka=Xn.length;if(Ka===0){wa=n0(Ee,Ae,di.type===pa?di.centerX:di.endX,di.type===pa?di.centerY:di.endY,Dt,Vt,re,oe,we);break}for(Ur=null,co=0;co<Ka;co++){if(Ur=Xn[co],co===0&&n0(Ee,Ae,Ur[0],Ur[1],Dt,Vt,re,oe,we)){var Al=t0(Dt,Vt,we,ct,E);Al<ct&&(ct=Al,ce=!0)}_t.Eo(Ur[0],Ur[1],Ur[2],Ur[3],Ur[4],Ur[5],Ur[6],Ur[7],Dt,Vt,re,oe,.6,we)&&(Al=t0(Dt,Vt,we,ct,E),Al<ct&&(ct=Al,ce=!0))}co=Ur[6],Ur=Ur[7];break;default:Rt("Unknown Segment type: "+Xn)}Ee=co,Ae=Ur,wa&&(wa=t0(Dt,Vt,we,ct,E),wa<ct&&(ct=wa,ce=!0)),di.isClosed&&(co=Ei,Ur=Qi,n0(Ee,Ae,co,Ur,Dt,Vt,re,oe,we)&&(di=t0(Dt,Vt,we,ct,E),di<ct&&(ct=di,ce=!0)))}}z=x-a,ne=b-y,re=Math.sqrt(z*z+ne*ne),re!==0&&(z/=re,ne/=re),E.x-=z*pe,E.y-=ne*pe,tt.free(we)}else Rt("Unknown Geometry type: "+le.type);return ce?(this.transform.Ga(E),!0):!1};function t0(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 n0(a,y,x,b,E,z,ne,re,oe){if(_t.$(a,x)&&_t.$(y,b)||_t.$(E,ne)&&_t.$(z,re))return!1;var le=!1,ce=(E-ne)*(y-b)-(z-re)*(a-x);return ce===0?!1:(oe.x=((E*re-z*ne)*(a-x)-(E-ne)*(a*b-y*x))/ce,oe.y=((E*re-z*ne)*(y-b)-(z-re)*(a*b-y*x))/ce,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(oe.y>a||_t.$(oe.y,a))&&(oe.y<y||_t.$(oe.y,y))&&(le=!0)):(y=a<x?a:x,a=a<x?x:a,(oe.x>y||_t.$(oe.x,y))&&(oe.x<a||_t.$(oe.x,a))&&(le=!0)),le)}Be.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.ua;x===null&&(this.measure(1/0,1/0),x=this.ua),x=x.bounds;var b=this.strokeWidth/2,E=!1,z=tt.alloc();return z.h(x.x-b,x.y-b),a.ca(y.Ga(z))&&(z.h(x.x-b,x.bottom+b),a.ca(y.Ga(z))&&(z.h(x.right+b,x.bottom+b),a.ca(y.Ga(z))&&(z.h(x.right+b,x.y-b),a.ca(y.Ga(z))&&(E=!0)))),tt.free(z),E},Be.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=ur.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,z=a.top;a=a.bottom;var ne=tt.alloc();if(ne.h(b,z),x.Ga(ne),this.gh(ne,!0)||(ne.h(E,z),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 re=tt.alloc(),oe=tt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),re.x=E,re.y=z,re.transform(x),ne.x=b,ne.y=z,ne.transform(x),y=!1,qf(this,ne,re,oe)?y=!0:(ne.x=E,ne.y=a,ne.transform(x),qf(this,ne,re,oe)?y=!0:(re.x=b,re.y=a,re.transform(x),qf(this,ne,re,oe)?y=!0:(ne.x=b,ne.y=z,ne.transform(x),qf(this,ne,re,oe)&&(y=!0)))),tt.free(ne),ur.free(x),tt.free(re),tt.free(oe),y};function qf(a,y,x,b){if(!a.rs(y,x,b))return!1;a=y.x,y=y.y;var E=x.x,z=x.y;return x=b.x,b=b.y,a===E?(y<z?(a=y,y=z):a=z,b>=a&&b<=y):(a<E?(b=a,a=E):b=E,x>=b&&x<=a)}Be.tx=function(a,y,x){function b(ct,Qe){for(var Pt=ct.length,Et=0;Et<Pt;Et+=2)if(Qe.zd(ct[Et],ct[Et+1])>E)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var E=a.Bf(y),z=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,re=ne.x,oe=ne.y,le=ne.x+ne.width;if(ne=ne.y+ne.height,Jr(a.x,a.y,re,oe)<=E&&Jr(a.x,a.y,le,oe)<=E&&Jr(a.x,a.y,re,ne)<=E&&Jr(a.x,a.y,le,ne)<=E)return!0}if(re=y.startX,oe=y.startY,le=y.endX,ne=y.endY,y.type===Zn.j){if(x=(re-le)*(a.x-le)+(oe-ne)*(a.y-ne),Va(a.x,a.y,re,oe,le,ne)<=(0<=(le-re)*(a.x-re)+(ne-oe)*(a.y-oe)&&0<=x?E:z))return!0}else{if(y.type===Zn.u)return y=!1,x&&(y=Va(a.x,a.y,re,oe,re,ne)<=E||Va(a.x,a.y,re,oe,le,oe)<=E||Va(a.x,a.y,le,oe,le,ne)<=E||Va(a.x,a.y,re,ne,le,ne)<=E),y;if(y.type===Zn.F){y=a.x-(re+le)/2,z=a.y-(oe+ne)/2;var ce=Math.abs(le-re)/2,pe=Math.abs(ne-oe)/2;if(ce===0||pe===0)return Va(a.x,a.y,re,oe,le,ne)<=E;if(x){if(a=_t.$y(ce,pe,y,z),a*a<=E)return!0}else return!(Jr(y,z,-ce,0)>=E||Jr(y,z,0,-pe)>=E||Jr(y,z,0,pe)>=E||Jr(y,z,ce,0)>=E)}else if(y.type===Zn.o){if(le=y.bounds,z=le.x,re=le.y,oe=le.x+le.width,le=le.y+le.height,a.x>oe&&a.x<z&&a.y>le&&a.y<re&&Va(a.x,a.y,z,re,z,le)>E&&Va(a.x,a.y,z,re,oe,re)>E&&Va(a.x,a.y,oe,le,z,le)>E&&Va(a.x,a.y,oe,le,oe,re)>E)return!1;if(z=Math.sqrt(E),x){if(this.fill===null?no(y,a.x,a.y,z):Ki(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],ne=z.startX,ce=z.startY,a.zd(ne,ce)>E)return!1;for(re=z.segments.s,oe=re.length,le=0;le<oe;le++)switch(pe=re[le],pe.type){case wo:case Cr:if(ne=pe.endX,ce=pe.endY,a.zd(ne,ce)>E)return!1;break;case fr:var we=Si();if(_t.Qe(ne,ce,pe.point1X,pe.point1Y,pe.point2X,pe.point2Y,pe.endX,pe.endY,.8,we),ne=b(we,a),Ni(we),ne||(ne=pe.endX,ce=pe.endY,a.zd(ne,ce)>E))return!1;break;case Rr:if(we=Si(),_t.ep(ne,ce,pe.point1X,pe.point1Y,pe.endX,pe.endY,.8,we),ne=b(we,a),Ni(we),ne||(ne=pe.endX,ce=pe.endY,a.zd(ne,ce)>E))return!1;break;case pa:case Is:we=pe.type===pa?Ca(pe,z):Ja(pe,z,ne,ce);var Ee=we.length;if(Ee===0){if(ne=pe.type===pa?pe.centerX:pe.endX,ce=pe.type===pa?pe.centerY:pe.endY,a.zd(ne,ce)>E)return!1;break}pe=null;for(var Ae=Si(),_e=0;_e<Ee;_e++)if(pe=we[_e],Ae.length=0,_t.Qe(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5],pe[6],pe[7],.8,Ae),b(Ae,a))return Ni(Ae),!1;Ni(Ae),pe!==null&&(ne=pe[6],ce=pe[7]);break;default:Rt("Unknown Segment type: "+pe.type)}}return!0}}}return!1},Be.qc=function(){this.ua=null},Be.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=nm,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=Lr):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new er(1-Lr.x,Lr.y)))}bo.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=Qd[a.toArrow];else a.fromArrow!=="None"?b=Qd[a.fromArrow]:(b=_t.Ze[a.figure],typeof b=="string"&&(b=_t.Ze[b]),b===void 0&&Rt("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=_t.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=Qd[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Qd[x],y===void 0){var b=null,E;for(E in _t.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=Zn.parse(_t.um[b],!1),Qd[b]=a,x!==b&&(Qd[x]=b),b}}return typeof y=="string"?y:y instanceof Zn?a:null}yt.Object.defineProperties(bo.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),Se(this)&&(a=this.part,a!==null&&qa(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Zn.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&&yf(a,"Shape.fill"),a instanceof fa&&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&&yf(a,"Shape.stroke"),a instanceof fa&&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 Vn(a,"value >= 0",bo,"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"?Vn(a,'"butt", "round", or "square"',bo,"strokeCap"):(Qf(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"?Vn(a,'"miter", "bevel", or "round"',bo,"strokeJoin"):(Qf(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){Qf(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 z=a[E];0<=z&&isFinite(z)||Rt("strokeDashArray:value "+z+" at index "+E+" must be a positive number or zero."),b+=z}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&&(Qf(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=_t.Ze[a];typeof x=="function"?x=a:(x=_t.Ze[a.toLowerCase()])||Rt("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?Rt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new to),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?Rt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new to),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:Jt},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Qf(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Jt},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Qf(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&&(Qf(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:uo},set:function(a){var y=this.geometryStretch;y!==a&&(Qf(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 qd),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Qc(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 qd),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 qd),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 qd),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),bo.prototype.intersectsRect=bo.prototype.Yc,bo.prototype.containedInRect=bo.prototype.fh,bo.prototype.getNearestIntersectionPoint=bo.prototype.rs,bo.prototype.getDocumentBounds=bo.prototype.mi,bo.prototype.getDocumentPoint=bo.prototype.ga;var Qd=new qi,kv=new qi;bo.className="Shape",bo.getFigureGenerators=function(){var a=new Ti,y;for(y in _t.Ze)y!==y.toLowerCase()&&a.add(y,_t.Ze[y]);return a.freeze(),a},bo.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=_t.Ze;b[a]=y,b[x]=a},bo.getArrowheadGeometries=function(){var a=new Ti;for(b in _t.um)if(Qd[b]===void 0){var y=Zn.parse(_t.um[b],!1);Qd[b]=y,y=b.toLowerCase(),y!==b&&(Qd[y]=b)}for(var x in Qd)if(x!==x.toLowerCase()){var b=Qd[x];b instanceof Zn&&a.add(x,b)}return a.freeze(),a},bo.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Zn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Rt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=Qd;b[a]=x,b[y]=a};function Tv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=uo,this.gg=this.fg=Jt}Tv.prototype.copy=function(){var a=new Tv;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 Ya(a,y){return Yt.call(this),s0||($u=Ns?new Jl(null).context:null,s0=!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}Zt(Ya,Yt),Ya.prototype.cloneProtected=function(a){Yt.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 Dd(a){a.da===null?a.da=new Wv:a.da.nc&&(a.da=a.da.copy())}Be=Ya.prototype,Be.th=function(){Yt.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function x1(a,y){a.l=y.l|6144,a.pb=y.opacity,a.Ma=y.background,a.areaBackground=y.areaBackground,a.jd=y.desiredSize.J(),a.minSize=y.minSize.J(),a.maxSize=y.maxSize.J(),y.Lb!==null?a.Lb=y.Lb.copy():a.Lb=null,a.Ca=y.scale,a.Kb=y.angle,a.stretch=y.stretch,a.Kg=y.margin.J(),a.Jb=y.alignment.J(),a.sk=y.alignmentFocus.J(),a.segmentFraction=y.segmentFraction,a.segmentOffset=y.segmentOffset.J(),a.segmentOrientation=y.segmentOrientation,y.tb!==null&&(a.tb=y.tb.copy()),a.shadowVisible=y.shadowVisible,a.ec=y.ec,a.xc=y.xc,a.Ae=y.Ae,a.fa!==null&&(a.fa=y.fa.copy()),y.da!==null&&(a.da=y.da.nc?y.da:y.da.copy()),a.Ih=y.Ih}Be.qb=function(a){a.classType===Ya?this.wrap=a:Yt.prototype.qb.call(this,a)},Be.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Be.v=function(){Yt.prototype.v.call(this)},Be.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,z=x.height,ne=Yp(this),re=a.textAlign=this.textAlign,oe=y.tn;re==="start"?re=oe?"right":"left":re==="end"&&(re=oe?"left":"right"),oe=this.isUnderline;var le=this.isStrikethrough;Bs(this,a,this.xc,!0,!1,x,b),(oe||le)&&Bs(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var ce=this.oe,pe=ce.dx-(ne*ce.m21+ce.dx);ce=ce.dy-(ne*ce.m22+ce.dy);var we=y.scale;switch(8>(pe*pe+ce*ce)*we*we&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Fa&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,pe=this.spacingBelow,this.flip){case Yo:a.translate(E,0),a.scale(-1,1);break;case No:a.translate(0,z),a.scale(1,-1);break;case Oa:a.translate(E,z),a.scale(-1,-1)}if(a.yc(),ce=this.Gc,we=(y+ne+pe)*ce,z>we&&(b=this.verticalAlignment,b=b.y*z-b.y*we+b.offsetY),ce===1&&this.ze!==null)pe=this.Cb,pe>E&&(pe=E),this.Oj(this.ze,a,0,b+y,E,ne,pe,x,re,oe,le);else if(this.Qc!==null&&this.Qb!==null)for(we=0;we<ce;we++){var Ee=this.Qc[we];Ee>E&&(Ee=E),b+=y,this.Oj(this.Qb[we],a,0,b,E,ne,Ee,x,re,oe,le),b+=ne+pe}switch(this.flip){case Yo:a.scale(-1,1),a.translate(-E,0);break;case No:a.scale(1,-1),a.translate(0,-z);break;case Oa:a.scale(-1,-1),a.translate(-E,-z)}}},Be.Oj=function(a,y,x,b,E,z,ne,re,oe,le,ce){var pe=0;if(re)oe==="left"?pe=0:oe==="right"?pe=E-ne:oe==="center"&&(pe=(E-ne)/2),y.fillRect(x+pe,b+.25*z,ne,1);else{if(oe==="left"?pe=0:oe==="right"?pe=E:oe==="center"&&(pe=E/2),E=i0!==null?i0(this,z):.75*z,y.fillText(a,x+pe,b+E),a=z/20|0,a===0&&(a=1),oe==="right"?pe-=ne:oe==="center"&&(pe-=ne/2),le){re=r0!==null?r0(this,z):.8*z,oe=x+pe,le=b+re,E=x+pe+ne,re=b+re;var we=a;y.beginPath(),y.lineWidth=we,y.moveTo(oe,le),y.lineTo(E,re),y.stroke(),y.Se(),y instanceof Fa&&y.ad.classList.add("gojs-td")}ce&&(ce=b+z-z/2.2|0,a%2!==0&&(ce+=.5),b=x+pe,z=ce,x=x+pe+ne,ne=ce,pe=a,y.beginPath(),y.lineWidth=pe,y.moveTo(b,z),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof Fa&&y.ad.classList.add("gojs-td"))}},Be.kk=function(a,y,x){if(!Yt.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++)Gu(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Gu(a,y,!0);return!0},Be.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Yt.prototype.nk.call(this,a)},Be.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("text");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},Be.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;$u!==null&&M1!==z&&(M1=$u.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var ne;if(isNaN(this.desiredSize.width)){if(z=this.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),z.length===0)z=8;else if(this.isMultiline){for(var re=ne=0,oe=!1;!oe;){var le=z.indexOf(`
|
|
|
`,re);le===-1&&(le=z.length,oe=!0),re=z.substr(re,le-re),this.formatting===Xp&&(re=re.trim()),ne=Math.max(ne,td(re)),re=le+1}z=ne}else ne=z.indexOf(`
|
|
|
`,0),0<=ne&&(z=z.substr(0,ne)),z=td(z);z=Math.min(z,a/this.scale)}else z=this.desiredSize.width;if(this.panel!==null&&(z=Math.min(z,this.panel.maxSize.width)),ne=P1(this,z),isNaN(this.desiredSize.height)?ne=Math.min(ne,y/this.scale):ne=this.desiredSize.height,oe=ne,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===o0&&(y=this.Ae,y=this.overflow===o0?S1(y):0,le=this.spacingAbove+this.spacingBelow,le=Math.max(0,Yp(this)+le),oe=Math.min(this.maxLines-1,Math.max(Math.floor(oe/le+.01)-1,0)),!(oe+1>=this.Qb.length))){for(this.l|=16777216,le=this.Qb[oe],y=Math.max(1,a-y);td(le)>y&&1<le.length;)le=le.substr(0,le.length-1);le+=Jp,y=td(le),this.Qb[oe]=le,this.Qb=this.Qb.slice(0,oe+1),this.Qc[oe]=y,this.Qc=this.Qc.slice(0,oe+1),this.Le=this.Qb.length,this.Cb=Math.max(this.Cb,y),this.Gc=this.Le,this.Gc===1&&(this.ze=this.Qb[0])}(this.wrap===w1||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),ne=Math.max(b,ne),Es(this.dc,z,ne),this.Ge(0,0,z,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},Be.eh=function(a,y,x,b){du(this,a,y,x,b)};function Up(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 Rv(a,y,x,b){var E=a.formatting===Xp;E&&(y=y.trim());var z=0,ne=a.Ae,re=a.spacingAbove+a.spacingBelow;re=Math.max(0,Yp(a)+re);var oe=a.overflow===o0?S1(ne):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,re);else if(ne=y,a.wrap===_v){a.Le=1;var le=td(y);if(oe===0||le<=x)a.Cb=Math.max(a.Cb,le),Up(a,y,a.Cb),b!==null&&b.h(le,re);else{for(z=dp(a,ne),ne=ne.substr(z.length),y=dp(a,ne),le=td(z+y);0<y.length&&le<=x;)z+=y,ne=ne.substr(y.length),y=dp(a,ne),le=z+y,E&&(le=le.trim()),le=td(le);for(E&&(y=y.trim()),z+=y,x=Math.max(1,x-oe);td(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=Jp;var ce=td(z);a.Cb=ce,Up(a,z,ce),b!==null&&b.h(ce,re)}}else{for(oe=0,ne.length===0&&(oe=1,Up(a,ne,0));0<ne.length;){for(y=dp(a,ne),ne=ne.substr(y.length);td(y)>x;){var pe=1;for(le=td(y.substr(0,pe)),ce=0;le<=x;)pe++,ce=le,le=td(y.substr(0,pe));if(pe===1){var we=le;z=Math.max(z,le)}else we=ce,z=Math.max(z,ce);if(pe--,1>pe&&(pe=1),Up(a,y.substr(0,pe),we),oe++,y=y.substr(pe),a.Gc+oe>a.maxLines)break}for(ce=dp(a,ne),le=td(y+ce);0<ce.length&&le<=x;)y+=ce,ne=ne.substr(ce.length),ce=dp(a,ne),le=y+ce,E&&(le=le.trim()),le=td(le);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ce.length===0?(pe=le,z=Math.max(z,le)):(pe=ce=td(y),z=Math.max(z,ce)),Up(a,y,pe),oe++,a.Gc+oe>a.maxLines))break}a.Le=Math.min(a.maxLines,oe),a.Cb=Math.max(a.Cb,z),b!==null&&b.h(a.Cb,re*a.Le)}}function dp(a,y){if(a.wrap===C1)return y.substr(0,1);for(var x=y.length,b=0,E=xS;b<x&&!E.test(y.charAt(b));)b++;for(a.formatting===b1&&(x=Math.min(x,b+1));b<x&&E.test(y.charAt(b));)b++;return b>=y.length?y:y.substr(0,b)}function td(a){return $u===null?8*a.length:$u.measureText(a).width}function Yp(a){if(a.df!==null)return a.df;var y=a.Ae;if($u===null){var x=16;return a.df=x}return Hv[y]!==void 0&&5e3>E1?x=Hv[y]:(x=1.3*$u.measureText("M").width,Hv[y]=x,E1++),a.df=x}function S1(a){if($u===null)return 6;if(a0[a]!==void 0&&5e3>Zv)var y=a0[a];else y=$u.measureText(Jp).width,a0[a]=y,Zv++;return y}function P1(a,y){var x=a.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),b=a.spacingAbove+a.spacingBelow;if(b=Math.max(0,Yp(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 z=a.Gc=0,ne,re=!1;!re;){if(ne=x.indexOf(`
|
|
|
`,z),ne===-1&&(ne=x.length,re=!0),z<=ne){if(z=x.substr(z,ne-z),a.wrap!==_v){a.Le=0;var oe=ci.alloc();Rv(a,z,y,oe),E+=oe.height,ci.free(oe),a.Gc+=a.Le}else Rv(a,z,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(re=!0)}z=ne+1}return a.Lq=E}yt.Object.defineProperties(Ya.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"||(Dd(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:ei},set:function(a){var y=this.flip;y!==a&&(Dd(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:tr},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Dd(this),this.da.Yr=a,pu(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=ci.alloc();Rv(this,this.ec,999999,a);var y=a.width;ci.free(a),a=P1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Es(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:jv},set:function(a){var y=this.wrap;y!==a&&(Dd(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:zv},set:function(a){var y=this.overflow;y!==a&&(Dd(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&&yf(a,"TextBlock.stroke"),a instanceof fa&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Yp(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&&(Dd(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&&(Dd(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 qd),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 qd),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 qd),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 qd),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 qd),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&&(Dd(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&&(Dd(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&&(Dd(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&&(Dd(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Xp},set:function(a){var y=this.formatting;y!==a&&(Dd(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&&Vn(a,"> 0",Ya,"maxLines"),Dd(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 i0=null,r0=null,_v=new qt(Ya,"None",0),w1=new qt(Ya,"WrapFit",1),jv=new qt(Ya,"WrapDesiredSize",2),C1=new qt(Ya,"WrapBreakAll",3),zv=new qt(Ya,"OverflowClip",0),o0=new qt(Ya,"OverflowEllipsis",1),Xp=new qt(Ya,"FormatTrim",0),b1=new qt(Ya,"FormatNone",0),xS=/[ \u200b\u00ad]/,Hv=new qi,E1=0,a0=new qi,Zv=0,Jp="...",M1="",$u=null,s0=!1;Ya.className="TextBlock";function Wv(){this.nc=!1,this.Hd=null,this.Xf=ei,this.gq=Xp,this.Jq=1/0,this.$q=zv,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=tr,this.$r=jv}Wv.prototype.copy=function(){var a=new Wv;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},Ya.getEllipsis=function(){return Jp},Ya.setEllipsis=function(a){Jp=a,a0=new qi,Zv=0},Ya.getBaseline=function(){return i0},Ya.setBaseline=function(a){i0=a},Ya.getUnderline=function(){return r0},Ya.setUnderline=function(a){r0=a},Ya.isValidFont=function(a){if(s0||($u=Ns?new Jl(null).context:null,s0=!0),$u===null)return!0;var y=$u.font;if(a===y||a==="10px sans-serif")return!0;$u.font="10px sans-serif",$u.font=a;var x=$u.font;if(x!=="10px sans-serif")return $u.font=y,!0;$u.font="19px serif";var b=$u.font;return $u.font=a,x=$u.font,$u.font=y,x!==b},Ya.FormatNone=b1,Ya.FormatTrim=Xp,Ya.None=_v,Ya.OverflowClip=zv,Ya.OverflowEllipsis=o0,Ya.WrapBreakAll=C1,Ya.WrapDesiredSize=jv,Ya.WrapFit=w1;function qd(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}qd.prototype.copy=function(){var a=new qd;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},qd.className="GradElementSettings";function Ku(a,y){Yt.call(this),this.Eg=null,this.qo="",this.Xg=Ia,this.Nk=oi,this.Zg=this.Hd=null,this.Mk=Oo,this.Xf=ei,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 hp;Zt(Ku,Yt),Ku.prototype.cloneProtected=function(a){Yt.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},Ku.prototype.qb=function(a){a===ei||a===rr||a===zo?this.imageStretch=a:Yt.prototype.qb.call(this,a)},Ku.prototype.toString=function(){return"Picture("+this.source+")#"+Yi(this)};function fp(a){a===void 0&&(a=""),a!==""?hp[a]&&(delete hp[a],l0--):(hp=new qi,l0=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 z=y.getAttribute("src")||"",ne=E.Og.I(z);if(ne!==null)for(var re=ne.length,oe=0;oe<re;oe++)z=ne[oe],E.Xn.add(z),z.Uc=!0,E.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),z.Zg!==null&&z.Zg(z,x))}y.Bg.clear()}a.desiredSize.w()||(gt(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,z=y.getAttribute("src")||"",ne=E.Og.I(z);if(ne!==null){E=ne.length,z=Si();for(var re=0;re<E;re++)z.push(ne[re]);if(y.hn)for(re=0;re<E;re++)ne=z[re],ne.Hd!==null&&ne.Hd(ne,x);Ni(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}Ku.prototype.hA=function(){if(this.source!==""){fp(this.source);var a=this.source;this.source="",this.source=a}},Ku.prototype.redraw=function(){this.N(),this.Uc=!0},Ku.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 gd)){var E=a instanceof Fa;b=this.naturalBounds;var z=0,ne=0,re=this.qn,oe=re?+x.width:x.naturalWidth;if(re=re?+x.height:x.naturalHeight,oe===void 0&&x.videoWidth&&(oe=x.videoWidth),re===void 0&&x.videoHeight&&(re=x.videoHeight),oe=oe||b.width,re=re||b.height,oe!==0&&re!==0){var le=oe,ce=re;this.sourceRect.w()&&(z=this.Xg.x,ne=this.Xg.y,oe=this.Xg.width,re=this.Xg.height);var pe=oe,we=re,Ee=this.Nk,Ae=this.Mk;switch(Ee){case ei:if(this.sourceRect.w())break;pe>=b.width&&(z=z+Ae.offsetX+(pe*Ae.x-b.width*Ae.x)),we>=b.height&&(ne=ne+Ae.offsetY+(we*Ae.y-b.height*Ae.y)),oe=Math.min(b.width,pe),re=Math.min(b.height,we);break;case oi:pe=b.width,we=b.height;break;case rr:case zo:Ee===rr?(Ee=Math.min(b.height/we,b.width/pe),pe*=Ee,we*=Ee):Ee===zo&&(Ee=Math.max(b.height/we,b.width/pe),pe*=Ee,we*=Ee,pe>=b.width&&(z=(z+Ae.offsetX+(pe*Ae.x-b.width*Ae.x)/pe)*oe),we>=b.height&&(ne=(ne+Ae.offsetY+(we*Ae.y-b.height*Ae.y)/we)*re),oe*=1/(pe/b.width),re*=1/(we/b.height),pe=b.width,we=b.height)}Ee=this.Df()*y.scale;var _e=pe*Ee*we*Ee,ct=oe*re/_e,Qe=x.__goCache;Ee=null;var Pt=SS;if(!E){if(x.sq&&Qe!==void 0&&4<_e&&ct>Pt*Pt)for(Qe.gi===null&&(N1(Qe,4,le,ce,x),N1(Qe,16,le,ce,x)),E=Qe.gi,le=E.length,ce=0;ce<le&&E[ce].ratio*E[ce].ratio<ct;ce++)Ee=E[ce];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new Jl(null).context;try{E.drawImage(this.Eg,0,0)}catch(Et){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Et){this.vl=!0}}if(this.vl)return}}switch(E=pe<b.width?Ae.offsetX+(b.width*Ae.x-pe*Ae.x):0,Ae=we<b.height?Ae.offsetY+(b.height*Ae.y-we*Ae.y):0,this.flip){case Yo:a.translate(Math.min(b.width,pe),0),a.scale(-1,1);break;case No:a.translate(0,Math.min(b.height,we)),a.scale(1,-1);break;case Oa:a.translate(Math.min(b.width,pe),Math.min(b.height,we)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Qe!==void 0&&Ee!==null&&Ee.ratio!==1){a.save(),y=Ee.ratio;try{a.drawImage(Ee.source,z/y,ne/y,Math.min(Ee.source.width,oe/y),Math.min(Ee.source.height,re/y),E,Ae,Math.min(b.width,pe),Math.min(b.height,we)),a instanceof Fa&&(this.bt=[z/y,ne/y,Math.min(Ee.source.width,oe/y),Math.min(Ee.source.height,re/y),E,Ae,Math.min(b.width,pe),Math.min(b.height,we)])}catch(Et){this.en=!1}a.restore()}else try{a.drawImage(x,z,ne,oe,re,E,Ae,Math.min(b.width,pe),Math.min(b.height,we)),a instanceof Fa&&(this.bt=[z,ne,oe,re,E,Ae,Math.min(b.width,pe),Math.min(b.height,we)])}catch(Et){this.en=!1}switch(this.flip){case Yo:a.scale(-1,1),a.translate(-Math.min(b.width,pe),0);break;case No:a.scale(1,-1),a.translate(0,-Math.min(b.height,we));break;case Oa:a.scale(-1,-1),a.translate(-Math.min(b.width,pe),-Math.min(b.height,we))}}}}},Ku.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,z=yu(this,!0),ne=this.Eg,re=this.qn,oe=0,le=0;(re||!this.al&&ne&&ne.complete)&&(this.al=!0),ne===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(oe=re?+ne.width:ne.naturalWidth,le=re?+ne.height:ne.naturalHeight),isFinite(E.width)||z===oi||z===hr?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:ne!==null&&(a=oe)),x=0):ne!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:oe),isFinite(E.height)||z===oi||z===Br?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=le)),b=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:le),isFinite(E.width)&&(a=E.width),isFinite(E.height)&&(y=E.height),E=this.maxSize,z=this.minSize,x=Math.max(x||0,z.width),b=Math.max(b||0,z.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)),Es(this.dc,a,y),this.Ge(0,0,a,y)},Ku.prototype.eh=function(a,y,x,b){du(this,a,y,x,b)},yt.Object.defineProperties(Ku.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||Rt("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&vg(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new Kn),b!==null&&x&&vh(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()||(gt(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=hp;if(Ns){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<l0&&(fp(),x=hp),b=pn("img"),b.hn=!0,L1(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,l0++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new F1),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}}}),Ku.prototype.redraw=Ku.prototype.redraw,Ku.prototype.reloadSource=Ku.prototype.hA;var l0=0,SS=4;Ku.className="Picture",hp=new qi,Ku.clearCache=fp;function F1(){this.gi=null}function N1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var z=new Jl(null),ne=z.context,re=1/y;z.width=x/y,z.height=b/y,z.width!==0&&z.height!==0&&(y=new B1(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),ne.setTransform(re*x,0,0,re*x,0,0),ne.yc(),ne.drawImage(E,0,0),a.gi.push(y))}F1.className="PictureCacheArray";function B1(a,y){this.source=a,this.ratio=y}B1.className="PictureCacheInstance";function gp(){this.os=new Zn,this.mc=null}gp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Zn,this.mc=null};function pp(a,y,x,b,E,z){a.mc=new Zr,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=b,a.mc.isEvenOdd=z||!1,a.os.figures.add(a.mc),E!==void 0&&(a.mc.isShadowed=E)}function PS(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}gp.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new Mi(wo);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},gp.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new Mi(Cr);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function Kh(a,y,x,b,E,z,ne){var re;re===void 0&&(re=!1);var oe=new Mi(fr);oe.point1X=y,oe.point1Y=x,oe.point2X=b,oe.point2Y=E,oe.endX=z,oe.endY=ne,re&&oe.close(),a.mc.segments.add(oe)}function u0(a,y,x,b,E){var z;z===void 0&&(z=!1);var ne=new Mi(Rr);ne.point1X=y,ne.point1Y=x,ne.endX=b,ne.endY=E,z&&ne.close(),a.mc.segments.add(ne)}gp.prototype.arcTo=function(a,y,x,b,E,z,ne){z===void 0&&(z=0),ne===void 0&&(ne=!1);var re=new Mi(pa);re.startAngle=a,re.sweepAngle=y,re.centerX=x,re.centerY=b,re.radiusX=E,re.radiusY=z!==0?z:E,ne&&re.close(),this.mc.segments.add(re)};function wS(a,y,x,b,E,z,ne,re){var oe;oe===void 0&&(oe=!1),y=new Mi(Is,ne,re,y,x,b,E,z),oe&&y.close(),a.mc.segments.add(y)}function A1(a){var y=c0;return y!==null?(c0=null,y.reset(a),y):(y=new gp,y.reset(a),y)}var c0=null;gp.className="StreamGeometryContext";function mu(a,y){var x=a.toLowerCase(),b=_t.Ze;b[a]=y,b[x]=a}mu("Rectangle",function(a,y,x){a="r"+y+","+x;var b=_t.Mf[a];return b!==void 0||(b=new Zn(Zn.u),b.endX=y,b.endY=x,_t.Nf<_t.vm&&(_t.Mf[a]=b,_t.Nf++)),b}),mu("Square",function(a,y,x){a="s"+y+","+x;var b=_t.Mf[a];return b!==void 0||(b=new Zn(Zn.u),b.endX=y,b.endY=x,b.defaultStretch=rr,_t.Nf<_t.vm&&(_t.Mf[a]=b,_t.Nf++)),b}),mu("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=_t.Mf[b];if(E!==void 0)return E;var z=a*_t.wg;return E=new Zn().add(new Zr(a,0,!0).add(new Mi(Cr,y-a,0)).add(new Mi(fr,y,a,y-z,0,y,z)).add(new Mi(Cr,y,x-a)).add(new Mi(fr,y-a,x,y,x-z,y-z,x)).add(new Mi(Cr,a,x)).add(new Mi(fr,0,x-a,z,x,0,x-z)).add(new Mi(Cr,0,a)).add(new Mi(fr,a,0,0,z,z,0).close())),1<z&&(E.spot1=new er(0,0,z,z),E.spot2=new er(1,1,-z,-z)),_t.Nf<_t.vm&&(_t.Mf[b]=E,_t.Nf++),E}),mu("Border","RoundedRectangle"),mu("Ellipse",function(a,y,x){a="e"+y+","+x;var b=_t.Mf[a];return b!==void 0||(b=new Zn(Zn.F),b.endX=y,b.endY=x,b.spot1=zr,b.spot2=Sr,_t.Nf<_t.vm&&(_t.Mf[a]=b,_t.Nf++)),b}),mu("Circle",function(a,y,x){a="c"+y+","+x;var b=_t.Mf[a];return b!==void 0||(b=new Zn(Zn.F),b.endX=y,b.endY=x,b.spot1=zr,b.spot2=Sr,b.defaultStretch=rr,_t.Nf<_t.vm&&(_t.Mf[a]=b,_t.Nf++)),b}),mu("TriangleRight",function(a,y,x){return new Zn().add(new Zr(0,0).add(new Mi(Cr,y,.5*x)).add(new Mi(Cr,0,x).close())).pm(0,.25,.5,.75)}),mu("TriangleDown",function(a,y,x){return new Zn().add(new Zr(0,0).add(new Mi(Cr,y,0)).add(new Mi(Cr,.5*y,x).close())).pm(.25,0,.75,.5)}),mu("TriangleLeft",function(a,y,x){return new Zn().add(new Zr(y,x).add(new Mi(Cr,0,.5*x)).add(new Mi(Cr,y,0).close())).pm(.5,.25,1,.75)}),mu("TriangleUp",function(a,y,x){return new Zn().add(new Zr(y,x).add(new Mi(Cr,0,x)).add(new Mi(Cr,.5*y,0).close())).pm(.25,.5,.75,1)}),mu("Triangle","TriangleUp"),mu("Diamond",function(a,y,x){return new Zn().add(new Zr(.5*y,0).add(new Mi(Cr,0,.5*x)).add(new Mi(Cr,.5*y,x)).add(new Mi(Cr,y,.5*x).close())).pm(.25,.25,.75,.75)}),mu("LineH",function(a,y,x){return a=new Zn(Zn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),mu("LineV",function(a,y,x){return a=new Zn(Zn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),mu("None","Rectangle"),mu("BarH","Rectangle"),mu("BarV","Rectangle"),mu("MinusLine","LineH"),mu("PlusLine",function(a,y,x){return new Zn().add(new Zr(0,x/2,!1).add(new Mi(Cr,y,x/2)).add(new Mi(wo,y/2,0)).add(new Mi(Cr,y/2,x)))}),mu("XLine",function(a,y,x){return new Zn().add(new Zr(0,x,!1).add(new Mi(Cr,y,0)).add(new Mi(wo,0,0)).add(new Mi(Cr,y,x)))}),mu("LineRight",function(a,y,x){return new Zn().add(new Zr(.25*y,0,!1).add(new Mi(Cr,.75*y,.5*x)).add(new Mi(Cr,.25*y,x)))}),mu("LineDown",function(a,y,x){return new Zn().add(new Zr(0,.25*x,!1).add(new Mi(Cr,.5*y,.75*x)).add(new Mi(Cr,y,.25*x)))}),mu("LineLeft",function(a,y,x){return new Zn().add(new Zr(.75*y,0,!1).add(new Mi(Cr,.25*y,.5*x)).add(new Mi(Cr,.75*y,x)))}),mu("LineUp",function(a,y,x){return new Zn().add(new Zr(0,.75*x,!1).add(new Mi(Cr,.5*y,.25*x)).add(new Mi(Cr,y,.75*x)))}),_t.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 Gv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=hs,this.ir=null,this.jr="",this.lr=Jt,this.Gq="",this.Hq=Ws,this.Pq=Ra,this.Kq=$a,this.Up=null,this.Cq=127,this.zr=ls,this.yr="gray",this.Vg=4}Gv.prototype.copy=function(){var a=new Gv;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 Pr(a,y){a===void 0||a instanceof ml||typeof a=="string"?ui.call(this,a):(ui.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 Bn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Zt(Pr,ui),Pr.prototype.cloneProtected=function(a){ui.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},Be=Pr.prototype,Be.Af=function(a){ui.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Be.toString=function(){var a=Zi(this.constructor)+"#"+Yi(this);return this.data!==null&&(a+="("+sr(this.data)+")"),a};function Vu(a){a.P===null?a.P=new Gv:a.P.nc&&(a.P=a.P.copy())}Be.th=function(){ui.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Be.gk=function(a,y,x,b,E,z,ne){var re=this.diagram;re!==null&&(a===ts&&y==="elements"?E instanceof ui?Jf(E,function(oe){vy(re.partManager,oe),zh(re,oe)}):vh(re,E):a===Ms&&y==="elements"&&(E instanceof ui?Jf(E,function(oe){yy(re.partManager,oe,re)}):vg(re,E)),re.cb(a,y,x,b,E,z,ne))},Be.La=function(a){if(ui.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 ui&&Jf(E,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Pr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Pr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Pr.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 Ti),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)))}}},Pr.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)}},Pr.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Si();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Ni(y)}},Pr.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 mo?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof ga))break e;zc(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=ui.Link),x.adornedObject=y)}if(x!==null){x.type===ui.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(CS(this,a),y=this.adornments;y.next();)y.value.La()}},Pr.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function $v(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function CS(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function d0(a){if(Pf(a)===!1){Vv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function D1(a){if(a.G|=2097152,Pf(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||k1(a,y,x),x=a.Ib;var b=Bn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),Bn.free(b),Vv(a,!1)}}Pr.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new ur);var z=this.Lb;z.reset(),this.no(z,a,y,x,b),this.Lb=z,z.ws()||z.pp(E)},Pr.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Oo;this.locationSpot.sb()&&(z=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,z),y.Lb!==null&&y.Lb.Ga(ne),ne.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(ne),ne.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else ne.yi(y,x,b,E,z);a.rotate(this.Kb,ne.x,ne.y),tt.free(ne)}},Pr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Pr.prototype.moveTo=function(a,y,x){a=tt.allocAt(a,y),this.move(a,x),tt.free(a)},Pr.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())},Pr.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())},Pr.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Ti),y.I(a)!==null)return y.I(a);var x=ui.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Vh(a,y,x,b){b===void 0&&(b=new tt),x=x.Mc()?Oo: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}Pr.prototype.mi=function(a){return a===void 0&&(a=new Bn),a.assign(this.actualBounds)},Pr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function I1(a){var y=tt.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof bo?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 eg(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 z=y.width;y=y.height;var ne=a.shadowBlur;return a=a.shadowOffset,z+=ne,y+=ne,b-=ne/2,E-=ne/2,0<a.x?z+=a.x:(b+=a.x,z-=a.x),0<a.y?y+=a.y:(E+=a.y,y-=a.y),x.h(b-1,E-1,z+2,y+2),x}Pr.prototype.arrange=function(){if(Ft(this)===!1)D1(this);else{jt(this,!1);var a=this.Ib,y=Bn.alloc();y.assign(a);var x=wf(this);this.eh(0,0,this.uc.width,this.uc.height);var b=this.position;k1(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()||_t.B(y.width,a.width)&&_t.B(y.height,a.height)||0<=this.vw&&this.C(16),Bn.free(y),Vv(this,!1)}},Be=Pr.prototype,Be.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=Bn.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),Bn.free(E)}!(this.G&65536)&&a.D(y)||_1(this,b,x),x.N(),!a.w()&&!y.w()||Mo(a,y)||(this instanceof Di&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Be.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var b=this.diagram;return b!==null&&O1(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())),Pf(this)===!1&&Ft(this)===!1&&(d0(this),D1(this)),!0};function O1(a,y,x,b,E){y===null||a instanceof ga||(y=y.animationManager,y.zb&&Rc(y,a,new tt(b,E),x))}Be.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;Pf(this)||Ft(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)}d0(this)},Be.Av=function(){this.G&=-2097153,d0(this)};function k1(a,y,x){var b=I1(a),E=a.diagram,z=x.w(),ne=y.w();z&&ne?a.G&2097152?T1(a,y,x,E,b):R1(a,y,x,E,b):z?T1(a,y,x,E,b):ne&&R1(a,y,x,E,b),a.G|=2097152,tt.free(b),a.Uk()}function T1(a,y,x,b,E){var z=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 ga||Rc(x,a,new tt(z,ne),y),b||y.x===z&&y.y===ne||a.g("position",new tt(z,ne),y.copy()))}function R1(a,y,x,b,E){var z=x.copy();x.h(y.x+E.x,y.y+E.y),x.D(z)||b===null||a.g("location",z,x.copy())}function _1(a,y,x){Uv(a,!1),a instanceof Di&&xh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?wf(a)?(Ql(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Be.si=function(){return!0},Be.Zc=function(){return!0},Be.ph=function(){return!1},Be.Dd=function(){return!0};function Kv(a,y,x,b){y.constructor===a.constructor||H1||(H1=!0,Pi('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),Pi(" Old class: "+Zi(a.constructor)+", new class: "+Zi(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var z=a.isSelected,ne=a.isHighlighted,re=!0,oe=!0,le=!1;a instanceof Di&&(re=a.isTreeLeaf,oe=a.isTreeExpanded,le=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=z?a.G|4096:a.G&-4097,a.G=ne?a.G|524288:a.G&-524289,a instanceof Di&&(a.U=re?a.U|4:a.U&-5,a.U=oe?a.U|1:a.U&-2,a.U=le?a.U|2:a.U&-3),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)}Pr.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},Pr.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},Pr.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},Pr.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},Pr.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},Pr.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},Pr.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},Pr.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},Pr.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 Pf(a){return(a.G&32768)!==0}function Vv(a,y){a.G=y?a.G|32768:a.G&-32769}function Uv(a,y){a.G=y?a.G|65536:a.G&-65537}function wf(a){return(a.G&131072)!==0}Be=Pr.prototype,Be.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function h0(a,y){a.G=y?a.G|1048576:a.G&-1048577}Be.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Be.N=function(){var a=this.diagram;a!==null&&!Ft(this)&&!Pf(this)&&this.isVisible()&&this.Ib.w()&&a.N(eg(this,this.Ib))},Be.v=function(){ui.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Di&&this.labeledLink!==null&&pu(this.labeledLink),a.$b(!0))},Be.Vo=function(a){a||(a=this.Ah,a!==null&&ey(a,this))},Be.Wo=function(a){a||(a=this.Ah,a!==null&&ty(a,this))},Be.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Be.oz=function(){return Yv(this,this)};function Yv(a,y){var x=y.containingGroup;return x!==null?1+Yv(a,x):y instanceof Di&&(y=y.labeledLink,y!==null)?Yv(a,y):0}Be.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof Di&&(x=y.labeledLink,x!==null)?j1(a,x):y}Be.Td=function(a){return a instanceof mo?Xv(this,this,a):!1};function Xv(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!Xv(a,b,x)?y instanceof Di&&(y=y.labeledLink,y!==null)?Xv(a,y,x):!1:!0}Be.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof mo&&h0(y,!0),y instanceof Di){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 Di&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof mo&&h0(y,!1),y instanceof Di&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Pr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Di&&this.isLinkLabel)},Pr.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 Di&&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 Cf(a,y,x,b,E,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof ga)){if(a.add(y),y instanceof Di){if(x&&y instanceof mo)for(var ne=y.memberParts;ne.next();)Cf(a,ne.value,x,b,E,z);if(E!==!1)for(ne=y.linksConnected;ne.next();){var re=ne.value;if(!a.contains(re)){var oe=re.fromNode,le=re.toNode;oe=oe===null||a.contains(oe),le=le===null||a.contains(le),(E?oe&&le:oe||le)&&Cf(a,re,x,b,E,z)}}if(1<b)for(y=y.Ou();y.next();)Cf(a,y.value,x,b-1,E,z)}else if(y instanceof hi)for(y=y.labelNodes;y.next();)Cf(a,y.value,x,b,E,z)}}yt.Object.defineProperties(Pr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?io: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(Ms,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(ts,"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&&(Vu(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&&Sc(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 ga?this.type!==ui.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:Ra},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Vu(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:$a},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Vu(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&&(Vu(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:Ws},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),Vu(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,Ft(this)===!1&&(d0(this),x=this.pa,x.w())){var E=this.diagram;if(E===null||E.animationManager.isTicking||!E.undoManager.isUndoingRedoing){var z=x.copy();x.h(x.x+(y.x-b.x),x.y+(y.y-b.y)),O1(this,E,x,z.x,z.y),this.g("position",z,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 ga)){var z=x.model.undoManager;z.isEnabled&&!z.isUndoingRedoing&&(E=this.clone(),E.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||b===null||this instanceof ga?this instanceof ga&&(E=this.adornedPart,E!==null&&(a=E.Qf,a!==null&&a.remove(y),E.bh(this.category,this))):(z=x.model,z.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(b,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(zc(x),x=x.copy(),x!==null&&Kv(this,x,y,a))):(z!==null&&z.jm(b,a),x=hx(x.partManager,b,a),x!==null&&(zc(x),x=x.copy(),x===null||x instanceof hi||(b=this.location.copy(),Kv(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){Kv(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&&(Vu(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&&(Vu(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&&(Vu(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 hi?(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&&(Vu(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&&(Vu(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&&(Vu(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:hs},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Vu(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&&(Vu(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&&(Vu(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:Jt},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Vu(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&&Rt("Cannot make a Group a member of itself: "+this.toString()),Rt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?ty(y,this):this instanceof mo&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?ey(a,this):this instanceof mo&&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 z=E.wa(a!==null?a.data:null);E.mp(b,z)}}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 mo){for(x=new Kn,Cf(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof Di)for(b=b.linksConnected;b.next();)mp(b.value)}if(this instanceof Di){for(x=this.linksConnected;x.next();)mp(x.value);x=this.labeledLink,x!==null&&mp(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Sc(y,-1,a))}}else Rt("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&&(Vu(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Di&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Vu(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&&(Vu(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:ls},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Vu(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&&(Vu(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&&(Vu(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Pr.prototype.invalidateLayout=Pr.prototype.C,Pr.prototype.findCommonContainingGroup=Pr.prototype.px,Pr.prototype.isMemberOf=Pr.prototype.Td,Pr.prototype.findTopLevelPart=Pr.prototype.sz,Pr.prototype.findSubGraphLevel=Pr.prototype.oz,Pr.prototype.ensureBounds=Pr.prototype.Va,Pr.prototype.getDocumentBounds=Pr.prototype.mi,Pr.prototype.findObject=Pr.prototype.fb,Pr.prototype.moveTo=Pr.prototype.moveTo,Pr.prototype.invalidateAdornments=Pr.prototype.Wb,Pr.prototype.clearAdornments=Pr.prototype.Ej,Pr.prototype.removeAdornment=Pr.prototype.Jf,Pr.prototype.addAdornment=Pr.prototype.bh,Pr.prototype.findAdornment=Pr.prototype.Pj,Pr.prototype.updateTargetBindings=Pr.prototype.La;var H1=!1;Pr.className="Part",Pr.LayoutNone=0,Pr.LayoutAdded=1,Pr.LayoutRemoved=2,Pr.LayoutShown=4,Pr.LayoutHidden=8,Pr.LayoutNodeSized=16,Pr.LayoutGroupLayout=32,Pr.LayoutNodeReplaced=64,Pr.LayoutStandard=127,Pr.LayoutAll=16777215;function ga(a,y){a===void 0||a instanceof ml||typeof a=="string"?Pr.call(this,a):(Pr.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)}Zt(ga,Pr),ga.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},ga.prototype.updateRelationshipsFromData=function(){},ga.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof hi&&y instanceof bo){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 bo&&(E.ua=a)}}},ga.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Ft(a))},ga.prototype.Zc=function(){return!1},ga.prototype.gk=function(a,y,x,b,E,z,ne){if(a===ts&&y==="elements"){if(E instanceof Fu)this.$a===null&&(this.$a=E);else if(E instanceof ui){var re=E.Nl(function(oe){return oe instanceof Fu});re instanceof Fu&&this.$a===null&&(this.$a=re)}}else a===Ms&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof ui&&this.$a.rg(b)&&(this.$a=null));Pr.prototype.gk.call(this,a,y,x,b,E,z,ne)},ga.prototype.updateAdornments=function(){},ga.prototype.Lj=function(){},yt.Object.defineProperties(ga.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}}}),ga.className="Adornment";function Jv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Xs,this.er=p0,this.Kr=this.ij=this.Nq=this.Mq=null}Jv.prototype.copy=function(){var a=new Jv;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 Di(a,y){a===void 0||a instanceof ml||typeof a=="string"?Pr.call(this,a):(Pr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new $n,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Zt(Di,Pr),Di.prototype.cloneProtected=function(a){Pr.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Be=Di.prototype,Be.Af=function(a){Pr.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Uh(a){a.Ba===null?a.Ba=new Jv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Be.th=function(){Pr.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function Z1(a,y){y!==null&&(a.af===null&&(a.af=new Kn),a.af.add(y))}function W1(a,y,x,b){if(y===null||a.af===null)return null;for(var E=a.af.iterator;E.next();){var z=E.value;if(z.Ds===a&&z.cv===y&&z.Ox===x&&z.Px===b||z.Ds===y&&z.cv===a&&z.Ox===b&&z.Px===x)return z}return null}Be.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=W1(this,a,y,x),a!==null&&a.Sl()},Be.gk=function(a,y,x,b,E,z,ne){a===ts&&y==="elements"?this.wc=null:a===Ms&&y==="elements"&&(this.wc=null),Pr.prototype.gk.call(this,a,y,x,b,E,z,ne)},Be.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(gc(x.fromPort),gc(x.toPort),x.bb())}};function G1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(gc(x.fromPort),gc(x.toPort),x.bb())}}function gc(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||gc(y.port)}}Be.si=function(){return!0},Di.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Di.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Di.prototype.isVisible=function(){if(!Pr.prototype.isVisible.call(this))return!1;var a=!0,y=Nd,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===Nd){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Vs){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===wh&&(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},Di.prototype.Zb=function(a){Pr.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)}},Di.prototype.qx=function(){var a=new Kn,y=new Kn;return $1(this,this,a,y),y.iterator};function $1(a,y,x,b){if(y!==null&&!x.has(y)){x.add(y);var E=!0,z=a.diagram;z!==null&&(E=z.isTreePathToChildren),y.linksConnected.each(function(ne){ne.isTreeLink?(E?ne.fromNode===y:ne.toNode===y)&&$1(a,E?ne.toNode:ne.fromNode,x,b):b.add(ne)})}}Di.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new jr(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},Be=Di.prototype,Be.Mo=function(a){a===void 0&&(a=null);var y=new jr(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},Be.Sd=function(a){a===void 0&&(a=null);var y=new jr(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},Be.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 Kn,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 Kn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Kr(x):io},Be.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 Kn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Kr(x):io},Be.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 Kn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new Kr(x):io},Be.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new jr(this.jb),E=this;return b.predicate=function(z){return!((z.fromNode!==E||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)&&(z.fromNode!==a||z.toNode!==E||x!==null&&z.fromPortId!==x||y!==null&&z.toPortId!==y))},b},Be.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new jr(this.jb),E=this;return b.predicate=function(z){return!(z.fromNode!==E||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)},b};function f0(a,y,x){gc(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 z=!0,ne=a.diagram;ne!==null&&(z=ne.aa,ne.aa=!0),E(a,y,x),ne!==null&&(ne.aa=z)}}!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,z=b?x:y,E.ci||(E.ci=z),!z.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(b?x===z&&(z.isTreeLeaf=!1):y===z&&(z.isTreeLeaf=!1))))}function g0(a,y,x){gc(x);var b=a.jb.remove(y),E=null;if(b||y.toNode===y.fromNode){var z=a.linkDisconnected;if(E=a.diagram,z!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),z(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)):Qp(y)))}function Qp(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}}}Di.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Be=Di.prototype,Be.Vo=function(a){Pr.prototype.Vo.call(this,a),a||(Qp(this),a=this.Yk,a!==null&&ex(a,this))},Be.Wo=function(a){Pr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Be.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var b=x.value;y?a.remove(b):(b.fromNode===this&&(b.fromNode=null),b.toNode===this&&(b.toNode=null))}}this.labeledLink=null,Pr.prototype.Lj.call(this)},Be.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 Ti: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 Qv(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=Si()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Ni(x)}}}Be.Nz=function(a){if(a===null||a===this)return!1;var y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this,y)for(;x!==a;){y=null;for(var 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},Be.xz=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this,a)for(;;){a=null;for(var x=y.jb.iterator;x.next();){var 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}},Be.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)h0(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;)h0(y,!1),y=y.pg();return x},Be.kh=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this.jb.iterator,a){for(;y.next();)if(a=y.value,a.isTreeLink&&a.fromNode!==this)return a}else for(;y.next();)if(a=y.value,a.isTreeLink&&a.toNode!==this)return a;return null},Be.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Di)return a;a=this.diagram,a=a!==null?a.isTreePathToChildren:!0;for(var y=this.jb.iterator;y.next();){var x=y.value;if(x.isTreeLink&&(x=a?x.fromNode:x.toNode,x!==this))return this.ci=x}return this.ci=null},Be.vz=function(){function a(x,b){b.add(x);var E=x.kh();E!==null&&(b.add(E),x=x.pg(),x!==null&&a(x,b))}var y=new Kn;return a(this,y),y},Be.uz=function(){return U1(this,this)};function U1(a,y){return y=y.pg(),y===null?0:1+U1(a,y)}Be.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new jr(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},Be.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 $n,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 $n,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Kr(x):io},Be.wz=function(a){a===void 0&&(a=1/0);var y=new Kn;return Cf(y,this,!1,a,!0),y},Di.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 Kn;x.add(this),Y1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Nd),y.Ue=!1}};function Y1(a,y,x,b,E,z,ne){if(1<b)for(var re=x?a.Mo():a.Sd();re.next();){var oe=re.value;oe.isTreeLink&&(oe=oe.To(a),oe===null||oe===a||y.contains(oe)||(y.add(oe),Y1(oe,y,x,b-1,E,z,ne)))}else X1(a,y,x,E,z,ne)}function X1(a,y,x,b,E,z){for(var ne=E===a?!0:a.isTreeExpanded,re=x?a.Mo():a.Sd(),oe={};re.next();){var le=re.value;if(le.isTreeLink&&(le=le.To(a),le!==null&&le!==a)){var ce=y.contains(le);if(ce||y.add(le),ne){var pe=x?le.Oo():le.Po();oe.uv=a,pe.all(function(we){return function(Ee){return Ee===we.uv||!Ee.isTreeExpanded}}(oe))&&b.Aj(le,E),le.oh(),le.Zb(!1)}le.isTreeExpanded&&(le.wasTreeExpanded=le.isTreeExpanded,ce||X1(le,y,x,b,E,z))}oe={uv:oe.uv}}a.isTreeExpanded=!1}Di.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 Kn;x.add(this),J1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Nd),y.Ue=!1}};function J1(a,y,x,b,E,z,ne){for(var re=z===a?!1:a.isTreeExpanded,oe=x?a.Mo():a.Sd(),le={};oe.next();){var ce=oe.value;if(ce.isTreeLink&&(re||ce.fd||ce.bb(),ce=ce.To(a),ce!==null&&ce!==a&&!y.contains(ce))){if(y.add(ce),!re){ce.Zb(!0),ce.oh();var pe=x?ce.Oo():ce.Po();le.vv=a,pe.all(function(we){return function(Ee){return Ee===we.vv||!Ee.isTreeExpanded}}(le))&&E.Cj(ce,z)}(2<b||ce.wasTreeExpanded)&&(ce.wasTreeExpanded=!1,J1(ce,y,x,b-1,E,z,ne))}le={vv:le.vv}}a.isTreeExpanded=!0}yt.Object.defineProperties(Di.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:p0},set:function(a){var y=this.portSpreading;y!==a&&(Uh(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&&xh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Xs},set:function(a){typeof a=="number"&&(a=new or(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Uh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&xh(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&&(Uh(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&&(Uh(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&&(Uh(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,z=x.model;if(E!==null&&z.ri()){var ne=z.wa(b);ne!==void 0&&z.Qx(E,ne)}}this.containingGroup=null}this.Yk=a,a!==null&&(ex(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),pu(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&&(Uh(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))}}}),Di.prototype.expandTree=Di.prototype.expandTree,Di.prototype.collapseTree=Di.prototype.collapseTree,Di.prototype.findTreeParts=Di.prototype.wz,Di.prototype.findTreeChildrenNodes=Di.prototype.Ou,Di.prototype.findTreeChildrenLinks=Di.prototype.Qo,Di.prototype.findTreeLevel=Di.prototype.uz,Di.prototype.findTreeParentChain=Di.prototype.vz,Di.prototype.findTreeParentNode=Di.prototype.pg,Di.prototype.findTreeParentLink=Di.prototype.kh,Di.prototype.findCommonTreeParent=Di.prototype.gz,Di.prototype.findTreeRoot=Di.prototype.xz,Di.prototype.isInTreeOf=Di.prototype.Nz,Di.prototype.findPort=Di.prototype.ns,Di.prototype.findLinksTo=Di.prototype.kz,Di.prototype.findLinksBetween=Di.prototype.jz,Di.prototype.findNodesInto=Di.prototype.Oo,Di.prototype.findNodesOutOf=Di.prototype.Po,Di.prototype.findNodesConnected=Di.prototype.Mu,Di.prototype.findLinksInto=Di.prototype.Sd,Di.prototype.findLinksOutOf=Di.prototype.Mo,Di.prototype.findExternalTreeLinksConnected=Di.prototype.qx,Di.prototype.invalidateConnectedLinks=Di.prototype.Bd,Di.prototype.invalidateLinkBundle=Di.prototype.Lz;var bS=new qt(Di,"SpreadingNone",10),p0=new qt(Di,"SpreadingEvenly",11),qv=new qt(Di,"SpreadingPacked",12);Di.className="Node",Di.SpreadingNone=bS,Di.SpreadingEvenly=p0,Di.SpreadingPacked=qv;function mo(a,y){a===void 0||a instanceof ml||typeof a=="string"?Di.call(this,a):(Di.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Kn,this.$a=null,this.Sc=new ms,this.Sc.group=this,this.gl=new Kn,this.tb=this.$p=null,y&&Object.assign(this,y)}Zt(mo,Di),mo.prototype.cloneProtected=function(a){Di.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Fu});y instanceof Fu?a.$a=y:a.$a=null,this.Sc!==null?(a.Sc=this.Sc.copy(),a.Sc.group=a):(a.Sc!==null&&(a.Sc.group=null),a.Sc=null),this.tb!==null&&(a.tb=this.tb.copy())},Be=mo.prototype,Be.Af=function(a){Di.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 Di)x.Bd(y);else if(x instanceof hi)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Be.gk=function(a,y,x,b,E,z,ne){if(a===ts&&y==="elements"){if(E instanceof Fu)this.$a===null?this.$a=E:this.$a!==E&&Rt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof ui){var re=E.Nl(function(oe){return oe instanceof Fu});re instanceof Fu&&(this.$a===null?this.$a=re:this.$a!==re&&Rt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Ms&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof ui&&this.$a.rg(b)&&(this.$a=null));Di.prototype.gk.call(this,a,y,x,b,E,z,ne)},Be.Xl=function(a,y){Di.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==ui.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof ui&&(a=a.Pb()),this.tb===null&&(this.tb=new Bn),a.mi(this.tb),a instanceof bo&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Be.eh=function(a,y,x,b){this.nf=this.$a,Di.prototype.eh.call(this,a,y,x,b)},Be.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof hi||y.Va()}),Di.prototype.Va.call(this)},Be.si=function(){if(!Di.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Di){if(y.isVisible()&&Ft(y))return!1}else if(y instanceof hi&&y.isVisible()&&Ft(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function ey(a,y){if(a.Gn.add(y)){y instanceof mo&&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 hi&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function ty(a,y){if(a.Gn.remove(y)){y instanceof mo&&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 hi&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Be.Lj=function(){if(0<this.Gn.count){var a=this.diagram;if(a!==null)for(var y=this.Gn.copy().iterator;y.next();)a.remove(y.value)}Di.prototype.Lj.call(this)},mo.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=An(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},mo.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=An(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},mo.prototype.canUngroup=function(){if(!this.ungroupable)return!1;var a=this.layer;return a===null||!a.allowUngroup?!1:(a=a.diagram,!!(a===null||a.allowUngroup))},Be=mo.prototype,Be.Bd=function(a){var y=(this.U&65536)!==0;if(Di.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()?(gc(x.fromPort),gc(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(gc(x.fromPort),gc(x.toPort),x.bb()))}}},Be.Lu=function(){var a=this.diagram!==null&&this.diagram.Pw;if(a&&this.$p!==null)return this.$p.iterator;var y=this.Rj();y.add(this);for(var x=new Kn,b=y.iterator;b.next();){var E=b.value;if(E instanceof Di)for(E=E.linksConnected;E.next();){var z=E.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Be.iz=function(){var a=this.Rj();a.add(this);for(var y=new Kn,x=a.iterator;x.next();){var b=x.value;if(b instanceof Di)for(b=b.linksConnected;b.next();){var E=b.value,z=E.fromNode;z===null||a.contains(z)&&z!==this||y.add(z),E=E.toNode,E===null||a.contains(E)&&E!==this||y.add(E)}}return y.iterator},Be.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new Kn;return a(this,y),y},Be.Rj=function(){var a=new Kn;return Cf(a,this,!0,0,!0),a.remove(this),a},Be.Zb=function(a){Di.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},mo.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 z=E.value;if(z.Zb(!1),z instanceof mo&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,Q1(z,y,x,b)),z instanceof Di)z.Bd(y),x.Aj(z,b);else if(z instanceof hi)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}mo.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 z=E.value;if(z.Zb(!0),z instanceof mo&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,q1(z,y,x,b)),z instanceof Di)z.Bd(y),x.Cj(z,b);else if(z instanceof hi)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}mo.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,z=a.y;if(!(b===E||isNaN(b)&&isNaN(E))||!(x===z||isNaN(x)&&isNaN(z))){for(b=E-(isNaN(b)?0:b),x=z-(isNaN(x)?0:x),z=tt.alloc(),Di.prototype.move.call(this,a,y),a=new Kn,y=this.Rj().iterator;y.next();)E=y.value,E instanceof hi&&(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 Di&&E.isLinkLabel)){var ne=E.position,re=E.location;ne.w()?(z.x=ne.x+b,z.y=ne.y+x,E.position=z):re.w()&&(z.x=re.x+b,z.y=re.y+x,E.location=z)}for(y.reset();y.next();)E=y.value,E instanceof hi&&(E.suspendsRouting=a.contains(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(ne=E.position,z.x=ne.x+b,z.y=ne.y+x,z.w()?E.move(z):E.bb(),iy(E)&&E.bb());tt.free(z)}},yt.Object.defineProperties(mo.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&&Rt("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&&(Uh(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&&(Uh(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&&(Uh(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&&(Uh(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)}}}),mo.prototype.expandSubGraph=mo.prototype.expandSubGraph,mo.prototype.collapseSubGraph=mo.prototype.collapseSubGraph,mo.prototype.findSubGraphParts=mo.prototype.Rj,mo.prototype.findContainingGroupChain=mo.prototype.hz,mo.prototype.findExternalNodesConnected=mo.prototype.iz,mo.prototype.findExternalLinksConnected=mo.prototype.Lu,mo.prototype.ensureBounds=mo.prototype.Va,mo.className="Group";function Fu(a){Yt.call(this),this.yb=pl,this.ko=new Bn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Zt(Fu,Yt),Fu.prototype.cloneProtected=function(a){Yt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Fu.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Sa(0,0,y.width,y.height,a.x,a.y)},Fu.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof mo||a instanceof ga)||Rt("Placeholder is not inside a Group or Adornment."),a instanceof mo){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(Es(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,z=a.adornedObject;a.angle=z.li();var ne=0;z instanceof bo&&(ne=z.strokeWidth);var re=z.Df(),oe=z.naturalBounds,le=(oe.width+ne)*re;ne=(oe.height+ne)*re,a.type!==ui.Link&&(re=z.ga(a.category==="Selection"?Ws:a.locationSpot,tt.alloc()),a.location=re,tt.free(re)),isNaN(le)||isNaN(ne)?(a=z.ga(Ws,tt.alloc()),le=Bn.allocAt(a.x,a.y,0,0),le.Ye(z.ga(wl,a)),le.Ye(z.ga(fu,a)),le.Ye(z.ga(ul,a)),Es(y,le.width+b||0,le.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),tt.free(a),Bn.free(le)):(Es(y,le+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Fu.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},Fu.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof mo&&!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=Bn.alloc(),E=this.computeMemberBounds(x);var z=this.yb;return y instanceof mo&&!y.isSubGraphExpanded?a.h(E.x-z.left,E.y-z.top,0,0):a.h(E.x-z.left,E.y-z.top,Math.max(E.width+z.left+z.right,0),Math.max(E.height+z.top+z.bottom,0)),Bn.free(x),b&&y instanceof mo&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Fu.prototype.computeMemberBounds=function(a){if(!(this.part instanceof mo))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,b=1/0,E=-1/0,z=-1/0,ne=y.memberParts;ne.next();){var re=ne.value;if(re.isVisible()){if(re instanceof hi&&(!y.computesBoundsIncludingLinks||mt(re)||re.fromNode===y||re.toNode===y))continue;re=re.actualBounds,re.left<x&&(x=re.left),re.top<b&&(b=re.top),re.right>E&&(E=re.right),re.bottom>z&&(z=re.bottom)}}return isFinite(x)&&isFinite(b)?a.h(x,b,E-x,z-b):(y=y.location,a.h(y.x,y.y,0,0)),a},yt.Object.defineProperties(Fu.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new or(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Fu.className="Placeholder";function hi(a){Pr.call(this,ui.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Nu,this.Om=0,this.Qm=Nu,this.Rm=NaN,this.qj=ay,this.po=.5,this.wd=null,this.Nb=new $n().freeze(),this.Tg=this.Mg=null,this.ml=new Bn,this.ua=new Zn,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)}Zt(hi,Pr),hi.prototype.cloneProtected=function(a){Pr.prototype.cloneProtected.call(this,a),a.Qa=this.Qa&-113,a.ff=this.ff,a.gn=this.gn,a.vf=this.vf,a.uo=this.uo,a.qk=this.qk,a.Om=this.Om,a.Qm=this.Qm,a.Rm=this.Rm,a.qj=this.qj,a.po=this.po,this.ba!==null&&(a.ba=this.ba.copy())},Be=hi.prototype,Be.Af=function(a){Pr.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&&gc(y),a=a.toPort,a!==null&&gc(a)},Be.qb=function(a){a.classType===hi?(a.value&2)===2?this.routing=a:a===Ec||a===Xh||a===yp?this.curve=a:a===tm||a===P0||a===w0?this.adjusting=a:a!==ay&&a!==Nu&&Rt("Unknown Link enum value for a Link property: "+a):Pr.prototype.qb.call(this,a)},Be.Xc=function(){this.ba===null&&(this.ba=new Po)},Be.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Ft(a)||Pf(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Ft(a)||Pf(a)))},Be.zv=function(){return!1},Be.Av=function(){},Be.Zc=function(){return!1},hi.prototype.computeAngle=function(a,y,x){return hi.computeAngle(y,x)},hi.computeAngle=function(a,y){switch(a){default:case Nu:a=0;break;case nm:a=y;break;case im:a=y+90;break;case rm:a=y-90;break;case sy:a=y+180;break;case C0:a=_t.bp(y),90<a&&270>a&&(a-=180);break;case om:a=_t.bp(y+90),90<a&&270>a&&(a-=180);break;case am:a=_t.bp(y-90),90<a&&270>a&&(a-=180);break;case b0:if(a=_t.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return _t.bp(a)};function mp(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&&ty(x,a),a.Ah=y,y!==null&&ey(y,a);var E=a.containingGroupChanged;if(E!==null){var z=!0,ne=a.diagram;ne!==null&&(z=ne.aa,ne.aa=!0),E(a,x,y),ne!==null&&(ne.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=b}Be=hi.prototype,Be.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Pr.prototype.oh.call(this)},Be.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Be.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function ex(a,y){a.wd===null&&(a.wd=new Kn),a.wd.add(y),a.v()}Be.Vo=function(a){if(Pr.prototype.Vo.call(this,a),tg(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,f0(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||f0(x,this,b)}qp(this)}},Be.Wo=function(a){if(Pr.prototype.Wo.call(this,a),tg(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,g0(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||g0(x,this,b)}em(this)}},Be.Lj=function(){if(this.fd=!0,this.wd!==null){var a=this.diagram;if(a!==null)for(var y=this.wd.copy().iterator;y.next();)a.remove(y.value)}this.data!==null&&(a=this.diagram,a!==null&&a.partManager.removeDataForLink(this))},hi.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},hi.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?Pr.prototype.move.call(this,a,!1):(a=tt.allocAt(x.x+b,x.y+E),Pr.prototype.move.call(this,a,!1),tt.free(a)),Yh(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},hi.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},hi.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},hi.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Or),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()===Ec))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()===Ec){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return _t.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 z=this.i(x+2);x=this.i(x+3),_t.ax(b.x,b.y,E.x,E.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var ne=this.flattenedLengths;for(x=this.flattenedTotalLength,E=z=b=0;b<x/2&&z<y&&(E=ne[z],!(b+E>x/2));)b+=E,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-z.y)?y.x>z.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*(z.x-y.x),y.y+x*(z.y-y.y))),a},hi.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()===Ec))return this.ua.wx(.5);if(this.computeCurve()===Ec&&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),_t.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 z;E<b/2&&x<a&&(z=y[x],!(E+z>b/2));)E+=z,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)},Be=hi.prototype,Be.i=function(a){return this.Nb.s[a]},Be.dd=function(a,y){this.Nb.cd(a,y)},Be.L=function(a,y,x){this.Nb.cd(a,new tt(y,x))},Be.Kz=function(a,y){this.Nb.Gb(a,y)},Be.m=function(a,y,x){this.Nb.Gb(a,new tt(y,x))},Be.ne=function(a){this.Nb.add(a)},Be.yf=function(a,y){this.Nb.add(new tt(a,y))},Be.pv=function(a){this.Nb.mb(a)},Be.Fj=function(){this.Nb.clear()};function Yh(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 $n,z=a.Nb.iterator;z.next();){var ne=z.value;E.add(new tt(ne.x+y,ne.y+x).freeze())}E.freeze(),z=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),pu(a)),b?m0(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&Qa(ne.animationManager,a,E),a.g("points",z,E)}}Be.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Be.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,z=E.length,ne=0;ne<z;ne++){var re=E[ne];x=Math.min(re.x,x),b=Math.min(re.y,b)}re=ne=1/0;for(var oe=y.s,le=oe.length,ce=0;ce<le;ce++){var pe=oe[ce];ne=Math.min(pe.x,ne),re=Math.min(pe.y,re),pe.freeze()}if(y.freeze(),le===z){for(z=0;z<le;z++)if(ce=E[z],pe=oe[z],ce.x-x!==pe.x-ne||ce.y-b!==pe.y-re){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&Qa(x.animationManager,this,y),m0(this),this.g("points",a,y)}},Be.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function m0(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),S0(a,!1))}Be.bb=function(){if(!this.suspendsRouting){var a=this.diagram;if(a){if(a.As.contains(this)||a.undoManager.isUndoingRedoing||(a=a.animationManager,a.isTicking&&!a.isAnimating))return;this.Tg===null||a.isTicking||(this.Tg=null)}a=this.path,a!==null&&(this.fd=!1,this.v(),a.v())}},Be.vg=function(){if(!this.fd&&!this.computingPoints){var a=!0;try{this.computingPoints=!0,this.uh(),a=this.computePoints()}catch(y){this.computingPoints=!1,this.rv()}finally{this.computingPoints=!1,a?this.zf():this.rv()}}},hi.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(kg||(kg=new Di,kg.desiredSize=xa,kg.Va()),this.defaultFromPoint&&(kg.location=this.defaultFromPoint,kg.Va(),y=a=kg)):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?(Tg||(Tg=new Di,Tg.desiredSize=xa,Tg.Va()),this.defaultToPoint&&(Tg.location=this.defaultToPoint,Tg.Va(),E=b=Tg)):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 z=this.pointsCount,ne=this.computeSpot(!0,y);x=this.computeSpot(!1,E);var re=vp(ne),oe=vp(x),le=y===E&&y!==null,ce=this.isOrthogonal,pe=this.curve===Ec;this.Wf=le&&!ce?pe=!0:!1;var we=this.computeAdjusting()===Nu||le;if(!ce&&!le&&re&&oe){if(re=!1,!we&&3<=z&&(we=this.getLinkPoint(a,y,ne,!0,!1,b,E),oe=this.getLinkPoint(b,E,x,!1,!1,a,y),re=this.adjustPoints(0,we,z-1,oe))&&(we=this.getLinkPoint(a,y,ne,!0,!1,b,E),oe=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,we,z-1,oe)),!re)if(this.Fj(),pe){z=this.getLinkPoint(a,y,ne,!0,!1,b,E),we=this.getLinkPoint(b,E,x,!1,!1,a,y),re=we.x-z.x,oe=we.y-z.y,le=this.computeCurviness(),pe=ce=0;var Ee=z.x+re/3,Ae=z.y+oe/3,_e=Ee,ct=Ae;_t.B(oe,0)?ct=0<re?ct-le:ct+le:(ce=-re/oe,pe=Math.sqrt(le*le/(ce*ce+1)),0>le&&(pe=-pe),_e=(0>oe?-1:1)*pe+Ee,ct=ce*(_e-Ee)+Ae),Ee=z.x+2*re/3,Ae=z.y+2*oe/3;var Qe=Ee,Pt=Ae;_t.B(oe,0)?Pt=0<re?Pt-le:Pt+le:(Qe=(0>oe?-1:1)*pe+Ee,Pt=ce*(Qe-Ee)+Ae),this.Fj(),this.ne(z),this.yf(_e,ct),this.yf(Qe,Pt),this.ne(we),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 z=b,we=E,b=this.getLinkPoint(a,y,ne,!0,!1,z,we),E=this.getLinkPoint(z,we,x,!1,!1,a,y),this.hasCurviness()?(we=E.x-b.x,x=E.y-b.y,ne=this.computeCurviness(),a=b.x+we/2,y=b.y+x/2,z=a,re=y,_t.B(x,0)?re=0<we?re-ne:re+ne:(we=-we/x,z=Math.sqrt(ne*ne/(we*we+1)),0>ne&&(z=-z),z=(0>x?-1:1)*z+a,re=we*(z-a)+y),this.ne(b),this.yf(z,re),this.ne(E)):(this.ne(b),this.ne(E),re=Bn.alloc(),y.mi(re),oe=re.ca(E),we.mi(re),le=re.ca(b),(oe||le)&&(ne=y.ga(y0(ne),new tt),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=we.ga(y0(x),new tt),this.dd(1,this.getLinkPointFromPoint(z,we,x,b,!1,x))),Bn.free(re))}else{pe=this.isAvoiding,we&&(ce&&pe||le)&&this.Fj();var Et=le?this.computeCurviness():0;pe=this.getLinkPoint(a,y,ne,!0,ce,b,E),Ee=_e=Ae=0,(ce||!re||le)&&(ct=this.computeEndSegmentLength(a,y,ne,!0),Ee=this.getLinkDirection(a,y,pe,ne,!0,ce,b,E),le&&(re||ne.D(x)||!ce&&ne.x+x.x===1&&ne.y+x.y===1)&&(Ee-=ce?90:30,0>Et&&(Ee-=180)),0>Ee?Ee+=360:360<=Ee&&(Ee-=360),le&&(ct+=Math.abs(Et)*(ce?1:2)),Ee===0?Ae=ct:Ee===90?_e=ct:Ee===180?Ae=-ct:Ee===270?_e=-ct:(Ae=ct*Math.cos(Ee*Math.PI/180),_e=ct*Math.sin(Ee*Math.PI/180)),ne.Mc()&&le&&(ct=y.ga(Oo,tt.alloc()),Qe=tt.allocAt(ct.x+1e3*Ae,ct.y+1e3*_e),this.getLinkPointFromPoint(a,y,ct,Qe,!0,pe),tt.free(ct),tt.free(Qe))),ct=this.getLinkPoint(b,E,x,!1,ce,a,y);var Dt=Pt=Qe=0;if(ce||!oe||le){var Vt=this.computeEndSegmentLength(b,E,x,!1);Dt=this.getLinkDirection(b,E,ct,x,!1,ce,a,y),le&&(oe||ne.D(x)||!ce&&ne.x+x.x===1&&ne.y+x.y===1)&&(Dt+=ce?0:30,0>Et&&(Dt+=180)),0>Dt?Dt+=360:360<=Dt&&(Dt-=360),le&&(Vt+=Math.abs(Et)*(ce?1:2)),Dt===0?Qe=Vt:Dt===90?Pt=Vt:Dt===180?Qe=-Vt:Dt===270?Pt=-Vt:(Qe=Vt*Math.cos(Dt*Math.PI/180),Pt=Vt*Math.sin(Dt*Math.PI/180)),x.Mc()&&le&&(x=E.ga(Oo,tt.alloc()),ne=tt.allocAt(x.x+1e3*Qe,x.y+1e3*Pt),this.getLinkPointFromPoint(b,E,x,ne,!1,ct),tt.free(x),tt.free(ne))}x=pe,(ce||!re||le)&&(x=new tt(pe.x+Ae,pe.y+_e)),ne=ct,(ce||!oe||le)&&(ne=new tt(ct.x+Qe,ct.y+Pt)),!we&&!ce&&re&&3<z&&this.adjustPoints(0,pe,z-2,ne)?this.dd(z-1,ct):!we&&!ce&&oe&&3<z&&this.adjustPoints(1,x,z-1,ct)?this.dd(0,pe):!we&&(ce?6<=z:4<z)&&this.adjustPoints(1,x,z-2,ne)?(this.dd(0,pe),this.dd(z-1,ct)):(this.Fj(),this.ne(pe),(ce||!re||le)&&this.ne(x),ce&&this.addOrthoPoints(x,Ee,ne,Dt,a,b),(ce||!oe||le)&&this.ne(ne),this.ne(ct))}return!0};function ny(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}hi.prototype.getLinkPointFromPoint=function(a,y,x,b,E,z){if(z===void 0&&(z=new tt),a===null||y===null)return z.assign(x),z;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 re=-a.m12*E,oe=-a.m21*E,le=a.m11*E,ce=E*(a.m21*a.dy-a.m22*a.dx),pe=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*ne+b.y*oe+ce,b=b.x*re+b.y*le+pe,ne=x.x*ne+x.y*oe+ce,x=x.x*re+x.y*le+pe}return y.Sj(E,b,ne,x,z),a!==null&&z.transform(a),z};function v0(a,y){var x=y.Zn;return x===null&&(x=new Rg,x.port=y,x.node=y.part,y.Zn=x),lx(x,a)}hi.prototype.getLinkPoint=function(a,y,x,b,E,z,ne,re){if(re===void 0&&(re=new tt),x.sb()&&!vp(x))return y.ga(x,re),re;if(x.$c()){var oe=v0(this,y);if(oe!==null){if(re.assign(oe.Zo),E&&this.routing===nx){var le=v0(this,ne);if(le!==null&&oe.Gl<le.Gl){oe=tt.alloc(),le=tt.alloc();var ce=new Bn(y.ga(Ws,oe),y.ga(wl,le)),pe=this.computeSpot(!b,ne);a=this.getLinkPoint(z,ne,pe,!b,E,a,y,le),(x.Hf(Tn)||x.Hf(Qn))&&a.y>=ce.y&&a.y<=ce.y+ce.height?re.y=a.y:(x.Hf(kn)||x.Hf(zi))&&a.x>=ce.x&&a.x<=ce.x+ce.width&&(re.x=a.x),tt.free(oe),tt.free(le)}}return re}}return x=y.ga(y0(x),tt.alloc()),this.pointsCount>(E?6:2)?(ne=b?this.i(1):this.i(this.pointsCount-2),E&&(ne=ny(x,ne.copy()))):(oe=this.computeSpot(!b,ne),z=tt.alloc(),ne=ne.ga(y0(oe),z),E&&(ne=ny(x,ne)),tt.free(z)),this.getLinkPointFromPoint(a,y,x,ne,b,re),tt.free(x),re},hi.prototype.getLinkDirection=function(a,y,x,b,E,z,ne,re){e:if(b.sb())var oe=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()&&(oe=v0(this,y),oe!==null))switch(oe.Nc){case 1:oe=270;break e;case 2:oe=180;break e;default:case 4:oe=0;break e;case 8:oe=90;break e}oe=y.ga(Oo,tt.alloc()),this.pointsCount>(z?6:2)?(re=E?this.i(1):this.i(this.pointsCount-2),re=z?ny(oe,re.copy()):x):(x=tt.alloc(),re=re.ga(Oo,x),tt.free(x)),x=Math.abs(re.x-oe.x)>Math.abs(re.y-oe.y)?re.x>=oe.x?0:180:re.y>=oe.y?90:270,tt.free(oe),oe=x}return b.Mc()&&ne.Td(a)&&(oe+=180,360<=oe&&(oe-=360)),vp(b)||(a=y.li(),a===0)||(45<=a&&135>a?oe+=90:135<=a&&225>a?oe+=180:225<=a&&315>a&&(oe+=270),360<=oe&&(oe-=360)),oe},hi.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=v0(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)},hi.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Oo:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Jt?Ss:y)):(a=y||this.toPort,a===null?a=Oo:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Jt?Ss:y)),a};function vp(a){return a===Ss||a.x===.5&&a.y===.5}function y0(a){return a.x===.5&&a.y===.5?a:Oo}hi.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Nu&&4<this.pointsCount?this.computeMidPoint(new tt):(a=y.Zn,a=a!==null?lx(a,this):null,a!==null?a.Zo:y.ga(Oo))},hi.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},hi.prototype.Cf=function(a,y,x,b,E,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=z;if(z===void 0&&(ne=ur.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return Mv(this,y,x,E),z===void 0&&ur.free(ne),!0;if(this.Yc(a,ne)){var re=!1;if(!this.isAtomic)for(var oe=this.O.s,le=oe.length;le--;){var ce=oe[le];if(ce.visible||ce===this.locationObject){var pe=ce.actualBounds,we=this.naturalBounds;if(!(pe.x>we.width||pe.y>we.height||0>pe.x+pe.width||0>pe.y+pe.height)){if(pe=ur.alloc(),pe.set(ne),ce instanceof ui)re=ce.Cf(a,y,x,b,E,pe);else if(this.path===ce){if(ce instanceof bo)if(re=a,we=b,ce.pickable===!1)re=!1;else if(pe.multiply(ce.transform),we)e:{var Ee=re,Ae=pe;if(ce.fh(Ee,Ae))re=!0;else{if(Ae===void 0&&(Ae=ce.transform,Ee.Re(ce.actualBounds))){re=!0;break e}re=Ee.left,we=Ee.right;var _e=Ee.top;Ee=Ee.bottom;var ct=tt.alloc(),Qe=tt.alloc(),Pt=tt.alloc(),Et=ur.alloc();Et.set(Ae),Et.bv(ce.transform),Et.Vj(),Qe.x=we,Qe.y=_e,Qe.transform(Et),ct.x=re,ct.y=_e,ct.transform(Et),Ae=!1,qf(ce,ct,Qe,Pt)?Ae=!0:(ct.x=we,ct.y=Ee,ct.transform(Et),qf(ce,ct,Qe,Pt)?Ae=!0:(Qe.x=re,Qe.y=Ee,Qe.transform(Et),qf(ce,ct,Qe,Pt)?Ae=!0:(ct.x=re,ct.y=_e,ct.transform(Et),qf(ce,ct,Qe,Pt)&&(Ae=!0)))),ur.free(Et),tt.free(ct),tt.free(Qe),tt.free(Pt),re=Ae}}else re=ce.fh(re,pe)}else re=dl(ce,a,b,pe);re&&(we=ce,y!==null&&(we=y(ce)),we&&(x===null||x(we))&&E.add(we)),ur.free(pe)}}}return z===void 0&&ur.free(ne),re||this.background!==null||this.areaBackground!==null}return z===void 0&&ur.free(ne),!1},hi.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?Ec:this.curve},hi.prototype.computeCorner=function(){if(this.curve===Ec)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},hi.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},hi.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=rx;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,z=b.margin,ne=isNaN(E.width)?30:E.width*b.scale+z.left+z.right;E=isNaN(E.height)?14:E.height*b.scale+z.top+z.bottom,b=b.segmentOrientation,b===nm||b===C0||b===sy?a=Math.max(a,E):b===rm||b===am||b===im||b===om?a=Math.max(a,ne):(y=y.ga(Oo).ab(x.ga(Oo))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*E)+1)),this.curve===Ec&&(a*=1.333)}}return a},hi.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Nu&&x.bb()}},hi.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=ix;var y=this.Sf;if(y!==null){for(var x=Si(),b=0,E=y.links,z=0;z<E.length;z++){var ne=E[z].computeSpacing();x.push(ne),b+=ne}for(b=-b/2,z=0;z<E.length;z++){if(E[z]===this){a=b+x[z]/2;break}b+=x[z]}y.Ds===this.fromNode&&(a=-a),Ni(x)}}return a},hi.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},hi.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},hi.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===P0)return!1;E===w0&&(E=tm)}switch(E){case P0:var z=this.i(a),ne=this.i(x);if(!z.Xa(y)||!ne.Xa(b)){E=z.x,z=z.y;var re=ne.x-E,oe=ne.y-z,le=Math.sqrt(re*re+oe*oe);if(!_t.$(le,0)){if(_t.$(re,0))var ce=0>oe?-Math.PI/2:Math.PI/2;else ce=Math.atan(oe/Math.abs(re)),0>re&&(ce=Math.PI-ce);ne=y.x;var pe=y.y;re=b.x-ne;var we=b.y-pe;for(oe=Math.sqrt(re*re+we*we),_t.$(re,0)?we=0>we?-Math.PI/2:Math.PI/2:(we=Math.atan(we/Math.abs(re)),0>re&&(we=Math.PI-we)),le=oe/le,ce=we-ce,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),re=y.x-E,oe=y.y-z,y=Math.sqrt(re*re+oe*oe),_t.$(y,0)||(_t.$(re,0)?oe=0>oe?-Math.PI/2:Math.PI/2:(oe=Math.atan(oe/Math.abs(re)),0>re&&(oe=Math.PI-oe)),re=oe+ce,y*=le,this.L(a,ne+y*Math.cos(re),pe+y*Math.sin(re)));this.dd(x,b)}}return!0;case w0:if(z=this.i(a),pe=this.i(x),!z.Xa(y)||!pe.Xa(b)){E=z.x,z=z.y,ne=pe.x,pe=pe.y,le=(ne-E)*(ne-E)+(pe-z)*(pe-z),re=y.x,ce=y.y,oe=b.x,we=b.y;var Ee=1;if(oe-re!==0){var Ae=(we-ce)/(oe-re);Ee=Math.sqrt(1+1/(Ae*Ae))}else Ae=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var _e=y.x,ct=y.y,Qe=.5;le!==0&&(Qe=((E-_e)*(E-ne)+(z-ct)*(z-pe))/le);var Pt=E+Qe*(ne-E),Et=z+Qe*(pe-z);y=Math.sqrt((_e-Pt)*(_e-Pt)+(ct-Et)*(ct-Et)),ct<Ae*(_e-Pt)+Et&&(y=-y),0<Ae&&(y=-y),_e=re+Qe*(oe-re),Qe=ce+Qe*(we-ce),Ae!==0?(y=_e+y/Ee,this.L(a,y,Qe-(y-_e)/Ae)):this.L(a,_e,Qe+y)}this.dd(x,b)}return!0;case tm:e:{if(this.isOrthogonal&&(E=this.i(a),z=this.i(a+1),ne=this.i(a+2),re=z.x,ce=z.y,pe=re,le=ce,_t.B(E.y,z.y)?_t.B(z.x,ne.x)?ce=y.y:_t.B(z.y,ne.y)&&(re=y.x):_t.B(E.x,z.x)&&(_t.B(z.y,ne.y)?re=y.x:_t.B(z.x,ne.x)&&(ce=y.y)),this.L(a+1,re,ce),E=this.i(x),z=this.i(x-1),ne=this.i(x-2),re=z.x,ce=z.y,oe=re,we=ce,_t.B(E.y,z.y)?_t.B(z.x,ne.x)?ce=b.y:_t.B(z.y,ne.y)&&(re=b.x):_t.B(E.x,z.x)&&(_t.B(z.y,ne.y)?re=b.x:_t.B(z.x,ne.x)&&(ce=b.y)),this.L(x-1,re,ce),iy(this))){this.L(a+1,pe,le),this.L(x-1,oe,we),x=!1;break e}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},hi.prototype.addOrthoPoints=function(a,y,x,b,E,z){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 re=E.actualBounds.copy(),oe=z.actualBounds.copy();if(re.w()&&oe.w()){re.Bc(sm,sm),oe.Bc(sm,sm),re.Ye(a),oe.Ye(x);var le=tt.alloc(),ce=tt.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&oe.right>a.x||b===90&&x.y>a.y&&oe.right>a.x?(le.h(x.x,a.y),ce.h(x.x,(a.y+x.y)/2),b===180?(le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ce.x=le.x,ce.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(le.x=a.x<oe.left?this.computeMidOrthoPosition(a.x,a.y,oe.left,x.y,!1):a.x<oe.right&&(b===270&&a.y<oe.top||b===90&&a.y>oe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):oe.right,ce.x=le.x,ce.y=x.y):b===0&&a.x<oe.left&&a.y>oe.top&&a.y<oe.bottom&&(le.x=a.x,le.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),ce.y=le.y)):(le.h(a.x,x.y),ce.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<re.top||b===270&&x.y>re.bottom)&&(b===180&&(oe.ca(a)||re.ca(x))?le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?le.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(b===180||b===270)&&(le.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),ce.x=x.x,ce.y=le.y),le.y>re.top&&le.y<re.bottom&&(x.x>=re.left&&x.x<=a.x||a.x<=oe.right&&a.x>=x.x?(b===90||b===270)&&(le.h(Math.max((a.x+x.x)/2,a.x),a.y),ce.h(le.x,x.y)):(le.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?re.top:Math.min(re.top,oe.top)):Math.max(x.y,b===0?re.bottom:Math.max(re.bottom,oe.bottom)),ce.x=x.x,ce.y=le.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&oe.left<a.x||b===90&&x.y>a.y&&oe.left<a.x?(le.h(x.x,a.y),ce.h(x.x,(a.y+x.y)/2),b===0?(le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ce.x=le.x,ce.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(le.x=a.x>oe.right?this.computeMidOrthoPosition(a.x,a.y,oe.right,x.y,!1):a.x>oe.left&&(b===270&&a.y<oe.top||b===90&&a.y>oe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):oe.left,ce.x=le.x,ce.y=x.y):b===180&&a.x>oe.right&&a.y>oe.top&&a.y<oe.bottom&&(le.x=a.x,le.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),ce.y=le.y)):(le.h(a.x,x.y),ce.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<re.top||b===270&&x.y>re.bottom)&&(b===0&&(oe.ca(a)||re.ca(x))?le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?le.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(b===0||b===270)&&(le.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),ce.x=x.x,ce.y=le.y),le.y>re.top&&le.y<re.bottom&&(x.x<=re.right&&x.x>=a.x||a.x>=oe.left&&a.x<=x.x?(b===90||b===270)&&(le.h(Math.min((a.x+x.x)/2,a.x),a.y),ce.h(le.x,x.y)):(le.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?re.top:Math.min(re.top,oe.top)):Math.max(x.y,b===180?re.bottom:Math.max(re.bottom,oe.bottom)),ce.x=x.x,ce.y=le.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&oe.bottom>a.y||b===0&&x.x>a.x&&oe.bottom>a.y?(le.h(a.x,x.y),ce.h((a.x+x.x)/2,x.y),b===270?(le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ce.x=x.x,ce.y=le.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(le.y=a.y<oe.top?this.computeMidOrthoPosition(a.x,a.y,x.x,oe.top,!0):a.y<oe.bottom&&(b===180&&a.x<oe.left||b===0&&a.x>oe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):oe.bottom,ce.x=x.x,ce.y=le.y):b===90&&a.y<oe.top&&a.x>oe.left&&a.x<oe.right&&(le.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),le.y=a.y,ce.x=le.x)):(le.h(x.x,a.y),ce.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<re.left||b===180&&x.x>re.right)&&(b===270&&(oe.ca(a)||re.ca(x))?le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?le.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(le.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),ce.x=le.x,ce.y=x.y),le.x>re.left&&le.x<re.right&&(x.y>=re.top&&x.y<=a.y||a.y<=oe.bottom&&a.y>=x.y?(b===0||b===180)&&(le.h(a.x,Math.max((a.y+x.y)/2,a.y)),ce.h(x.x,le.y)):(le.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?re.left:Math.min(re.left,oe.left)):Math.max(x.x,b===90?re.right:Math.max(re.right,oe.right)),ce.x=le.x,ce.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&oe.top<a.y||b===0&&x.x>a.x&&oe.top<a.y?(le.h(a.x,x.y),ce.h((a.x+x.x)/2,x.y),b===90?(le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ce.x=x.x,ce.y=le.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(le.y=a.y>oe.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,oe.bottom,!0):a.y>oe.top&&(b===180&&a.x<oe.left||b===0&&a.x>oe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):oe.top,ce.x=x.x,ce.y=le.y):b===270&&a.y>oe.bottom&&a.x>oe.left&&a.x<oe.right&&(le.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),le.y=a.y,ce.x=le.x)):(le.h(x.x,a.y),ce.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<re.left||b===180&&x.x>re.right)&&(b===90&&(oe.ca(a)||re.ca(x))?le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?le.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(le.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),ce.x=le.x,ce.y=x.y),le.x>re.left&&le.x<re.right&&(x.y<=re.bottom&&x.y>=a.y||a.y>=oe.top&&a.y<=x.y?(b===0||b===180)&&(le.h(a.x,Math.min((a.y+x.y)/2,a.y)),ce.h(x.x,le.y)):(le.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?re.left:Math.min(re.left,oe.left)):Math.max(x.x,b===270?re.right:Math.max(re.right,oe.right)),ce.x=le.x,ce.y=x.y)));var pe=x;if(this.isAvoiding){var we=this.diagram;if(we===null||E===z||this.layer.isTemporary||!Kf(we)||re.ca(pe)&&!z.Td(E)||oe.ca(a)&&!E.Td(z))y=!1;else{var Ee=gf(we,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Ee.Yj(Math.min(a.x,le.x),Math.min(a.y,le.y),Math.abs(a.x-le.x),Math.abs(a.y-le.y))&&Ee.Yj(Math.min(le.x,ce.x),Math.min(le.y,ce.y),Math.abs(le.x-ce.x),Math.abs(le.y-ce.y))&&Ee.Yj(Math.min(ce.x,pe.x),Math.min(ce.y,pe.y),Math.abs(ce.x-pe.x),Math.abs(ce.y-pe.y)))y=!1;else{E=a,z=pe;var Ae=x=null;if(we.isVirtualized){we=Ee.bounds.copy(),we.Bc(-Ee.Ho,-Ee.Go);var _e=tt.alloc();xp(Ee,a.x,a.y)||(_t.Ff(we.x,we.y,we.x+we.width,we.y+we.height,a.x,a.y,le.x,le.y,_e)?(x=a=_e.copy(),y=_e.ab(le)):_t.Ff(we.x,we.y,we.x+we.width,we.y+we.height,le.x,le.y,ce.x,ce.y,_e)?(x=a=_e.copy(),y=_e.ab(ce)):_t.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ce.x,ce.y,pe.x,pe.y,_e)&&(x=a=_e.copy(),y=_e.ab(pe))),xp(Ee,pe.x,pe.y)||(_t.Ff(we.x,we.y,we.x+we.width,we.y+we.height,pe.x,pe.y,ce.x,ce.y,_e)?(Ae=pe=_e.copy(),b=ce.ab(_e)):_t.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ce.x,ce.y,le.x,le.y,_e)?(Ae=pe=_e.copy(),b=le.ab(_e)):_t.Ff(we.x,we.y,we.x+we.width,we.y+we.height,le.x,le.y,a.x,a.y,_e)&&(Ae=pe=_e.copy(),b=a.ab(_e))),tt.free(_e)}re=re.copy().ed(oe),re.Bc(Ee.Ho*Ee.Os,Ee.Go*Ee.Os),ax(Ee,a,y,pe,b,re,!0),oe=eh(Ee,pe.x,pe.y),!Ee.abort&&oe>=Sp&&(ox(Ee),re.Bc(Ee.Ho*Ee.Hx,Ee.Go*Ee.Ix),ax(Ee,a,y,pe,b,re,!1),oe=eh(Ee,pe.x,pe.y)),!Ee.abort&&oe<Sp&&eh(Ee,pe.x,pe.y)!==Jh?(ry(this,Ee,pe.x,pe.y,b,!0,ne),re=this.i(2),4>this.pointsCount?(y===0||y===180?(re.x=a.x,re.y=pe.y):(re.x=pe.x,re.y=a.y),this.L(2,re.x,re.y),this.m(3,re.x,re.y)):(ne=this.i(3),y===0||y===180?_t.B(re.x,ne.x)?(re=y===0?Math.max(re.x,a.x):Math.min(re.x,a.x),this.L(2,re,a.y),this.L(3,re,ne.y)):_t.B(re.y,ne.y)?(Math.abs(a.y-re.y)<=Ee.Go/2&&(this.L(2,re.x,a.y),this.L(3,ne.x,a.y)),this.m(2,re.x,a.y)):this.L(2,a.x,re.y):(y===90||y===270)&&(_t.B(re.y,ne.y)?(re=y===90?Math.max(re.y,a.y):Math.min(re.y,a.y),this.L(2,a.x,re),this.L(3,ne.x,re)):_t.B(re.x,ne.x)?(Math.abs(a.x-re.x)<=Ee.Ho/2&&(this.L(2,a.x,re.y),this.L(3,a.x,ne.y)),this.m(2,a.x,re.y)):this.L(2,re.x,a.y))),x!==null&&(a=this.i(1),ne=this.i(2),a.x!==ne.x&&a.y!==ne.y?y===0||y===180?this.m(2,a.x,ne.y):this.m(2,ne.x,a.y):y===0||y===180?this.m(2,E.x,x.y):this.m(2,x.x,E.y)),Ae!==null&&(b===0||b===180?this.yf(z.x,Ae.y):this.yf(Ae.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(le.copy()),this.ne(ce.copy())),tt.free(le),tt.free(ce)}},hi.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),E?(y+b)/2+z:(a+x)/2+z};function iy(a){if(a.diagram===null||!a.isAvoiding||!Kf(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=gf(a.diagram,!0,a.containingGroup,null);for(var b=1;b<x-2;b++){var E=y[b],z=y[b+1];if(!a.Yj(Math.min(E.x,z.x),Math.min(E.y,z.y),Math.abs(E.x-z.x),Math.abs(E.y-z.y)))return!0}return!1}function ry(a,y,x,b,E,z,ne){var re=y.Ho,oe=y.Go,le=eh(y,x,b),ce=x,pe=b;for(E===0?ce+=re:E===90?pe+=oe:E===180?ce-=re:pe-=oe,E!==ne&&le>ng&&eh(y,ce,pe)!==le-1&&(eh(y,x-re,b)===le-1?(E=180,ce=x-re,pe=b):eh(y,x+re,b)===le-1?(E=0,ce=x+re,pe=b):eh(y,x,b-oe)===le-1?(E=270,ce=x,pe=b-oe):eh(y,x,b+oe)===le-1&&(E=90,ce=x,pe=b+oe));le>ng&&eh(y,ce,pe)===le-1;)x=ce,b=pe,E===0?ce+=re:E===90?pe+=oe:E===180?ce-=re:pe-=oe,--le;z?le>ng&&(E===180||E===0?x=Math.floor(x/re)*re+re/2:(E===90||E===270)&&(b=Math.floor(b/oe)*oe+oe/2)):(x=Math.floor(x/re)*re+re/2,b=Math.floor(b/oe)*oe+oe/2),le>ng&&(z=E,ne=x,ce=b,E===0?(z=90,ce+=oe):E===90?(z=180,ne-=re):E===180?(z=270,ce-=oe):E===270&&(z=0,ne+=re),eh(y,ne,ce)===le-1?ry(a,y,ne,ce,z,!1,z):(ne=x,ce=b,E===0?(z=270,ce-=oe):E===90?(z=0,ne+=re):E===180?(z=90,ce+=oe):E===270&&(z=180,ne-=re),eh(y,ne,ce)===le-1&&ry(a,y,ne,ce,z,!1,z))),a.yf(x,b)}hi.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=Va(y,a,x.x,x.y,b.x,b.y),z=0,ne=1;ne<this.pointsCount-1;ne++){x=this.i(ne+1);var re=Va(y,a,b.x,b.y,x.x,x.y);b=x,re<E&&(z=ne,E=re)}return z},hi.prototype.qc=function(){this.lk=!1,this.v()},hi.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 bo&&(E.ua=this.ua)}}},hi.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&tg(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(),z=E.copy();b=this.Nb.s;var ne=this.computeCurve();if(ne===Ec&&3<=y&&!_t.$(this.smoothness,0))if(y===3){var re=this.i(1);b=Math.min(E.x,re.x);var oe=Math.min(E.y,re.y);re=this.i(2),b=Math.min(b,re.x),oe=Math.min(oe,re.y)}else{if(this.isOrthogonal)for(oe=0;oe<y;oe++)re=b[oe],z.x=Math.min(re.x,z.x),z.y=Math.min(re.y,z.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),oe=this.i(b),z.x=Math.min(oe.x,z.x),z.y=Math.min(oe.y,z.y);b=z.x,oe=z.y}else{for(oe=0;oe<y;oe++)re=b[oe],z.x=Math.min(re.x,z.x),z.y=Math.min(re.y,z.y);b=z.x,oe=z.y}if(b-=this.su.x,oe-=this.su.y,E.x-=b,E.y-=oe,y!==2||tg(this)){if(a.type=Zn.o,re=A1(a),this.computeShortLength(!0)!==0&&(E=Ig(this,E,!0,z)),pp(re,E.x,E.y,!1),ne===Ec&&3<=y&&!_t.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-oe,E=this.i(2).copy(),E.x-=b,E.y-=oe,this.computeShortLength(!1)!==0&&(E=Ig(this,E,!1,z)),Kh(re,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=tt.allocAt(b,oe),x=tt.alloc(),x.assign(this.i(1)),z=tt.allocAt(b,oe),E=tt.allocAt(b,oe),ne=this.i(0);for(var le,ce=this.smoothness/3,pe=1;pe<this.pointsCount-1;pe++){le=this.i(pe);var we=ne,Ee=le,Ae=this.i(oy(this,le,pe,!1));if((!_t.$(we.x,Ee.x)||!_t.$(Ee.x,Ae.x))&&(!_t.$(we.y,Ee.y)||!_t.$(Ee.y,Ae.y))){var _e=ce;isNaN(_e)&&(_e=this.smoothness/3);var ct=we.x;we=we.y;var Qe=Ee.x;Ee=Ee.y;var Pt=Ae.x;Ae=Ae.y;var Et=_e*x0(ct,we,Qe,Ee);_e*=x0(Qe,Ee,Pt,Ae),_t.$(we,Ee)&&_t.$(Qe,Pt)&&(Qe>ct?Ae>Ee?(z.x=Qe-Et,z.y=Ee-Et,E.x=Qe+_e,E.y=Ee+_e):(z.x=Qe-Et,z.y=Ee+Et,E.x=Qe+_e,E.y=Ee-_e):Ae>Ee?(z.x=Qe+Et,z.y=Ee-Et,E.x=Qe-_e,E.y=Ee+_e):(z.x=Qe+Et,z.y=Ee+Et,E.x=Qe-_e,E.y=Ee-_e)),_t.$(ct,Qe)&&_t.$(Ee,Ae)&&(Ee>we?(Pt>Qe?(z.x=Qe-Et,z.y=Ee-Et,E.x=Qe+_e):(z.x=Qe+Et,z.y=Ee-Et,E.x=Qe-_e),E.y=Ee+_e):(Pt>Qe?(z.x=Qe-Et,z.y=Ee+Et,E.x=Qe+_e):(z.x=Qe+Et,z.y=Ee+Et,E.x=Qe-_e),E.y=Ee-_e)),(_t.$(ct,Qe)&&_t.$(Qe,Pt)||_t.$(we,Ee)&&_t.$(Ee,Ae))&&(ct=.5*(ct+Pt),we=.5*(we+Ae),z.x=ct,z.y=we,E.x=ct,E.y=we),(pe===1||pe===2&&_t.$(ne.x,this.i(0).x)&&_t.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+le.x),x.y=.5*(ne.y+le.y)),Kh(re,x.x-b,x.y-oe,z.x-b,z.y-oe,le.x-b,le.y-oe),y.set(z),x.set(E),ne=le}}le=ne.x,ne=ne.y,ce=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ce=Ig(this,ce.copy(),!1,jo)),le=.5*(le+ce.x),ne=.5*(ne+ce.y),Kh(re,E.x-b,E.y-oe,le-b,ne-oe,ce.x-b,ce.y-oe),tt.free(y),tt.free(x),tt.free(z),tt.free(E)}else for(x=3;x<y;x+=3)z=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=Ig(this,ne.copy(),!1,jo)),Kh(re,z.x-b,z.y-oe,E.x-b,E.y-oe,ne.x-b,ne.y-oe);else{for(z=tt.alloc(),z.assign(this.i(0)),E=tt.alloc(),E.assign(z),ne=this.computeCorner(),pe=1,le=0;pe<y;){if(pe=oy(this,z,pe,1<pe),ce=this.i(pe),pe>=y-1){if(!z.D(ce))this.computeShortLength(!1)!==0&&(ce=Ig(this,ce.copy(),!1,jo)),Og(this,re,-b,-oe,z,ce,x);else if(le===0)for(pe=1;pe<y;)E.assign(z),ce=this.i(pe++),Og(this,re,-b,-oe,z,ce,x),z.assign(ce);break}if(le=oy(this,ce,pe+1,pe<y-3),pe=-b,ct=-oe,we=ce,Qe=this.i(le),_e=x,_t.B(z.y,we.y)&&_t.B(we.x,Qe.x))if(Ae=Math.min(ne,Math.abs(we.x-E.x)/2),Ae=Et=Math.min(Ae,Math.abs(Qe.y-we.y)/2),_t.B(Ae,0))Og(this,re,pe,ct,z,we,_e),z.assign(we);else{var Dt=we.x,Vt=we.y;Ee=Dt,Pt=Vt,we.x>z.x?Dt=we.x-Ae:Dt=we.x+Ae,Qe.y>we.y?Pt=we.y+Et:Pt=we.y-Et,Qe=tt.allocAt(Dt,Vt),Og(this,re,pe,ct,z,Qe,_e),tt.free(Qe),u0(re,we.x+pe,we.y+ct,Ee+pe,Pt+ct),z.h(Ee,Pt)}else _t.B(z.x,we.x)&&_t.B(we.y,Qe.y)?(Ae=Math.min(ne,Math.abs(we.y-E.y)/2),Ae=Et=Math.min(Ae,Math.abs(Qe.x-we.x)/2),_t.B(Et,0)?(Og(this,re,pe,ct,z,we,_e),z.assign(we)):(Dt=we.x,Vt=we.y,Ee=Dt,Pt=Vt,we.y>z.y?Vt=we.y-Ae:Vt=we.y+Ae,Qe.x>we.x?Ee=we.x+Et:Ee=we.x-Et,Qe=tt.allocAt(Dt,Vt),Og(this,re,pe,ct,z,Qe,_e),tt.free(Qe),u0(re,we.x+pe,we.y+ct,Ee+pe,Pt+ct),z.h(Ee,Pt))):(Og(this,re,pe,ct,z,we,_e),z.assign(we));E.assign(ce),pe=le}tt.free(z)}c0=re}else re=this.i(1).copy(),re.x-=b,re.y-=oe,this.computeShortLength(!0)!==0&&(E=Ig(this,E,!0,z)),this.computeShortLength(!1)!==0&&(re=Ig(this,re,!1,z)),a.type=Zn.j,a.startX=E.x,a.startY=E.y,a.endX=re.x,a.endY=re.y;return this.lk=!0,a};function x0(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),_t.$(a,0)?y:_t.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Ig(a,y,x,b){var E=a.pointsCount;if(2>E)return y;if(x){var z=a.i(1);if(x=z.x-b.x,z=z.y-b.y,b=x0(y.x,y.y,x,z),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!0),a>E&&(a=E),E=a*(z-y.y)/b,y.x+=a*(x-y.x)/b,y.y+=E}else{if(z=a.i(E-2),x=z.x-b.x,z=z.y-b.y,b=x0(y.x,y.y,x,z),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!1),a>E&&(a=E),E=a*(y.y-z)/b,y.x-=a*(y.x-x)/b,y.y-=E}return y}function oy(a,y,x,b){for(var E=a.pointsCount,z=y;_t.$(y.x,z.x)&&_t.$(y.y,z.y);){if(x>=E)return E-1;z=a.i(x++)}if(!_t.$(y.x,z.x)&&!_t.$(y.y,z.y))return x-1;for(var ne=z;_t.$(y.x,z.x)&&_t.$(z.x,ne.x)&&(!b||(y.y>=z.y?z.y>=ne.y:z.y<=ne.y))||_t.$(y.y,z.y)&&_t.$(z.y,ne.y)&&(!b||(y.x>=z.x?z.x>=ne.x:z.x<=ne.x));){if(x>=E)return E-1;ne=a.i(x++)}return x-2}hi.prototype.computeJumpLength=function(){return 10};function Og(a,y,x,b,E,z,ne){if(!ne&&tg(a)){ne=a.computeJumpLength();var re=ne/2,oe=[],le=0;if(a.isVisible()&&(le=ES(a,E,z,oe)),0<le){if(_t.B(E.y,z.y))if(E.x<z.x)for(var ce=0;ce<le;){var pe=Math.max(E.x,Math.min(oe[ce++]-re,z.x-ne));y.lineTo(pe+x,z.y+b);for(var we=pe+x,Ee=Math.min(pe+ne,z.x);ce<le&&(pe=oe[ce],pe<Ee+ne);)ce++,Ee=Math.min(pe+re,z.x);pe=z.y-ne+b,Ee+=x;var Ae=z.y+b;a.curve===Xh?pp(y,Ee,Ae,!1):Kh(y,we,pe,Ee,pe,Ee,Ae)}else for(--le;0<=le;){for(ce=Math.min(E.x,Math.max(oe[le--]+re,z.x+ne)),y.lineTo(ce+x,z.y+b),we=ce+x,pe=Math.max(ce-ne,z.x);0<=le&&(ce=oe[le],ce>pe-ne);)le--,pe=Math.max(ce-re,z.x);ce=z.y-ne+b,pe+=x,Ee=z.y+b,a.curve===Xh?pp(y,pe,Ee,!1):Kh(y,we,ce,pe,ce,pe,Ee)}else if(_t.B(E.x,z.x))if(E.y<z.y)for(ce=0;ce<le;){for(pe=Math.max(E.y,Math.min(oe[ce++]-re,z.y-ne)),y.lineTo(z.x+x,pe+b),we=pe+b,pe=Math.min(pe+ne,z.y);ce<le&&(Ee=oe[ce],Ee<pe+ne);)ce++,pe=Math.min(Ee+re,z.y);Ee=z.x-ne+x,Ae=z.x+x,pe+=b,a.curve===Xh?pp(y,Ae,pe,!1):Kh(y,Ee,we,Ee,pe,Ae,pe)}else for(--le;0<=le;){for(ce=Math.min(E.y,Math.max(oe[le--]+re,z.y+ne)),y.lineTo(z.x+x,ce+b),we=ce+b,ce=Math.max(ce-ne,z.y);0<=le&&(pe=oe[le],pe>ce-ne);)le--,ce=Math.max(pe-re,z.y);pe=z.x-ne+x,Ee=z.x+x,ce+=b,a.curve===Xh?pp(y,Ee,ce,!1):Kh(y,pe,we,pe,ce,Ee,ce)}}}y.lineTo(z.x+x,z.y+b)}function ES(a,y,x,b){var E=a.diagram;if(E===null||y.D(x))return 0;for(E=E.layers;E.next();){var z=E.value;if(z!==null&&z.visible){z=z.Pa.s;for(var ne=z.length,re=0;re<ne;re++){var oe=z[re];if(oe instanceof hi){if(oe===a)return 0<b.length&&b.sort(function(ce,pe){return ce-pe}),b.length;if(oe.isVisible()&&tg(oe)){var le=oe.routeBounds;le.w()&&a.routeBounds.Yc(le)&&!a.usesSamePort(oe)&&(le=oe.path,le!==null&&le.Ed()&&MS(y,x,b,oe))}}}}}return 0<b.length&&b.sort(function(ce,pe){return ce-pe}),b.length}function MS(a,y,x,b){for(var E=_t.B(a.y,y.y),z=b.pointsCount,ne=b.i(0),re=tt.alloc(),oe=1;oe<z;oe++){var le=b.i(oe);if(oe<z-1){var ce=b.i(oe+1);if(ne.y===le.y&&le.y===ce.y){if(le.x>ne.x&&ce.x>=le.x||le.x<ne.x&&ce.x<=le.x)continue}else if(ne.x===le.x&&le.x===ce.x&&(le.y>ne.y&&ce.y>=le.y||le.y<ne.y&&ce.y<=le.y))continue}e:{ce=a.x;var pe=a.y,we=y.x,Ee=y.y,Ae=ne.x;ne=ne.y;var _e=le.x,ct=le.y;if(_t.B(ce,we)){if(!_t.B(pe,Ee)&&_t.B(ne,ct)&&Math.min(pe,Ee)<ne&&Math.max(pe,Ee)>ne&&Math.min(Ae,_e)<ce&&Math.max(Ae,_e)>ce&&!_t.B(Ae,_e)){re.x=ce,re.y=ne,ce=!0;break e}}else if(_t.B(pe,Ee)&&_t.B(Ae,_e)&&Math.min(ce,we)<Ae&&Math.max(ce,we)>Ae&&Math.min(ne,ct)<pe&&Math.max(ne,ct)>pe&&!_t.B(ne,ct)){re.x=Ae,re.y=pe,ce=!0;break e}re.x=0,re.y=0,ce=!1}ce&&(E?x.push(re.x):x.push(re.y)),ne=le}tt.free(re)}function tg(a){return a=a.curve,a===yp||a===Xh}function S0(a,y){(y||tg(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()))}hi.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 z=!1;E=E.Pa.s;for(var ne=E.length,re=0;re<ne;re++){var oe=E[re];oe instanceof hi&&(oe===this?z=!0:z&&tx(this,oe,a))}}else if(b)for(z=E.Pa.s,E=z.length,ne=0;ne<E;ne++)re=z[ne],re instanceof hi&&tx(this,re,a)}}}}};function tx(a,y,x){if(y!==null&&y.lk&&y.fd&&tg(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}hi.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},hi.prototype.isVisible=function(){if(!Pr.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},hi.prototype.Zb=function(a){if(Pr.prototype.Zb.call(this,a),a&&S0(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},hi.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?tm:this.qk};function qp(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,z=a=null,ne=y.jb.s,re=ne.length,oe=0;oe<re;oe++){var le=ne[oe];(le.ef===y&&le.ff===b&&le.uf===x&&le.vf===E||le.ef===x&&le.ff===E&&le.uf===y&&le.vf===b)&&(z===null?z=le:(a===null&&(a=[],a.push(z)),a.push(le)))}if(a!==null){for(z=W1(y,x,b,E),z===null&&(z=new E0(y,b,x,E),Z1(y,z),Z1(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function em(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(Ii(y.links,a),y.Sl()))}hi.prototype.ph=function(){return!0},yt.Object.defineProperties(hi.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&&g0(y,this,x),em(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,z=this.fromPortChanged;if(z!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.uf!==a&&f0(a,this,E),qp(this),this.C(1)),this.g("fromNode",y,a),mp(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&gc(x),em(this),this.ff=a;var b=this.fromPort;b!==null&&gc(b);var E=this.diagram;if(E!==null){var z=this.data,ne=E.model;z!==null&&ne.ri()&&ne.xv(z,a)}x!==b&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=ne))),qp(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&&g0(y,this,x),em(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,z=this.toPortChanged;if(z!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.ef!==a&&f0(a,this,E),qp(this),this.C(1)),this.g("toNode",y,a),mp(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&gc(x),em(this),this.vf=a;var b=this.toPort;b!==null&&gc(b);var E=this.diagram;if(E!==null){var z=this.data,ne=E.model;z!==null&&ne.ri()&&ne.Cv(z,a)}x!==b&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=ne))),qp(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:Jt},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&&gc(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&&Vn(a,">= 0",hi,"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:Jt},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&&gc(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&&Vn(a,">= 0",hi,"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?io: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&&Qp(this.fromNode),this.toNode!==null&&Qp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof bo?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()===Ec&&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 z=this.i(2);y=Math.min(z.x,y),x=Math.min(z.y,x),_t.Dl(E.x,E.y,b.x,b.y,b.x,b.y,z.x,z.y,.5,a)}else for(z=3;z<b;z+=3){var ne=this.i(z-2);z+3>=b&&(z=b-1);var re=this.i(z-1),oe=this.i(z);_t.Dl(E.x,E.y,ne.x,ne.y,re.x,re.y,oe.x,oe.y,.5,a),y=Math.min(oe.x,y),x=Math.min(oe.y,x),E=oe}else for(E=this.i(0),z=this.i(1),y=Math.min(E.x,z.x),x=Math.min(E.y,z.y),a.h(E.x,E.y,0,0),a.Ye(z),E=2;E<b;E++)z=this.i(E),y=Math.min(z.x,y),x=Math.min(z.y,x),a.Ye(z);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new tt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||m0(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);_t.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):_t.$(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 $n,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 z=a[E];if(!tn(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){b=!1;break}}if(b)for(x=new $n,b=0;b<a.length;b++)E=a[b],x.add(new tt(E.x,E.y).freeze())}}else if(a instanceof $n)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Rt("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),m0(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&Qa(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||!vp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!vp(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(),S0(this,y===Xh||y===yp||a===Xh||a===yp),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(),S0(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)}}}),hi.prototype.invalidateOtherJumpOvers=hi.prototype.Xo,hi.prototype.findClosestSegment=hi.prototype.ez,hi.prototype.updateRoute=hi.prototype.vg,hi.prototype.invalidateRoute=hi.prototype.bb,hi.prototype.rollbackRoute=hi.prototype.rv,hi.prototype.commitRoute=hi.prototype.zf,hi.prototype.startRoute=hi.prototype.uh,hi.prototype.clearPoints=hi.prototype.Fj,hi.prototype.removePoint=hi.prototype.pv,hi.prototype.addPointAt=hi.prototype.yf,hi.prototype.addPoint=hi.prototype.ne,hi.prototype.insertPointAt=hi.prototype.m,hi.prototype.insertPoint=hi.prototype.Kz,hi.prototype.setPointAt=hi.prototype.L,hi.prototype.setPoint=hi.prototype.dd,hi.prototype.getPoint=hi.prototype.i,hi.prototype.getOtherPort=hi.prototype.Cz,hi.prototype.getOtherNode=hi.prototype.To;var kg=null,Tg=null,ay=new qt(hi,"Normal",1),LS=new qt(hi,"Orthogonal",2),FS=new qt(hi,"AvoidsNodes",6),nx=new qt(hi,"AvoidsNodesStraight",7),Nu=new qt(hi,"None",0),Ec=new qt(hi,"Bezier",9),Xh=new qt(hi,"JumpGap",10),yp=new qt(hi,"JumpOver",11),tm=new qt(hi,"End",17),P0=new qt(hi,"Scale",18),w0=new qt(hi,"Stretch",19),nm=new qt(hi,"OrientAlong",21),im=new qt(hi,"OrientPlus90",22),rm=new qt(hi,"OrientMinus90",23),sy=new qt(hi,"OrientOpposite",24),C0=new qt(hi,"OrientUpright",25),om=new qt(hi,"OrientPlus90Upright",26),am=new qt(hi,"OrientMinus90Upright",27),b0=new qt(hi,"OrientUpright45",28),ix=16,rx=14,sm=8;hi.className="Link",hi.Normal=ay,hi.Orthogonal=LS,hi.AvoidsNodes=FS,hi.AvoidsNodesStraight=nx,hi.None=Nu,hi.Bezier=Ec,hi.JumpGap=Xh,hi.JumpOver=yp,hi.End=tm,hi.Scale=P0,hi.Stretch=w0,hi.OrientAlong=nm,hi.OrientPlus90=im,hi.OrientMinus90=rm,hi.OrientOpposite=sy,hi.OrientUpright=C0,hi.OrientPlus90Upright=om,hi.OrientMinus90Upright=am,hi.OrientUpright45=b0,hi.EndSegmentStep=8,hi.CurvinessStart=ix,hi.SpacingMin=rx,hi.OrthoShortCut=sm;function E0(a,y,x,b){Io(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}E0.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},E0.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))}},E0.className="LinkBundle";function lm(a){Io(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}lm.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=ly,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 xp(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function eh(a,y,x){return xp(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):ly}function ox(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]>=ng&&(x[b]=ly)}lm.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 z=y;z<=x;z++)if(E[z]===Jh)return!1}return!0};function th(a,y,x,b,E,z,ne,re,oe){if(!(y<z||y>ne||x<re||x>oe)){var le=y|0,ce=x|0,pe=a.ac[le][ce];if(pe>=ng&&pe<Sp)for(E?ce+=b:le+=b,pe+=1;z<=le&&le<=ne&&re<=ce&&ce<=oe&&!(pe>=a.ac[le][ce]);)a.ac[le][ce]=pe,pe+=1,E?ce+=b:le+=b;if(le=E?ce:le,E)if(0<b)for(x+=b;x<le;x+=b)th(a,y,x,1,!E,z,ne,re,oe),th(a,y,x,-1,!E,z,ne,re,oe);else for(x+=b;x>le;x+=b)th(a,y,x,1,!E,z,ne,re,oe),th(a,y,x,-1,!E,z,ne,re,oe);else if(0<b)for(y+=b;y<le;y+=b)th(a,y,x,1,!E,z,ne,re,oe),th(a,y,x,-1,!E,z,ne,re,oe);else for(y+=b;y>le;y+=b)th(a,y,x,1,!E,z,ne,re,oe),th(a,y,x,-1,!E,z,ne,re,oe)}}function M0(a,y,x,b,E,z,ne,re,oe){y|=0,x|=0;var le=Jh,ce=ng;for(a.ac[y][x]=ce;le===Jh&&y>z&&y<ne&&x>re&&x<oe;)ce+=1,a.ac[y][x]=ce,E?x+=b:y+=b,le=a.ac[y][x]}function L0(a,y,x,b,E,z,ne,re,oe){y|=0,x|=0;var le=Jh,ce=Sp;for(a.ac[y][x]=ce;le===Jh&&y>z&&y<ne&&x>re&&x<oe;)a.ac[y][x]=ce,E?x+=b:y+=b,le=a.ac[y][x]}function ax(a,y,x,b,E,z,ne){if(a.ac!==null){a.abort=!1;var re=y.x,oe=y.y;if(xp(a,re,oe)){re-=a.Nd,re/=a.rc,oe-=a.Od,oe/=a.sc;var le=b.x,ce=b.y;if(xp(a,le,ce))if(le-=a.Nd,le/=a.rc,ce-=a.Od,ce/=a.sc,1>=Math.abs(re-le)&&1>=Math.abs(oe-ce))a.abort=!0;else{var pe=z.x;b=z.y,y=z.x+z.width;var we=z.y+z.height;pe-=a.Nd,pe/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,we-=a.Od,we/=a.sc,z=Math.max(0,Math.min(a.di,pe|0)),y=Math.min(a.di,Math.max(0,y|0)),pe=Math.max(0,Math.min(a.ei,b|0)),we=Math.min(a.ei,Math.max(0,we|0)),b=a.ac,re|=0,oe|=0,le|=0,ce|=0;var Ee=x===0||x===90?1:-1;if(x=x===90||x===270,b[re][oe]===Jh?(M0(a,re,oe,Ee,x,z,y,pe,we),M0(a,re,oe,1,!x,z,y,pe,we),M0(a,re,oe,-1,!x,z,y,pe,we)):M0(a,re,oe,Ee,x,re,oe,re,oe),b[le][ce]===Jh?(L0(a,le,ce,E===0||E===90?1:-1,E===90||E===270,z,y,pe,we),L0(a,le,ce,1,!(E===90||E===270),z,y,pe,we),L0(a,le,ce,-1,!(E===90||E===270),z,y,pe,we)):L0(a,le,ce,Ee,x,le,ce,le,ce),x=Si(),ne&&sx(a,le,ce,E,re,oe,x))for((x[0]!==le||x[1]!==ce)&&(x.unshift(ce),x.unshift(le)),(x[x.length-2]!==re||x[x.length-1]!==oe)&&(x.push(re),x.push(oe)),a=ng,E=x[x.length-2],ne=x[x.length-1],b[E][ne]=a++,z=x.length-4;0<=z;z-=2)for(E=x[z+2],ne=x[z+3],y=x[z],le=x[z+1];y>E?E++:y<E?E--:le>ne?ne++:le<ne&&ne--,b[E][ne]=a++,E!==y||ne!==le;);else th(a,re,oe,1,!1,z,y,pe,we),th(a,re,oe,-1,!1,z,y,pe,we),th(a,re,oe,1,!0,z,y,pe,we),th(a,re,oe,-1,!0,z,y,pe,we);Ni(x)}}}}function sx(a,y,x,b,E,z,ne){for(var re=a.ac,oe=y,le=x;;){if(oe===E&&le===z)return!0;var ce=oe,pe=le;if(b===0)if(ce<E)ce++;else break;else if(b===90)if(pe<z)pe++;else break;else if(b===180)if(ce>E)ce--;else break;else if(pe>z)pe--;else break;var we=re[ce][pe];if(we===0||we===uy)break;oe=ce,le=pe}for(;;){if(ce=b,pe=oe,we=le,b===0?we<z?(ce=90,we++):we>z&&(ce=270,we--):b===90?pe<E?(ce=0,pe++):pe>E&&(ce=180,pe--):b===180?we<z?(ce=90,we++):we>z&&(ce=270,we--):pe<E?(ce=0,pe++):pe>E&&(ce=180,pe--),pe=re[pe][we],ce!==b&&pe!==0&&pe!==uy){if(ne.push(oe),ne.push(le),sx(a,oe,le,ce,E,z,ne))return!0;ne.pop(),ne.pop()}if(re[oe][le]=uy,b===0){if(oe===y)return!1;oe--}else if(b===90){if(le===x)return!1;le--}else if(b===180){if(oe===y)return!1;oe++}else{if(le===x)return!1;le++}}}yt.Object.defineProperties(lm.prototype,{bounds:{get:function(){return new Bn(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,ng=1,Sp=999999,ly=Sp+1,uy=Sp+2;lm.className="PositionArray";function Rg(){Io(this),this.port=this.node=null,this.pe=[],this.ap=!1}Rg.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 NS(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}Rg.prototype.Sl=function(){this.pe.length=0};function lx(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,z=E instanceof mo?E:null;if(z===null||z.isSubGraphExpanded)var ne=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!z.actualBounds.w()){a.ap=x;break e}b=z,ne=b.Lu()}z=a.pe.length=0;var re=a.port.ga(Ws,tt.alloc()),oe=a.port.ga(wl,tt.alloc());for(E=Bn.allocAt(re.x,re.y,0,0),E.Ye(oe),tt.free(re),tt.free(oe),re=tt.allocAt(E.x+E.width/2,E.y+E.height/2),oe=a.port.li(),ne=ne.iterator;ne.next();){var le=ne.value;if(le.isVisible()&&le.fromPort!==le.toPort){var ce=le.fromPort===a.port||le.fromNode!==null&&le.fromNode.Td(b),pe=le.computeSpot(ce,a.port);if(pe.$c()&&(ce=ce?le.toPort:le.fromPort,ce!==null)){var we=ce.part;if(we!==null){var Ee=we.findVisibleNode();Ee!==null&&Ee!==we&&(we=Ee,ce=we.port),ce=le.computeOtherPoint(we,ce),we=re.ab(ce),we-=oe,0>we?we+=360:360<=we&&(we-=360),pe=NS(E,pe,we,le.isOrthogonal),pe===0?(pe=4,180<we&&(we-=360)):pe===90?(pe=8,270<we&&(we-=360)):pe===180?pe=2:(pe=1,90>we&&(we+=360)),Ee=a.pe[z],Ee===void 0?(Ee=new cy(le,we,pe),a.pe[z]=Ee):(Ee.link=le,Ee.angle=we,Ee.Nc=pe),Ee.hv.set(ce),z++}}}}for(tt.free(re),a.pe.sort(Rg.prototype.j),oe=a.pe.length,b=-1,z=re=0;z<oe;z++)ne=a.pe[z],ne!==void 0&&(ne.Nc!==b&&(b=ne.Nc,re=0),ne.Uo=re,re++);for(b=-1,re=0,z=oe-1;0<=z;z--)oe=a.pe[z],oe!==void 0&&(oe.Nc!==b&&(b=oe.Nc,re=oe.Uo+1),oe.Gl=re);if(z=a.pe,pe=a.port,b=a.node.portSpreading,re=tt.alloc(),oe=tt.alloc(),ne=tt.alloc(),le=tt.alloc(),pe.ga(Ws,re),pe.ga(fu,oe),pe.ga(wl,ne),pe.ga(ul,le),Ee=we=ce=pe=0,b===qv)for(var Ae=0;Ae<z.length;Ae++){var _e=z[Ae];if(_e!==null){var ct=_e.link.computeThickness();switch(_e.Nc){case 8:we+=ct;break;case 2:Ee+=ct;break;case 1:pe+=ct;break;default:case 4:ce+=ct}}}var Qe=Ae=0,Pt=1,Et=_e=0;for(ct=0;ct<z.length;ct++){var Dt=z[ct];if(Dt!==null){if(Ae!==Dt.Nc){switch(Ae=Dt.Nc,Ae){case 8:var Vt=ne;Qe=le;break;case 2:Vt=le,Qe=re;break;case 1:Vt=re,Qe=oe;break;default:case 4:Vt=oe,Qe=ne}switch(_e=Qe.x-Vt.x,Et=Qe.y-Vt.y,Ae){case 8:we>Math.abs(_e)?(Pt=Math.abs(_e)/we,we=Math.abs(_e)):Pt=1;break;case 2:Ee>Math.abs(Et)?(Pt=Math.abs(Et)/Ee,Ee=Math.abs(Et)):Pt=1;break;case 1:pe>Math.abs(_e)?(Pt=Math.abs(_e)/pe,pe=Math.abs(_e)):Pt=1;break;default:case 4:ce>Math.abs(Et)?(Pt=Math.abs(Et)/ce,ce=Math.abs(Et)):Pt=1}Qe=0}var mn=Dt.Zo;if(b===qv){switch(Dt=Dt.link.computeThickness(),Dt*=Pt,mn.set(Vt),Ae){case 8:mn.x=Vt.x+_e/2+we/2-Qe-Dt/2;break;case 2:mn.y=Vt.y+Et/2+Ee/2-Qe-Dt/2;break;case 1:mn.x=Vt.x+_e/2-pe/2+Qe+Dt/2;break;default:case 4:mn.y=Vt.y+Et/2-ce/2+Qe+Dt/2}Qe+=Dt}else{var Ei=.5;b===p0&&(Ei=(Dt.Uo+1)/(Dt.Gl+1)),mn.x=Vt.x+_e*Ei,mn.y=Vt.y+Et*Ei}}}for(tt.free(re),tt.free(oe),tt.free(ne),tt.free(le),Vt=a.pe,z=0;z<Vt.length;z++)b=Vt[z],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,Bn.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}Rg.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},Rg.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,Ss,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 z=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y<z.y:y.x<z.x)?x+8*b:(a?y.y===z.y:y.x===z.x)?x:x+8*(E-1-b)},Rg.className="Knot";function cy(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}cy.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()},cy.className="LinkInfo";function ms(a){Io(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)}ms.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},ms.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ms.prototype.qb=function(){},ms.prototype.toString=function(){var a=Zi(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},ms.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())}}},ms.prototype.createNetwork=function(){return new Xa(this)},ms.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof gn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof mo?y.lg(a.memberParts):y.lg(a.iterator),y},ms.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")}},ms.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()}},ms.prototype.doLayout=function(a){var y=new Kn;a instanceof gn?(bf(this,y,a.nodes,!0,this.rh,!0,!1,!0),bf(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof mo?bf(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},ms.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,z=0,ne=0;for(a=a.iterator;a.next();){var re=a.value;um(re);var oe=re.measuredBounds,le=oe.width;oe=oe.height,re.moveTo(b,E),re instanceof mo&&(re.rh=!1),b+=Math.max(le,50)+20,ne=Math.max(ne,Math.max(oe,50)),z>=y-1?(z=0,b=x,E+=ne+20,ne=0):z++}},ms.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,z=0,ne=this.network.vertexes.iterator;ne.next();){var re=ne.value.node;if(!(re===null||re instanceof hi)&&(um(re),this.rh(re))){var oe=re.measuredBounds,le=oe.width;oe=oe.height,re.moveTo(x,b),re instanceof mo&&(re.rh=!1),x+=Math.max(le,50)+20,z=Math.max(z,Math.max(oe,50)),E>=a-1?(E=0,x=y,b+=z+20,z=0):E++}}},ms.prototype.rh=function(a){return!!(!a.location.w()||a instanceof mo&&a.rh)};function bf(a,y,x,b,E,z,ne,re){for(x=x.iterator;x.next();){var oe=x.value;b&&!oe.isTopLevel||E!==null&&!E(oe)||!oe.canLayout()||(z&&oe instanceof Di?oe.isLinkLabel||(oe instanceof mo&&oe.layout===null?bf(a,y,oe.memberParts,!1,E,z,ne,re):(um(oe),y.add(oe))):ne&&oe instanceof hi?y.add(oe):!re||!oe.Zc()||oe instanceof Di||(um(oe),y.add(oe)))}}function um(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}ms.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Bn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},ms.prototype.ex=function(a){var y=new Kn;return a instanceof gn?(bf(this,y,a.nodes,!0,null,!0,!0,!0),bf(this,y,a.links,!0,null,!0,!0,!0),bf(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof mo?bf(this,y,a.memberParts,!1,null,!0,!0,!0):bf(this,y,a.iterator,!1,null,!0,!0,!0),y},ms.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(Ws),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},yt.Object.defineProperties(ms.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())}}}),ms.prototype.collectParts=ms.prototype.ex,ms.prototype.getLayoutBounds=ms.prototype.ni,ms.prototype.invalidateLayout=ms.prototype.C,ms.className="Layout";function Xa(a){Io(this),this.Sc=a,this.wf=new Kn,this.ye=new Kn,this.Es=new Ti,this.zs=new Ti}Xa.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 Kn,this.ye=new Kn,this.Es=new Ti,this.zs=new Ti},Xa.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},Xa.prototype.createVertex=function(){return new vl(this)},Xa.prototype.createEdge=function(){return new pc(this)},Xa.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 Di)return!ne.isLinkLabel;if(ne instanceof hi){var re=ne.fromNode;return re===null||re.isLinkLabel?!1:(ne=ne.toNode,!(ne===null||ne.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof Di&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof mo&&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 hi&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)&&this.Lo(b)===null){var z=b.fromNode;E=b.toNode,z!==null&&E!==null&&z!==E&&(z=this.findGroupVertex(z),E=this.findGroupVertex(E),z!==null&&E!==null&&this.Zj(z,E,b))}}},Xa.prototype.findGroupVertex=function(a){if(a===null)return null;var y=a.findVisibleNode();if(y===null)return null;if(a=this.ki(y),a!==null)return a;for(y=y.containingGroup;y!==null;){if(a=this.ki(y),a!==null)return a;y=y.containingGroup}return null},Be=Xa.prototype,Be.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Be.Bl=function(a){if(a===null)return null;var y=this.ki(a);return y===null&&(y=this.createVertex(),y.node=a,this.dh(y)),y},Be.Iu=function(a){if(a!==null&&ux(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 ux(a,y){if(y===null)return!1;var x=a.wf.remove(y);return x&&(y=y.node,y!==null&&a.Es.remove(y)),x}Be.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Be.ki=function(a){return a===null?null:this.Es.I(a)},Be.Bo=function(a){if(a!==null){dy(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function dy(a,y){if(y!==null){a.ye.add(y);var x=y.link;x!==null&&a.Lo(x)===null&&a.zs.add(x,y),y.network=a}}Be.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,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},Be.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),hy(this,a)}};function hy(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}Be.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Be.Lo=function(a){return a===null?null:this.zs.I(a)},Be.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var b=this.createEdge();return b.link=x,b.fromVertex=a,b.toVertex=y,this.Bo(b),b}return null},Be.gm=function(a){if(a!==null){var y=a.fromVertex,x=a.toVertex;y!==null&&x!==null&&(y.Jl(a),x.Kl(a),a.gm(),y.Cl(a),x.zl(a))}},Be.Ko=function(){for(var a=Si(),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]);Ni(a)},Xa.prototype.deleteArtificialVertexes=function(){for(var a=Si(),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=Si(),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]);Ni(a),Ni(y)};function BS(a){for(var y=Si(),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]);Ni(y)}Xa.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),BS(this),this.Ko()),a=new $n;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),fy(this,y,b),y=!0;break}}}return a.sort(function(E,z){return E===null||z===null||E===z?0:z.vertexes.count-E.vertexes.count}),a};function fy(a,y,x){if(x!==null&&x.network!==y){ux(a,x),y.dh(x);for(var b=x.sourceEdges;b.next();){var E=b.value;E.network!==y&&(hy(a,E),dy(y,E),fy(a,y,E.fromVertex))}for(b=x.destinationEdges;b.next();)x=b.value,x.network!==y&&(hy(a,x),dy(y,x),fy(a,y,x.toVertex))}}Xa.prototype.dz=function(){for(var a=new Kn,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},yt.Object.defineProperties(Xa.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}}}),Xa.prototype.findAllParts=Xa.prototype.dz,Xa.prototype.splitIntoSubNetworks=Xa.prototype.Zx,Xa.prototype.deleteSelfEdges=Xa.prototype.Ko,Xa.prototype.reverseEdge=Xa.prototype.gm,Xa.prototype.linkVertexes=Xa.prototype.Zj,Xa.prototype.findEdge=Xa.prototype.Lo,Xa.prototype.deleteLink=Xa.prototype.Yy,Xa.prototype.deleteEdge=Xa.prototype.Mj,Xa.prototype.addLink=Xa.prototype.Dy,Xa.prototype.addEdge=Xa.prototype.Bo,Xa.prototype.findVertex=Xa.prototype.ki,Xa.prototype.deleteNode=Xa.prototype.Zy,Xa.prototype.deleteVertex=Xa.prototype.Iu,Xa.prototype.addNode=Xa.prototype.Bl,Xa.prototype.addVertex=Xa.prototype.dh,Xa.prototype.addParts=Xa.prototype.lg,Xa.className="LayoutNetwork";function vl(a){Io(this),this.ob=a,this.j=new Bn(0,0,10,10).freeze(),this.o=new tt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new $n,this.mg=new $n}vl.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new $n,this.mg=new $n},vl.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Yi(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 z=b.value;x?x=!1:E+=",",E+=z.toString(0)}y+=" sources: "+a+" destinations: "+E}return y},vl.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;tn(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 mo)){x=Bn.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(Oo);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),Bn.free(x);return}Bn.free(x)}a.moveTo(y.x,y.y)}},vl.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},vl.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},vl.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},vl.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function gy(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}yt.Object.defineProperties(vl.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=Bn.alloc(),b=y.ni(a,x);y=b.x;var E=b.y,z=b.width;if(b=b.height,isNaN(y)&&(y=0),isNaN(E)&&(E=0),this.j.h(y,E,z,b),Bn.free(x),!(a instanceof mo)&&(a=a.locationObject.ga(Oo),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(z/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 Kn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Kn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Kn,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 $n,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}}}),vl.prototype.deleteDestinationEdge=vl.prototype.Jl,vl.prototype.addDestinationEdge=vl.prototype.zl,vl.prototype.deleteSourceEdge=vl.prototype.Kl,vl.prototype.addSourceEdge=vl.prototype.Cl,vl.className="LayoutVertex",vl.standardComparer=gy,vl.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 pc(a){Io(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}pc.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},pc.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Yi(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},pc.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},pc.prototype.commit=function(){},pc.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},yt.Object.defineProperties(pc.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)}}}),pc.prototype.getOtherVertex=pc.prototype.Ax,pc.className="LayoutEdge";function $l(a){ms.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new ci(NaN,NaN).freeze(),this.tf=new ci(10,10).freeze(),this.Jb=cm,this.Rb=N0,this.nd=dm,this.hd=cx,a&&Object.assign(this,a)}Zt($l,ms),$l.prototype.cloneProtected=function(a){ms.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},$l.prototype.qb=function(a){a.classType===$l?a===dm||a===A0||a===py||a===B0?this.sorting=a:a===N0||a===vd?this.arrangement=a:a===cm||a===F0?this.alignment=a:Rt("Unknown enum value: "+a):ms.prototype.qb.call(this,a)},$l.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 mo)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 B0:E.reverse();break;case dm:E.sort(this.comparer);break;case A0:E.sort(this.comparer),E.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var ne=this.wrappingWidth;switch(isNaN(ne)&&a!==null?(y=a.padding,ne=Math.max(a.viewportBounds.width-y.left-y.right,0)):ne=Math.max(this.wrappingWidth,0),0>=z&&0>=ne&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),b=[],this.alignment){case F0:var re=y,oe=x,le=Bn.alloc(),ce=Math.max(this.cellSize.width,1);if(!isFinite(ce))for(var pe=ce=0;pe<E.length;pe++){var we=this.ni(E[pe],le);ce=Math.max(ce,we.width)}if(ce=Math.max(ce+re,1),pe=Math.max(this.cellSize.height,1),!isFinite(pe))for(we=pe=0;we<E.length;we++){var Ee=this.ni(E[we],le);pe=Math.max(pe,Ee.height)}pe=Math.max(pe+oe,1),we=this.arrangement;for(var Ae=Ee=this.arrangementOrigin.x,_e=this.arrangementOrigin.y,ct=0,Qe=0,Pt=0;Pt<E.length;Pt++){var Et=E[Pt],Dt=this.ni(Et,le),Vt=Math.ceil((Dt.width+re)/ce)*ce,mn=Math.ceil((Dt.height+oe)/pe)*pe;switch(we){case vd:var Ei=Math.abs(Ae-Dt.width);break;default:Ei=Ae+Dt.width}switch((0<z&&ct>z-1||0<ne&&0<ct&&Ei-Ee>ne)&&(b.push(new Bn(0,_e,ne+re,Qe)),ct=0,Ae=Ee,_e+=Qe,Qe=0),Qe=Math.max(Qe,mn),we){case vd:Dt=-Dt.width;break;default:Dt=0}switch(Et.moveTo(Ae+Dt,_e),we){case vd:Ae-=Vt;break;default:Ae+=Vt}ct++}b.push(new Bn(0,_e,ne+re,Qe)),Bn.free(le);break;case cm:for(oe=ne,ce=z,pe=y,we=x,ne=Bn.alloc(),Ee=Math.max(this.cellSize.width,1),z=_e=le=0,re=tt.alloc(),Ae=0;Ae<E.length;Ae++)Qe=E[Ae],ct=this.ni(Qe,ne),Qe=Vh(Qe,Qe.locationObject,Qe.locationSpot,re),le=Math.max(le,Qe.x),_e=Math.max(_e,ct.width-Qe.x),z=Math.max(z,Qe.y);switch(Ae=this.arrangement,Ae){case vd:le+=pe;break;default:_e+=pe}Ee=isFinite(Ee)?Math.max(Ee+pe,1):Math.max(le+_e,1);var Qi=Qe=this.arrangementOrigin.x;for(Pt=this.arrangementOrigin.y,_e=0,oe>=le&&(oe-=le),le=Et=0,Vt=Math.max(this.cellSize.height,1),Dt=z=0,mn=!0,ct=tt.alloc(),Ei=0;Ei<E.length;Ei++){var Gi=E[Ei],di=this.ni(Gi,ne),Xn=Vh(Gi,Gi.locationObject,Gi.locationSpot,re);if(0<_e)switch(Ae){case vd:Qi=(Qi-Qe-(di.width-Xn.x))/Ee,Qi=_t.$(Math.round(Qi),Qi)?Math.round(Qi):Math.floor(Qi),Qi=Qi*Ee+Qe;break;default:Qi=(Qi-Qe+Xn.x)/Ee,Qi=_t.$(Math.round(Qi),Qi)?Math.round(Qi):Math.ceil(Qi),Qi=Qi*Ee+Qe}else switch(Ae){case vd:Et=Qi+Xn.x+di.width;break;default:Et=Qi-Xn.x}switch(Ae){case vd:var co=-(Qi+Xn.x)+Et;break;default:co=Qi+di.width-Xn.x-Et}if(0<ce&&_e>ce-1||0<oe&&0<_e&&co>oe){for(b.push(new Bn(0,mn?Pt-z:Pt,oe+pe,Dt+z+we)),Qi=0;Qi<_e&&Ei!==_e;Qi++){co=E[Ei-_e+Qi];var Ur=Vh(co,co.locationObject,co.locationSpot,ct);co.moveTo(co.position.x,co.position.y+z-Ur.y)}Dt+=we,Pt=mn?Pt+Dt:Pt+(Dt+z),_e=Dt=z=0,Qi=Qe,mn=!1}switch(Qi===Qe&&(le=Ae===vd?Math.max(le,di.width-Xn.x):Math.min(le,-Xn.x)),z=Math.max(z,Xn.y),Dt=Math.max(Dt,di.height-Xn.y),isFinite(Vt)&&(Dt=Math.max(Dt,Math.max(di.height,Vt)-Xn.y)),mn?Gi.moveTo(Qi-Xn.x,Pt-Xn.y):Gi.moveTo(Qi-Xn.x,Pt),Ae){case vd:Qi-=Xn.x+pe;break;default:Qi+=di.width-Xn.x+pe}_e++}if(b.push(new Bn(0,Pt,oe+pe,(mn?Dt:Dt+z)+we)),E.length!==_e)for(oe=0;oe<_e;oe++)ce=E[E.length-_e+oe],pe=Vh(ce,ce.locationObject,ce.locationSpot,re),ce.moveTo(ce.position.x,ce.position.y+z-pe.y);if(tt.free(re),tt.free(ct),Ae===vd)for(E=0;E<b.length;E++)z=b[E],z.width+=le,z.x-=le;else for(E=0;E<b.length;E++)z=b[E],z.x>le&&(z.width+=z.x-le,z.x=le);Bn.free(ne)}for(re=z=ne=E=0;re<b.length;re++)oe=b[re],E=Math.min(E,oe.x),ne=Math.min(ne,oe.y),z=Math.max(z,oe.x+oe.width);this.arrangement===vd?this.commitLayers(b,new tt(E+y/2-(z+E),ne-x/2)):this.commitLayers(b,new tt(E-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},$l.prototype.commitLayers=function(){};function cx(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}yt.Object.defineProperties($l.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!==cm&&a!==F0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==N0&&a!==vd||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==py&&a!==B0&&a!==dm&&a!==A0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var F0=new qt($l,"Position",0),cm=new qt($l,"Location",1),N0=new qt($l,"LeftToRight",2),vd=new qt($l,"RightToLeft",3),py=new qt($l,"Forward",4),B0=new qt($l,"Reverse",5),dm=new qt($l,"Ascending",6),A0=new qt($l,"Descending",7);$l.className="GridLayout",$l.standardComparer=cx,$l.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},$l.Position=F0,$l.Location=cm,$l.LeftToRight=N0,$l.RightToLeft=vd,$l.Forward=py,$l.Reverse=B0,$l.Ascending=dm,$l.Descending=A0;function ka(){this.On=new Kn,this.Dn=new Kn,this.Pa=new Kn,this.cf=new Ti,this.bf=new Ti,this.aj=new Ti,this.H=null,this.tp=!1}Be=ka.prototype,Be.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Be.Xe=function(a){this.H=a},Be.oi=function(a){if(a instanceof Di){if(this.On.add(a),a instanceof mo){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 hi?this.Dn.add(a):a instanceof ga||this.Pa.add(a);y=a.data,y===null||a instanceof ga||(a instanceof hi?this.bf.add(y,a):this.cf.add(y,a))},Be.pc=function(a){if(a.Ej(),a instanceof Di){if(this.On.remove(a),a instanceof mo){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 hi?this.Dn.remove(a):a instanceof ga||this.Pa.remove(a);y=a.data,y===null||a instanceof ga||(a instanceof hi?this.bf.remove(y):this.cf.remove(y))},Be.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,b=y.key;(!x.Zc()||x instanceof mo)&&Rt('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 mo||Rt('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 hi||Rt('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Si(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=Si(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=Si(),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]);Ni(y),Ni(x),Ni(a)}},ka.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},ka.prototype.addModeledParts=function(a,y){var x=this,b=this.diagram.model;a.forEach(function(E){b.lb(E)&&dx(x,E,!1)}),a.forEach(function(E){b.lb(E)&&x.resolveReferencesForData(E)}),y!==!1&&yh(this.diagram,!1)};function dx(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=hx(a,y,b);if(E!==null&&(zc(E),E=E.copy(),E!==null)){var z=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=z,b=E;break e}}b=null}b!==null&&x&&a.resolveReferencesForData(y)}}ka.prototype.insertLink=function(){return null},ka.prototype.resolveReferencesForData=function(){},ka.prototype.Ro=function(a){return this.H.model.Ro(a)};function hx(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&&(px||(px=!0,Pi('No Group template found for category "'+x+'"'),Pi(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(gx||(gx=!0,Pi('No Node template found for category "'+x+'"'),Pi(" Using default node template")),y=a.ny))),y}ka.prototype.getLinkCategoryForData=function(){return""},ka.prototype.setLinkCategoryForData=function(){},ka.prototype.setFromNodeForLink=function(){},ka.prototype.setToNodeForLink=function(){},ka.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(mx||(mx=!0,Pi('No Link template found for category "'+a+'"'),Pi(" Using default link template")),x=y.my)),x},ka.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},ka.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},ka.prototype.ip=function(a){a=this.Lc(a),a!==null&&(mh(this.diagram,a,!1),this.unresolveReferencesForPart(a))},ka.prototype.unresolveReferencesForPart=function(){},ka.prototype.removeDataForLink=function(){},ka.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},ka.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Di?a:null)},ka.prototype.findLinkForKey=function(){return null},Be=ka.prototype,Be.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Be.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Di?a:null)},Be.Kc=function(a){return a===null?null:this.bf.I(a)},Be.ms=function(a){for(var y=0;y<arguments.length;++y);y=new Kn;for(var x=this.On.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var z=0;z<arguments.length;z++){var ne=arguments[z];if(tn(ne)&&my(this,E,ne)){y.add(b);break}}}return y.iterator},Be.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Kn;for(var x=this.Dn.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var z=0;z<arguments.length;z++){var ne=arguments[z];if(tn(ne)&&my(this,E,ne)){y.add(b);break}}}return y.iterator};function my(a,y,x){for(var b in x){var E=y[b],z=x[b];if(hn(z)){if(!hn(E)||E.length<z.length)return!1;for(var ne=0;ne<E.length;ne++){var re=z[ne];if(re!==void 0&&!fx(a,E[ne],re))return!1}}else if(!fx(a,E,z))return!1}return!0}function fx(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(tn(y)&&tn(x)){if(!my(a,y,x))return!1}else if(y!==x)return!1;return!0}ka.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===Ha){if(b==="nodeCategory"){var E=this.Lc(a.object),z=a.newValue;E!==null&&typeof z=="string"&&(E.category=z)}else b==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===ts){var ne=a.newValue;b==="nodeDataArray"&&tn(ne)&&dx(this,ne),y.isModified=!0}else if(x===Ms){var re=a.oldValue;b==="nodeDataArray"&&tn(re)&&this.ip(re),y.isModified=!0}else x===Js&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===Ha){var oe=a.propertyName,le=a.object;le===y.model?(oe==="nodeKeyProperty"||oe==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(le,oe),y.isModified=!0}else if(x===ts||x===Ms){var ce=a.change===ts,pe=ce?a.newParam:a.oldParam,we=ce?a.newValue:a.oldValue,Ee=this.aj.I(a.object);if(Array.isArray(Ee))for(a=0;a<Ee.length;a++){var Ae=Ee[a];if(ce)Xm(Ae,we,pe,!0);else if(!(0>pe)){var _e=pe+Kp(Ae);Ae.pc(_e,!0),Bv(Ae,_e,pe)}}y.isModified=!0}}finally{y.aa=!0}}}}},ka.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)},ka.prototype.rp=function(){for(var a=this.H.model,y=new Kn,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){Ex(a,ne,!1)}),b=0;b<x.length;b++){var z=x[b];this.Lc(z)===null&&bx(a,z,!1)}for(this.refreshDataBoundLinks(),x=this.parts.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.nodes.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.links.iterator;x.next();)x.value.updateRelationshipsFromData()},ka.prototype.refreshDataBoundLinks=function(){},ka.prototype.updateRelationshipsFromData=function(){},ka.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,z=0;z<E.length;z++){var ne=E[z].sx(a);ne!==null&&(x===null&&(x=Si()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);Ni(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function vy(a,y){var x=y.Hh;if(hn(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 yy(a,y,x){Jf(y,function(ne){ne=ne.O.s;for(var re=ne.length,oe=0;oe<re;oe++)vg(x,ne[oe])});var b=y.Hh;if(hn(b)){var E=a.aj.I(b);if(E!==null){for(var z=0;z<E.length;z++)if(E[z]===y){E.splice(z,1),E.length===0&&a.aj.remove(b);break}}}}ka.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new Ti;if(hn(a))for(var E=0;E<a.length;E++)D0(this,a[E],y,b,x);else for(a=a.iterator;a.next();)D0(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 Kn;for(var z=new Ti,ne=b.iterator;ne.next();){var re=ne.value;if(re instanceof hi)a||re.fromNode!==null&&re.toNode!==null||E.add(re);else if(re instanceof Di&&re.data!==null&&x.Tl()){var oe=re;re=ne.key;var le=re.pg();le!==null&&(le=b.I(le),le!==null?(x.qe(oe.data,x.wa(le.data)),oe=y.Kc(oe.data),re=re.kh(),re!==null&&oe!==null&&z.add(re,oe)):x.qe(oe.data,void 0))}}if(0<E.count&&y.Is(E,!1),0<z.count)for(x=z.iterator;x.next();)b.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ce=new Ti;b.each(function(pe){pe.key.data!==null&&ce.add(pe.key.data,pe.value.data)}),x(ce,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function D0(a,y,x,b,E){if(y===null||E&&!y.canCopy())return null;if(b.contains(y))return b.I(y);var z=a.copyPartData(y,x);if(!(z instanceof Pr))return null;if(z.isSelected=!1,z.isHighlighted=!1,b.add(y,z),y instanceof Di){for(var ne=y.linksConnected;ne.next();){var re=ne.value;if(re.fromNode===y){var oe=b.I(re);oe!==null&&(oe.fromNode=z)}re.toNode===y&&(re=b.I(re),re!==null&&(re.toNode=z))}if(y instanceof mo&&z instanceof mo)for(y=y.memberParts;y.next();)ne=D0(a,y.value,x,b,E),ne instanceof hi||ne===null||(ne.containingGroup=z)}else if(y instanceof hi&&z instanceof hi)for(ne=y.fromNode,ne!==null&&(ne=b.I(ne),ne!==null&&(z.fromNode=ne)),ne=y.toNode,ne!==null&&(ne=b.I(ne),ne!==null&&(z.toNode=ne)),y=y.labelNodes;y.next();)ne=D0(a,y.value,x,b,E),ne!==null&&ne instanceof Di&&(ne.labeledLink=z);return z}ka.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof hi||(b=E.copyNodeData(b),tn(b)&&(E.xf(b),x=y.Lc(b)))}else zc(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 hi||(E=y.copyNodeData(b)),tn(E)&&(x.data=E)));return x},yt.Object.defineProperties(ka.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}}}),ka.prototype.updateAllRelationshipsFromData=ka.prototype.rp,ka.prototype.findLinksByExample=ka.prototype.ls,ka.prototype.findNodesByExample=ka.prototype.ms,ka.prototype.findLinkForData=ka.prototype.Kc,ka.prototype.findNodeForData=ka.prototype.ii,ka.prototype.findPartForData=ka.prototype.Lc,ka.prototype.findNodeForKey=ka.prototype.Vb,ka.prototype.removeModeledPart=ka.prototype.ip,ka.prototype.removeModeledParts=ka.prototype.Gs,ka.prototype.rebuildParts=ka.prototype.Wd;var gx=!1,px=!1,mx=!1;ka.className="PartManager";function _l(a){ka.apply(this,arguments)}Zt(_l,ka),_l.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vx(this,a.linkDataArray)},_l.prototype.addModeledParts=function(a){for(ka.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)mp(a.value);yh(this.diagram,!1)};function vx(a,y){y.forEach(function(x){yx(a,x)}),yh(a.diagram,!1)}function yx(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){zc(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 z=T0(x,y,!0);z!==""&&(E.fromPortId=z),z=Mc(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof Di&&(E.fromNode=z)),z=T0(x,y,!1),z!==""&&(E.toPortId=z),z=Mc(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof Di&&(E.toNode=z)),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}}}}_l.prototype.removeAllModeledParts=function(){var a=this.diagram.model;xx(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function xx(a,y){y.forEach(function(x){a.ip(x)})}_l.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},_l.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},_l.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},_l.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},_l.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},_l.prototype.findPartForKey=function(a){var y=ka.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},_l.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},_l.prototype.doModelChanged=function(a){var y=this;if(ka.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===Ha){if(E==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var ne=this.Vb(a.newValue);z.fromNode=ne}}else if(E==="linkToKey"){var re=this.Kc(a.object);if(re!==null){var oe=this.Vb(a.newValue);re.toNode=oe}}else if(E==="linkFromPortId"){var le=this.Kc(a.object);if(le!==null){var ce=a.newValue;typeof ce=="string"&&(le.fromPortId=ce)}}else if(E==="linkToPortId"){var pe=this.Kc(a.object);if(pe!==null){var we=a.newValue;typeof we=="string"&&(pe.toPortId=we)}}else if(E==="nodeGroupKey"){var Ee=this.Lc(a.object);if(Ee!==null){var Ae=a.newValue;if(Ae!==void 0){var _e=this.Vb(Ae);_e instanceof mo?Ee.containingGroup=_e:Ee.containingGroup=null}else Ee.containingGroup=null}}else if(E==="linkLabelKeys"){var ct=this.Kc(a.object);if(ct!==null){var Qe=a.oldValue,Pt=a.newValue;Array.isArray(Qe)&&Qe.forEach(function(Xn){0<=Pt.indexOf(Xn)||(Xn=y.Vb(Xn),Xn!==null&&(Xn.labeledLink=null))}),Array.isArray(Pt)&&Pt.forEach(function(Xn){Xn=y.Vb(Xn),Xn!==null&&(Xn.labeledLink=ct)})}}else if(E==="linkCategory"){var Et=this.Kc(a.object),Dt=a.newValue;Et!==null&&typeof Dt=="string"&&(Et.category=Dt)}else E==="linkDataArray"&&(xx(this,a.oldValue),vx(this,a.newValue));x.isModified=!0}else if(b===ts){var Vt=a.newValue;if(E==="linkDataArray"&&typeof Vt=="object"&&Vt!==null)yx(this,Vt);else if(E==="linkLabelKeys"&&Mf(Vt)){var mn=this.Kc(a.object),Ei=this.Vb(Vt);mn!==null&&Ei!==null&&(Ei.labeledLink=mn)}x.isModified=!0}else if(b===Ms){var Qi=a.oldValue;if(E==="linkDataArray"&&typeof Qi=="object"&&Qi!==null)this.ip(Qi);else if(E==="linkLabelKeys"&&Mf(Qi)){var Gi=this.Vb(Qi);Gi!==null&&(Gi.labeledLink=null)}x.isModified=!0}}else if(b===Ha){var di=a.propertyName;a.object!==x.model||di!=="linkFromKeyProperty"&&di!=="linkToKeyProperty"&&di!=="linkFromPortIdProperty"&&di!=="linkToPortIdProperty"&&di!=="linkLabelKeysProperty"&&di!=="nodeIsGroupProperty"&&di!=="nodeGroupKeyProperty"&&di!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},_l.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Kn,b=y.linkDataArray;b.forEach(function(z){x.add(z)});var E=[];this.links.each(function(z){z.data===null||x.contains(z.data)||E.push(z.data)}),E.forEach(function(z){Ax(y,z,!1)}),b.forEach(function(z){a.Kc(z)===null&&Bx(y,z,!1)})},_l.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 hi){var E=Mc(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=Mc(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 z=a.labelNodes.first();if(b.wa(z.data)===E)return}E=new Kn().addAll(y);var ne=new Kn;a.labelNodes.each(function(re){re.data!==null&&(re=b.wa(re.data),re!==void 0&&ne.add(re))}),y=ne.copy(),y.hp(E),E=E.copy(),E.hp(ne),(0<y.count||0<E.count)&&(y.each(function(re){re=x.Vb(re),re!==null&&re.labeledLink===a&&(re.labeledLink=null)}),E.each(function(re){re=x.Vb(re),re!==null&&re.labeledLink!==a&&(re.labeledLink=a)}))}}else!(a instanceof ga)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof mo)&&(a.containingGroup=y)}}},_l.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=hm(y,x),E=this.Lc(a);if(b!==null&&E!==null){b=b.iterator;for(var z={};b.next();){var ne=b.value;y.lb(ne)?E instanceof mo&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(z.link=this.Kc(ne),z.link!==null&&E instanceof Di&&(Mc(y,ne,!0)===x&&(z.link.fromNode=E),Mc(y,ne,!1)===x&&(z.link.toNode=E),ne=y.Ef(ne),Array.isArray(ne)&&ne.some(function(re){return function(oe){return oe===x?(E.labeledLink=re.link,!0):!1}}(z)))),z={link:z.link}}xd(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof mo&&(E.containingGroup=a))}},_l.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Di){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)yd(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&yd(y,x,b.data)),a instanceof mo)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&yd(y,x,b)}}},_l.prototype.copyPartData=function(a,y){var x=ka.prototype.copyPartData.call(this,a,y);if(a instanceof hi)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},_l.prototype.insertLink=function(a,y,x,b){var E=this.diagram,z=E.model,ne=E.toolManager.findTool("Linking"),re="";if(a!==null&&(y===null&&(y=a),re=y.portId,re===null&&(re="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=ne.archetypeLinkData,b instanceof hi){if(zc(b),z=b.copy(),z!==null)return z.fromNode=a,z.fromPortId=re,z.toNode=x,z.toPortId=y,E.add(z),a=ne.archetypeLabelNodeData,a instanceof Di&&(zc(a),a=a.copy(),a!==null&&(a.labeledLink=z,E.add(a))),z}else if(b!==null&&(b=z.Jo(b),typeof b=="object"&&b!==null))return a!==null&&wp(z,b,z.wa(a.data),!0),Cp(z,b,re,!0),x!==null&&wp(z,b,z.wa(x.data),!1),Cp(z,b,y,!1),z.fi(b),a=ne.archetypeLabelNodeData,a===null||a instanceof Di||(a=z.copyNodeData(a),typeof a=="object"&&a!==null&&(z.xf(a),a=z.wa(a),a!==void 0&&z.Bu(b,a))),E.Kc(b);return null},_l.prototype.findLinkForKey=_l.prototype.findLinkForKey,_l.prototype.findPartForKey=_l.prototype.findPartForKey,_l.prototype.removeAllModeledParts=_l.prototype.removeAllModeledParts,_l.prototype.addModeledParts=_l.prototype.addModeledParts,_l.prototype.addAllModeledParts=_l.prototype.addAllModeledParts,_l.className="GraphLinksPartManager";function Ic(){ka.apply(this,arguments),this.Sg=null}Zt(Ic,ka);function I0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var b=a.diagram.toolManager.findTool("Linking"),E=y,z=x;if(a.diagram.isTreePathToChildren||(E=x,z=y),(b===null||!ii(b,E,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(zc(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=z,a.diagram.add(b),b.ub=null,b.data=x.data,a.diagram.skipsModelSourceBindings=ne}}}Ic.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Ic.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Ic.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}},Ic.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))},Ic.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Ic.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Ic.prototype.doModelChanged=function(a){if(ka.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===Ha){if(b==="nodeParentKey"){var E=a.object,z=this.Vb(a.newValue),ne=this.ii(E);if(this.Sg!==null)z!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(ne!==null){var re=ne.kh();re!==null?z===null?y.remove(re):y.isTreePathToChildren?re.fromNode=z:re.toNode=z:I0(this,z,ne)}}else if(b==="parentLinkCategory"){var oe=this.ii(a.object),le=a.newValue;if(oe!==null&&typeof le=="string"){var ce=oe.kh();ce!==null&&(ce.category=le)}}y.isModified=!0}}else if(x===Ha){var pe=a.propertyName;a.object===y.model&&pe==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Ic.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof Di&&(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:I0(this,y,a):b!==null&&mh(x,b,!1)))}}},Ic.prototype.updateDataBindings=function(a,y){ka.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Ic.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=hm(y,x),E=this.Lc(a);if(b!==null&&E!==null){for(b=b.iterator;b.next();){var z=b.value;y.lb(z)&&E instanceof Di&&y.mh(z)===x&&I0(this,E,this.ii(z))}xd(y,x)}a=y.mh(a),a!==void 0&&E instanceof Di&&(a=this.Vb(a),I0(this,a,E))}},Ic.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Di){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 z=E.pc(-1,b,!1);0<=z&&this.diagram.cb(Ms,"parts",E,b,null,z,null),z=b.layerChanged,z!==null&&z(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)&&yd(y,x,E)}},Ic.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},Ic.prototype.findLinkForKey=Ic.prototype.findLinkForKey,Ic.className="TreePartManager";function lr(a,y){this.kl=new Kn,this.il=new Kn,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,Io(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Ti,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 Ti,this.Lt=new $n,this.Wg=!1,this.o=null,this.undoManager=new ns,a!==void 0&&(hn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}lr.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},lr.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},lr.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},lr.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)+":"+sr(E)}}return y},lr.prototype.xA=function(a){a.change!==Js&&Rt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Rs?(Px(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},lr.prototype.Qv=function(a,y){var x=this,b=!1,E=new Kn,z=new Kn,ne=new Kn,re=this.vh;a.changes.each(function(pe){pe.model===x&&(pe.modelChange==="nodeDataArray"?pe.change===ts?E.add(pe.newValue):pe.change===Ms&&ne.add(pe.oldValue):x.lb(pe.object)?z.add(pe.object):pe.change!==Ha||x.modelData!==pe.object&&pe.propertyName!=="modelData"?pe.object!==null&&(re&&re.contains(pe.object)?re.get(pe.object).each(function(we){x.lb(we)&&z.add(we)}):pe.object instanceof lr||x.ri()&&x.Jc(pe.object)||wx(x,pe.object).each(function(we){z.add(we)})):b=!0)});var oe=this.il;oe.clear(),E.each(function(pe){oe.add(x.wa(pe)),y||z.add(pe)});var le=this.kl;le.clear(),ne.each(function(pe){le.add(x.wa(pe)),y&&z.add(pe)}),a=x.cloneDeep(z.Fa());var ce=null;return b&&(ce===null&&(ce={}),ce.modelData=this.cloneDeep(this.modelData)),0<oe.count&&(ce===null&&(ce={}),y?ce.removedNodeKeys=oe.Fa():ce.insertedNodeKeys=oe.Fa()),0<a.length&&(ce===null&&(ce={}),ce.modifiedNodeData=a),0<le.count&&(ce===null&&(ce={}),y?ce.insertedNodeKeys=le.Fa():ce.removedNodeKeys=le.Fa()),le.clear(),oe.clear(),ce},lr.prototype.cloneDeep=function(a){return Pp(this,a,!0)};function Pp(a,y,x,b,E,z){function ne(pe,we){re?(pe.__gohashid===void 0&&z.push(pe),b.set(pe,we)):(pe=ua++,b.set(pe,we),E.set(pe,y))}if(!tn(y))return y;z||(z=[]);var re=Object.isExtensible(y);if(b||(b=new Ti),re){var oe=b.get(y);if(oe)return oe}else for(E||(E=new Ti),oe=E.iterator;oe.next();){var le=oe.key;if(oe.value===y&&(le=b.get(le)))return le}if(Array.isArray(y)){oe=[],ne(y,oe);for(var ce=0;ce<y.length;ce++)oe.push(Pp(a,y[ce],!1,b,E,z))}else if(y instanceof tt||y instanceof ci||y instanceof Bn||y instanceof or||y instanceof er)oe=y.copy(),ne(y,oe);else{if(y instanceof fa||y instanceof Zn||y instanceof qt)return y;if(y instanceof $n)oe=new $n().addAll(Pp(a,y.Fa(),!1,b,E,z)),ne(y,oe);else if(y instanceof Kn)oe=new Kn().addAll(Pp(a,y.Fa(),!1,b,E,z)),ne(y,oe);else if(y instanceof Ti)oe=new Ti().addAll(Pp(a,y.Fa(),!1,b,E,z)),ne(y,oe);else if(y instanceof Date)oe=new Date(y.getTime()),ne(y,oe);else if(y instanceof RegExp)oe=new RegExp(y),ne(y,oe),oe.lastIndex=y.lastIndex;else if(typeof y.copy=="function")oe=y.copy(),ne(y,oe);else for(ce in oe={},ne(y,oe),y)ce!=="__gohashid"&&(oe[ce]=Pp(a,y[ce],!1,b,E,z))}return x&&z.forEach(function(pe){delete pe.__gohashid}),oe}Be=lr.prototype,Be.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Be.rm=function(){var a="";return this.name!==""&&(a+=`,
|
|
|
"name": `+this.quote(this.name)),this.dataFormat!==""&&(a+=`,
|
|
|
"dataFormat": `+this.quote(this.dataFormat)),this.isReadOnly&&(a+=`,
|
|
|
"isReadOnly": `+this.isReadOnly),this.nodeKeyProperty!=="key"&&typeof this.nodeKeyProperty=="string"&&(a+=`,
|
|
|
"nodeKeyProperty": `+this.quote(this.nodeKeyProperty)),this.copiesArrays&&(a+=`,
|
|
|
"copiesArrays": true`),this.copiesArrayObjects&&(a+=`,
|
|
|
"copiesArrayObjects": true`),this.copiesKey||(a+=`,
|
|
|
"copiesKey": false`),this.nodeCategoryProperty!=="category"&&typeof this.nodeCategoryProperty=="string"&&(a+=`,
|
|
|
"nodeCategoryProperty": `+this.quote(this.nodeCategoryProperty)),a},Be.gp=function(a){a.name&&(this.name=a.name),a.dataFormat&&(this.dataFormat=a.dataFormat),a.isReadOnly&&(this.isReadOnly=!0),a.nodeKeyProperty&&(this.nodeKeyProperty=a.nodeKeyProperty),a.copiesArrays&&(this.copiesArrays=!0),a.copiesArrayObjects&&(this.copiesArrayObjects=!0),a.copiesKey===!1&&(this.copiesKey=!1),a.nodeCategoryProperty&&(this.nodeCategoryProperty=a.nodeCategoryProperty)};function Sx(a,y){y=y.modelData,tn(y)&&(a.dm(y),a.modelData=y)}Be.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!Cx(x,a[x])){y=!0;break}return a="",y&&(a=`,
|
|
|
"modelData": `+xy(this,this.modelData)),a+`,
|
|
|
"nodeDataArray": `+Ef(this,this.nodeDataArray,!0)},Be.kv=function(a){Sx(this,a),a=a.nodeDataArray,hn(a)&&(this.dm(a),this.nodeDataArray=a)};function Px(a,y){function x(E,z){if((z=z.part)&&(z=z.data,E!==z)){var ne=b.get(E);ne===null?(ne=new Kn,ne.add(z),b.add(E,ne)):ne.add(z)}}var b=a.vh;b===null&&(b=new Ti,y.changes.each(function(E){if(E.diagram!==null){var z=E.change;z===Ha?(E=E.object.panel)&&(z=E.data)&&x(z,E):(z===ts||z===Ms)&&(E=E.object,(z=E.itemArray)&&x(z,E))}}),a.vh=b)}function wx(a,y){for(var x=new Kn,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];O0(a,y,E,E,x)}return x}function O0(a,y,x,b,E){if(Array.isArray(x))for(var z=0;z<x.length;z++){var ne=x[z];if(ne===y)return E.add(b),!0;if(O0(a,y,ne,b,E))return!0}else if(tn(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(ne=x[z],ne===y)return E.add(b),!0;if(O0(a,y,ne,b,E))return!0}return!1}Be.Pv=function(a,y){var x=this,b=!1,E=new Kn,z=new Kn,ne=new Kn,re=this.vh;a.changes.each(function(ce){ce.model===x&&(ce.modelChange==="nodeDataArray"?ce.change===ts?E.add(ce.newValue):ce.change===Ms&&ne.add(ce.oldValue):x.lb(ce.object)?z.add(ce.object):ce.change!==Ha||x.modelData!==ce.object&&ce.propertyName!=="modelData"?ce.object!==null&&(re&&re.contains(ce.object)?re.get(ce.object).each(function(pe){x.lb(pe)&&z.add(pe)}):ce.object instanceof lr||x.ri()&&x.Jc(ce.object)||wx(x,ce.object).each(function(pe){z.add(pe)})):b=!0)});var oe=this.il;oe.clear(),E.each(function(ce){oe.add(x.wa(ce)),y||z.add(ce)});var le=this.kl;return le.clear(),ne.each(function(ce){le.add(x.wa(ce)),y&&z.add(ce)}),a="",b&&(a+=`,
|
|
|
"modelData": `+xy(this,this.modelData)),0<oe.count&&(a+=(y?this.Yv:this.Wv)+Ef(this,oe.Fa(),!0)),0<z.count&&(a+=this.jy+Ef(this,z.Fa(),!0)),0<le.count&&(a+=(y?this.Wv:this.Yv)+Ef(this,le.Fa(),!0)),le.clear(),oe.clear(),a},Be.fp=function(a){(a.name!==void 0&&a.name!==this.name||a.dataFormat!==void 0&&a.dataFormat!==this.dataFormat||a.isReadOnly!==void 0&&a.isReadOnly!==this.isReadOnly||a.nodeKeyProperty!==void 0&&a.nodeKeyProperty!==this.nodeKeyProperty||a.copiesArrays!==void 0&&a.copiesArrays!==this.copiesArrays||a.copiesArrayObjects!==void 0&&a.copiesArrayObjects!==this.copiesArrayObjects||a.copiesKey!==void 0&&a.copiesKey!==this.copiesKey||a.nodeCategoryProperty!==void 0&&a.nodeCategoryProperty!==this.nodeCategoryProperty)&&Rt("applyIncrementalJson cannot change Model properties"),Sx(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new Ti;if(Array.isArray(x))for(var E=0;E<x.length;E++){var z=x[E],ne=this.wa(z);ne!=null&&b.set(ne,z)}if(Array.isArray(y))for(E=y.length,z=0;z<E;z++){ne=y[z];var re=this.hc(ne);re===null&&(re=(re=b.get(ne))?re:this.copyNodeData({}),this.km(re,ne),this.xf(re))}if(Array.isArray(x)){for(y=x.length,b=0;b<y;b++)if(E=x[b],z=this.wa(E),z=this.hc(z),z!==null){for(var oe in E)oe==="__gohashid"||oe===this.nodeKeyProperty||this.Wj()&&oe===this.nodeIsGroupProperty||this.setDataProperty(z,oe,E[oe]);this.lm(E,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,oe=0;oe<x;oe++)y=this.hc(a[oe]),y!==null&&this.cm(y)},Be.$x=function(a,y){a.change!==Js&&Rt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Rs?(y===void 0&&(y=fm(this,this)),Px(this,x),a=this.Pv(x,a.propertyName==="FinishedUndo"),this.vh=null,y==="2"?'{ "incremental": 2'+a+"}":'{ "class": '+this.quote(y)+', "incremental": 1'+this.rm()+a+"}"):'{ "incremental": 0 }'},Be.yA=function(a,y){return this.$x(a,y)},Be.np=function(a){return a===void 0&&(a=fm(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Be.toJSON=function(a){return this.np(a)},Be.Zw=function(a){var y=null;if(typeof a=="string")try{y=nt.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:Rt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Rt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Be.Ky=function(a){return this.Zw(a)},lr.constructGraphLinksModel=function(){return new lr},Be=lr.prototype,Be.dm=function(a){if(hn(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(tn(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:Rt("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(tn(a)){for(y in a)if(x=a[y],tn(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 $n,b=0;b<x.length/2;b++)E.add(new tt(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return AS(a)}return a},Be.sm=function(a){return a===void 0?"undefined":a===null?"null":a===!0?"true":a===!1?"false":typeof a=="string"?this.quote(a):typeof a=="number"?a===1/0?"9e9999":a===-1/0?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.sm(a.valueOf()):hn(a)?Ef(this,a):tn(a)?xy(this,a):typeof a=="function"?"null":a.toString()};function Ef(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new pr;E.add("["),x&&1<b&&E.add(`
|
|
|
`);for(var z=0;z<b;z++){var ne=y[z];ne!==void 0&&(0<z&&(E.add(","),x&&E.add(`
|
|
|
`)),E.add(a.sm(ne)))}return x&&1<b&&E.add(`
|
|
|
`),E.add("]"),E.toString()}function Cx(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function Bu(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function xy(a,y){var x=y;if(x instanceof tt)y={class:"go.Point",x:Bu(x.x),y:Bu(x.y)};else if(x instanceof ci)y={class:"go.Size",width:Bu(x.width),height:Bu(x.height)};else if(x instanceof Bn)y={class:"go.Rect",x:Bu(x.x),y:Bu(x.y),width:Bu(x.width),height:Bu(x.height)};else if(x instanceof or)y={class:"go.Margin",top:Bu(x.top),right:Bu(x.right),bottom:Bu(x.bottom),left:Bu(x.left)};else if(x instanceof er)x.sb()?y={class:"go.Spot",x:Bu(x.x),y:Bu(x.y),offsetX:Bu(x.offsetX),offsetY:Bu(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof fa){if(y={class:"go.Brush",type:x.type.name},x.type===Gh?y.color=x.color:(x.type===Mh||x.type===Ac)&&(y.start=x.start,y.end=x.end,x.type===Ac&&(x.startRadius!==0&&(y.startRadius=Bu(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Bu(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 Zn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Bu(x.startX)),x.startY!==0&&(y.startY=Bu(x.startY)),x.endX!==0&&(y.endX=Bu(x.endX)),x.endY!==0&&(y.endY=Bu(x.endY)),x.spot1.D(Ws)||(y.spot1=x.spot1),x.spot2.D(wl)||(y.spot2=x.spot2),x.type===Zn.o&&(y.path=Zn.ia(x))):x instanceof qt&&(y={class:"go.EnumValue",classType:fm(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var z=nl(y,E);if(!Cx(E,z))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&z instanceof $n){var ne="[";for(z=z.iterator;z.next();){var re=z.value;1<ne.length&&(ne+=","),ne+=a.sm(re.x),ne+=",",ne+=a.sm(re.y)}ne+="]",b+=ne}else b+=a.sm(z)}return b+"}"}function Au(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function AS(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(Au(a.x),Au(a.y));else if(y==="Size")x=new ci(Au(a.width),Au(a.height));else if(y==="Rect")x=new Bn(Au(a.x),Au(a.y),Au(a.width),Au(a.height));else if(y==="Margin")x=new or(Au(a.top),Au(a.right),Au(a.bottom),Au(a.left));else if(y==="Spot")typeof a.enum=="string"?x=ro(a.enum):x=new er(Au(a.x),Au(a.y),Au(a.offsetX),Au(a.offsetY));else if(y==="Brush"){if(x=new fa,x.type=pi(fa,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof er&&(x.start=a.start),a.end instanceof er&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=Au(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=Au(a.endRadius)),a=a.colorStops,tn(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Zn.parse(a.path):x=new Zn,x.type=pi(Zn,a.type),typeof a.startX=="number"&&(x.startX=Au(a.startX)),typeof a.startY=="number"&&(x.startY=Au(a.startY)),typeof a.endX=="number"&&(x.endX=Au(a.endX)),typeof a.endY=="number"&&(x.endY=Au(a.endY)),a.spot1 instanceof er&&(x.spot1=a.spot1),a.spot2 instanceof er&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=Py(b),typeof b=="function"&&(x=pi(b,a.name)));return x}Be.Pe=function(a){return this.Lt.add(a),this},Be.ik=function(a){this.Lt.remove(a)},Be.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,b=0;b<x;b++)y.M(b)(a)},Be.cb=function(a,y,x,b,E,z,ne){fl(this,"",a,y,x,b,E,z,ne)},Be.g=function(a,y,x,b,E){fl(this,"",Ha,a,this,y,x,b,E)},Be.Fs=function(a,y,x,b,E,z){fl(this,"",Ha,y,a,x,b,E,z)};function fl(a,y,x,b,E,z,ne,re,oe){re===void 0&&(re=null),oe===void 0&&(oe=null);var le=new Ea;le.model=a,le.change=x,le.modelChange=y,le.propertyName=b,le.object=E,le.oldValue=z,le.oldParam=re,le.newValue=ne,le.newParam=oe,a.ds(le)}lr.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Ha){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)),ds(x,b,E)}else a.change===ts?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,tn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&Ii(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&Oi(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!hn(b)&&a.propertyName&&(b=nl(a.object,a.propertyName)),hn(b)&&typeof x=="number"&&(a=a.newValue,y?Ii(b,x):Oi(b,x,a))):Rt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Ms?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,tn(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&Oi(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&Ii(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!hn(b)&&a.propertyName&&(b=nl(a.object,a.propertyName)),hn(b)&&typeof x=="number"&&(a=a.oldValue,y?Oi(b,x,a):Ii(b,x))):Rt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Js&&Rt("unknown ChangedEvent: "+a.toString())},lr.prototype.Ea=function(a){return this.undoManager.Ea(a)},lr.prototype.eb=function(a){return this.undoManager.eb(a)},lr.prototype.Kf=function(){return this.undoManager.Kf()},lr.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}},Be=lr.prototype,Be.La=function(a,y){y===void 0&&(y=""),fl(this,"SourceChanged",Js,y,a,null,null)},Be.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=nl(a,y),y!==void 0)){if(Mf(y))return y;Rt("Key value for node data "+a+" is not a number or a string: "+y)}}},Be.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=nl(a,x);b!==y&&this.hc(y)===null&&(ds(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),fl(this,"nodeKey",Ha,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else ds(a,x,y)}};function Mf(a){return typeof a=="number"||typeof a=="string"}Be.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Be.hc=function(a){return a===null&&Rt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Mf(a)?this.kb.I(a):null},Be.$u=function(a){if(a!==null){var y=this.Th;if(y!==""){var x=this.wa(a);if(x===void 0||this.kb.contains(x)){var b=this.bl;if(b!==null&&(x=b(this,a),x!=null&&!this.kb.contains(x))){ds(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;ds(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;ds(a,y,x)}}}}},Be.xf=function(a){a!==null&&(Jo(a),this.lb(a)||bx(this,a,!0))};function bx(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&&Rt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,Oi(a.Tc,b,y)),fl(a,"nodeDataArray",ts,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}Be.Fy=function(a){if(hn(a))for(var y=a.length,x=0;x<y;x++)this.xf(a[x]);else for(a=a.iterator;a.next();)this.xf(a.value)},Be.cm=function(a){a!==null&&Ex(this,a,!0)};function Ex(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;Ii(a.Tc,b)}fl(a,"nodeDataArray",Ms,"nodeDataArray",a,y,null,b,null),a.qp(y)}Be.nA=function(a){if(hn(a))for(var y=a.length,x=0;x<y;x++)this.cm(a[x]);else for(a=a.iterator;a.next();)this.cm(a.value)},Be.$z=function(a){if(a!==this.nodeDataArray&&hn(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 z=a[E],ne=this.wa(z);if(ne!==void 0){x.add(ne);var re=this.hc(ne);re!==z&&(re!==null?(this.Do(re,z),this.lm(z,re)):(z=this.cloneDeep(z),this.km(z,ne),this.xf(z)))}else ne=this.cloneDeep(z),this.xf(ne),x.add(this.wa(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.hc(b))&&this.cm(b);y.clear(),x.clear()}},Be.jp=function(a,y){y!==void 0&&(a=hm(this,a),a instanceof Kn&&this.Vf.add(y,a))},Be.Lv=function(){},Be.fm=function(){},Be.em=function(){},Be.qp=function(){};function yd(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new Kn,a.Vf.add(y,b)),b.add(x)}}function xd(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof Kn&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function hm(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof Kn?a:null)}Be.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},lr.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):k0(this,a,!0),tn(a)&&Io(a),a};function k0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var b=[];for(x=0;x<y.length;x++){var E=k0(a,y[x],a.copiesArrayObjects);b.push(E)}return Io(b),b}if(x&&tn(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 z=nl(y,b),ne=fm(a,z);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||z instanceof lr||z instanceof ns||z instanceof Rs||z instanceof Ea||(z=k0(a,z,!1)),ds(x,b,z)}return Io(x),x}return y instanceof tt||y instanceof ci||y instanceof Bn||y instanceof er||y instanceof or?y.copy():y}lr.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!Mx&&a instanceof Yt&&(Mx=!0,Pi('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Pi(" Is that really your intent?"));var b=nl(a,y);b!==x&&(ds(a,y,x),this.Fs(a,y,b,x))},Be=lr.prototype,Be.set=function(a,y,x){this.setDataProperty(a,y,x)},Be.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])}},Be.Ay=function(a,y){this.ts(a,-1,y)},Be.ts=function(a,y,x){0>y&&(y=a.length),Oi(a,y,x),fl(this,"",ts,"",a,null,x,null,y)},Be.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Rt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];Ii(a,y),fl(this,"",Ms,"",a,x,null,y,null)},Be.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=nl(a,y),y===void 0))return"";if(typeof y=="string")return y;Rt("getCategoryForNodeData found a non-string category for "+a+": "+y)},Be.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=nl(a,x);b===void 0&&(b=""),b!==y&&(ds(a,x,y),fl(this,"nodeCategory",Ha,x,a,b,y))}else ds(a,x,y)}},Be.lm=function(a,y){this.jm(y,this.Ro(a))},Be.Tl=function(){return!1},Be.Wj=function(){return!1},Be.ri=function(){return!1},Be.xs=function(){return!1},Be.Xj=function(){return!1};function Sy(){return new lr}function fm(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 fm(a,y.constructor);return typeof y}function Py(a){return nd[a]?nd[a]:nt.go!==void 0&&nt.go[a]?nt.go[a]:null}function nl(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 ds(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){}}yt.Object.defineProperties(lr.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===""&&Rt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Rt("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];tn(E)||Rt("Model.nodeDataArray must only contain Objects, not: "+E),Jo(E)}for(this.Tc=a,b=new $n,E=0;E<x;E++){var z=a[E],ne=this.wa(z);ne===void 0||this.kb.I(ne)!==null?b.add(z):this.kb.add(ne,z)}for(b=b.iterator;b.next();)E=b.value,this.$u(E),z=this.wa(E),z!==void 0&&this.kb.add(z,E);for(fl(this,"nodeDataArray",Ha,"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"}}}),lr.prototype.setCategoryForNodeData=lr.prototype.jm,lr.prototype.getCategoryForNodeData=lr.prototype.Ro,lr.prototype.removeArrayItem=lr.prototype.ov,lr.prototype.insertArrayItem=lr.prototype.ts,lr.prototype.addArrayItem=lr.prototype.Ay,lr.prototype.assignAllDataProperties=lr.prototype.Do,lr.prototype.set=lr.prototype.set,lr.prototype.clearUnresolvedReferences=lr.prototype.Qy,lr.prototype.mergeNodeDataArray=lr.prototype.$z,lr.prototype.removeNodeDataCollection=lr.prototype.nA,lr.prototype.removeNodeData=lr.prototype.cm,lr.prototype.addNodeDataCollection=lr.prototype.Fy,lr.prototype.addNodeData=lr.prototype.xf,lr.prototype.makeNodeDataKeyUnique=lr.prototype.$u,lr.prototype.findNodeDataForKey=lr.prototype.hc,lr.prototype.containsNodeData=lr.prototype.lb,lr.prototype.setKeyForNodeData=lr.prototype.km,lr.prototype.getKeyForNodeData=lr.prototype.wa,lr.prototype.updateTargetBindings=lr.prototype.La,lr.prototype.commit=lr.prototype.commit,lr.prototype.rollbackTransaction=lr.prototype.Kf,lr.prototype.commitTransaction=lr.prototype.eb,lr.prototype.startTransaction=lr.prototype.Ea,lr.prototype.raiseDataChanged=lr.prototype.Fs,lr.prototype.raiseChanged=lr.prototype.g,lr.prototype.raiseChangedEvent=lr.prototype.cb,lr.prototype.removeChangedListener=lr.prototype.ik,lr.prototype.addChangedListener=lr.prototype.Pe,lr.prototype.writeJsonValue=lr.prototype.sm,lr.prototype.replaceJsonObjects=lr.prototype.dm,lr.prototype.applyIncrementalJSON=lr.prototype.Ky,lr.prototype.applyIncrementalJson=lr.prototype.Zw,lr.prototype.toJSON=lr.prototype.toJSON,lr.prototype.toJson=lr.prototype.np,lr.prototype.toIncrementalJSON=lr.prototype.yA,lr.prototype.toIncrementalJson=lr.prototype.$x,lr.prototype.toIncrementalData=lr.prototype.xA,lr.prototype.clear=lr.prototype.clear;var Mx=!1,nd={};lr.className="Model",lr.fromJSON=lr.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=nt.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:Rt("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=Py(b)):(E=Py(b),E===null&&(E=nt[b])),typeof E=="function"&&(a=new E)}catch(z){}a===null||a instanceof lr?y=a:Rt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=lr.constructGraphLinksModel()),y.gp(x),y.kv(x),y},lr.safePropertyValue=nl,lr.safePropertySet=ds,nd.Brush=fa,nd.ChangedEvent=Ea,nd.Geometry=Zn,nd.Margin=or,nd.Panel=ui,nd.Point=tt,nd.Rect=Bn,nd.Size=ci,nd.Spot=er,nd.Transaction=Rs,nd.UndoManager=ns;function ol(a,y,x,b){Io(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=Fx,this.wk=null):(this.el=gm,this.wk=b),this.st=new Kn}ol.prototype.copy=function(){var a=new ol;return a.xl=this.xl,a.to=this.to,a.wl=this.wl,a.Cr=this.Cr,a.wn=this.wn,a.sl=this.sl,a.Im=this.Im,a.el=this.el,a.wk=this.wk,a},Be=ol.prototype,Be.qb=function(a){a.classType===ol&&(this.mode=a)},Be.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return this._isFrozen=!1,this},Be.Kx=function(a){return a===void 0&&(a=null),this.mode=gm,this.backConverter=a,this},Be.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Be.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function Lx(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Be.Mv=function(a,y,x){var b=this.sl;if(x===void 0||b===""||b===x){x=this.xl;var E=this.Im;if(E===null&&x==="")Pi("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(b!==""&&(z=nl(y,b)),z!==void 0)if(E===null)x!==""&&ds(a,x,z);else try{if(x!==""){var ne=E(z,a);ds(a,x,ne)}else E(z,a)}catch(re){}}}},Be.sp=function(a,y,x,b){if(this.el===gm){var E=this.xl;if(x===void 0||E===x){x=this.sl;var z=this.wk,ne=a;if(E!==""&&(ne=nl(a,E)),ne!==void 0&&!this.st.contains(a))try{this.st.add(a);var re=b!==null?b.diagram:null,oe=re!==null?re.model:null;if(z===null){if(x!=="")oe!==null?oe.setDataProperty(y,x,ne):ds(y,x,ne);else if(oe!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var le=b.itemIndex,ce=b.panel.itemArray;oe.ov(ce,le),oe.ts(ce,le,ne)}}else try{if(x!==""){var pe=z(ne,y,oe);oe!==null?oe.setDataProperty(y,x,pe):ds(y,x,pe)}else{var we=z(ne,y,oe);if(we!==void 0&&oe!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Ee=b.itemIndex,Ae=b.panel.itemArray;oe.ov(Ae,Ee),oe.ts(Ae,Ee,we)}}}catch(_e){}}finally{this.st.remove(a)}}}},yt.Object.defineProperties(ol.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&In(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&In(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&In(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&In(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&In(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&In(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&In(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&In(this),this.el=a}}}),ol.prototype.updateSource=ol.prototype.sp,ol.prototype.updateTarget=ol.prototype.Mv,ol.prototype.ofModel=ol.prototype.dA,ol.prototype.ofObject=ol.prototype.cp,ol.prototype.makeTwoWay=ol.prototype.Kx;var DS="Binding",Fx=new qt(ol,"OneWay",1),gm=new qt(ol,"TwoWay",2);ol.className="Binding",ol.parseEnum=function(a,y){return function(x){return x=pi(a,x),x===null?y:x}},ol.toString=sr,ol.OneWay=Fx,ol.TwoWay=gm;function ta(a,y,x){lr.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new Kn,this.wb=new Ti,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&&(hn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Zt(ta,lr),ta.constructGraphLinksModel=lr.constructGraphLinksModel,ta.prototype.cloneProtected=function(a){lr.prototype.cloneProtected.call(this,a),a.Jh=this.Jh,a.cl=this.cl,a.Ak=this.Ak,a.lf=this.lf,a.mf=this.mf,a.ej=this.ej,a.fj=this.fj,a.dj=this.dj,a.je=this.je,a.jl=this.jl,a.Je=this.Je,a.Lm=this.Lm},Be=ta.prototype,Be.clear=function(){lr.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Be.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" GraphLinksModel";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;var x=a.length,b;for(b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+sr(E)}for(y+=`
|
|
|
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+Mc(this,E,!0)+"-->"+Mc(this,E,!1)}return y},Be.Qv=function(a,y){this.linkKeyProperty===""&&Rt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=lr.prototype.Qv.call(this,a,y),b=this,E=new Kn,z=new Kn,ne=new Kn,re=this.vh;a.changes.each(function(ce){ce.model===b&&(ce.modelChange==="linkDataArray"?ce.change===ts?E.add(ce.newValue):ce.change===Ms&&ne.add(ce.oldValue):b.Jc(ce.object)?z.add(ce.object):ce.object!==null&&(ce.object!==null&&re&&re.contains(ce.object)?re.get(ce.object).each(function(pe){b.Jc(pe)&&z.add(pe)}):ce.object instanceof lr||b.lb(ce.object)||Nx(b,ce.object).each(function(pe){z.add(pe)})))});var oe=this.il;oe.clear(),E.each(function(ce){oe.add(b.Ac(ce)),y||z.add(ce)});var le=this.kl;return le.clear(),ne.each(function(ce){le.add(b.Ac(ce)),y&&z.add(ce)}),a=b.cloneDeep(z.Fa()),0<oe.count&&(x===null&&(x={}),y?x.removedLinkKeys=oe.Fa():x.insertedLinkKeys=oe.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<le.count&&(x===null&&(x={}),y?x.insertedLinkKeys=le.Fa():x.removedLinkKeys=le.Fa()),le.clear(),oe.clear(),x},Be.rm=function(){var a=lr.prototype.rm.call(this),y="";return this.linkCategoryProperty!=="category"&&typeof this.linkCategoryProperty=="string"&&(y+=`,
|
|
|
"linkCategoryProperty": `+this.quote(this.linkCategoryProperty)),this.linkKeyProperty!==""&&typeof this.linkKeyProperty=="string"&&(y+=`,
|
|
|
"linkKeyProperty": `+this.quote(this.linkKeyProperty)),this.linkFromKeyProperty!=="from"&&typeof this.linkFromKeyProperty=="string"&&(y+=`,
|
|
|
"linkFromKeyProperty": `+this.quote(this.linkFromKeyProperty)),this.linkToKeyProperty!=="to"&&typeof this.linkToKeyProperty=="string"&&(y+=`,
|
|
|
"linkToKeyProperty": `+this.quote(this.linkToKeyProperty)),this.linkFromPortIdProperty!==""&&typeof this.linkFromPortIdProperty=="string"&&(y+=`,
|
|
|
"linkFromPortIdProperty": `+this.quote(this.linkFromPortIdProperty)),this.linkToPortIdProperty!==""&&typeof this.linkToPortIdProperty=="string"&&(y+=`,
|
|
|
"linkToPortIdProperty": `+this.quote(this.linkToPortIdProperty)),this.linkLabelKeysProperty!==""&&typeof this.linkLabelKeysProperty=="string"&&(y+=`,
|
|
|
"linkLabelKeysProperty": `+this.quote(this.linkLabelKeysProperty)),this.nodeIsGroupProperty!=="isGroup"&&typeof this.nodeIsGroupProperty=="string"&&(y+=`,
|
|
|
"nodeIsGroupProperty": `+this.quote(this.nodeIsGroupProperty)),this.nodeGroupKeyProperty!=="group"&&typeof this.nodeGroupKeyProperty=="string"&&(y+=`,
|
|
|
"nodeGroupKeyProperty": `+this.quote(this.nodeGroupKeyProperty)),a+y},Be.gp=function(a){lr.prototype.gp.call(this,a),a.linkKeyProperty&&(this.linkKeyProperty=a.linkKeyProperty),a.linkFromKeyProperty&&(this.linkFromKeyProperty=a.linkFromKeyProperty),a.linkToKeyProperty&&(this.linkToKeyProperty=a.linkToKeyProperty),a.linkFromPortIdProperty&&(this.linkFromPortIdProperty=a.linkFromPortIdProperty),a.linkToPortIdProperty&&(this.linkToPortIdProperty=a.linkToPortIdProperty),a.linkCategoryProperty&&(this.linkCategoryProperty=a.linkCategoryProperty),a.linkLabelKeysProperty&&(this.linkLabelKeysProperty=a.linkLabelKeysProperty),a.nodeIsGroupProperty&&(this.nodeIsGroupProperty=a.nodeIsGroupProperty),a.nodeGroupKeyProperty&&(this.nodeGroupKeyProperty=a.nodeGroupKeyProperty)},Be.Rv=function(){var a=lr.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+Ef(this,this.linkDataArray,!0);return a+y},Be.kv=function(a){lr.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function Nx(a,y){for(var x=new Kn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];O0(a,y,E,E,x)}return x}Be.Pv=function(a,y){this.linkKeyProperty===""&&Rt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=lr.prototype.Pv.call(this,a,y),b=this,E=new Kn,z=new Kn,ne=new Kn,re=this.vh;a.changes.each(function(ce){ce.model===b&&(ce.modelChange==="linkDataArray"?ce.change===ts?E.add(ce.newValue):ce.change===Ms&&ne.add(ce.oldValue):b.Jc(ce.object)?z.add(ce.object):ce.object!==null&&(ce.object!==null&&re&&re.contains(ce.object)?re.get(ce.object).each(function(pe){b.Jc(pe)&&z.add(pe)}):ce.object instanceof lr||b.lb(ce.object)||Nx(b,ce.object).each(function(pe){z.add(pe)})))});var oe=this.il;oe.clear(),E.each(function(ce){oe.add(b.Ac(ce)),y||z.add(ce)});var le=this.kl;return le.clear(),ne.each(function(ce){le.add(b.Ac(ce)),y&&z.add(ce)}),a=x,0<oe.count&&(a+=(y?this.Xv:this.Vv)+Ef(this,oe.Fa(),!0)),0<z.count&&(a+=this.iy+Ef(this,z.Fa(),!0)),0<le.count&&(a+=(y?this.Vv:this.Xv)+Ef(this,le.Fa(),!0)),le.clear(),oe.clear(),a},Be.fp=function(a){(a.linkCategoryProperty!==void 0&&a.linkCategoryProperty!==this.linkCategoryProperty||a.linkKeyProperty!==void 0&&a.linkKeyProperty!==this.linkKeyProperty||a.linkFromKeyProperty!==void 0&&a.linkFromKeyProperty!==this.linkFromKeyProperty||a.linkToKeyProperty!==void 0&&a.linkToKeyProperty!==this.linkToKeyProperty||a.linkFromPortIdProperty!==void 0&&a.linkFromPortIdProperty!==this.linkFromPortIdProperty||a.linkToPortIdProperty!==void 0&&a.linkToPortIdProperty!==this.linkToPortIdProperty||a.linkLabelKeysProperty!==void 0&&a.linkLabelKeysProperty!==this.linkLabelKeysProperty||a.nodeIsGroupProperty!==void 0&&a.nodeIsGroupProperty!==this.nodeIsGroupProperty||a.nodeGroupKeyProperty!==void 0&&a.nodeGroupKeyProperty!==this.nodeGroupKeyProperty)&&Rt("applyIncrementalJson cannot change Model properties"),lr.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],z=this.jh(E);z===null&&(z=this.Jo({}),this.Ks(z,E),this.fi(z))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,b=0;b<x;b++)if(E=y[b],z=this.Ac(E),z=this.jh(z),z!==null){for(var ne in E)ne!=="__gohashid"&&ne!==this.linkKeyProperty&&this.setDataProperty(z,ne,E[ne]);Dx(this,E,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(ne=a.length,y=0;y<ne;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},ta.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Ha){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),ds(x,b,E);return}}else if(a.change===ts){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,tn(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===Ms){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,tn(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}}lr.prototype.changeState.call(this,a,y)}},Be=ta.prototype,Be.Vl=function(a){if(a!==void 0){var y=this.Ri;if(y!==null){var x=this.hc(a);x===null&&(x=this.copyNodeData(y),ds(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Be.yx=function(a){return Mc(this,a,!0)},Be.wv=function(a,y){wp(this,a,y,!0)},Be.Bx=function(a){return Mc(this,a,!1)},Be.Bv=function(a,y){wp(this,a,y,!1)};function Mc(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=nl(y,a),a!==void 0))){if(Mf(a))return a;Rt((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function wp(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 z=nl(y,E);z!==x&&(xd(a,z,y),ds(y,E,x),a.hc(x)===null&&yd(a,x,y),fl(a,b?"linkFromKey":"linkToKey",Ha,E,y,z,x),typeof E=="string"&&a.La(y,E))}else ds(y,E,x)}}Be.zx=function(a){return T0(this,a,!0)},Be.xv=function(a,y){Cp(this,a,y,!0)},Be.Cx=function(a){return T0(this,a,!1)},Be.Cv=function(a,y){Cp(this,a,y,!1)};function T0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=nl(y,a),y===void 0?"":y)}function Cp(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var z=nl(y,E);z===void 0&&(z=""),z!==x&&(ds(y,E,x),fl(a,b?"linkFromPortId":"linkToPortId",Ha,E,y,z,x),typeof E=="string"&&a.La(y,E))}else ds(y,E,x)}}Be.Ef=function(a){if(a===null)return R0;var y=this.je;return y===""?R0:(a=nl(a,y),a===void 0?R0:a)},Be.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=nl(a,x);if(b===void 0&&(b=R0),b!==y){if(Array.isArray(b))for(var E=b.length,z=0;z<E;z++)xd(this,b[z],a);for(ds(a,x,y),E=y.length,z=0;z<E;z++){var ne=y[z];this.hc(ne)===null&&yd(this,ne,a)}fl(this,"linkLabelKeys",Ha,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else ds(a,x,y)}},Be.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=nl(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&&yd(this,y,a),fl(this,"linkLabelKeys",ts,x,a,null,y,null,E)))}else Rt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Be.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=nl(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(xd(this,y,a),fl(this,"linkLabelKeys",Ms,x,a,y,null,E,null)))}else b!==void 0&&Rt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Be.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=nl(a,y),y!==void 0)){if(Mf(y))return y;Rt("Key value for link data "+a+" is not a number or a string: "+y)}}},Be.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=nl(a,x);b!==y&&this.jh(y)===null&&(ds(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),fl(this,"linkKey",Ha,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ds(a,x,y)}},Be.jh=function(a){return a===null&&Rt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Mf(a)?this.wb.I(a):null},Be.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var b=this.cl;if(b!==null&&(x=b(this,a),x!=null&&!this.wb.contains(x))){ds(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;ds(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;ds(a,y,x)}}}}},Be.Jc=function(a){return a===null?!1:this.$f.contains(a)},Be.fi=function(a){a!==null&&(Jo(a),this.Jc(a)||Bx(this,a,!0))};function Bx(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&&Rt("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)),fl(a,"linkDataArray",ts,"linkDataArray",a,null,y,null,b),wy(a,y)}Be.Ey=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.fi(a[x]);else for(a=a.iterator;a.next();)this.fi(a.value)},Be.bm=function(a){a!==null&&Ax(this,a,!0)};function Ax(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(fl(a,"linkDataArray",Ms,"linkDataArray",a,y,null,b,null),x=Mc(a,y,!0),xd(a,x,y),x=Mc(a,y,!1),xd(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,z=0;z<E;z++)x=b[z],xd(a,x,y)}Be.lA=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.bm(a[x]);else for(a=a.iterator;a.next();)this.bm(a.value)},Be.Zz=function(a){if(this.linkKeyProperty===""&&Rt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&hn(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 z=a[E],ne=this.Ac(z);if(ne!==void 0){x.add(ne);var re=this.jh(ne);re!==z&&(re!==null?(this.Do(re,z),Dx(this,z,re)):(z=this.cloneDeep(z),this.Ks(z,ne),this.fi(z)))}else ne=this.cloneDeep(z),this.fi(ne),x.add(this.Ac(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.jh(b))&&this.bm(b);y.clear(),x.clear()}};function wy(a,y){var x=Mc(a,y,!0);x=a.Vl(x),a.hc(x)===null&&yd(a,x,y),x=Mc(a,y,!1),x=a.Vl(x),a.hc(x)===null&&yd(a,x,y);var b=a.Ef(y);if(Array.isArray(b))for(var E=b.length,z=0;z<E;z++)x=b[z],a.hc(x)===null&&yd(a,x,y)}Be.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):k0(this,a,!0),tn(a)&&(Io(a),this.lf!==""&&ds(a,this.lf,void 0),this.mf!==""&&ds(a,this.mf,void 0),this.je!==""&&ds(a,this.je,[])),a},Be.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!nl(a,y)},Be.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=nl(a,y),y!==void 0)){if(Mf(y))return y;Rt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Be.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=nl(a,x);b!==y&&(xd(this,b,a),ds(a,x,y),this.hc(y)===null&&yd(this,y,a),fl(this,"nodeGroupKey",Ha,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ds(a,x,y)}},ta.prototype.copyNodeData=function(a){return a===null?null:(a=lr.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||nl(a,this.Je)===void 0||ds(a,this.Je,void 0),a)},ta.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){wp(this,a,x,!0);return}if(y===this.linkToKeyProperty){wp(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Cp(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Cp(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=nl(a,y);b!==x&&(ds(a,y,x),this.Fs(a,y,b,x))},Be=ta.prototype,Be.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&&nl(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},Be.jp=function(a,y){lr.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,z=y;if(Mc(this,b,!0)===E){var ne=this.lf;ds(b,ne,z),fl(this,"linkFromKey",Ha,ne,b,E,z),typeof ne=="string"&&this.La(b,ne)}if(Mc(this,b,!1)===E&&(ne=this.mf,ds(b,ne,z),fl(this,"linkToKey",Ha,ne,b,E,z),typeof ne=="string"&&this.La(b,ne)),ne=this.Ef(b),Array.isArray(ne))for(var re=ne.length,oe=this.je,le=0;le<re;le++)ne[le]===E&&(ne[le]=z,fl(this,"linkLabelKeys",ts,oe,b,E,z,le,le))}},Be.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;ds(a,b,x),fl(this,"nodeGroupKey",Ha,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Be.Lv=function(){lr.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)wy(this,a[x])},Be.fm=function(a){lr.prototype.fm.call(this,a),a=this.wa(a);var y=hm(this,a);if(y!==null){var x=Si();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;fl(this,"nodeGroupKey",Ha,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(Mc(this,b,!0)===a&&(E=this.lf,fl(this,"linkFromKey",Ha,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),Mc(this,b,!1)===a&&(E=this.mf,fl(this,"linkToKey",Ha,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),E=this.Ef(b),Array.isArray(E))for(var z=E.length,ne=this.je,re=0;re<z;re++)E[re]===a&&(fl(this,"linkLabelKeys",ts,ne,b,a,a,re,re),x.push(b))}for(y=0;y<x.length;y++)xd(this,a,x[y]);Ni(x)}},Be.em=function(a){lr.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&yd(this,y,a)},Be.qp=function(a){lr.prototype.qp.call(this,a);var y=this.lh(a);xd(this,y,a)},Be.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=nl(a,y),y===void 0))return"";if(typeof y=="string")return y;Rt("getCategoryForLinkData found a non-string category for "+a+": "+y)},ta.prototype.getLinkCategoryForData=function(a){return this.ps(a)},ta.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=nl(a,x);b===void 0&&(b=""),b!==y&&(ds(a,x,y),fl(this,"linkCategory",Ha,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ds(a,x,y)}},ta.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Be=ta.prototype,Be.lm=function(a,y){lr.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function Dx(a,y,x){a.lp(x,a.ps(y)),a.wv(x,a.yx(y)),a.Bv(x,a.Bx(y)),a.Ls(x,a.Ef(y)),a.xv(x,a.zx(y)),a.Cv(x,a.Cx(y))}Be.Wj=function(){return!0},Be.ri=function(){return!0},Be.xs=function(){return!0},Be.Xj=function(){return!0},yt.Object.defineProperties(ta.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];tn(E)||Rt("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),Jo(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new $n,E=0;E<x;E++){var z=a[E],ne=this.Ac(z);ne===void 0||this.wb.I(ne)!==null?b.add(z):this.wb.add(ne,z)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),z=this.Ac(E),z!==void 0&&this.wb.add(z,E)}for(b=new Kn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,fl(this,"linkDataArray",Ha,"linkDataArray",this,y,a),y=0;y<x;y++)wy(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],z=this.Ac(E);z===void 0&&(this.Bs(E),z=this.Ac(E)),z!==void 0&&this.wb.add(z,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"}}}),ta.prototype.setCategoryForLinkData=ta.prototype.lp,ta.prototype.getCategoryForLinkData=ta.prototype.ps,ta.prototype.assignAllDataProperties=ta.prototype.Do,ta.prototype.setGroupKeyForNodeData=ta.prototype.mp,ta.prototype.getGroupKeyForNodeData=ta.prototype.lh,ta.prototype.isGroupForNodeData=ta.prototype.Yu,ta.prototype.copyLinkData=ta.prototype.Jo,ta.prototype.mergeLinkDataArray=ta.prototype.Zz,ta.prototype.removeLinkDataCollection=ta.prototype.lA,ta.prototype.removeLinkData=ta.prototype.bm,ta.prototype.addLinkDataCollection=ta.prototype.Ey,ta.prototype.addLinkData=ta.prototype.fi,ta.prototype.containsLinkData=ta.prototype.Jc,ta.prototype.makeLinkDataKeyUnique=ta.prototype.Bs,ta.prototype.findLinkDataForKey=ta.prototype.jh,ta.prototype.setKeyForLinkData=ta.prototype.Ks,ta.prototype.getKeyForLinkData=ta.prototype.Ac,ta.prototype.removeLabelKeyForLinkData=ta.prototype.Qx,ta.prototype.addLabelKeyForLinkData=ta.prototype.Bu,ta.prototype.setLabelKeysForLinkData=ta.prototype.Ls,ta.prototype.getLabelKeysForLinkData=ta.prototype.Ef,ta.prototype.setToPortIdForLinkData=ta.prototype.Cv,ta.prototype.getToPortIdForLinkData=ta.prototype.Cx,ta.prototype.setFromPortIdForLinkData=ta.prototype.xv,ta.prototype.getFromPortIdForLinkData=ta.prototype.zx,ta.prototype.setToKeyForLinkData=ta.prototype.Bv,ta.prototype.getToKeyForLinkData=ta.prototype.Bx,ta.prototype.setFromKeyForLinkData=ta.prototype.wv,ta.prototype.getFromKeyForLinkData=ta.prototype.yx,ta.prototype.clear=ta.prototype.clear;var R0=Object.freeze([]);ta.className="GraphLinksModel",nd.GraphLinksModel=ta,lr.constructGraphLinksModel=lr.constructGraphLinksModel=function(){return new ta},lr.initDiagramModel=Sy=function(){return new ta};function Du(a,y){lr.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(hn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Zt(Du,lr),Du.constructGraphLinksModel=lr.constructGraphLinksModel,Du.prototype.cloneProtected=function(a){lr.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Be=Du.prototype,Be.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" TreeModel";if(0<a){y+=`
|
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+sr(E)}}return y},Be.rm=function(){var a=lr.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Be.gp=function(a){lr.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Be.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Rt("applyIncrementalJson cannot change Model properties"),lr.prototype.fp.call(this,a)},Be.Vl=function(a){return a},Be.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=nl(a,y),y!==void 0)){if(Mf(y))return y;Rt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Be.qe=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Ke;if(x!=="")if(y=this.Vl(y),this.lb(a)){var b=nl(a,x);b!==y&&(xd(this,b,a),ds(a,x,y),this.hc(y)===null&&yd(this,y,a),fl(this,"nodeParentKey",Ha,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ds(a,x,y)}},Be.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=nl(a,y),y===void 0)?"":typeof y=="string"?y:(Rt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Du.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Du.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=nl(a,x);b===void 0&&(b=""),b!==y&&(ds(a,x,y),fl(this,"parentLinkCategory",Ha,x,a,b,y),typeof x=="string"&&this.La(a,x))}else ds(a,x,y)}},Du.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Du.prototype.copyNodeData=function(a){return a===null?null:(a=lr.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||nl(a,this.Ke)===void 0||ds(a,this.Ke,void 0),a)},Du.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=nl(a,y);b!==x&&(ds(a,y,x),this.Fs(a,y,b,x))},Be=Du.prototype,Be.jp=function(a,y){lr.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Be.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;ds(a,b,x),fl(this,"nodeParentKey",Ha,b,a,y,x),typeof b=="string"&&this.La(a,b)}},Be.fm=function(a){lr.prototype.fm.call(this,a),a=this.wa(a);var y=hm(this,a);if(y!==null){var x=Si();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;fl(this,"nodeParentKey",Ha,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)xd(this,a,x[y]);Ni(x)}},Be.em=function(a){lr.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&yd(this,y,a)},Be.qp=function(a){lr.prototype.qp.call(this,a);var y=this.mh(a);xd(this,y,a)},Be.lm=function(a,y){lr.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Be.Tl=function(){return!0},Be.xs=function(){return!0},yt.Object.defineProperties(Du.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"}}}),Du.prototype.setParentLinkCategoryForNodeData=Du.prototype.Ms,Du.prototype.getParentLinkCategoryForNodeData=Du.prototype.ss,Du.prototype.setParentKeyForNodeData=Du.prototype.qe,Du.prototype.getParentKeyForNodeData=Du.prototype.mh,Du.className="TreeModel",nd.TreeModel=Du;function Ds(a){ms.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=id,this.Ti=0,this.Zv=new tt,this.Jp=this.me=0,this.Xr=new ym,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=id,this.K=Iu,this.nd=Ep,this.hd=gy,this.tf=6,this.Nn=G0,a&&Object.assign(this,a)}Zt(Ds,ms),Ds.prototype.cloneProtected=function(a){ms.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},Ds.prototype.qb=function(a){a.classType===Ds?a===Z0||a===W0||a===z0||a===H0||a===Ep?this.sorting=a:a===ig||a===bp||a===Iu||a===Ff?this.direction=a:a===Qh||a===Lf||a===id||a===rd?this.arrangement=a:(a===_g||a===G0)&&(this.nodeDiameterFormula=a):ms.prototype.qb.call(this,a)},Ds.prototype.createNetwork=function(){return new Mp(this)},Ds.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 $n;y.addAll(a.iterator),a=new $n;var x=new $n,b=this.sort(y),E,z,ne=this.Jp,re=this.arrangement,oe=this.nodeDiameterFormula,le=this.radius;(!isFinite(le)||0>=le)&&(le=NaN);var ce=this.aspectRatio;(!isFinite(ce)||0>=ce)&&(ce=1);var pe=this.startAngle;isFinite(pe)||(pe=0);var we=this.sweepAngle;if((!isFinite(we)||360<we||1>we)&&(we=360),y=this.spacing,isFinite(y)||(y=NaN),re===rd&&oe===_g?re=id:re===rd&&oe!==_g&&(re=this.arrangement),(this.direction===ig||this.direction===bp)&&this.sorting!==Ep){for(oe=0;!(oe>=b.length)&&(a.add(b.M(oe)),!(oe+1>=b.length));oe+=2)x.add(b.M(oe+1));this.direction===ig?(this.arrangement===rd&&a.reverse(),b=new $n,b.addAll(a),b.addAll(x)):(this.arrangement===rd&&x.reverse(),b=new $n,b.addAll(x),b.addAll(a))}oe=b.length;for(var Ee=z=E=0;Ee<b.length;Ee++){var Ae=pe+we*z*(this.direction===Iu?1:-1)/oe,_e=b.M(Ee).diameter;isNaN(_e)&&(_e=Nf(b.M(Ee),Ae)),360>we&&(Ee===0||Ee===b.length-1)&&(_e/=2),E+=_e,z++}if(isNaN(le)||re===rd){if(isNaN(y)&&(y=6),re!==id&&re!==rd){for(z=-1/0,ne=0;ne<oe;ne++)Ee=b.M(ne),E=b.M(ne===oe-1?0:ne+1),isNaN(Ee.diameter)&&Nf(Ee,0),isNaN(E.diameter)&&Nf(E,0),z=Math.max(z,(Ee.diameter+E.diameter)/2);ne=z+y,re===Qh?le=(z+y)/(2*Math.PI/oe):le=_0(this,ne*(360<=we?oe:oe-1),ce,pe*Math.PI/180,we*Math.PI/180)}else le=_0(this,E+(360<=we?oe:oe-1)*(re!==rd?y:1.6*y),ce,pe*Math.PI/180,we*Math.PI/180);z=le*ce}else if(z=le*ce,Ee=Cy(this,le,z,pe*Math.PI/180,we*Math.PI/180),isNaN(y))(re===id||re===rd)&&(y=(Ee-E)/(360<=we?oe:oe-1));else if(re===id||re===rd)Ee=(Ee-E)/(360<=we?oe:oe-1),Ee<y?(le=_0(this,E+y*(360<=we?oe:oe-1),ce,pe*Math.PI/180,we*Math.PI/180),z=le*ce):y=Ee;else{for(ne=-1/0,E=0;E<oe;E++)Ae=b.M(E),_e=b.M(E===oe-1?0:E+1),isNaN(Ae.diameter)&&Nf(Ae,0),isNaN(_e.diameter)&&Nf(_e,0),ne=Math.max(ne,(Ae.diameter+_e.diameter)/2);ne+=y,E=_0(this,ne*(360<=we?oe:oe-1),ce,pe*Math.PI/180,we*Math.PI/180),E>le?(le=E,z=le*ce):ne=Ee/(360<=we?oe:oe-1)}if(this.kw=re,this.lc=le,this.Zm=ce,this.lw=pe,this.Wp=we,this.Ti=y,this.me=z,this.Jp=ne,y=b,b=this.kw,re=this.lc,le=this.lw,ce=this.Wp,pe=this.Ti,we=this.me,oe=this.Jp,this.direction!==ig&&this.direction!==bp||b!==rd)if(this.direction===ig||this.direction===bp){switch(ne=0,b){case Lf:ne=180*j0(this,re,we,le,oe)/Math.PI;break;case id:oe=y=0,ne=a.first(),ne!==null&&(y=Nf(ne,Math.PI/2)),ne=x.first(),ne!==null&&(oe=Nf(ne,Math.PI/2)),ne=180*j0(this,re,we,le,pe+(y+oe)/2)/Math.PI;break;case Qh:ne=ce/y.length}if(this.direction===ig){switch(b){case Lf:vm(this,a,le,Ff);break;case id:mm(this,a,le,Ff);break;case Qh:pm(this,a,ce/2,le,Ff)}switch(b){case Lf:vm(this,x,le+ne,Iu);break;case id:mm(this,x,le+ne,Iu);break;case Qh:pm(this,x,ce/2,le+ne,Iu)}}else{switch(b){case Lf:vm(this,x,le,Ff);break;case id:mm(this,x,le,Ff);break;case Qh:pm(this,x,ce/2,le,Ff)}switch(b){case Lf:vm(this,a,le+ne,Iu);break;case id:mm(this,a,le+ne,Iu);break;case Qh:pm(this,a,ce/2,le+ne,Iu)}}}else switch(b){case Lf:vm(this,y,le,this.direction);break;case id:mm(this,y,le,this.direction);break;case Qh:pm(this,y,ce,le,this.direction);break;case rd:Ix(this,y,ce,le,this.direction)}else Ix(this,y,ce,le-ce/2,Iu)}this.updateParts(),this.network=null,this.isValidLayout=!0};function pm(a,y,x,b,E){var z=a.Wp,ne=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=b+(E===Iu?oe*x/(360<=z?re:re-1):-(oe*x)/re),ce=y.M(oe),pe=ne*Math.tan(le)/a;pe=Math.sqrt((ne*ne+a*a*pe*pe)/(1+pe*pe)),ce.centerX=pe*Math.cos(le),ce.centerY=pe*Math.sin(le),ce.actualAngle=180*le/Math.PI}}function mm(a,y,x,b){var E=a.lc,z=a.me,ne=a.Ti;x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=y.M(oe),ce=y.M(oe===re-1?0:oe+1),pe=z*Math.sin(x);le.centerX=E*Math.cos(x),le.centerY=pe,le.actualAngle=180*x/Math.PI,isNaN(le.diameter)&&Nf(le,0),isNaN(ce.diameter)&&Nf(ce,0),le=j0(a,E,z,b===Iu?x:-x,(le.diameter+ce.diameter)/2+ne),x+=b===Iu?le:-le}}function vm(a,y,x,b){var E=a.lc,z=a.me,ne=a.Jp;x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=y.M(oe);le.centerX=E*Math.cos(x),le.centerY=z*Math.sin(x),le.actualAngle=180*x/Math.PI,le=j0(a,E,z,b===Iu?x:-x,ne),x+=b===Iu?le:-le}}function Ix(a,y,x,b,E){var z=a.Wp;if(a.mj=0,a.Xr=new ym,360>x){for(z=b+(E===Iu?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,kx(a,y,x,b,E)}else Ox(a,y,x,b,E);a.Xr.commit(y)}function Ox(a,y,x,b,E){var z=a.lc,ne=a.Ti,re=a.Zm,oe=z*Math.cos(b*Math.PI/180),le=a.me*Math.sin(b*Math.PI/180),ce=y.Fa();if(ce.length===3)ce[0].centerX=z,ce[0].centerY=0,ce[1].centerX=ce[0].centerX-ce[0].width/2-ce[1].width/2-ne,ce[1].y=ce[0].y,ce[2].centerX=(ce[0].centerX+ce[1].centerX)/2,ce[2].y=ce[0].y-ce[2].height-ne;else if(ce.length===4)ce[0].centerX=z,ce[0].centerY=0,ce[2].centerX=-ce[0].centerX,ce[2].centerY=ce[0].centerY,ce[1].centerX=0,ce[1].y=Math.min(ce[0].y,ce[2].y)-ce[1].height-ne,ce[3].centerX=0,ce[3].y=Math.max(ce[0].y+ce[0].height+ne,ce[2].y+ce[2].height+ne);else{z=tt.alloc();for(var pe=0;pe<ce.length&&(ce[pe].centerX=oe,ce[pe].centerY=le,!(pe>=ce.length-1));pe++)Tx(a,oe,le,ce,pe,E,z)||Rx(a,oe,le,ce,pe,E,z),oe=z.x,le=z.y;if(tt.free(z),a.mj++,!(23<a.mj)){oe=ce[0].centerX,le=ce[0].centerY,z=ce[ce.length-1].centerX,pe=ce[ce.length-1].centerY;var we=Math.abs(oe-z)-((ce[0].width+ce[ce.length-1].width)/2+ne),Ee=Math.abs(le-pe)-((ce[0].height+ce[ce.length-1].height)/2+ne);ne=0,1>Math.abs(Ee)?Math.abs(oe-z)<(ce[0].width+ce[ce.length-1].width)/2&&(ne=0):ne=0<Ee?Ee:1>Math.abs(we)?0:we,oe=Math.abs(z)>Math.abs(pe)?0<z!=le>pe:0<pe!=oe<z,(oe=E===Iu?oe:!oe)&&(ne=-Math.abs(ne),ne=Math.min(ne,-ce[ce.length-1].width),ne=Math.min(ne,-ce[ce.length-1].height)),a.Xr.compare(ne,ce),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>ce.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*re,Ox(a,y,x,b,E))}}}function kx(a,y,x,b,E){for(var z=a.lc,ne=a.me,re=a.Zm,oe=z*Math.cos(b*Math.PI/180),le=ne*Math.sin(b*Math.PI/180),ce=tt.alloc(),pe=y.Fa(),we=0;we<pe.length&&(pe[we].centerX=oe,pe[we].centerY=le,!(we>=pe.length-1));we++)Tx(a,oe,le,pe,we,E,ce)||Rx(a,oe,le,pe,we,E,ce),oe=ce.x,le=ce.y;if(tt.free(ce),a.mj++,!(23<a.mj)){if(oe=Math.atan2(le,oe),oe=E===Iu?a.gt-oe:oe-a.gt,oe=Math.abs(oe)<Math.abs(oe-2*Math.PI)?oe:oe-2*Math.PI,z=oe*(z+ne)/2,ne=a.Xr,Math.abs(z)<Math.abs(ne.Pl))for(ne.Pl=z,ne.mk=[],ne.tm=[],oe=0;oe<pe.length;oe++)ne.mk[oe]=pe[oe].bounds.x,ne.tm[oe]=pe[oe].bounds.y;1<Math.abs(z)&&(a.lc=8>a.mj?a.lc-z/(2*Math.PI):a.lc-(0<z?1.7:-2.3),a.me=a.lc*re,kx(a,y,x,b,E))}}function Tx(a,y,x,b,E,z,ne){var re=a.lc,oe=a.me,le=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var ce=!1;if(0<=x!=(z===Iu)){if(z=y+a,z>re){if(z=y-a,z<-re)return ne.x=z,ne.y=le,!1;ce=!0}}else if(z=y-a,z<-re){if(z=y+a,z>re)return ne.x=z,ne.y=le,!1;ce=!0}return le=Math.sqrt(1-Math.min(1,z*z/(re*re)))*oe,0>x!==ce&&(le=-le),Math.abs(x-le)>(b[E].height+b[E+1].height)/2?(ne.x=z,ne.y=le,!1):(ne.x=z,ne.y=le,!0)}function Rx(a,y,x,b,E,z,ne){var re=a.lc,oe=a.me,le=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(z===Iu)){if(z=x-a,z<-oe){if(z=x+a,z>oe){ne.x=le,ne.y=z;return}b=!0}}else if(z=x+a,z>oe){if(z=x-a,z<-oe){ne.x=le,ne.y=z;return}b=!0}le=Math.sqrt(1-Math.min(1,z*z/(oe*oe)))*re,0>y!==b&&(le=-le),ne.x=le,ne.y=z}Ds.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Ds.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))},Ds.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function Cy(a,y,x,b,E){var z=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,re=b!==void 0&&E!==void 0?E/(z+1):Math.PI/(2*(z+1)),oe=0,le=0;le<=z;le++){b!==void 0&&E!==void 0?oe=b+le*E/z:oe=le*Math.PI/(2*z);var ce=Math.sin(oe);ne+=Math.sqrt(1-a*a*ce*ce)*re}return b!==void 0&&E!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function _0(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?Cy(a,1,x,b,E):Cy(a,1,x))}function j0(a,y,x,b,E){if(.001>Math.abs(a.Zm-1))return E/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,ne=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(b+=Math.PI/2);for(var re=0;;re++){var oe=Math.sin(b+re*a);if(ne+=(y>x?y:x)*Math.sqrt(1-z*z*oe*oe)*a,ne>=E)return re*a}}Ds.prototype.sort=function(a){switch(this.sorting){case z0:break;case H0:a.reverse();break;case Z0:a.sort(this.comparer);break;case W0:a.sort(this.comparer),a.reverse();break;case Ep:return this.ak(IS(a));default:Rt("Invalid sorting type.")}return a};function IS(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new $n;for(var b=0;b<a.length;b++){var E=-1,z=-1;if(b===0)for(var ne=0;ne<a.length;ne++){var re=a.M(ne).edgesCount;re>E&&(E=re,z=ne)}else for(ne=0;ne<a.length;ne++)re=y[ne],re>E&&(E=re,z=ne);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),ne=z.sourceEdges;ne.next();)E=a.indexOf(ne.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(z=z.destinationEdges;z.next();)E=a.indexOf(z.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}Ds.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var b=a.M(x);y[x]=[];for(var E,z=b.destinationEdges;z.next();)E=a.indexOf(z.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(z=[],x=0;x<y.length;x++)z[x]=0;x=[];var ne=[],re=[];b=[],E=new $n;for(var oe=0,le=0;le<y.length;le++){var ce=y[le].length;if(ce===1)b.push(le);else if(ce===0)E.add(a.M(le));else{if(oe===0)x.push(le);else{for(var pe=ce=1/0,we=-1,Ee=[],Ae=0;Ae<x.length;Ae++)0>y[x[Ae]].indexOf(x[Ae===x.length-1?0:Ae+1])&&Ee.push(Ae===x.length-1?0:Ae+1);if(Ee.length===0)for(Ae=0;Ae<x.length;Ae++)Ee.push(Ae);for(Ae=0;Ae<Ee.length;Ae++){for(var _e=Ee[Ae],ct=y[le],Qe=0,Pt=0;Pt<ne.length;Pt++){var Et=z[ne[Pt]],Dt=z[re[Pt]];if(Et<Dt){var Vt=Et;Et=Dt}else Vt=Dt;if(Vt<_e&&_e<=Et)for(Dt=0;Dt<ct.length;Dt++){var mn=ct[Dt];0>x.indexOf(mn)||Vt<z[mn]&&z[mn]<Et||Vt===z[mn]||Et===z[mn]||Qe++}else for(Dt=0;Dt<ct.length;Dt++)mn=ct[Dt],0>x.indexOf(mn)||Vt<z[mn]&&z[mn]<Et&&Vt!==z[mn]&&Et!==z[mn]&&Qe++}for(ct=Qe,Pt=Qe=0;Pt<y[le].length;Pt++)Vt=x.indexOf(y[le][Pt]),0<=Vt&&(Vt=Math.abs(_e-(Vt>=_e?Vt+1:Vt)),Qe+=Vt<x.length+1-Vt?Vt:x.length+1-Vt);for(Pt=0;Pt<ne.length;Pt++)Vt=z[ne[Pt]],Et=z[re[Pt]],Vt>=_e&&Vt++,Et>=_e&&Et++,Vt>Et&&(Dt=Et,Et=Vt,Vt=Dt),Et-Vt<(x.length+2)/2==(Vt<_e&&_e<=Et)&&Qe++;(ct<ce||ct===ce&&Qe<pe)&&(ce=ct,pe=Qe,we=_e)}for(x.splice(we,0,le),ce=0;ce<x.length;ce++)z[x[ce]]=ce;for(ce=0;ce<y[le].length;ce++)pe=y[le][ce],0<=x.indexOf(pe)&&(ne.push(le),re.push(pe))}oe++}}for(ne=x.length;;){for(z=!0,re=0;re<b.length;re++)if(oe=b[re],le=y[oe][0],ce=x.indexOf(le),0<=ce){for(we=pe=0;we<y[le].length;we++)Ee=x.indexOf(y[le][we]),0>Ee||Ee===ce||(Ae=Ee>ce?Ee-ce:ce-Ee,pe+=Ee<ce!=Ae>ne-Ae?1:-1);x.splice(0>pe?ce:ce+1,0,oe),b.splice(re,1),re--}else z=!1;if(z)break;x.push(b[0]),b.splice(0,1)}for(y=0;y<x.length;y++)E.add(a.M(x[y]));return E},yt.Object.defineProperties(Ds.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!==rd&&a!==id&&a!==Lf&&a!==Qh||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Iu&&a!==Ff&&a!==ig&&a!==bp||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==z0&&a!==H0&&a!==Z0&&!W0&&a!==Ep||(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!==G0&&a!==_g||(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 id=new qt(Ds,"ConstantSpacing",0),Lf=new qt(Ds,"ConstantDistance",1),Qh=new qt(Ds,"ConstantAngle",2),rd=new qt(Ds,"Packed",3),Iu=new qt(Ds,"Clockwise",4),Ff=new qt(Ds,"Counterclockwise",5),ig=new qt(Ds,"BidirectionalLeft",6),bp=new qt(Ds,"BidirectionalRight",7),z0=new qt(Ds,"Forwards",8),H0=new qt(Ds,"Reverse",9),Z0=new qt(Ds,"Ascending",10),W0=new qt(Ds,"Descending",11),Ep=new qt(Ds,"Optimized",12),G0=new qt(Ds,"Pythagorean",13),_g=new qt(Ds,"Circular",14);Ds.className="CircularLayout",Ds.ConstantSpacing=id,Ds.ConstantDistance=Lf,Ds.ConstantAngle=Qh,Ds.Packed=rd,Ds.Clockwise=Iu,Ds.Counterclockwise=Ff,Ds.BidirectionalLeft=ig,Ds.BidirectionalRight=bp,Ds.Forwards=z0,Ds.Reverse=H0,Ds.Ascending=Z0,Ds.Descending=W0,Ds.Optimized=Ep,Ds.Pythagorean=G0,Ds.Circular=_g;function ym(){this.Pl=-1/0,this.tm=this.mk=null}ym.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},ym.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]}},ym.className="VertexArrangement";function Mp(a){Xa.call(this,a)}Zt(Mp,Xa),Mp.prototype.createVertex=function(){return new xm(this)},Mp.prototype.createEdge=function(){return new $0(this)},Mp.className="CircularNetwork";function xm(a){vl.call(this,a),this.u=this.Si=NaN}Zt(xm,vl);function Nf(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===rd)if(x.nodeDiameterFormula===_g)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===_g?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}yt.Object.defineProperties(xm.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)}}}),xm.className="CircularVertex";function $0(a){pc.call(this,a)}Zt($0,pc),$0.className="CircularEdge";function au(a){ms.call(this),this.ah=null,this.An=0,this.$d=new ci(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)}Zt(au,ms),au.prototype.cloneProtected=function(a){ms.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},au.prototype.createNetwork=function(){return new jg(this)},au.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 z=E.value;z.Vd=z.vertexes.count,z.sh=1,z.Hj=null,z.We=null}_x(this,0,a)}this.network=y;var ne=b=x.iterator;b=this.arrangementSpacing;var re=ne.count,oe=!0;z=E=0;for(var le=Si(),ce=0;ce<re+y.vertexes.count+2;ce++)le[ce]=null;re=0,ne.reset();for(var pe=Bn.alloc();ne.next();)if(ce=ne.value,this.computeBounds(ce,pe),oe)oe=!1,E=pe.x+pe.width/2,z=pe.y+pe.height/2,le[0]=new tt(pe.x+pe.width+b.width,pe.y),le[1]=new tt(pe.x,pe.y+pe.height+b.height),re=2;else{var we=jx(le,re,E,z,pe.width,pe.height,b),Ee=le[we],Ae=new tt(Ee.x+pe.width+b.width,Ee.y),_e=new tt(Ee.x,Ee.y+pe.height+b.height);for(we+1<re&&le.splice(we+1,0,null),le[we]=Ae,le[we+1]=_e,re++,we=Ee.x-pe.x,Ee=Ee.y-pe.y,ce=ce.vertexes.iterator;ce.next();)Ae=ce.value,Ae.centerX+=we,Ae.centerY+=Ee}for(Bn.free(pe),ce=y.vertexes.iterator;ce.next();)ne=ce.value,we=ne.bounds,2>re?(E=we.x+we.width/2,z=we.y+we.height/2,le[0]=new tt(we.x+we.width+b.width,we.y),le[1]=new tt(we.x,we.y+we.height+b.height),re=2):(oe=jx(le,re,E,z,we.width,we.height,b),pe=le[oe],Ee=new tt(pe.x+we.width+b.width,pe.y),we=new tt(pe.x,pe.y+we.height+b.height),oe+1<re&&le.splice(oe+1,0,null),le[oe]=Ee,le[oe+1]=we,re++,ne.centerX=pe.x+ne.width/2,ne.centerY=pe.y+ne.height/2);for(Ni(le),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)}}Hx(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},au.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},au.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 _x(a,y,x){if(OS(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=kS(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,_x(a,y+1,x),Hx(a,z),TS(a,E),y=E.vertexes.Fa(),y.sort(function(ne,re){return ne===null||re===null||ne===re?0:re.Vd-ne.Vd}),x=0;x<y.length;x++)RS(a,y[x]);a.Zf=b}}function OS(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 kS(a,y){for(var x=a.network,b=new jg(a),E=0;E<a.ah.length;E++){var z=a.ah[E];if(1<z.Vd){b.dh(z);var ne=new Zx;ne.Rs=z.Vd,ne.Ss=z.width,ne.Qs=z.height,ne.Sv=z.focus.x,ne.Tv=z.focus.y,z.We===null&&(z.We=new $n),z.We.add(ne),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var re=z.value;E=re.fromVertex,ne=re.toVertex,E.network===b&&ne.network===b?b.Bo(re):E.network===b?(re=E.Hj,re===null&&(re=new $n,E.Hj=re),re.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(re=ne.Hj,re===null&&(re=new $n,ne.Hj=re),re.add(E),ne.Vd--,ne.sh+=E.sh)}for(E=b.edges.iterator;E.next();)z=E.value,z.length*=Math.max(1,_t.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var oe=E.Hj;if(oe!==null&&0<oe.count&&(ne=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=ne))){for(var le=re=0,ce=oe.count-ne;ce<oe.count;ce++){var pe=oe.M(ce),we=null;for(z=pe.edges.iterator;z.next();){var Ee=z.value;if(Ee.Ax(pe)===E){we=Ee;break}}we!==null&&(le+=we.length,re+=pe.width*pe.height)}z=E.centerX,oe=E.centerY,ce=E.width,pe=E.height,we=E.focus,Ee=ce*pe,1>Ee&&(Ee=1),re=_t.sqrt((re+Ee+le*le*4/(ne*ne))/Ee),ne=(re-1)*ce/2,re=(re-1)*pe/2,E.bounds=new Bn(z-we.x-ne,oe-we.y-re,ce+2*ne,pe+2*re),E.focus=new tt(we.x+ne,we.y+re)}}return a.network=b,x}function TS(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 z=E.Sv,ne=E.Tv;b.bounds=new Bn(b.centerX-z,b.centerY-ne,E.Ss,E.Qs),b.focus=new tt(z,ne),b.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function RS(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var b=y.centerX,E=y.centerY,z=y.width,ne=y.height;y.We!==null&&0<y.We.count&&(ne=y.We.M(0),z=ne.Ss,ne=ne.Qs),z=_t.sqrt(z*z+ne*ne)/2;for(var re=!1,oe=ne=0,le=0,ce=y.vertexes.iterator;ce.next();){var pe=ce.value;1>=pe.Vd?oe++:(re=!0,le++,ne+=Math.atan2(y.centerY-pe.centerY,y.centerX-pe.centerX))}if(oe!==0){for(0<le&&(ne/=le),le=y=0,y=re?2*Math.PI/(oe+1):2*Math.PI/oe,oe%2===0&&(le=y/2),1<x.count&&x.sort(function(Ee,Ae){return Ee===null||Ae===null||Ee===Ae?0:Ae.width*Ae.height-Ee.width*Ee.height}),re=oe%2===0?0:1,x=x.iterator;x.next();)if(oe=x.value,!(1<oe.Vd||a.isFixed(oe))){for(ce=null,pe=oe.edges.iterator;pe.next();){ce=pe.value;break}pe=oe.width;var we=oe.height;pe=_t.sqrt(pe*pe+we*we)/2,ce=z+ce.length+pe,pe=ne+(y*(re/2>>1)+le)*(re%2===0?1:-1),oe.centerX=b+ce*Math.cos(pe),oe.centerY=E+ce*Math.sin(pe),re++}}}}function jx(a,y,x,b,E,z,ne){var re=9e19,oe=-1,le=0;e:for(;le<y;le++){var ce=a[le],pe=ce.x-x,we=ce.y-b;if(pe=pe*pe+we*we,pe<re){for(we=le-1;0<=we;we--)if(a[we].y>ce.y&&a[we].x-ce.x<E+ne.width)continue e;for(we=le+1;we<y;we++)if(a[we].x>ce.x&&a[we].y-ce.y<z+ne.height)continue e;oe=le,re=pe}}return oe}au.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},au.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 z=E.value;if(z.toVertex===a){x=z;break}}if(x===null){for(E=b.sourceEdges;E.next();)if(z=E.value,z.fromVertex===a){x=z;break}}x===null&&(x=this.network.Zj(a,b,null)),x.length=this.defaultCommentSpringLength}}};function zx(a,y){var x=a.bounds,b=x.x;a=x.y;var E=x.width;x=x.height;var z=y.bounds,ne=z.x;y=z.y;var re=z.width;return z=z.height,b+E<ne?a>y+z?(x=b+E-ne,a=a-y-z,_t.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,_t.sqrt(b*b+a*a)):ne-(b+E):b>ne+re?a>y+z?(x=b-ne-re,a=a-y-z,_t.sqrt(x*x+a*a)):a+x<y?(b=b-ne-re,a=a+x-y,_t.sqrt(b*b+a*a)):b-(ne+re):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function Hx(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,_S(a)););a.ah=null}function _S(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,z=x=x.centerY,ne=1;ne<y.length;ne++){var re=y[ne];re.forceX=0,re.forceY=0;var oe=re.centerX;re=re.centerY,b=Math.min(b,oe),E=Math.max(E,oe),x=Math.min(x,re),z=Math.max(z,re)}(E=E-b>z-x)?y.sort(function(_e,ct){return _e===null||ct===null||_e===ct?0:_e.centerX-ct.centerX}):y.sort(function(_e,ct){return _e===null||ct===null||_e===ct?0:_e.centerY-ct.centerY}),x=a.Zf;var le=b=re=0;for(z=0;z<y.length;z++){ne=y[z],b=ne.bounds,re=ne.focus,oe=b.x+re.x;var ce=b.y+re.y;b=ne.charge*a.electricalFieldX(oe,ce),le=ne.charge*a.electricalFieldY(oe,ce),b+=ne.mass*a.gravitationalFieldX(oe,ce),le+=ne.mass*a.gravitationalFieldY(oe,ce),ne.forceX+=b,ne.forceY+=le;for(var pe=z+1;pe<y.length;pe++){var we=y[pe];if(we!==ne){b=we.bounds,re=we.focus,le=b.x+re.x;var Ee=b.y+re.y;if(oe-le>x||le-oe>x){if(E)break}else if(ce-Ee>x||Ee-ce>x){if(!E)break}else{var Ae=zx(ne,we);1>Ae?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new K0),Ae=b.random(),re=b.random(),oe>le?(b=Math.abs(we.bounds.right-ne.bounds.x),b=(1+b)*Ae):oe<le?(b=Math.abs(we.bounds.x-ne.bounds.right),b=-(1+b)*Ae):(b=Math.max(we.width,ne.width),b=(1+b)*Ae-b/2),ce>Ee?(le=Math.abs(we.bounds.bottom-ne.bounds.y),le=(1+le)*re):oe<le?(le=Math.abs(we.bounds.y-ne.bounds.bottom),le=-(1+le)*re):(le=Math.max(we.height,ne.height),le=(1+le)*re-le/2)):(re=-(ne.charge*we.charge)/(Ae*Ae),b=(le-oe)/Ae*re,le=(Ee-ce)/Ae*re),ne.forceX+=b,ne.forceY+=le,we.forceX-=b,we.forceY-=le}}}}for(E=a.network.edges.iterator;E.next();)re=E.value,x=re.fromVertex,z=re.toVertex,ne=x.bounds,oe=x.focus,b=ne.x+oe.x,ne=ne.y+oe.y,ce=z.bounds,pe=z.focus,oe=ce.x+pe.x,ce=ce.y+pe.y,pe=zx(x,z),1>pe?(pe=a.randomNumberGenerator,pe===null&&(a.randomNumberGenerator=pe=new K0),re=pe.random(),pe=pe.random(),b=(b>oe?1:-1)*(1+(z.width>x.width?z.width:x.width))*re,le=(ne>ce?1:-1)*(1+(z.height>x.height?z.height:x.height))*pe):(re=re.stiffness*(pe-re.length),b=(oe-b)/pe*re,le=(ce-ne)/pe*re),x.forceX+=b,x.forceY+=le,z.forceX-=b,z.forceY-=le;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}au.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},au.prototype.moveFixedVertex=function(){},au.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},au.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Jt,y.toSpot=Jt)}},au.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Bn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Bn.free(x)}x=Bn.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()}Bn.free(x)},au.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},au.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},au.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},au.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},au.prototype.electricalFieldX=function(){return 0},au.prototype.electricalFieldY=function(){return 0},au.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},au.prototype.gravitationalFieldX=function(){return 0},au.prototype.gravitationalFieldY=function(){return 0},au.prototype.isFixed=function(a){return a.isFixed},yt.Object.defineProperties(au.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"&&Rt('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())}}}),au.className="ForceDirectedLayout";function Zx(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}Zx.className="ForceDirectedSubnet";function jg(a){Xa.call(this,a)}Zt(jg,Xa),jg.prototype.createVertex=function(){return new Sm(this)},jg.prototype.createEdge=function(){return new Pm(this)},jg.className="ForceDirectedNetwork";function Sm(a){vl.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}Zt(Sm,vl),yt.Object.defineProperties(Sm.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)}}}),Sm.className="ForceDirectedVertex";function Pm(a){pc.call(this,a),this.j=this.o=NaN}Zt(Pm,pc),yt.Object.defineProperties(Pm.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)}}}),Pm.className="ForceDirectedEdge";function K0(){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()}K0.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},K0.className="RandomNumberGenerator";function Ta(a){ms.call(this),this.kc=this.ie=25,this.K=0,this.Dk=J0,this.Zk=Q0,this.Qk=q0,this.bj=4,this.rk=ev,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)}Zt(Ta,ms),Ta.prototype.cloneProtected=function(a){ms.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},Ta.prototype.qb=function(a){a.classType===Ta?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:Rt("Unknown enum value: "+a):ms.prototype.qb.call(this,a)},Ta.prototype.createNetwork=function(){return new Fp(this)},Ta.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!==Cm&&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===Cm&&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,z=b.toVertex;if(!(b.valid||(E.node===null&&E.data===null||z.node===null&&z.data===null)&&E.layer===z.layer)){var ne=0,re=0,oe=0,le=0;if(b.link!==null){if(re=b.link,re===null)continue;var ce=E.node;if(ne=z.node,ce===null||ne===null)continue;var pe=re.fromNode;oe=re.toNode;for(var we=re.fromPort;we!==null&&!we.Ed();)we=we.panel;for(re=re.toPort;re!==null&&!re.Ed();)re=re.panel;if(b.rev){le=pe;var Ee=we;pe=oe,we=re,oe=le,re=Ee}var Ae=E.focus;le=z.focus;var _e=b.rev?z.bounds:E.bounds;Ee=tt.alloc(),ce!==pe?_e.w()&&pe.isVisible()?pe.actualBounds.w()?(Vh(pe,we,Oo,Ee),Ee.x+=pe.actualBounds.x-_e.x,Ee.y+=pe.actualBounds.y-_e.y):(Vh(pe,we,Oo,Ee),Ee.w()||Ee.assign(Ae)):Ee.assign(Ae):_e.w()?(Vh(pe,we,Oo,Ee),Ee.w()||Ee.assign(Ae)):Ee.assign(Ae),pe=b.rev?E.bounds:z.bounds,ce=tt.alloc(),ne!==oe?pe.w()&&oe.isVisible()?oe.actualBounds.w()?(Vh(oe,re,Oo,ce),ce.x+=oe.actualBounds.x-pe.x,ce.y+=oe.actualBounds.y-pe.y):(Vh(oe,re,Oo,ce),ce.w()||ce.assign(le)):ce.assign(le):pe.w()?(Vh(oe,re,Oo,ce),ce.w()||ce.assign(le)):ce.assign(le),this.K===90||this.K===270?(ne=Math.round((Ee.x-Ae.x)/this.kc),oe=Ee.x,re=Math.round((ce.x-le.x)/this.kc),le=ce.x):(ne=Math.round((Ee.y-Ae.y)/this.kc),oe=Ee.y,re=Math.round((ce.y-le.y)/this.kc),le=ce.y),tt.free(Ee),tt.free(ce),b.portFromColOffset=ne,b.portFromPos=oe,b.portToColOffset=re,b.portToPos=le}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Ee=E.layer,ce=z.layer,pe=0,_e=b.link,_e!==null){var ct=_e.fromPort,Qe=_e.toPort;if(ct!==null&&Qe!==null){var Pt=_e.fromNode;if(we=_e.toNode,Pt!==null&&we!==null){var Et=X0(this,!0),Dt=X0(this,!1),Vt=this.setsPortSpots?Et:_e.computeSpot(!0,ct);Ae=this.setsPortSpots?Dt:_e.computeSpot(!1,Qe);var mn=_e.isOrthogonal;Vt.$c()&&Vt.Hf(Dt)&&Ae.$c()&&Ae.Hf(Et)?pe=0:(Et=_e.getLinkPoint(Pt,ct,Vt,!0,mn,we,Qe,tt.alloc()),Dt=_e.getLinkDirection(Pt,ct,Et,Vt,!0,mn,we,Qe),tt.free(Et),Vt.ys()||Dt!==Jx(this,b,!0)?this.setsPortSpots&&Pt!==null&&Pt.ports.count===1&&b.rev&&(pe+=1):pe+=1,Vt=_e.getLinkPoint(we,Qe,Ae,!1,mn,Pt,ct,tt.alloc()),_e=_e.getLinkDirection(we,Qe,Vt,Ae,!1,mn,Pt,ct),tt.free(Vt),Ae.ys()||_e!==Jx(this,b,!1)?this.setsPortSpots&&we!==null&&we.ports.count===1&&b.rev&&(pe+=2):pe+=2)}}}if(we=pe,pe=we===1||we===3,(we=we===2||we===3)&&(Ae=a.createVertex(),Ae.node=null,Ae.Dj=1,Ae.layer=Ee,Ae.near=E,a.dh(Ae),E=a.Zj(E,Ae,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=oe,E.portToPos=0,E=Ae),_e=1,pe&&_e--,Ee-ce>_e&&0<Ee){for(b.valid=!1,Ae=a.createVertex(),Ae.node=null,Ae.Dj=2,Ae.layer=Ee-1,a.dh(Ae),E=a.Zj(E,Ae,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=we?0:ne,E.portToColOffset=0,E.portFromPos=we?0:oe,E.portToPos=0,E=Ae,Ee--;Ee-ce>_e&&0<Ee;)Ae=a.createVertex(),Ae.node=null,Ae.Dj=3,Ae.layer=Ee-1,a.dh(Ae),E=a.Zj(E,Ae,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=Ae,Ee--;E=a.Zj(Ae,z,b.link),E.valid=!pe,pe&&(Ae.near=z),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=re,E.portFromPos=0,E.portToPos=le}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=Bf(this,a),x=0,b=this.tc[a],z=0;z<b;z++)E=y[z],x+=this.nodeMinColumnSpace(E,!0),E.column=x,x+=1,x+=this.nodeMinColumnSpace(E,!1);this.Ra=Math.max(this.Ra,x-1),Af(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},Ta.prototype.linkMinLength=function(){return 1};function by(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}Ta.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},Ta.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 Uu(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 Oc(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 Wx(a,y,x){var b=Bf(a,y),E=a.tc[y];(a.Jn===null||a.Jn.length<E*E)&&(a.Jn=[]);for(var z=a.Jn,ne=0;ne<E;ne++){var re=0,oe=b[ne],le=oe.near;if(le!==null&&le.layer===oe.layer)if(oe=le.index,oe>ne)for(var ce=ne+1;ce<oe;ce++){var pe=b[ce];pe.near===le&&pe.Dj===le.Dj||re++}else for(ce=ne-1;ce>oe;ce--)pe=b[ce],pe.near===le&&pe.Dj===le.Dj||re++;var we;if(0<=x)for(oe=b[ne].sourceEdgesArrayAccess,le=0;le<oe.length;le++){var Ee=oe[le];if(Ee.valid&&Ee.fromVertex.layer!==y)for(pe=Ee.fromVertex.index,ce=Ee.portToPos,Ee=Ee.portFromPos,we=le+1;we<oe.length;we++){var Ae=oe[we];if(Ae.valid&&Ae.fromVertex.layer!==y){var _e=Ae.fromVertex.index,ct=Ae.portToPos;Ae=Ae.portFromPos,ce<ct&&(pe>_e||pe===_e&&Ee>Ae)&&re++,ct<ce&&(_e>pe||_e===pe&&Ae>Ee)&&re++}}}if(0>=x){for(oe=b[ne].destinationEdgesArrayAccess,le=0;le<oe.length;le++)if(Ee=oe[le],Ee.valid&&Ee.toVertex.layer!==y)for(pe=Ee.toVertex.index,ce=Ee.portToPos,Ee=Ee.portFromPos,we=le+1;we<oe.length;we++)Ae=oe[we],Ae.valid&&Ae.toVertex.layer!==y&&(_e=Ae.toVertex.index,ct=Ae.portToPos,Ae=Ae.portFromPos,Ee<Ae&&(pe>_e||pe===_e&&ce>ct)&&re++,Ae<Ee&&(_e>pe||_e===pe&&ct>ce)&&re++)}for(z[ne*E+ne]=re,oe=ne+1;oe<E;oe++){var Qe=0,Pt=0;if(0<=x){re=b[ne].sourceEdgesArrayAccess;var Et=b[oe].sourceEdgesArrayAccess;for(le=0;le<re.length;le++)if(Ee=re[le],Ee.valid&&Ee.fromVertex.layer!==y)for(pe=Ee.fromVertex.index,Ee=Ee.portFromPos,we=0;we<Et.length;we++)Ae=Et[we],Ae.valid&&Ae.fromVertex.layer!==y&&(_e=Ae.fromVertex.index,Ae=Ae.portFromPos,(pe<_e||pe===_e&&Ee<Ae)&&Pt++,(_e<pe||_e===pe&&Ae<Ee)&&Qe++)}if(0>=x){for(re=b[ne].destinationEdgesArrayAccess,Et=b[oe].destinationEdgesArrayAccess,le=0;le<re.length;le++)if(Ee=re[le],Ee.valid&&Ee.toVertex.layer!==y)for(pe=Ee.toVertex.index,ce=Ee.portToPos,we=0;we<Et.length;we++)Ae=Et[we],Ae.valid&&Ae.toVertex.layer!==y&&(_e=Ae.toVertex.index,ct=Ae.portToPos,(pe<_e||pe===_e&&ce<ct)&&Pt++,(_e<pe||_e===pe&&ct<ce)&&Qe++)}z[ne*E+oe]=Qe,z[oe*E+ne]=Pt}}return Af(a,y,b),z}Ta.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=Wx(this,y,1),b=this.tc[y],E=0;E<b;E++)for(var z=E;z<b;z++)a+=x[E*b+z];return a};function V0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,z=Bf(b,E),ne=b.tc[E],re=0,oe=0;oe<ne;oe++){var le=z[oe].destinationEdgesArrayAccess;if(le!==null)for(var ce=0;ce<le.length;ce++){var pe=le[ce];if(pe.valid&&pe.toVertex.layer!==E){var we=pe.fromVertex.column+pe.portFromColOffset,Ee=pe.toVertex.column+pe.portToColOffset;re+=(Math.abs(we-Ee)+1)*by(pe)}}}Af(b,E,z),y+=re}return y}Ta.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 Ey(a,y,x){for(var b=Bf(a,y),E=a.tc[y],z=[],ne=0;ne<E;ne++){var re=b[ne],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var le=null;0<=x&&(le=re.destinationEdgesArrayAccess);var ce=0,pe=0,we=re.near;if(we!==null&&we.layer===re.layer&&(ce+=we.column-1,pe++),oe!==null)for(we=0;we<oe.length;we++){re=oe[we];var Ee=re.fromVertex;re.valid&&!re.rev&&Ee.layer!==y&&(ce+=Ee.column,pe++)}if(le!==null)for(oe=0;oe<le.length;oe++)re=le[oe],we=re.toVertex,re.valid&&!re.rev&&we.layer!==y&&(ce+=we.column,pe++);z[ne]=pe===0?-1:ce/pe}return Af(a,y,b),z}function Gx(a,y,x){for(var b=Bf(a,y),E=a.tc[y],z=[],ne=0;ne<E;ne++){var re=b[ne],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var le=null;0<=x&&(le=re.destinationEdgesArrayAccess);var ce=0,pe=[],we=re.near;if(we!==null&&we.layer===re.layer&&(pe[ce]=we.column-1,ce++),re=void 0,oe!==null)for(we=0;we<oe.length;we++){re=oe[we];var Ee=re.fromVertex;re.valid&&!re.rev&&Ee.layer!==y&&(pe[ce]=Ee.column+re.portFromColOffset,ce++)}if(le!==null)for(oe=0;oe<le.length;oe++)re=le[oe],we=re.toVertex,re.valid&&!re.rev&&we.layer!==y&&(pe[ce]=we.column+re.portToColOffset,ce++);ce===0?z[ne]=-1:(pe.sort(function(Ae,_e){return Ae-_e}),le=ce>>1,z[ne]=ce&1?pe[le]:pe[le-1]+pe[le]>>1)}return Af(a,y,b),z}function wm(a,y,x,b,E,z){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();){var re=ne.value,oe=re.toVertex,le=y.layer-oe.layer;re=a.linkMinLength(re),le===re&&wm(a,oe,x,b,E,z)}if(z)for(ne=y.sourceEdges;ne.next();)re=ne.value,oe=re.fromVertex,le=oe.layer-y.layer,re=a.linkMinLength(re),le===re&&wm(a,oe,x,b,E,z)}}function My(a,y,x,b,E,z){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();)My(a,ne.value.toVertex,x,b,E,z);if(z)for(y=y.sourceEdges;y.next();)My(a,y.value.fromVertex,x,b,E,z)}}Ta.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Ny: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(;jS(a)!==null;){for(E=$x(a);E!==null;)b[x]=E,x--,E.valid=!1,E=$x(a);for(E=Kx(a);E!==null;)b[y]=E,y++,E.valid=!1,E=Kx(a);E=null;for(var z=0,ne=this.network.vertexes.iterator;ne.next();){var re=ne.value;if(re.valid){for(var oe=0,le=re.destinationEdges;le.next();)le.value.toVertex.valid&&oe++;le=0;for(var ce=re.sourceEdges;ce.next();)ce.value.fromVertex.valid&&le++;(E===null||z<oe-le)&&(E=re,z=oe-le)}}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 J0: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&&Ly(this,y);for(b.reset();b.next();)y=b.value,y.Ll===-1&&Ly(this,y);for(a.reset();a.next();)b=a.value,b.forest||(y=b.fromVertex,x=y.finish,E=b.toVertex,z=E.finish,E.Ll<y.Ll&&x<z&&(this.network.gm(b),b.rev=!0));break;case Cm: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(z=0;z<E.length;z++)E[z].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 jS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function $x(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 Kx(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 Ly(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,Ly(a,E))}y.finish=a.Kn,a.Kn++}Ta.prototype.assignLayers=function(){switch(this.Zk){case By:Vx(this);break;case Ay:for(var a,y=this.network.vertexes.iterator;y.next();)a=Yx(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 Q0:for(Vx(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&Xx(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 Vx(a){for(var y=a.network.vertexes.iterator;y.next();){var x=Ux(a,y.value);a.Ia=Math.max(x,a.Ia)}}function Ux(a,y){var x=0;if(y.layer===-1){for(var b=y.destinationEdges;b.next();){var E=b.value,z=E.toVertex;E=a.linkMinLength(E),x=Math.max(x,Ux(a,z)+E)}y.layer=x}else x=y.layer;return x}function Yx(a,y){var x=0;if(y.layer===-1){for(var b=y.sourceEdges;b.next();){var E=b.value,z=E.fromVertex;E=a.linkMinLength(E),x=Math.max(x,Yx(a,z)+E)}y.layer=x}else x=y.layer;return x}function Xx(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)Xx(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var b=y.sourceEdgesArrayAccess,E=b.length,z=0;z<E;z++){var ne=b[z],re=ne.fromVertex,oe=ne.toVertex;ne=a.linkMinLength(ne),re.layer-oe.layer>ne&&wm(a,re,0,-1,!0,!1)}for(wm(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,b=1/0,re=0,oe=null,ne=a.network.vertexes.iterator;ne.next();){var le=ne.value;if(le.component===1){var ce=0,pe=!1,we=le.sourceEdgesArrayAccess;E=we.length;for(var Ee=0;Ee<E;Ee++){var Ae=we[Ee],_e=Ae.fromVertex;ce+=1,_e.component!==1&&(z+=1,_e=_e.layer-le.layer,Ae=a.linkMinLength(Ae),b=Math.min(b,_e-Ae))}for(we=le.destinationEdgesArrayAccess,E=we.length,Ee=0;Ee<E;Ee++)Ae=we[Ee].toVertex,--ce,Ae.component!==1?--z:pe=!0;(oe===null||ce<re)&&!pe&&(oe=le,re=ce)}}if(0<z){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else oe.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(wm(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,z=0,re=null,oe=a.network.vertexes.iterator;oe.next();)if(ne=oe.value,ne.component===1){for(le=0,ce=!1,we=ne.sourceEdgesArrayAccess,pe=we.length,Ee=0;Ee<pe;Ee++)Ae=we[Ee].fromVertex,le+=1,Ae.component!==1?b+=1:ce=!0;for(we=ne.destinationEdgesArrayAccess,pe=we.length,Ee=0;Ee<pe;Ee++)Ae=we[Ee],_e=Ae.toVertex,--le,_e.component!==1&&(--b,_e=ne.layer-_e.layer,Ae=a.linkMinLength(Ae),E=Math.min(E,_e-Ae));(re===null||le>z)&&!ce&&(re=ne,z=le)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else re.component=0}}}function Jx(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}Ta.prototype.initializeIndices=function(){switch(this.Qk){default:case Iy: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 q0: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&&Qx(this,x);break;case Dy: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&&qx(this,x)}};function Qx(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],z=y[b+1];E.portFromColOffset>z.portFromColOffset&&(x=!0,y[b]=z,y[b+1]=E)}}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.toVertex,b.index===-1&&Qx(a,b))}function qx(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],z=y[x+1];E.portToColOffset>z.portToColOffset&&(b=!0,y[x]=z,y[x+1]=E)}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.fromVertex,b.index===-1&&qx(a,b))}Ta.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=Uu(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)U0(this,b,1),Hc(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=Uu(this)),b=this.Ia;0<=b;b--)U0(this,b,-1),Hc(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=Uu(this))}for(Oc(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)U0(this,b,0),Hc(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=Uu(this)),b=this.Ia;0<=b;b--)U0(this,b,0),Hc(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=Uu(this))}Oc(this,y);var z,ne,re;switch(this.rk){case Oy:break;case ky:for(re=a+1;(b=this.countCrossings())<re;)for(re=b,x=this.Ia;0<=x;x--)for(ne=0;ne<=x;ne++){for(z=!0;z;)for(z=!1,b=x;b>=ne;b--)z=Hc(this,b,-1)||z;for(E=this.countCrossings(),E>=a?Oc(this,y):(a=E,y=Uu(this)),z=!0;z;)for(z=!1,b=x;b>=ne;b--)z=Hc(this,b,1)||z;for(E=this.countCrossings(),E>=a?Oc(this,y):(a=E,y=Uu(this)),z=!0;z;)for(z=!1,b=ne;b<=x;b++)z=Hc(this,b,1)||z;for(E>=a?Oc(this,y):(a=E,y=Uu(this)),z=!0;z;)for(z=!1,b=ne;b<=x;b++)z=Hc(this,b,-1)||z;for(E>=a?Oc(this,y):(a=E,y=Uu(this)),z=!0;z;)for(z=!1,b=x;b>=ne;b--)z=Hc(this,b,0)||z;for(E>=a?Oc(this,y):(a=E,y=Uu(this)),z=!0;z;)for(z=!1,b=ne;b<=x;b++)z=Hc(this,b,0)||z;E>=a?Oc(this,y):(a=E,y=Uu(this))}break;default:case ev:for(x=this.Ia,ne=0,re=a+1;(b=this.countCrossings())<re;){for(re=b,z=!0;z;)for(z=!1,b=x;b>=ne;b--)z=Hc(this,b,-1)||z;for(E=this.countCrossings(),E>=a?Oc(this,y):(a=E,y=Uu(this)),z=!0;z;)for(z=!1,b=x;b>=ne;b--)z=Hc(this,b,1)||z;for(E=this.countCrossings(),E>=a?Oc(this,y):(a=E,y=Uu(this)),z=!0;z;)for(z=!1,b=ne;b<=x;b++)z=Hc(this,b,1)||z;for(E>=a?Oc(this,y):(a=E,y=Uu(this)),z=!0;z;)for(z=!1,b=ne;b<=x;b++)z=Hc(this,b,-1)||z;for(E>=a?Oc(this,y):(a=E,y=Uu(this)),z=!0;z;)for(z=!1,b=x;b>=ne;b--)z=Hc(this,b,0)||z;for(E>=a?Oc(this,y):(a=E,y=Uu(this)),z=!0;z;)for(z=!1,b=ne;b<=x;b++)z=Hc(this,b,0)||z;E>=a?Oc(this,y):(a=E,y=Uu(this))}}Oc(this,y)};function U0(a,y,x){var b=Bf(a,y),E=a.tc[y],z=Gx(a,y,x),ne=Ey(a,y,x);for(x=0;x<E;x++)ne[x]===-1&&(ne[x]=b[x].column),z[x]===-1&&(z[x]=b[x].column);for(var re=!0,oe;re;)for(re=!1,x=0;x<E-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&ne[x+1]<ne[x])&&(re=!0,oe=z[x],z[x]=z[x+1],z[x+1]=oe,oe=ne[x],ne[x]=ne[x+1],ne[x+1]=oe,oe=b[x],b[x]=b[x+1],b[x+1]=oe);for(x=z=0;x<E;x++)oe=b[x],oe.index=x,z+=a.nodeMinColumnSpace(oe,!0),oe.column=z,z+=1,z+=a.nodeMinColumnSpace(oe,!1);Af(a,y,b)}function Hc(a,y,x){var b=Bf(a,y),E=a.tc[y];x=Wx(a,y,x);var z,ne=[];for(z=0;z<E;z++)ne[z]=-1;var re=[];for(z=0;z<E;z++)re[z]=-1;for(var oe=!1,le=!0;le;)for(le=!1,z=0;z<E-1;z++){var ce=x[b[z].index*E+b[z+1].index],pe=x[b[z+1].index*E+b[z].index],we=0,Ee=0,Ae=b[z].column,_e=b[z+1].column,ct=a.nodeMinColumnSpace(b[z],!0),Qe=a.nodeMinColumnSpace(b[z],!1),Pt=a.nodeMinColumnSpace(b[z+1],!0),Et=a.nodeMinColumnSpace(b[z+1],!1);ct=Ae-ct+Pt,Qe=_e-Qe+Et;var Dt=b[z].sourceEdges.iterator;for(Dt.reset();Dt.next();)if(Pt=Dt.value,Et=Pt.fromVertex,Pt.valid&&Et.layer===y){for(Pt=0;b[Pt]!==Et;)Pt++;Pt<z&&(we+=2*(z-Pt),Ee+=2*(z+1-Pt)),Pt===z+1&&(we+=1),Pt>z+1&&(we+=4*(Pt-z),Ee+=4*(Pt-(z+1)))}for(Dt=b[z].destinationEdges.iterator,Dt.reset();Dt.next();)if(Pt=Dt.value,Et=Pt.toVertex,Pt.valid&&Et.layer===y){for(Pt=0;b[Pt]!==Et;)Pt++;Pt===z+1&&(Ee+=1)}for(Dt=b[z+1].sourceEdges.iterator,Dt.reset();Dt.next();)if(Pt=Dt.value,Et=Pt.fromVertex,Pt.valid&&Et.layer===y){for(Pt=0;b[Pt]!==Et;)Pt++;Pt<z&&(we+=2*(z+1-Pt),Ee+=2*(z-Pt)),Pt===z&&(Ee+=1),Pt>z+1&&(we+=4*(Pt-(z+1)),Ee+=4*(Pt-z))}for(Dt=b[z+1].destinationEdges.iterator,Dt.reset();Dt.next();)if(Pt=Dt.value,Et=Pt.toVertex,Pt.valid&&Et.layer===y){for(Pt=0;b[Pt]!==Et;)Pt++;Pt===z&&(we+=1)}Pt=Et=0,Dt=ne[b[z].index];var Vt=re[b[z].index],mn=ne[b[z+1].index],Ei=re[b[z+1].index];Dt!==-1&&(Et+=Math.abs(Dt-Ae),Pt+=Math.abs(Dt-Qe)),Vt!==-1&&(Et+=Math.abs(Vt-Ae),Pt+=Math.abs(Vt-Qe)),mn!==-1&&(Et+=Math.abs(mn-_e),Pt+=Math.abs(mn-ct)),Ei!==-1&&(Et+=Math.abs(Ei-_e),Pt+=Math.abs(Ei-ct)),(Ee<we-.5||Ee===we&&pe<ce-.5||Ee===we&&pe===ce&&Pt<Et-.5)&&(le=oe=!0,b[z].column=Qe,b[z+1].column=ct,ce=b[z],b[z]=b[z+1],b[z+1]=ce)}for(z=0;z<E;z++)b[z].index=z;return Af(a,y,b),oe}Ta.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&VS)!==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 z=E.value;y=z.layer,b=z.column,z=this.nodeMinColumnSpace(z,!1),x[y]=Math.max(x[y],b+z)}for(E.reset();E.next();)z=E.value,y=z.layer,b=z.column,z.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=Lp(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Lp(this,y,-1)||x;x=Lp(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Fy(this,y,1);for(y=this.Md-1;0<=y;y--)Fy(this,y,-1);Fy(this,this.Md,0)}if(a&&(eS(this,-1),eS(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Lp(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Lp(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Lp(this,y,0)||x}}else WS(this)};function Lp(a,y,x){for(var b=!1;zS(a,y,x);)b=!0;return b}function zS(a,y,x){var b,E=Bf(a,y),z=a.tc[y],ne=Ey(a,y,-1);if(0<x)for(b=0;b<z;b++)ne[b]=-1;var re=Ey(a,y,1);if(0>x)for(b=0;b<z;b++)re[b]=-1;for(var oe=!1,le=!0;le;)for(le=!1,b=0;b<z;b++){var ce=E[b].column,pe=a.nodeMinColumnSpace(E[b],!0),we=a.nodeMinColumnSpace(E[b],!1),Ee=0;0>b-1||ce-E[b-1].column-1>pe+a.nodeMinColumnSpace(E[b-1],!1)?Ee=ce-1:Ee=ce,pe=b+1>=z||E[b+1].column-ce-1>we+a.nodeMinColumnSpace(E[b+1],!0)?ce+1:ce;var Ae=we=0,_e=0;if(0>=x)for(var ct=E[b].sourceEdges.iterator;ct.next();){var Qe=ct.value,Pt=Qe.fromVertex;if(Qe.valid&&Pt.layer!==y){var Et=by(Qe),Dt=Qe.portFromColOffset;Qe=Qe.portToColOffset,Pt=Pt.column,we+=(Math.abs(ce+Qe-(Pt+Dt))+1)*Et,Ae+=(Math.abs(Ee+Qe-(Pt+Dt))+1)*Et,_e+=(Math.abs(pe+Qe-(Pt+Dt))+1)*Et}}if(0<=x)for(ct=E[b].destinationEdges.iterator;ct.next();)Qe=ct.value,Pt=Qe.toVertex,Qe.valid&&Pt.layer!==y&&(Et=by(Qe),Dt=Qe.portFromColOffset,Qe=Qe.portToColOffset,Pt=Pt.column,we+=(Math.abs(ce+Dt-(Pt+Qe))+1)*Et,Ae+=(Math.abs(Ee+Dt-(Pt+Qe))+1)*Et,_e+=(Math.abs(pe+Dt-(Pt+Qe))+1)*Et);Qe=Dt=Et=0,ct=ne[E[b].index],Pt=re[E[b].index],ct!==-1&&(Et+=Math.abs(ct-ce),Dt+=Math.abs(ct-Ee),Qe+=Math.abs(ct-pe)),Pt!==-1&&(Et+=Math.abs(Pt-ce),Dt+=Math.abs(Pt-Ee),Qe+=Math.abs(Pt-pe)),Ae<we||Ae===we&&Dt<Et?(le=oe=!0,E[b].column=Ee):(_e<we||_e===we&&Qe<Et)&&(le=oe=!0,E[b].column=pe)}return Af(a,y,E),a.normalize(),oe}function Fy(a,y,x){var b=Bf(a,y),E=a.tc[y],z=Gx(a,y,x),ne=[];for(x=0;x<E;x++)ne[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<E;x++){var re=b[x].column,oe=a.nodeMinColumnSpace(b[x],!0),le=a.nodeMinColumnSpace(b[x],!1),ce=0;if(ne[x]===-1)if(x===0&&x===E-1)ce=re;else if(x===0){var pe=b[x+1].column;pe-re===le+a.nodeMinColumnSpace(b[x+1],!0)?ce=re-1:ce=re}else x===E-1?(pe=b[x-1].column,ce=re-pe===oe+a.nodeMinColumnSpace(b[x-1],!1)?re+1:re):(pe=b[x-1].column,oe=pe+a.nodeMinColumnSpace(b[x-1],!1)+oe+1,pe=b[x+1].column,le=pe-a.nodeMinColumnSpace(b[x+1],!0)-le-1,ce=(oe+le)/2|0);else x===0&&x===E-1?ce=ne[x]:x===0?(pe=b[x+1].column,le=pe-a.nodeMinColumnSpace(b[x+1],!0)-le-1,ce=Math.min(ne[x],le)):x===E-1?(pe=b[x-1].column,oe=pe+a.nodeMinColumnSpace(b[x-1],!1)+oe+1,ce=Math.max(ne[x],oe)):(pe=b[x-1].column,oe=pe+a.nodeMinColumnSpace(b[x-1],!1)+oe+1,pe=b[x+1].column,le=pe-a.nodeMinColumnSpace(b[x+1],!0)-le-1,oe<ne[x]&&ne[x]<le?ce=ne[x]:oe>=ne[x]?ce=oe:le<=ne[x]&&(ce=le));ce!==re&&(z=!0,b[x].column=ce)}Af(a,y,b),a.normalize()}function HS(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,z=a.nodeMinColumnSpace(E,!0),ne=a.nodeMinColumnSpace(E,!1);if(E.column-z<=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 ZS(a,y){var x=y+1,b,E=[],z=[];for(b=0;b<=a.Ia;b++)E[b]=!1,z[b]=!1;for(var ne=a.network.vertexes.iterator;ne.next();){b=ne.value;var re=b.column-a.nodeMinColumnSpace(b,!0),oe=b.column+a.nodeMinColumnSpace(b,!1);re<=y&&oe>=y&&(E[b.layer]=!0),re<=x&&oe>=x&&(z[b.layer]=!0)}for(re=!0,x=!1,b=0;b<=a.Ia;b++)re=re&&!(E[b]&&z[b]);if(re)for(ne.reset();ne.next();)a=ne.value,a.column>y&&(--a.column,x=!0);return x}function eS(a,y){for(var x=0;x<=a.Ra;x++)for(;HS(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;ZS(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=Uu(a),z=V0(a);for(b=z+1;z<b;){b=z,tS(a,x,1);var ne=V0(a);ne>z?Oc(a,E):ne<z&&(z=ne,E=Uu(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=Uu(a),z=V0(a),b=z+1;z<b;)b=z,tS(a,x,-1),ne=V0(a),ne>z?Oc(a,E):ne<z&&(z=ne,E=Uu(a));a.normalize()}function tS(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&&(My(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;z<a.le*a.le;z++)y[z]=!1;for(E=[],z=0;z<(a.Ia+1)*(a.Ra+1);z++)E[z]=-1;for(b.reset();b.next();){z=b.value;for(var ne=z.layer,re=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),oe=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));re<=oe;re++)E[ne*(a.Ra+1)+re]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(ne=0;ne<a.Ra;ne++)E[z*(a.Ra+1)+ne]!==-1&&E[z*(a.Ra+1)+ne+1]!==-1&&E[z*(a.Ra+1)+ne]!==E[z*(a.Ra+1)+ne+1]&&(y[E[z*(a.Ra+1)+ne]*a.le+E[z*(a.Ra+1)+ne+1]]=!0);if(0>x)for(ne=a.Ra;0<ne;ne--)E[z*(a.Ra+1)+ne]!==-1&&E[z*(a.Ra+1)+ne-1]!==-1&&E[z*(a.Ra+1)+ne]!==E[z*(a.Ra+1)+ne-1]&&(y[E[z*(a.Ra+1)+ne]*a.le+E[z*(a.Ra+1)+ne-1]]=!0)}for(E=[],z=0;z<a.le;z++)E[z]=!0;for(ne=[],ne.push(0);ne.length!==0;)if(oe=ne[ne.length-1],ne.pop(),E[oe])for(E[oe]=!1,z=0;z<a.le;z++)y[oe*a.le+z]&&ne.splice(0,0,z);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 WS(a){for(var y=Si(),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 Kn,GS(y,x);var z=null,ne=null,re=null,oe=null,le=(a.ve&1)!==0,ce=(a.ve&2)!==0,pe=(a.ve&4)!==0,we=(a.ve&8)!==0;for(le&&(a.verticalAlignment(y,x,!0),z=Y0(a,y,!0,!1)),y.reverse(),pe&&(a.verticalAlignment(y,x,!1),re=Y0(a,y,!1,!1)),b=Hr(y),E=b.next();!E.done;E=b.next())E.value.reverse();we&&(a.verticalAlignment(y,x,!1),oe=Y0(a,y,!1,!0)),y.reverse(),ce&&(a.verticalAlignment(y,x,!0),ne=Y0(a,y,!0,!0)),Ni(y),a.u(z,ne,re,oe),a.network.vertexes.each(function(Ee){var Ae=Si();le&&Ae.push(z.get(Ee)),ce&&Ae.push(ne.get(Ee)),pe&&Ae.push(re.get(Ee)),we&&Ae.push(oe.get(Ee)),Ae.sort(function(ct,Qe){return ct-Qe});var _e=Ae.length;_e=(Ae[Math.floor((_e-1)/2)]+Ae[Math.ceil((_e-1)/2)])/2,Ni(Ae),Ee.zc=_e})}function GS(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,z=0,ne=a[b],re=a[b+1],oe=0;z<re.length;oe++){var le=re[oe];e:{if(le.node===null){var ce=Ty(le);if(0<ce.length){ce=ce[0].node===null;break e}}ce=!1}var pe=ce;if(oe===re.length-1||pe){for(ce=ne.length-1,pe&&(ce=Ty(le)[0].index);z<=oe;){if(le=re[z],!le.bo){pe=[];for(var we=Hr(le.sourceEdgesArrayAccess),Ee=we.next();!Ee.done;Ee=we.next())Ee=Ee.value,Ee.valid&&pe.push(Ee);le.bo=pe}for(le=Hr(le.bo),pe=le.next();!pe.done;pe=le.next())pe=pe.value,we=pe.fromVertex.index,(we<E||we>ce)&&y.add(pe);z++}E=ce}}}Ta.prototype.verticalAlignment=function(a,y,x){$S(a),a=Hr(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=Hr(b.value);for(var z=b.next();!z.done;z=b.next()){z=z.value;var ne=x?Ty(z):US(z),re=ne.length;if(0<re){ne.sort(function(pe,we){return pe.vi-we.vi});var oe=(re-1)/2;for(re=Math.floor(oe),oe=Math.ceil(oe);re<=oe;re++)if(z.align===z){var le=ne[re],ce=void 0;ce=x?tv(le,z):tv(z,le),!y.contains(ce)&&E<le.vi&&(le.align=z,z.root=le.root,z.align=le.root,E=le.vi)}}}}};function $S(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 Y0(a,y,x,b){for(var E=a.K===90||a.K===270,z=Hr(y),ne=z.next();!ne.done;ne=z.next()){var re=Hr(ne.value);for(ne=re.next();!ne.done;ne=re.next())ne=ne.value,ne.sd=ne,ne.shift=1/0,ne.zc=NaN,ne.qg=0}for(ne=a.K===90||a.K===270,z=Hr(y),re=z.next();!re.done;re=z.next()){re=Hr(re.value);for(var oe=re.next();!oe.done;oe=re.next())if(oe=oe.value,oe.root===oe){for(var le=0,ce=oe;ce.align!==oe;){var pe=ce.align,we=ne?ce.width:ce.height,Ee=ne?pe.width:pe.height;if(x){var Ae=tv(ce,pe),_e=Ae.portFromPos,ct=Ae.portToPos;Ae.link!==null&&(ce.node&&ce.node!==Ae.link.fromNode&&(_e=ne?ce.focusX:ce.focusY),pe.node&&pe.node!==Ae.link.toNode&&(ct=ne?pe.focusX:pe.focusY))}else Ae=tv(pe,ce),_e=Ae.portToPos,ct=Ae.portFromPos,Ae.link!==null&&(ce.node&&ce.node!==Ae.link.toNode&&(_e=ne?ce.focusX:ce.focusY),pe.node&&pe.node!==Ae.link.fromNode&&(ct=ne?pe.focusX:pe.focusY));we=b?ce.qg+(we-_e)-(Ee-ct):ce.qg+_e-ct,pe.qg=we,le=Math.min(le,we),ce=ce.align}ce=oe;do ce.qg=ce.qg-le,ce=ce.align;while(ce!==oe)}}for(x=Hr(y),ne=x.next();!ne.done;ne=x.next())for(z=Hr(ne.value),ne=z.next();!ne.done;ne=z.next())ne=ne.value,ne.root===ne&&nS(a,ne,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(ne=y[x][0],ne.sd===ne)){ne.sd.shift===1/0&&(ne.sd.shift=0),ne=x,re=0;do{for(z=y[ne][re];z.align!==z.root;)z=z.align,ne++,0<z.vi&&(re=iS(z,y),re.sd.shift=Math.min(re.sd.shift,z.sd.shift+z.zc+z.qg-(re.zc+re.qg+(E?re.width:re.height)+a.columnSpacing)));re=z.vi+1}while(ne<y.length&&re<y[ne].length&&z.sd===y[ne][re].sd)}for(a=new Ti,y=Hr(y),ne=y.next();!ne.done;ne=y.next())for(x=Hr(ne.value),ne=x.next();!ne.done;ne=x.next())ne=ne.value,ne.zc=ne.zc+ne.sd.shift+ne.qg,z=E?ne.width:ne.height,a.add(ne,b?-ne.zc-z:ne.zc);return a}function nS(a,y,x){if(isNaN(y.zc)){y.zc=0;var b=y;do{if(0<b.vi){var E=iS(b,x),z=E.root;nS(a,z,x),y.sd===y&&(y.sd=z.sd);var ne=a.K===90||a.K===270?E.width:E.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.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 iS(a,y){var x=a.Tz;return a=a.vi,1>a&&Rt("Could not determine previous vertex in layer"),y[x][a-1]}Ta.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=Si(),E=Si(),z=1/0,ne=0;4>ne;ne++)if(y[ne]){var re=KS(this,y[ne],b,E,ne);re<z&&(x=ne,z=re)}for(z={},ne=0;4>ne;z={delta:z.delta},ne++)y[ne]&&(z.delta=ne===0||ne===2?b[x]-b[ne]:E[x]-E[ne],z.delta!==0&&y[ne].each(function(oe){return function(le){le.value+=oe.delta}}(z)));Ni(b),Ni(E)};function KS(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var z=1/0,ne=-1/0;return y.each(function(re){var oe=re.key;re=re.value,oe=a.K===90||a.K===270?oe.width:oe.height,re<z&&(z=re),re+oe>ne&&(ne=re+oe)}),x[E]=z,b[E]=ne,ne-z}Ta.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=X0(this,!0),y=X0(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 X0(a,y){return a.K===270?y?vr:Mr:a.K===90?y?Mr:vr:a.K===180?y?br:Lr:y?Lr:br}Ta.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 z=1/0,ne=E=1/0,re=-1/0;a.next();){var oe=a.value,le=oe.layer,ce=oe.column|0;b?(ne=y.x+this.kc*ce,le=this.Kd[le]):(ne=this.Kd[le],le=y.y+this.kc*ce),oe.centerX=ne,oe.centerY=le,x&&isFinite(oe.zc)&&(b?oe.node?oe.x=y.x+oe.zc:oe.centerX=y.x+oe.zc:oe.node?oe.y=y.y+oe.zc:oe.centerY=y.y+oe.zc),z=Math.min(oe.x,z),E=Math.min(oe.y,E),b?(ne=z,re=Math.max(re,oe.bounds.right)):(ne=E,re=Math.max(re,oe.bounds.bottom))}for(this.xw=re-ne,z=y.x-z,y=y.y-E,this.Rf=new tt(x&&b?0:z,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},Ta.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 Bn(0,0,x,Math.abs(this.Ta[0]))):y.push(new Bn(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new Bn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Bn(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new Bn(0,0,Math.abs(this.Ta[0]),x)):y.push(new Bn(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new Bn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Bn(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},Ta.prototype.commitLayers=function(){},Ta.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,z=b.toNode,ne=b.fromPort,re=b.toPort;if(E!==null){var oe=E.findVisibleNode();oe!==null&&oe!==E&&(E=oe,ne=oe.port)}z!==null&&(oe=z.findVisibleNode(),oe!==null&&oe!==z&&(z=oe,re=oe.port));var le=y.computeSpot(!0,ne);oe=y.computeSpot(!1,re);var ce=x.fromVertex,pe=x.toVertex;if(x.valid)y.curve===Ec&&y.pointsCount===4&&(ce.column===pe.column&&this.alignOption===0?(x=y.getLinkPoint(E,ne,le,!0,!1,z,re),re=y.getLinkPoint(z,re,oe,!1,!1,E,ne),x.w()||x.set(E.actualBounds.center),re.w()||re.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+re.x)/3,(2*x.y+re.y)/3),y.yf((x.x+2*re.x)/3,(x.y+2*re.y)/3),y.yf(re.x,re.y)):(x=b=!1,ne!==null&&le===Ss&&(b=!0),re!==null&&oe===Ss&&(x=!0),(b||x)&&(oe=null,b&&(oe=y.getLinkPointFromPoint(E,ne,ne.ga(Oo),y.i(3),!0),oe.w()||oe.set(E.actualBounds.center),y.L(0,oe.x,oe.y)),E=null,x&&(E=y.getLinkPointFromPoint(z,re,re.ga(Oo),y.i(0),!1),E.w()||E.set(z.actualBounds.center),y.L(3,E.x,E.y)),oe&&(z=y.i(2),y.L(1,(2*oe.x+z.x)/3,(2*oe.y+z.y)/3)),E&&(z=y.i(1),y.L(2,(2*E.x+z.x)/3,(2*E.y+z.y)/3))))),y.zf();else if(ce.layer===pe.layer)y.zf();else{var we=!1,Ee=!1,Ae=this.ie,_e=y.firstPickIndex+1;if(y.isOrthogonal){Ee=!0;var ct=y.pointsCount;4<ct&&y.points.removeRange(2,ct-3)}else if(y.curve===Ec)we=!0,ct=y.pointsCount,4<ct&&y.points.removeRange(2,ct-3),ct===4&&(_e=2);else{ct=y.pointsCount;var Qe=le===Ss,Pt=oe===Ss;2<ct&&Qe&&Pt?y.points.removeRange(1,ct-2):3<ct&&Qe&&!Pt?y.points.removeRange(1,ct-3):3<ct&&!Qe&&Pt?y.points.removeRange(2,ct-2):4<ct&&!Qe&&!Pt&&y.points.removeRange(2,ct-3)}if(x.rev){for(;pe!==null&&ce!==pe;){var Et=ct=null;for(Qe=pe.sourceEdges.iterator;Qe.next()&&(Pt=Qe.value,Pt.link!==x.link||(ct=Pt.fromVertex,Et=Pt.toVertex,ct.node!==null)););if(ct===null)break;if(ct!==ce){Qe=y.i(_e-1).x,Pt=y.i(_e-1).y;var Dt=ct.centerX,Vt=ct.centerY;if(Ee)this.K===180||this.K===0?_e===y.firstPickIndex+1?(y.m(_e++,Qe,Pt),y.m(_e++,Qe,Vt)):(Et!==null?Et.centerY:Pt)!==Vt&&(Et=this.Ta[ct.layer-1]+this.Rf.x,y.m(_e++,Et,Pt),y.m(_e++,Et,Vt)):_e===y.firstPickIndex+1?(y.m(_e++,Qe,Pt),y.m(_e++,Dt,Pt)):(Et!==null?Et.centerX:Qe)!==Dt&&(Et=this.Ta[ct.layer-1]+this.Rf.y,y.m(_e++,Qe,Et),y.m(_e++,Dt,Et));else if(_e===y.firstPickIndex+1){Et=Math.max(10,this.he[pe.layer]);var mn=Math.max(10,this.Ld[pe.layer]);if(we)this.K===180?Dt<=pe.bounds.x?(pe=pe.bounds.x,y.m(_e++,pe-Et,Vt),y.m(_e++,pe,Vt),y.m(_e++,pe+mn,Vt)):(y.m(_e++,Dt-Et,Vt),y.m(_e++,Dt,Vt),y.m(_e++,Dt+mn,Vt)):this.K===90?Vt>=pe.bounds.bottom?(pe=pe.bounds.y+pe.bounds.height,y.m(_e++,Dt,pe+mn),y.m(_e++,Dt,pe),y.m(_e++,Dt,pe-Et)):(y.m(_e++,Dt,Vt+mn),y.m(_e++,Dt,Vt),y.m(_e++,Dt,Vt-Et)):this.K===270?Vt<=pe.bounds.y?(pe=pe.bounds.y,y.m(_e++,Dt,pe-Et),y.m(_e++,Dt,pe),y.m(_e++,Dt,pe+mn)):(y.m(_e++,Dt,Vt-Et),y.m(_e++,Dt,Vt),y.m(_e++,Dt,Vt+mn)):this.K===0&&(Dt>=pe.bounds.right?(pe=pe.bounds.x+pe.bounds.width,y.m(_e++,pe+mn,Vt),y.m(_e++,pe,Vt),y.m(_e++,pe-Et,Vt)):(y.m(_e++,Dt+mn,Vt),y.m(_e++,Dt,Vt),y.m(_e++,Dt-Et,Vt)));else{y.m(_e++,Qe,Pt);var Ei=0;this.K===180||this.K===0?((this.K===180?Dt>=pe.bounds.right:Dt<=pe.bounds.x)&&(Ei=(this.K===0?-Et:mn)/2),y.m(_e++,Qe+Ei,Vt)):((this.K===270?Vt>=pe.bounds.bottom:Vt<=pe.bounds.y)&&(Ei=(this.K===90?-Et:mn)/2),y.m(_e++,Dt,Pt+Ei)),y.m(_e++,Dt,Vt)}}else Et=Math.max(10,this.he[ct.layer]),mn=Math.max(10,this.Ld[ct.layer]),we?this.K===180?(y.m(_e++,Dt-Et-Ae,Vt),y.m(_e++,Math.min(Dt-Et+Ae/2,Dt),Vt),y.m(_e++,Dt,Vt),y.m(_e++,Dt,Vt),y.m(_e++,Math.max(Dt+mn-Ae/2,Dt),Vt),y.m(_e++,Dt+mn+Ae,Vt)):this.K===90?(y.m(_e++,Dt,Vt+mn+Ae),y.m(_e++,Dt,Math.max(Vt+mn-Ae/2,Vt)),y.m(_e++,Dt,Vt),y.m(_e++,Dt,Vt),y.m(_e++,Dt,Math.min(Vt-Et+Ae/2,Vt)),y.m(_e++,Dt,Vt-Et-Ae)):this.K===270?(y.m(_e++,Dt,Vt-Et-Ae),y.m(_e++,Dt,Math.min(Vt-Et+Ae/2,Vt)),y.m(_e++,Dt,Vt),y.m(_e++,Dt,Vt),y.m(_e++,Dt,Math.max(Vt+mn-Ae/2,Vt)),y.m(_e++,Dt,Vt+mn+Ae)):(y.m(_e++,Dt+mn+Ae,Vt),y.m(_e++,Math.max(Dt+mn-Ae/2,Dt),Vt),y.m(_e++,Dt,Vt),y.m(_e++,Dt,Vt),y.m(_e++,Math.min(Dt-Et+Ae/2,Dt),Vt),y.m(_e++,Dt-Et-Ae,Vt)):y.m(_e++,Dt,Vt)}pe=ct}(re===null||le!==Ss||Ee)&&(Qe=y.i(_e-1).x,Pt=y.i(_e-1).y,Dt=y.i(_e).x,Vt=y.i(_e).y,Ee?(Ae=this.Ld[ce.layer],this.K===180||this.K===0?(Ee=Pt,Ee>=ce.bounds.y&&Ee<=ce.bounds.bottom&&(this.K===180?Dt>=ce.bounds.x:Dt<=ce.bounds.right)&&(pe=ce.centerX+(this.K===180?-Ae:Ae),Ee<ce.bounds.y+ce.bounds.height/2?Ee=ce.bounds.y-this.kc/2:Ee=ce.bounds.bottom+this.kc/2,y.m(_e++,pe,Pt),y.m(_e++,pe,Ee)),y.m(_e++,Dt,Ee)):(Ee=Qe,Ee>=ce.bounds.x&&Ee<=ce.bounds.right&&(this.K===270?Vt>=ce.bounds.y:Vt<=ce.bounds.bottom)&&(pe=ce.centerY+(this.K===270?-Ae:Ae),Ee<ce.bounds.x+ce.bounds.width/2?Ee=ce.bounds.x-this.kc/2:Ee=ce.bounds.right+this.kc/2,y.m(_e++,Qe,pe),y.m(_e++,Ee,pe)),y.m(_e++,Ee,Vt)),y.m(_e++,Dt,Vt)):we?(Et=Math.max(10,this.he[ce.layer]),mn=Math.max(10,this.Ld[ce.layer]),this.K===180&&Dt>=ce.bounds.x?(pe=ce.bounds.x+ce.bounds.width,y.L(_e-2,pe,Pt),y.L(_e-1,pe+mn,Pt)):this.K===90&&Vt<=ce.bounds.bottom?(pe=ce.bounds.y,y.L(_e-2,Qe,pe),y.L(_e-1,Qe,pe-Et)):this.K===270&&Vt>=ce.bounds.y?(pe=ce.bounds.y+ce.bounds.height,y.L(_e-2,Qe,pe),y.L(_e-1,Qe,pe+mn)):this.K===0&&Dt<=ce.bounds.right&&(pe=ce.bounds.x,y.L(_e-2,pe,Pt),y.L(_e-1,pe-Et,Pt))):(Et=Math.max(10,this.he[ce.layer]),mn=Math.max(10,this.Ld[ce.layer]),Ee=0,this.K===180||this.K===0?((this.K===180?Dt<=ce.bounds.x:Dt>=ce.bounds.right)&&(Ee=(this.K===0?mn:-Et)/2),y.m(_e++,Dt+Ee,Pt)):((this.K===270?Vt<=ce.bounds.y:Vt>=ce.bounds.bottom)&&(Ee=(this.K===90?mn:-Et)/2),y.m(_e++,Qe,Vt+Ee)),y.m(_e++,Dt,Vt)))}else{for(;ce!==null&&ce!==pe;){for(Et=ct=null,ce=ce.destinationEdges.iterator;ce.next()&&(Qe=ce.value,Qe.link!==x.link||(ct=Qe.toVertex,Et=Qe.fromVertex,Et.node!==null&&(Et=null),ct.node!==null)););if(ct===null)break;ct!==pe&&(Qe=y.i(_e-1).x,Pt=y.i(_e-1).y,Dt=ct.centerX,Vt=ct.centerY,Ee?this.K===180||this.K===0?(Et!==null?Et.centerY:Pt)!==Vt&&(Et=this.Ta[ct.layer]+this.Rf.x,_e===y.firstPickIndex+1&&(Et=this.K===0?Math.max(Et,Qe):Math.min(Et,Qe)),y.m(_e++,Et,Pt),y.m(_e++,Et,Vt)):(Et!==null?Et.centerX:Qe)!==Dt&&(Et=this.Ta[ct.layer]+this.Rf.y,_e===y.firstPickIndex+1&&(Et=this.K===90?Math.max(Et,Pt):Math.min(Et,Pt)),y.m(_e++,Qe,Et),y.m(_e++,Dt,Et)):(Et=Math.max(10,this.he[ct.layer]),mn=Math.max(10,this.Ld[ct.layer]),we?this.K===180?(y.m(_e++,Dt+mn+Ae,Vt),y.m(_e++,Math.max(Dt+mn-Ae/2,Dt),Vt),y.m(_e++,Dt,Vt),y.m(_e++,Dt,Vt),y.m(_e++,Math.min(Dt-Et+Ae/2,Dt),Vt),y.m(_e++,Dt-Et-Ae,Vt)):this.K===90?(y.m(_e++,Dt,Vt-Et-Ae),y.m(_e++,Dt,Math.min(Vt-Et+Ae/2,Vt)),y.m(_e++,Dt,Vt),y.m(_e++,Dt,Vt),y.m(_e++,Dt,Math.max(Vt+mn-Ae/2,Vt)),y.m(_e++,Dt,Vt+mn+Ae)):this.K===270?(y.m(_e++,Dt,Vt+mn+Ae),y.m(_e++,Dt,Math.max(Vt+mn-Ae/2,Vt)),y.m(_e++,Dt,Vt),y.m(_e++,Dt,Vt),y.m(_e++,Dt,Math.min(Vt-Et+Ae/2,Vt)),y.m(_e++,Dt,Vt-Et-Ae)):(y.m(_e++,Dt-Et-Ae,Vt),y.m(_e++,Math.min(Dt-Et+Ae/2,Dt),Vt),y.m(_e++,Dt,Vt),y.m(_e++,Dt,Vt),y.m(_e++,Math.max(Dt+mn-Ae/2,Dt),Vt),y.m(_e++,Dt+mn+Ae,Vt)):this.K===180?(y.m(_e++,Dt+mn,Vt),y.m(_e++,Dt-Et,Vt)):this.K===90?(y.m(_e++,Dt,Vt-Et),y.m(_e++,Dt,Vt+mn)):this.K===270?(y.m(_e++,Dt,Vt+mn),y.m(_e++,Dt,Vt-Et)):(y.m(_e++,Dt-Et,Vt),y.m(_e++,Dt+mn,Vt)))),ce=ct}Ee&&(Qe=y.i(_e-1).x,Pt=y.i(_e-1).y,Dt=y.i(_e).x,Vt=y.i(_e).y,this.K===180||this.K===0?Pt!==Vt&&(Et=this.K===0?Math.min(Math.max((Dt+Qe)/2,this.Ta[pe.layer]+this.Rf.x),Dt):Math.max(Math.min((Dt+Qe)/2,this.Ta[pe.layer]+this.Rf.x),Dt),y.m(_e++,Et,Pt),y.m(_e++,Et,Vt)):Qe!==Dt&&(Et=this.K===90?Math.min(Math.max((Vt+Pt)/2,this.Ta[pe.layer]+this.Rf.y),Vt):Math.max(Math.min((Vt+Pt)/2,this.Ta[pe.layer]+this.Rf.y),Vt),y.m(_e++,Qe,Et),y.m(_e++,Dt,Et)))}b!==null&&we&&4<=y.pointsCount&&(ne!==null&&(ne=le===Ss?y.getLinkPointFromPoint(E,ne,ne.ga(Oo),y.i(3),!0):y.i(0),le===Ss&&(le=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+le.x)/2,le.y),y.L(2,b.x,(le.y+b.y)/2)):(y.L(1,le.x,(ne.y+le.y)/2),y.L(2,(le.x+b.x)/2,b.y))),ne.w()||ne.set(E.actualBounds.center),y.L(0,ne.x,ne.y)),re!==null&&(E=oe===Ss?y.getLinkPointFromPoint(z,re,re.ga(Oo),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),oe===Ss&&(re=y.i(y.pointsCount-3),oe=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+re.x)/2,re.y),y.L(y.pointsCount-2,oe.x,(re.y+oe.y)/2)):(y.L(y.pointsCount-2,re.x,(E.y+re.y)/2),y.L(y.pointsCount-3,(re.x+oe.x)/2,oe.y))),E.w()||E.set(z.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},Ta.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new $n,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 z=b.i(E),ne=b.i(E+1);if(this.B(z.y,ne.y)&&!this.B(z.x,ne.x)){var re=new Df;re.layer=Math.floor(z.y/2);var oe=b.i(0),le=b.i(b.pointsCount-1);if(re.first=oe.x*oe.x+oe.y,re.jc=le.x*le.x+le.y,re.rd=Math.min(z.x,ne.x),re.Ic=Math.max(z.x,ne.x),re.index=E,re.link=b,E+2<b.pointsCount){oe=b.i(E-1),le=b.i(E+2);var ce=0;oe.y<z.y?ce=le.y<z.y?3:z.x<ne.x?2:1:oe.y>z.y&&(ce=le.y>z.y?0:ne.x<z.x?2:1),re.j=ce}x.push(re)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,b=a+1;b<x.length&&x[b].layer===z;)b++;if(1<b-a)for(z=a;z<b;){for(ne=x[z].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-z,1<ne){for(this.zi(x,this.Js,z,z+ne),ce=1,re=x[z].jc,oe=z;oe<E;oe++)le=x[oe],le.jc!==re&&(ce++,re=le.jc);this.zi(x,this.Ux,z,z+ne);var pe=1;for(re=x[z].first,oe=z;oe<E;oe++)le=x[oe],le.first!==re&&(pe++,re=le.first);for(oe=!0,le=pe,ce<pe?(oe=!1,le=ce,re=x[z].jc,this.zi(x,this.Js,z,z+ne)):re=x[z].first,ce=0,pe=z;pe<E;pe++){var we=x[pe];(oe?we.first:we.jc)!==re&&(ce++,re=oe?we.first:we.jc);var Ee=we.link;z=Ee.i(we.index),ne=Ee.i(we.index+1);var Ae=this.linkSpacing*(ce-(le-1)/2);y++,Ee.uh(),Ee.L(we.index,z.x,z.y+Ae),Ee.L(we.index+1,ne.x,ne.y+Ae),Ee.zf()}}z=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++)z=b.i(E),ne=b.i(E+1),this.B(z.x,ne.x)&&!this.B(z.y,ne.y)&&(re=new Df,re.layer=Math.floor(z.x/2),oe=b.i(0),le=b.i(b.pointsCount-1),re.first=oe.x+oe.y*oe.y,re.jc=le.x+le.y*le.y,re.rd=Math.min(z.y,ne.y),re.Ic=Math.max(z.y,ne.y),re.index=E,re.link=b,E+2<b.pointsCount&&(oe=b.i(E-1),le=b.i(E+2),ce=0,oe.x<z.x?ce=le.x<z.x?3:z.y<ne.y?2:1:oe.x>z.x&&(ce=le.x>z.x?0:ne.y<z.y?2:1),re.j=ce),x.push(re));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,b=a+1;b<x.length&&x[b].layer===z;)b++;if(1<b-a)for(z=a;z<b;){for(ne=x[z].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-z,1<ne){for(this.zi(x,this.Js,z,z+ne),ce=1,re=x[z].jc,oe=z;oe<E;oe++)le=x[oe],le.jc!==re&&(ce++,re=le.jc);for(this.zi(x,this.Ux,z,z+ne),pe=1,re=x[z].first,oe=z;oe<E;oe++)le=x[oe],le.first!==re&&(pe++,re=le.first);for(oe=!0,le=pe,ce<pe?(oe=!1,le=ce,re=x[z].jc,this.zi(x,this.Js,z,z+ne)):re=x[z].first,ce=0,pe=z;pe<E;pe++)we=x[pe],(oe?we.first:we.jc)!==re&&(ce++,re=oe?we.first:we.jc),Ee=we.link,z=Ee.i(we.index),ne=Ee.i(we.index+1),Ae=this.linkSpacing*(ce-(le-1)/2),y++,Ee.uh(),Ee.L(we.index,z.x+Ae,z.y),Ee.L(we.index+1,ne.x+Ae,ne.y),Ee.zf()}z=E}a=b}}}},Be=Ta.prototype,Be.Vx=function(a,y){return a instanceof Df&&y instanceof Df&&a!==y?a.layer<y.layer?-1:a.layer>y.layer?1:a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Be.Ux=function(a,y){return a instanceof Df&&y instanceof Df&&a!==y?a.first<y.first?-1:a.first>y.first||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Be.Js=function(a,y){return a instanceof Df&&y instanceof Df&&a!==y?a.jc<y.jc?-1:a.jc>y.jc||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Be.B=function(a,y){return a-=y,-1<a&&1>a},Be.zi=function(a,y,x,b){var E=a.length,z=b-x;if(!(1>=z))if((0>x||x>=E-1)&&Rt("not in range 0 <= from < length: "+x),z===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 Bf(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 Af(a,y,x){a.He[a.tc[y]]=x}yt.Object.defineProperties(Ta.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()):Rt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Ny&&a!==J0&&a!==Cm||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==Q0&&a!==By&&a!==Ay||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==q0&&a!==Dy&&a!==Iy||(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!==Oy&&a!==ev&&a!==ky||(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 J0=new qt(Ta,"CycleDepthFirst",0),Ny=new qt(Ta,"CycleGreedy",1),Cm=new qt(Ta,"CycleFromLayers",2),Q0=new qt(Ta,"LayerOptimalLinkLength",0),By=new qt(Ta,"LayerLongestPathSink",1),Ay=new qt(Ta,"LayerLongestPathSource",2),q0=new qt(Ta,"InitDepthFirstOut",0),Dy=new qt(Ta,"InitDepthFirstIn",1),Iy=new qt(Ta,"InitNaive",2),Oy=new qt(Ta,"AggressiveNone",0),ev=new qt(Ta,"AggressiveLess",1),ky=new qt(Ta,"AggressiveMore",2),VS=8;Ta.className="LayeredDigraphLayout",Ta.CycleDepthFirst=J0,Ta.CycleGreedy=Ny,Ta.CycleFromLayers=Cm,Ta.LayerOptimalLinkLength=Q0,Ta.LayerLongestPathSink=By,Ta.LayerLongestPathSource=Ay,Ta.InitDepthFirstOut=q0,Ta.InitDepthFirstIn=Dy,Ta.InitNaive=Iy,Ta.AggressiveNone=Oy,Ta.AggressiveLess=ev,Ta.AggressiveMore=ky,Ta.PackNone=0,Ta.PackExpand=1,Ta.PackStraighten=2,Ta.PackMedian=4,Ta.PackAll=15,Ta.AlignNone=0,Ta.AlignUpperLeft=1,Ta.AlignUpperRight=2,Ta.AlignLowerLeft=4,Ta.AlignLowerRight=8,Ta.AlignAll=15;function Df(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Df.className="SegInfo";function Fp(a){Xa.call(this,a)}Zt(Fp,Xa),Fp.prototype.createVertex=function(){return new kc(this)},Fp.prototype.createEdge=function(){return new bm(this)},Fp.className="LayeredDigraphNetwork";function kc(a){vl.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}Zt(kc,vl);function rS(a,y){return a.index-y.index}function tv(a,y){if(!a.$n){for(var x=[],b=Hr(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=Hr(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Rt("Unable to find destination edge to given vertex")}function Ty(a){if(!a.co){for(var y=[],x=Hr(a.sourceEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.fromVertex);y.sort(rS),a.co=y}return a.co}function US(a){if(!a.ao){for(var y=[],x=Hr(a.destinationEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.toVertex);y.sort(rS),a.ao=y}return a.ao}kc.prototype.Cl=function(a){vl.prototype.Cl.call(this,a),this.bo=this.co=null},kc.prototype.Kl=function(a){vl.prototype.Kl.call(this,a),this.bo=this.co=null},kc.prototype.zl=function(a){vl.prototype.zl.call(this,a),this.$n=this.ao=null},kc.prototype.Jl=function(a){vl.prototype.Jl.call(this,a),this.$n=this.ao=null},yt.Object.defineProperties(kc.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)}}}),kc.prototype.deleteDestinationEdge=kc.prototype.Jl,kc.prototype.addDestinationEdge=kc.prototype.zl,kc.prototype.deleteSourceEdge=kc.prototype.Kl,kc.prototype.addSourceEdge=kc.prototype.Cl,kc.className="LayeredDigraphVertex";function bm(a){pc.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Zt(bm,pc),yt.Object.defineProperties(bm.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)}}}),bm.className="LayeredDigraphEdge";function Ro(a){ms.call(this),this.Ub=new Kn,this.Wn=ov,this.ud=nh,this.vo=sv,this.Bq=Vy,this.$v=[],this.td=!0,this.Rb=lv,this.$d=new ci(10,10).freeze();var y=new Wg(this);this.W=new Zc(y),this.Y=new Zc(y),this.ru=[],a&&Object.assign(this,a)}Zt(Ro,ms),Ro.prototype.cloneProtected=function(a){ms.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)},Ro.prototype.qb=function(a){a.classType===Ro?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:Rt("Unknown enum value: "+a):ms.prototype.qb.call(this,a)},Ro.prototype.createNetwork=function(){return new Wg(this)},Ro.prototype.makeNetwork=function(a){function y(b){if(b instanceof Di)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof hi){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 gn?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof mo?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Ro.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==uv&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof gn&&(y=a),this.path===ov&&y!==null?this.ud=y.isTreePathToChildren?nh:Hg:this.ud=this.path===ov?nh: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 Kn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Di?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Zc&&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,Ry(this,y));for(y=this.network.vertexes,a=null;a=YS(y),0<a.count;)y=oS(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Ry(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Zc&&sS(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Zc&&lS(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Zc&&uS(this,y);if(this.Cu(),this.layerStyle===cv){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===Uy)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 z=y.children[E];b=Math.max(b,x?z.width:z.height)}if(0<=b)for(E=0;E<y.children.length;E++)z=y.children[E],x?(y.angle===180&&(z.focusX+=b-z.width),z.width=b):(y.angle===270&&(z.focusY+=b-z.height),z.height=b)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Zc&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new Kn,this.isValidLayout=!0};function YS(a){var y=new Kn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Ro.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case nh:x.sourceEdges.count===0&&this.Ub.add(x);break;case Hg:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Rt("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=oS(this,a),a!==null&&this.Ub.add(a))};function oS(a,y){var x=999999,b=null;for(y=y.iterator;y.next();){var E=y.value;switch(a.ud){case nh:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case Hg:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:Rt("Unhandled path value "+a.ud.toString())}}return b}function Ry(a,y){if(y!==null){switch(a.ud){case nh:if(0<y.destinationEdges.count){for(var x=new $n,b=y.destinationVertexes;b.next();){var E=b.value;aS(a,y,E)&&x.add(E)}0<x.count&&(y.children=x.Fa())}break;case Hg:if(0<y.sourceEdges.count){for(x=new $n,b=y.sourceVertexes;b.next();)E=b.value,aS(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:Rt("Unhandled path value"+a.ud.toString())}for(x=y.children,b=x.length,E=0;E<b;E++){var z=x[E];z.initialized=!0,z.level=y.level+1,z.parent=y,a.Ub.remove(z)}for(y=0;y<b;y++)Ry(a,x[y])}}function aS(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}Ro.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 z=E=0;z<x.length;z++)x[z]!==y&&(b[E++]=x[z]);a.children=b}}};function sS(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===oh&&a.sortTreeVertexChildren(y);for(var x=0,b=y.childrenCount,E=0,z=y.children,ne=z.length,re=0;re<ne;re++){var oe=z[re];sS(a,oe),x+=oe.descendantCount+1,b=Math.max(b,oe.maxChildrenCount),E=Math.max(E,oe.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=b,y.maxGenerationCount=0<b?E+1:0}}function XS(a,y){switch(a.vo){default:case sv:return y.parent!==null?y.parent:a.W;case $y:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Gy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Wy:var x=!0;if(y.childrenCount===0)x=!1;else for(var b=y.children,E=b.length,z=0;z<E;z++)if(0<b[z].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}Ro.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(XS(this,a)),a.parent!==null&&a.parent.alignment===oh){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 lS(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,b=0;b<x;b++)lS(a,y[b])}}Ro.prototype.assignTreeVertexValues=function(){};function uS(a,y){if(y!==null){y.alignment!==oh&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)uS(a,y[b])}}Ro.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Np:break;case Mm:a.children.reverse();break;case Lm:a.children.sort(a.comparer);break;case Fm:a.children.sort(a.comparer),a.children.reverse();break;default:Rt("Unhandled sorting value "+a.sorting.toString())}},Ro.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ro.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=If(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var z=0,ne=0,re=0,oe=a.commentSpacing;if(a.node!==null)for(var le=a.node.Mu();le.next();){var ce=le.value;ce.category==="Comment"&&ce.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ce),ce.Va(),ce=ce.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(z=Math.max(z,ce.width),ne+=ce.height+Math.abs(re)):(z+=ce.width+Math.abs(re),ne=Math.max(ne,ce.height)),re=oe)}a.comments!==null&&(y&&!x||!E&&!b&&x||E&&b&&x?(z+=Math.abs(a.commentMargin),ne=Math.max(0,ne-a.height)):(ne+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),E=Bn.allocAt(0,0,a.bounds.width+z,a.bounds.height+ne),a.bounds=E,Bn.free(E))};function If(a){return a===qh||a===oh||a===ef||a===Nh}function Em(a){return a===qh||a===oh}function _y(a){var y=a.parent;if(y!==null){var x=y.alignment;if(If(x)){if(Em(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===ef)return!0}}return!1}Ro.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,b=a.angle,E=0,z=!1;x!==null&&(E=x.angle,z=x.alignment,z=If(z)),b=b===90||b===270,x=E===90||E===270;for(var ne=a.childrenCount===0,re=_y(a),oe=0,le=a.comments,ce=le.length,pe=tt.alloc(),we=0;we<ce;we++){var Ee=le[we],Ae=Ee.measuredBounds;if(b&&!ne||!z&&!x&&ne||z&&x&&ne){if(135<E&&!z||x&&re)if(0<=a.commentMargin)for(pe.h(a.bounds.x-a.commentMargin-Ae.width,a.bounds.y+oe),Ee.move(pe),Ee=Ee.Sd();Ee.next();){var _e=Ee.value;_e.fromSpot=br,_e.toSpot=Lr}else for(pe.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+oe),Ee.move(pe),Ee=Ee.Sd();Ee.next();)_e=Ee.value,_e.fromSpot=Lr,_e.toSpot=br;else if(0<=a.commentMargin)for(pe.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+oe),Ee.move(pe),Ee=Ee.Sd();Ee.next();)_e=Ee.value,_e.fromSpot=Lr,_e.toSpot=br;else for(pe.h(a.bounds.x+a.commentMargin-Ae.width,a.bounds.y+oe),Ee.move(pe),Ee=Ee.Sd();Ee.next();)_e=Ee.value,_e.fromSpot=br,_e.toSpot=Lr;oe=0<=a.commentSpacing?oe+(Ae.height+a.commentSpacing):oe+(a.commentSpacing-Ae.height)}else{if(135<E&&!z||!x&&re)if(0<=a.commentMargin)for(pe.h(a.bounds.x+oe,a.bounds.y-a.commentMargin-Ae.height),Ee.move(pe),Ee=Ee.Sd();Ee.next();)_e=Ee.value,_e.fromSpot=vr,_e.toSpot=Mr;else for(pe.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y-a.commentMargin),Ee.move(pe),Ee=Ee.Sd();Ee.next();)_e=Ee.value,_e.fromSpot=Mr,_e.toSpot=vr;else if(0<=a.commentMargin)for(pe.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y+a.commentMargin),Ee.move(pe),Ee=Ee.Sd();Ee.next();)_e=Ee.value,_e.fromSpot=Mr,_e.toSpot=vr;else for(pe.h(a.bounds.x+oe,a.bounds.y+a.commentMargin-Ae.height),Ee.move(pe),Ee=Ee.Sd();Ee.next();)_e=Ee.value,_e.fromSpot=vr,_e.toSpot=Mr;oe=0<=a.commentSpacing?oe+(Ae.width+a.commentSpacing):oe+(a.commentSpacing-Ae.width)}}if(tt.free(pe),y=oe-a.commentSpacing-(b?y.height:y.width),this.ud===nh)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)}},Ro.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 av:cS(this,a);break;case Nm:if(a.alignment===oh)cS(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=If(x)),b=_y(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=od(a);y=E===90||E===270;var z=0,ne=a.children,re=ne.length;for(x=0;x<re;x++)b=ne[x],z=Math.max(z,y?b.Da.width:b.Da.height);var oe=a.alignment;b=oe===ih;var le=oe===rh,ce=If(oe),pe=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var we=a.nodeSpacing,Ee=this.computeNodeIndent(a),Ae=a.rowSpacing,_e=0;(b||le||a.hm||a.im&&a.maxGenerationCount===1)&&(_e=Math.max(0,a.rowIndent)),b=a.width;var ct=a.height,Qe=0,Pt=0,Et=0,Dt=null,Vt=null,mn=0,Ei=0,Qi=0,Gi=0,di=0,Xn=0,co=0,Ur=0;if(ce&&!Em(oe)&&135<E&&ne.reverse(),Em(oe))if(1<re)for(var wa=0;wa<re;wa++)wa%2===0&&wa!==re-1&&(Ur=Math.max(Ur,y?ne[wa].Da.width:ne[wa].Da.height));else re===1&&(Ur=y?ne[0].Da.width:ne[0].Da.height);if(ce){switch(oe){case qh:Pt=135>E?dS(this,a,ne,Ur,Qe,Pt):hS(this,a,ne,Ur,Qe,Pt),Ur=Pt.x,Qe=Pt.width,Pt=Pt.height;break;case ef:for(Dt=0;Dt<re;Dt++)Vt=ne[Dt],pe=Vt.Da,Et=Xn===0?0:Ae,y?(Vt.S.h(z-pe.width,Gi+Et),Qe=Math.max(Qe,pe.width),Pt=Math.max(Pt,Gi+Et+pe.height),Gi+=Et+pe.height):(Vt.S.h(Qi+Et,z-pe.height),Qe=Math.max(Qe,Qi+Et+pe.width),Pt=Math.max(Pt,pe.height),Qi+=Et+pe.width),Xn++;break;case Nh:for(Dt=0;Dt<re;Dt++)Vt=ne[Dt],z=Vt.Da,pe=Xn===0?0:Ae,y?(Vt.S.h(we/2+a.focus.x,Gi+pe),Qe=Math.max(Qe,z.width),Pt=Math.max(Pt,Gi+pe+z.height),Gi+=pe+z.height):(Vt.S.h(Qi+pe,we/2+a.focus.y),Qe=Math.max(Qe,Qi+pe+z.width),Pt=Math.max(Pt,z.height),Qi+=pe+z.width),Xn++}Dt=ic(this,2),Vt=ic(this,2),y?(Dt[0].h(0,0),Dt[1].h(0,Pt),Vt[0].h(Qe,0)):(Dt[0].h(0,0),Dt[1].h(Qe,0),Vt[0].h(0,Pt)),Vt[1].h(Qe,Pt)}else for(wa=0;wa<re;wa++){var Ka=ne[wa],Al=Ka.Da;if(y){0<pe&&0<Xn&&Qi+we+Al.width>pe&&(Qi<z&&rg(a,oe,z-Qi,0,co,wa-1),di++,Xn=0,co=wa,Et=Pt,Qi=0,Gi=135<E?-Pt-Ae:Pt+Ae),iv(this,Ka,0,Gi);var jl=0;if(Xn===0)Dt=Ka.Yo,Vt=Ka.kp,mn=Al.width,Ei=Al.height,(Dt===null||Vt===null||E!==od(Ka))&&(Dt=ic(this,2),Vt=ic(this,2),Dt[0].h(0,0),Dt[1].h(0,Ei),Vt[0].h(mn,0),Vt[1].h(mn,Ei));else{var Su=Si();Ei=fS(this,a,Ka,Dt,Vt,mn,Ei,Su),jl=Ei.x,Dt=Su[0],Vt=Su[1],mn=Ei.width,Ei=Ei.height,Ni(Su),Qi<Al.width&&0>jl&&(zg(a,-jl,0,co,wa-1),rv(Dt,-jl,0),rv(Vt,-jl,0),jl=0)}Ka.S.h(jl,Gi),Qe=Math.max(Qe,mn),Pt=Math.max(Pt,Et+(di===0?0:Ae)+Al.height),Qi=mn}else 0<pe&&0<Xn&&Gi+we+Al.height>pe&&(Gi<z&&rg(a,oe,0,z-Gi,co,wa-1),di++,Xn=0,co=wa,Et=Qe,Gi=0,Qi=135<E?-Qe-Ae:Qe+Ae),iv(this,Ka,Qi,0),jl=0,Xn===0?(Dt=Ka.Yo,Vt=Ka.kp,mn=Al.width,Ei=Al.height,(Dt===null||Vt===null||E!==od(Ka))&&(Dt=ic(this,2),Vt=ic(this,2),Dt[0].h(0,0),Dt[1].h(mn,0),Vt[0].h(0,Ei),Vt[1].h(mn,Ei))):(Su=Si(),Ei=fS(this,a,Ka,Dt,Vt,mn,Ei,Su),jl=Ei.x,Dt=Su[0],Vt=Su[1],mn=Ei.width,Ei=Ei.height,Ni(Su),Gi<Al.height&&0>jl&&(zg(a,0,-jl,co,wa-1),rv(Dt,0,-jl),rv(Vt,0,-jl),jl=0)),Ka.S.h(Qi,jl),Pt=Math.max(Pt,Ei),Qe=Math.max(Qe,Et+(di===0?0:Ae)+Al.width),Gi=Ei;Xn++}switch(0<di&&(y?(Pt+=Math.max(0,x),Qi<Qe&&rg(a,oe,Qe-Qi,0,co,re-1),0<_e&&(le||zg(a,_e,0,0,re-1),Qe+=_e)):(Qe+=Math.max(0,x),Gi<Pt&&rg(a,oe,0,Pt-Gi,co,re-1),0<_e&&(le||zg(a,0,_e,0,re-1),Pt+=_e))),_e=le=0,oe){case Bp:y?le+=Qe/2-a.focus.x-Ee/2:_e+=Pt/2-a.focus.y-Ee/2;break;case Zg:0<di?y?le+=Qe/2-a.focus.x-Ee/2:_e+=Pt/2-a.focus.y-Ee/2:y?(Ur=ne[0].S.x+ne[0].la.x,le+=Ur+(ne[re-1].S.x+ne[re-1].la.x+2*ne[re-1].focus.x-Ur)/2-a.focus.x-Ee/2):(Ur=ne[0].S.y+ne[0].la.y,_e+=Ur+(ne[re-1].S.y+ne[re-1].la.y+2*ne[re-1].focus.y-Ur)/2-a.focus.y-Ee/2);break;case ih:y?(le-=Ee,Qe+=Ee):(_e-=Ee,Pt+=Ee);break;case rh:y?(le+=Qe-a.width+Ee,Qe+=Ee):(_e+=Pt-a.height+Ee,Pt+=Ee);break;case qh:y?1<re?le+=Ur+we/2-a.focus.x:le+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<re?_e+=Ur+we/2-a.focus.y:_e+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case ef:y?le+=Qe+we/2-a.focus.x:_e+=Pt+we/2-a.focus.y;break;case Nh:break;default:Pt=this.customAlignment(a,le,_e,Qe,Pt),le=Pt[0],_e=Pt[1],Qe=Pt[2],Pt=Pt[3]}for(Ee=0;Ee<re;Ee++)Ur=ne[Ee],y?Ur.S.h(Ur.S.x+Ur.la.x-le,Ur.S.y+(135<E?(ce?-Pt:-Ur.Da.height)+Ur.la.y-x:ct+x+Ur.la.y)):Ur.S.h(Ur.S.x+(135<E?(ce?-Qe:-Ur.Da.width)+Ur.la.x-x:b+x+Ur.la.x),Ur.S.y+Ur.la.y-_e);if(re=ne=0,ce?y?(Qe=jy(a,Qe,le),0>le&&(le=0),135<E&&(_e+=Pt+x),Pt+=ct+x,oe===Nh&&(ne+=we/2+a.focus.x),re+=ct+x):(135<E&&(le+=Qe+x),Qe+=b+x,Pt=zy(a,Pt,_e),0>_e&&(_e=0),oe===Nh&&(re+=we/2+a.focus.y),ne+=b+x):y?(a.comments===null?b>Qe&&(Qe=Hy(oe,b-Qe,0),ne=Qe.x,re=Qe.y,Qe=b,le=0):Qe=jy(a,Qe,le),0>le&&(ne-=le,le=0),135<E&&(_e+=Pt+x),Pt=Math.max(Math.max(Pt,ct),Pt+ct+x),re+=ct+x):(135<E&&(le+=Qe+x),Qe=Math.max(Math.max(Qe,b),Qe+b+x),a.comments===null?ct>Pt&&(Pt=Hy(oe,0,ct-Pt),ne=Pt.x,re=Pt.y,Pt=ct,_e=0):Pt=zy(a,Pt,_e),0>_e&&(re-=_e,_e=0),ne+=b+x),0<di)E=ic(this,4),di=ic(this,4),y?(E[2].h(0,ct+x),E[3].h(E[2].x,Pt),di[2].h(Qe,E[2].y),di[3].h(di[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(Qe,E[2].y),di[2].h(E[2].x,Pt),di[3].h(E[3].x,di[2].y));else{for(E=ic(this,Dt.length+2),di=ic(this,Vt.length+2),oe=0;oe<Dt.length;oe++)ce=Dt[oe],E[oe+2].h(ce.x+ne,ce.y+re);for(oe=0;oe<Vt.length;oe++)ce=Vt[oe],di[oe+2].h(ce.x+ne,ce.y+re)}y?(E[0].h(le,0),E[1].h(E[0].x,ct),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])),di[0].h(le+b,0),di[1].h(di[0].x,ct),di[2].y<di[1].y&&(di[2].x<di[0].x?di[2].assign(di[1]):di[1].assign(di[2])),di[3].y<di[2].y&&(di[3].x<di[0].x?di[3].assign(di[2]):di[2].assign(di[3])),E[2].y-=x/2,di[2].y-=x/2):(E[0].h(0,_e),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])),di[0].h(0,_e+ct),di[1].h(b,di[0].y),di[2].x<di[1].x&&(di[2].y<di[0].y?di[2].assign(di[1]):di[1].assign(di[2])),di[3].x<di[2].x&&(di[3].y<di[0].y?di[3].assign(di[2]):di[2].assign(di[3])),E[2].x-=x/2,di[2].x-=x/2),Sd(this,Dt),Sd(this,Vt),a.Yo=E,a.kp=di,a.la.h(le,_e),a.Da.h(Qe,Pt)}break;default:Rt("Unhandled compaction value "+a.compaction.toString())}}};function cS(a,y){if(y.childrenCount===0){var x=!1,b=0;y.parent!==null&&(b=y.parent.angle,x=y.parent.alignment,x=If(x));var E=_y(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=od(y),x=b===90||b===270;var z=0;E=y.children;for(var ne=E.length,re=0;re<ne;re++){var oe=E[re];z=Math.max(z,x?oe.Da.width:oe.Da.height)}var le=y.alignment,ce=le===ih,pe=le===rh;re=If(le);var we=Math.max(0,y.breadthLimit);oe=a.computeLayerSpacing(y);var Ee=y.nodeSpacing,Ae=a.computeNodeIndent(y),_e=ce||pe?0:Ae/2,ct=y.rowSpacing,Qe=0;(ce||pe||y.hm||y.im&&y.maxGenerationCount===1)&&(Qe=Math.max(0,y.rowIndent)),ce=y.width;var Pt=y.height,Et=0,Dt=0,Vt=0,mn=0,Ei=0,Qi=0,Gi=0,di=0,Xn=0,co=0;if(re&&!Em(le)&&135<b&&E.reverse(),Em(le))if(1<ne)for(var Ur=0;Ur<ne;Ur++){var wa=E[Ur],Ka=wa.Da;Ur%2===0&&Ur!==ne-1?Xn=Math.max(Xn,(x?Ka.width:Ka.height)+a.computeBusNodeSpacing(wa)-Ee):Ur%2!==0&&(co=Math.max(co,(x?Ka.width:Ka.height)+a.computeBusNodeSpacing(wa)-Ee))}else ne===1&&(Xn=x?E[0].Da.width:E[0].Da.height);if(re)switch(le){case qh:case oh:Dt=135>b?dS(a,y,E,Xn,Et,Dt):hS(a,y,E,Xn,Et,Dt),Xn=Dt.x,Et=Dt.width,Dt=Dt.height;break;case ef:for(we=0;we<ne;we++)_e=E[we],Vt=_e.Da,co=Gi===0?0:ct,x?(_e.S.h(z-Vt.width,Ei+co),Et=Math.max(Et,Vt.width),Dt=Math.max(Dt,Ei+co+Vt.height),Ei+=co+Vt.height):(_e.S.h(mn+co,z-Vt.height),Et=Math.max(Et,mn+co+Vt.width),Dt=Math.max(Dt,Vt.height),mn+=co+Vt.width),Gi++;break;case Nh:for(z=0;z<ne;z++)we=E[z],_e=we.Da,Vt=Gi===0?0:ct,x?(we.S.h(Ee/2+y.focus.x,Ei+Vt),Et=Math.max(Et,_e.width),Dt=Math.max(Dt,Ei+Vt+_e.height),Ei+=Vt+_e.height):(we.S.h(mn+Vt,Ee/2+y.focus.y),Et=Math.max(Et,mn+Vt+_e.width),Dt=Math.max(Dt,_e.height),mn+=Vt+_e.width),Gi++}else for(co=0;co<ne;co++)Ur=E[co],wa=Ur.Da,x?(0<we&&0<Gi&&mn+Ee+wa.width>we&&(mn<z&&rg(y,le,z-mn,0,di,co-1),Qi++,Gi=0,di=co,Vt=Dt,mn=0,Ei=135<b?-Dt-ct:Dt+ct),Ka=Gi===0?_e:Ee,iv(a,Ur,0,Ei),Ur.S.h(mn+Ka,Ei),Et=Math.max(Et,mn+Ka+wa.width),Dt=Math.max(Dt,Vt+(Qi===0?0:ct)+wa.height),mn+=Ka+wa.width):(0<we&&0<Gi&&Ei+Ee+wa.height>we&&(Ei<z&&rg(y,le,0,z-Ei,di,co-1),Qi++,Gi=0,di=co,Vt=Et,Ei=0,mn=135<b?-Et-ct:Et+ct),Ka=Gi===0?_e:Ee,iv(a,Ur,mn,0),Ur.S.h(mn,Ei+Ka),Dt=Math.max(Dt,Ei+Ka+wa.height),Et=Math.max(Et,Vt+(Qi===0?0:ct)+wa.width),Ei+=Ka+wa.height),Gi++;switch(0<Qi&&(x?(Dt+=Math.max(0,oe),mn<Et&&rg(y,le,Et-mn,0,di,ne-1),0<Qe&&(pe||zg(y,Qe,0,0,ne-1),Et+=Qe)):(Et+=Math.max(0,oe),Ei<Dt&&rg(y,le,0,Dt-Ei,di,ne-1),0<Qe&&(pe||zg(y,0,Qe,0,ne-1),Dt+=Qe))),Qe=pe=0,le){case Bp:x?pe+=Et/2-y.focus.x-Ae/2:Qe+=Dt/2-y.focus.y-Ae/2;break;case Zg:0<Qi?x?pe+=Et/2-y.focus.x-Ae/2:Qe+=Dt/2-y.focus.y-Ae/2:x?(a=E[0].S.x+E[0].la.x,pe+=a+(E[ne-1].S.x+E[ne-1].la.x+2*E[ne-1].focus.x-a)/2-y.focus.x-Ae/2):(a=E[0].S.y+E[0].la.y,Qe+=a+(E[ne-1].S.y+E[ne-1].la.y+2*E[ne-1].focus.y-a)/2-y.focus.y-Ae/2);break;case ih:x?(pe-=Ae,Et+=Ae):(Qe-=Ae,Dt+=Ae);break;case rh:x?(pe+=Et-y.width+Ae,Et+=Ae):(Qe+=Dt-y.height+Ae,Dt+=Ae);break;case qh:case oh:x?1<ne?pe+=Xn+Ee/2-y.focus.x:pe+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?Qe+=Xn+Ee/2-y.focus.y:Qe+=E[0].focus.y-y.focus.y+E[0].la.y;break;case ef:x?pe+=Et+Ee/2-y.focus.x:Qe+=Dt+Ee/2-y.focus.y;break;case Nh:break;default:a=a.customAlignment(y,pe,Qe,Et,Dt),pe=a[0],Qe=a[1],Et=a[2],Dt=a[3]}for(a=0;a<ne;a++)Ae=E[a],x?Ae.S.h(Ae.S.x+Ae.la.x-pe,Ae.S.y+(135<b?(re?-Dt:-Ae.Da.height)+Ae.la.y-oe:Pt+oe+Ae.la.y)):Ae.S.h(Ae.S.x+(135<b?(re?-Et:-Ae.Da.width)+Ae.la.x-oe:ce+oe+Ae.la.x),Ae.S.y+Ae.la.y-Qe);x?(Et=jy(y,Et,pe),0>pe&&(pe=0),135<b&&(Qe+=Dt+oe),Dt=Math.max(Math.max(Dt,Pt),Dt+Pt+oe)):(135<b&&(pe+=Et+oe),Et=Math.max(Math.max(Et,ce),Et+ce+oe),Dt=zy(y,Dt,Qe),0>Qe&&(Qe=0)),y.la.h(pe,Qe),y.Da.h(Et,Dt)}}Ro.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function dS(a,y,x,b,E,z){var ne=x.length;if(ne===0)return new Bn(b,0,E,z);if(ne===1)return y=x[0],E=y.Da.width,z=y.Da.height,new Bn(b,0,E,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,le=od(y)===90,ce=0,pe=0,we=0,Ee=0;Ee<ne;Ee++)if(!(Ee%2!==0||1<ne&&Ee===ne-1)){var Ae=x[Ee],_e=Ae.Da,ct=ce===0?0:oe;if(le){var Qe=a.computeBusNodeSpacing(Ae)-re;Ae.S.h(b-(_e.width+Qe),we+ct),E=Math.max(E,_e.width+Qe),z=Math.max(z,we+ct+_e.height),we+=ct+_e.height}else Qe=a.computeBusNodeSpacing(Ae)-re,Ae.S.h(pe+ct,b-(_e.height+Qe)),z=Math.max(z,_e.height+Qe),E=Math.max(E,pe+ct+_e.width),pe+=ct+_e.width;ce++}for(ce=0,Ae=pe,Ee=we,le?(pe=b+re,we=0):(pe=0,we=b+re),_e=0;_e<ne;_e++)if(_e%2!==0){ct=x[_e],Qe=ct.Da;var Pt=ce===0?0:oe;if(le){var Et=a.computeBusNodeSpacing(ct)-re;ct.S.h(pe+Et,we+Pt),E=Math.max(E,pe+Qe.width+Et),z=Math.max(z,we+Pt+Qe.height),we+=Pt+Qe.height}else Et=a.computeBusNodeSpacing(ct)-re,ct.S.h(pe+Pt,we+Et),E=Math.max(E,pe+Pt+Qe.width),z=Math.max(z,we+Qe.height+Et),pe+=Pt+Qe.width;ce++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,le?Math.max(Math.abs(Ee),Math.abs(we)):Math.max(Math.abs(Ae),Math.abs(pe))),le?(x.S.h(b+re/2-x.focus.x-x.la.x,z+a),le=b+re/2-x.focus.x-x.la.x,E=Math.max(E,le+ne.width),0>le&&(E-=le),z=Math.max(z,Math.max(Ee,we)+a+ne.height),0>x.S.x&&(b=nv(y,x.S.x,!1,b,re))):(x.S.h(E+a,b+re/2-x.focus.y-x.la.y),E=Math.max(E,Math.max(Ae,pe)+a+ne.width),we=b+re/2-x.focus.y-x.la.y,z=Math.max(z,we+ne.height),0>we&&(z-=we),0>x.S.y&&(b=nv(y,x.S.y,!0,b,re)))),new Bn(b,0,E,z)}function hS(a,y,x,b,E,z){var ne=x.length;if(ne===0)return new Bn(b,0,E,z);if(ne===1)return x=x[0],E=x.Da.width,z=x.Da.height,new Bn(b,0,E,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,le=od(y)===270,ce=0,pe=0,we=0,Ee=0;Ee<ne;Ee++)if(!(Ee%2!==0||1<ne&&Ee===ne-1)){var Ae=x[Ee],_e=Ae.Da,ct=ce===0?0:oe;if(le){var Qe=a.computeBusNodeSpacing(Ae)-re;we-=ct+_e.height,Ae.S.h(b-(_e.width+Qe),we),E=Math.max(E,_e.width+Qe),z=Math.max(z,Math.abs(we))}else Qe=a.computeBusNodeSpacing(Ae)-re,pe-=ct+_e.width,Ae.S.h(pe,b-(_e.height+Qe)),z=Math.max(z,_e.height+Qe),E=Math.max(E,Math.abs(pe));ce++}for(ce=0,Ae=pe,Ee=we,le?(pe=b+re,we=0):(pe=0,we=b+re),_e=0;_e<ne;_e++)if(_e%2!==0){ct=x[_e],Qe=ct.Da;var Pt=ce===0?0:oe;if(le){var Et=a.computeBusNodeSpacing(ct)-re;we-=Pt+Qe.height,ct.S.h(pe+Et,we),E=Math.max(E,pe+Qe.width+Et),z=Math.max(z,Math.abs(we))}else Et=a.computeBusNodeSpacing(ct)-re,pe-=Pt+Qe.width,ct.S.h(pe,we+Et),z=Math.max(z,we+Qe.height+Et),E=Math.max(E,Math.abs(pe));ce++}for(1<ne&&ne%2===1&&(oe=x[ne-1],ce=oe.Da,a=a.computeBusLastRowSpacing(oe,le?Math.max(Math.abs(Ee),Math.abs(we)):Math.max(Math.abs(Ae),Math.abs(pe))),le?(oe.S.h(b+re/2-oe.focus.x-oe.la.x,-z-ce.height-a),pe=b+re/2-oe.focus.x-oe.la.x,E=Math.max(E,pe+ce.width),0>pe&&(E-=pe),z=Math.max(z,Math.abs(Math.min(Ee,we))+a+ce.height),0>oe.S.x&&(b=nv(y,oe.S.x,!1,b,re))):(oe.S.h(-E-ce.width-a,b+re/2-oe.focus.y-oe.la.y),E=Math.max(E,Math.abs(Math.min(Ae,pe))+a+ce.width),we=b+re/2-oe.focus.y-oe.la.y,z=Math.max(z,we+ce.height),0>we&&(z-=we),0>oe.S.y&&(b=nv(y,oe.S.y,!0,b,re)))),y=0;y<ne;y++)re=x[y],le?re.S.h(re.S.x,re.S.y+z):re.S.h(re.S.x+E,re.S.y);return new Bn(b,0,E,z)}Ro.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Ro.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function nv(a,y,x,b,E){a=a.children;for(var z=a.length,ne=0;ne<z;ne++)x?a[ne].S.h(a[ne].S.x,a[ne].S.y-y):a[ne].S.h(a[ne].S.x-y,a[ne].S.y);return y=a[z-1],Math.max(b,x?y.la.y+y.focus.y-E/2:y.la.x+y.focus.x-E/2)}function jy(a,y,x){switch(a.alignment){case Zg:case Bp:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case ih:return a.width>y?a.width:y;case rh:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case qh:case oh:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case ef:return a.width-a.focus.x+a.nodeSpacing/2+y;case Nh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function zy(a,y,x){switch(a.alignment){case Zg:case Bp:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case ih:return a.height>y?a.height:y;case rh:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case qh:case oh:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case ef:return a.height-a.focus.y+a.nodeSpacing/2+y;case Nh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Hy(a,y,x){switch(a){case Bp:y/=2,x/=2;break;case Zg:y/=2,x/=2;break;case ih:x=y=0;break;case rh:break;default:Rt("Unhandled alignment value "+a.toString())}return new tt(y,x)}function rg(a,y,x,b,E,z){y=Hy(y,x,b),zg(a,y.x,y.y,E,z)}function zg(a,y,x,b,E){if(y!==0||x!==0)for(a=a.children;b<=E;b++){var z=a[b].S;z.x+=y,z.y+=x}}function iv(a,y,x,b){var E=y.parent;switch(a.ud){case nh:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case Hg:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:Rt("Unhandled path value "+a.ud.toString())}}function rv(a,y,x){for(var b=0;b<a.length;b++){var E=a[b];E.x+=y,E.y+=x}}function fS(a,y,x,b,E,z,ne,re){var oe=od(y),le=oe===90||oe===270,ce=y.nodeSpacing;y=b;var pe=E;b=z;var we=ne,Ee=x.Yo,Ae=x.kp;ne=x.Da;var _e=le?Math.max(we,ne.height):Math.max(b,ne.width);if((Ee===null||oe!==od(x))&&(Ee=ic(a,2),Ae=ic(a,2),le?(Ee[0].h(0,0),Ee[1].h(0,ne.height),Ae[0].h(ne.width,0),Ae[1].h(Ae[0].x,Ee[1].y)):(Ee[0].h(0,0),Ee[1].h(ne.width,0),Ae[0].h(0,ne.height),Ae[1].h(Ee[1].x,Ae[0].y))),le){if(we=9999999,!(pe===null||2>pe.length||Ee===null||2>Ee.length))for(E=x=0;x<pe.length&&E<Ee.length;){z=pe[x];var ct=Ee[E];oe=ct.x,le=ct.y,oe+=b;var Qe=z;x+1<pe.length&&(Qe=pe[x+1]);var Pt=ct;ct=Pt.x,Pt=Pt.y,E+1<Ee.length&&(Pt=Ee[E+1],ct=Pt.x,Pt=Pt.y,ct+=b);var Et=we;z.y===le?Et=oe-z.x:z.y>le&&z.y<Pt?Et=oe+(z.y-le)/(Pt-le)*(ct-oe)-z.x:le>z.y&&le<Qe.y&&(Et=oe-(z.x+(le-z.y)/(Qe.y-z.y)*(Qe.x-z.x))),Et<we&&(we=Et),Qe.y<=z.y?x++:Pt<=le?E++:(Qe.y<=Pt&&x++,Pt<=Qe.y&&E++)}if(we=b-we,we+=ce,x=Ee,E=we,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ce=ic(a,y.length+x.length),b=z=oe=0;z<x.length&&x[z].y<y[0].y;)le=x[z++],ce[b++].h(le.x+E,le.y);for(;oe<y.length;)le=y[oe++],ce[b++].h(le.x,le.y);for(oe=y[y.length-1].y;z<x.length&&x[z].y<=oe;)z++;for(;z<x.length&&x[z].y>oe;)le=x[z++],ce[b++].h(le.x+E,le.y);for(x=ic(a,b),oe=0;oe<b;oe++)x[oe].assign(ce[oe]);Sd(a,ce),b=x}if(z=Ae,oe=we,pe===null||2>pe.length||z===null||2>z.length)E=null;else{for(ce=ic(a,pe.length+z.length),E=le=x=0;x<pe.length&&pe[x].y<z[0].y;)Qe=pe[x++],ce[E++].h(Qe.x,Qe.y);for(;le<z.length;)Qe=z[le++],ce[E++].h(Qe.x+oe,Qe.y);for(z=z[z.length-1].y;x<pe.length&&pe[x].y<=z;)x++;for(;x<pe.length&&pe[x].y>z;)oe=pe[x++],ce[E++].h(oe.x,oe.y);for(z=ic(a,E),x=0;x<E;x++)z[x].assign(ce[x]);Sd(a,ce),E=z}return z=Math.max(0,we)+ne.width,ne=_e,Sd(a,y),Sd(a,Ee),Sd(a,pe),Sd(a,Ae),re[0]=b,re[1]=E,new Bn(we,0,z,ne)}if(b=9999999,!(pe===null||2>pe.length||Ee===null||2>Ee.length))for(E=x=0;x<pe.length&&E<Ee.length;)z=pe[x],ct=Ee[E],oe=ct.x,le=ct.y,le+=we,Qe=z,x+1<pe.length&&(Qe=pe[x+1]),Pt=ct,ct=Pt.x,Pt=Pt.y,E+1<Ee.length&&(Pt=Ee[E+1],ct=Pt.x,Pt=Pt.y,Pt+=we),Et=b,z.x===oe?Et=le-z.y:z.x>oe&&z.x<ct?Et=le+(z.x-oe)/(ct-oe)*(Pt-le)-z.y:oe>z.x&&oe<Qe.x&&(Et=le-(z.y+(oe-z.x)/(Qe.x-z.x)*(Qe.y-z.y))),Et<b&&(b=Et),Qe.x<=z.x?x++:ct<=oe?E++:(Qe.x<=ct&&x++,ct<=Qe.x&&E++);if(we-=b,we+=ce,x=Ee,E=we,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ce=ic(a,y.length+x.length),b=z=oe=0;z<x.length&&x[z].x<y[0].x;)le=x[z++],ce[b++].h(le.x,le.y+E);for(;oe<y.length;)le=y[oe++],ce[b++].h(le.x,le.y);for(oe=y[y.length-1].x;z<x.length&&x[z].x<=oe;)z++;for(;z<x.length&&x[z].x>oe;)le=x[z++],ce[b++].h(le.x,le.y+E);for(x=ic(a,b),oe=0;oe<b;oe++)x[oe].assign(ce[oe]);Sd(a,ce),b=x}if(z=Ae,oe=we,pe===null||2>pe.length||z===null||2>z.length)E=null;else{for(ce=ic(a,pe.length+z.length),E=le=x=0;x<pe.length&&pe[x].x<z[0].x;)Qe=pe[x++],ce[E++].h(Qe.x,Qe.y);for(;le<z.length;)Qe=z[le++],ce[E++].h(Qe.x,Qe.y+oe);for(z=z[z.length-1].x;x<pe.length&&pe[x].x<=z;)x++;for(;x<pe.length&&pe[x].x>z;)oe=pe[x++],ce[E++].h(oe.x,oe.y);for(z=ic(a,E),x=0;x<E;x++)z[x].assign(ce[x]);Sd(a,ce),E=z}return z=_e,ne=Math.max(0,we)+ne.height,Sd(a,y),Sd(a,Ee),Sd(a,pe),Sd(a,Ae),re[0]=b,re[1]=E,new Bn(we,0,z,ne)}function ic(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 Sd(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}Ro.prototype.arrangeTrees=function(){if(this.Rb===uv)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Zc){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),Zy(this,y,x,b)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof Zc&&a.push(x);switch(this.sorting){case Np:break;case Mm:a.reverse();break;case Lm:a.sort(this.comparer);break;case Fm:a.sort(this.comparer),a.reverse();break;default:Rt("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(Zy(this,E,y+E.la.x,x+E.la.y),this.Rb){case lv:x+=E.Da.height+this.$d.height;break;case Ky:y+=E.Da.width+this.$d.width;break;default:Rt("Unhandled arrangement value "+this.Rb.toString())}}}};function Zy(a,y,x,b){if(y!==null){y.x=x,y.y=b,y=y.children;for(var E=y.length,z=0;z<E;z++){var ne=y[z];Zy(a,ne,x+ne.S.x,b+ne.S.y)}}}Ro.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Ro.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Ro.prototype.Gu=function(){if(this.layerStyle===cv){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 z=y[E.level];z===void 0?z=this.computeLayerSpacing(E):z=Math.max(z,this.computeLayerSpacing(E)),y[E.level]=z}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,z=0,this.angle===180||this.angle===270)for(var ne=0;ne<a.length;ne++)z+=a[ne]+y[ne];for(ne=0;ne<a.length;ne++){var re=a[ne]+y[ne];this.angle===270?(z-=re,E.push(new Bn(0,z,x,re))):this.angle===90?(E.push(new Bn(0,z,x,re)),z+=re):this.angle===180?(z-=re,E.push(new Bn(z,0,re,x))):(E.push(new Bn(z,0,re,x)),z+=re)}this.commitLayers(E,b)}},Ro.prototype.commitLayers=function(){},Ro.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ro.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof Zc&&gS(this,y)}};function gS(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,b=0;b<x;b++)gS(a,y[b])}}Ro.prototype.setPortSpots=function(a){var y=a.alignment;if(If(y)){var x=this.ud===nh,b=od(a);switch(b){case 0:var E=Lr;break;case 90:E=Mr;break;case 180:E=br;break;default:E=vr}var z=a.children,ne=z.length;switch(y){case qh:case oh:for(y=0;y<ne;y++){var re=z[y];if(re=(x?re.sourceEdges:re.destinationEdges).first(),re!==null&&(re=re.link,re!==null)){var oe=b===90||b===270?br:vr;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:oe=br;break;case 90:oe=vr;break;case 180:oe=Lr;break;default:oe=Mr}else y%2===0&&(oe=b===90||b===270?Lr:Mr);x?(a.setsPortSpot&&(re.fromSpot=E),a.setsChildPortSpot&&(re.toSpot=oe)):(a.setsPortSpot&&(re.fromSpot=oe),a.setsChildPortSpot&&(re.toSpot=E))}}break;case ef:for(b=b===90||b===270?Lr:Mr,z=x?a.destinationEdges:a.sourceEdges;z.next();)ne=z.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 Nh:for(b=b===90||b===270?br:vr,z=x?a.destinationEdges:a.sourceEdges;z.next();)ne=z.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=od(a),this.ud===nh){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=Lr;break;case 90:b.fromSpot=Mr;break;case 180:b.fromSpot=br;break;default:b.fromSpot=vr}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=br;break;case 90:b.toSpot=vr;break;case 180:b.toSpot=Lr;break;default:b.toSpot=Mr}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=Lr;break;case 90:b.toSpot=Mr;break;case 180:b.toSpot=br;break;default:b.toSpot=vr}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=br;break;case 90:b.fromSpot=vr;break;case 180:b.fromSpot=Lr;break;default:b.fromSpot=Mr}else b.fromSpot=a.childPortSpot}};function od(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Ro.prototype.computeLayerSpacing=function(a){var y=od(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},Ro.prototype.computeNodeIndent=function(a){var y=od(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)},yt.Object.defineProperties(Ro.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!==sv&&a!==Gy&&a!==Wy&&a!==$y||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Vy&&a!==Uy&&a!==cv||(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!==lv&&a!==Ky&&a!==uv||(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!==Np&&a!==Mm&&a!==Lm&&!Fm||(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()):Rt("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!==av&&a!==Nm||(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!==Np&&a!==Mm&&a!==Lm&&!Fm||(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!==av&&a!==Nm||(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 ov=new qt(Ro,"PathDefault",-1),nh=new qt(Ro,"PathDestination",0),Hg=new qt(Ro,"PathSource",1),Np=new qt(Ro,"SortingForwards",10),Mm=new qt(Ro,"SortingReverse",11),Lm=new qt(Ro,"SortingAscending",12),Fm=new qt(Ro,"SortingDescending",13),Bp=new qt(Ro,"AlignmentCenterSubtrees",20),Zg=new qt(Ro,"AlignmentCenterChildren",21),ih=new qt(Ro,"AlignmentStart",22),rh=new qt(Ro,"AlignmentEnd",23),qh=new qt(Ro,"AlignmentBus",24),oh=new qt(Ro,"AlignmentBusBranching",25),ef=new qt(Ro,"AlignmentTopLeftBus",26),Nh=new qt(Ro,"AlignmentBottomRightBus",27),av=new qt(Ro,"CompactionNone",30),Nm=new qt(Ro,"CompactionBlock",31),sv=new qt(Ro,"StyleLayered",40),Wy=new qt(Ro,"StyleLastParents",41),Gy=new qt(Ro,"StyleAlternating",42),$y=new qt(Ro,"StyleRootOnly",43),lv=new qt(Ro,"ArrangementVertical",50),Ky=new qt(Ro,"ArrangementHorizontal",51),uv=new qt(Ro,"ArrangementFixedRoots",52),Vy=new qt(Ro,"LayerIndividual",60),Uy=new qt(Ro,"LayerSiblings",61),cv=new qt(Ro,"LayerUniform",62);Ro.className="TreeLayout",Ro.PathDefault=ov,Ro.PathDestination=nh,Ro.PathSource=Hg,Ro.SortingForwards=Np,Ro.SortingReverse=Mm,Ro.SortingAscending=Lm,Ro.SortingDescending=Fm,Ro.AlignmentCenterSubtrees=Bp,Ro.AlignmentCenterChildren=Zg,Ro.AlignmentStart=ih,Ro.AlignmentEnd=rh,Ro.AlignmentBus=qh,Ro.AlignmentBusBranching=oh,Ro.AlignmentTopLeftBus=ef,Ro.AlignmentBottomRightBus=Nh,Ro.CompactionNone=av,Ro.CompactionBlock=Nm,Ro.StyleLayered=sv,Ro.StyleLastParents=Wy,Ro.StyleAlternating=Gy,Ro.StyleRootOnly=$y,Ro.ArrangementVertical=lv,Ro.ArrangementHorizontal=Ky,Ro.ArrangementFixedRoots=uv,Ro.LayerIndividual=Vy,Ro.LayerSiblings=Uy,Ro.LayerUniform=cv;function Wg(a){Xa.call(this,a)}Zt(Wg,Xa),Wg.prototype.createVertex=function(){return new Zc(this)},Wg.prototype.createEdge=function(){return new Ap(this)},Wg.className="TreeNetwork";function Zc(a){vl.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 ci(0,0),this.la=new tt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Np,this.hd=gy,this.Kb=0,this.Jb=Zg,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Nm,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Jt,this.wr=!0,this.Dp=Jt}Zt(Zc,vl),Zc.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)},yt.Object.defineProperties(Zc.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)}}}),Zc.className="TreeVertex";function Ap(a){pc.call(this,a),this.$t=new tt(0,0)}Zt(Ap,pc),Ap.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 nh:x=this.fromVertex,b=this.toVertex;break;case Hg:x=this.toVertex,b=this.fromVertex;break;default:Rt("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 z=od(x),ne=y.computeLayerSpacing(x),re=x.rowSpacing;a.vg();var oe=a.curve===Ec,le=a.isOrthogonal,ce;if(a.uh(),le||oe){for(ce=2;4<a.pointsCount;)a.pv(2);var pe=a.i(1),we=a.i(2)}else{for(ce=1;3<a.pointsCount;)a.pv(1);pe=a.i(0),we=a.i(a.pointsCount-1)}var Ee=a.i(a.pointsCount-1);z===0?(x.alignment===rh?(z=b.bottom+E.y,E.y===0&&pe.y>Ee.y+x.rowIndent&&(z=Math.min(z,Math.max(pe.y,z-y.computeNodeIndent(x))))):x.alignment===ih?(z=b.top+E.y,E.y===0&&pe.y<Ee.y-x.rowIndent&&(z=Math.max(z,Math.min(pe.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,oe?(a.m(ce,pe.x,z),ce++,a.m(ce,b.right+ne,z),ce++,a.m(ce,b.right+ne+(E.x-re)/3,z),ce++,a.m(ce,b.right+ne+2*(E.x-re)/3,z),ce++,a.m(ce,b.right+ne+(E.x-re),z),ce++,a.m(ce,we.x,z)):(le&&(a.m(ce,b.right+ne/2,pe.y),ce++),a.m(ce,b.right+ne/2,z),ce++,a.m(ce,b.right+ne+E.x-(le?re/2:re),z),ce++,le&&a.m(ce,a.i(ce-1).x,we.y))):z===90?(x.alignment===rh?(z=b.right+E.x,E.x===0&&pe.x>Ee.x+x.rowIndent&&(z=Math.min(z,Math.max(pe.x,z-y.computeNodeIndent(x))))):x.alignment===ih?(z=b.left+E.x,E.x===0&&pe.x<Ee.x-x.rowIndent&&(z=Math.max(z,Math.min(pe.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,oe?(a.m(ce,z,pe.y),ce++,a.m(ce,z,b.bottom+ne),ce++,a.m(ce,z,b.bottom+ne+(E.y-re)/3),ce++,a.m(ce,z,b.bottom+ne+2*(E.y-re)/3),ce++,a.m(ce,z,b.bottom+ne+(E.y-re)),ce++,a.m(ce,z,we.y)):(le&&(a.m(ce,pe.x,b.bottom+ne/2),ce++),a.m(ce,z,b.bottom+ne/2),ce++,a.m(ce,z,b.bottom+ne+E.y-(le?re/2:re)),ce++,le&&a.m(ce,we.x,a.i(ce-1).y))):z===180?(x.alignment===rh?(z=b.bottom+E.y,E.y===0&&pe.y>Ee.y+x.rowIndent&&(z=Math.min(z,Math.max(pe.y,z-y.computeNodeIndent(x))))):x.alignment===ih?(z=b.top+E.y,E.y===0&&pe.y<Ee.y-x.rowIndent&&(z=Math.max(z,Math.min(pe.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,oe?(a.m(ce,pe.x,z),ce++,a.m(ce,b.left-ne,z),ce++,a.m(ce,b.left-ne+(E.x+re)/3,z),ce++,a.m(ce,b.left-ne+2*(E.x+re)/3,z),ce++,a.m(ce,b.left-ne+(E.x+re),z),ce++,a.m(ce,we.x,z)):(le&&(a.m(ce,b.left-ne/2,pe.y),ce++),a.m(ce,b.left-ne/2,z),ce++,a.m(ce,b.left-ne+E.x+(le?re/2:re),z),ce++,le&&a.m(ce,a.i(ce-1).x,we.y))):z===270?(x.alignment===rh?(z=b.right+E.x,E.x===0&&pe.x>Ee.x+x.rowIndent&&(z=Math.min(z,Math.max(pe.x,z-y.computeNodeIndent(x))))):x.alignment===ih?(z=b.left+E.x,E.x===0&&pe.x<Ee.x-x.rowIndent&&(z=Math.max(z,Math.min(pe.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,oe?(a.m(ce,z,pe.y),ce++,a.m(ce,z,b.top-ne),ce++,a.m(ce,z,b.top-ne+(E.y+re)/3),ce++,a.m(ce,z,b.top-ne+2*(E.y+re)/3),ce++,a.m(ce,z,b.top-ne+(E.y+re)),ce++,a.m(ce,z,we.y)):(le&&(a.m(ce,pe.x,b.top-ne/2),ce++),a.m(ce,z,b.top-ne/2),ce++,a.m(ce,z,b.top-ne+E.y+(le?re/2:re)),ce++,le&&a.m(ce,we.x,a.i(ce-1).y))):Rt("Invalid angle "+z),a.zf()}else E=b,a=this.link,b=this.network.layout,y=od(x),y!==od(E)&&(ne=b.computeLayerSpacing(x),re=x.bounds,x=E.bounds,y===0&&x.left-re.right<ne+1||y===90&&x.top-re.bottom<ne+1||y===180&&re.left-x.right<ne+1||y===270&&re.top-x.bottom<ne+1||(a.vg(),x=a.curve===Ec,E=a.isOrthogonal,b=If(this.fromVertex.alignment),a.uh(),y===0?(y=re.right+ne/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y-20,a.i(1).y),a.m(2,y-20,x),a.m(3,y,x),a.m(4,y+20,x),a.L(5,a.i(5).x,x)):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=re.bottom+ne/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y-20),a.m(2,x,y-20),a.m(3,x,y),a.m(4,x,y+20),a.L(5,x,a.i(5).y)):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=re.left-ne/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y+20,a.i(1).y),a.m(2,y+20,x),a.m(3,y,x),a.m(4,y-20,x),a.L(5,a.i(5).x,x)):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=re.top-ne/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y+20),a.m(2,x,y+20),a.m(3,x,y),a.m(4,x,y-20),a.L(5,x,a.i(5).y)):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()))}}},yt.Object.defineProperties(Ap.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)}}}),Ap.className="TreeEdge",Ua.prototype.initializeStandardTools=function(){this.gb("Action",new fo,this.mouseDownTools),this.gb("Relinking",new ar,this.mouseDownTools),this.gb("LinkReshaping",new dr,this.mouseDownTools),this.gb("Rotating",new Ho,this.mouseDownTools),this.gb("Resizing",new so,this.mouseDownTools),this.gb("Linking",new Bi,this.mouseMoveTools),this.gb("Dragging",new Gr,this.mouseMoveTools),this.gb("DragSelecting",new po,this.mouseMoveTools),this.gb("Panning",new kr,this.mouseMoveTools),this.gb("ContextMenu",new ma,this.mouseUpTools),this.gb("TextEditing",new oa,this.mouseUpTools),this.gb("ClickCreating",new ko,this.mouseUpTools),this.gb("ClickSelecting",new Na,this.mouseUpTools)},Ad("Horizontal",new jm),Ad("Spot",new Hm),Ad("Table",new Wm),Ad("Viewbox",new Km),Ad("TableRow",new Gm),Ad("TableColumn",new $m),Ad("Graduated",new $p),Ad("Grid",new Gp),Uf.add("GraphLinksModel",_l),Uf.add("TreeModel",Ic);var dv=nt.go,Yy={get licenseKey(){return gn.licenseKey},set licenseKey(a){gn.licenseKey=a},get version(){return gn.version},Group:mo,EnumValue:qt,List:$n,Set:Kn,Map:Ti,Point:tt,Size:ci,Rect:Bn,Margin:or,Spot:er,Geometry:Zn,PathFigure:Zr,PathSegment:Mi,InputEvent:La,DiagramEvent:yl,ChangedEvent:Ea,Model:lr,GraphLinksModel:ta,TreeModel:Du,Binding:ol,Transaction:Rs,UndoManager:ns,CommandHandler:ut,Tool:Qo,DraggingTool:Gr,DraggingInfo:hd,DraggingOptions:ae,LinkingBaseTool:Sn,LinkingTool:Bi,RelinkingTool:ar,LinkReshapingTool:dr,ResizingTool:so,RotatingTool:Ho,ClickSelectingTool:Na,ActionTool:fo,ClickCreatingTool:ko,HTMLInfo:Fo,ContextMenuTool:ma,DragSelectingTool:po,PanningTool:kr,TextEditingTool:oa,ToolManager:Ua,Animation:Fs,AnimationManager:ws,AnimationTrigger:Hu,Layer:cs,Diagram:gn,Palette:ge,Overview:xe,Brush:fa,GraphObject:Yt,Panel:ui,RowColumnDefinition:hl,Shape:bo,TextBlock:Ya,Picture:Ku,Part:Pr,Adornment:ga,Node:Di,Link:hi,Placeholder:Fu,Layout:ms,LayoutNetwork:Xa,LayoutVertex:vl,LayoutEdge:pc,GridLayout:$l,PanelLayout:ml,CircularLayout:Ds,CircularNetwork:Mp,CircularVertex:xm,CircularEdge:$0,ForceDirectedLayout:au,ForceDirectedNetwork:jg,ForceDirectedVertex:Sm,ForceDirectedEdge:Pm,LayeredDigraphLayout:Ta,LayeredDigraphNetwork:Fp,LayeredDigraphVertex:kc,LayeredDigraphEdge:bm,TreeLayout:Ro,TreeNetwork:Wg,TreeVertex:Zc,TreeEdge:Ap};typeof dv=="object"&&dv.version&&Pi("WARNING: a `go` object on the root object is already defined. "+("Debug"in dv?"debug ":"")+"version: "+dv.version+", replaced with version: "+Yy.version),gn.prototype.go=Yy,nt.go=Yy,typeof zn.exports=="object"&&(zn.exports=typeof me.g!="undefined"?me.g.go:self.go)}();var ue=typeof me.g!="undefined"?me.g.go:self.go;const Re=typeof me.g!="undefined"?me.g.go:self.go,Ze=Re.Group,ot=Re.EnumValue,We=Re.List,lt=Re.Set,Me=Re.Map,Mt=Re.Point,Ct=Re.Size,Ye=Re.Rect,st=Re.Margin,pt=Re.Spot,wt=Re.Geometry,Ie=Re.PathFigure,te=Re.PathSegment,ee=Re.InputEvent,de=Re.DiagramEvent,se=Re.ChangedEvent,he=Re.Model,ve=Re.GraphLinksModel,be=Re.TreeModel,Ne=Re.Binding,Fe=Re.Transaction,je=Re.UndoManager,ze=Re.CommandHandler,Xe=Re.Tool,Je=Re.DraggingTool,dt=Re.DraggingInfo,He=Re.LinkingBaseTool,bt=Re.LinkingTool,et=Re.RelinkingTool,It=Re.LinkReshapingTool,xt=Re.ResizingTool,Bt=Re.RotatingTool,Ut=Re.ClickSelectingTool,Nt=Re.ActionTool,qe=Re.ClickCreatingTool,Ke=Re.HTMLInfo,Tt=Re.ContextMenuTool,Ln=Re.DragSelectingTool,Mn=Re.PanningTool,zt=Re.TextEditingTool,rn=Re.ToolManager,xn=Re.Animation,Un=Re.AnimationManager,yn=Re.AnimationTrigger,sn=Re.Layer,Lt=Re.Diagram,ti=Re.Palette,gi=Re.Overview,Pn=Re.Brush,Xt=Re.GraphObject,Kt=Re.Panel,Ot=Re.RowColumnDefinition,rt=Re.Shape,Ue=Re.TextBlock,$t=Re.TextBlockMetrics,Gt=Re.Picture,it=Re.Part,at=Re.Adornment,Te=Re.Node,Pe=Re.Link,ye=Re.Placeholder,ke=Re.Layout,$e=Re.LayoutNetwork,Le=Re.LayoutVertex,vt=Re.LayoutEdge,an=Re.GridLayout,bn=Re.PanelLayout,en=Re.CircularLayout,wn=Re.CircularNetwork,ai=Re.CircularVertex,_n=Re.CircularEdge,Hn=Re.ForceDirectedLayout,wi=Re.ForceDirectedNetwork,Hi=Re.ForceDirectedVertex,_i=Re.ForceDirectedEdge,cr=Re.LayeredDigraphLayout,_r=Re.LayeredDigraphNetwork,vi=Re.LayeredDigraphVertex,si=Re.LayeredDigraphEdge,fi=Re.TreeLayout,Ui=Re.TreeNetwork,Fi=Re.TreeVertex,ao=Re.TreeEdge,wr=Re.version},24334:function(zn,En,me){var ue,Re;(function(Ze,ot){zn.exports=ot(Ze)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof me.g!="undefined"?me.g:this,function(Ze){"use strict";Ze=Ze||{};var ot=Ze.Base64,We="2.6.4",lt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Me=function(et){for(var It={},xt=0,Bt=et.length;xt<Bt;xt++)It[et.charAt(xt)]=xt;return It}(lt),Mt=String.fromCharCode,Ct=function(et){if(et.length<2){var It=et.charCodeAt(0);return It<128?et:It<2048?Mt(192|It>>>6)+Mt(128|It&63):Mt(224|It>>>12&15)+Mt(128|It>>>6&63)+Mt(128|It&63)}else{var It=65536+(et.charCodeAt(0)-55296)*1024+(et.charCodeAt(1)-56320);return Mt(240|It>>>18&7)+Mt(128|It>>>12&63)+Mt(128|It>>>6&63)+Mt(128|It&63)}},Ye=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,st=function(et){return et.replace(Ye,Ct)},pt=function(et){var It=[0,2,1][et.length%3],xt=et.charCodeAt(0)<<16|(et.length>1?et.charCodeAt(1):0)<<8|(et.length>2?et.charCodeAt(2):0),Bt=[lt.charAt(xt>>>18),lt.charAt(xt>>>12&63),It>=2?"=":lt.charAt(xt>>>6&63),It>=1?"=":lt.charAt(xt&63)];return Bt.join("")},wt=Ze.btoa&&typeof Ze.btoa=="function"?function(et){return Ze.btoa(et)}:function(et){if(et.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return et.replace(/[\s\S]{1,3}/g,pt)},Ie=function(et){return wt(st(String(et)))},te=function(et){return et.replace(/[+\/]/g,function(It){return It=="+"?"-":"_"}).replace(/=/g,"")},ee=function(et,It){return It?te(Ie(et)):Ie(et)},de=function(et){return ee(et,!0)},se;Ze.Uint8Array&&(se=function(et,It){for(var xt="",Bt=0,Ut=et.length;Bt<Ut;Bt+=3){var Nt=et[Bt],qe=et[Bt+1],Ke=et[Bt+2],Tt=Nt<<16|qe<<8|Ke;xt+=lt.charAt(Tt>>>18)+lt.charAt(Tt>>>12&63)+(typeof qe!="undefined"?lt.charAt(Tt>>>6&63):"=")+(typeof Ke!="undefined"?lt.charAt(Tt&63):"=")}return It?te(xt):xt});var he=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ve=function(et){switch(et.length){case 4:var It=(7&et.charCodeAt(0))<<18|(63&et.charCodeAt(1))<<12|(63&et.charCodeAt(2))<<6|63&et.charCodeAt(3),xt=It-65536;return Mt((xt>>>10)+55296)+Mt((xt&1023)+56320);case 3:return Mt((15&et.charCodeAt(0))<<12|(63&et.charCodeAt(1))<<6|63&et.charCodeAt(2));default:return Mt((31&et.charCodeAt(0))<<6|63&et.charCodeAt(1))}},be=function(et){return et.replace(he,ve)},Ne=function(et){var It=et.length,xt=It%4,Bt=(It>0?Me[et.charAt(0)]<<18:0)|(It>1?Me[et.charAt(1)]<<12:0)|(It>2?Me[et.charAt(2)]<<6:0)|(It>3?Me[et.charAt(3)]:0),Ut=[Mt(Bt>>>16),Mt(Bt>>>8&255),Mt(Bt&255)];return Ut.length-=[0,0,2,1][xt],Ut.join("")},Fe=Ze.atob&&typeof Ze.atob=="function"?function(et){return Ze.atob(et)}:function(et){return et.replace(/\S{1,4}/g,Ne)},je=function(et){return Fe(String(et).replace(/[^A-Za-z0-9\+\/]/g,""))},ze=function(et){return be(Fe(et))},Xe=function(et){return String(et).replace(/[-_]/g,function(It){return It=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Je=function(et){return ze(Xe(et))},dt;Ze.Uint8Array&&(dt=function(et){return Uint8Array.from(je(Xe(et)),function(It){return It.charCodeAt(0)})});var He=function(){var et=Ze.Base64;return Ze.Base64=ot,et};if(Ze.Base64={VERSION:We,atob:je,btoa:wt,fromBase64:Je,toBase64:ee,utob:st,encode:ee,encodeURI:de,btou:be,decode:Je,noConflict:He,fromUint8Array:se,toUint8Array:dt},typeof Object.defineProperty=="function"){var bt=function(et){return{value:et,enumerable:!1,writable:!0,configurable:!0}};Ze.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",bt(function(){return Je(this)})),Object.defineProperty(String.prototype,"toBase64",bt(function(et){return ee(this,et)})),Object.defineProperty(String.prototype,"toBase64URI",bt(function(){return ee(this,!0)}))}}return Ze.Meteor&&(Base64=Ze.Base64),zn.exports?zn.exports.Base64=Ze.Base64:(ue=[],Re=function(){return Ze.Base64}.apply(En,ue),Re!==void 0&&(zn.exports=Re)),{Base64:Ze.Base64}})},17115:function(zn,En,me){"use strict";me.d(En,{ZP:function(){return Me}});var ue=me(29043),Re=me(59301),Ze=me(87746),ot=0,We=(0,Ze.Z)();function lt(){var Mt;return We?(Mt=ot,ot+=1):Mt="TEST_OR_SSR",Mt}function Me(Mt){var Ct=Re.useState(),Ye=(0,ue.Z)(Ct,2),st=Ye[0],pt=Ye[1];return Re.useEffect(function(){pt("rc_select_".concat(lt()))},[]),Mt||st}},77861:function(zn,En,me){"use strict";me.d(En,{Ac:function(){return ke},Xo:function(){return _i},Wx:function(){return _r},ZP:function(){return vn},lk:function(){return be}});var ue=me(5891),Re=me(26390),Ze=me(80962),ot=me(57259),We=me(29043),lt=me(19149),Me=me(80665),Mt=me(35788),Ct=me(51395),Ye=me(59301),st=me(92310),pt=me.n(st),wt=me(28800),Ie=me(93144),te=me(85108),ee=me(20475),de=function(nt){var on=nt.className,fn=nt.customizeIcon,Jn=nt.customizeIconProps,pn=nt.onMouseDown,Rt=nt.onClick,In=nt.children,Vn;return typeof fn=="function"?Vn=fn(Jn):Vn=fn,Ye.createElement("span",{className:on,onMouseDown:function(tn){tn.preventDefault(),pn&&pn(tn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Rt,"aria-hidden":!0},Vn!==void 0?Vn:Ye.createElement("span",{className:pt()(on.split(/\s+/).map(function(Pi){return"".concat(Pi,"-icon")}))},In))},se=de;function he(At,nt,on,fn,Jn){var pn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Rt=arguments.length>6?arguments[6]:void 0,In=arguments.length>7?arguments[7]:void 0,Vn=Ye.useMemo(function(){if((0,Me.Z)(fn)==="object")return fn.clearIcon;if(Jn)return Jn},[fn,Jn]),Pi=Ye.useMemo(function(){return!!(!pn&&fn&&(on.length||Rt)&&!(In==="combobox"&&Rt===""))},[fn,pn,on.length,Rt,In]);return{allowClear:Pi,clearIcon:Ye.createElement(se,{className:"".concat(At,"-clear"),onMouseDown:nt,customizeIcon:Vn},"\xD7")}}var ve=Ye.createContext(null);function be(){return Ye.useContext(ve)}function Ne(){var At=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,nt=Ye.useState(!1),on=(0,We.Z)(nt,2),fn=on[0],Jn=on[1],pn=Ye.useRef(null),Rt=function(){window.clearTimeout(pn.current)};Ye.useEffect(function(){return Rt},[]);var In=function(Pi,tn){Rt(),pn.current=window.setTimeout(function(){Jn(Pi),tn&&tn()},At)};return[fn,In,Rt]}function Fe(){var At=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,nt=Ye.useRef(null),on=Ye.useRef(null);Ye.useEffect(function(){return function(){window.clearTimeout(on.current)}},[]);function fn(Jn){(Jn||nt.current===null)&&(nt.current=Jn),window.clearTimeout(on.current),on.current=window.setTimeout(function(){nt.current=null},At)}return[function(){return nt.current},fn]}function je(At,nt,on,fn){var Jn=Ye.useRef(null);Jn.current={open:nt,triggerOpen:on,customizedTrigger:fn},Ye.useEffect(function(){function pn(Rt){var In;if(!((In=Jn.current)!==null&&In!==void 0&&In.customizedTrigger)){var Vn=Rt.target;Vn.shadowRoot&&Rt.composed&&(Vn=Rt.composedPath()[0]||Vn),Jn.current.open&&At().filter(function(Pi){return Pi}).every(function(Pi){return!Pi.contains(Vn)&&Pi!==Vn})&&Jn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",pn),function(){return window.removeEventListener("mousedown",pn)}},[])}var ze=me(36994),Xe=me(11780),Je=function(nt,on){var fn,Jn,pn=nt.prefixCls,Rt=nt.id,In=nt.inputElement,Vn=nt.disabled,Pi=nt.tabIndex,tn=nt.autoFocus,hn=nt.autoComplete,Rn=nt.editable,Oi=nt.activeDescendantId,Ii=nt.value,Si=nt.maxLength,Ni=nt.onKeyDown,Zi=nt.onMouseDown,sr=nt.onChange,Wr=nt.onPaste,li=nt.onCompositionStart,Vi=nt.onCompositionEnd,vo=nt.open,Qr=nt.attrs,Er=In||Ye.createElement("input",null),qt=Er,pi=qt.ref,pr=qt.props,qi=pr.onKeyDown,$r=pr.onChange,Ar=pr.onMouseDown,io=pr.onCompositionStart,Kr=pr.onCompositionEnd,jr=pr.style;return(0,Ct.Kp)(!("maxLength"in Er.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Er=Ye.cloneElement(Er,(0,ot.Z)((0,ot.Z)((0,ot.Z)({type:"search"},pr),{},{id:Rt,ref:(0,ee.sQ)(on,pi),disabled:Vn,tabIndex:Pi,autoComplete:hn||"off",autoFocus:tn,className:pt()("".concat(pn,"-selection-search-input"),(fn=Er)===null||fn===void 0||(Jn=fn.props)===null||Jn===void 0?void 0:Jn.className),role:"combobox","aria-label":"Search","aria-expanded":vo||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Rt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Rt,"_list"),"aria-activedescendant":vo?Oi:void 0},Qr),{},{value:Rn?Ii:"",maxLength:Si,readOnly:!Rn,unselectable:Rn?null:"on",style:(0,ot.Z)((0,ot.Z)({},jr),{},{opacity:Rn?null:0}),onKeyDown:function($n){Ni($n),qi&&qi($n)},onMouseDown:function($n){Zi($n),Ar&&Ar($n)},onChange:function($n){sr($n),$r&&$r($n)},onCompositionStart:function($n){li($n),io&&io($n)},onCompositionEnd:function($n){Vi($n),Kr&&Kr($n)},onPaste:Wr})),Er},dt=Ye.forwardRef(Je);dt.displayName="Input";var He=dt;function bt(At){return Array.isArray(At)?At:At!==void 0?[At]:[]}var et=typeof window!="undefined"&&window.document&&window.document.documentElement,It=et;function xt(At){return At!=null}function Bt(At){return!At&&At!==0}function Ut(At){return["string","number"].includes((0,Me.Z)(At))}function Nt(At){var nt=void 0;return At&&(Ut(At.title)?nt=At.title.toString():Ut(At.label)&&(nt=At.label.toString())),nt}function qe(At,nt){It?Ye.useLayoutEffect(At,nt):Ye.useEffect(At,nt)}function Ke(At){var nt;return(nt=At.key)!==null&&nt!==void 0?nt:At.value}var Tt=function(nt){nt.preventDefault(),nt.stopPropagation()},Ln=function(nt){var on=nt.id,fn=nt.prefixCls,Jn=nt.values,pn=nt.open,Rt=nt.searchValue,In=nt.autoClearSearchValue,Vn=nt.inputRef,Pi=nt.placeholder,tn=nt.disabled,hn=nt.mode,Rn=nt.showSearch,Oi=nt.autoFocus,Ii=nt.autoComplete,Si=nt.activeDescendantId,Ni=nt.tabIndex,Zi=nt.removeIcon,sr=nt.maxTagCount,Wr=nt.maxTagTextLength,li=nt.maxTagPlaceholder,Vi=li===void 0?function(jo){return"+ ".concat(jo.length," ...")}:li,vo=nt.tagRender,Qr=nt.onToggleOpen,Er=nt.onRemove,qt=nt.onInputChange,pi=nt.onInputPaste,pr=nt.onInputKeyDown,qi=nt.onInputMouseDown,$r=nt.onInputCompositionStart,Ar=nt.onInputCompositionEnd,io=Ye.useRef(null),Kr=(0,Ye.useState)(0),jr=(0,We.Z)(Kr,2),yo=jr[0],$n=jr[1],Xo=(0,Ye.useState)(!1),Kn=(0,We.Z)(Xo,2),Io=Kn[0],Jo=Kn[1],Yi="".concat(fn,"-selection"),ua=pn||hn==="multiple"&&In===!1||hn==="tags"?Rt:"",Zo=hn==="tags"||hn==="multiple"&&In===!1||Rn&&(pn||Io);qe(function(){$n(io.current.scrollWidth)},[ua]);function Dr(jo,Ra,$a,ls,Or){return Ye.createElement("span",{className:pt()("".concat(Yi,"-item"),(0,Ze.Z)({},"".concat(Yi,"-item-disabled"),$a)),title:Nt(jo)},Ye.createElement("span",{className:"".concat(Yi,"-item-content")},Ra),ls&&Ye.createElement(se,{className:"".concat(Yi,"-item-remove"),onMouseDown:Tt,onClick:Or,customizeIcon:Zi},"\xD7"))}function Ir(jo,Ra,$a,ls,Or){var xo=function(Da){Tt(Da),Qr(!pn)};return Ye.createElement("span",{onMouseDown:xo},vo({label:Ra,value:jo,disabled:$a,closable:ls,onClose:Or}))}function Do(jo){var Ra=jo.disabled,$a=jo.label,ls=jo.value,Or=!tn&&!Ra,xo=$a;if(typeof Wr=="number"&&(typeof $a=="string"||typeof $a=="number")){var na=String(xo);na.length>Wr&&(xo="".concat(na.slice(0,Wr),"..."))}var Da=function(Va){Va&&Va.stopPropagation(),Er(jo)};return typeof vo=="function"?Ir(ls,xo,Ra,Or,Da):Dr(jo,xo,Ra,Or,Da)}function _o(jo){var Ra=typeof Vi=="function"?Vi(jo):Vi;return Dr({title:Ra},Ra,!1)}var Ti=Ye.createElement("div",{className:"".concat(Yi,"-search"),style:{width:yo},onFocus:function(){Jo(!0)},onBlur:function(){Jo(!1)}},Ye.createElement(He,{ref:Vn,open:pn,prefixCls:fn,id:on,inputElement:null,disabled:tn,autoFocus:Oi,autoComplete:Ii,editable:Zo,activeDescendantId:Si,value:ua,onKeyDown:pr,onMouseDown:qi,onChange:qt,onPaste:pi,onCompositionStart:$r,onCompositionEnd:Ar,tabIndex:Ni,attrs:(0,ze.Z)(nt,!0)}),Ye.createElement("span",{ref:io,className:"".concat(Yi,"-search-mirror"),"aria-hidden":!0},ua,"\xA0")),tt=Ye.createElement(Xe.Z,{prefixCls:"".concat(Yi,"-overflow"),data:Jn,renderItem:Do,renderRest:_o,suffix:Ti,itemKey:Ke,maxCount:sr});return Ye.createElement(Ye.Fragment,null,tt,!Jn.length&&!ua&&Ye.createElement("span",{className:"".concat(Yi,"-placeholder")},Pi))},Mn=Ln,zt=function(nt){var on=nt.inputElement,fn=nt.prefixCls,Jn=nt.id,pn=nt.inputRef,Rt=nt.disabled,In=nt.autoFocus,Vn=nt.autoComplete,Pi=nt.activeDescendantId,tn=nt.mode,hn=nt.open,Rn=nt.values,Oi=nt.placeholder,Ii=nt.tabIndex,Si=nt.showSearch,Ni=nt.searchValue,Zi=nt.activeValue,sr=nt.maxLength,Wr=nt.onInputKeyDown,li=nt.onInputMouseDown,Vi=nt.onInputChange,vo=nt.onInputPaste,Qr=nt.onInputCompositionStart,Er=nt.onInputCompositionEnd,qt=nt.title,pi=Ye.useState(!1),pr=(0,We.Z)(pi,2),qi=pr[0],$r=pr[1],Ar=tn==="combobox",io=Ar||Si,Kr=Rn[0],jr=Ni||"";Ar&&Zi&&!qi&&(jr=Zi),Ye.useEffect(function(){Ar&&$r(!1)},[Ar,Zi]);var yo=tn!=="combobox"&&!hn&&!Si?!1:!!jr,$n=qt===void 0?Nt(Kr):qt,Xo=function(){if(Kr)return null;var Io=yo?{visibility:"hidden"}:void 0;return Ye.createElement("span",{className:"".concat(fn,"-selection-placeholder"),style:Io},Oi)};return Ye.createElement(Ye.Fragment,null,Ye.createElement("span",{className:"".concat(fn,"-selection-search")},Ye.createElement(He,{ref:pn,prefixCls:fn,id:Jn,open:hn,inputElement:on,disabled:Rt,autoFocus:In,autoComplete:Vn,editable:io,activeDescendantId:Pi,value:jr,onKeyDown:Wr,onMouseDown:li,onChange:function(Io){$r(!0),Vi(Io)},onPaste:vo,onCompositionStart:Qr,onCompositionEnd:Er,tabIndex:Ii,attrs:(0,ze.Z)(nt,!0),maxLength:Ar?sr:void 0})),!Ar&&Kr?Ye.createElement("span",{className:"".concat(fn,"-selection-item"),title:$n,style:yo?{visibility:"hidden"}:void 0},Kr.label):null,Xo())},rn=zt;function xn(At){return![te.Z.ESC,te.Z.SHIFT,te.Z.BACKSPACE,te.Z.TAB,te.Z.WIN_KEY,te.Z.ALT,te.Z.META,te.Z.WIN_KEY_RIGHT,te.Z.CTRL,te.Z.SEMICOLON,te.Z.EQUALS,te.Z.CAPS_LOCK,te.Z.CONTEXT_MENU,te.Z.F1,te.Z.F2,te.Z.F3,te.Z.F4,te.Z.F5,te.Z.F6,te.Z.F7,te.Z.F8,te.Z.F9,te.Z.F10,te.Z.F11,te.Z.F12].includes(At)}var Un=function(nt,on){var fn=(0,Ye.useRef)(null),Jn=(0,Ye.useRef)(!1),pn=nt.prefixCls,Rt=nt.open,In=nt.mode,Vn=nt.showSearch,Pi=nt.tokenWithEnter,tn=nt.autoClearSearchValue,hn=nt.onSearch,Rn=nt.onSearchSubmit,Oi=nt.onToggleOpen,Ii=nt.onInputKeyDown,Si=nt.domRef;Ye.useImperativeHandle(on,function(){return{focus:function(){fn.current.focus()},blur:function(){fn.current.blur()}}});var Ni=Fe(0),Zi=(0,We.Z)(Ni,2),sr=Zi[0],Wr=Zi[1],li=function(jr){var yo=jr.which;(yo===te.Z.UP||yo===te.Z.DOWN)&&jr.preventDefault(),Ii&&Ii(jr),yo===te.Z.ENTER&&In==="tags"&&!Jn.current&&!Rt&&(Rn==null||Rn(jr.target.value)),xn(yo)&&Oi(!0)},Vi=function(){Wr(!0)},vo=(0,Ye.useRef)(null),Qr=function(jr){hn(jr,!0,Jn.current)!==!1&&Oi(!0)},Er=function(){Jn.current=!0},qt=function(jr){Jn.current=!1,In!=="combobox"&&Qr(jr.target.value)},pi=function(jr){var yo=jr.target.value;if(Pi&&vo.current&&/[\r\n]/.test(vo.current)){var $n=vo.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");yo=yo.replace($n,vo.current)}vo.current=null,Qr(yo)},pr=function(jr){var yo=jr.clipboardData,$n=yo.getData("text");vo.current=$n},qi=function(jr){var yo=jr.target;if(yo!==fn.current){var $n=document.body.style.msTouchAction!==void 0;$n?setTimeout(function(){fn.current.focus()}):fn.current.focus()}},$r=function(jr){var yo=sr();jr.target!==fn.current&&!yo&&In!=="combobox"&&jr.preventDefault(),(In!=="combobox"&&(!Vn||!yo)||!Rt)&&(Rt&&tn!==!1&&hn("",!0,!1),Oi())},Ar={inputRef:fn,onInputKeyDown:li,onInputMouseDown:Vi,onInputChange:pi,onInputPaste:pr,onInputCompositionStart:Er,onInputCompositionEnd:qt},io=In==="multiple"||In==="tags"?Ye.createElement(Mn,(0,ue.Z)({},nt,Ar)):Ye.createElement(rn,(0,ue.Z)({},nt,Ar));return Ye.createElement("div",{ref:Si,className:"".concat(pn,"-selector"),onClick:qi,onMouseDown:$r},io)},yn=Ye.forwardRef(Un);yn.displayName="Selector";var sn=yn,Lt=me(35593),ti=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],gi=function(nt){var on=nt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:on,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:on,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:on,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:on,adjustY:1},htmlRegion:"scroll"}}},Pn=function(nt,on){var fn=nt.prefixCls,Jn=nt.disabled,pn=nt.visible,Rt=nt.children,In=nt.popupElement,Vn=nt.animation,Pi=nt.transitionName,tn=nt.dropdownStyle,hn=nt.dropdownClassName,Rn=nt.direction,Oi=Rn===void 0?"ltr":Rn,Ii=nt.placement,Si=nt.builtinPlacements,Ni=nt.dropdownMatchSelectWidth,Zi=nt.dropdownRender,sr=nt.dropdownAlign,Wr=nt.getPopupContainer,li=nt.empty,Vi=nt.getTriggerDOMNode,vo=nt.onPopupVisibleChange,Qr=nt.onPopupMouseEnter,Er=(0,lt.Z)(nt,ti),qt="".concat(fn,"-dropdown"),pi=In;Zi&&(pi=Zi(In));var pr=Ye.useMemo(function(){return Si||gi(Ni)},[Si,Ni]),qi=Vn?"".concat(qt,"-").concat(Vn):Pi,$r=typeof Ni=="number",Ar=Ye.useMemo(function(){return $r?null:Ni===!1?"minWidth":"width"},[Ni,$r]),io=tn;$r&&(io=(0,ot.Z)((0,ot.Z)({},io),{},{width:Ni}));var Kr=Ye.useRef(null);return Ye.useImperativeHandle(on,function(){return{getPopupElement:function(){return Kr.current}}}),Ye.createElement(Lt.Z,(0,ue.Z)({},Er,{showAction:vo?["click"]:[],hideAction:vo?["click"]:[],popupPlacement:Ii||(Oi==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:pr,prefixCls:qt,popupTransitionName:qi,popup:Ye.createElement("div",{ref:Kr,onMouseEnter:Qr},pi),stretch:Ar,popupAlign:sr,popupVisible:pn,getPopupContainer:Wr,popupClassName:pt()(hn,(0,Ze.Z)({},"".concat(qt,"-empty"),li)),popupStyle:io,getTriggerDOMNode:Vi,onPopupVisibleChange:vo}),Rt)},Xt=Ye.forwardRef(Pn);Xt.displayName="SelectTrigger";var Kt=Xt,Ot=me(17953);function rt(At,nt){var on=At.key,fn;return"value"in At&&(fn=At.value),on!=null?on:fn!==void 0?fn:"rc-index-key-".concat(nt)}function Ue(At,nt){var on=At||{},fn=on.label,Jn=on.value,pn=on.options,Rt=on.groupLabel,In=fn||(nt?"children":"label");return{label:In,value:Jn||"value",options:pn||"options",groupLabel:Rt||In}}function $t(At){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},on=nt.fieldNames,fn=nt.childrenAsData,Jn=[],pn=Ue(on,!1),Rt=pn.label,In=pn.value,Vn=pn.options,Pi=pn.groupLabel;function tn(hn,Rn){hn.forEach(function(Oi){if(Rn||!(Vn in Oi)){var Ii=Oi[In];Jn.push({key:rt(Oi,Jn.length),groupOption:Rn,data:Oi,label:Oi[Rt],value:Ii})}else{var Si=Oi[Pi];Si===void 0&&fn&&(Si=Oi.label),Jn.push({key:rt(Oi,Jn.length),group:!0,data:Oi,label:Si}),tn(Oi[Vn],!0)}})}return tn(At,!1),Jn}function Gt(At){var nt=(0,ot.Z)({},At);return"props"in nt||Object.defineProperty(nt,"props",{get:function(){return(0,Ct.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),nt}}),nt}function it(At,nt){if(!nt||!nt.length)return null;var on=!1;function fn(pn,Rt){var In=(0,Ot.Z)(Rt),Vn=In[0],Pi=In.slice(1);if(!Vn)return[pn];var tn=pn.split(Vn);return on=on||tn.length>1,tn.reduce(function(hn,Rn){return[].concat((0,Re.Z)(hn),(0,Re.Z)(fn(Rn,Pi)))},[]).filter(function(hn){return hn})}var Jn=fn(At,nt);return on?Jn:null}var at=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Te=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function Pe(At){return At==="tags"||At==="multiple"}var ye=Ye.forwardRef(function(At,nt){var on,fn,Jn=At.id,pn=At.prefixCls,Rt=At.className,In=At.showSearch,Vn=At.tagRender,Pi=At.direction,tn=At.omitDomProps,hn=At.displayValues,Rn=At.onDisplayValuesChange,Oi=At.emptyOptions,Ii=At.notFoundContent,Si=Ii===void 0?"Not Found":Ii,Ni=At.onClear,Zi=At.mode,sr=At.disabled,Wr=At.loading,li=At.getInputElement,Vi=At.getRawInputElement,vo=At.open,Qr=At.defaultOpen,Er=At.onDropdownVisibleChange,qt=At.activeValue,pi=At.onActiveValueChange,pr=At.activeDescendantId,qi=At.searchValue,$r=At.autoClearSearchValue,Ar=At.onSearch,io=At.onSearchSplit,Kr=At.tokenSeparators,jr=At.allowClear,yo=At.suffixIcon,$n=At.clearIcon,Xo=At.OptionList,Kn=At.animation,Io=At.transitionName,Jo=At.dropdownStyle,Yi=At.dropdownClassName,ua=At.dropdownMatchSelectWidth,Zo=At.dropdownRender,Dr=At.dropdownAlign,Ir=At.placement,Do=At.builtinPlacements,_o=At.getPopupContainer,Ti=At.showAction,tt=Ti===void 0?[]:Ti,jo=At.onFocus,Ra=At.onBlur,$a=At.onKeyUp,ls=At.onKeyDown,Or=At.onMouseDown,xo=(0,lt.Z)(At,at),na=Pe(Zi),Da=(In!==void 0?In:na)||Zi==="combobox",Ao=(0,ot.Z)({},xo);Te.forEach(function(Jt){delete Ao[Jt]}),tn==null||tn.forEach(function(Jt){delete Ao[Jt]});var Va=Ye.useState(!1),Jr=(0,We.Z)(Va,2),eo=Jr[0],Eo=Jr[1];Ye.useEffect(function(){Eo((0,Ie.Z)())},[]);var ci=Ye.useRef(null),xa=Ye.useRef(null),za=Ye.useRef(null),xs=Ye.useRef(null),ho=Ye.useRef(null),ca=Ne(),ja=(0,We.Z)(ca,3),hs=ja[0],fs=ja[1],ll=ja[2];Ye.useImperativeHandle(nt,function(){var Jt,dn;return{focus:(Jt=xs.current)===null||Jt===void 0?void 0:Jt.focus,blur:(dn=xs.current)===null||dn===void 0?void 0:dn.blur,scrollTo:function(tr){var yr;return(yr=ho.current)===null||yr===void 0?void 0:yr.scrollTo(tr)}}});var Ys=Ye.useMemo(function(){var Jt;if(Zi!=="combobox")return qi;var dn=(Jt=hn[0])===null||Jt===void 0?void 0:Jt.value;return typeof dn=="string"||typeof dn=="number"?String(dn):""},[qi,Zi,hn]),Bn=Zi==="combobox"&&typeof li=="function"&&li()||null,Es=typeof Vi=="function"&&Vi(),Pl=(0,ee.x1)(xa,Es==null||(on=Es.props)===null||on===void 0?void 0:on.ref),Wl=Ye.useState(!1),Mo=(0,We.Z)(Wl,2),gl=Mo[0],Tu=Mo[1];(0,wt.Z)(function(){Tu(!0)},[]);var Ql=(0,Mt.Z)(!1,{defaultValue:Qr,value:vo}),us=(0,We.Z)(Ql,2),Sa=us[0],Il=us[1],Wo=gl?Sa:!1,Ia=!Si&&Oi;(sr||Ia&&Wo&&Zi==="combobox")&&(Wo=!1);var aa=Ia?!1:Wo,or=Ye.useCallback(function(Jt){var dn=Jt!==void 0?Jt:!Wo;sr||(Il(dn),Wo!==dn&&(Er==null||Er(dn)))},[sr,Wo,Il,Er]),_s=Ye.useMemo(function(){return(Kr||[]).some(function(Jt){return[`
|
|
|
`,`\r
|
|
|
`].includes(Jt)})},[Kr]),js=function(dn,xi,tr){var yr=!0,vr=dn;pi==null||pi(null);var br=tr?null:it(dn,Kr);return Zi!=="combobox"&&br&&(vr="",io==null||io(br),or(!1),yr=!1),Ar&&Ys!==vr&&Ar(vr,{source:xi?"typing":"effect"}),yr},pl=function(dn){!dn||!dn.trim()||Ar(dn,{source:"submit"})};Ye.useEffect(function(){!Wo&&!na&&Zi!=="combobox"&&js("",!1,!1)},[Wo]),Ye.useEffect(function(){Sa&&sr&&Il(!1),sr&&fs(!1)},[sr]);var Xs=Fe(),hu=(0,We.Z)(Xs,2),er=hu[0],Ss=hu[1],Ws=function(dn){var xi=er(),tr=dn.which;if(tr===te.Z.ENTER&&(Zi!=="combobox"&&dn.preventDefault(),Wo||or(!0)),Ss(!!Ys),tr===te.Z.BACKSPACE&&!xi&&na&&!Ys&&hn.length){for(var yr=(0,Re.Z)(hn),vr=null,br=yr.length-1;br>=0;br-=1){var Lr=yr[br];if(!Lr.disabled){yr.splice(br,1),vr=Lr;break}}vr&&Rn(yr,{type:"remove",values:[vr]})}for(var Mr=arguments.length,zr=new Array(Mr>1?Mr-1:0),Sr=1;Sr<Mr;Sr++)zr[Sr-1]=arguments[Sr];if(Wo&&ho.current){var Tr;(Tr=ho.current).onKeyDown.apply(Tr,[dn].concat(zr))}ls==null||ls.apply(void 0,[dn].concat(zr))},su=function(dn){for(var xi=arguments.length,tr=new Array(xi>1?xi-1:0),yr=1;yr<xi;yr++)tr[yr-1]=arguments[yr];if(Wo&&ho.current){var vr;(vr=ho.current).onKeyUp.apply(vr,[dn].concat(tr))}$a==null||$a.apply(void 0,[dn].concat(tr))},fu=function(dn){var xi=hn.filter(function(tr){return tr!==dn});Rn(xi,{type:"remove",values:[dn]})},lu=Ye.useRef(!1),Oo=function(){fs(!0),sr||(jo&&!lu.current&&jo.apply(void 0,arguments),tt.includes("focus")&&or(!0)),lu.current=!0},Ru=function(){fs(!1,function(){lu.current=!1,or(!1)}),!sr&&(Ys&&(Zi==="tags"?Ar(Ys,{source:"submit"}):Zi==="multiple"&&Ar("",{source:"blur"})),Ra&&Ra.apply(void 0,arguments))},ul=[];Ye.useEffect(function(){return function(){ul.forEach(function(Jt){return clearTimeout(Jt)}),ul.splice(0,ul.length)}},[]);var zs=function(dn){var xi,tr=dn.target,yr=(xi=za.current)===null||xi===void 0?void 0:xi.getPopupElement();if(yr&&yr.contains(tr)){var vr=setTimeout(function(){var zr=ul.indexOf(vr);if(zr!==-1&&ul.splice(zr,1),ll(),!eo&&!yr.contains(document.activeElement)){var Sr;(Sr=xs.current)===null||Sr===void 0||Sr.focus()}});ul.push(vr)}for(var br=arguments.length,Lr=new Array(br>1?br-1:0),Mr=1;Mr<br;Mr++)Lr[Mr-1]=arguments[Mr];Or==null||Or.apply(void 0,[dn].concat(Lr))},wl=Ye.useState({}),kn=(0,We.Z)(wl,2),Tn=kn[1];function Qn(){Tn({})}var zi;Es&&(zi=function(dn){or(dn)}),je(function(){var Jt;return[ci.current,(Jt=za.current)===null||Jt===void 0?void 0:Jt.getPopupElement()]},aa,or,!!Es);var Xi=Ye.useMemo(function(){return(0,ot.Z)((0,ot.Z)({},At),{},{notFoundContent:Si,open:Wo,triggerOpen:aa,id:Jn,showSearch:Da,multiple:na,toggleOpen:or})},[At,Si,aa,Wo,Jn,Da,na,or]),$i=!!yo||Wr,Ri;$i&&(Ri=Ye.createElement(se,{className:pt()("".concat(pn,"-arrow"),(0,Ze.Z)({},"".concat(pn,"-arrow-loading"),Wr)),customizeIcon:yo,customizeIconProps:{loading:Wr,searchValue:Ys,open:Wo,focused:hs,showSearch:Da}}));var ri=function(){var dn;Ni==null||Ni(),(dn=xs.current)===null||dn===void 0||dn.focus(),Rn([],{type:"clear",values:hn}),js("",!1,!1)},yi=he(pn,ri,hn,jr,$n,sr,Ys,Zi),Ji=yi.allowClear,mr=yi.clearIcon,sa=Ye.createElement(Xo,{ref:ho}),Ma=pt()(pn,Rt,(fn={},(0,Ze.Z)(fn,"".concat(pn,"-focused"),hs),(0,Ze.Z)(fn,"".concat(pn,"-multiple"),na),(0,Ze.Z)(fn,"".concat(pn,"-single"),!na),(0,Ze.Z)(fn,"".concat(pn,"-allow-clear"),jr),(0,Ze.Z)(fn,"".concat(pn,"-show-arrow"),$i),(0,Ze.Z)(fn,"".concat(pn,"-disabled"),sr),(0,Ze.Z)(fn,"".concat(pn,"-loading"),Wr),(0,Ze.Z)(fn,"".concat(pn,"-open"),Wo),(0,Ze.Z)(fn,"".concat(pn,"-customize-input"),Bn),(0,Ze.Z)(fn,"".concat(pn,"-show-search"),Da),fn)),Qt=Ye.createElement(Kt,{ref:za,disabled:sr,prefixCls:pn,visible:aa,popupElement:sa,animation:Kn,transitionName:Io,dropdownStyle:Jo,dropdownClassName:Yi,direction:Pi,dropdownMatchSelectWidth:ua,dropdownRender:Zo,dropdownAlign:Dr,placement:Ir,builtinPlacements:Do,getPopupContainer:_o,empty:Oi,getTriggerDOMNode:function(){return xa.current},onPopupVisibleChange:zi,onPopupMouseEnter:Qn},Es?Ye.cloneElement(Es,{ref:Pl}):Ye.createElement(sn,(0,ue.Z)({},At,{domRef:xa,prefixCls:pn,inputElement:Bn,ref:xs,id:Jn,showSearch:Da,autoClearSearchValue:$r,mode:Zi,activeDescendantId:pr,tagRender:Vn,values:hn,open:Wo,onToggleOpen:or,activeValue:qt,searchValue:Ys,onSearch:js,onSearchSubmit:pl,onRemove:fu,tokenWithEnter:_s}))),cn;return Es?cn=Qt:cn=Ye.createElement("div",(0,ue.Z)({className:Ma},Ao,{ref:ci,onMouseDown:zs,onKeyDown:Ws,onKeyUp:su,onFocus:Oo,onBlur:Ru}),hs&&!Wo&&Ye.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(hn.map(function(Jt){var dn=Jt.label,xi=Jt.value;return["number","string"].includes((0,Me.Z)(dn))?dn:xi}).join(", "))),Qt,Ri,Ji&&mr),Ye.createElement(ve.Provider,{value:Xi},cn)}),ke=ye,$e=function(At,nt){var on=Ye.useRef({values:new Map,options:new Map}),fn=Ye.useMemo(function(){var pn=on.current,Rt=pn.values,In=pn.options,Vn=At.map(function(hn){if(hn.label===void 0){var Rn;return(0,ot.Z)((0,ot.Z)({},hn),{},{label:(Rn=Rt.get(hn.value))===null||Rn===void 0?void 0:Rn.label})}return hn}),Pi=new Map,tn=new Map;return Vn.forEach(function(hn){Pi.set(hn.value,hn),tn.set(hn.value,nt.get(hn.value)||In.get(hn.value))}),on.current.values=Pi,on.current.options=tn,Vn},[At,nt]),Jn=Ye.useCallback(function(pn){return nt.get(pn)||on.current.options.get(pn)},[nt]);return[fn,Jn]};function Le(At,nt){return bt(At).join("").toUpperCase().includes(nt)}var vt=function(At,nt,on,fn,Jn){return Ye.useMemo(function(){if(!on||fn===!1)return At;var pn=nt.options,Rt=nt.label,In=nt.value,Vn=[],Pi=typeof fn=="function",tn=on.toUpperCase(),hn=Pi?fn:function(Oi,Ii){return Jn?Le(Ii[Jn],tn):Ii[pn]?Le(Ii[Rt!=="children"?Rt:"label"],tn):Le(Ii[In],tn)},Rn=Pi?function(Oi){return Gt(Oi)}:function(Oi){return Oi};return At.forEach(function(Oi){if(Oi[pn]){var Ii=hn(on,Rn(Oi));if(Ii)Vn.push(Oi);else{var Si=Oi[pn].filter(function(Ni){return hn(on,Rn(Ni))});Si.length&&Vn.push((0,ot.Z)((0,ot.Z)({},Oi),{},(0,Ze.Z)({},pn,Si)))}return}hn(on,Rn(Oi))&&Vn.push(Oi)}),Vn},[At,fn,Jn,on,nt])},an=me(17115),bn=me(38298),en=["children","value"],wn=["children"];function ai(At){var nt=At,on=nt.key,fn=nt.props,Jn=fn.children,pn=fn.value,Rt=(0,lt.Z)(fn,en);return(0,ot.Z)({key:on,value:pn!==void 0?pn:on,children:Jn},Rt)}function _n(At){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,bn.Z)(At).map(function(on,fn){if(!Ye.isValidElement(on)||!on.type)return null;var Jn=on,pn=Jn.type.isSelectOptGroup,Rt=Jn.key,In=Jn.props,Vn=In.children,Pi=(0,lt.Z)(In,wn);return nt||!pn?ai(on):(0,ot.Z)((0,ot.Z)({key:"__RC_SELECT_GRP__".concat(Rt===null?fn:Rt,"__"),label:Rt},Pi),{},{options:_n(Vn)})}).filter(function(on){return on})}function Hn(At,nt,on,fn,Jn){return Ye.useMemo(function(){var pn=At,Rt=!At;Rt&&(pn=_n(nt));var In=new Map,Vn=new Map,Pi=function(Rn,Oi,Ii){Ii&&typeof Ii=="string"&&Rn.set(Oi[Ii],Oi)};function tn(hn){for(var Rn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oi=0;Oi<hn.length;Oi+=1){var Ii=hn[Oi];!Ii[on.options]||Rn?(In.set(Ii[on.value],Ii),Pi(Vn,Ii,on.label),Pi(Vn,Ii,fn),Pi(Vn,Ii,Jn)):tn(Ii[on.options],!0)}}return tn(pn),{options:pn,valueOptions:In,labelOptions:Vn}},[At,nt,on,fn,Jn])}function wi(At){var nt=Ye.useRef();nt.current=At;var on=Ye.useCallback(function(){return nt.current.apply(nt,arguments)},[]);return on}var Hi=function(){return null};Hi.isSelectOptGroup=!0;var _i=Hi,cr=function(){return null};cr.isSelectOption=!0;var _r=cr,vi=me(79722),si=me(64002),fi=me(70318),Ui=Ye.createContext(null),Fi=Ui;function ao(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var wr=["disabled","title","children","style","className"];function Be(At){return typeof At=="string"||typeof At=="number"}var Xr=function(nt,on){var fn=be(),Jn=fn.prefixCls,pn=fn.id,Rt=fn.open,In=fn.multiple,Vn=fn.mode,Pi=fn.searchValue,tn=fn.toggleOpen,hn=fn.notFoundContent,Rn=fn.onPopupScroll,Oi=Ye.useContext(Fi),Ii=Oi.flattenOptions,Si=Oi.onActiveValue,Ni=Oi.defaultActiveFirstOption,Zi=Oi.onSelect,sr=Oi.menuItemSelectedIcon,Wr=Oi.rawValues,li=Oi.fieldNames,Vi=Oi.virtual,vo=Oi.direction,Qr=Oi.listHeight,Er=Oi.listItemHeight,qt="".concat(Jn,"-item"),pi=(0,vi.Z)(function(){return Ii},[Rt,Ii],function(Dr,Ir){return Ir[0]&&Dr[1]!==Ir[1]}),pr=Ye.useRef(null),qi=function(Ir){Ir.preventDefault()},$r=function(Ir){pr.current&&pr.current.scrollTo(typeof Ir=="number"?{index:Ir}:Ir)},Ar=function(Ir){for(var Do=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,_o=pi.length,Ti=0;Ti<_o;Ti+=1){var tt=(Ir+Ti*Do+_o)%_o,jo=pi[tt],Ra=jo.group,$a=jo.data;if(!Ra&&!$a.disabled)return tt}return-1},io=Ye.useState(function(){return Ar(0)}),Kr=(0,We.Z)(io,2),jr=Kr[0],yo=Kr[1],$n=function(Ir){var Do=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;yo(Ir);var _o={source:Do?"keyboard":"mouse"},Ti=pi[Ir];if(!Ti){Si(null,-1,_o);return}Si(Ti.value,Ir,_o)};(0,Ye.useEffect)(function(){$n(Ni!==!1?Ar(0):-1)},[pi.length,Pi]);var Xo=Ye.useCallback(function(Dr){return Wr.has(Dr)&&Vn!=="combobox"},[Vn,(0,Re.Z)(Wr).toString(),Wr.size]);(0,Ye.useEffect)(function(){var Dr=setTimeout(function(){if(!In&&Rt&&Wr.size===1){var Do=Array.from(Wr)[0],_o=pi.findIndex(function(Ti){var tt=Ti.data;return tt.value===Do});_o!==-1&&($n(_o),$r(_o))}});if(Rt){var Ir;(Ir=pr.current)===null||Ir===void 0||Ir.scrollTo(void 0)}return function(){return clearTimeout(Dr)}},[Rt,Pi,Ii.length]);var Kn=function(Ir){Ir!==void 0&&Zi(Ir,{selected:!Wr.has(Ir)}),In||tn(!1)};if(Ye.useImperativeHandle(on,function(){return{onKeyDown:function(Ir){var Do=Ir.which,_o=Ir.ctrlKey;switch(Do){case te.Z.N:case te.Z.P:case te.Z.UP:case te.Z.DOWN:{var Ti=0;if(Do===te.Z.UP?Ti=-1:Do===te.Z.DOWN?Ti=1:ao()&&_o&&(Do===te.Z.N?Ti=1:Do===te.Z.P&&(Ti=-1)),Ti!==0){var tt=Ar(jr+Ti,Ti);$r(tt),$n(tt,!0)}break}case te.Z.ENTER:{var jo=pi[jr];jo&&!jo.data.disabled?Kn(jo.value):Kn(void 0),Rt&&Ir.preventDefault();break}case te.Z.ESC:tn(!1),Rt&&Ir.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ir){$r(Ir)}}}),pi.length===0)return Ye.createElement("div",{role:"listbox",id:"".concat(pn,"_list"),className:"".concat(qt,"-empty"),onMouseDown:qi},hn);var Io=Object.keys(li).map(function(Dr){return li[Dr]}),Jo=function(Ir){return Ir.label};function Yi(Dr,Ir){var Do=Dr.group;return{role:Do?"presentation":"option",id:"".concat(pn,"_list_").concat(Ir)}}var ua=function(Ir){var Do=pi[Ir];if(!Do)return null;var _o=Do.data||{},Ti=_o.value,tt=Do.group,jo=(0,ze.Z)(_o,!0),Ra=Jo(Do);return Do?Ye.createElement("div",(0,ue.Z)({"aria-label":typeof Ra=="string"&&!tt?Ra:null},jo,{key:Ir},Yi(Do,Ir),{"aria-selected":Xo(Ti)}),Ti):null},Zo={role:"listbox",id:"".concat(pn,"_list")};return Ye.createElement(Ye.Fragment,null,Vi&&Ye.createElement("div",(0,ue.Z)({},Zo,{style:{height:0,width:0,overflow:"hidden"}}),ua(jr-1),ua(jr),ua(jr+1)),Ye.createElement(fi.Z,{itemKey:"key",ref:pr,data:pi,height:Qr,itemHeight:Er,fullHeight:!1,onMouseDown:qi,onScroll:Rn,virtual:Vi,direction:vo,innerProps:Vi?null:Zo},function(Dr,Ir){var Do,_o=Dr.group,Ti=Dr.groupOption,tt=Dr.data,jo=Dr.label,Ra=Dr.value,$a=tt.key;if(_o){var ls,Or=(ls=tt.title)!==null&&ls!==void 0?ls:Be(jo)?jo.toString():void 0;return Ye.createElement("div",{className:pt()(qt,"".concat(qt,"-group")),title:Or},jo!==void 0?jo:$a)}var xo=tt.disabled,na=tt.title,Da=tt.children,Ao=tt.style,Va=tt.className,Jr=(0,lt.Z)(tt,wr),eo=(0,si.Z)(Jr,Io),Eo=Xo(Ra),ci="".concat(qt,"-option"),xa=pt()(qt,ci,Va,(Do={},(0,Ze.Z)(Do,"".concat(ci,"-grouped"),Ti),(0,Ze.Z)(Do,"".concat(ci,"-active"),jr===Ir&&!xo),(0,Ze.Z)(Do,"".concat(ci,"-disabled"),xo),(0,Ze.Z)(Do,"".concat(ci,"-selected"),Eo),Do)),za=Jo(Dr),xs=!sr||typeof sr=="function"||Eo,ho=typeof za=="number"?za:za||Ra,ca=Be(ho)?ho.toString():void 0;return na!==void 0&&(ca=na),Ye.createElement("div",(0,ue.Z)({},(0,ze.Z)(eo),Vi?{}:Yi(Dr,Ir),{"aria-selected":Eo,className:xa,title:ca,onMouseMove:function(){jr===Ir||xo||$n(Ir)},onClick:function(){xo||Kn(Ra)},style:Ao}),Ye.createElement("div",{className:"".concat(ci,"-content")},ho),Ye.isValidElement(sr)||Eo,xs&&Ye.createElement(se,{className:"".concat(qt,"-option-state"),customizeIcon:sr,customizeIconProps:{isSelected:Eo}},Eo?"\u2713":null))}))},Hr=Ye.forwardRef(Xr);Hr.displayName="OptionList";var jn=Hr;function Li(At){var nt=At.mode,on=At.options,fn=At.children,Jn=At.backfill,pn=At.allowClear,Rt=At.placeholder,In=At.getInputElement,Vn=At.showSearch,Pi=At.onSearch,tn=At.defaultOpen,hn=At.autoFocus,Rn=At.labelInValue,Oi=At.value,Ii=At.inputValue,Si=At.optionLabelProp,Ni=isMultiple(nt),Zi=Vn!==void 0?Vn:Ni||nt==="combobox",sr=on||convertChildrenToData(fn);if(warning(nt!=="tags"||sr.every(function(vo){return!vo.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),nt==="tags"||nt==="combobox"){var Wr=sr.some(function(vo){return vo.options?vo.options.some(function(Qr){return typeof("value"in Qr?Qr.value:Qr.key)=="number"}):typeof("value"in vo?vo.value:vo.key)=="number"});warning(!Wr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(nt!=="combobox"||!Si,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(nt==="combobox"||!Jn,"`backfill` only works with `combobox` mode."),warning(nt==="combobox"||!In,"`getInputElement` only work with `combobox` mode."),noteOnce(nt!=="combobox"||!In||!pn||!Rt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Pi&&!Zi&&nt!=="combobox"&&nt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!tn||hn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Oi!=null){var li=toArray(Oi);warning(!Rn||li.every(function(vo){return _typeof(vo)==="object"&&("key"in vo||"value"in vo)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Ni||Array.isArray(Oi),"`value` should be array when `mode` is `multiple` or `tags`")}if(fn){var Vi=null;toNodeArray(fn).some(function(vo){if(!React.isValidElement(vo)||!vo.type)return!1;var Qr=vo,Er=Qr.type;if(Er.isSelectOption)return!1;if(Er.isSelectOptGroup){var qt=toNodeArray(vo.props.children).every(function(pi){return!React.isValidElement(pi)||!vo.type||pi.type.isSelectOption?!0:(Vi=pi.type,!1)});return!qt}return Vi=Er,!0}),Vi&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Vi.displayName||Vi.name||Vi,"`.")),warning(Ii===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Wi(At,nt){if(At){var on=function fn(Jn){for(var pn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Rt=0;Rt<Jn.length;Rt++){var In=Jn[Rt];if(In[nt==null?void 0:nt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!pn&&Array.isArray(In[nt==null?void 0:nt.options])&&fn(In[nt==null?void 0:nt.options],!0))break}};on(At)}}var ji=null,Gn=["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"],Ht=["inputValue"];function Wt(At){return!At||(0,Me.Z)(At)!=="object"}var Zt=Ye.forwardRef(function(At,nt){var on=At.id,fn=At.mode,Jn=At.prefixCls,pn=Jn===void 0?"rc-select":Jn,Rt=At.backfill,In=At.fieldNames,Vn=At.inputValue,Pi=At.searchValue,tn=At.onSearch,hn=At.autoClearSearchValue,Rn=hn===void 0?!0:hn,Oi=At.onSelect,Ii=At.onDeselect,Si=At.dropdownMatchSelectWidth,Ni=Si===void 0?!0:Si,Zi=At.filterOption,sr=At.filterSort,Wr=At.optionFilterProp,li=At.optionLabelProp,Vi=At.options,vo=At.children,Qr=At.defaultActiveFirstOption,Er=At.menuItemSelectedIcon,qt=At.virtual,pi=At.direction,pr=At.listHeight,qi=pr===void 0?200:pr,$r=At.listItemHeight,Ar=$r===void 0?20:$r,io=At.value,Kr=At.defaultValue,jr=At.labelInValue,yo=At.onChange,$n=(0,lt.Z)(At,Gn),Xo=(0,an.ZP)(on),Kn=Pe(fn),Io=!!(!Vi&&vo),Jo=Ye.useMemo(function(){return Zi===void 0&&fn==="combobox"?!1:Zi},[Zi,fn]),Yi=Ye.useMemo(function(){return Ue(In,Io)},[JSON.stringify(In),Io]),ua=(0,Mt.Z)("",{value:Pi!==void 0?Pi:Vn,postState:function(Ia){return Ia||""}}),Zo=(0,We.Z)(ua,2),Dr=Zo[0],Ir=Zo[1],Do=Hn(Vi,vo,Yi,Wr,li),_o=Do.valueOptions,Ti=Do.labelOptions,tt=Do.options,jo=Ye.useCallback(function(Wo){var Ia=bt(Wo);return Ia.map(function(aa){var or,_s,js,pl,Xs;if(Wt(aa))or=aa;else{var hu;js=aa.key,_s=aa.label,or=(hu=aa.value)!==null&&hu!==void 0?hu:js}var er=_o.get(or);if(er){var Ss;if(_s===void 0&&(_s=er==null?void 0:er[li||Yi.label]),js===void 0&&(js=(Ss=er==null?void 0:er.key)!==null&&Ss!==void 0?Ss:or),pl=er==null?void 0:er.disabled,Xs=er==null?void 0:er.title,0)var Ws}return{label:_s,value:or,key:js,disabled:pl,title:Xs}})},[Yi,li,_o]),Ra=(0,Mt.Z)(Kr,{value:io}),$a=(0,We.Z)(Ra,2),ls=$a[0],Or=$a[1],xo=Ye.useMemo(function(){var Wo,Ia=jo(ls);return fn==="combobox"&&Bt((Wo=Ia[0])===null||Wo===void 0?void 0:Wo.value)?[]:Ia},[ls,jo,fn]),na=$e(xo,_o),Da=(0,We.Z)(na,2),Ao=Da[0],Va=Da[1],Jr=Ye.useMemo(function(){if(!fn&&Ao.length===1){var Wo=Ao[0];if(Wo.value===null&&(Wo.label===null||Wo.label===void 0))return[]}return Ao.map(function(Ia){var aa;return(0,ot.Z)((0,ot.Z)({},Ia),{},{label:(aa=Ia.label)!==null&&aa!==void 0?aa:Ia.value})})},[fn,Ao]),eo=Ye.useMemo(function(){return new Set(Ao.map(function(Wo){return Wo.value}))},[Ao]);Ye.useEffect(function(){if(fn==="combobox"){var Wo,Ia=(Wo=Ao[0])===null||Wo===void 0?void 0:Wo.value;Ir(xt(Ia)?String(Ia):"")}},[Ao]);var Eo=wi(function(Wo,Ia){var aa,or=Ia!=null?Ia:Wo;return aa={},(0,Ze.Z)(aa,Yi.value,Wo),(0,Ze.Z)(aa,Yi.label,or),aa}),ci=Ye.useMemo(function(){if(fn!=="tags")return tt;var Wo=(0,Re.Z)(tt),Ia=function(or){return _o.has(or)};return(0,Re.Z)(Ao).sort(function(aa,or){return aa.value<or.value?-1:1}).forEach(function(aa){var or=aa.value;Ia(or)||Wo.push(Eo(or,aa.label))}),Wo},[Eo,tt,_o,Ao,fn]),xa=vt(ci,Yi,Dr,Jo,Wr),za=Ye.useMemo(function(){return fn!=="tags"||!Dr||xa.some(function(Wo){return Wo[Wr||"value"]===Dr})||xa.some(function(Wo){return Wo[Yi.value]===Dr})?xa:[Eo(Dr)].concat((0,Re.Z)(xa))},[Eo,Wr,fn,xa,Dr,Yi]),xs=Ye.useMemo(function(){return sr?(0,Re.Z)(za).sort(function(Wo,Ia){return sr(Wo,Ia)}):za},[za,sr]),ho=Ye.useMemo(function(){return $t(xs,{fieldNames:Yi,childrenAsData:Io})},[xs,Yi,Io]),ca=function(Ia){var aa=jo(Ia);if(Or(aa),yo&&(aa.length!==Ao.length||aa.some(function(js,pl){var Xs;return((Xs=Ao[pl])===null||Xs===void 0?void 0:Xs.value)!==(js==null?void 0:js.value)}))){var or=jr?aa:aa.map(function(js){return js.value}),_s=aa.map(function(js){return Gt(Va(js.value))});yo(Kn?or:or[0],Kn?_s:_s[0])}},ja=Ye.useState(null),hs=(0,We.Z)(ja,2),fs=hs[0],ll=hs[1],Ys=Ye.useState(0),Bn=(0,We.Z)(Ys,2),Es=Bn[0],Pl=Bn[1],Wl=Qr!==void 0?Qr:fn!=="combobox",Mo=Ye.useCallback(function(Wo,Ia){var aa=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},or=aa.source,_s=or===void 0?"keyboard":or;Pl(Ia),Rt&&fn==="combobox"&&Wo!==null&&_s==="keyboard"&&ll(String(Wo))},[Rt,fn]),gl=function(Ia,aa,or){var _s=function(){var lu,Oo=Va(Ia);return[jr?{label:Oo==null?void 0:Oo[Yi.label],value:Ia,key:(lu=Oo==null?void 0:Oo.key)!==null&&lu!==void 0?lu:Ia}:Ia,Gt(Oo)]};if(aa&&Oi){var js=_s(),pl=(0,We.Z)(js,2),Xs=pl[0],hu=pl[1];Oi(Xs,hu)}else if(!aa&&Ii&&or!=="clear"){var er=_s(),Ss=(0,We.Z)(er,2),Ws=Ss[0],su=Ss[1];Ii(Ws,su)}},Tu=wi(function(Wo,Ia){var aa,or=Kn?Ia.selected:!0;or?aa=Kn?[].concat((0,Re.Z)(Ao),[Wo]):[Wo]:aa=Ao.filter(function(_s){return _s.value!==Wo}),ca(aa),gl(Wo,or),fn==="combobox"?ll(""):(!Pe||Rn)&&(Ir(""),ll(""))}),Ql=function(Ia,aa){ca(Ia);var or=aa.type,_s=aa.values;(or==="remove"||or==="clear")&&_s.forEach(function(js){gl(js.value,!1,or)})},us=function(Ia,aa){if(Ir(Ia),ll(null),aa.source==="submit"){var or=(Ia||"").trim();if(or){var _s=Array.from(new Set([].concat((0,Re.Z)(eo),[or])));ca(_s),gl(or,!0),Ir("")}return}aa.source!=="blur"&&(fn==="combobox"&&ca(Ia),tn==null||tn(Ia))},Sa=function(Ia){var aa=Ia;fn!=="tags"&&(aa=Ia.map(function(_s){var js=Ti.get(_s);return js==null?void 0:js.value}).filter(function(_s){return _s!==void 0}));var or=Array.from(new Set([].concat((0,Re.Z)(eo),(0,Re.Z)(aa))));ca(or),or.forEach(function(_s){gl(_s,!0)})},Il=Ye.useMemo(function(){var Wo=qt!==!1&&Ni!==!1;return(0,ot.Z)((0,ot.Z)({},Do),{},{flattenOptions:ho,onActiveValue:Mo,defaultActiveFirstOption:Wl,onSelect:Tu,menuItemSelectedIcon:Er,rawValues:eo,fieldNames:Yi,virtual:Wo,direction:pi,listHeight:qi,listItemHeight:Ar,childrenAsData:Io})},[Do,ho,Mo,Wl,Tu,Er,eo,Yi,qt,Ni,qi,Ar,Io]);return Ye.createElement(Fi.Provider,{value:Il},Ye.createElement(ke,(0,ue.Z)({},$n,{id:Xo,prefixCls:pn,ref:nt,omitDomProps:Ht,mode:fn,displayValues:Jr,onDisplayValuesChange:Ql,direction:pi,searchValue:Dr,onSearch:us,autoClearSearchValue:Rn,onSearchSplit:Sa,dropdownMatchSelectWidth:Ni,OptionList:jn,emptyOptions:!ho.length,activeValue:fs,activeDescendantId:"".concat(Xo,"_list_").concat(Es)})))}),yt=Zt;yt.Option=_r,yt.OptGroup=_i;var un=yt,vn=un},9296:function(zn,En,me){"use strict";me.r(En),me.d(En,{ResizableTextArea:function(){return dt},default:function(){return Bt}});var ue=me(5891),Re=me(57259),Ze=me(80962),ot=me(80665),We=me(29043),lt=me(19149),Me=me(26390),Mt=me(92310),Ct=me.n(Mt),Ye=me(93681),st=me(5643),pt=me(35788),wt=me(59301),Ie=me(29301),te=me(28800),ee=me(23073),de=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,se=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],he={},ve;function be(Ut){var Nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qe=Ut.getAttribute("id")||Ut.getAttribute("data-reactid")||Ut.getAttribute("name");if(Nt&&he[qe])return he[qe];var Ke=window.getComputedStyle(Ut),Tt=Ke.getPropertyValue("box-sizing")||Ke.getPropertyValue("-moz-box-sizing")||Ke.getPropertyValue("-webkit-box-sizing"),Ln=parseFloat(Ke.getPropertyValue("padding-bottom"))+parseFloat(Ke.getPropertyValue("padding-top")),Mn=parseFloat(Ke.getPropertyValue("border-bottom-width"))+parseFloat(Ke.getPropertyValue("border-top-width")),zt=se.map(function(xn){return"".concat(xn,":").concat(Ke.getPropertyValue(xn))}).join(";"),rn={sizingStyle:zt,paddingSize:Ln,borderSize:Mn,boxSizing:Tt};return Nt&&qe&&(he[qe]=rn),rn}function Ne(Ut){var Nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ke=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ve||(ve=document.createElement("textarea"),ve.setAttribute("tab-index","-1"),ve.setAttribute("aria-hidden","true"),document.body.appendChild(ve)),Ut.getAttribute("wrap")?ve.setAttribute("wrap",Ut.getAttribute("wrap")):ve.removeAttribute("wrap");var Tt=be(Ut,Nt),Ln=Tt.paddingSize,Mn=Tt.borderSize,zt=Tt.boxSizing,rn=Tt.sizingStyle;ve.setAttribute("style","".concat(rn,";").concat(de)),ve.value=Ut.value||Ut.placeholder||"";var xn=void 0,Un=void 0,yn,sn=ve.scrollHeight;if(zt==="border-box"?sn+=Mn:zt==="content-box"&&(sn-=Ln),qe!==null||Ke!==null){ve.value=" ";var Lt=ve.scrollHeight-Ln;qe!==null&&(xn=Lt*qe,zt==="border-box"&&(xn=xn+Ln+Mn),sn=Math.max(xn,sn)),Ke!==null&&(Un=Lt*Ke,zt==="border-box"&&(Un=Un+Ln+Mn),yn=sn>Un?"":"hidden",sn=Math.min(Un,sn))}var ti={height:sn,overflowY:yn,resize:"none"};return xn&&(ti.minHeight=xn),Un&&(ti.maxHeight=Un),ti}var Fe=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],je=0,ze=1,Xe=2,Je=wt.forwardRef(function(Ut,Nt){var qe=Ut,Ke=qe.prefixCls,Tt=qe.onPressEnter,Ln=qe.defaultValue,Mn=qe.value,zt=qe.autoSize,rn=qe.onResize,xn=qe.className,Un=qe.style,yn=qe.disabled,sn=qe.onChange,Lt=qe.onInternalAutoSize,ti=(0,lt.Z)(qe,Fe),gi=(0,pt.Z)(Ln,{value:Mn,postState:function(_i){return _i!=null?_i:""}}),Pn=(0,We.Z)(gi,2),Xt=Pn[0],Kt=Pn[1],Ot=function(_i){Kt(_i.target.value),sn==null||sn(_i)},rt=wt.useRef();wt.useImperativeHandle(Nt,function(){return{textArea:rt.current}});var Ue=wt.useMemo(function(){return zt&&(0,ot.Z)(zt)==="object"?[zt.minRows,zt.maxRows]:[]},[zt]),$t=(0,We.Z)(Ue,2),Gt=$t[0],it=$t[1],at=!!zt,Te=function(){try{if(document.activeElement===rt.current){var _i=rt.current,cr=_i.selectionStart,_r=_i.selectionEnd,vi=_i.scrollTop;rt.current.setSelectionRange(cr,_r),rt.current.scrollTop=vi}}catch(si){}},Pe=wt.useState(Xe),ye=(0,We.Z)(Pe,2),ke=ye[0],$e=ye[1],Le=wt.useState(),vt=(0,We.Z)(Le,2),an=vt[0],bn=vt[1],en=function(){$e(je)};(0,te.Z)(function(){at&&en()},[Mn,Gt,it,at]),(0,te.Z)(function(){if(ke===je)$e(ze);else if(ke===ze){var Hi=Ne(rt.current,!1,Gt,it);$e(Xe),bn(Hi)}else Te()},[ke]);var wn=wt.useRef(),ai=function(){ee.Z.cancel(wn.current)},_n=function(_i){ke===Xe&&(rn==null||rn(_i),zt&&(ai(),wn.current=(0,ee.Z)(function(){en()})))};wt.useEffect(function(){return ai},[]);var Hn=at?an:null,wi=(0,Re.Z)((0,Re.Z)({},Un),Hn);return(ke===je||ke===ze)&&(wi.overflowY="hidden",wi.overflowX="hidden"),wt.createElement(Ie.Z,{onResize:_n,disabled:!(zt||rn)},wt.createElement("textarea",(0,ue.Z)({},ti,{ref:rt,style:wi,className:Ct()(Ke,xn,(0,Ze.Z)({},"".concat(Ke,"-disabled"),yn)),disabled:yn,value:Xt,onChange:Ot})))}),dt=Je,He=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function bt(Ut,Nt){return(0,Me.Z)(Ut||"").slice(0,Nt).join("")}function et(Ut,Nt,qe,Ke){var Tt=qe;return Ut?Tt=bt(qe,Ke):(0,Me.Z)(Nt||"").length<qe.length&&(0,Me.Z)(qe||"").length>Ke&&(Tt=Nt),Tt}var It=wt.forwardRef(function(Ut,Nt){var qe,Ke=Ut.defaultValue,Tt=Ut.value,Ln=Ut.onFocus,Mn=Ut.onBlur,zt=Ut.onChange,rn=Ut.allowClear,xn=Ut.maxLength,Un=Ut.onCompositionStart,yn=Ut.onCompositionEnd,sn=Ut.suffix,Lt=Ut.prefixCls,ti=Lt===void 0?"rc-textarea":Lt,gi=Ut.classes,Pn=Ut.showCount,Xt=Ut.className,Kt=Ut.style,Ot=Ut.disabled,rt=Ut.hidden,Ue=Ut.classNames,$t=Ut.styles,Gt=Ut.onResize,it=(0,lt.Z)(Ut,He),at=(0,pt.Z)(Ke,{value:Tt,defaultValue:Ke}),Te=(0,We.Z)(at,2),Pe=Te[0],ye=Te[1],ke=(0,wt.useRef)(null),$e=wt.useState(!1),Le=(0,We.Z)($e,2),vt=Le[0],an=Le[1],bn=wt.useState(!1),en=(0,We.Z)(bn,2),wn=en[0],ai=en[1],_n=wt.useRef(),Hn=wt.useRef(0),wi=wt.useState(null),Hi=(0,We.Z)(wi,2),_i=Hi[0],cr=Hi[1],_r=function(){var Wt;(Wt=ke.current)===null||Wt===void 0||Wt.textArea.focus()};(0,wt.useImperativeHandle)(Nt,function(){return{resizableTextArea:ke.current,focus:_r,blur:function(){var Wt;(Wt=ke.current)===null||Wt===void 0||Wt.textArea.blur()}}}),(0,wt.useEffect)(function(){an(function(Ht){return!Ot&&Ht})},[Ot]);var vi=Number(xn)>0,si=function(Wt){ai(!0),_n.current=Pe,Hn.current=Wt.currentTarget.selectionStart,Un==null||Un(Wt)},fi=function(Wt){ai(!1);var Zt=Wt.currentTarget.value;if(vi){var yt,un=Hn.current>=xn+1||Hn.current===((yt=_n.current)===null||yt===void 0?void 0:yt.length);Zt=et(un,_n.current,Zt,xn)}Zt!==Pe&&(ye(Zt),(0,st.rJ)(Wt.currentTarget,Wt,zt,Zt)),yn==null||yn(Wt)},Ui=function(Wt){var Zt=Wt.target.value;if(!wn&&vi){var yt=Wt.target.selectionStart>=xn+1||Wt.target.selectionStart===Zt.length||!Wt.target.selectionStart;Zt=et(yt,Pe,Zt,xn)}ye(Zt),(0,st.rJ)(Wt.currentTarget,Wt,zt,Zt)},Fi=function(Wt){var Zt=it.onPressEnter,yt=it.onKeyDown;Wt.key==="Enter"&&Zt&&Zt(Wt),yt==null||yt(Wt)},ao=function(Wt){an(!0),Ln==null||Ln(Wt)},wr=function(Wt){an(!1),Mn==null||Mn(Wt)},Be=function(Wt){var Zt;ye(""),_r(),(0,st.rJ)((Zt=ke.current)===null||Zt===void 0?void 0:Zt.textArea,Wt,zt)},Xr=(0,st.D7)(Pe);!wn&&vi&&Tt==null&&(Xr=bt(Xr,xn));var Hr=sn,jn;if(Pn){var Li=(0,Me.Z)(Xr).length;(0,ot.Z)(Pn)==="object"?jn=Pn.formatter({value:Xr,count:Li,maxLength:xn}):jn="".concat(Li).concat(vi?" / ".concat(xn):""),Hr=wt.createElement(wt.Fragment,null,Hr,wt.createElement("span",{className:Ct()("".concat(ti,"-data-count"),Ue==null?void 0:Ue.count),style:$t==null?void 0:$t.count},jn))}var Wi=function(Wt){var Zt;Gt==null||Gt(Wt),(Zt=ke.current)!==null&&Zt!==void 0&&Zt.textArea.style.height&&cr(!0)},ji=!it.autoSize&&!Pn&&!rn,Gn=wt.createElement(Ye.BaseInput,{value:Xr,allowClear:rn,handleReset:Be,suffix:Hr,prefixCls:ti,classes:{affixWrapper:Ct()(gi==null?void 0:gi.affixWrapper,(qe={},(0,Ze.Z)(qe,"".concat(ti,"-show-count"),Pn),(0,Ze.Z)(qe,"".concat(ti,"-textarea-allow-clear"),rn),qe))},disabled:Ot,focused:vt,className:Xt,style:(0,Re.Z)((0,Re.Z)({},Kt),_i&&!ji?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof jn=="string"?jn:void 0}},hidden:rt,inputElement:wt.createElement(dt,(0,ue.Z)({},it,{onKeyDown:Fi,onChange:Ui,onFocus:ao,onBlur:wr,onCompositionStart:si,onCompositionEnd:fi,className:Ue==null?void 0:Ue.textarea,style:(0,Re.Z)((0,Re.Z)({},$t==null?void 0:$t.textarea),{},{resize:Kt==null?void 0:Kt.resize}),disabled:Ot,prefixCls:ti,onResize:Wi,ref:ke}))});return Gn}),xt=It,Bt=xt},39417:function(zn,En,me){"use strict";me.d(En,{Z:function(){return ze}});var ue=me(5891),Re=me(80962),Ze=me(19149),ot=me(57259),We=me(79545),lt=me(68550),Me=me(21882),Mt=me(17928),Ct=me(7711),Ye=me(92310),st=me.n(Ye),pt=me(36994),wt=me(59301),Ie=me(39378),te=function(Je){for(var dt=Je.prefixCls,He=Je.level,bt=Je.isStart,et=Je.isEnd,It="".concat(dt,"-indent-unit"),xt=[],Bt=0;Bt<He;Bt+=1){var Ut;xt.push(wt.createElement("span",{key:Bt,className:st()(It,(Ut={},(0,Re.Z)(Ut,"".concat(It,"-start"),bt[Bt]),(0,Re.Z)(Ut,"".concat(It,"-end"),et[Bt]),Ut))}))}return wt.createElement("span",{"aria-hidden":"true",className:"".concat(dt,"-indent")},xt)},ee=wt.memo(te),de=me(67841),se=me(71430),he=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ve="open",be="close",Ne="---",Fe=function(Xe){(0,Mt.Z)(dt,Xe);var Je=(0,Ct.Z)(dt);function dt(){var He;(0,We.Z)(this,dt);for(var bt=arguments.length,et=new Array(bt),It=0;It<bt;It++)et[It]=arguments[It];return He=Je.call.apply(Je,[this].concat(et)),He.state={dragNodeHighlight:!1},He.selectHandle=void 0,He.cacheIndent=void 0,He.onSelectorClick=function(xt){var Bt=He.props.context.onNodeClick;Bt(xt,(0,se.F)(He.props)),He.isSelectable()?He.onSelect(xt):He.onCheck(xt)},He.onSelectorDoubleClick=function(xt){var Bt=He.props.context.onNodeDoubleClick;Bt(xt,(0,se.F)(He.props))},He.onSelect=function(xt){if(!He.isDisabled()){var Bt=He.props.context.onNodeSelect;Bt(xt,(0,se.F)(He.props))}},He.onCheck=function(xt){if(!He.isDisabled()){var Bt=He.props,Ut=Bt.disableCheckbox,Nt=Bt.checked,qe=He.props.context.onNodeCheck;if(!(!He.isCheckable()||Ut)){var Ke=!Nt;qe(xt,(0,se.F)(He.props),Ke)}}},He.onMouseEnter=function(xt){var Bt=He.props.context.onNodeMouseEnter;Bt(xt,(0,se.F)(He.props))},He.onMouseLeave=function(xt){var Bt=He.props.context.onNodeMouseLeave;Bt(xt,(0,se.F)(He.props))},He.onContextMenu=function(xt){var Bt=He.props.context.onNodeContextMenu;Bt(xt,(0,se.F)(He.props))},He.onDragStart=function(xt){var Bt=He.props.context.onNodeDragStart;xt.stopPropagation(),He.setState({dragNodeHighlight:!0}),Bt(xt,(0,Me.Z)(He));try{xt.dataTransfer.setData("text/plain","")}catch(Ut){}},He.onDragEnter=function(xt){var Bt=He.props.context.onNodeDragEnter;xt.preventDefault(),xt.stopPropagation(),Bt(xt,(0,Me.Z)(He))},He.onDragOver=function(xt){var Bt=He.props.context.onNodeDragOver;xt.preventDefault(),xt.stopPropagation(),Bt(xt,(0,Me.Z)(He))},He.onDragLeave=function(xt){var Bt=He.props.context.onNodeDragLeave;xt.stopPropagation(),Bt(xt,(0,Me.Z)(He))},He.onDragEnd=function(xt){var Bt=He.props.context.onNodeDragEnd;xt.stopPropagation(),He.setState({dragNodeHighlight:!1}),Bt(xt,(0,Me.Z)(He))},He.onDrop=function(xt){var Bt=He.props.context.onNodeDrop;xt.preventDefault(),xt.stopPropagation(),He.setState({dragNodeHighlight:!1}),Bt(xt,(0,Me.Z)(He))},He.onExpand=function(xt){var Bt=He.props,Ut=Bt.loading,Nt=Bt.context.onNodeExpand;Ut||Nt(xt,(0,se.F)(He.props))},He.setSelectHandle=function(xt){He.selectHandle=xt},He.getNodeState=function(){var xt=He.props.expanded;return He.isLeaf()?null:xt?ve:be},He.hasChildren=function(){var xt=He.props.eventKey,Bt=He.props.context.keyEntities,Ut=(0,de.Z)(Bt,xt)||{},Nt=Ut.children;return!!(Nt||[]).length},He.isLeaf=function(){var xt=He.props,Bt=xt.isLeaf,Ut=xt.loaded,Nt=He.props.context.loadData,qe=He.hasChildren();return Bt===!1?!1:Bt||!Nt&&!qe||Nt&&Ut&&!qe},He.isDisabled=function(){var xt=He.props.disabled,Bt=He.props.context.disabled;return!!(Bt||xt)},He.isCheckable=function(){var xt=He.props.checkable,Bt=He.props.context.checkable;return!Bt||xt===!1?!1:Bt},He.syncLoadData=function(xt){var Bt=xt.expanded,Ut=xt.loading,Nt=xt.loaded,qe=He.props.context,Ke=qe.loadData,Tt=qe.onNodeLoad;Ut||Ke&&Bt&&!He.isLeaf()&&!He.hasChildren()&&!Nt&&Tt((0,se.F)(He.props))},He.isDraggable=function(){var xt=He.props,Bt=xt.data,Ut=xt.context.draggable;return!!(Ut&&(!Ut.nodeDraggable||Ut.nodeDraggable(Bt)))},He.renderDragHandler=function(){var xt=He.props.context,Bt=xt.draggable,Ut=xt.prefixCls;return Bt!=null&&Bt.icon?wt.createElement("span",{className:"".concat(Ut,"-draggable-icon")},Bt.icon):null},He.renderSwitcherIconDom=function(xt){var Bt=He.props.switcherIcon,Ut=He.props.context.switcherIcon,Nt=Bt||Ut;return typeof Nt=="function"?Nt((0,ot.Z)((0,ot.Z)({},He.props),{},{isLeaf:xt})):Nt},He.renderSwitcher=function(){var xt=He.props.expanded,Bt=He.props.context.prefixCls;if(He.isLeaf()){var Ut=He.renderSwitcherIconDom(!0);return Ut!==!1?wt.createElement("span",{className:st()("".concat(Bt,"-switcher"),"".concat(Bt,"-switcher-noop"))},Ut):null}var Nt=st()("".concat(Bt,"-switcher"),"".concat(Bt,"-switcher_").concat(xt?ve:be)),qe=He.renderSwitcherIconDom(!1);return qe!==!1?wt.createElement("span",{onClick:He.onExpand,className:Nt},qe):null},He.renderCheckbox=function(){var xt=He.props,Bt=xt.checked,Ut=xt.halfChecked,Nt=xt.disableCheckbox,qe=He.props.context.prefixCls,Ke=He.isDisabled(),Tt=He.isCheckable();if(!Tt)return null;var Ln=typeof Tt!="boolean"?Tt:null;return wt.createElement("span",{className:st()("".concat(qe,"-checkbox"),Bt&&"".concat(qe,"-checkbox-checked"),!Bt&&Ut&&"".concat(qe,"-checkbox-indeterminate"),(Ke||Nt)&&"".concat(qe,"-checkbox-disabled")),onClick:He.onCheck},Ln)},He.renderIcon=function(){var xt=He.props.loading,Bt=He.props.context.prefixCls;return wt.createElement("span",{className:st()("".concat(Bt,"-iconEle"),"".concat(Bt,"-icon__").concat(He.getNodeState()||"docu"),xt&&"".concat(Bt,"-icon_loading"))})},He.renderSelector=function(){var xt=He.state.dragNodeHighlight,Bt=He.props,Ut=Bt.title,Nt=Ut===void 0?Ne:Ut,qe=Bt.selected,Ke=Bt.icon,Tt=Bt.loading,Ln=Bt.data,Mn=He.props.context,zt=Mn.prefixCls,rn=Mn.showIcon,xn=Mn.icon,Un=Mn.loadData,yn=Mn.titleRender,sn=He.isDisabled(),Lt="".concat(zt,"-node-content-wrapper"),ti;if(rn){var gi=Ke||xn;ti=gi?wt.createElement("span",{className:st()("".concat(zt,"-iconEle"),"".concat(zt,"-icon__customize"))},typeof gi=="function"?gi(He.props):gi):He.renderIcon()}else Un&&Tt&&(ti=He.renderIcon());var Pn;typeof Nt=="function"?Pn=Nt(Ln):yn?Pn=yn(Ln):Pn=Nt;var Xt=wt.createElement("span",{className:"".concat(zt,"-title")},Pn);return wt.createElement("span",{ref:He.setSelectHandle,title:typeof Nt=="string"?Nt:"",className:st()("".concat(Lt),"".concat(Lt,"-").concat(He.getNodeState()||"normal"),!sn&&(qe||xt)&&"".concat(zt,"-node-selected")),onMouseEnter:He.onMouseEnter,onMouseLeave:He.onMouseLeave,onContextMenu:He.onContextMenu,onClick:He.onSelectorClick,onDoubleClick:He.onSelectorDoubleClick},ti,Xt,He.renderDropIndicator())},He.renderDropIndicator=function(){var xt=He.props,Bt=xt.disabled,Ut=xt.eventKey,Nt=He.props.context,qe=Nt.draggable,Ke=Nt.dropLevelOffset,Tt=Nt.dropPosition,Ln=Nt.prefixCls,Mn=Nt.indent,zt=Nt.dropIndicatorRender,rn=Nt.dragOverNodeKey,xn=Nt.direction,Un=!!qe,yn=!Bt&&Un&&rn===Ut,sn=Mn!=null?Mn:He.cacheIndent;return He.cacheIndent=Mn,yn?zt({dropPosition:Tt,dropLevelOffset:Ke,indent:sn,prefixCls:Ln,direction:xn}):null},He}return(0,lt.Z)(dt,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var bt=this.props.selectable,et=this.props.context.selectable;return typeof bt=="boolean"?bt:et}},{key:"render",value:function(){var bt,et=this.props,It=et.eventKey,xt=et.className,Bt=et.style,Ut=et.dragOver,Nt=et.dragOverGapTop,qe=et.dragOverGapBottom,Ke=et.isLeaf,Tt=et.isStart,Ln=et.isEnd,Mn=et.expanded,zt=et.selected,rn=et.checked,xn=et.halfChecked,Un=et.loading,yn=et.domRef,sn=et.active,Lt=et.data,ti=et.onMouseMove,gi=et.selectable,Pn=(0,Ze.Z)(et,he),Xt=this.props.context,Kt=Xt.prefixCls,Ot=Xt.filterTreeNode,rt=Xt.keyEntities,Ue=Xt.dropContainerKey,$t=Xt.dropTargetKey,Gt=Xt.draggingNodeKey,it=this.isDisabled(),at=(0,pt.Z)(Pn,{aria:!0,data:!0}),Te=(0,de.Z)(rt,It)||{},Pe=Te.level,ye=Ln[Ln.length-1],ke=this.isDraggable(),$e=!it&&ke,Le=Gt===It,vt=gi!==void 0?{"aria-selected":!!gi}:void 0;return wt.createElement("div",(0,ue.Z)({ref:yn,className:st()(xt,"".concat(Kt,"-treenode"),(bt={},(0,Re.Z)(bt,"".concat(Kt,"-treenode-disabled"),it),(0,Re.Z)(bt,"".concat(Kt,"-treenode-switcher-").concat(Mn?"open":"close"),!Ke),(0,Re.Z)(bt,"".concat(Kt,"-treenode-checkbox-checked"),rn),(0,Re.Z)(bt,"".concat(Kt,"-treenode-checkbox-indeterminate"),xn),(0,Re.Z)(bt,"".concat(Kt,"-treenode-selected"),zt),(0,Re.Z)(bt,"".concat(Kt,"-treenode-loading"),Un),(0,Re.Z)(bt,"".concat(Kt,"-treenode-active"),sn),(0,Re.Z)(bt,"".concat(Kt,"-treenode-leaf-last"),ye),(0,Re.Z)(bt,"".concat(Kt,"-treenode-draggable"),ke),(0,Re.Z)(bt,"dragging",Le),(0,Re.Z)(bt,"drop-target",$t===It),(0,Re.Z)(bt,"drop-container",Ue===It),(0,Re.Z)(bt,"drag-over",!it&&Ut),(0,Re.Z)(bt,"drag-over-gap-top",!it&&Nt),(0,Re.Z)(bt,"drag-over-gap-bottom",!it&&qe),(0,Re.Z)(bt,"filter-node",Ot&&Ot((0,se.F)(this.props))),bt)),style:Bt,draggable:$e,"aria-grabbed":Le,onDragStart:$e?this.onDragStart:void 0,onDragEnter:ke?this.onDragEnter:void 0,onDragOver:ke?this.onDragOver:void 0,onDragLeave:ke?this.onDragLeave:void 0,onDrop:ke?this.onDrop:void 0,onDragEnd:ke?this.onDragEnd:void 0,onMouseMove:ti},vt,at),wt.createElement(ee,{prefixCls:Kt,level:Pe,isStart:Tt,isEnd:Ln}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),dt}(wt.Component),je=function(Je){return wt.createElement(Ie.k.Consumer,null,function(dt){return wt.createElement(Fe,(0,ue.Z)({},Je,{context:dt}))})};je.displayName="TreeNode",je.isTreeNode=1;var ze=je},39378:function(zn,En,me){"use strict";me.d(En,{k:function(){return Re}});var ue=me(59301),Re=ue.createContext(null)},99581:function(zn,En,me){"use strict";me.d(En,{O:function(){return ze.Z},Z:function(){return Xt}});var ue=me(5891),Re=me(80962),Ze=me(80665),ot=me(57259),We=me(26390),lt=me(79545),Me=me(68550),Mt=me(21882),Ct=me(17928),Ye=me(7711),st=me(92310),pt=me.n(st),wt=me(85108),Ie=me(36994),te=me(51395),ee=me(59301),de=me(39378);function se(Kt){var Ot=Kt.dropPosition,rt=Kt.dropLevelOffset,Ue=Kt.indent,$t={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ot){case-1:$t.top=0,$t.left=-rt*Ue;break;case 1:$t.bottom=0,$t.left=-rt*Ue;break;case 0:$t.bottom=0,$t.left=Ue;break}return ee.createElement("div",{style:$t})}function he(Kt){if(Kt==null)throw new TypeError("Cannot destructure "+Kt)}var ve=me(29043),be=me(19149),Ne=me(28800),Fe=me(70318),je=me(43469),ze=me(39417);function Xe(Kt,Ot){var rt=ee.useState(!1),Ue=(0,ve.Z)(rt,2),$t=Ue[0],Gt=Ue[1];ee.useLayoutEffect(function(){if($t)return Kt(),function(){Ot()}},[$t]),ee.useLayoutEffect(function(){return Gt(!0),function(){Gt(!1)}},[])}var Je=me(71430),dt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],He=function(Ot,rt){var Ue=Ot.className,$t=Ot.style,Gt=Ot.motion,it=Ot.motionNodes,at=Ot.motionType,Te=Ot.onMotionStart,Pe=Ot.onMotionEnd,ye=Ot.active,ke=Ot.treeNodeRequiredProps,$e=(0,be.Z)(Ot,dt),Le=ee.useState(!0),vt=(0,ve.Z)(Le,2),an=vt[0],bn=vt[1],en=ee.useContext(de.k),wn=en.prefixCls,ai=it&&at!=="hide";(0,Ne.Z)(function(){it&&ai!==an&&bn(ai)},[it]);var _n=function(){it&&Te()},Hn=ee.useRef(!1),wi=function(){it&&!Hn.current&&(Hn.current=!0,Pe())};Xe(_n,wi);var Hi=function(cr){ai===cr&&wi()};return it?ee.createElement(je.default,(0,ue.Z)({ref:rt,visible:an},Gt,{motionAppear:at==="show",onVisibleChanged:Hi}),function(_i,cr){var _r=_i.className,vi=_i.style;return ee.createElement("div",{ref:cr,className:pt()("".concat(wn,"-treenode-motion"),_r),style:vi},it.map(function(si){var fi=(0,ue.Z)({},(he(si.data),si.data)),Ui=si.title,Fi=si.key,ao=si.isStart,wr=si.isEnd;delete fi.children;var Be=(0,Je.H8)(Fi,ke);return ee.createElement(ze.Z,(0,ue.Z)({},fi,Be,{title:Ui,active:ye,data:si.data,key:Fi,isStart:ao,isEnd:wr}))}))}):ee.createElement(ze.Z,(0,ue.Z)({domRef:rt,className:Ue,style:$t},$e,{active:ye}))};He.displayName="MotionTreeNode";var bt=ee.forwardRef(He),et=bt;function It(){var Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],rt=Kt.length,Ue=Ot.length;if(Math.abs(rt-Ue)!==1)return{add:!1,key:null};function $t(Gt,it){var at=new Map;Gt.forEach(function(Pe){at.set(Pe,!0)});var Te=it.filter(function(Pe){return!at.has(Pe)});return Te.length===1?Te[0]:null}return rt<Ue?{add:!0,key:$t(Kt,Ot)}:{add:!1,key:$t(Ot,Kt)}}function xt(Kt,Ot,rt){var Ue=Kt.findIndex(function(at){return at.key===rt}),$t=Kt[Ue+1],Gt=Ot.findIndex(function(at){return at.key===rt});if($t){var it=Ot.findIndex(function(at){return at.key===$t.key});return Ot.slice(Gt+1,it)}return Ot.slice(Gt+1)}var Bt=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],Ut={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Nt=function(){},qe="RC_TREE_MOTION_".concat(Math.random()),Ke={key:qe},Tt={key:qe,level:0,index:0,pos:"0",node:Ke,nodes:[Ke]},Ln={parent:null,children:[],pos:Tt.pos,data:Ke,title:null,key:qe,isStart:[],isEnd:[]};function Mn(Kt,Ot,rt,Ue){return Ot===!1||!rt?Kt:Kt.slice(0,Math.ceil(rt/Ue)+1)}function zt(Kt){var Ot=Kt.key,rt=Kt.pos;return(0,Je.km)(Ot,rt)}function rn(Kt){for(var Ot=String(Kt.data.key),rt=Kt;rt.parent;)rt=rt.parent,Ot="".concat(rt.data.key," > ").concat(Ot);return Ot}var xn=ee.forwardRef(function(Kt,Ot){var rt=Kt.prefixCls,Ue=Kt.data,$t=Kt.selectable,Gt=Kt.checkable,it=Kt.expandedKeys,at=Kt.selectedKeys,Te=Kt.checkedKeys,Pe=Kt.loadedKeys,ye=Kt.loadingKeys,ke=Kt.halfCheckedKeys,$e=Kt.keyEntities,Le=Kt.disabled,vt=Kt.dragging,an=Kt.dragOverNodeKey,bn=Kt.dropPosition,en=Kt.motion,wn=Kt.height,ai=Kt.itemHeight,_n=Kt.virtual,Hn=Kt.focusable,wi=Kt.activeItem,Hi=Kt.focused,_i=Kt.tabIndex,cr=Kt.onKeyDown,_r=Kt.onFocus,vi=Kt.onBlur,si=Kt.onActiveChange,fi=Kt.onListChangeStart,Ui=Kt.onListChangeEnd,Fi=(0,be.Z)(Kt,Bt),ao=ee.useRef(null),wr=ee.useRef(null);ee.useImperativeHandle(Ot,function(){return{scrollTo:function(hn){ao.current.scrollTo(hn)},getIndentWidth:function(){return wr.current.offsetWidth}}});var Be=ee.useState(it),Xr=(0,ve.Z)(Be,2),Hr=Xr[0],jn=Xr[1],Li=ee.useState(Ue),Wi=(0,ve.Z)(Li,2),ji=Wi[0],Gn=Wi[1],Ht=ee.useState(Ue),Wt=(0,ve.Z)(Ht,2),Zt=Wt[0],yt=Wt[1],un=ee.useState([]),vn=(0,ve.Z)(un,2),At=vn[0],nt=vn[1],on=ee.useState(null),fn=(0,ve.Z)(on,2),Jn=fn[0],pn=fn[1],Rt=ee.useRef(Ue);Rt.current=Ue;function In(){var tn=Rt.current;Gn(tn),yt(tn),nt([]),pn(null),Ui()}(0,Ne.Z)(function(){jn(it);var tn=It(Hr,it);if(tn.key!==null)if(tn.add){var hn=ji.findIndex(function(Zi){var sr=Zi.key;return sr===tn.key}),Rn=Mn(xt(ji,Ue,tn.key),_n,wn,ai),Oi=ji.slice();Oi.splice(hn+1,0,Ln),yt(Oi),nt(Rn),pn("show")}else{var Ii=Ue.findIndex(function(Zi){var sr=Zi.key;return sr===tn.key}),Si=Mn(xt(Ue,ji,tn.key),_n,wn,ai),Ni=Ue.slice();Ni.splice(Ii+1,0,Ln),yt(Ni),nt(Si),pn("hide")}else ji!==Ue&&(Gn(Ue),yt(Ue))},[it,Ue]),ee.useEffect(function(){vt||In()},[vt]);var Vn=en?Zt:Ue,Pi={expandedKeys:it,selectedKeys:at,loadedKeys:Pe,loadingKeys:ye,checkedKeys:Te,halfCheckedKeys:ke,dragOverNodeKey:an,dropPosition:bn,keyEntities:$e};return ee.createElement(ee.Fragment,null,Hi&&wi&&ee.createElement("span",{style:Ut,"aria-live":"assertive"},rn(wi)),ee.createElement("div",null,ee.createElement("input",{style:Ut,disabled:Hn===!1||Le,tabIndex:Hn!==!1?_i:null,onKeyDown:cr,onFocus:_r,onBlur:vi,value:"",onChange:Nt,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(rt,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(rt,"-indent")},ee.createElement("div",{ref:wr,className:"".concat(rt,"-indent-unit")}))),ee.createElement(Fe.Z,(0,ue.Z)({},Fi,{data:Vn,itemKey:zt,height:wn,fullHeight:!1,virtual:_n,itemHeight:ai,prefixCls:"".concat(rt,"-list"),ref:ao,onVisibleChange:function(hn,Rn){var Oi=new Set(hn),Ii=Rn.filter(function(Si){return!Oi.has(Si)});Ii.some(function(Si){return zt(Si)===qe})&&In()}}),function(tn){var hn=tn.pos,Rn=(0,ue.Z)({},(he(tn.data),tn.data)),Oi=tn.title,Ii=tn.key,Si=tn.isStart,Ni=tn.isEnd,Zi=(0,Je.km)(Ii,hn);delete Rn.key,delete Rn.children;var sr=(0,Je.H8)(Zi,Pi);return ee.createElement(et,(0,ue.Z)({},Rn,sr,{title:Oi,active:!!wi&&Ii===wi.key,pos:hn,data:tn.data,isStart:Si,isEnd:Ni,motion:en,motionNodes:Ii===qe?At:null,motionType:Jn,onMotionStart:fi,onMotionEnd:In,treeNodeRequiredProps:Pi,onMouseMove:function(){si(null)}}))}))});xn.displayName="NodeList";var Un=xn,yn=me(35654),sn=me(90782),Lt=me(67841),ti=10,gi=function(Kt){(0,Ct.Z)(rt,Kt);var Ot=(0,Ye.Z)(rt);function rt(){var Ue;(0,lt.Z)(this,rt);for(var $t=arguments.length,Gt=new Array($t),it=0;it<$t;it++)Gt[it]=arguments[it];return Ue=Ot.call.apply(Ot,[this].concat(Gt)),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,Je.w$)()},Ue.dragStartMousePosition=null,Ue.dragNode=void 0,Ue.currentMouseOverDroppableNodeKey=null,Ue.listRef=ee.createRef(),Ue.onNodeDragStart=function(at,Te){var Pe=Ue.state,ye=Pe.expandedKeys,ke=Pe.keyEntities,$e=Ue.props.onDragStart,Le=Te.props.eventKey;Ue.dragNode=Te,Ue.dragStartMousePosition={x:at.clientX,y:at.clientY};var vt=(0,yn._5)(ye,Le);Ue.setState({draggingNodeKey:Le,dragChildrenKeys:(0,yn.wA)(Le,ke),indent:Ue.listRef.current.getIndentWidth()}),Ue.setExpandedKeys(vt),window.addEventListener("dragend",Ue.onWindowDragEnd),$e==null||$e({event:at,node:(0,Je.F)(Te.props)})},Ue.onNodeDragEnter=function(at,Te){var Pe=Ue.state,ye=Pe.expandedKeys,ke=Pe.keyEntities,$e=Pe.dragChildrenKeys,Le=Pe.flattenNodes,vt=Pe.indent,an=Ue.props,bn=an.onDragEnter,en=an.onExpand,wn=an.allowDrop,ai=an.direction,_n=Te.props,Hn=_n.pos,wi=_n.eventKey,Hi=(0,Mt.Z)(Ue),_i=Hi.dragNode;if(Ue.currentMouseOverDroppableNodeKey!==wi&&(Ue.currentMouseOverDroppableNodeKey=wi),!_i){Ue.resetDragState();return}var cr=(0,yn.OM)(at,_i,Te,vt,Ue.dragStartMousePosition,wn,Le,ke,ye,ai),_r=cr.dropPosition,vi=cr.dropLevelOffset,si=cr.dropTargetKey,fi=cr.dropContainerKey,Ui=cr.dropTargetPos,Fi=cr.dropAllowed,ao=cr.dragOverNodeKey;if($e.indexOf(si)!==-1||!Fi){Ue.resetDragState();return}if(Ue.delayedDragEnterLogic||(Ue.delayedDragEnterLogic={}),Object.keys(Ue.delayedDragEnterLogic).forEach(function(wr){clearTimeout(Ue.delayedDragEnterLogic[wr])}),_i.props.eventKey!==Te.props.eventKey&&(at.persist(),Ue.delayedDragEnterLogic[Hn]=window.setTimeout(function(){if(Ue.state.draggingNodeKey!==null){var wr=(0,We.Z)(ye),Be=(0,Lt.Z)(ke,Te.props.eventKey);Be&&(Be.children||[]).length&&(wr=(0,yn.L0)(ye,Te.props.eventKey)),"expandedKeys"in Ue.props||Ue.setExpandedKeys(wr),en==null||en(wr,{node:(0,Je.F)(Te.props),expanded:!0,nativeEvent:at.nativeEvent})}},800)),_i.props.eventKey===si&&vi===0){Ue.resetDragState();return}Ue.setState({dragOverNodeKey:ao,dropPosition:_r,dropLevelOffset:vi,dropTargetKey:si,dropContainerKey:fi,dropTargetPos:Ui,dropAllowed:Fi}),bn==null||bn({event:at,node:(0,Je.F)(Te.props),expandedKeys:ye})},Ue.onNodeDragOver=function(at,Te){var Pe=Ue.state,ye=Pe.dragChildrenKeys,ke=Pe.flattenNodes,$e=Pe.keyEntities,Le=Pe.expandedKeys,vt=Pe.indent,an=Ue.props,bn=an.onDragOver,en=an.allowDrop,wn=an.direction,ai=(0,Mt.Z)(Ue),_n=ai.dragNode;if(_n){var Hn=(0,yn.OM)(at,_n,Te,vt,Ue.dragStartMousePosition,en,ke,$e,Le,wn),wi=Hn.dropPosition,Hi=Hn.dropLevelOffset,_i=Hn.dropTargetKey,cr=Hn.dropContainerKey,_r=Hn.dropAllowed,vi=Hn.dropTargetPos,si=Hn.dragOverNodeKey;ye.indexOf(_i)!==-1||!_r||(_n.props.eventKey===_i&&Hi===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():wi===Ue.state.dropPosition&&Hi===Ue.state.dropLevelOffset&&_i===Ue.state.dropTargetKey&&cr===Ue.state.dropContainerKey&&vi===Ue.state.dropTargetPos&&_r===Ue.state.dropAllowed&&si===Ue.state.dragOverNodeKey||Ue.setState({dropPosition:wi,dropLevelOffset:Hi,dropTargetKey:_i,dropContainerKey:cr,dropTargetPos:vi,dropAllowed:_r,dragOverNodeKey:si}),bn==null||bn({event:at,node:(0,Je.F)(Te.props)}))}},Ue.onNodeDragLeave=function(at,Te){Ue.currentMouseOverDroppableNodeKey===Te.props.eventKey&&!at.currentTarget.contains(at.relatedTarget)&&(Ue.resetDragState(),Ue.currentMouseOverDroppableNodeKey=null);var Pe=Ue.props.onDragLeave;Pe==null||Pe({event:at,node:(0,Je.F)(Te.props)})},Ue.onWindowDragEnd=function(at){Ue.onNodeDragEnd(at,null,!0),window.removeEventListener("dragend",Ue.onWindowDragEnd)},Ue.onNodeDragEnd=function(at,Te){var Pe=Ue.props.onDragEnd;Ue.setState({dragOverNodeKey:null}),Ue.cleanDragState(),Pe==null||Pe({event:at,node:(0,Je.F)(Te.props)}),Ue.dragNode=null,window.removeEventListener("dragend",Ue.onWindowDragEnd)},Ue.onNodeDrop=function(at,Te){var Pe,ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ke=Ue.state,$e=ke.dragChildrenKeys,Le=ke.dropPosition,vt=ke.dropTargetKey,an=ke.dropTargetPos,bn=ke.dropAllowed;if(bn){var en=Ue.props.onDrop;if(Ue.setState({dragOverNodeKey:null}),Ue.cleanDragState(),vt!==null){var wn=(0,ot.Z)((0,ot.Z)({},(0,Je.H8)(vt,Ue.getTreeNodeRequiredProps())),{},{active:((Pe=Ue.getActiveItem())===null||Pe===void 0?void 0:Pe.key)===vt,data:(0,Lt.Z)(Ue.state.keyEntities,vt).node}),ai=$e.indexOf(vt)!==-1;(0,te.ZP)(!ai,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var _n=(0,yn.yx)(an),Hn={event:at,node:(0,Je.F)(wn),dragNode:Ue.dragNode?(0,Je.F)(Ue.dragNode.props):null,dragNodesKeys:[Ue.dragNode.props.eventKey].concat($e),dropToGap:Le!==0,dropPosition:Le+Number(_n[_n.length-1])};ye||en==null||en(Hn),Ue.dragNode=null}}},Ue.cleanDragState=function(){var at=Ue.state.draggingNodeKey;at!==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(at,Te){var Pe=Ue.state,ye=Pe.expandedKeys,ke=Pe.flattenNodes,$e=Te.expanded,Le=Te.key,vt=Te.isLeaf;if(!(vt||at.shiftKey||at.metaKey||at.ctrlKey)){var an=ke.filter(function(en){return en.key===Le})[0],bn=(0,Je.F)((0,ot.Z)((0,ot.Z)({},(0,Je.H8)(Le,Ue.getTreeNodeRequiredProps())),{},{data:an.data}));Ue.setExpandedKeys($e?(0,yn._5)(ye,Le):(0,yn.L0)(ye,Le)),Ue.onNodeExpand(at,bn)}},Ue.onNodeClick=function(at,Te){var Pe=Ue.props,ye=Pe.onClick,ke=Pe.expandAction;ke==="click"&&Ue.triggerExpandActionExpand(at,Te),ye==null||ye(at,Te)},Ue.onNodeDoubleClick=function(at,Te){var Pe=Ue.props,ye=Pe.onDoubleClick,ke=Pe.expandAction;ke==="doubleClick"&&Ue.triggerExpandActionExpand(at,Te),ye==null||ye(at,Te)},Ue.onNodeSelect=function(at,Te){var Pe=Ue.state.selectedKeys,ye=Ue.state,ke=ye.keyEntities,$e=ye.fieldNames,Le=Ue.props,vt=Le.onSelect,an=Le.multiple,bn=Te.selected,en=Te[$e.key],wn=!bn;wn?an?Pe=(0,yn.L0)(Pe,en):Pe=[en]:Pe=(0,yn._5)(Pe,en);var ai=Pe.map(function(_n){var Hn=(0,Lt.Z)(ke,_n);return Hn?Hn.node:null}).filter(function(_n){return _n});Ue.setUncontrolledState({selectedKeys:Pe}),vt==null||vt(Pe,{event:"select",selected:wn,node:Te,selectedNodes:ai,nativeEvent:at.nativeEvent})},Ue.onNodeCheck=function(at,Te,Pe){var ye=Ue.state,ke=ye.keyEntities,$e=ye.checkedKeys,Le=ye.halfCheckedKeys,vt=Ue.props,an=vt.checkStrictly,bn=vt.onCheck,en=Te.key,wn,ai={event:"check",node:Te,checked:Pe,nativeEvent:at.nativeEvent};if(an){var _n=Pe?(0,yn.L0)($e,en):(0,yn._5)($e,en),Hn=(0,yn._5)(Le,en);wn={checked:_n,halfChecked:Hn},ai.checkedNodes=_n.map(function(vi){return(0,Lt.Z)(ke,vi)}).filter(function(vi){return vi}).map(function(vi){return vi.node}),Ue.setUncontrolledState({checkedKeys:_n})}else{var wi=(0,sn.S)([].concat((0,We.Z)($e),[en]),!0,ke),Hi=wi.checkedKeys,_i=wi.halfCheckedKeys;if(!Pe){var cr=new Set(Hi);cr.delete(en);var _r=(0,sn.S)(Array.from(cr),{checked:!1,halfCheckedKeys:_i},ke);Hi=_r.checkedKeys,_i=_r.halfCheckedKeys}wn=Hi,ai.checkedNodes=[],ai.checkedNodesPositions=[],ai.halfCheckedKeys=_i,Hi.forEach(function(vi){var si=(0,Lt.Z)(ke,vi);if(si){var fi=si.node,Ui=si.pos;ai.checkedNodes.push(fi),ai.checkedNodesPositions.push({node:fi,pos:Ui})}}),Ue.setUncontrolledState({checkedKeys:Hi},!1,{halfCheckedKeys:_i})}bn==null||bn(wn,ai)},Ue.onNodeLoad=function(at){var Te=at.key,Pe=new Promise(function(ye,ke){Ue.setState(function($e){var Le=$e.loadedKeys,vt=Le===void 0?[]:Le,an=$e.loadingKeys,bn=an===void 0?[]:an,en=Ue.props,wn=en.loadData,ai=en.onLoad;if(!wn||vt.indexOf(Te)!==-1||bn.indexOf(Te)!==-1)return null;var _n=wn(at);return _n.then(function(){var Hn=Ue.state.loadedKeys,wi=(0,yn.L0)(Hn,Te);ai==null||ai(wi,{event:"load",node:at}),Ue.setUncontrolledState({loadedKeys:wi}),Ue.setState(function(Hi){return{loadingKeys:(0,yn._5)(Hi.loadingKeys,Te)}}),ye()}).catch(function(Hn){if(Ue.setState(function(Hi){return{loadingKeys:(0,yn._5)(Hi.loadingKeys,Te)}}),Ue.loadingRetryTimes[Te]=(Ue.loadingRetryTimes[Te]||0)+1,Ue.loadingRetryTimes[Te]>=ti){var wi=Ue.state.loadedKeys;(0,te.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Ue.setUncontrolledState({loadedKeys:(0,yn.L0)(wi,Te)}),ye()}ke(Hn)}),{loadingKeys:(0,yn.L0)(bn,Te)}})});return Pe.catch(function(){}),Pe},Ue.onNodeMouseEnter=function(at,Te){var Pe=Ue.props.onMouseEnter;Pe==null||Pe({event:at,node:Te})},Ue.onNodeMouseLeave=function(at,Te){var Pe=Ue.props.onMouseLeave;Pe==null||Pe({event:at,node:Te})},Ue.onNodeContextMenu=function(at,Te){var Pe=Ue.props.onRightClick;Pe&&(at.preventDefault(),Pe({event:at,node:Te}))},Ue.onFocus=function(){var at=Ue.props.onFocus;Ue.setState({focused:!0});for(var Te=arguments.length,Pe=new Array(Te),ye=0;ye<Te;ye++)Pe[ye]=arguments[ye];at==null||at.apply(void 0,Pe)},Ue.onBlur=function(){var at=Ue.props.onBlur;Ue.setState({focused:!1}),Ue.onActiveChange(null);for(var Te=arguments.length,Pe=new Array(Te),ye=0;ye<Te;ye++)Pe[ye]=arguments[ye];at==null||at.apply(void 0,Pe)},Ue.getTreeNodeRequiredProps=function(){var at=Ue.state,Te=at.expandedKeys,Pe=at.selectedKeys,ye=at.loadedKeys,ke=at.loadingKeys,$e=at.checkedKeys,Le=at.halfCheckedKeys,vt=at.dragOverNodeKey,an=at.dropPosition,bn=at.keyEntities;return{expandedKeys:Te||[],selectedKeys:Pe||[],loadedKeys:ye||[],loadingKeys:ke||[],checkedKeys:$e||[],halfCheckedKeys:Le||[],dragOverNodeKey:vt,dropPosition:an,keyEntities:bn}},Ue.setExpandedKeys=function(at){var Te=Ue.state,Pe=Te.treeData,ye=Te.fieldNames,ke=(0,Je.oH)(Pe,at,ye);Ue.setUncontrolledState({expandedKeys:at,flattenNodes:ke},!0)},Ue.onNodeExpand=function(at,Te){var Pe=Ue.state.expandedKeys,ye=Ue.state,ke=ye.listChanging,$e=ye.fieldNames,Le=Ue.props,vt=Le.onExpand,an=Le.loadData,bn=Te.expanded,en=Te[$e.key];if(!ke){var wn=Pe.indexOf(en),ai=!bn;if((0,te.ZP)(bn&&wn!==-1||!bn&&wn===-1,"Expand state not sync with index check"),ai?Pe=(0,yn.L0)(Pe,en):Pe=(0,yn._5)(Pe,en),Ue.setExpandedKeys(Pe),vt==null||vt(Pe,{node:Te,expanded:ai,nativeEvent:at.nativeEvent}),ai&&an){var _n=Ue.onNodeLoad(Te);_n&&_n.then(function(){var Hn=(0,Je.oH)(Ue.state.treeData,Pe,$e);Ue.setUncontrolledState({flattenNodes:Hn})}).catch(function(){var Hn=Ue.state.expandedKeys,wi=(0,yn._5)(Hn,en);Ue.setExpandedKeys(wi)})}}},Ue.onListChangeStart=function(){Ue.setUncontrolledState({listChanging:!0})},Ue.onListChangeEnd=function(){setTimeout(function(){Ue.setUncontrolledState({listChanging:!1})})},Ue.onActiveChange=function(at){var Te=Ue.state.activeKey,Pe=Ue.props.onActiveChange;Te!==at&&(Ue.setState({activeKey:at}),at!==null&&Ue.scrollTo({key:at}),Pe==null||Pe(at))},Ue.getActiveItem=function(){var at=Ue.state,Te=at.activeKey,Pe=at.flattenNodes;return Te===null?null:Pe.find(function(ye){var ke=ye.key;return ke===Te})||null},Ue.offsetActiveKey=function(at){var Te=Ue.state,Pe=Te.flattenNodes,ye=Te.activeKey,ke=Pe.findIndex(function(vt){var an=vt.key;return an===ye});ke===-1&&at<0&&(ke=Pe.length),ke=(ke+at+Pe.length)%Pe.length;var $e=Pe[ke];if($e){var Le=$e.key;Ue.onActiveChange(Le)}else Ue.onActiveChange(null)},Ue.onKeyDown=function(at){var Te=Ue.state,Pe=Te.activeKey,ye=Te.expandedKeys,ke=Te.checkedKeys,$e=Te.fieldNames,Le=Ue.props,vt=Le.onKeyDown,an=Le.checkable,bn=Le.selectable;switch(at.which){case wt.Z.UP:{Ue.offsetActiveKey(-1),at.preventDefault();break}case wt.Z.DOWN:{Ue.offsetActiveKey(1),at.preventDefault();break}}var en=Ue.getActiveItem();if(en&&en.data){var wn=Ue.getTreeNodeRequiredProps(),ai=en.data.isLeaf===!1||!!(en.data[$e.children]||[]).length,_n=(0,Je.F)((0,ot.Z)((0,ot.Z)({},(0,Je.H8)(Pe,wn)),{},{data:en.data,active:!0}));switch(at.which){case wt.Z.LEFT:{ai&&ye.includes(Pe)?Ue.onNodeExpand({},_n):en.parent&&Ue.onActiveChange(en.parent.key),at.preventDefault();break}case wt.Z.RIGHT:{ai&&!ye.includes(Pe)?Ue.onNodeExpand({},_n):en.children&&en.children.length&&Ue.onActiveChange(en.children[0].key),at.preventDefault();break}case wt.Z.ENTER:case wt.Z.SPACE:{an&&!_n.disabled&&_n.checkable!==!1&&!_n.disableCheckbox?Ue.onNodeCheck({},_n,!ke.includes(Pe)):!an&&bn&&!_n.disabled&&_n.selectable!==!1&&Ue.onNodeSelect({},_n);break}}}vt==null||vt(at)},Ue.setUncontrolledState=function(at){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Ue.destroyed){var ye=!1,ke=!0,$e={};Object.keys(at).forEach(function(Le){if(Le in Ue.props){ke=!1;return}ye=!0,$e[Le]=at[Le]}),ye&&(!Te||ke)&&Ue.setState((0,ot.Z)((0,ot.Z)({},$e),Pe))}},Ue.scrollTo=function(at){Ue.listRef.current.scrollTo(at)},Ue}return(0,Me.Z)(rt,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var $t=this.props.activeKey;$t!==void 0&&$t!==this.state.activeKey&&(this.setState({activeKey:$t}),$t!==null&&this.scrollTo({key:$t}))}},{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 $t,Gt=this.state,it=Gt.focused,at=Gt.flattenNodes,Te=Gt.keyEntities,Pe=Gt.draggingNodeKey,ye=Gt.activeKey,ke=Gt.dropLevelOffset,$e=Gt.dropContainerKey,Le=Gt.dropTargetKey,vt=Gt.dropPosition,an=Gt.dragOverNodeKey,bn=Gt.indent,en=this.props,wn=en.prefixCls,ai=en.className,_n=en.style,Hn=en.showLine,wi=en.focusable,Hi=en.tabIndex,_i=Hi===void 0?0:Hi,cr=en.selectable,_r=en.showIcon,vi=en.icon,si=en.switcherIcon,fi=en.draggable,Ui=en.checkable,Fi=en.checkStrictly,ao=en.disabled,wr=en.motion,Be=en.loadData,Xr=en.filterTreeNode,Hr=en.height,jn=en.itemHeight,Li=en.virtual,Wi=en.titleRender,ji=en.dropIndicatorRender,Gn=en.onContextMenu,Ht=en.onScroll,Wt=en.direction,Zt=en.rootClassName,yt=en.rootStyle,un=(0,Ie.Z)(this.props,{aria:!0,data:!0}),vn;return fi&&((0,Ze.Z)(fi)==="object"?vn=fi:typeof fi=="function"?vn={nodeDraggable:fi}:vn={}),ee.createElement(de.k.Provider,{value:{prefixCls:wn,selectable:cr,showIcon:_r,icon:vi,switcherIcon:si,draggable:vn,draggingNodeKey:Pe,checkable:Ui,checkStrictly:Fi,disabled:ao,keyEntities:Te,dropLevelOffset:ke,dropContainerKey:$e,dropTargetKey:Le,dropPosition:vt,dragOverNodeKey:an,indent:bn,direction:Wt,dropIndicatorRender:ji,loadData:Be,filterTreeNode:Xr,titleRender:Wi,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:pt()(wn,ai,Zt,($t={},(0,Re.Z)($t,"".concat(wn,"-show-line"),Hn),(0,Re.Z)($t,"".concat(wn,"-focused"),it),(0,Re.Z)($t,"".concat(wn,"-active-focused"),ye!==null),$t)),style:yt},ee.createElement(Un,(0,ue.Z)({ref:this.listRef,prefixCls:wn,style:_n,data:at,disabled:ao,selectable:cr,checkable:!!Ui,motion:wr,dragging:Pe!==null,height:Hr,itemHeight:jn,virtual:Li,focusable:wi,focused:it,tabIndex:_i,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Gn,onScroll:Ht},this.getTreeNodeRequiredProps(),un))))}}],[{key:"getDerivedStateFromProps",value:function($t,Gt){var it=Gt.prevProps,at={prevProps:$t};function Te(wi){return!it&&wi in $t||it&&it[wi]!==$t[wi]}var Pe,ye=Gt.fieldNames;if(Te("fieldNames")&&(ye=(0,Je.w$)($t.fieldNames),at.fieldNames=ye),Te("treeData")?Pe=$t.treeData:Te("children")&&((0,te.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Pe=(0,Je.zn)($t.children)),Pe){at.treeData=Pe;var ke=(0,Je.I8)(Pe,{fieldNames:ye});at.keyEntities=(0,ot.Z)((0,Re.Z)({},qe,Tt),ke.keyEntities)}var $e=at.keyEntities||Gt.keyEntities;if(Te("expandedKeys")||it&&Te("autoExpandParent"))at.expandedKeys=$t.autoExpandParent||!it&&$t.defaultExpandParent?(0,yn.r7)($t.expandedKeys,$e):$t.expandedKeys;else if(!it&&$t.defaultExpandAll){var Le=(0,ot.Z)({},$e);delete Le[qe],at.expandedKeys=Object.keys(Le).map(function(wi){return Le[wi].key})}else!it&&$t.defaultExpandedKeys&&(at.expandedKeys=$t.autoExpandParent||$t.defaultExpandParent?(0,yn.r7)($t.defaultExpandedKeys,$e):$t.defaultExpandedKeys);if(at.expandedKeys||delete at.expandedKeys,Pe||at.expandedKeys){var vt=(0,Je.oH)(Pe||Gt.treeData,at.expandedKeys||Gt.expandedKeys,ye);at.flattenNodes=vt}if($t.selectable&&(Te("selectedKeys")?at.selectedKeys=(0,yn.BT)($t.selectedKeys,$t):!it&&$t.defaultSelectedKeys&&(at.selectedKeys=(0,yn.BT)($t.defaultSelectedKeys,$t))),$t.checkable){var an;if(Te("checkedKeys")?an=(0,yn.E6)($t.checkedKeys)||{}:!it&&$t.defaultCheckedKeys?an=(0,yn.E6)($t.defaultCheckedKeys)||{}:Pe&&(an=(0,yn.E6)($t.checkedKeys)||{checkedKeys:Gt.checkedKeys,halfCheckedKeys:Gt.halfCheckedKeys}),an){var bn=an,en=bn.checkedKeys,wn=en===void 0?[]:en,ai=bn.halfCheckedKeys,_n=ai===void 0?[]:ai;if(!$t.checkStrictly){var Hn=(0,sn.S)(wn,!0,$e);wn=Hn.checkedKeys,_n=Hn.halfCheckedKeys}at.checkedKeys=wn,at.halfCheckedKeys=_n}}return Te("loadedKeys")&&(at.loadedKeys=$t.loadedKeys),at}}]),rt}(ee.Component);gi.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:se,allowDrop:function(){return!0},expandAction:!1},gi.TreeNode=ze.Z;var Pn=gi,Xt=Pn},35654:function(zn,En,me){"use strict";me.d(En,{BT:function(){return ee},E6:function(){return he},L0:function(){return Ye},OM:function(){return te},_5:function(){return Ct},r7:function(){return ve},wA:function(){return pt},yx:function(){return st}});var ue=me(26390),Re=me(80665),Ze=me(51395),ot=me(59301),We=me(39417),lt=me(67841),Me=me(71430),Mt=null;function Ct(be,Ne){if(!be)return[];var Fe=be.slice(),je=Fe.indexOf(Ne);return je>=0&&Fe.splice(je,1),Fe}function Ye(be,Ne){var Fe=(be||[]).slice();return Fe.indexOf(Ne)===-1&&Fe.push(Ne),Fe}function st(be){return be.split("-")}function pt(be,Ne){var Fe=[],je=(0,lt.Z)(Ne,be);function ze(){var Xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Xe.forEach(function(Je){var dt=Je.key,He=Je.children;Fe.push(dt),ze(He)})}return ze(je.children),Fe}function wt(be){if(be.parent){var Ne=st(be.pos);return Number(Ne[Ne.length-1])===be.parent.children.length-1}return!1}function Ie(be){var Ne=st(be.pos);return Number(Ne[Ne.length-1])===0}function te(be,Ne,Fe,je,ze,Xe,Je,dt,He,bt){var et,It=be.clientX,xt=be.clientY,Bt=be.target.getBoundingClientRect(),Ut=Bt.top,Nt=Bt.height,qe=(bt==="rtl"?-1:1)*(((ze==null?void 0:ze.x)||0)-It),Ke=(qe-12)/je,Tt=(0,lt.Z)(dt,Fe.props.eventKey);if(xt<Ut+Nt/2){var Ln=Je.findIndex(function(Xt){return Xt.key===Tt.key}),Mn=Ln<=0?0:Ln-1,zt=Je[Mn].key;Tt=(0,lt.Z)(dt,zt)}var rn=Tt.key,xn=Tt,Un=Tt.key,yn=0,sn=0;if(!He.includes(rn))for(var Lt=0;Lt<Ke&&wt(Tt);Lt+=1)Tt=Tt.parent,sn+=1;var ti=Ne.props.data,gi=Tt.node,Pn=!0;return Ie(Tt)&&Tt.level===0&&xt<Ut+Nt/2&&Xe({dragNode:ti,dropNode:gi,dropPosition:-1})&&Tt.key===Fe.props.eventKey?yn=-1:(xn.children||[]).length&&He.includes(Un)?Xe({dragNode:ti,dropNode:gi,dropPosition:0})?yn=0:Pn=!1:sn===0?Ke>-1.5?Xe({dragNode:ti,dropNode:gi,dropPosition:1})?yn=1:Pn=!1:Xe({dragNode:ti,dropNode:gi,dropPosition:0})?yn=0:Xe({dragNode:ti,dropNode:gi,dropPosition:1})?yn=1:Pn=!1:Xe({dragNode:ti,dropNode:gi,dropPosition:1})?yn=1:Pn=!1,{dropPosition:yn,dropLevelOffset:sn,dropTargetKey:Tt.key,dropTargetPos:Tt.pos,dragOverNodeKey:Un,dropContainerKey:yn===0?null:((et=Tt.parent)===null||et===void 0?void 0:et.key)||null,dropAllowed:Pn}}function ee(be,Ne){if(be){var Fe=Ne.multiple;return Fe?be.slice():be.length?[be[0]]:be}}var de=function(Ne){return Ne};function se(be,Ne){if(!be)return[];var Fe=Ne||{},je=Fe.processProps,ze=je===void 0?de:je,Xe=Array.isArray(be)?be:[be];return Xe.map(function(Je){var dt=Je.children,He=_objectWithoutProperties(Je,Mt),bt=se(dt,Ne);return React.createElement(TreeNode,_extends({key:He.key},ze(He)),bt)})}function he(be){if(!be)return null;var Ne;if(Array.isArray(be))Ne={checkedKeys:be,halfCheckedKeys:void 0};else if((0,Re.Z)(be)==="object")Ne={checkedKeys:be.checked||void 0,halfCheckedKeys:be.halfChecked||void 0};else return(0,Ze.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Ne}function ve(be,Ne){var Fe=new Set;function je(ze){if(!Fe.has(ze)){var Xe=(0,lt.Z)(Ne,ze);if(Xe){Fe.add(ze);var Je=Xe.parent,dt=Xe.node;dt.disabled||Je&&je(Je.key)}}}return(be||[]).forEach(function(ze){je(ze)}),(0,ue.Z)(Fe)}},90782:function(zn,En,me){"use strict";me.d(En,{S:function(){return Me}});var ue=me(51395),Re=me(67841);function Ze(Mt,Ct){var Ye=new Set;return Mt.forEach(function(st){Ct.has(st)||Ye.add(st)}),Ye}function ot(Mt){var Ct=Mt||{},Ye=Ct.disabled,st=Ct.disableCheckbox,pt=Ct.checkable;return!!(Ye||st)||pt===!1}function We(Mt,Ct,Ye,st){for(var pt=new Set(Mt),wt=new Set,Ie=0;Ie<=Ye;Ie+=1){var te=Ct.get(Ie)||new Set;te.forEach(function(he){var ve=he.key,be=he.node,Ne=he.children,Fe=Ne===void 0?[]:Ne;pt.has(ve)&&!st(be)&&Fe.filter(function(je){return!st(je.node)}).forEach(function(je){pt.add(je.key)})})}for(var ee=new Set,de=Ye;de>=0;de-=1){var se=Ct.get(de)||new Set;se.forEach(function(he){var ve=he.parent,be=he.node;if(!(st(be)||!he.parent||ee.has(he.parent.key))){if(st(he.parent.node)){ee.add(ve.key);return}var Ne=!0,Fe=!1;(ve.children||[]).filter(function(je){return!st(je.node)}).forEach(function(je){var ze=je.key,Xe=pt.has(ze);Ne&&!Xe&&(Ne=!1),!Fe&&(Xe||wt.has(ze))&&(Fe=!0)}),Ne&&pt.add(ve.key),Fe&&wt.add(ve.key),ee.add(ve.key)}})}return{checkedKeys:Array.from(pt),halfCheckedKeys:Array.from(Ze(wt,pt))}}function lt(Mt,Ct,Ye,st,pt){for(var wt=new Set(Mt),Ie=new Set(Ct),te=0;te<=st;te+=1){var ee=Ye.get(te)||new Set;ee.forEach(function(ve){var be=ve.key,Ne=ve.node,Fe=ve.children,je=Fe===void 0?[]:Fe;!wt.has(be)&&!Ie.has(be)&&!pt(Ne)&&je.filter(function(ze){return!pt(ze.node)}).forEach(function(ze){wt.delete(ze.key)})})}Ie=new Set;for(var de=new Set,se=st;se>=0;se-=1){var he=Ye.get(se)||new Set;he.forEach(function(ve){var be=ve.parent,Ne=ve.node;if(!(pt(Ne)||!ve.parent||de.has(ve.parent.key))){if(pt(ve.parent.node)){de.add(be.key);return}var Fe=!0,je=!1;(be.children||[]).filter(function(ze){return!pt(ze.node)}).forEach(function(ze){var Xe=ze.key,Je=wt.has(Xe);Fe&&!Je&&(Fe=!1),!je&&(Je||Ie.has(Xe))&&(je=!0)}),Fe||wt.delete(be.key),je&&Ie.add(be.key),de.add(be.key)}})}return{checkedKeys:Array.from(wt),halfCheckedKeys:Array.from(Ze(Ie,wt))}}function Me(Mt,Ct,Ye,st){var pt=[],wt;st?wt=st:wt=ot;var Ie=new Set(Mt.filter(function(se){var he=!!(0,Re.Z)(Ye,se);return he||pt.push(se),he})),te=new Map,ee=0;Object.keys(Ye).forEach(function(se){var he=Ye[se],ve=he.level,be=te.get(ve);be||(be=new Set,te.set(ve,be)),be.add(he),ee=Math.max(ee,ve)}),(0,ue.ZP)(!pt.length,"Tree missing follow keys: ".concat(pt.slice(0,100).map(function(se){return"'".concat(se,"'")}).join(", ")));var de;return Ct===!0?de=We(Ie,te,ee,wt):de=lt(Ie,Ct.halfCheckedKeys,te,ee,wt),de}},67841:function(zn,En,me){"use strict";me.d(En,{Z:function(){return ue}});function ue(Re,Ze){return Re[Ze]}},71430:function(zn,En,me){"use strict";me.d(En,{F:function(){return ve},H8:function(){return he},I8:function(){return se},km:function(){return pt},oH:function(){return ee},w$:function(){return wt},zn:function(){return te}});var ue=me(80665),Re=me(26390),Ze=me(57259),ot=me(19149),We=me(38298),lt=me(64002),Me=me(51395),Mt=me(67841),Ct=["children"];function Ye(be,Ne){return"".concat(be,"-").concat(Ne)}function st(be){return be&&be.type&&be.type.isTreeNode}function pt(be,Ne){return be!=null?be:Ne}function wt(be){var Ne=be||{},Fe=Ne.title,je=Ne._title,ze=Ne.key,Xe=Ne.children,Je=Fe||"title";return{title:Je,_title:je||[Je],key:ze||"key",children:Xe||"children"}}function Ie(be,Ne){var Fe=new Map;function je(ze){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(ze||[]).forEach(function(Je){var dt=Je[Ne.key],He=Je[Ne.children];warning(dt!=null,"Tree node must have a certain key: [".concat(Xe).concat(dt,"]"));var bt=String(dt);warning(!Fe.has(bt)||dt===null||dt===void 0,"Same 'key' exist in the Tree: ".concat(bt)),Fe.set(bt,!0),je(He,"".concat(Xe).concat(bt," > "))})}je(be)}function te(be){function Ne(Fe){var je=(0,We.Z)(Fe);return je.map(function(ze){if(!st(ze))return(0,Me.ZP)(!ze,"Tree/TreeNode can only accept TreeNode as children."),null;var Xe=ze.key,Je=ze.props,dt=Je.children,He=(0,ot.Z)(Je,Ct),bt=(0,Ze.Z)({key:Xe},He),et=Ne(dt);return et.length&&(bt.children=et),bt}).filter(function(ze){return ze})}return Ne(be)}function ee(be,Ne,Fe){var je=wt(Fe),ze=je._title,Xe=je.key,Je=je.children,dt=new Set(Ne===!0?[]:Ne),He=[];function bt(et){var It=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return et.map(function(xt,Bt){for(var Ut=Ye(It?It.pos:"0",Bt),Nt=pt(xt[Xe],Ut),qe,Ke=0;Ke<ze.length;Ke+=1){var Tt=ze[Ke];if(xt[Tt]!==void 0){qe=xt[Tt];break}}var Ln=(0,Ze.Z)((0,Ze.Z)({},(0,lt.Z)(xt,[].concat((0,Re.Z)(ze),[Xe,Je]))),{},{title:qe,key:Nt,parent:It,pos:Ut,children:null,data:xt,isStart:[].concat((0,Re.Z)(It?It.isStart:[]),[Bt===0]),isEnd:[].concat((0,Re.Z)(It?It.isEnd:[]),[Bt===et.length-1])});return He.push(Ln),Ne===!0||dt.has(Nt)?Ln.children=bt(xt[Je]||[],Ln):Ln.children=[],Ln})}return bt(be),He}function de(be,Ne,Fe){var je={};(0,ue.Z)(Fe)==="object"?je=Fe:je={externalGetKey:Fe},je=je||{};var ze=je,Xe=ze.childrenPropName,Je=ze.externalGetKey,dt=ze.fieldNames,He=wt(dt),bt=He.key,et=He.children,It=Xe||et,xt;Je?typeof Je=="string"?xt=function(Nt){return Nt[Je]}:typeof Je=="function"&&(xt=function(Nt){return Je(Nt)}):xt=function(Nt,qe){return pt(Nt[bt],qe)};function Bt(Ut,Nt,qe,Ke){var Tt=Ut?Ut[It]:be,Ln=Ut?Ye(qe.pos,Nt):"0",Mn=Ut?[].concat((0,Re.Z)(Ke),[Ut]):[];if(Ut){var zt=xt(Ut,Ln),rn={node:Ut,index:Nt,pos:Ln,key:zt,parentPos:qe.node?qe.pos:null,level:qe.level+1,nodes:Mn};Ne(rn)}Tt&&Tt.forEach(function(xn,Un){Bt(xn,Un,{node:Ut,pos:Ln,level:qe?qe.level+1:-1},Mn)})}Bt(null)}function se(be){var Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Fe=Ne.initWrapper,je=Ne.processEntity,ze=Ne.onProcessFinished,Xe=Ne.externalGetKey,Je=Ne.childrenPropName,dt=Ne.fieldNames,He=arguments.length>2?arguments[2]:void 0,bt=Xe||He,et={},It={},xt={posEntities:et,keyEntities:It};return Fe&&(xt=Fe(xt)||xt),de(be,function(Bt){var Ut=Bt.node,Nt=Bt.index,qe=Bt.pos,Ke=Bt.key,Tt=Bt.parentPos,Ln=Bt.level,Mn=Bt.nodes,zt={node:Ut,nodes:Mn,index:Nt,key:Ke,pos:qe,level:Ln},rn=pt(Ke,qe);et[qe]=zt,It[rn]=zt,zt.parent=et[Tt],zt.parent&&(zt.parent.children=zt.parent.children||[],zt.parent.children.push(zt)),je&&je(zt,xt)},{externalGetKey:bt,childrenPropName:Je,fieldNames:dt}),ze&&ze(xt),xt}function he(be,Ne){var Fe=Ne.expandedKeys,je=Ne.selectedKeys,ze=Ne.loadedKeys,Xe=Ne.loadingKeys,Je=Ne.checkedKeys,dt=Ne.halfCheckedKeys,He=Ne.dragOverNodeKey,bt=Ne.dropPosition,et=Ne.keyEntities,It=(0,Mt.Z)(et,be),xt={eventKey:be,expanded:Fe.indexOf(be)!==-1,selected:je.indexOf(be)!==-1,loaded:ze.indexOf(be)!==-1,loading:Xe.indexOf(be)!==-1,checked:Je.indexOf(be)!==-1,halfChecked:dt.indexOf(be)!==-1,pos:String(It?It.pos:""),dragOver:He===be&&bt===0,dragOverGapTop:He===be&&bt===-1,dragOverGapBottom:He===be&&bt===1};return xt}function ve(be){var Ne=be.data,Fe=be.expanded,je=be.selected,ze=be.checked,Xe=be.loaded,Je=be.loading,dt=be.halfChecked,He=be.dragOver,bt=be.dragOverGapTop,et=be.dragOverGapBottom,It=be.pos,xt=be.active,Bt=be.eventKey,Ut=(0,Ze.Z)((0,Ze.Z)({},Ne),{},{expanded:Fe,selected:je,checked:ze,loaded:Xe,loading:Je,halfChecked:dt,dragOver:He,dragOverGapTop:bt,dragOverGapBottom:et,pos:It,active:xt,key:Bt});return"props"in Ut||Object.defineProperty(Ut,"props",{get:function(){return(0,Me.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),be}}),Ut}},8178:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Re}});var ue=me(4676);function Re(Ze,ot,We,lt){var Me=ue.unstable_batchedUpdates?function(Ct){ue.unstable_batchedUpdates(We,Ct)}:We;return Ze!=null&&Ze.addEventListener&&Ze.addEventListener(ot,Me,lt),{remove:function(){Ze!=null&&Ze.removeEventListener&&Ze.removeEventListener(ot,Me,lt)}}}},21783:function(zn,En,me){"use strict";me.d(En,{g1:function(){return st},os:function(){return wt}});var ue=/margin|padding|width|height|max|min|offset/,Re={left:!0,top:!0},Ze={cssFloat:1,styleFloat:1,float:1};function ot(Ie){return Ie.nodeType===1?Ie.ownerDocument.defaultView.getComputedStyle(Ie,null):{}}function We(Ie,te,ee){if(te=te.toLowerCase(),ee==="auto"){if(te==="height")return Ie.offsetHeight;if(te==="width")return Ie.offsetWidth}return te in Re||(Re[te]=ue.test(te)),Re[te]?parseFloat(ee)||0:ee}function lt(Ie,te){var ee=arguments.length,de=ot(Ie);return te=Ze[te]?"cssFloat"in Ie.style?"cssFloat":"styleFloat":te,ee===1?de:We(Ie,te,de[te]||Ie.style[te])}function Me(Ie,te,ee){var de=arguments.length;if(te=Ze[te]?"cssFloat"in Ie.style?"cssFloat":"styleFloat":te,de===3)return typeof ee=="number"&&ue.test(te)&&(ee="".concat(ee,"px")),Ie.style[te]=ee,ee;for(var se in te)te.hasOwnProperty(se)&&Me(Ie,se,te[se]);return ot(Ie)}function Mt(Ie){return Ie===document.body?document.documentElement.clientWidth:Ie.offsetWidth}function Ct(Ie){return Ie===document.body?window.innerHeight||document.documentElement.clientHeight:Ie.offsetHeight}function Ye(){var Ie=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),te=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:Ie,height:te}}function st(){var Ie=document.documentElement.clientWidth,te=window.innerHeight||document.documentElement.clientHeight;return{width:Ie,height:te}}function pt(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function wt(Ie){var te=Ie.getBoundingClientRect(),ee=document.documentElement;return{left:te.left+(window.pageXOffset||ee.scrollLeft)-(ee.clientLeft||document.body.clientLeft||0),top:te.top+(window.pageYOffset||ee.scrollTop)-(ee.clientTop||document.body.clientTop||0)}}},24387:function(zn,En,me){"use strict";me.d(En,{G:function(){return ot}});var ue=me(87746),Re=function(lt){if((0,ue.Z)()&&window.document.documentElement){var Me=Array.isArray(lt)?lt:[lt],Mt=window.document.documentElement;return Me.some(function(Ct){return Ct in Mt.style})}return!1},Ze=function(lt,Me){if(!Re(lt))return!1;var Mt=document.createElement("div"),Ct=Mt.style[lt];return Mt.style[lt]=Me,Mt.style[lt]!==Ct};function ot(We,lt){return!Array.isArray(We)&<!==void 0?Ze(We,lt):Re(We)}},70318:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Pn}});var ue=me(5891),Re=me(80665),Ze=me(57259),ot=me(80962),We=me(29043),lt=me(19149),Me=me(92310),Mt=me.n(Me),Ct=me(29301),Ye=me(80764),st=me(28800),pt=me(59301),wt=me(4676),Ie=pt.forwardRef(function(Xt,Kt){var Ot=Xt.height,rt=Xt.offsetY,Ue=Xt.offsetX,$t=Xt.children,Gt=Xt.prefixCls,it=Xt.onInnerResize,at=Xt.innerProps,Te=Xt.rtl,Pe=Xt.extra,ye={},ke={display:"flex",flexDirection:"column"};return rt!==void 0&&(ye={height:Ot,position:"relative",overflow:"hidden"},ke=(0,Ze.Z)((0,Ze.Z)({},ke),{},(0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)((0,ot.Z)({transform:"translateY(".concat(rt,"px)")},Te?"marginRight":"marginLeft",-Ue),"position","absolute"),"left",0),"right",0),"top",0))),pt.createElement("div",{style:ye},pt.createElement(Ct.Z,{onResize:function(Le){var vt=Le.offsetHeight;vt&&it&&it()}},pt.createElement("div",(0,ue.Z)({style:ke,className:Mt()((0,ot.Z)({},"".concat(Gt,"-holder-inner"),Gt)),ref:Kt},at),$t,Pe)))});Ie.displayName="Filler";var te=Ie;function ee(Xt){var Kt=Xt.children,Ot=Xt.setRef,rt=pt.useCallback(function(Ue){Ot(Ue)},[]);return pt.cloneElement(Kt,{ref:rt})}function de(Xt,Kt,Ot,rt,Ue,$t,Gt,it){var at=it.getKey;return Xt.slice(Kt,Ot+1).map(function(Te,Pe){var ye=Kt+Pe,ke=Gt(Te,ye,{style:{width:rt},offsetX:Ue}),$e=at(Te);return pt.createElement(ee,{key:$e,setRef:function(vt){return $t(Te,vt)}},ke)})}function se(Xt,Kt,Ot,rt){var Ue=Ot-Xt,$t=Kt-Ot,Gt=Math.min(Ue,$t)*2;if(rt<=Gt){var it=Math.floor(rt/2);return rt%2?Ot+it+1:Ot-it}return Ue>$t?Ot-(rt-$t):Ot+(rt-Ue)}function he(Xt,Kt,Ot){var rt=Xt.length,Ue=Kt.length,$t,Gt;if(rt===0&&Ue===0)return null;rt<Ue?($t=Xt,Gt=Kt):($t=Kt,Gt=Xt);var it={__EMPTY_ITEM__:!0};function at(Le){return Le!==void 0?Ot(Le):it}for(var Te=null,Pe=Math.abs(rt-Ue)!==1,ye=0;ye<Gt.length;ye+=1){var ke=at($t[ye]),$e=at(Gt[ye]);if(ke!==$e){Te=ye,Pe=Pe||ke!==at(Gt[ye+1]);break}}return Te===null?null:{index:Te,multiple:Pe}}function ve(Xt,Kt,Ot){var rt=pt.useState(Xt),Ue=(0,We.Z)(rt,2),$t=Ue[0],Gt=Ue[1],it=pt.useState(null),at=(0,We.Z)(it,2),Te=at[0],Pe=at[1];return pt.useEffect(function(){var ye=he($t||[],Xt||[],Kt);(ye==null?void 0:ye.index)!==void 0&&(Ot==null||Ot(ye.index),Pe(Xt[ye.index])),Gt(Xt)},[Xt]),[Te]}var be=me(23073),Ne=(typeof navigator=="undefined"?"undefined":(0,Re.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Fe=Ne,je=function(Xt,Kt,Ot,rt){var Ue=(0,pt.useRef)(!1),$t=(0,pt.useRef)(null);function Gt(){clearTimeout($t.current),Ue.current=!0,$t.current=setTimeout(function(){Ue.current=!1},50)}var it=(0,pt.useRef)({top:Xt,bottom:Kt,left:Ot,right:rt});return it.current.top=Xt,it.current.bottom=Kt,it.current.left=Ot,it.current.right=rt,function(at,Te){var Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ye=at?Te<0&&it.current.left||Te>0&&it.current.right:Te<0&&it.current.top||Te>0&&it.current.bottom;return Pe&&ye?(clearTimeout($t.current),Ue.current=!1):(!ye||Ue.current)&&Gt(),!Ue.current&&ye}};function ze(Xt,Kt,Ot,rt,Ue,$t,Gt){var it=(0,pt.useRef)(0),at=(0,pt.useRef)(null),Te=(0,pt.useRef)(null),Pe=(0,pt.useRef)(!1),ye=je(Kt,Ot,rt,Ue);function ke(en,wn){if(be.Z.cancel(at.current),!ye(!1,wn)){var ai=en;if(!ai._virtualHandled)ai._virtualHandled=!0;else return;it.current+=wn,Te.current=wn,Fe||ai.preventDefault(),at.current=(0,be.Z)(function(){var _n=Pe.current?10:1;Gt(it.current*_n,!1),it.current=0})}}function $e(en,wn){Gt(wn,!0),Fe||en.preventDefault()}var Le=(0,pt.useRef)(null),vt=(0,pt.useRef)(null);function an(en){if(Xt){be.Z.cancel(vt.current),vt.current=(0,be.Z)(function(){Le.current=null},2);var wn=en.deltaX,ai=en.deltaY,_n=en.shiftKey,Hn=wn,wi=ai;(Le.current==="sx"||!Le.current&&_n&&ai&&!wn)&&(Hn=ai,wi=0,Le.current="sx");var Hi=Math.abs(Hn),_i=Math.abs(wi);Le.current===null&&(Le.current=$t&&Hi>_i?"x":"y"),Le.current==="y"?ke(en,wi):$e(en,Hn)}}function bn(en){Xt&&(Pe.current=en.detail===Te.current)}return[an,bn]}function Xe(Xt,Kt,Ot,rt){var Ue=pt.useMemo(function(){return[new Map,[]]},[Xt,Ot.id,rt]),$t=(0,We.Z)(Ue,2),Gt=$t[0],it=$t[1],at=function(Pe){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pe,ke=Gt.get(Pe),$e=Gt.get(ye);if(ke===void 0||$e===void 0)for(var Le=Xt.length,vt=it.length;vt<Le;vt+=1){var an,bn=Xt[vt],en=Kt(bn);Gt.set(en,vt);var wn=(an=Ot.get(en))!==null&&an!==void 0?an:rt;if(it[vt]=(it[vt-1]||0)+wn,en===Pe&&(ke=vt),en===ye&&($e=vt),ke!==void 0&&$e!==void 0)break}return{top:it[ke-1]||0,bottom:it[$e]}};return at}var Je=me(85899),dt=me(79545),He=me(68550),bt=function(){function Xt(){(0,dt.Z)(this,Xt),(0,ot.Z)(this,"maps",void 0),(0,ot.Z)(this,"id",0),(0,ot.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,He.Z)(Xt,[{key:"set",value:function(Ot,rt){this.maps[Ot]=rt,this.id+=1,this.diffKeys.add(Ot)}},{key:"get",value:function(Ot){return this.maps[Ot]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),Xt}(),et=bt;function It(Xt){var Kt=parseFloat(Xt);return isNaN(Kt)?0:Kt}function xt(Xt,Kt,Ot){var rt=pt.useState(0),Ue=(0,We.Z)(rt,2),$t=Ue[0],Gt=Ue[1],it=(0,pt.useRef)(new Map),at=(0,pt.useRef)(new et),Te=(0,pt.useRef)(0);function Pe(){Te.current+=1}function ye(){var $e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Pe();var Le=function(){it.current.forEach(function(bn,en){if(bn&&bn.offsetParent){var wn=(0,Je.ZP)(bn),ai=wn.offsetHeight,_n=getComputedStyle(wn),Hn=_n.marginTop,wi=_n.marginBottom,Hi=It(Hn),_i=It(wi),cr=ai+Hi+_i;at.current.get(en)!==cr&&at.current.set(en,cr)}}),Gt(function(bn){return bn+1})};if($e)Le();else{Te.current+=1;var vt=Te.current;Promise.resolve().then(function(){vt===Te.current&&Le()})}}function ke($e,Le){var vt=Xt($e),an=it.current.get(vt);Le?(it.current.set(vt,Le),ye()):it.current.delete(vt),!an!=!Le&&(Le?Kt==null||Kt($e):Ot==null||Ot($e))}return(0,pt.useEffect)(function(){return Pe},[]),[ke,ye,at.current,$t]}var Bt=14/15;function Ut(Xt,Kt,Ot){var rt=(0,pt.useRef)(!1),Ue=(0,pt.useRef)(0),$t=(0,pt.useRef)(0),Gt=(0,pt.useRef)(null),it=(0,pt.useRef)(null),at,Te=function($e){if(rt.current){var Le=Math.ceil($e.touches[0].pageX),vt=Math.ceil($e.touches[0].pageY),an=Ue.current-Le,bn=$t.current-vt,en=Math.abs(an)>Math.abs(bn);en?Ue.current=Le:$t.current=vt;var wn=Ot(en,en?an:bn,!1,$e);wn&&$e.preventDefault(),clearInterval(it.current),wn&&(it.current=setInterval(function(){en?an*=Bt:bn*=Bt;var ai=Math.floor(en?an:bn);(!Ot(en,ai,!0)||Math.abs(ai)<=.1)&&clearInterval(it.current)},16))}},Pe=function(){rt.current=!1,at()},ye=function($e){at(),$e.touches.length===1&&!rt.current&&(rt.current=!0,Ue.current=Math.ceil($e.touches[0].pageX),$t.current=Math.ceil($e.touches[0].pageY),Gt.current=$e.target,Gt.current.addEventListener("touchmove",Te,{passive:!1}),Gt.current.addEventListener("touchend",Pe,{passive:!0}))};at=function(){Gt.current&&(Gt.current.removeEventListener("touchmove",Te),Gt.current.removeEventListener("touchend",Pe))},(0,st.Z)(function(){return Xt&&Kt.current.addEventListener("touchstart",ye,{passive:!0}),function(){var ke;(ke=Kt.current)===null||ke===void 0||ke.removeEventListener("touchstart",ye),at(),clearInterval(it.current)}},[Xt])}function Nt(Xt){return Math.floor(Math.pow(Xt,.5))}function qe(Xt,Kt){var Ot="touches"in Xt?Xt.touches[0]:Xt;return Ot[Kt?"pageX":"pageY"]-window[Kt?"scrollX":"scrollY"]}function Ke(Xt,Kt,Ot){pt.useEffect(function(){var rt=Kt.current;if(Xt&&rt){var Ue=!1,$t,Gt,it=function(){be.Z.cancel($t)},at=function ke(){it(),$t=(0,be.Z)(function(){Ot(Gt),ke()})},Te=function($e){var Le=$e;Le._virtualHandled||(Le._virtualHandled=!0,Ue=!0)},Pe=function(){Ue=!1,it()},ye=function($e){if(Ue){var Le=qe($e,!1),vt=rt.getBoundingClientRect(),an=vt.top,bn=vt.bottom;if(Le<=an){var en=an-Le;Gt=-Nt(en),at()}else if(Le>=bn){var wn=Le-bn;Gt=Nt(wn),at()}else it()}};return rt.addEventListener("mousedown",Te),rt.ownerDocument.addEventListener("mouseup",Pe),rt.ownerDocument.addEventListener("mousemove",ye),function(){rt.removeEventListener("mousedown",Te),rt.ownerDocument.removeEventListener("mouseup",Pe),rt.ownerDocument.removeEventListener("mousemove",ye),it()}}},[Xt])}var Tt=10;function Ln(Xt,Kt,Ot,rt,Ue,$t,Gt,it){var at=pt.useRef(),Te=pt.useState(null),Pe=(0,We.Z)(Te,2),ye=Pe[0],ke=Pe[1];return(0,st.Z)(function(){if(ye&&ye.times<Tt){if(!Xt.current){ke(function(Be){return(0,Ze.Z)({},Be)});return}$t();var $e=ye.targetAlign,Le=ye.originAlign,vt=ye.index,an=ye.offset,bn=Xt.current.clientHeight,en=!1,wn=$e,ai=null;if(bn){for(var _n=$e||Le,Hn=0,wi=0,Hi=0,_i=Math.min(Kt.length-1,vt),cr=0;cr<=_i;cr+=1){var _r=Ue(Kt[cr]);wi=Hn;var vi=Ot.get(_r);Hi=wi+(vi===void 0?rt:vi),Hn=Hi}for(var si=_n==="top"?an:bn-an,fi=_i;fi>=0;fi-=1){var Ui=Ue(Kt[fi]),Fi=Ot.get(Ui);if(Fi===void 0){en=!0;break}if(si-=Fi,si<=0)break}switch(_n){case"top":ai=wi-an;break;case"bottom":ai=Hi-bn+an;break;default:{var ao=Xt.current.scrollTop,wr=ao+bn;wi<ao?wn="top":Hi>wr&&(wn="bottom")}}ai!==null&&Gt(ai),ai!==ye.lastTop&&(en=!0)}en&&ke((0,Ze.Z)((0,Ze.Z)({},ye),{},{times:ye.times+1,targetAlign:wn,lastTop:ai}))}},[ye,Xt.current]),function($e){if($e==null){it();return}if(be.Z.cancel(at.current),typeof $e=="number")Gt($e);else if($e&&(0,Re.Z)($e)==="object"){var Le,vt=$e.align;"index"in $e?Le=$e.index:Le=Kt.findIndex(function(en){return Ue(en)===$e.key});var an=$e.offset,bn=an===void 0?0:an;ke({times:0,index:Le,offset:bn,originAlign:vt})}}}var Mn=pt.forwardRef(function(Xt,Kt){var Ot=Xt.prefixCls,rt=Xt.rtl,Ue=Xt.scrollOffset,$t=Xt.scrollRange,Gt=Xt.onStartMove,it=Xt.onStopMove,at=Xt.onScroll,Te=Xt.horizontal,Pe=Xt.spinSize,ye=Xt.containerSize,ke=Xt.style,$e=Xt.thumbStyle,Le=pt.useState(!1),vt=(0,We.Z)(Le,2),an=vt[0],bn=vt[1],en=pt.useState(null),wn=(0,We.Z)(en,2),ai=wn[0],_n=wn[1],Hn=pt.useState(null),wi=(0,We.Z)(Hn,2),Hi=wi[0],_i=wi[1],cr=!rt,_r=pt.useRef(),vi=pt.useRef(),si=pt.useState(!1),fi=(0,We.Z)(si,2),Ui=fi[0],Fi=fi[1],ao=pt.useRef(),wr=function(){clearTimeout(ao.current),Fi(!0),ao.current=setTimeout(function(){Fi(!1)},3e3)},Be=$t-ye||0,Xr=ye-Pe||0,Hr=pt.useMemo(function(){if(Ue===0||Be===0)return 0;var yt=Ue/Be;return yt*Xr},[Ue,Be,Xr]),jn=function(un){un.stopPropagation(),un.preventDefault()},Li=pt.useRef({top:Hr,dragging:an,pageY:ai,startTop:Hi});Li.current={top:Hr,dragging:an,pageY:ai,startTop:Hi};var Wi=function(un){bn(!0),_n(qe(un,Te)),_i(Li.current.top),Gt(),un.stopPropagation(),un.preventDefault()};pt.useEffect(function(){var yt=function(nt){nt.preventDefault()},un=_r.current,vn=vi.current;return un.addEventListener("touchstart",yt,{passive:!1}),vn.addEventListener("touchstart",Wi,{passive:!1}),function(){un.removeEventListener("touchstart",yt),vn.removeEventListener("touchstart",Wi)}},[]);var ji=pt.useRef();ji.current=Be;var Gn=pt.useRef();Gn.current=Xr,pt.useEffect(function(){if(an){var yt,un=function(nt){var on=Li.current,fn=on.dragging,Jn=on.pageY,pn=on.startTop;be.Z.cancel(yt);var Rt=_r.current.getBoundingClientRect(),In=ye/(Te?Rt.width:Rt.height);if(fn){var Vn=(qe(nt,Te)-Jn)*In,Pi=pn;!cr&&Te?Pi-=Vn:Pi+=Vn;var tn=ji.current,hn=Gn.current,Rn=hn?Pi/hn:0,Oi=Math.ceil(Rn*tn);Oi=Math.max(Oi,0),Oi=Math.min(Oi,tn),yt=(0,be.Z)(function(){at(Oi,Te)})}},vn=function(){bn(!1),it()};return window.addEventListener("mousemove",un,{passive:!0}),window.addEventListener("touchmove",un,{passive:!0}),window.addEventListener("mouseup",vn,{passive:!0}),window.addEventListener("touchend",vn,{passive:!0}),function(){window.removeEventListener("mousemove",un),window.removeEventListener("touchmove",un),window.removeEventListener("mouseup",vn),window.removeEventListener("touchend",vn),be.Z.cancel(yt)}}},[an]),pt.useEffect(function(){return wr(),function(){clearTimeout(ao.current)}},[Ue]),pt.useImperativeHandle(Kt,function(){return{delayHidden:wr}});var Ht="".concat(Ot,"-scrollbar"),Wt={position:"absolute",visibility:Ui?null:"hidden"},Zt={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Te?(Wt.height=8,Wt.left=0,Wt.right=0,Wt.bottom=0,Zt.height="100%",Zt.width=Pe,cr?Zt.left=Hr:Zt.right=Hr):(Wt.width=8,Wt.top=0,Wt.bottom=0,cr?Wt.right=0:Wt.left=0,Zt.width="100%",Zt.height=Pe,Zt.top=Hr),pt.createElement("div",{ref:_r,className:Mt()(Ht,(0,ot.Z)((0,ot.Z)((0,ot.Z)({},"".concat(Ht,"-horizontal"),Te),"".concat(Ht,"-vertical"),!Te),"".concat(Ht,"-visible"),Ui)),style:(0,Ze.Z)((0,Ze.Z)({},Wt),ke),onMouseDown:jn,onMouseMove:wr},pt.createElement("div",{ref:vi,className:Mt()("".concat(Ht,"-thumb"),(0,ot.Z)({},"".concat(Ht,"-thumb-moving"),an)),style:(0,Ze.Z)((0,Ze.Z)({},Zt),$e),onMouseDown:Wi}))}),zt=Mn,rn=20;function xn(){var Xt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ot=Xt/Kt*Xt;return isNaN(Ot)&&(Ot=0),Ot=Math.max(Ot,rn),Math.floor(Ot)}var Un=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],yn=[],sn={overflowY:"auto",overflowAnchor:"none"};function Lt(Xt,Kt){var Ot=Xt.prefixCls,rt=Ot===void 0?"rc-virtual-list":Ot,Ue=Xt.className,$t=Xt.height,Gt=Xt.itemHeight,it=Xt.fullHeight,at=it===void 0?!0:it,Te=Xt.style,Pe=Xt.data,ye=Xt.children,ke=Xt.itemKey,$e=Xt.virtual,Le=Xt.direction,vt=Xt.scrollWidth,an=Xt.component,bn=an===void 0?"div":an,en=Xt.onScroll,wn=Xt.onVirtualScroll,ai=Xt.onVisibleChange,_n=Xt.innerProps,Hn=Xt.extraRender,wi=Xt.styles,Hi=(0,lt.Z)(Xt,Un),_i=pt.useCallback(function(Or){return typeof ke=="function"?ke(Or):Or==null?void 0:Or[ke]},[ke]),cr=xt(_i,null,null),_r=(0,We.Z)(cr,4),vi=_r[0],si=_r[1],fi=_r[2],Ui=_r[3],Fi=!!($e!==!1&&$t&&Gt),ao=pt.useMemo(function(){return Object.values(fi.maps).reduce(function(Or,xo){return Or+xo},0)},[fi.id,fi.maps]),wr=Fi&&Pe&&(Math.max(Gt*Pe.length,ao)>$t||!!vt),Be=Le==="rtl",Xr=Mt()(rt,(0,ot.Z)({},"".concat(rt,"-rtl"),Be),Ue),Hr=Pe||yn,jn=(0,pt.useRef)(),Li=(0,pt.useRef)(),Wi=(0,pt.useRef)(),ji=(0,pt.useState)(0),Gn=(0,We.Z)(ji,2),Ht=Gn[0],Wt=Gn[1],Zt=(0,pt.useState)(0),yt=(0,We.Z)(Zt,2),un=yt[0],vn=yt[1],At=(0,pt.useState)(!1),nt=(0,We.Z)(At,2),on=nt[0],fn=nt[1],Jn=function(){fn(!0)},pn=function(){fn(!1)},Rt={getKey:_i};function In(Or){Wt(function(xo){var na;typeof Or=="function"?na=Or(xo):na=Or;var Da=$r(na);return jn.current.scrollTop=Da,Da})}var Vn=(0,pt.useRef)({start:0,end:Hr.length}),Pi=(0,pt.useRef)(),tn=ve(Hr,_i),hn=(0,We.Z)(tn,1),Rn=hn[0];Pi.current=Rn;var Oi=pt.useMemo(function(){if(!Fi)return{scrollHeight:void 0,start:0,end:Hr.length-1,offset:void 0};if(!wr){var Or;return{scrollHeight:((Or=Li.current)===null||Or===void 0?void 0:Or.offsetHeight)||0,start:0,end:Hr.length-1,offset:void 0}}for(var xo=0,na,Da,Ao,Va=Hr.length,Jr=0;Jr<Va;Jr+=1){var eo=Hr[Jr],Eo=_i(eo),ci=fi.get(Eo),xa=xo+(ci===void 0?Gt:ci);xa>=Ht&&na===void 0&&(na=Jr,Da=xo),xa>Ht+$t&&Ao===void 0&&(Ao=Jr),xo=xa}return na===void 0&&(na=0,Da=0,Ao=Math.ceil($t/Gt)),Ao===void 0&&(Ao=Hr.length-1),Ao=Math.min(Ao+1,Hr.length-1),{scrollHeight:xo,start:na,end:Ao,offset:Da}},[wr,Fi,Ht,Hr,Ui,$t]),Ii=Oi.scrollHeight,Si=Oi.start,Ni=Oi.end,Zi=Oi.offset;Vn.current.start=Si,Vn.current.end=Ni,pt.useLayoutEffect(function(){var Or=fi.getRecord();if(Or.size===1){var xo=Array.from(Or)[0],na=_i(Hr[Si]);if(na===xo){var Da=fi.get(xo),Ao=Da-Gt;In(function(Va){return Va+Ao})}}fi.resetRecord()},[Ii]);var sr=pt.useState({width:0,height:$t}),Wr=(0,We.Z)(sr,2),li=Wr[0],Vi=Wr[1],vo=function(xo){Vi({width:xo.offsetWidth,height:xo.offsetHeight})},Qr=(0,pt.useRef)(),Er=(0,pt.useRef)(),qt=pt.useMemo(function(){return xn(li.width,vt)},[li.width,vt]),pi=pt.useMemo(function(){return xn(li.height,Ii)},[li.height,Ii]),pr=Ii-$t,qi=(0,pt.useRef)(pr);qi.current=pr;function $r(Or){var xo=Or;return Number.isNaN(qi.current)||(xo=Math.min(xo,qi.current)),xo=Math.max(xo,0),xo}var Ar=Ht<=0,io=Ht>=pr,Kr=un<=0,jr=un>=vt,yo=je(Ar,io,Kr,jr),$n=function(){return{x:Be?-un:un,y:Ht}},Xo=(0,pt.useRef)($n()),Kn=(0,Ye.useEvent)(function(Or){if(wn){var xo=(0,Ze.Z)((0,Ze.Z)({},$n()),Or);(Xo.current.x!==xo.x||Xo.current.y!==xo.y)&&(wn(xo),Xo.current=xo)}});function Io(Or,xo){var na=Or;xo?((0,wt.flushSync)(function(){vn(na)}),Kn()):In(na)}function Jo(Or){var xo=Or.currentTarget.scrollTop;xo!==Ht&&In(xo),en==null||en(Or),Kn()}var Yi=function(xo){var na=xo,Da=vt?vt-li.width:0;return na=Math.max(na,0),na=Math.min(na,Da),na},ua=(0,Ye.useEvent)(function(Or,xo){xo?((0,wt.flushSync)(function(){vn(function(na){var Da=na+(Be?-Or:Or);return Yi(Da)})}),Kn()):In(function(na){var Da=na+Or;return Da})}),Zo=ze(Fi,Ar,io,Kr,jr,!!vt,ua),Dr=(0,We.Z)(Zo,2),Ir=Dr[0],Do=Dr[1];Ut(Fi,jn,function(Or,xo,na,Da){var Ao=Da;return yo(Or,xo,na)?!1:!Ao||!Ao._virtualHandled?(Ao&&(Ao._virtualHandled=!0),Ir({preventDefault:function(){},deltaX:Or?xo:0,deltaY:Or?0:xo}),!0):!1}),Ke(wr,jn,function(Or){In(function(xo){return xo+Or})}),(0,st.Z)(function(){function Or(na){var Da=Ar&&na.detail<0,Ao=io&&na.detail>0;Fi&&!Da&&!Ao&&na.preventDefault()}var xo=jn.current;return xo.addEventListener("wheel",Ir,{passive:!1}),xo.addEventListener("DOMMouseScroll",Do,{passive:!0}),xo.addEventListener("MozMousePixelScroll",Or,{passive:!1}),function(){xo.removeEventListener("wheel",Ir),xo.removeEventListener("DOMMouseScroll",Do),xo.removeEventListener("MozMousePixelScroll",Or)}},[Fi,Ar,io]),(0,st.Z)(function(){if(vt){var Or=Yi(un);vn(Or),Kn({x:Or})}},[li.width,vt]);var _o=function(){var xo,na;(xo=Qr.current)===null||xo===void 0||xo.delayHidden(),(na=Er.current)===null||na===void 0||na.delayHidden()},Ti=Ln(jn,Hr,fi,Gt,_i,function(){return si(!0)},In,_o);pt.useImperativeHandle(Kt,function(){return{nativeElement:Wi.current,getScrollInfo:$n,scrollTo:function(xo){function na(Da){return Da&&(0,Re.Z)(Da)==="object"&&("left"in Da||"top"in Da)}na(xo)?(xo.left!==void 0&&vn(Yi(xo.left)),Ti(xo.top)):Ti(xo)}}}),(0,st.Z)(function(){if(ai){var Or=Hr.slice(Si,Ni+1);ai(Or,Hr)}},[Si,Ni,Hr]);var tt=Xe(Hr,_i,fi,Gt),jo=Hn==null?void 0:Hn({start:Si,end:Ni,virtual:wr,offsetX:un,offsetY:Zi,rtl:Be,getSize:tt}),Ra=de(Hr,Si,Ni,vt,un,vi,ye,Rt),$a=null;$t&&($a=(0,Ze.Z)((0,ot.Z)({},at?"height":"maxHeight",$t),sn),Fi&&($a.overflowY="hidden",vt&&($a.overflowX="hidden"),on&&($a.pointerEvents="none")));var ls={};return Be&&(ls.dir="rtl"),pt.createElement("div",(0,ue.Z)({ref:Wi,style:(0,Ze.Z)((0,Ze.Z)({},Te),{},{position:"relative"}),className:Xr},ls,Hi),pt.createElement(Ct.Z,{onResize:vo},pt.createElement(bn,{className:"".concat(rt,"-holder"),style:$a,ref:jn,onScroll:Jo,onMouseEnter:_o},pt.createElement(te,{prefixCls:rt,height:Ii,offsetX:un,offsetY:Zi,scrollWidth:vt,onInnerResize:si,ref:Li,innerProps:_n,rtl:Be,extra:jo},Ra))),wr&&Ii>$t&&pt.createElement(zt,{ref:Qr,prefixCls:rt,scrollOffset:Ht,scrollRange:Ii,rtl:Be,onScroll:Io,onStartMove:Jn,onStopMove:pn,spinSize:pi,containerSize:li.height,style:wi==null?void 0:wi.verticalScrollBar,thumbStyle:wi==null?void 0:wi.verticalScrollBarThumb}),wr&&vt>li.width&&pt.createElement(zt,{ref:Er,prefixCls:rt,scrollOffset:un,scrollRange:vt,rtl:Be,onScroll:Io,onStartMove:Jn,onStopMove:pn,spinSize:qt,containerSize:li.width,horizontal:!0,style:wi==null?void 0:wi.horizontalScrollBar,thumbStyle:wi==null?void 0:wi.horizontalScrollBarThumb}))}var ti=pt.forwardRef(Lt);ti.displayName="List";var gi=ti,Pn=gi},78018:function(zn,En,me){"use strict";me.d(En,{Z5:function(){return wg},_l:function(){return vu},bK:function(){return wc}});var ue=me(59301),Re=me(3378);function Ze(Se,Ce){Se.prototype=Object.create(Ce.prototype),Se.prototype.constructor=Se,(0,Re.Z)(Se,Ce)}var ot=me(5891),We=me(59781),lt=ue.createContext(null),Me=null;function Mt(Se){Se()}var Ct=Mt,Ye=function(Ce){return Ct=Ce},st=function(){return Ct};function pt(){var Se=st(),Ce=null,De=null;return{clear:function(){Ce=null,De=null},notify:function(){Se(function(){for(var mt=Ce;mt;)mt.callback(),mt=mt.next})},get:function(){for(var mt=[],gt=Ce;gt;)mt.push(gt),gt=gt.next;return mt},subscribe:function(mt){var gt=!0,Ft=De={callback:mt,next:null,prev:De};return Ft.prev?Ft.prev.next=Ft:Ce=Ft,function(){!gt||Ce===null||(gt=!1,Ft.next?Ft.next.prev=Ft.prev:De=Ft.prev,Ft.prev?Ft.prev.next=Ft.next:Ce=Ft.next)}}}}var wt={notify:function(){},get:function(){return[]}};function Ie(Se,Ce){var De,Ge=wt;function mt(Nn){return Cn(),Ge.subscribe(Nn)}function gt(){Ge.notify()}function Ft(){On.onStateChange&&On.onStateChange()}function jt(){return!!De}function Cn(){De||(De=Ce?Ce.addNestedSub(Ft):Se.subscribe(Ft),Ge=pt())}function Wn(){De&&(De(),De=void 0,Ge.clear(),Ge=wt)}var On={addNestedSub:mt,notifyNestedSubs:gt,handleChangeWrapper:Ft,isSubscribed:jt,trySubscribe:Cn,tryUnsubscribe:Wn,getListeners:function(){return Ge}};return On}var te=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?ue.useLayoutEffect:ue.useEffect;function ee(Se){var Ce=Se.store,De=Se.context,Ge=Se.children,mt=(0,ue.useMemo)(function(){var jt=Ie(Ce);return{store:Ce,subscription:jt}},[Ce]),gt=(0,ue.useMemo)(function(){return Ce.getState()},[Ce]);te(function(){var jt=mt.subscription;return jt.onStateChange=jt.notifyNestedSubs,jt.trySubscribe(),gt!==Ce.getState()&&jt.notifyNestedSubs(),function(){jt.tryUnsubscribe(),jt.onStateChange=null}},[mt,gt]);var Ft=De||lt;return ue.createElement(Ft.Provider,{value:mt},Ge)}var de=ee,se=me(16736),he=me(94266),ve=me.n(he),be=me(53410),Ne=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Fe=["reactReduxForwardedRef"],je=[],ze=[null,null],Xe=function(Ce){try{return JSON.stringify(Ce)}catch(De){return String(Ce)}};function Je(Se,Ce){var De=Se[1];return[Ce.payload,De+1]}function dt(Se,Ce,De){te(function(){return Se.apply(void 0,Ce)},De)}function He(Se,Ce,De,Ge,mt,gt,Ft){Se.current=Ge,Ce.current=mt,De.current=!1,gt.current&&(gt.current=null,Ft())}function bt(Se,Ce,De,Ge,mt,gt,Ft,jt,Cn,Wn){if(Se){var On=!1,Nn=null,Fn=function(){if(!On){var Vr=Ce.getState(),to,Po;try{to=Ge(Vr,mt.current)}catch(To){Po=To,Nn=To}Po||(Nn=null),to===gt.current?Ft.current||Cn():(gt.current=to,jt.current=to,Ft.current=!0,Wn({type:"STORE_UPDATED",payload:{error:Po}}))}};De.onStateChange=Fn,De.trySubscribe(),Fn();var qn=function(){if(On=!0,De.tryUnsubscribe(),De.onStateChange=null,Nn)throw Nn};return qn}}var et=function(){return[null,0]};function It(Se,Ce){Ce===void 0&&(Ce={});var De=Ce,Ge=De.getDisplayName,mt=Ge===void 0?function(os){return"ConnectAdvanced("+os+")"}:Ge,gt=De.methodName,Ft=gt===void 0?"connectAdvanced":gt,jt=De.renderCountProp,Cn=jt===void 0?void 0:jt,Wn=De.shouldHandleStateChanges,On=Wn===void 0?!0:Wn,Nn=De.storeKey,Fn=Nn===void 0?"store":Nn,qn=De.withRef,ki=qn===void 0?!1:qn,Vr=De.forwardRef,to=Vr===void 0?!1:Vr,Po=De.context,To=Po===void 0?lt:Po,ea=(0,se.Z)(De,Ne);if(0)var Uo;var Fa=To;return function(Ts){var ou=Ts.displayName||Ts.name||"Component",As=mt(ou),Xl=(0,ot.Z)({},ea,{getDisplayName:mt,methodName:Ft,renderCountProp:Cn,shouldHandleStateChanges:On,storeKey:Fn,displayName:As,wrappedComponentName:ou,WrappedComponent:Ts}),Gu=ea.pure;function tc(Zl){return Se(Zl.dispatch,Xl)}var fd=Gu?ue.useMemo:function(Zl){return Zl()};function Bc(Zl){var Bd=(0,ue.useMemo)(function(){var Gl=Zl.reactReduxForwardedRef,jc=(0,se.Z)(Zl,Fe);return[Zl.context,Gl,jc]},[Zl]),Jl=Bd[0],gd=Bd[1],vf=Bd[2],pd=(0,ue.useMemo)(function(){return Jl&&Jl.Consumer&&(0,be.isContextConsumer)(ue.createElement(Jl.Consumer,null))?Jl:Fa},[Jl,Fa]),fa=(0,ue.useContext)(pd),Wh=!!Zl.store&&!!Zl.store.getState&&!!Zl.store.dispatch,Ng=!!fa&&!!fa.store,md=Wh?Zl.store:fa.store,Jd=(0,ue.useMemo)(function(){return tc(md)},[md]),Eh=(0,ue.useMemo)(function(){if(!On)return ze;var Gl=Ie(md,Wh?null:fa.subscription),jc=Gl.notifyNestedSubs.bind(Gl);return[Gl,jc]},[md,Wh,fa]),bc=Eh[0],Yf=Eh[1],Xf=(0,ue.useMemo)(function(){return Wh?fa:(0,ot.Z)({},fa,{subscription:bc})},[Wh,fa,bc]),op=(0,ue.useReducer)(Je,je,et),Wp=op[0],Bg=Wp[0],yf=op[1];if(Bg&&Bg.error)throw Bg.error;var ap=(0,ue.useRef)(),Ag=(0,ue.useRef)(vf),xf=(0,ue.useRef)(),Sf=(0,ue.useRef)(!1),Dg=fd(function(){return xf.current&&vf===Ag.current?xf.current:Jd(md.getState(),vf)},[md,Bg,vf]);dt(He,[Ag,ap,Sf,vf,Dg,xf,Yf]),dt(bt,[On,md,bc,Jd,Ag,ap,Sf,xf,Yf,yf],[md,bc,Jd]);var Ga=(0,ue.useMemo)(function(){return ue.createElement(Ts,(0,ot.Z)({},Dg,{ref:gd}))},[gd,Ts,Dg]),nc=(0,ue.useMemo)(function(){return On?ue.createElement(pd.Provider,{value:Xf},Ga):Ga},[pd,Ga,Xf]);return nc}var Cc=Gu?ue.memo(Bc):Bc;if(Cc.WrappedComponent=Ts,Cc.displayName=Bc.displayName=As,to){var xu=ue.forwardRef(function(Bd,Jl){return ue.createElement(Cc,(0,ot.Z)({},Bd,{reactReduxForwardedRef:Jl}))});return xu.displayName=As,xu.WrappedComponent=Ts,ve()(xu,Ts)}return ve()(Cc,Ts)}}function xt(Se,Ce){return Se===Ce?Se!==0||Ce!==0||1/Se===1/Ce:Se!==Se&&Ce!==Ce}function Bt(Se,Ce){if(xt(Se,Ce))return!0;if(typeof Se!="object"||Se===null||typeof Ce!="object"||Ce===null)return!1;var De=Object.keys(Se),Ge=Object.keys(Ce);if(De.length!==Ge.length)return!1;for(var mt=0;mt<De.length;mt++)if(!Object.prototype.hasOwnProperty.call(Ce,De[mt])||!xt(Se[De[mt]],Ce[De[mt]]))return!1;return!0}function Ut(Se,Ce){var De={},Ge=function(Ft){var jt=Se[Ft];typeof jt=="function"&&(De[Ft]=function(){return Ce(jt.apply(void 0,arguments))})};for(var mt in Se)Ge(mt);return De}function Nt(Se){return function(De,Ge){var mt=Se(De,Ge);function gt(){return mt}return gt.dependsOnOwnProps=!1,gt}}function qe(Se){return Se.dependsOnOwnProps!==null&&Se.dependsOnOwnProps!==void 0?!!Se.dependsOnOwnProps:Se.length!==1}function Ke(Se,Ce){return function(Ge,mt){var gt=mt.displayName,Ft=function(Cn,Wn){return Ft.dependsOnOwnProps?Ft.mapToProps(Cn,Wn):Ft.mapToProps(Cn)};return Ft.dependsOnOwnProps=!0,Ft.mapToProps=function(Cn,Wn){Ft.mapToProps=Se,Ft.dependsOnOwnProps=qe(Se);var On=Ft(Cn,Wn);return typeof On=="function"&&(Ft.mapToProps=On,Ft.dependsOnOwnProps=qe(On),On=Ft(Cn,Wn)),On},Ft}}function Tt(Se){return typeof Se=="function"?Ke(Se,"mapDispatchToProps"):void 0}function Ln(Se){return Se?void 0:Nt(function(Ce){return{dispatch:Ce}})}function Mn(Se){return Se&&typeof Se=="object"?Nt(function(Ce){return Ut(Se,Ce)}):void 0}var zt=[Tt,Ln,Mn];function rn(Se){return typeof Se=="function"?Ke(Se,"mapStateToProps"):void 0}function xn(Se){return Se?void 0:Nt(function(){return{}})}var Un=[rn,xn];function yn(Se,Ce,De){return(0,ot.Z)({},De,Se,Ce)}function sn(Se){return function(De,Ge){var mt=Ge.displayName,gt=Ge.pure,Ft=Ge.areMergedPropsEqual,jt=!1,Cn;return function(On,Nn,Fn){var qn=Se(On,Nn,Fn);return jt?(!gt||!Ft(qn,Cn))&&(Cn=qn):(jt=!0,Cn=qn),Cn}}}function Lt(Se){return typeof Se=="function"?sn(Se):void 0}function ti(Se){return Se?void 0:function(){return yn}}var gi=[Lt,ti],Pn=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Xt(Se,Ce,De,Ge){return function(gt,Ft){return De(Se(gt,Ft),Ce(Ge,Ft),Ft)}}function Kt(Se,Ce,De,Ge,mt){var gt=mt.areStatesEqual,Ft=mt.areOwnPropsEqual,jt=mt.areStatePropsEqual,Cn=!1,Wn,On,Nn,Fn,qn;function ki(ea,Uo){return Wn=ea,On=Uo,Nn=Se(Wn,On),Fn=Ce(Ge,On),qn=De(Nn,Fn,On),Cn=!0,qn}function Vr(){return Nn=Se(Wn,On),Ce.dependsOnOwnProps&&(Fn=Ce(Ge,On)),qn=De(Nn,Fn,On),qn}function to(){return Se.dependsOnOwnProps&&(Nn=Se(Wn,On)),Ce.dependsOnOwnProps&&(Fn=Ce(Ge,On)),qn=De(Nn,Fn,On),qn}function Po(){var ea=Se(Wn,On),Uo=!jt(ea,Nn);return Nn=ea,Uo&&(qn=De(Nn,Fn,On)),qn}function To(ea,Uo){var Fa=!Ft(Uo,On),os=!gt(ea,Wn,Uo,On);return Wn=ea,On=Uo,Fa&&os?Vr():Fa?to():os?Po():qn}return function(Uo,Fa){return Cn?To(Uo,Fa):ki(Uo,Fa)}}function Ot(Se,Ce){var De=Ce.initMapStateToProps,Ge=Ce.initMapDispatchToProps,mt=Ce.initMergeProps,gt=(0,se.Z)(Ce,Pn),Ft=De(Se,gt),jt=Ge(Se,gt),Cn=mt(Se,gt),Wn=gt.pure?Kt:Xt;return Wn(Ft,jt,Cn,Se,gt)}var rt=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function Ue(Se,Ce,De){for(var Ge=Ce.length-1;Ge>=0;Ge--){var mt=Ce[Ge](Se);if(mt)return mt}return function(gt,Ft){throw new Error("Invalid value of type "+typeof Se+" for "+De+" argument when connecting component "+Ft.wrappedComponentName+".")}}function $t(Se,Ce){return Se===Ce}function Gt(Se){var Ce=Se===void 0?{}:Se,De=Ce.connectHOC,Ge=De===void 0?It:De,mt=Ce.mapStateToPropsFactories,gt=mt===void 0?Un:mt,Ft=Ce.mapDispatchToPropsFactories,jt=Ft===void 0?zt:Ft,Cn=Ce.mergePropsFactories,Wn=Cn===void 0?gi:Cn,On=Ce.selectorFactory,Nn=On===void 0?Ot:On;return function(qn,ki,Vr,to){to===void 0&&(to={});var Po=to,To=Po.pure,ea=To===void 0?!0:To,Uo=Po.areStatesEqual,Fa=Uo===void 0?$t:Uo,os=Po.areOwnPropsEqual,Ts=os===void 0?Bt:os,ou=Po.areStatePropsEqual,As=ou===void 0?Bt:ou,Xl=Po.areMergedPropsEqual,Gu=Xl===void 0?Bt:Xl,tc=(0,se.Z)(Po,rt),fd=Ue(qn,gt,"mapStateToProps"),Bc=Ue(ki,jt,"mapDispatchToProps"),Cc=Ue(Vr,Wn,"mergeProps");return Ge(Nn,(0,ot.Z)({methodName:"connect",getDisplayName:function(Zl){return"Connect("+Zl+")"},shouldHandleStateChanges:!!qn,initMapStateToProps:fd,initMapDispatchToProps:Bc,initMergeProps:Cc,pure:ea,areStatesEqual:Fa,areOwnPropsEqual:Ts,areStatePropsEqual:As,areMergedPropsEqual:Gu},tc))}}var it=Gt();function at(){var Se=useContext(ReactReduxContext);return Se}function Te(Se){Se===void 0&&(Se=ReactReduxContext);var Ce=Se===ReactReduxContext?useDefaultReduxContext:function(){return useContext(Se)};return function(){var Ge=Ce(),mt=Ge.store;return mt}}var Pe=null;function ye(Se){Se===void 0&&(Se=ReactReduxContext);var Ce=Se===ReactReduxContext?useDefaultStore:createStoreHook(Se);return function(){var Ge=Ce();return Ge.dispatch}}var ke=null,$e=function(Ce,De){return Ce===De};function Le(Se,Ce,De,Ge){var mt=useReducer(function(ki){return ki+1},0),gt=mt[1],Ft=useMemo(function(){return createSubscription(De,Ge)},[De,Ge]),jt=useRef(),Cn=useRef(),Wn=useRef(),On=useRef(),Nn=De.getState(),Fn;try{if(Se!==Cn.current||Nn!==Wn.current||jt.current){var qn=Se(Nn);On.current===void 0||!Ce(qn,On.current)?Fn=qn:Fn=On.current}else Fn=On.current}catch(ki){throw jt.current&&(ki.message+=`
|
|
|
The error may be correlated with this previous error:
|
|
|
`+jt.current.stack+`
|
|
|
|
|
|
`),ki}return useIsomorphicLayoutEffect(function(){Cn.current=Se,Wn.current=Nn,On.current=Fn,jt.current=void 0}),useIsomorphicLayoutEffect(function(){function ki(){try{var Vr=De.getState();if(Vr===Wn.current)return;var to=Cn.current(Vr);if(Ce(to,On.current))return;On.current=to,Wn.current=Vr}catch(Po){jt.current=Po}gt()}return Ft.onStateChange=ki,Ft.trySubscribe(),ki(),function(){return Ft.tryUnsubscribe()}},[De,Ft]),Fn}function vt(Se){Se===void 0&&(Se=ReactReduxContext);var Ce=Se===ReactReduxContext?useDefaultReduxContext:function(){return useContext(Se)};return function(Ge,mt){mt===void 0&&(mt=$e);var gt=Ce(),Ft=gt.store,jt=gt.subscription,Cn=Le(Ge,mt,Ft,jt);return useDebugValue(Cn),Cn}}var an=null,bn=me(4676);Ye(bn.unstable_batchedUpdates);function en(Se,Ce){if(Se.length!==Ce.length)return!1;for(var De=0;De<Se.length;De++)if(Se[De]!==Ce[De])return!1;return!0}function wn(Se,Ce){var De=(0,ue.useState)(function(){return{inputs:Ce,result:Se()}})[0],Ge=(0,ue.useRef)(!0),mt=(0,ue.useRef)(De),gt=Ge.current||!!(Ce&&mt.current.inputs&&en(Ce,mt.current.inputs)),Ft=gt?mt.current:{inputs:Ce,result:Se()};return(0,ue.useEffect)(function(){Ge.current=!1,mt.current=Ft},[Ft]),Ft.result}function ai(Se,Ce){return wn(function(){return Se},Ce)}var _n=wn,Hn=ai,wi=!0,Hi="Invariant failed";function _i(Se,Ce){if(!Se){if(wi)throw new Error(Hi);var De=typeof Ce=="function"?Ce():Ce,Ge=De?"".concat(Hi,": ").concat(De):Hi;throw new Error(Ge)}}var cr=function(Ce){var De=Ce.top,Ge=Ce.right,mt=Ce.bottom,gt=Ce.left,Ft=Ge-gt,jt=mt-De,Cn={top:De,right:Ge,bottom:mt,left:gt,width:Ft,height:jt,x:gt,y:De,center:{x:(Ge+gt)/2,y:(mt+De)/2}};return Cn},_r=function(Ce,De){return{top:Ce.top-De.top,left:Ce.left-De.left,bottom:Ce.bottom+De.bottom,right:Ce.right+De.right}},vi=function(Ce,De){return{top:Ce.top+De.top,left:Ce.left+De.left,bottom:Ce.bottom-De.bottom,right:Ce.right-De.right}},si=function(Ce,De){return{top:Ce.top+De.y,left:Ce.left+De.x,bottom:Ce.bottom+De.y,right:Ce.right+De.x}},fi={top:0,right:0,bottom:0,left:0},Ui=function(Ce){var De=Ce.borderBox,Ge=Ce.margin,mt=Ge===void 0?fi:Ge,gt=Ce.border,Ft=gt===void 0?fi:gt,jt=Ce.padding,Cn=jt===void 0?fi:jt,Wn=cr(_r(De,mt)),On=cr(vi(De,Ft)),Nn=cr(vi(On,Cn));return{marginBox:Wn,borderBox:cr(De),paddingBox:On,contentBox:Nn,margin:mt,border:Ft,padding:Cn}},Fi=function(Ce){var De=Ce.slice(0,-2),Ge=Ce.slice(-2);if(Ge!=="px")return 0;var mt=Number(De);return isNaN(mt)&&_i(!1),mt},ao=function(){return{x:window.pageXOffset,y:window.pageYOffset}},wr=function(Ce,De){var Ge=Ce.borderBox,mt=Ce.border,gt=Ce.margin,Ft=Ce.padding,jt=si(Ge,De);return Ui({borderBox:jt,border:mt,margin:gt,padding:Ft})},Be=function(Ce,De){return De===void 0&&(De=ao()),wr(Ce,De)},Xr=function(Ce,De){var Ge={top:Fi(De.marginTop),right:Fi(De.marginRight),bottom:Fi(De.marginBottom),left:Fi(De.marginLeft)},mt={top:Fi(De.paddingTop),right:Fi(De.paddingRight),bottom:Fi(De.paddingBottom),left:Fi(De.paddingLeft)},gt={top:Fi(De.borderTopWidth),right:Fi(De.borderRightWidth),bottom:Fi(De.borderBottomWidth),left:Fi(De.borderLeftWidth)};return Ui({borderBox:Ce,margin:Ge,padding:mt,border:gt})},Hr=function(Ce){var De=Ce.getBoundingClientRect(),Ge=window.getComputedStyle(Ce);return Xr(De,Ge)},jn=Number.isNaN||function(Ce){return typeof Ce=="number"&&Ce!==Ce};function Li(Se,Ce){return!!(Se===Ce||jn(Se)&&jn(Ce))}function Wi(Se,Ce){if(Se.length!==Ce.length)return!1;for(var De=0;De<Se.length;De++)if(!Li(Se[De],Ce[De]))return!1;return!0}function ji(Se,Ce){Ce===void 0&&(Ce=Wi);var De,Ge=[],mt,gt=!1;function Ft(){for(var jt=[],Cn=0;Cn<arguments.length;Cn++)jt[Cn]=arguments[Cn];return gt&&De===this&&Ce(jt,Ge)||(mt=Se.apply(this,jt),gt=!0,De=this,Ge=jt),mt}return Ft}var Gn=ji,Ht=function(Ce){var De=[],Ge=null,mt=function(){for(var Ft=arguments.length,jt=new Array(Ft),Cn=0;Cn<Ft;Cn++)jt[Cn]=arguments[Cn];De=jt,!Ge&&(Ge=requestAnimationFrame(function(){Ge=null,Ce.apply(void 0,De)}))};return mt.cancel=function(){Ge&&(cancelAnimationFrame(Ge),Ge=null)},mt},Wt=Ht,Zt=!0,yt=/[ \t]{2,}/g,un=/^[ \t]*/gm,vn=function(Ce){return Ce.replace(yt," ").replace(un,"").trim()},At=function(Ce){return vn(`
|
|
|
%creact-beautiful-dnd
|
|
|
|
|
|
%c`+vn(Ce)+`
|
|
|
|
|
|
%c\u{1F477}\u200D This is a development only message. It will be removed in production builds.
|
|
|
`)},nt=function(Ce){return[At(Ce),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},on="__react-beautiful-dnd-disable-dev-warnings";function fn(Se,Ce){var De;Zt||typeof window!="undefined"&&window[on]||(De=console)[Se].apply(De,nt(Ce))}var Jn=fn.bind(null,"warn"),pn=fn.bind(null,"error");function Rt(){}function In(Se,Ce){return(0,ot.Z)({},Se,{},Ce)}function Vn(Se,Ce,De){var Ge=Ce.map(function(mt){var gt=In(De,mt.options);return Se.addEventListener(mt.eventName,mt.fn,gt),function(){Se.removeEventListener(mt.eventName,mt.fn,gt)}});return function(){Ge.forEach(function(gt){gt()})}}var Pi=!0,tn="Invariant failed";function hn(Se){this.message=Se}hn.prototype.toString=function(){return this.message};function Rn(Se,Ce){if(!Se)throw Pi?new hn(tn):new hn(tn+": "+(Ce||""))}var Oi=function(Se){Ze(Ce,Se);function Ce(){for(var Ge,mt=arguments.length,gt=new Array(mt),Ft=0;Ft<mt;Ft++)gt[Ft]=arguments[Ft];return Ge=Se.call.apply(Se,[this].concat(gt))||this,Ge.callbacks=null,Ge.unbind=Rt,Ge.onWindowError=function(jt){var Cn=Ge.getCallbacks();Cn.isDragging()&&Cn.tryAbort();var Wn=jt.error;Wn instanceof hn&&jt.preventDefault()},Ge.getCallbacks=function(){if(!Ge.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return Ge.callbacks},Ge.setCallbacks=function(jt){Ge.callbacks=jt},Ge}var De=Ce.prototype;return De.componentDidMount=function(){this.unbind=Vn(window,[{eventName:"error",fn:this.onWindowError}])},De.componentWillUnmount=function(){this.unbind()},De.componentDidCatch=function(mt){if(mt instanceof hn){this.setState({});return}throw mt},De.render=function(){return this.props.children(this.setCallbacks)},Ce}(ue.Component),Ii=`
|
|
|
Press space bar to start a drag.
|
|
|
When dragging you can use the arrow keys to move the item around and escape to cancel.
|
|
|
Some screen readers may require you to be in focus mode or to use your pass through key
|
|
|
`,Si=function(Ce){return Ce+1},Ni=function(Ce){return`
|
|
|
You have lifted an item in position `+Si(Ce.source.index)+`
|
|
|
`},Zi=function(Ce,De){var Ge=Ce.droppableId===De.droppableId,mt=Si(Ce.index),gt=Si(De.index);return Ge?`
|
|
|
You have moved the item from position `+mt+`
|
|
|
to position `+gt+`
|
|
|
`:`
|
|
|
You have moved the item from position `+mt+`
|
|
|
in list `+Ce.droppableId+`
|
|
|
to list `+De.droppableId+`
|
|
|
in position `+gt+`
|
|
|
`},sr=function(Ce,De,Ge){var mt=De.droppableId===Ge.droppableId;return mt?`
|
|
|
The item `+Ce+`
|
|
|
has been combined with `+Ge.draggableId:`
|
|
|
The item `+Ce+`
|
|
|
in list `+De.droppableId+`
|
|
|
has been combined with `+Ge.draggableId+`
|
|
|
in list `+Ge.droppableId+`
|
|
|
`},Wr=function(Ce){var De=Ce.destination;if(De)return Zi(Ce.source,De);var Ge=Ce.combine;return Ge?sr(Ce.draggableId,Ce.source,Ge):"You are over an area that cannot be dropped on"},li=function(Ce){return`
|
|
|
The item has returned to its starting position
|
|
|
of `+Si(Ce.index)+`
|
|
|
`},Vi=function(Ce){if(Ce.reason==="CANCEL")return`
|
|
|
Movement cancelled.
|
|
|
`+li(Ce.source)+`
|
|
|
`;var De=Ce.destination,Ge=Ce.combine;return De?`
|
|
|
You have dropped the item.
|
|
|
`+Zi(Ce.source,De)+`
|
|
|
`:Ge?`
|
|
|
You have dropped the item.
|
|
|
`+sr(Ce.draggableId,Ce.source,Ge)+`
|
|
|
`:`
|
|
|
The item has been dropped while not over a drop area.
|
|
|
`+li(Ce.source)+`
|
|
|
`},vo={dragHandleUsageInstructions:Ii,onDragStart:Ni,onDragUpdate:Wr,onDragEnd:Vi},Qr={x:0,y:0},Er=function(Ce,De){return{x:Ce.x+De.x,y:Ce.y+De.y}},qt=function(Ce,De){return{x:Ce.x-De.x,y:Ce.y-De.y}},pi=function(Ce,De){return Ce.x===De.x&&Ce.y===De.y},pr=function(Ce){return{x:Ce.x!==0?-Ce.x:0,y:Ce.y!==0?-Ce.y:0}},qi=function(Ce,De,Ge){var mt;return Ge===void 0&&(Ge=0),mt={},mt[Ce]=De,mt[Ce==="x"?"y":"x"]=Ge,mt},$r=function(Ce,De){return Math.sqrt(Math.pow(De.x-Ce.x,2)+Math.pow(De.y-Ce.y,2))},Ar=function(Ce,De){return Math.min.apply(Math,De.map(function(Ge){return $r(Ce,Ge)}))},io=function(Ce){return function(De){return{x:Ce(De.x),y:Ce(De.y)}}},Kr=function(Se,Ce){var De=cr({top:Math.max(Ce.top,Se.top),right:Math.min(Ce.right,Se.right),bottom:Math.min(Ce.bottom,Se.bottom),left:Math.max(Ce.left,Se.left)});return De.width<=0||De.height<=0?null:De},jr=function(Ce,De){return{top:Ce.top+De.y,left:Ce.left+De.x,bottom:Ce.bottom+De.y,right:Ce.right+De.x}},yo=function(Ce){return[{x:Ce.left,y:Ce.top},{x:Ce.right,y:Ce.top},{x:Ce.left,y:Ce.bottom},{x:Ce.right,y:Ce.bottom}]},$n={top:0,right:0,bottom:0,left:0},Xo=function(Ce,De){return De?jr(Ce,De.scroll.diff.displacement):Ce},Kn=function(Ce,De,Ge){if(Ge&&Ge.increasedBy){var mt;return(0,ot.Z)({},Ce,(mt={},mt[De.end]=Ce[De.end]+Ge.increasedBy[De.line],mt))}return Ce},Io=function(Ce,De){return De&&De.shouldClipSubject?Kr(De.pageMarginBox,Ce):cr(Ce)},Jo=function(Se){var Ce=Se.page,De=Se.withPlaceholder,Ge=Se.axis,mt=Se.frame,gt=Xo(Ce.marginBox,mt),Ft=Kn(gt,Ge,De),jt=Io(Ft,mt);return{page:Ce,withPlaceholder:De,active:jt}},Yi=function(Se,Ce){Se.frame||Rn(!1);var De=Se.frame,Ge=qt(Ce,De.scroll.initial),mt=pr(Ge),gt=(0,ot.Z)({},De,{scroll:{initial:De.scroll.initial,current:Ce,diff:{value:Ge,displacement:mt},max:De.scroll.max}}),Ft=Jo({page:Se.subject.page,withPlaceholder:Se.subject.withPlaceholder,axis:Se.axis,frame:gt}),jt=(0,ot.Z)({},Se,{frame:gt,subject:Ft});return jt};function ua(Se){return Number.isInteger?Number.isInteger(Se):typeof Se=="number"&&isFinite(Se)&&Math.floor(Se)===Se}function Zo(Se){return Object.values?Object.values(Se):Object.keys(Se).map(function(Ce){return Se[Ce]})}function Dr(Se,Ce){if(Se.findIndex)return Se.findIndex(Ce);for(var De=0;De<Se.length;De++)if(Ce(Se[De]))return De;return-1}function Ir(Se,Ce){if(Se.find)return Se.find(Ce);var De=Dr(Se,Ce);if(De!==-1)return Se[De]}function Do(Se){return Array.prototype.slice.call(Se)}var _o=Gn(function(Se){return Se.reduce(function(Ce,De){return Ce[De.descriptor.id]=De,Ce},{})}),Ti=Gn(function(Se){return Se.reduce(function(Ce,De){return Ce[De.descriptor.id]=De,Ce},{})}),tt=Gn(function(Se){return Zo(Se)}),jo=Gn(function(Se){return Zo(Se)}),Ra=Gn(function(Se,Ce){var De=jo(Ce).filter(function(Ge){return Se===Ge.descriptor.droppableId}).sort(function(Ge,mt){return Ge.descriptor.index-mt.descriptor.index});return De});function $a(Se){return Se.at&&Se.at.type==="REORDER"?Se.at.destination:null}function ls(Se){return Se.at&&Se.at.type==="COMBINE"?Se.at.combine:null}var Or=Gn(function(Se,Ce){return Ce.filter(function(De){return De.descriptor.id!==Se.descriptor.id})}),xo=function(Se){var Ce=Se.isMovingForward,De=Se.draggable,Ge=Se.destination,mt=Se.insideDestination,gt=Se.previousImpact;if(!Ge.isCombineEnabled)return null;var Ft=$a(gt);if(!Ft)return null;function jt(Vr){var to={type:"COMBINE",combine:{draggableId:Vr,droppableId:Ge.descriptor.id}};return(0,ot.Z)({},gt,{at:to})}var Cn=gt.displaced.all,Wn=Cn.length?Cn[0]:null;if(Ce)return Wn?jt(Wn):null;var On=Or(De,mt);if(!Wn){if(!On.length)return null;var Nn=On[On.length-1];return jt(Nn.descriptor.id)}var Fn=Dr(On,function(Vr){return Vr.descriptor.id===Wn});Fn===-1&&Rn(!1);var qn=Fn-1;if(qn<0)return null;var ki=On[qn];return jt(ki.descriptor.id)},na=function(Se,Ce){return Se.descriptor.droppableId===Ce.descriptor.id},Da={point:Qr,value:0},Ao={invisible:{},visible:{},all:[]},Va={displaced:Ao,displacedBy:Da,at:null},Jr=function(Se,Ce){return function(De){return Se<=De&&De<=Ce}},eo=function(Se){var Ce=Jr(Se.top,Se.bottom),De=Jr(Se.left,Se.right);return function(Ge){var mt=Ce(Ge.top)&&Ce(Ge.bottom)&&De(Ge.left)&&De(Ge.right);if(mt)return!0;var gt=Ce(Ge.top)||Ce(Ge.bottom),Ft=De(Ge.left)||De(Ge.right),jt=gt&&Ft;if(jt)return!0;var Cn=Ge.top<Se.top&&Ge.bottom>Se.bottom,Wn=Ge.left<Se.left&&Ge.right>Se.right,On=Cn&&Wn;if(On)return!0;var Nn=Cn&&Ft||Wn&>return Nn}},Eo=function(Se){var Ce=Jr(Se.top,Se.bottom),De=Jr(Se.left,Se.right);return function(Ge){var mt=Ce(Ge.top)&&Ce(Ge.bottom)&&De(Ge.left)&&De(Ge.right);return mt}},ci={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},xa={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},za=function(Se){return function(Ce){var De=Jr(Ce.top,Ce.bottom),Ge=Jr(Ce.left,Ce.right);return function(mt){return Se===ci?De(mt.top)&&De(mt.bottom):Ge(mt.left)&&Ge(mt.right)}}},xs=function(Ce,De){var Ge=De.frame?De.frame.scroll.diff.displacement:Qr;return jr(Ce,Ge)},ho=function(Ce,De,Ge){return De.subject.active?Ge(De.subject.active)(Ce):!1},ca=function(Ce,De,Ge){return Ge(De)(Ce)},ja=function(Ce){var De=Ce.target,Ge=Ce.destination,mt=Ce.viewport,gt=Ce.withDroppableDisplacement,Ft=Ce.isVisibleThroughFrameFn,jt=gt?xs(De,Ge):De;return ho(jt,Ge,Ft)&&ca(jt,mt,Ft)},hs=function(Ce){return ja((0,ot.Z)({},Ce,{isVisibleThroughFrameFn:eo}))},fs=function(Ce){return ja((0,ot.Z)({},Ce,{isVisibleThroughFrameFn:Eo}))},ll=function(Ce){return ja((0,ot.Z)({},Ce,{isVisibleThroughFrameFn:za(Ce.destination.axis)}))},Ys=function(Ce,De,Ge){if(typeof Ge=="boolean")return Ge;if(!De)return!0;var mt=De.invisible,gt=De.visible;if(mt[Ce])return!1;var Ft=gt[Ce];return Ft?Ft.shouldAnimate:!0};function Bn(Se,Ce){var De=Se.page.marginBox,Ge={top:Ce.point.y,right:0,bottom:0,left:Ce.point.x};return cr(_r(De,Ge))}function Es(Se){var Ce=Se.afterDragging,De=Se.destination,Ge=Se.displacedBy,mt=Se.viewport,gt=Se.forceShouldAnimate,Ft=Se.last;return Ce.reduce(function(Cn,Wn){var On=Bn(Wn,Ge),Nn=Wn.descriptor.id;Cn.all.push(Nn);var Fn=hs({target:On,destination:De,viewport:mt,withDroppableDisplacement:!0});if(!Fn)return Cn.invisible[Wn.descriptor.id]=!0,Cn;var qn=Ys(Nn,Ft,gt),ki={draggableId:Nn,shouldAnimate:qn};return Cn.visible[Nn]=ki,Cn},{all:[],visible:{},invisible:{}})}function Pl(Se,Ce){if(!Se.length)return 0;var De=Se[Se.length-1].descriptor.index;return Ce.inHomeList?De:De+1}function Wl(Se){var Ce=Se.insideDestination,De=Se.inHomeList,Ge=Se.displacedBy,mt=Se.destination,gt=Pl(Ce,{inHomeList:De});return{displaced:Ao,displacedBy:Ge,at:{type:"REORDER",destination:{droppableId:mt.descriptor.id,index:gt}}}}function Mo(Se){var Ce=Se.draggable,De=Se.insideDestination,Ge=Se.destination,mt=Se.viewport,gt=Se.displacedBy,Ft=Se.last,jt=Se.index,Cn=Se.forceShouldAnimate,Wn=na(Ce,Ge);if(jt==null)return Wl({insideDestination:De,inHomeList:Wn,displacedBy:gt,destination:Ge});var On=Ir(De,function(Vr){return Vr.descriptor.index===jt});if(!On)return Wl({insideDestination:De,inHomeList:Wn,displacedBy:gt,destination:Ge});var Nn=Or(Ce,De),Fn=De.indexOf(On),qn=Nn.slice(Fn),ki=Es({afterDragging:qn,destination:Ge,displacedBy:gt,last:Ft,viewport:mt.frame,forceShouldAnimate:Cn});return{displaced:ki,displacedBy:gt,at:{type:"REORDER",destination:{droppableId:Ge.descriptor.id,index:jt}}}}function gl(Se,Ce){return!!Ce.effected[Se]}var Tu=function(Se){var Ce=Se.isMovingForward,De=Se.destination,Ge=Se.draggables,mt=Se.combine,gt=Se.afterCritical;if(!De.isCombineEnabled)return null;var Ft=mt.draggableId,jt=Ge[Ft],Cn=jt.descriptor.index,Wn=gl(Ft,gt);return Wn?Ce?Cn:Cn-1:Ce?Cn+1:Cn},Ql=function(Se){var Ce=Se.isMovingForward,De=Se.isInHomeList,Ge=Se.insideDestination,mt=Se.location;if(!Ge.length)return null;var gt=mt.index,Ft=Ce?gt+1:gt-1,jt=Ge[0].descriptor.index,Cn=Ge[Ge.length-1].descriptor.index,Wn=De?Cn:Cn+1;return Ft<jt||Ft>Wn?null:Ft},us=function(Se){var Ce=Se.isMovingForward,De=Se.isInHomeList,Ge=Se.draggable,mt=Se.draggables,gt=Se.destination,Ft=Se.insideDestination,jt=Se.previousImpact,Cn=Se.viewport,Wn=Se.afterCritical,On=jt.at;if(On||Rn(!1),On.type==="REORDER"){var Nn=Ql({isMovingForward:Ce,isInHomeList:De,location:On.destination,insideDestination:Ft});return Nn==null?null:Mo({draggable:Ge,insideDestination:Ft,destination:gt,viewport:Cn,last:jt.displaced,displacedBy:jt.displacedBy,index:Nn})}var Fn=Tu({isMovingForward:Ce,destination:gt,displaced:jt.displaced,draggables:mt,combine:On.combine,afterCritical:Wn});return Fn==null?null:Mo({draggable:Ge,insideDestination:Ft,destination:gt,viewport:Cn,last:jt.displaced,displacedBy:jt.displacedBy,index:Fn})},Sa=function(Se){var Ce=Se.displaced,De=Se.afterCritical,Ge=Se.combineWith,mt=Se.displacedBy,gt=!!(Ce.visible[Ge]||Ce.invisible[Ge]);return gl(Ge,De)?gt?Qr:pr(mt.point):gt?mt.point:Qr},Il=function(Se){var Ce=Se.afterCritical,De=Se.impact,Ge=Se.draggables,mt=ls(De);mt||Rn(!1);var gt=mt.draggableId,Ft=Ge[gt].page.borderBox.center,jt=Sa({displaced:De.displaced,afterCritical:Ce,combineWith:gt,displacedBy:De.displacedBy});return Er(Ft,jt)},Wo=function(Ce,De){return De.margin[Ce.start]+De.borderBox[Ce.size]/2},Ia=function(Ce,De){return De.margin[Ce.end]+De.borderBox[Ce.size]/2},aa=function(Ce,De,Ge){return De[Ce.crossAxisStart]+Ge.margin[Ce.crossAxisStart]+Ge.borderBox[Ce.crossAxisSize]/2},or=function(Ce){var De=Ce.axis,Ge=Ce.moveRelativeTo,mt=Ce.isMoving;return qi(De.line,Ge.marginBox[De.end]+Wo(De,mt),aa(De,Ge.marginBox,mt))},_s=function(Ce){var De=Ce.axis,Ge=Ce.moveRelativeTo,mt=Ce.isMoving;return qi(De.line,Ge.marginBox[De.start]-Ia(De,mt),aa(De,Ge.marginBox,mt))},js=function(Ce){var De=Ce.axis,Ge=Ce.moveInto,mt=Ce.isMoving;return qi(De.line,Ge.contentBox[De.start]+Wo(De,mt),aa(De,Ge.contentBox,mt))},pl=function(Se){var Ce=Se.impact,De=Se.draggable,Ge=Se.draggables,mt=Se.droppable,gt=Se.afterCritical,Ft=Ra(mt.descriptor.id,Ge),jt=De.page,Cn=mt.axis;if(!Ft.length)return js({axis:Cn,moveInto:mt.page,isMoving:jt});var Wn=Ce.displaced,On=Ce.displacedBy,Nn=Wn.all[0];if(Nn){var Fn=Ge[Nn];if(gl(Nn,gt))return _s({axis:Cn,moveRelativeTo:Fn.page,isMoving:jt});var qn=wr(Fn.page,On.point);return _s({axis:Cn,moveRelativeTo:qn,isMoving:jt})}var ki=Ft[Ft.length-1];if(ki.descriptor.id===De.descriptor.id)return jt.borderBox.center;if(gl(ki.descriptor.id,gt)){var Vr=wr(ki.page,pr(gt.displacedBy.point));return or({axis:Cn,moveRelativeTo:Vr,isMoving:jt})}return or({axis:Cn,moveRelativeTo:ki.page,isMoving:jt})},Xs=function(Se,Ce){var De=Se.frame;return De?Er(Ce,De.scroll.diff.displacement):Ce},hu=function(Ce){var De=Ce.impact,Ge=Ce.draggable,mt=Ce.droppable,gt=Ce.draggables,Ft=Ce.afterCritical,jt=Ge.page.borderBox.center,Cn=De.at;return!mt||!Cn?jt:Cn.type==="REORDER"?pl({impact:De,draggable:Ge,draggables:gt,droppable:mt,afterCritical:Ft}):Il({impact:De,draggables:gt,afterCritical:Ft})},er=function(Se){var Ce=hu(Se),De=Se.droppable,Ge=De?Xs(De,Ce):Ce;return Ge},Ss=function(Se,Ce){var De=qt(Ce,Se.scroll.initial),Ge=pr(De),mt=cr({top:Ce.y,bottom:Ce.y+Se.frame.height,left:Ce.x,right:Ce.x+Se.frame.width}),gt={frame:mt,scroll:{initial:Se.scroll.initial,max:Se.scroll.max,current:Ce,diff:{value:De,displacement:Ge}}};return gt};function Ws(Se,Ce){return Se.map(function(De){return Ce[De]})}function su(Se,Ce){for(var De=0;De<Ce.length;De++){var Ge=Ce[De].visible[Se];if(Ge)return Ge}return null}var fu=function(Se){var Ce=Se.impact,De=Se.viewport,Ge=Se.destination,mt=Se.draggables,gt=Se.maxScrollChange,Ft=Ss(De,Er(De.scroll.current,gt)),jt=Ge.frame?Yi(Ge,Er(Ge.frame.scroll.current,gt)):Ge,Cn=Ce.displaced,Wn=Es({afterDragging:Ws(Cn.all,mt),destination:Ge,displacedBy:Ce.displacedBy,viewport:Ft.frame,last:Cn,forceShouldAnimate:!1}),On=Es({afterDragging:Ws(Cn.all,mt),destination:jt,displacedBy:Ce.displacedBy,viewport:De.frame,last:Cn,forceShouldAnimate:!1}),Nn={},Fn={},qn=[Cn,Wn,On];Cn.all.forEach(function(Vr){var to=su(Vr,qn);if(to){Fn[Vr]=to;return}Nn[Vr]=!0});var ki=(0,ot.Z)({},Ce,{displaced:{all:Cn.all,invisible:Nn,visible:Fn}});return ki},lu=function(Se,Ce){return Er(Se.scroll.diff.displacement,Ce)},Oo=function(Se){var Ce=Se.pageBorderBoxCenter,De=Se.draggable,Ge=Se.viewport,mt=lu(Ge,Ce),gt=qt(mt,De.page.borderBox.center);return Er(De.client.borderBox.center,gt)},Ru=function(Se){var Ce=Se.draggable,De=Se.destination,Ge=Se.newPageBorderBoxCenter,mt=Se.viewport,gt=Se.withDroppableDisplacement,Ft=Se.onlyOnMainAxis,jt=Ft===void 0?!1:Ft,Cn=qt(Ge,Ce.page.borderBox.center),Wn=jr(Ce.page.borderBox,Cn),On={target:Wn,destination:De,withDroppableDisplacement:gt,viewport:mt};return jt?ll(On):fs(On)},ul=function(Se){var Ce=Se.isMovingForward,De=Se.draggable,Ge=Se.destination,mt=Se.draggables,gt=Se.previousImpact,Ft=Se.viewport,jt=Se.previousPageBorderBoxCenter,Cn=Se.previousClientSelection,Wn=Se.afterCritical;if(!Ge.isEnabled)return null;var On=Ra(Ge.descriptor.id,mt),Nn=na(De,Ge),Fn=xo({isMovingForward:Ce,draggable:De,destination:Ge,insideDestination:On,previousImpact:gt})||us({isMovingForward:Ce,isInHomeList:Nn,draggable:De,draggables:mt,destination:Ge,insideDestination:On,previousImpact:gt,viewport:Ft,afterCritical:Wn});if(!Fn)return null;var qn=er({impact:Fn,draggable:De,droppable:Ge,draggables:mt,afterCritical:Wn}),ki=Ru({draggable:De,destination:Ge,newPageBorderBoxCenter:qn,viewport:Ft.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(ki){var Vr=Oo({pageBorderBoxCenter:qn,draggable:De,viewport:Ft});return{clientSelection:Vr,impact:Fn,scrollJumpRequest:null}}var to=qt(qn,jt),Po=fu({impact:Fn,viewport:Ft,destination:Ge,draggables:mt,maxScrollChange:to});return{clientSelection:Cn,impact:Po,scrollJumpRequest:to}},zs=function(Ce){var De=Ce.subject.active;return De||Rn(!1),De},wl=function(Se){var Ce=Se.isMovingForward,De=Se.pageBorderBoxCenter,Ge=Se.source,mt=Se.droppables,gt=Se.viewport,Ft=Ge.subject.active;if(!Ft)return null;var jt=Ge.axis,Cn=Jr(Ft[jt.start],Ft[jt.end]),Wn=tt(mt).filter(function(Nn){return Nn!==Ge}).filter(function(Nn){return Nn.isEnabled}).filter(function(Nn){return!!Nn.subject.active}).filter(function(Nn){return eo(gt.frame)(zs(Nn))}).filter(function(Nn){var Fn=zs(Nn);return Ce?Ft[jt.crossAxisEnd]<Fn[jt.crossAxisEnd]:Fn[jt.crossAxisStart]<Ft[jt.crossAxisStart]}).filter(function(Nn){var Fn=zs(Nn),qn=Jr(Fn[jt.start],Fn[jt.end]);return Cn(Fn[jt.start])||Cn(Fn[jt.end])||qn(Ft[jt.start])||qn(Ft[jt.end])}).sort(function(Nn,Fn){var qn=zs(Nn)[jt.crossAxisStart],ki=zs(Fn)[jt.crossAxisStart];return Ce?qn-ki:ki-qn}).filter(function(Nn,Fn,qn){return zs(Nn)[jt.crossAxisStart]===zs(qn[0])[jt.crossAxisStart]});if(!Wn.length)return null;if(Wn.length===1)return Wn[0];var On=Wn.filter(function(Nn){var Fn=Jr(zs(Nn)[jt.start],zs(Nn)[jt.end]);return Fn(De[jt.line])});return On.length===1?On[0]:On.length>1?On.sort(function(Nn,Fn){return zs(Nn)[jt.start]-zs(Fn)[jt.start]})[0]:Wn.sort(function(Nn,Fn){var qn=Ar(De,yo(zs(Nn))),ki=Ar(De,yo(zs(Fn)));return qn!==ki?qn-ki:zs(Nn)[jt.start]-zs(Fn)[jt.start]})[0]},kn=function(Ce,De){var Ge=Ce.page.borderBox.center;return gl(Ce.descriptor.id,De)?qt(Ge,De.displacedBy.point):Ge},Tn=function(Ce,De){var Ge=Ce.page.borderBox;return gl(Ce.descriptor.id,De)?jr(Ge,pr(De.displacedBy.point)):Ge},Qn=function(Se){var Ce=Se.pageBorderBoxCenter,De=Se.viewport,Ge=Se.destination,mt=Se.insideDestination,gt=Se.afterCritical,Ft=mt.filter(function(jt){return fs({target:Tn(jt,gt),destination:Ge,viewport:De.frame,withDroppableDisplacement:!0})}).sort(function(jt,Cn){var Wn=$r(Ce,Xs(Ge,kn(jt,gt))),On=$r(Ce,Xs(Ge,kn(Cn,gt)));return Wn<On?-1:On<Wn?1:jt.descriptor.index-Cn.descriptor.index});return Ft[0]||null},zi=Gn(function(Ce,De){var Ge=De[Ce.line];return{value:Ge,point:qi(Ce.line,Ge)}}),Xi=function(Ce,De,Ge){var mt=Ce.axis;if(Ce.descriptor.mode==="virtual")return qi(mt.line,De[mt.line]);var gt=Ce.subject.page.contentBox[mt.size],Ft=Ra(Ce.descriptor.id,Ge),jt=Ft.reduce(function(On,Nn){return On+Nn.client.marginBox[mt.size]},0),Cn=jt+De[mt.line],Wn=Cn-gt;return Wn<=0?null:qi(mt.line,Wn)},$i=function(Ce,De){return(0,ot.Z)({},Ce,{scroll:(0,ot.Z)({},Ce.scroll,{max:De})})},Ri=function(Ce,De,Ge){var mt=Ce.frame;na(De,Ce)&&Rn(!1),Ce.subject.withPlaceholder&&Rn(!1);var gt=zi(Ce.axis,De.displaceBy).point,Ft=Xi(Ce,gt,Ge),jt={placeholderSize:gt,increasedBy:Ft,oldFrameMaxScroll:Ce.frame?Ce.frame.scroll.max:null};if(!mt){var Cn=Jo({page:Ce.subject.page,withPlaceholder:jt,axis:Ce.axis,frame:Ce.frame});return(0,ot.Z)({},Ce,{subject:Cn})}var Wn=Ft?Er(mt.scroll.max,Ft):mt.scroll.max,On=$i(mt,Wn),Nn=Jo({page:Ce.subject.page,withPlaceholder:jt,axis:Ce.axis,frame:On});return(0,ot.Z)({},Ce,{subject:Nn,frame:On})},ri=function(Ce){var De=Ce.subject.withPlaceholder;De||Rn(!1);var Ge=Ce.frame;if(!Ge){var mt=Jo({page:Ce.subject.page,axis:Ce.axis,frame:null,withPlaceholder:null});return(0,ot.Z)({},Ce,{subject:mt})}var gt=De.oldFrameMaxScroll;gt||Rn(!1);var Ft=$i(Ge,gt),jt=Jo({page:Ce.subject.page,axis:Ce.axis,frame:Ft,withPlaceholder:null});return(0,ot.Z)({},Ce,{subject:jt,frame:Ft})},yi=function(Se){var Ce=Se.previousPageBorderBoxCenter,De=Se.moveRelativeTo,Ge=Se.insideDestination,mt=Se.draggable,gt=Se.draggables,Ft=Se.destination,jt=Se.viewport,Cn=Se.afterCritical;if(!De){if(Ge.length)return null;var Wn={displaced:Ao,displacedBy:Da,at:{type:"REORDER",destination:{droppableId:Ft.descriptor.id,index:0}}},On=er({impact:Wn,draggable:mt,droppable:Ft,draggables:gt,afterCritical:Cn}),Nn=na(mt,Ft)?Ft:Ri(Ft,mt,gt),Fn=Ru({draggable:mt,destination:Nn,newPageBorderBoxCenter:On,viewport:jt.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return Fn?Wn:null}var qn=Ce[Ft.axis.line]<=De.page.borderBox.center[Ft.axis.line],ki=function(){var to=De.descriptor.index;return De.descriptor.id===mt.descriptor.id||qn?to:to+1}(),Vr=zi(Ft.axis,mt.displaceBy);return Mo({draggable:mt,insideDestination:Ge,destination:Ft,viewport:jt,displacedBy:Vr,last:Ao,index:ki})},Ji=function(Se){var Ce=Se.isMovingForward,De=Se.previousPageBorderBoxCenter,Ge=Se.draggable,mt=Se.isOver,gt=Se.draggables,Ft=Se.droppables,jt=Se.viewport,Cn=Se.afterCritical,Wn=wl({isMovingForward:Ce,pageBorderBoxCenter:De,source:mt,droppables:Ft,viewport:jt});if(!Wn)return null;var On=Ra(Wn.descriptor.id,gt),Nn=Qn({pageBorderBoxCenter:De,viewport:jt,destination:Wn,insideDestination:On,afterCritical:Cn}),Fn=yi({previousPageBorderBoxCenter:De,destination:Wn,draggable:Ge,draggables:gt,moveRelativeTo:Nn,insideDestination:On,viewport:jt,afterCritical:Cn});if(!Fn)return null;var qn=er({impact:Fn,draggable:Ge,droppable:Wn,draggables:gt,afterCritical:Cn}),ki=Oo({pageBorderBoxCenter:qn,draggable:Ge,viewport:jt});return{clientSelection:ki,impact:Fn,scrollJumpRequest:null}},mr=function(Se){var Ce=Se.at;return Ce?Ce.type==="REORDER"?Ce.destination.droppableId:Ce.combine.droppableId:null},sa=function(Ce,De){var Ge=mr(Ce);return Ge?De[Ge]:null},Ma=function(Se){var Ce=Se.state,De=Se.type,Ge=sa(Ce.impact,Ce.dimensions.droppables),mt=!!Ge,gt=Ce.dimensions.droppables[Ce.critical.droppable.id],Ft=Ge||gt,jt=Ft.axis.direction,Cn=jt==="vertical"&&(De==="MOVE_UP"||De==="MOVE_DOWN")||jt==="horizontal"&&(De==="MOVE_LEFT"||De==="MOVE_RIGHT");if(Cn&&!mt)return null;var Wn=De==="MOVE_DOWN"||De==="MOVE_RIGHT",On=Ce.dimensions.draggables[Ce.critical.draggable.id],Nn=Ce.current.page.borderBoxCenter,Fn=Ce.dimensions,qn=Fn.draggables,ki=Fn.droppables;return Cn?ul({isMovingForward:Wn,previousPageBorderBoxCenter:Nn,draggable:On,destination:Ft,draggables:qn,viewport:Ce.viewport,previousClientSelection:Ce.current.client.selection,previousImpact:Ce.impact,afterCritical:Ce.afterCritical}):Ji({isMovingForward:Wn,previousPageBorderBoxCenter:Nn,draggable:On,isOver:Ft,draggables:qn,droppables:ki,viewport:Ce.viewport,afterCritical:Ce.afterCritical})};function Qt(Se){return Se.phase==="DRAGGING"||Se.phase==="COLLECTING"}function cn(Se){var Ce=Jr(Se.top,Se.bottom),De=Jr(Se.left,Se.right);return function(mt){return Ce(mt.y)&&De(mt.x)}}function Jt(Se,Ce){return Se.left<Ce.right&&Se.right>Ce.left&&Se.top<Ce.bottom&&Se.bottom>Ce.top}function dn(Se){var Ce=Se.pageBorderBox,De=Se.draggable,Ge=Se.candidates,mt=De.page.borderBox.center,gt=Ge.map(function(Ft){var jt=Ft.axis,Cn=qi(Ft.axis.line,Ce.center[jt.line],Ft.page.borderBox.center[jt.crossAxisLine]);return{id:Ft.descriptor.id,distance:$r(mt,Cn)}}).sort(function(Ft,jt){return jt.distance-Ft.distance});return gt[0]?gt[0].id:null}function xi(Se){var Ce=Se.pageBorderBox,De=Se.draggable,Ge=Se.droppables,mt=tt(Ge).filter(function(gt){if(!gt.isEnabled)return!1;var Ft=gt.subject.active;if(!Ft||!Jt(Ce,Ft))return!1;if(cn(Ft)(Ce.center))return!0;var jt=gt.axis,Cn=Ft.center[jt.crossAxisLine],Wn=Ce[jt.crossAxisStart],On=Ce[jt.crossAxisEnd],Nn=Jr(Ft[jt.crossAxisStart],Ft[jt.crossAxisEnd]),Fn=Nn(Wn),qn=Nn(On);return!Fn&&!qn?!0:Fn?Wn<Cn:On>Cn});return mt.length?mt.length===1?mt[0].descriptor.id:dn({pageBorderBox:Ce,draggable:De,candidates:mt}):null}var tr=function(Ce,De){return cr(jr(Ce,De))},yr=function(Se,Ce){var De=Se.frame;return De?tr(Ce,De.scroll.diff.value):Ce};function vr(Se){var Ce=Se.displaced,De=Se.id;return!!(Ce.visible[De]||Ce.invisible[De])}function br(Se){var Ce=Se.draggable,De=Se.closest,Ge=Se.inHomeList;return De?Ge&&De.descriptor.index>Ce.descriptor.index?De.descriptor.index-1:De.descriptor.index:null}var Lr=function(Se){var Ce=Se.pageBorderBoxWithDroppableScroll,De=Se.draggable,Ge=Se.destination,mt=Se.insideDestination,gt=Se.last,Ft=Se.viewport,jt=Se.afterCritical,Cn=Ge.axis,Wn=zi(Ge.axis,De.displaceBy),On=Wn.value,Nn=Ce[Cn.start],Fn=Ce[Cn.end],qn=Or(De,mt),ki=Ir(qn,function(to){var Po=to.descriptor.id,To=to.page.borderBox.center[Cn.line],ea=gl(Po,jt),Uo=vr({displaced:gt,id:Po});return ea?Uo?Fn<=To:Nn<To-On:Uo?Fn<=To+On:Nn<To}),Vr=br({draggable:De,closest:ki,inHomeList:na(De,Ge)});return Mo({draggable:De,insideDestination:mt,destination:Ge,viewport:Ft,last:gt,displacedBy:Wn,index:Vr})},Mr=4,zr=function(Se){var Ce=Se.draggable,De=Se.pageBorderBoxWithDroppableScroll,Ge=Se.previousImpact,mt=Se.destination,gt=Se.insideDestination,Ft=Se.afterCritical;if(!mt.isCombineEnabled)return null;var jt=mt.axis,Cn=zi(mt.axis,Ce.displaceBy),Wn=Cn.value,On=De[jt.start],Nn=De[jt.end],Fn=Or(Ce,gt),qn=Ir(Fn,function(Vr){var to=Vr.descriptor.id,Po=Vr.page.borderBox,To=Po[jt.size],ea=To/Mr,Uo=gl(to,Ft),Fa=vr({displaced:Ge.displaced,id:to});return Uo?Fa?Nn>Po[jt.start]+ea&&Nn<Po[jt.end]-ea:On>Po[jt.start]-Wn+ea&&On<Po[jt.end]-Wn-ea:Fa?Nn>Po[jt.start]+Wn+ea&&Nn<Po[jt.end]+Wn-ea:On>Po[jt.start]+ea&&On<Po[jt.end]-ea});if(!qn)return null;var ki={displacedBy:Cn,displaced:Ge.displaced,at:{type:"COMBINE",combine:{draggableId:qn.descriptor.id,droppableId:mt.descriptor.id}}};return ki},Sr=function(Se){var Ce=Se.pageOffset,De=Se.draggable,Ge=Se.draggables,mt=Se.droppables,gt=Se.previousImpact,Ft=Se.viewport,jt=Se.afterCritical,Cn=tr(De.page.borderBox,Ce),Wn=xi({pageBorderBox:Cn,draggable:De,droppables:mt});if(!Wn)return Va;var On=mt[Wn],Nn=Ra(On.descriptor.id,Ge),Fn=yr(On,Cn);return zr({pageBorderBoxWithDroppableScroll:Fn,draggable:De,previousImpact:gt,destination:On,insideDestination:Nn,afterCritical:jt})||Lr({pageBorderBoxWithDroppableScroll:Fn,draggable:De,destination:On,insideDestination:Nn,last:gt.displaced,viewport:Ft,afterCritical:jt})},Tr=function(Se,Ce){var De;return(0,ot.Z)({},Se,(De={},De[Ce.descriptor.id]=Ce,De))},ro=function(Ce){var De=Ce.previousImpact,Ge=Ce.impact,mt=Ce.droppables,gt=mr(De),Ft=mr(Ge);if(!gt||gt===Ft)return mt;var jt=mt[gt];if(!jt.subject.withPlaceholder)return mt;var Cn=ri(jt);return Tr(mt,Cn)},ia=function(Se){var Ce=Se.draggable,De=Se.draggables,Ge=Se.droppables,mt=Se.previousImpact,gt=Se.impact,Ft=ro({previousImpact:mt,impact:gt,droppables:Ge}),jt=mr(gt);if(!jt)return Ft;var Cn=Ge[jt];if(na(Ce,Cn)||Cn.subject.withPlaceholder)return Ft;var Wn=Ri(Cn,Ce,De);return Tr(Ft,Wn)},da=function(Se){var Ce=Se.state,De=Se.clientSelection,Ge=Se.dimensions,mt=Se.viewport,gt=Se.impact,Ft=Se.scrollJumpRequest,jt=mt||Ce.viewport,Cn=Ge||Ce.dimensions,Wn=De||Ce.current.client.selection,On=qt(Wn,Ce.initial.client.selection),Nn={offset:On,selection:Wn,borderBoxCenter:Er(Ce.initial.client.borderBoxCenter,On)},Fn={selection:Er(Nn.selection,jt.scroll.current),borderBoxCenter:Er(Nn.borderBoxCenter,jt.scroll.current),offset:Er(Nn.offset,jt.scroll.diff.value)},qn={client:Nn,page:Fn};if(Ce.phase==="COLLECTING")return(0,ot.Z)({phase:"COLLECTING"},Ce,{dimensions:Cn,viewport:jt,current:qn});var ki=Cn.draggables[Ce.critical.draggable.id],Vr=gt||Sr({pageOffset:Fn.offset,draggable:ki,draggables:Cn.draggables,droppables:Cn.droppables,previousImpact:Ce.impact,viewport:jt,afterCritical:Ce.afterCritical}),to=ia({draggable:ki,impact:Vr,previousImpact:Ce.impact,draggables:Cn.draggables,droppables:Cn.droppables}),Po=(0,ot.Z)({},Ce,{current:qn,dimensions:{draggables:Cn.draggables,droppables:to},impact:Vr,viewport:jt,scrollJumpRequest:Ft||null,forceShouldAnimate:Ft?!1:null});return Po};function ur(Se,Ce){return Se.map(function(De){return Ce[De]})}var Go=function(Se){var Ce=Se.impact,De=Se.viewport,Ge=Se.draggables,mt=Se.destination,gt=Se.forceShouldAnimate,Ft=Ce.displaced,jt=ur(Ft.all,Ge),Cn=Es({afterDragging:jt,destination:mt,displacedBy:Ce.displacedBy,viewport:De.frame,forceShouldAnimate:gt,last:Ft});return(0,ot.Z)({},Ce,{displaced:Cn})},_t=function(Se){var Ce=Se.impact,De=Se.draggable,Ge=Se.droppable,mt=Se.draggables,gt=Se.viewport,Ft=Se.afterCritical,jt=er({impact:Ce,draggable:De,draggables:mt,droppable:Ge,afterCritical:Ft});return Oo({pageBorderBoxCenter:jt,draggable:De,viewport:gt})},Zn=function(Se){var Ce=Se.state,De=Se.dimensions,Ge=Se.viewport;Ce.movementMode!=="SNAP"&&Rn(!1);var mt=Ce.impact,gt=Ge||Ce.viewport,Ft=De||Ce.dimensions,jt=Ft.draggables,Cn=Ft.droppables,Wn=jt[Ce.critical.draggable.id],On=mr(mt);On||Rn(!1);var Nn=Cn[On],Fn=Go({impact:mt,viewport:gt,destination:Nn,draggables:jt}),qn=_t({impact:Fn,draggable:Wn,droppable:Nn,draggables:jt,viewport:gt,afterCritical:Ce.afterCritical});return da({impact:Fn,clientSelection:qn,state:Ce,dimensions:Ft,viewport:gt})},Fr=function(Se){return{index:Se.index,droppableId:Se.droppableId}},Ai=function(Se){var Ce=Se.draggable,De=Se.home,Ge=Se.draggables,mt=Se.viewport,gt=zi(De.axis,Ce.displaceBy),Ft=Ra(De.descriptor.id,Ge),jt=Ft.indexOf(Ce);jt===-1&&Rn(!1);var Cn=Ft.slice(jt+1),Wn=Cn.reduce(function(qn,ki){return qn[ki.descriptor.id]=!0,qn},{}),On={inVirtualList:De.descriptor.mode==="virtual",displacedBy:gt,effected:Wn},Nn=Es({afterDragging:Cn,destination:De,displacedBy:gt,last:null,viewport:mt.frame,forceShouldAnimate:!1}),Fn={displaced:Nn,displacedBy:gt,at:{type:"REORDER",destination:Fr(Ce.descriptor)}};return{impact:Fn,afterCritical:On}},Ki=function(Se,Ce){return{draggables:Se.draggables,droppables:Tr(Se.droppables,Ce)}},ir=function(Ce){},no=function(Ce){},Lo=function(Se){var Ce=Se.draggable,De=Se.offset,Ge=Se.initialWindowScroll,mt=wr(Ce.client,De),gt=Be(mt,Ge),Ft=(0,ot.Z)({},Ce,{placeholder:(0,ot.Z)({},Ce.placeholder,{client:mt}),client:mt,page:gt});return Ft},nr=function(Se){var Ce=Se.frame;return Ce||Rn(!1),Ce},Zr=function(Se){var Ce=Se.additions,De=Se.updatedDroppables,Ge=Se.viewport,mt=Ge.scroll.diff.value;return Ce.map(function(gt){var Ft=gt.descriptor.droppableId,jt=De[Ft],Cn=nr(jt),Wn=Cn.scroll.diff.value,On=Er(mt,Wn),Nn=Lo({draggable:gt,offset:On,initialWindowScroll:Ge.scroll.initial});return Nn})},Mi=function(Se){var Ce=Se.state,De=Se.published;ir();var Ge=De.modified.map(function(ea){var Uo=Ce.dimensions.droppables[ea.droppableId],Fa=Yi(Uo,ea.scroll);return Fa}),mt=(0,ot.Z)({},Ce.dimensions.droppables,{},_o(Ge)),gt=Ti(Zr({additions:De.additions,updatedDroppables:mt,viewport:Ce.viewport})),Ft=(0,ot.Z)({},Ce.dimensions.draggables,{},gt);De.removals.forEach(function(ea){delete Ft[ea]});var jt={droppables:mt,draggables:Ft},Cn=mr(Ce.impact),Wn=Cn?jt.droppables[Cn]:null,On=jt.draggables[Ce.critical.draggable.id],Nn=jt.droppables[Ce.critical.droppable.id],Fn=Ai({draggable:On,home:Nn,draggables:Ft,viewport:Ce.viewport}),qn=Fn.impact,ki=Fn.afterCritical,Vr=Wn&&Wn.isCombineEnabled?Ce.impact:qn,to=Sr({pageOffset:Ce.current.page.offset,draggable:jt.draggables[Ce.critical.draggable.id],draggables:jt.draggables,droppables:jt.droppables,previousImpact:Vr,viewport:Ce.viewport,afterCritical:ki});no();var Po=(0,ot.Z)({phase:"DRAGGING"},Ce,{phase:"DRAGGING",impact:to,onLiftImpact:qn,dimensions:jt,afterCritical:ki,forceShouldAnimate:!1});if(Ce.phase==="COLLECTING")return Po;var To=(0,ot.Z)({phase:"DROP_PENDING"},Po,{phase:"DROP_PENDING",reason:Ce.reason,isWaiting:!1});return To},Ca=function(Ce){return Ce.movementMode==="SNAP"},Ja=function(Ce,De,Ge){var mt=Ki(Ce.dimensions,De);return!Ca(Ce)||Ge?da({state:Ce,dimensions:mt}):Zn({state:Ce,dimensions:mt})};function wo(Se){return Se.isDragging&&Se.movementMode==="SNAP"?(0,ot.Z)({phase:"DRAGGING"},Se,{scrollJumpRequest:null}):Se}var Cr={phase:"IDLE",completed:null,shouldFlush:!1},fr=function(Se,Ce){if(Se===void 0&&(Se=Cr),Ce.type==="FLUSH")return(0,ot.Z)({},Cr,{shouldFlush:!0});if(Ce.type==="INITIAL_PUBLISH"){Se.phase!=="IDLE"&&Rn(!1);var De=Ce.payload,Ge=De.critical,mt=De.clientSelection,gt=De.viewport,Ft=De.dimensions,jt=De.movementMode,Cn=Ft.draggables[Ge.draggable.id],Wn=Ft.droppables[Ge.droppable.id],On={selection:mt,borderBoxCenter:Cn.client.borderBox.center,offset:Qr},Nn={client:On,page:{selection:Er(On.selection,gt.scroll.initial),borderBoxCenter:Er(On.selection,gt.scroll.initial),offset:Er(On.selection,gt.scroll.diff.value)}},Fn=tt(Ft.droppables).every(function(Xf){return!Xf.isFixedOnPage}),qn=Ai({draggable:Cn,home:Wn,draggables:Ft.draggables,viewport:gt}),ki=qn.impact,Vr=qn.afterCritical,to={phase:"DRAGGING",isDragging:!0,critical:Ge,movementMode:jt,dimensions:Ft,initial:Nn,current:Nn,isWindowScrollAllowed:Fn,impact:ki,afterCritical:Vr,onLiftImpact:ki,viewport:gt,scrollJumpRequest:null,forceShouldAnimate:null};return to}if(Ce.type==="COLLECTION_STARTING"){if(Se.phase==="COLLECTING"||Se.phase==="DROP_PENDING")return Se;Se.phase!=="DRAGGING"&&Rn(!1);var Po=(0,ot.Z)({phase:"COLLECTING"},Se,{phase:"COLLECTING"});return Po}if(Ce.type==="PUBLISH_WHILE_DRAGGING")return Se.phase==="COLLECTING"||Se.phase==="DROP_PENDING"||Rn(!1),Mi({state:Se,published:Ce.payload});if(Ce.type==="MOVE"){if(Se.phase==="DROP_PENDING")return Se;Qt(Se)||Rn(!1);var To=Ce.payload.client;return pi(To,Se.current.client.selection)?Se:da({state:Se,clientSelection:To,impact:Ca(Se)?Se.impact:null})}if(Ce.type==="UPDATE_DROPPABLE_SCROLL"){if(Se.phase==="DROP_PENDING"||Se.phase==="COLLECTING")return wo(Se);Qt(Se)||Rn(!1);var ea=Ce.payload,Uo=ea.id,Fa=ea.newScroll,os=Se.dimensions.droppables[Uo];if(!os)return Se;var Ts=Yi(os,Fa);return Ja(Se,Ts,!1)}if(Ce.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(Se.phase==="DROP_PENDING")return Se;Qt(Se)||Rn(!1);var ou=Ce.payload,As=ou.id,Xl=ou.isEnabled,Gu=Se.dimensions.droppables[As];Gu||Rn(!1),Gu.isEnabled===Xl&&Rn(!1);var tc=(0,ot.Z)({},Gu,{isEnabled:Xl});return Ja(Se,tc,!0)}if(Ce.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(Se.phase==="DROP_PENDING")return Se;Qt(Se)||Rn(!1);var fd=Ce.payload,Bc=fd.id,Cc=fd.isCombineEnabled,xu=Se.dimensions.droppables[Bc];xu||Rn(!1),xu.isCombineEnabled===Cc&&Rn(!1);var Zl=(0,ot.Z)({},xu,{isCombineEnabled:Cc});return Ja(Se,Zl,!0)}if(Ce.type==="MOVE_BY_WINDOW_SCROLL"){if(Se.phase==="DROP_PENDING"||Se.phase==="DROP_ANIMATING")return Se;Qt(Se)||Rn(!1),Se.isWindowScrollAllowed||Rn(!1);var Bd=Ce.payload.newScroll;if(pi(Se.viewport.scroll.current,Bd))return wo(Se);var Jl=Ss(Se.viewport,Bd);return Ca(Se)?Zn({state:Se,viewport:Jl}):da({state:Se,viewport:Jl})}if(Ce.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Qt(Se))return Se;var gd=Ce.payload.maxScroll;if(pi(gd,Se.viewport.scroll.max))return Se;var vf=(0,ot.Z)({},Se.viewport,{scroll:(0,ot.Z)({},Se.viewport.scroll,{max:gd})});return(0,ot.Z)({phase:"DRAGGING"},Se,{viewport:vf})}if(Ce.type==="MOVE_UP"||Ce.type==="MOVE_DOWN"||Ce.type==="MOVE_LEFT"||Ce.type==="MOVE_RIGHT"){if(Se.phase==="COLLECTING"||Se.phase==="DROP_PENDING")return Se;Se.phase!=="DRAGGING"&&Rn(!1);var pd=Ma({state:Se,type:Ce.type});return pd?da({state:Se,impact:pd.impact,clientSelection:pd.clientSelection,scrollJumpRequest:pd.scrollJumpRequest}):Se}if(Ce.type==="DROP_PENDING"){var fa=Ce.payload.reason;Se.phase!=="COLLECTING"&&Rn(!1);var Wh=(0,ot.Z)({phase:"DROP_PENDING"},Se,{phase:"DROP_PENDING",isWaiting:!0,reason:fa});return Wh}if(Ce.type==="DROP_ANIMATE"){var Ng=Ce.payload,md=Ng.completed,Jd=Ng.dropDuration,Eh=Ng.newHomeClientOffset;Se.phase==="DRAGGING"||Se.phase==="DROP_PENDING"||Rn(!1);var bc={phase:"DROP_ANIMATING",completed:md,dropDuration:Jd,newHomeClientOffset:Eh,dimensions:Se.dimensions};return bc}if(Ce.type==="DROP_COMPLETE"){var Yf=Ce.payload.completed;return{phase:"IDLE",completed:Yf,shouldFlush:!1}}return Se},Rr=function(Ce){return{type:"BEFORE_INITIAL_CAPTURE",payload:Ce}},pa=function(Ce){return{type:"LIFT",payload:Ce}},Is=function(Ce){return{type:"INITIAL_PUBLISH",payload:Ce}},La=function(Ce){return{type:"PUBLISH_WHILE_DRAGGING",payload:Ce}},yl=function(){return{type:"COLLECTION_STARTING",payload:null}},Ea=function(Ce){return{type:"UPDATE_DROPPABLE_SCROLL",payload:Ce}},Js=function(Ce){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:Ce}},Ha=function(Ce){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:Ce}},ts=function(Ce){return{type:"MOVE",payload:Ce}},Ms=function(Ce){return{type:"MOVE_BY_WINDOW_SCROLL",payload:Ce}},Rs=function(Ce){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:Ce}},ns=function(){return{type:"MOVE_UP",payload:null}},Kc=function(){return{type:"MOVE_DOWN",payload:null}},Qo=function(){return{type:"MOVE_RIGHT",payload:null}},Rd=function(){return{type:"MOVE_LEFT",payload:null}},Ua=function(){return{type:"FLUSH",payload:null}},Th=function(Ce){return{type:"DROP_ANIMATE",payload:Ce}},Vc=function(Ce){return{type:"DROP_COMPLETE",payload:Ce}},Uc=function(Ce){return{type:"DROP",payload:Ce}},uh=function(Ce){return{type:"DROP_PENDING",payload:Ce}},mi=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function Co(Se){if(!(Se.length<=1)){for(var Ce=Se.map(function(jt){return jt.descriptor.index}),De={},Ge=1;Ge<Ce.length;Ge++){var mt=Ce[Ge],gt=Ce[Ge-1];mt!==gt+1&&(De[mt]=!0)}if(Object.keys(De).length)var Ft=Ce.map(function(jt){var Cn=!!De[jt];return Cn?"[\u{1F525}"+jt+"]":""+jt}).join(", ")}}function Za(Se,Ce){if(0)var De}var Gr=function(Se){return function(Ce){var De=Ce.getState,Ge=Ce.dispatch;return function(mt){return function(gt){if(gt.type!=="LIFT"){mt(gt);return}var Ft=gt.payload,jt=Ft.id,Cn=Ft.clientSelection,Wn=Ft.movementMode,On=De();On.phase==="DROP_ANIMATING"&&Ge(Vc({completed:On.completed})),De().phase!=="IDLE"&&Rn(!1),Ge(Ua()),Ge(Rr({draggableId:jt,movementMode:Wn}));var Nn={shouldPublishImmediately:Wn==="SNAP"},Fn={draggableId:jt,scrollOptions:Nn},qn=Se.startPublishing(Fn),ki=qn.critical,Vr=qn.dimensions,to=qn.viewport;Za(ki,Vr),Ge(Is({critical:ki,dimensions:Vr,clientSelection:Cn,movementMode:Wn,viewport:to}))}}}},Nr=function(Se){return function(){return function(Ce){return function(De){De.type==="INITIAL_PUBLISH"&&Se.dragging(),De.type==="DROP_ANIMATE"&&Se.dropping(De.payload.completed.result.reason),(De.type==="FLUSH"||De.type==="DROP_COMPLETE")&&Se.resting(),Ce(De)}}}},gs={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Os={opacity:{drop:0,combining:.7},scale:{drop:.75}},cl={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},ba=cl.outOfTheWay+"s "+gs.outOfTheWay,el={fluid:"opacity "+ba,snap:"transform "+ba+", opacity "+ba,drop:function(Ce){var De=Ce+"s "+gs.drop;return"transform "+De+", opacity "+De},outOfTheWay:"transform "+ba,placeholder:"height "+ba+", width "+ba+", margin "+ba},ps=function(Ce){return pi(Ce,Qr)?null:"translate("+Ce.x+"px, "+Ce.y+"px)"},Vl={moveTo:ps,drop:function(Ce,De){var Ge=ps(Ce);return Ge?De?Ge+" scale("+Os.scale.drop+")":Ge:null}},lc=cl.minDropTime,ra=cl.maxDropTime,Cu=ra-lc,bu=1500,ql=.6,Cl=function(Se){var Ce=Se.current,De=Se.destination,Ge=Se.reason,mt=$r(Ce,De);if(mt<=0)return lc;if(mt>=bu)return ra;var gt=mt/bu,Ft=lc+Cu*gt,jt=Ge==="CANCEL"?Ft*ql:Ft;return Number(jt.toFixed(2))},uc=function(Se){var Ce=Se.impact,De=Se.draggable,Ge=Se.dimensions,mt=Se.viewport,gt=Se.afterCritical,Ft=Ge.draggables,jt=Ge.droppables,Cn=mr(Ce),Wn=Cn?jt[Cn]:null,On=jt[De.descriptor.droppableId],Nn=_t({impact:Ce,draggable:De,draggables:Ft,afterCritical:gt,droppable:Wn||On,viewport:mt}),Fn=qt(Nn,De.client.borderBox.center);return Fn},Md=function(Se){var Ce=Se.draggables,De=Se.reason,Ge=Se.lastImpact,mt=Se.home,gt=Se.viewport,Ft=Se.onLiftImpact;if(!Ge.at||De!=="DROP"){var jt=Go({draggables:Ce,impact:Ft,destination:mt,viewport:gt,forceShouldAnimate:!0});return{impact:jt,didDropInsideDroppable:!1}}if(Ge.at.type==="REORDER")return{impact:Ge,didDropInsideDroppable:!0};var Cn=(0,ot.Z)({},Ge,{displaced:Ao});return{impact:Cn,didDropInsideDroppable:!0}},ft=function(Se){var Ce=Se.getState,De=Se.dispatch;return function(Ge){return function(mt){if(mt.type!=="DROP"){Ge(mt);return}var gt=Ce(),Ft=mt.payload.reason;if(gt.phase==="COLLECTING"){De(uh({reason:Ft}));return}if(gt.phase!=="IDLE"){var jt=gt.phase==="DROP_PENDING"&>.isWaiting;jt&&Rn(!1),gt.phase==="DRAGGING"||gt.phase==="DROP_PENDING"||Rn(!1);var Cn=gt.critical,Wn=gt.dimensions,On=Wn.draggables[gt.critical.draggable.id],Nn=Md({reason:Ft,lastImpact:gt.impact,afterCritical:gt.afterCritical,onLiftImpact:gt.onLiftImpact,home:gt.dimensions.droppables[gt.critical.droppable.id],viewport:gt.viewport,draggables:gt.dimensions.draggables}),Fn=Nn.impact,qn=Nn.didDropInsideDroppable,ki=qn?$a(Fn):null,Vr=qn?ls(Fn):null,to={index:Cn.draggable.index,droppableId:Cn.droppable.id},Po={draggableId:On.descriptor.id,type:On.descriptor.type,source:to,reason:Ft,mode:gt.movementMode,destination:ki,combine:Vr},To=uc({impact:Fn,draggable:On,dimensions:Wn,viewport:gt.viewport,afterCritical:gt.afterCritical}),ea={critical:gt.critical,afterCritical:gt.afterCritical,result:Po,impact:Fn},Uo=!pi(gt.current.client.offset,To)||!!Po.combine;if(!Uo){De(Vc({completed:ea}));return}var Fa=Cl({current:gt.current.client.offset,destination:To,reason:Ft}),os={newHomeClientOffset:To,dropDuration:Fa,completed:ea};De(Th(os))}}}},St=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function nn(Se){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(De){De.target!==window&&De.target!==window.document||Se()}}}function ln(Se){var Ce=Se.onWindowScroll;function De(){Ce(St())}var Ge=Wt(De),mt=nn(Ge),gt=Rt;function Ft(){return gt!==Rt}function jt(){Ft()&&Rn(!1),gt=Vn(window,[mt])}function Cn(){Ft()||Rn(!1),Ge.cancel(),gt(),gt=Rt}return{start:jt,stop:Cn,isActive:Ft}}var Dn=function(Ce){return Ce.type==="DROP_COMPLETE"||Ce.type==="DROP_ANIMATE"||Ce.type==="FLUSH"},Sn=function(Se){var Ce=ln({onWindowScroll:function(Ge){Se.dispatch(Ms({newScroll:Ge}))}});return function(De){return function(Ge){!Ce.isActive()&&Ge.type==="INITIAL_PUBLISH"&&Ce.start(),Ce.isActive()&&Dn(Ge)&&Ce.stop(),De(Ge)}}},ni=function(Se){var Ce=!1,De=!1,Ge=setTimeout(function(){De=!0}),mt=function(Ft){Ce||De||(Ce=!0,Se(Ft),clearTimeout(Ge))};return mt.wasCalled=function(){return Ce},mt},ii=function(){var Se=[],Ce=function(gt){var Ft=Dr(Se,function(Wn){return Wn.timerId===gt});Ft===-1&&Rn(!1);var jt=Se.splice(Ft,1),Cn=jt[0];Cn.callback()},De=function(gt){var Ft=setTimeout(function(){return Ce(Ft)}),jt={timerId:Ft,callback:gt};Se.push(jt)},Ge=function(){if(Se.length){var gt=[].concat(Se);Se.length=0,gt.forEach(function(Ft){clearTimeout(Ft.timerId),Ft.callback()})}};return{add:De,flush:Ge}},Yn=function(Ce,De){return Ce==null&&De==null?!0:Ce==null||De==null?!1:Ce.droppableId===De.droppableId&&Ce.index===De.index},Ci=function(Ce,De){return Ce==null&&De==null?!0:Ce==null||De==null?!1:Ce.draggableId===De.draggableId&&Ce.droppableId===De.droppableId},Bi=function(Ce,De){if(Ce===De)return!0;var Ge=Ce.draggable.id===De.draggable.id&&Ce.draggable.droppableId===De.draggable.droppableId&&Ce.draggable.type===De.draggable.type&&Ce.draggable.index===De.draggable.index,mt=Ce.droppable.id===De.droppable.id&&Ce.droppable.type===De.droppable.type;return Ge&&mt},bi=function(Ce,De){ir(),De(),no()},xr=function(Ce,De){return{draggableId:Ce.draggable.id,type:Ce.droppable.type,source:{droppableId:Ce.droppable.id,index:Ce.draggable.index},mode:De}},gr=function(Ce,De,Ge,mt){if(!Ce){Ge(mt(De));return}var gt=ni(Ge),Ft={announce:gt};Ce(De,Ft),gt.wasCalled()||Ge(mt(De))},ar=function(Se,Ce){var De=ii(),Ge=null,mt=function(Fn,qn){Ge&&Rn(!1),bi("onBeforeCapture",function(){var ki=Se().onBeforeCapture;if(ki){var Vr={draggableId:Fn,mode:qn};ki(Vr)}})},gt=function(Fn,qn){Ge&&Rn(!1),bi("onBeforeDragStart",function(){var ki=Se().onBeforeDragStart;ki&&ki(xr(Fn,qn))})},Ft=function(Fn,qn){Ge&&Rn(!1);var ki=xr(Fn,qn);Ge={mode:qn,lastCritical:Fn,lastLocation:ki.source,lastCombine:null},De.add(function(){bi("onDragStart",function(){return gr(Se().onDragStart,ki,Ce,vo.onDragStart)})})},jt=function(Fn,qn){var ki=$a(qn),Vr=ls(qn);Ge||Rn(!1);var to=!Bi(Fn,Ge.lastCritical);to&&(Ge.lastCritical=Fn);var Po=!Yn(Ge.lastLocation,ki);Po&&(Ge.lastLocation=ki);var To=!Ci(Ge.lastCombine,Vr);if(To&&(Ge.lastCombine=Vr),!(!to&&!Po&&!To)){var ea=(0,ot.Z)({},xr(Fn,Ge.mode),{combine:Vr,destination:ki});De.add(function(){bi("onDragUpdate",function(){return gr(Se().onDragUpdate,ea,Ce,vo.onDragUpdate)})})}},Cn=function(){Ge||Rn(!1),De.flush()},Wn=function(Fn){Ge||Rn(!1),Ge=null,bi("onDragEnd",function(){return gr(Se().onDragEnd,Fn,Ce,vo.onDragEnd)})},On=function(){if(Ge){var Fn=(0,ot.Z)({},xr(Ge.lastCritical,Ge.mode),{combine:null,destination:null,reason:"CANCEL"});Wn(Fn)}};return{beforeCapture:mt,beforeStart:gt,start:Ft,update:jt,flush:Cn,drop:Wn,abort:On}},oo=function(Se,Ce){var De=ar(Se,Ce);return function(Ge){return function(mt){return function(gt){if(gt.type==="BEFORE_INITIAL_CAPTURE"){De.beforeCapture(gt.payload.draggableId,gt.payload.movementMode);return}if(gt.type==="INITIAL_PUBLISH"){var Ft=gt.payload.critical;De.beforeStart(Ft,gt.payload.movementMode),mt(gt),De.start(Ft,gt.payload.movementMode);return}if(gt.type==="DROP_COMPLETE"){var jt=gt.payload.completed.result;De.flush(),mt(gt),De.drop(jt);return}if(mt(gt),gt.type==="FLUSH"){De.abort();return}var Cn=Ge.getState();Cn.phase==="DRAGGING"&&De.update(Cn.critical,Cn.impact)}}}},dr=function(Se){return function(Ce){return function(De){if(De.type!=="DROP_ANIMATION_FINISHED"){Ce(De);return}var Ge=Se.getState();Ge.phase!=="DROP_ANIMATING"&&Rn(!1),Se.dispatch(Vc({completed:Ge.completed}))}}},qr=function(Se){var Ce=null,De=null;function Ge(){De&&(cancelAnimationFrame(De),De=null),Ce&&(Ce(),Ce=null)}return function(mt){return function(gt){if((gt.type==="FLUSH"||gt.type==="DROP_COMPLETE"||gt.type==="DROP_ANIMATION_FINISHED")&&Ge(),mt(gt),gt.type==="DROP_ANIMATE"){var Ft={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var Cn=Se.getState();Cn.phase==="DROP_ANIMATING"&&Se.dispatch(mi())}};De=requestAnimationFrame(function(){De=null,Ce=Vn(window,[Ft])})}}}},Yr=function(Se){return function(){return function(Ce){return function(De){(De.type==="DROP_COMPLETE"||De.type==="FLUSH"||De.type==="DROP_ANIMATE")&&Se.stopPublishing(),Ce(De)}}}},So=function(Se){var Ce=!1;return function(){return function(De){return function(Ge){if(Ge.type==="INITIAL_PUBLISH"){Ce=!0,Se.tryRecordFocus(Ge.payload.critical.draggable.id),De(Ge),Se.tryRestoreFocusRecorded();return}if(De(Ge),!!Ce){if(Ge.type==="FLUSH"){Ce=!1,Se.tryRestoreFocusRecorded();return}if(Ge.type==="DROP_COMPLETE"){Ce=!1;var mt=Ge.payload.completed.result;mt.combine&&Se.tryShiftRecord(mt.draggableId,mt.combine.draggableId),Se.tryRestoreFocusRecorded()}}}}}},$o=function(Ce){return Ce.type==="DROP_COMPLETE"||Ce.type==="DROP_ANIMATE"||Ce.type==="FLUSH"},la=function(Se){return function(Ce){return function(De){return function(Ge){if($o(Ge)){Se.stop(),De(Ge);return}if(Ge.type==="INITIAL_PUBLISH"){De(Ge);var mt=Ce.getState();mt.phase!=="DRAGGING"&&Rn(!1),Se.start(mt);return}De(Ge),Se.scroll(Ce.getState())}}}},so=function(Se){return function(Ce){return function(De){if(Ce(De),De.type==="PUBLISH_WHILE_DRAGGING"){var Ge=Se.getState();Ge.phase==="DROP_PENDING"&&(Ge.isWaiting||Se.dispatch(Uc({reason:Ge.reason})))}}}},Ho=We.qC,Na=function(Se){var Ce=Se.dimensionMarshal,De=Se.focusMarshal,Ge=Se.styleMarshal,mt=Se.getResponders,gt=Se.announce,Ft=Se.autoScroller;return(0,We.MT)(fr,Ho((0,We.md)(Nr(Ge),Yr(Ce),Gr(Ce),ft,dr,qr,so,la(Ft),Sn,So(De),oo(mt,gt))))},fo=function(){return{additions:{},removals:{},modified:{}}};function ko(Se){var Ce=Se.registry,De=Se.callbacks,Ge=fo(),mt=null,gt=function(){mt||(De.collectionStarting(),mt=requestAnimationFrame(function(){mt=null,ir();var On=Ge,Nn=On.additions,Fn=On.removals,qn=On.modified,ki=Object.keys(Nn).map(function(Po){return Ce.draggable.getById(Po).getDimension(Qr)}).sort(function(Po,To){return Po.descriptor.index-To.descriptor.index}),Vr=Object.keys(qn).map(function(Po){var To=Ce.droppable.getById(Po),ea=To.callbacks.getScrollWhileDragging();return{droppableId:Po,scroll:ea}}),to={additions:ki,removals:Object.keys(Fn),modified:Vr};Ge=fo(),no(),De.publish(to)}))},Ft=function(On){var Nn=On.descriptor.id;Ge.additions[Nn]=On,Ge.modified[On.descriptor.droppableId]=!0,Ge.removals[Nn]&&delete Ge.removals[Nn],gt()},jt=function(On){var Nn=On.descriptor;Ge.removals[Nn.id]=!0,Ge.modified[Nn.droppableId]=!0,Ge.additions[Nn.id]&&delete Ge.additions[Nn.id],gt()},Cn=function(){mt&&(cancelAnimationFrame(mt),mt=null,Ge=fo())};return{add:Ft,remove:jt,stop:Cn}}var po=function(Se){var Ce=Se.scrollHeight,De=Se.scrollWidth,Ge=Se.height,mt=Se.width,gt=qt({x:De,y:Ce},{x:mt,y:Ge}),Ft={x:Math.max(0,gt.x),y:Math.max(0,gt.y)};return Ft},kr=function(){var Se=document.documentElement;return Se||Rn(!1),Se},Fo=function(){var Se=kr(),Ce=po({scrollHeight:Se.scrollHeight,scrollWidth:Se.scrollWidth,width:Se.clientWidth,height:Se.clientHeight});return Ce},qo=function(){var Se=St(),Ce=Fo(),De=Se.y,Ge=Se.x,mt=kr(),gt=mt.clientWidth,Ft=mt.clientHeight,jt=Ge+gt,Cn=De+Ft,Wn=cr({top:De,left:Ge,right:jt,bottom:Cn}),On={frame:Wn,scroll:{initial:Se,current:Se,max:Ce,diff:{value:Qr,displacement:Qr}}};return On},ma=function(Se){var Ce=Se.critical,De=Se.scrollOptions,Ge=Se.registry;ir();var mt=qo(),gt=mt.scroll.current,Ft=Ce.droppable,jt=Ge.droppable.getAllByType(Ft.type).map(function(Nn){return Nn.callbacks.getDimensionAndWatchScroll(gt,De)}),Cn=Ge.draggable.getAllByType(Ce.draggable.type).map(function(Nn){return Nn.getDimension(gt)}),Wn={draggables:Ti(Cn),droppables:_o(jt)};no();var On={dimensions:Wn,critical:Ce,viewport:mt};return On};function va(Se,Ce,De){if(De.descriptor.id===Ce.id||De.descriptor.type!==Ce.type)return!1;var Ge=Se.droppable.getById(De.descriptor.droppableId);return Ge.descriptor.mode==="virtual"}var lo=function(Se,Ce){var De=null,Ge=ko({callbacks:{publish:Ce.publishWhileDragging,collectionStarting:Ce.collectionStarting},registry:Se}),mt=function(qn,ki){Se.droppable.exists(qn)||Rn(!1),De&&Ce.updateDroppableIsEnabled({id:qn,isEnabled:ki})},gt=function(qn,ki){De&&(Se.droppable.exists(qn)||Rn(!1),Ce.updateDroppableIsCombineEnabled({id:qn,isCombineEnabled:ki}))},Ft=function(qn,ki){De&&(Se.droppable.exists(qn)||Rn(!1),Ce.updateDroppableScroll({id:qn,newScroll:ki}))},jt=function(qn,ki){De&&Se.droppable.getById(qn).callbacks.scroll(ki)},Cn=function(){if(De){Ge.stop();var qn=De.critical.droppable;Se.droppable.getAllByType(qn.type).forEach(function(ki){return ki.callbacks.dragStopped()}),De.unsubscribe(),De=null}},Wn=function(qn){De||Rn(!1);var ki=De.critical.draggable;qn.type==="ADDITION"&&va(Se,ki,qn.value)&&Ge.add(qn.value),qn.type==="REMOVAL"&&va(Se,ki,qn.value)&&Ge.remove(qn.value)},On=function(qn){De&&Rn(!1);var ki=Se.draggable.getById(qn.draggableId),Vr=Se.droppable.getById(ki.descriptor.droppableId),to={draggable:ki.descriptor,droppable:Vr.descriptor},Po=Se.subscribe(Wn);return De={critical:to,unsubscribe:Po},ma({critical:to,registry:Se,scrollOptions:qn.scrollOptions})},Nn={updateDroppableIsEnabled:mt,updateDroppableIsCombineEnabled:gt,scrollDroppable:jt,updateDroppableScroll:Ft,startPublishing:On,stopPublishing:Cn};return Nn},Ba=function(Se,Ce){return Se.phase==="IDLE"?!0:Se.phase!=="DROP_ANIMATING"||Se.completed.result.draggableId===Ce?!1:Se.completed.result.reason==="DROP"},Wa=function(Se){window.scrollBy(Se.x,Se.y)},Ps=Gn(function(Se){return tt(Se).filter(function(Ce){return!(!Ce.isEnabled||!Ce.frame)})}),is=function(Ce,De){var Ge=Ir(Ps(De),function(mt){return mt.frame||Rn(!1),cn(mt.frame.pageMarginBox)(Ce)});return Ge},il=function(Se){var Ce=Se.center,De=Se.destination,Ge=Se.droppables;if(De){var mt=Ge[De];return mt.frame?mt:null}var gt=is(Ce,Ge);return gt},Ls={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(Ce){return Math.pow(Ce,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},_a=function(Se,Ce){var De=Se[Ce.size]*Ls.startFromPercentage,Ge=Se[Ce.size]*Ls.maxScrollAtPercentage,mt={startScrollingFrom:De,maxScrollValueAt:Ge};return mt},oa=function(Se){var Ce=Se.startOfRange,De=Se.endOfRange,Ge=Se.current,mt=De-Ce;if(mt===0)return 0;var gt=Ge-Ce,Ft=gt/mt;return Ft},as=1,rl=function(Se,Ce){if(Se>Ce.startScrollingFrom)return 0;if(Se<=Ce.maxScrollValueAt)return Ls.maxPixelScroll;if(Se===Ce.startScrollingFrom)return as;var De=oa({startOfRange:Ce.maxScrollValueAt,endOfRange:Ce.startScrollingFrom,current:Se}),Ge=1-De,mt=Ls.maxPixelScroll*Ls.ease(Ge);return Math.ceil(mt)},Gs=Ls.durationDampening.accelerateAt,xl=Ls.durationDampening.stopDampeningAt,Pa=function(Se,Ce){var De=Ce,Ge=xl,mt=Date.now(),gt=mt-De;if(gt>=xl)return Se;if(gt<Gs)return as;var Ft=oa({startOfRange:Gs,endOfRange:Ge,current:gt}),jt=Se*Ls.ease(Ft);return Math.ceil(jt)},ha=function(Se){var Ce=Se.distanceToEdge,De=Se.thresholds,Ge=Se.dragStartTime,mt=Se.shouldUseTimeDampening,gt=rl(Ce,De);return gt===0?0:mt?Math.max(Pa(gt,Ge),as):gt},ya=function(Se){var Ce=Se.container,De=Se.distanceToEdges,Ge=Se.dragStartTime,mt=Se.axis,gt=Se.shouldUseTimeDampening,Ft=_a(Ce,mt),jt=De[mt.end]<De[mt.start];return jt?ha({distanceToEdge:De[mt.end],thresholds:Ft,dragStartTime:Ge,shouldUseTimeDampening:gt}):-1*ha({distanceToEdge:De[mt.start],thresholds:Ft,dragStartTime:Ge,shouldUseTimeDampening:gt})},Vo=function(Se){var Ce=Se.container,De=Se.subject,Ge=Se.proposedScroll,mt=De.height>Ce.height,gt=De.width>Ce.width;return!gt&&!mt?Ge:gt&&mt?null:{x:gt?0:Ge.x,y:mt?0:Ge.y}},vs=io(function(Se){return Se===0?0:Se}),Ko=function(Se){var Ce=Se.dragStartTime,De=Se.container,Ge=Se.subject,mt=Se.center,gt=Se.shouldUseTimeDampening,Ft={top:mt.y-De.top,right:De.right-mt.x,bottom:De.bottom-mt.y,left:mt.x-De.left},jt=ya({container:De,distanceToEdges:Ft,dragStartTime:Ce,axis:ci,shouldUseTimeDampening:gt}),Cn=ya({container:De,distanceToEdges:Ft,dragStartTime:Ce,axis:xa,shouldUseTimeDampening:gt}),Wn=vs({x:Cn,y:jt});if(pi(Wn,Qr))return null;var On=Vo({container:De,subject:Ge,proposedScroll:Wn});return On?pi(On,Qr)?null:On:null},Aa=io(function(Se){return Se===0?0:Se>0?1:-1}),es=function(){var Se=function(De,Ge){return De<0?De:De>Ge?De-Ge:0};return function(Ce){var De=Ce.current,Ge=Ce.max,mt=Ce.change,gt=Er(De,mt),Ft={x:Se(gt.x,Ge.x),y:Se(gt.y,Ge.y)};return pi(Ft,Qr)?null:Ft}}(),rs=function(Ce){var De=Ce.max,Ge=Ce.current,mt=Ce.change,gt={x:Math.max(Ge.x,De.x),y:Math.max(Ge.y,De.y)},Ft=Aa(mt),jt=es({max:gt,current:Ge,change:Ft});return!jt||Ft.x!==0&&jt.x===0||Ft.y!==0&&jt.y===0},zl=function(Ce,De){return rs({current:Ce.scroll.current,max:Ce.scroll.max,change:De})},Ol=function(Ce,De){if(!zl(Ce,De))return null;var Ge=Ce.scroll.max,mt=Ce.scroll.current;return es({current:mt,max:Ge,change:De})},eu=function(Ce,De){var Ge=Ce.frame;return Ge?rs({current:Ge.scroll.current,max:Ge.scroll.max,change:De}):!1},ws=function(Ce,De){var Ge=Ce.frame;return!Ge||!eu(Ce,De)?null:es({current:Ge.scroll.current,max:Ge.scroll.max,change:De})},Ul=function(Se){var Ce=Se.viewport,De=Se.subject,Ge=Se.center,mt=Se.dragStartTime,gt=Se.shouldUseTimeDampening,Ft=Ko({dragStartTime:mt,container:Ce.frame,subject:De,center:Ge,shouldUseTimeDampening:gt});return Ft&&zl(Ce,Ft)?Ft:null},Sl=function(Se){var Ce=Se.droppable,De=Se.subject,Ge=Se.center,mt=Se.dragStartTime,gt=Se.shouldUseTimeDampening,Ft=Ce.frame;if(!Ft)return null;var jt=Ko({dragStartTime:mt,container:Ft.pageMarginBox,subject:De,center:Ge,shouldUseTimeDampening:gt});return jt&&eu(Ce,jt)?jt:null},kl=function(Se){var Ce=Se.state,De=Se.dragStartTime,Ge=Se.shouldUseTimeDampening,mt=Se.scrollWindow,gt=Se.scrollDroppable,Ft=Ce.current.page.borderBoxCenter,jt=Ce.dimensions.draggables[Ce.critical.draggable.id],Cn=jt.page.marginBox;if(Ce.isWindowScrollAllowed){var Wn=Ce.viewport,On=Ul({dragStartTime:De,viewport:Wn,subject:Cn,center:Ft,shouldUseTimeDampening:Ge});if(On){mt(On);return}}var Nn=il({center:Ft,destination:mr(Ce.impact),droppables:Ce.dimensions.droppables});if(Nn){var Fn=Sl({dragStartTime:De,droppable:Nn,subject:Cn,center:Ft,shouldUseTimeDampening:Ge});Fn&>(Nn.descriptor.id,Fn)}},Rc=function(Se){var Ce=Se.scrollWindow,De=Se.scrollDroppable,Ge=Wt(Ce),mt=Wt(De),gt=null,Ft=function(On){gt||Rn(!1);var Nn=gt,Fn=Nn.shouldUseTimeDampening,qn=Nn.dragStartTime;kl({state:On,scrollWindow:Ge,scrollDroppable:mt,dragStartTime:qn,shouldUseTimeDampening:Fn})},jt=function(On){ir(),gt&&Rn(!1);var Nn=Date.now(),Fn=!1,qn=function(){Fn=!0};kl({state:On,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:qn,scrollDroppable:qn}),gt={dragStartTime:Nn,shouldUseTimeDampening:Fn},no(),Fn&&Ft(On)},Cn=function(){gt&&(Ge.cancel(),mt.cancel(),gt=null)};return{start:jt,stop:Cn,scroll:Ft}},Cs=function(Se){var Ce=Se.move,De=Se.scrollDroppable,Ge=Se.scrollWindow,mt=function(Wn,On){var Nn=Er(Wn.current.client.selection,On);Ce({client:Nn})},gt=function(Wn,On){if(!eu(Wn,On))return On;var Nn=ws(Wn,On);if(!Nn)return De(Wn.descriptor.id,On),null;var Fn=qt(On,Nn);De(Wn.descriptor.id,Fn);var qn=qt(On,Fn);return qn},Ft=function(Wn,On,Nn){if(!Wn||!zl(On,Nn))return Nn;var Fn=Ol(On,Nn);if(!Fn)return Ge(Nn),null;var qn=qt(Nn,Fn);Ge(qn);var ki=qt(Nn,qn);return ki},jt=function(Wn){var On=Wn.scrollJumpRequest;if(On){var Nn=mr(Wn.impact);Nn||Rn(!1);var Fn=gt(Wn.dimensions.droppables[Nn],On);if(Fn){var qn=Wn.viewport,ki=Ft(Wn.isWindowScrollAllowed,qn,Fn);ki&&mt(Wn,ki)}}};return jt},ks=function(Se){var Ce=Se.scrollDroppable,De=Se.scrollWindow,Ge=Se.move,mt=Rc({scrollWindow:De,scrollDroppable:Ce}),gt=Cs({move:Ge,scrollWindow:De,scrollDroppable:Ce}),Ft=function(Wn){if(Wn.phase==="DRAGGING"){if(Wn.movementMode==="FLUID"){mt.scroll(Wn);return}Wn.scrollJumpRequest&>(Wn)}},jt={scroll:Ft,start:mt.start,stop:mt.stop};return jt},bs="data-rbd",$s=function(){var Se=bs+"-drag-handle";return{base:Se,draggableId:Se+"-draggable-id",contextId:Se+"-context-id"}}(),bl=function(){var Se=bs+"-draggable";return{base:Se,contextId:Se+"-context-id",id:Se+"-id"}}(),Qa=function(){var Se=bs+"-droppable";return{base:Se,contextId:Se+"-context-id",id:Se+"-id"}}(),Hs={contextId:bs+"-scroll-container-context-id"},Hl=function(Ce){return function(De){return"["+De+'="'+Ce+'"]'}},tu=function(Ce,De){return Ce.map(function(Ge){var mt=Ge.styles[De];return mt?Ge.selector+" { "+mt+" }":""}).join(" ")},Yu="pointer-events: none;",_u=function(Se){var Ce=Hl(Se),De=function(){var jt=`
|
|
|
cursor: -webkit-grab;
|
|
|
cursor: grab;
|
|
|
`;return{selector:Ce($s.contextId),styles:{always:`
|
|
|
-webkit-touch-callout: none;
|
|
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
|
touch-action: manipulation;
|
|
|
`,resting:jt,dragging:Yu,dropAnimating:jt}}}(),Ge=function(){var jt=`
|
|
|
transition: `+el.outOfTheWay+`;
|
|
|
`;return{selector:Ce(bl.contextId),styles:{dragging:jt,dropAnimating:jt,userCancel:jt}}}(),mt={selector:Ce(Qa.contextId),styles:{always:"overflow-anchor: none;"}},gt={selector:"body",styles:{dragging:`
|
|
|
cursor: grabbing;
|
|
|
cursor: -webkit-grabbing;
|
|
|
user-select: none;
|
|
|
-webkit-user-select: none;
|
|
|
-moz-user-select: none;
|
|
|
-ms-user-select: none;
|
|
|
overflow-anchor: none;
|
|
|
`}},Ft=[Ge,De,mt,gt];return{always:tu(Ft,"always"),resting:tu(Ft,"resting"),dragging:tu(Ft,"dragging"),dropAnimating:tu(Ft,"dropAnimating"),userCancel:tu(Ft,"userCancel")}},El=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?ue.useLayoutEffect:ue.useEffect,ju=function(){var Ce=document.querySelector("head");return Ce||Rn(!1),Ce},zu=function(Ce){var De=document.createElement("style");return Ce&&De.setAttribute("nonce",Ce),De.type="text/css",De};function Fs(Se,Ce){var De=_n(function(){return _u(Se)},[Se]),Ge=(0,ue.useRef)(null),mt=(0,ue.useRef)(null),gt=Hn(Gn(function(Nn){var Fn=mt.current;Fn||Rn(!1),Fn.textContent=Nn}),[]),Ft=Hn(function(Nn){var Fn=Ge.current;Fn||Rn(!1),Fn.textContent=Nn},[]);El(function(){!Ge.current&&!mt.current||Rn(!1);var Nn=zu(Ce),Fn=zu(Ce);return Ge.current=Nn,mt.current=Fn,Nn.setAttribute(bs+"-always",Se),Fn.setAttribute(bs+"-dynamic",Se),ju().appendChild(Nn),ju().appendChild(Fn),Ft(De.always),gt(De.resting),function(){var qn=function(Vr){var to=Vr.current;to||Rn(!1),ju().removeChild(to),Vr.current=null};qn(Ge),qn(mt)}},[Ce,Ft,gt,De.always,De.resting,Se]);var jt=Hn(function(){return gt(De.dragging)},[gt,De.dragging]),Cn=Hn(function(Nn){if(Nn==="DROP"){gt(De.dropAnimating);return}gt(De.userCancel)},[gt,De.dropAnimating,De.userCancel]),Wn=Hn(function(){mt.current&>(De.resting)},[gt,De.resting]),On=_n(function(){return{dragging:jt,dropping:Cn,resting:Wn}},[jt,Cn,Wn]);return On}var Yl=function(Se){return Se&&Se.ownerDocument?Se.ownerDocument.defaultView:window};function Ks(Se){return Se instanceof Yl(Se).HTMLElement}function Zs(Se,Ce){var De="["+$s.contextId+'="'+Se+'"]',Ge=Do(document.querySelectorAll(De));if(!Ge.length)return null;var mt=Ir(Ge,function(gt){return gt.getAttribute($s.draggableId)===Ce});return!mt||!Ks(mt)?null:mt}function Xu(Se){var Ce=(0,ue.useRef)({}),De=(0,ue.useRef)(null),Ge=(0,ue.useRef)(null),mt=(0,ue.useRef)(!1),gt=Hn(function(Fn,qn){var ki={id:Fn,focus:qn};return Ce.current[Fn]=ki,function(){var to=Ce.current,Po=to[Fn];Po!==ki&&delete to[Fn]}},[]),Ft=Hn(function(Fn){var qn=Zs(Se,Fn);qn&&qn!==document.activeElement&&qn.focus()},[Se]),jt=Hn(function(Fn,qn){De.current===Fn&&(De.current=qn)},[]),Cn=Hn(function(){Ge.current||mt.current&&(Ge.current=requestAnimationFrame(function(){Ge.current=null;var Fn=De.current;Fn&&Ft(Fn)}))},[Ft]),Wn=Hn(function(Fn){De.current=null;var qn=document.activeElement;qn&&qn.getAttribute($s.draggableId)===Fn&&(De.current=Fn)},[]);El(function(){return mt.current=!0,function(){mt.current=!1;var Fn=Ge.current;Fn&&cancelAnimationFrame(Fn)}},[]);var On=_n(function(){return{register:gt,tryRecordFocus:Wn,tryRestoreFocusRecorded:Cn,tryShiftRecord:jt}},[gt,Wn,Cn,jt]);return On}function Yc(){var Se={draggables:{},droppables:{}},Ce=[];function De(Nn){return Ce.push(Nn),function(){var qn=Ce.indexOf(Nn);qn!==-1&&Ce.splice(qn,1)}}function Ge(Nn){Ce.length&&Ce.forEach(function(Fn){return Fn(Nn)})}function mt(Nn){return Se.draggables[Nn]||null}function gt(Nn){var Fn=mt(Nn);return Fn||Rn(!1),Fn}var Ft={register:function(Fn){Se.draggables[Fn.descriptor.id]=Fn,Ge({type:"ADDITION",value:Fn})},update:function(Fn,qn){var ki=Se.draggables[qn.descriptor.id];ki&&ki.uniqueId===Fn.uniqueId&&(delete Se.draggables[qn.descriptor.id],Se.draggables[Fn.descriptor.id]=Fn)},unregister:function(Fn){var qn=Fn.descriptor.id,ki=mt(qn);ki&&Fn.uniqueId===ki.uniqueId&&(delete Se.draggables[qn],Ge({type:"REMOVAL",value:Fn}))},getById:gt,findById:mt,exists:function(Fn){return!!mt(Fn)},getAllByType:function(Fn){return Zo(Se.draggables).filter(function(qn){return qn.descriptor.type===Fn})}};function jt(Nn){return Se.droppables[Nn]||null}function Cn(Nn){var Fn=jt(Nn);return Fn||Rn(!1),Fn}var Wn={register:function(Fn){Se.droppables[Fn.descriptor.id]=Fn},unregister:function(Fn){var qn=jt(Fn.descriptor.id);qn&&Fn.uniqueId===qn.uniqueId&&delete Se.droppables[Fn.descriptor.id]},getById:Cn,findById:jt,exists:function(Fn){return!!jt(Fn)},getAllByType:function(Fn){return Zo(Se.droppables).filter(function(qn){return qn.descriptor.type===Fn})}};function On(){Se.draggables={},Se.droppables={},Ce.length=0}return{draggable:Ft,droppable:Wn,subscribe:De,clean:On}}function cc(){var Se=_n(Yc,[]);return(0,ue.useEffect)(function(){return function(){requestAnimationFrame(Se.clean)}},[Se]),Se}var dc=ue.createContext(null),Ju=function(){var Se=document.body;return Se||Rn(!1),Se},Hu={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},ys=function(Ce){return"rbd-announcement-"+Ce};function Qs(Se){var Ce=_n(function(){return ys(Se)},[Se]),De=(0,ue.useRef)(null);(0,ue.useEffect)(function(){var gt=document.createElement("div");return De.current=gt,gt.id=Ce,gt.setAttribute("aria-live","assertive"),gt.setAttribute("aria-atomic","true"),(0,ot.Z)(gt.style,Hu),Ju().appendChild(gt),function(){setTimeout(function(){var Cn=Ju();Cn.contains(gt)&&Cn.removeChild(gt),gt===De.current&&(De.current=null)})}},[Ce]);var Ge=Hn(function(mt){var gt=De.current;if(gt){gt.textContent=mt;return}},[]);return Ge}var Ml=0,qs={separator:"::"};function cs(){Ml=0}function Ll(Se,Ce){return Ce===void 0&&(Ce=qs),_n(function(){return""+Se+Ce.separator+Ml++},[Ce.separator,Se])}function Eu(Se){var Ce=Se.contextId,De=Se.uniqueId;return"rbd-hidden-text-"+Ce+"-"+De}function Sc(Se){var Ce=Se.contextId,De=Se.text,Ge=Ll("hidden-text",{separator:"-"}),mt=_n(function(){return Eu({contextId:Ce,uniqueId:Ge})},[Ge,Ce]);return(0,ue.useEffect)(function(){var Ft=document.createElement("div");return Ft.id=mt,Ft.textContent=De,Ft.style.display="none",Ju().appendChild(Ft),function(){var Cn=Ju();Cn.contains(Ft)&&Cn.removeChild(Ft)}},[mt,De]),mt}var _d=ue.createContext(null),gn={react:"^16.8.5","react-dom":"^16.8.5"},ld=/(\d+)\.(\d+)\.(\d+)/,Fc=function(Ce){var De=ld.exec(Ce);De==null&&Rn(!1);var Ge=Number(De[1]),mt=Number(De[2]),gt=Number(De[3]);return{major:Ge,minor:mt,patch:gt,raw:Ce}},df=function(Ce,De){return De.major>Ce.major?!0:De.major<Ce.major?!1:De.minor>Ce.minor?!0:De.minor<Ce.minor?!1:De.patch>=Ce.patch},jd=function(Se,Ce){var De=Fc(Se),Ge=Fc(Ce);df(De,Ge)},zd=`
|
|
|
We expect a html5 doctype: <!doctype html>
|
|
|
This is to ensure consistent browser layout and measurement
|
|
|
|
|
|
More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/doctype.md
|
|
|
`,Rh=function(Se){var Ce=Se.doctype;Ce&&(Ce.name.toLowerCase(),Ce.publicId)};function Qg(Se){}function Tl(Se,Ce){}function ch(){Tl(function(){jd(gn.react,ue.version),Rh(document)},[])}function Hd(Se){var Ce=(0,ue.useRef)(Se);return(0,ue.useEffect)(function(){Ce.current=Se}),Ce}function dh(){var Se=null;function Ce(){return!!Se}function De(Ft){return Ft===Se}function Ge(Ft){Se&&Rn(!1);var jt={abandon:Ft};return Se=jt,jt}function mt(){Se||Rn(!1),Se=null}function gt(){Se&&(Se.abandon(),mt())}return{isClaimed:Ce,isActive:De,claim:Ge,release:mt,tryAbandon:gt}}var hf=9,Zf=13,hh=27,fh=32,Qu=33,Zd=34,ff=35,Nc=36,ud=37,Wd=38,Ld=39,Mu=40,Fd,_h=(Fd={},Fd[Zf]=!0,Fd[hf]=!0,Fd),Zu=function(Se){_h[Se.keyCode]&&Se.preventDefault()},Xc=function(){var Se="visibilitychange";if(typeof document=="undefined")return Se;var Ce=[Se,"ms"+Se,"webkit"+Se,"moz"+Se,"o"+Se],De=Ir(Ce,function(Ge){return"on"+Ge in document});return De||Se}(),gh=0,ph=5;function cd(Se,Ce){return Math.abs(Ce.x-Se.x)>=ph||Math.abs(Ce.y-Se.y)>=ph}var gu={type:"IDLE"};function jh(Se){var Ce=Se.cancel,De=Se.completed,Ge=Se.getPhase,mt=Se.setPhase;return[{eventName:"mousemove",fn:function(Ft){var jt=Ft.button,Cn=Ft.clientX,Wn=Ft.clientY;if(jt===gh){var On={x:Cn,y:Wn},Nn=Ge();if(Nn.type==="DRAGGING"){Ft.preventDefault(),Nn.actions.move(On);return}Nn.type!=="PENDING"&&Rn(!1);var Fn=Nn.point;if(cd(Fn,On)){Ft.preventDefault();var qn=Nn.actions.fluidLift(On);mt({type:"DRAGGING",actions:qn})}}}},{eventName:"mouseup",fn:function(Ft){var jt=Ge();if(jt.type!=="DRAGGING"){Ce();return}Ft.preventDefault(),jt.actions.drop({shouldBlockNextClick:!0}),De()}},{eventName:"mousedown",fn:function(Ft){Ge().type==="DRAGGING"&&Ft.preventDefault(),Ce()}},{eventName:"keydown",fn:function(Ft){var jt=Ge();if(jt.type==="PENDING"){Ce();return}if(Ft.keyCode===hh){Ft.preventDefault(),Ce();return}Zu(Ft)}},{eventName:"resize",fn:Ce},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){Ge().type==="PENDING"&&Ce()}},{eventName:"webkitmouseforcedown",fn:function(Ft){var jt=Ge();if(jt.type==="IDLE"&&Rn(!1),jt.actions.shouldRespectForcePress()){Ce();return}Ft.preventDefault()}},{eventName:Xc,fn:Ce}]}function Rl(Se){var Ce=(0,ue.useRef)(gu),De=(0,ue.useRef)(Rt),Ge=_n(function(){return{eventName:"mousedown",fn:function(Nn){if(!Nn.defaultPrevented&&Nn.button===gh&&!(Nn.ctrlKey||Nn.metaKey||Nn.shiftKey||Nn.altKey)){var Fn=Se.findClosestDraggableId(Nn);if(Fn){var qn=Se.tryGetLock(Fn,Ft,{sourceEvent:Nn});if(qn){Nn.preventDefault();var ki={x:Nn.clientX,y:Nn.clientY};De.current(),Wn(qn,ki)}}}}}},[Se]),mt=_n(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(Nn){if(!Nn.defaultPrevented){var Fn=Se.findClosestDraggableId(Nn);if(Fn){var qn=Se.findOptionsForDraggable(Fn);qn&&(qn.shouldRespectForcePress||Se.canGetLock(Fn)&&Nn.preventDefault())}}}}},[Se]),gt=Hn(function(){var Nn={passive:!1,capture:!0};De.current=Vn(window,[mt,Ge],Nn)},[mt,Ge]),Ft=Hn(function(){var On=Ce.current;On.type!=="IDLE"&&(Ce.current=gu,De.current(),gt())},[gt]),jt=Hn(function(){var On=Ce.current;Ft(),On.type==="DRAGGING"&&On.actions.cancel({shouldBlockNextClick:!0}),On.type==="PENDING"&&On.actions.abort()},[Ft]),Cn=Hn(function(){var Nn={capture:!0,passive:!1},Fn=jh({cancel:jt,completed:Ft,getPhase:function(){return Ce.current},setPhase:function(ki){Ce.current=ki}});De.current=Vn(window,Fn,Nn)},[jt,Ft]),Wn=Hn(function(Nn,Fn){Ce.current.type!=="IDLE"&&Rn(!1),Ce.current={type:"PENDING",point:Fn,actions:Nn},Cn()},[Cn]);El(function(){return gt(),function(){De.current()}},[gt])}var ss;function tl(){}var uu=(ss={},ss[Zd]=!0,ss[Qu]=!0,ss[Nc]=!0,ss[ff]=!0,ss);function hc(Se,Ce){function De(){Ce(),Se.cancel()}function Ge(){Ce(),Se.drop()}return[{eventName:"keydown",fn:function(gt){if(gt.keyCode===hh){gt.preventDefault(),De();return}if(gt.keyCode===fh){gt.preventDefault(),Ge();return}if(gt.keyCode===Mu){gt.preventDefault(),Se.moveDown();return}if(gt.keyCode===Wd){gt.preventDefault(),Se.moveUp();return}if(gt.keyCode===Ld){gt.preventDefault(),Se.moveRight();return}if(gt.keyCode===ud){gt.preventDefault(),Se.moveLeft();return}if(uu[gt.keyCode]){gt.preventDefault();return}Zu(gt)}},{eventName:"mousedown",fn:De},{eventName:"mouseup",fn:De},{eventName:"click",fn:De},{eventName:"touchstart",fn:De},{eventName:"resize",fn:De},{eventName:"wheel",fn:De,options:{passive:!0}},{eventName:Xc,fn:De}]}function fc(Se){var Ce=(0,ue.useRef)(tl),De=_n(function(){return{eventName:"keydown",fn:function(gt){if(gt.defaultPrevented||gt.keyCode!==fh)return;var Ft=Se.findClosestDraggableId(gt);if(!Ft)return;var jt=Se.tryGetLock(Ft,On,{sourceEvent:gt});if(!jt)return;gt.preventDefault();var Cn=!0,Wn=jt.snapLift();Ce.current();function On(){Cn||Rn(!1),Cn=!1,Ce.current(),Ge()}Ce.current=Vn(window,hc(Wn,On),{capture:!0,passive:!1})}}},[Se]),Ge=Hn(function(){var gt={passive:!1,capture:!0};Ce.current=Vn(window,[De],gt)},[De]);El(function(){return Ge(),function(){Ce.current()}},[Ge])}var Gd={type:"IDLE"},dd=120,mh=.15;function Pc(Se){var Ce=Se.cancel,De=Se.getPhase;return[{eventName:"orientationchange",fn:Ce},{eventName:"resize",fn:Ce},{eventName:"contextmenu",fn:function(mt){mt.preventDefault()}},{eventName:"keydown",fn:function(mt){if(De().type!=="DRAGGING"){Ce();return}mt.keyCode===hh&&mt.preventDefault(),Ce()}},{eventName:Xc,fn:Ce}]}function Jc(Se){var Ce=Se.cancel,De=Se.completed,Ge=Se.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(gt){var Ft=Ge();if(Ft.type!=="DRAGGING"){Ce();return}Ft.hasMoved=!0;var jt=gt.touches[0],Cn=jt.clientX,Wn=jt.clientY,On={x:Cn,y:Wn};gt.preventDefault(),Ft.actions.move(On)}},{eventName:"touchend",fn:function(gt){var Ft=Ge();if(Ft.type!=="DRAGGING"){Ce();return}gt.preventDefault(),Ft.actions.drop({shouldBlockNextClick:!0}),De()}},{eventName:"touchcancel",fn:function(gt){if(Ge().type!=="DRAGGING"){Ce();return}gt.preventDefault(),Ce()}},{eventName:"touchforcechange",fn:function(gt){var Ft=Ge();Ft.type==="IDLE"&&Rn(!1);var jt=gt.touches[0];if(jt){var Cn=jt.force>=mh;if(Cn){var Wn=Ft.actions.shouldRespectForcePress();if(Ft.type==="PENDING"){Wn&&Ce();return}if(Wn){if(Ft.hasMoved){gt.preventDefault();return}Ce();return}gt.preventDefault()}}}},{eventName:Xc,fn:Ce}]}function Wf(Se){var Ce=(0,ue.useRef)(Gd),De=(0,ue.useRef)(Rt),Ge=Hn(function(){return Ce.current},[]),mt=Hn(function(qn){Ce.current=qn},[]),gt=_n(function(){return{eventName:"touchstart",fn:function(qn){if(!qn.defaultPrevented){var ki=Se.findClosestDraggableId(qn);if(ki){var Vr=Se.tryGetLock(ki,jt,{sourceEvent:qn});if(Vr){var to=qn.touches[0],Po=to.clientX,To=to.clientY,ea={x:Po,y:To};De.current(),Nn(Vr,ea)}}}}}},[Se]),Ft=Hn(function(){var qn={capture:!0,passive:!1};De.current=Vn(window,[gt],qn)},[gt]),jt=Hn(function(){var Fn=Ce.current;Fn.type!=="IDLE"&&(Fn.type==="PENDING"&&clearTimeout(Fn.longPressTimerId),mt(Gd),De.current(),Ft())},[Ft,mt]),Cn=Hn(function(){var Fn=Ce.current;jt(),Fn.type==="DRAGGING"&&Fn.actions.cancel({shouldBlockNextClick:!0}),Fn.type==="PENDING"&&Fn.actions.abort()},[jt]),Wn=Hn(function(){var qn={capture:!0,passive:!1},ki={cancel:Cn,completed:jt,getPhase:Ge},Vr=Vn(window,Jc(ki),qn),to=Vn(window,Pc(ki),qn);De.current=function(){Vr(),to()}},[Cn,Ge,jt]),On=Hn(function(){var qn=Ge();qn.type!=="PENDING"&&Rn(!1);var ki=qn.actions.fluidLift(qn.point);mt({type:"DRAGGING",actions:ki,hasMoved:!1})},[Ge,mt]),Nn=Hn(function(qn,ki){Ge().type!=="IDLE"&&Rn(!1);var Vr=setTimeout(On,dd);mt({type:"PENDING",point:ki,actions:qn,longPressTimerId:Vr}),Wn()},[Wn,Ge,mt,On]);El(function(){return Ft(),function(){De.current();var ki=Ge();ki.type==="PENDING"&&(clearTimeout(ki.longPressTimerId),mt(Gd))}},[Ge,Ft,mt]),El(function(){var qn=Vn(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return qn},[])}function Gf(Se){}var $f={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function $d(Se,Ce){if(Ce==null)return!1;var De=!!$f[Ce.tagName.toLowerCase()];if(De)return!0;var Ge=Ce.getAttribute("contenteditable");return Ge==="true"||Ge===""?!0:Ce===Se?!1:$d(Se,Ce.parentElement)}function hg(Se,Ce){var De=Ce.target;return Ks(De)?$d(Se,De):!1}var fg=function(Se){return cr(Se.getBoundingClientRect()).center};function gg(Se){return Se instanceof Yl(Se).Element}var Qc=function(){var Se="matches";if(typeof document=="undefined")return Se;var Ce=[Se,"msMatchesSelector","webkitMatchesSelector"],De=Ir(Ce,function(Ge){return Ge in Element.prototype});return De||Se}();function pg(Se,Ce){return Se==null?null:Se[Qc](Ce)?Se:pg(Se.parentElement,Ce)}function mg(Se,Ce){return Se.closest?Se.closest(Ce):pg(Se,Ce)}function zh(Se){return"["+$s.contextId+'="'+Se+'"]'}function vh(Se,Ce){var De=Ce.target;if(!gg(De))return null;var Ge=zh(Se),mt=mg(De,Ge);return!mt||!Ks(mt)?null:mt}function vg(Se,Ce){var De=vh(Se,Ce);return De?De.getAttribute($s.draggableId):null}function qc(Se,Ce){var De="["+bl.contextId+'="'+Se+'"]',Ge=Do(document.querySelectorAll(De)),mt=Ir(Ge,function(gt){return gt.getAttribute(bl.id)===Ce});return!mt||!Ks(mt)?null:mt}function yg(Se){Se.preventDefault()}function yh(Se){var Ce=Se.expected,De=Se.phase,Ge=Se.isLockActive,mt=Se.shouldWarn;return!(!Ge()||Ce!==De)}function xg(Se){var Ce=Se.lockAPI,De=Se.store,Ge=Se.registry,mt=Se.draggableId;if(Ce.isClaimed())return!1;var gt=Ge.draggable.findById(mt);return!(!gt||!gt.options.isEnabled||!Ba(De.getState(),mt))}function Sg(Se){var Ce=Se.lockAPI,De=Se.contextId,Ge=Se.store,mt=Se.registry,gt=Se.draggableId,Ft=Se.forceSensorStop,jt=Se.sourceEvent,Cn=xg({lockAPI:Ce,store:Ge,registry:mt,draggableId:gt});if(!Cn)return null;var Wn=mt.draggable.getById(gt),On=qc(De,Wn.descriptor.id);if(!On||jt&&!Wn.options.canDragInteractiveElements&&hg(On,jt))return null;var Nn=Ce.claim(Ft||Rt),Fn="PRE_DRAG";function qn(){return Wn.options.shouldRespectForcePress}function ki(){return Ce.isActive(Nn)}function Vr(os,Ts){yh({expected:os,phase:Fn,isLockActive:ki,shouldWarn:!0})&&Ge.dispatch(Ts())}var to=Vr.bind(null,"DRAGGING");function Po(os){function Ts(){Ce.release(),Fn="COMPLETED"}Fn!=="PRE_DRAG"&&(Ts(),Fn!=="PRE_DRAG"&&Rn(!1)),Ge.dispatch(pa(os.liftActionArgs)),Fn="DRAGGING";function ou(As,Xl){if(Xl===void 0&&(Xl={shouldBlockNextClick:!1}),os.cleanup(),Xl.shouldBlockNextClick){var Gu=Vn(window,[{eventName:"click",fn:yg,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(Gu)}Ts(),Ge.dispatch(Uc({reason:As}))}return(0,ot.Z)({isActive:function(){return yh({expected:"DRAGGING",phase:Fn,isLockActive:ki,shouldWarn:!1})},shouldRespectForcePress:qn,drop:function(Xl){return ou("DROP",Xl)},cancel:function(Xl){return ou("CANCEL",Xl)}},os.actions)}function To(os){var Ts=Wt(function(As){to(function(){return ts({client:As})})}),ou=Po({liftActionArgs:{id:gt,clientSelection:os,movementMode:"FLUID"},cleanup:function(){return Ts.cancel()},actions:{move:Ts}});return(0,ot.Z)({},ou,{move:Ts})}function ea(){var os={moveUp:function(){return to(ns)},moveRight:function(){return to(Qo)},moveDown:function(){return to(Kc)},moveLeft:function(){return to(Rd)}};return Po({liftActionArgs:{id:gt,clientSelection:fg(On),movementMode:"SNAP"},cleanup:Rt,actions:os})}function Uo(){var os=yh({expected:"PRE_DRAG",phase:Fn,isLockActive:ki,shouldWarn:!0});os&&Ce.release()}var Fa={isActive:function(){return yh({expected:"PRE_DRAG",phase:Fn,isLockActive:ki,shouldWarn:!1})},shouldRespectForcePress:qn,fluidLift:To,snapLift:ea,abort:Uo};return Fa}var Pg=[Rl,fc,Wf];function Zp(Se){var Ce=Se.contextId,De=Se.store,Ge=Se.registry,mt=Se.customSensors,gt=Se.enableDefaultSensors,Ft=[].concat(gt?Pg:[],mt||[]),jt=(0,ue.useState)(function(){return dh()})[0],Cn=Hn(function(To,ea){To.isDragging&&!ea.isDragging&&jt.tryAbandon()},[jt]);El(function(){var To=De.getState(),ea=De.subscribe(function(){var Uo=De.getState();Cn(To,Uo),To=Uo});return ea},[jt,De,Cn]),El(function(){return jt.tryAbandon},[jt.tryAbandon]);var Wn=Hn(function(Po){return xg({lockAPI:jt,registry:Ge,store:De,draggableId:Po})},[jt,Ge,De]),On=Hn(function(Po,To,ea){return Sg({lockAPI:jt,registry:Ge,contextId:Ce,store:De,draggableId:Po,forceSensorStop:To,sourceEvent:ea&&ea.sourceEvent?ea.sourceEvent:null})},[Ce,jt,Ge,De]),Nn=Hn(function(Po){return vg(Ce,Po)},[Ce]),Fn=Hn(function(Po){var To=Ge.draggable.findById(Po);return To?To.options:null},[Ge.draggable]),qn=Hn(function(){jt.isClaimed()&&(jt.tryAbandon(),De.getState().phase!=="IDLE"&&De.dispatch(Ua()))},[jt,De]),ki=Hn(jt.isClaimed,[jt]),Vr=_n(function(){return{canGetLock:Wn,tryGetLock:On,findClosestDraggableId:Nn,findOptionsForDraggable:Fn,tryReleaseLock:qn,isLockClaimed:ki}},[Wn,On,Nn,Fn,qn,ki]);Gf(Ft);for(var to=0;to<Ft.length;to++)Ft[to](Vr)}var qg=function(Ce){return{onBeforeCapture:Ce.onBeforeCapture,onBeforeDragStart:Ce.onBeforeDragStart,onDragStart:Ce.onDragStart,onDragEnd:Ce.onDragEnd,onDragUpdate:Ce.onDragUpdate}};function Kd(Se){return Se.current||Rn(!1),Se.current}function Kf(Se){var Ce=Se.contextId,De=Se.setCallbacks,Ge=Se.sensors,mt=Se.nonce,gt=Se.dragHandleUsageInstructions,Ft=(0,ue.useRef)(null);ch();var jt=Hd(Se),Cn=Hn(function(){return qg(jt.current)},[jt]),Wn=Qs(Ce),On=Sc({contextId:Ce,text:gt}),Nn=Fs(Ce,mt),Fn=Hn(function(As){Kd(Ft).dispatch(As)},[]),qn=_n(function(){return(0,We.DE)({publishWhileDragging:La,updateDroppableScroll:Ea,updateDroppableIsEnabled:Js,updateDroppableIsCombineEnabled:Ha,collectionStarting:yl},Fn)},[Fn]),ki=cc(),Vr=_n(function(){return lo(ki,qn)},[ki,qn]),to=_n(function(){return ks((0,ot.Z)({scrollWindow:Wa,scrollDroppable:Vr.scrollDroppable},(0,We.DE)({move:ts},Fn)))},[Vr.scrollDroppable,Fn]),Po=Xu(Ce),To=_n(function(){return Na({announce:Wn,autoScroller:to,dimensionMarshal:Vr,focusMarshal:Po,getResponders:Cn,styleMarshal:Nn})},[Wn,to,Vr,Po,Cn,Nn]);Ft.current=To;var ea=Hn(function(){var As=Kd(Ft),Xl=As.getState();Xl.phase!=="IDLE"&&As.dispatch(Ua())},[]),Uo=Hn(function(){var As=Kd(Ft).getState();return As.isDragging||As.phase==="DROP_ANIMATING"},[]),Fa=_n(function(){return{isDragging:Uo,tryAbort:ea}},[Uo,ea]);De(Fa);var os=Hn(function(As){return Ba(Kd(Ft).getState(),As)},[]),Ts=Hn(function(){return Qt(Kd(Ft).getState())},[]),ou=_n(function(){return{marshal:Vr,focus:Po,contextId:Ce,canLift:os,isMovementAllowed:Ts,dragHandleUsageInstructionsId:On,registry:ki}},[Ce,Vr,On,Po,os,Ts,ki]);return Zp({contextId:Ce,store:To,registry:ki,customSensors:Ge,enableDefaultSensors:Se.enableDefaultSensors!==!1}),(0,ue.useEffect)(function(){return ea},[ea]),ue.createElement(_d.Provider,{value:ou},ue.createElement(de,{context:dc,store:To},Se.children))}var gf=0;function ep(){gf=0}function Vf(){return _n(function(){return""+gf++},[])}function xh(){ep(),cs()}function wg(Se){var Ce=Vf(),De=Se.dragHandleUsageInstructions||vo.dragHandleUsageInstructions;return ue.createElement(Oi,null,function(Ge){return ue.createElement(Kf,{nonce:Se.nonce,contextId:Ce,setCallbacks:Ge,dragHandleUsageInstructions:De,enableDefaultSensors:Se.enableDefaultSensors,sensors:Se.sensors,onBeforeCapture:Se.onBeforeCapture,onBeforeDragStart:Se.onBeforeDragStart,onDragStart:Se.onDragStart,onDragUpdate:Se.onDragUpdate,onDragEnd:Se.onDragEnd},Se.children)})}var Sh=function(Ce){return function(De){return Ce===De}},tp=Sh("scroll"),Uf=Sh("auto"),np=Sh("visible"),Ns=function(Ce,De){return De(Ce.overflowX)||De(Ce.overflowY)},Hh=function(Ce,De){return De(Ce.overflowX)&&De(Ce.overflowY)},Vd=function(Ce){var De=window.getComputedStyle(Ce),Ge={overflowX:De.overflowX,overflowY:De.overflowY};return Ns(Ge,tp)||Ns(Ge,Uf)},cu=function(){return!1;var Ce,De,Ge,mt},Wu=function Se(Ce){return Ce==null?null:Ce===document.body?cu()?Ce:null:Ce===document.documentElement?null:Vd(Ce)?Ce:Se(Ce.parentElement)},Zh=function(Se){if(Se)var Ce=Wu(Se.parentElement)},Ph=function(Se){return{x:Se.scrollLeft,y:Se.scrollTop}},Cg=function Se(Ce){if(!Ce)return!1;var De=window.getComputedStyle(Ce);return De.position==="fixed"?!0:Se(Ce.parentElement)},bg=function(Se){var Ce=Wu(Se),De=Cg(Se);return{closestScrollable:Ce,isFixedOnPage:De}},Eg=function(Se){var Ce=Se.descriptor,De=Se.isEnabled,Ge=Se.isCombineEnabled,mt=Se.isFixedOnPage,gt=Se.direction,Ft=Se.client,jt=Se.page,Cn=Se.closest,Wn=function(){if(!Cn)return null;var qn=Cn.scrollSize,ki=Cn.client,Vr=po({scrollHeight:qn.scrollHeight,scrollWidth:qn.scrollWidth,height:ki.paddingBox.height,width:ki.paddingBox.width});return{pageMarginBox:Cn.page.marginBox,frameClient:ki,scrollSize:qn,shouldClipSubject:Cn.shouldClipSubject,scroll:{initial:Cn.scroll,current:Cn.scroll,max:Vr,diff:{value:Qr,displacement:Qr}}}}(),On=gt==="vertical"?ci:xa,Nn=Jo({page:jt,withPlaceholder:null,axis:On,frame:Wn}),Fn={descriptor:Ce,isCombineEnabled:Ge,isFixedOnPage:mt,axis:On,isEnabled:De,client:Ft,page:jt,frame:Wn,subject:Nn};return Fn},Mg=function(Ce,De){var Ge=Hr(Ce);if(!De||Ce!==De)return Ge;var mt=Ge.paddingBox.top-De.scrollTop,gt=Ge.paddingBox.left-De.scrollLeft,Ft=mt+De.scrollHeight,jt=gt+De.scrollWidth,Cn={top:mt,right:jt,bottom:Ft,left:gt},Wn=_r(Cn,Ge.border),On=Ui({borderBox:Wn,margin:Ge.margin,border:Ge.border,padding:Ge.padding});return On},Lg=function(Se){var Ce=Se.ref,De=Se.descriptor,Ge=Se.env,mt=Se.windowScroll,gt=Se.direction,Ft=Se.isDropDisabled,jt=Se.isCombineEnabled,Cn=Se.shouldClipSubject,Wn=Ge.closestScrollable,On=Mg(Ce,Wn),Nn=Be(On,mt),Fn=function(){if(!Wn)return null;var ki=Hr(Wn),Vr={scrollHeight:Wn.scrollHeight,scrollWidth:Wn.scrollWidth};return{client:ki,page:Be(ki,mt),scroll:Ph(Wn),scrollSize:Vr,shouldClipSubject:Cn}}(),qn=Eg({descriptor:De,isEnabled:!Ft,isCombineEnabled:jt,isFixedOnPage:Ge.isFixedOnPage,direction:gt,client:On,page:Nn,closest:Fn});return qn},Ud={passive:!1},pf={passive:!0},Nd=function(Se){return Se.shouldPublishImmediately?Ud:pf};function Vs(Se){var Ce=(0,ue.useContext)(Se);return Ce||Rn(!1),Ce}var wh=function(Ce){return Ce&&Ce.env.closestScrollable||null};function Fg(Se){var Ce=(0,ue.useRef)(null),De=Vs(_d),Ge=Ll("droppable"),mt=De.registry,gt=De.marshal,Ft=Hd(Se),jt=_n(function(){return{id:Se.droppableId,type:Se.type,mode:Se.mode}},[Se.droppableId,Se.mode,Se.type]),Cn=(0,ue.useRef)(jt),Wn=_n(function(){return Gn(function(Uo,Fa){Ce.current||Rn(!1);var os={x:Uo,y:Fa};gt.updateDroppableScroll(jt.id,os)})},[jt.id,gt]),On=Hn(function(){var Uo=Ce.current;return!Uo||!Uo.env.closestScrollable?Qr:Ph(Uo.env.closestScrollable)},[]),Nn=Hn(function(){var Uo=On();Wn(Uo.x,Uo.y)},[On,Wn]),Fn=_n(function(){return Wt(Nn)},[Nn]),qn=Hn(function(){var Uo=Ce.current,Fa=wh(Uo);Uo&&Fa||Rn(!1);var os=Uo.scrollOptions;if(os.shouldPublishImmediately){Nn();return}Fn()},[Fn,Nn]),ki=Hn(function(Uo,Fa){Ce.current&&Rn(!1);var os=Ft.current,Ts=os.getDroppableRef();Ts||Rn(!1);var ou=bg(Ts),As={ref:Ts,descriptor:jt,env:ou,scrollOptions:Fa};Ce.current=As;var Xl=Lg({ref:Ts,descriptor:jt,env:ou,windowScroll:Uo,direction:os.direction,isDropDisabled:os.isDropDisabled,isCombineEnabled:os.isCombineEnabled,shouldClipSubject:!os.ignoreContainerClipping}),Gu=ou.closestScrollable;return Gu&&(Gu.setAttribute(Hs.contextId,De.contextId),Gu.addEventListener("scroll",qn,Nd(As.scrollOptions))),Xl},[De.contextId,jt,qn,Ft]),Vr=Hn(function(){var Uo=Ce.current,Fa=wh(Uo);return Uo&&Fa||Rn(!1),Ph(Fa)},[]),to=Hn(function(){var Uo=Ce.current;Uo||Rn(!1);var Fa=wh(Uo);Ce.current=null,Fa&&(Fn.cancel(),Fa.removeAttribute(Hs.contextId),Fa.removeEventListener("scroll",qn,Nd(Uo.scrollOptions)))},[qn,Fn]),Po=Hn(function(Uo){var Fa=Ce.current;Fa||Rn(!1);var os=wh(Fa);os||Rn(!1),os.scrollTop+=Uo.y,os.scrollLeft+=Uo.x},[]),To=_n(function(){return{getDimensionAndWatchScroll:ki,getScrollWhileDragging:Vr,dragStopped:to,scroll:Po}},[to,ki,Vr,Po]),ea=_n(function(){return{uniqueId:Ge,descriptor:jt,callbacks:To}},[To,jt,Ge]);El(function(){return Cn.current=ea.descriptor,mt.droppable.register(ea),function(){Ce.current&&to(),mt.droppable.unregister(ea)}},[To,jt,to,ea,gt,mt.droppable]),El(function(){Ce.current&>.updateDroppableIsEnabled(Cn.current.id,!Se.isDropDisabled)},[Se.isDropDisabled,gt]),El(function(){Ce.current&>.updateDroppableIsCombineEnabled(Cn.current.id,Se.isCombineEnabled)},[Se.isCombineEnabled,gt])}function Yd(){}var Ch={width:0,height:0,margin:$n},mf=function(Ce){var De=Ce.isAnimatingOpenOnMount,Ge=Ce.placeholder,mt=Ce.animate;return De||mt==="close"?Ch:{height:Ge.client.borderBox.height,width:Ge.client.borderBox.width,margin:Ge.client.margin}},ip=function(Ce){var De=Ce.isAnimatingOpenOnMount,Ge=Ce.placeholder,mt=Ce.animate,gt=mf({isAnimatingOpenOnMount:De,placeholder:Ge,animate:mt});return{display:Ge.display,boxSizing:"border-box",width:gt.width,height:gt.height,marginTop:gt.margin.top,marginRight:gt.margin.right,marginBottom:gt.margin.bottom,marginLeft:gt.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:mt!=="none"?el.placeholder:null}};function nu(Se){var Ce=(0,ue.useRef)(null),De=Hn(function(){Ce.current&&(clearTimeout(Ce.current),Ce.current=null)},[]),Ge=Se.animate,mt=Se.onTransitionEnd,gt=Se.onClose,Ft=Se.contextId,jt=(0,ue.useState)(Se.animate==="open"),Cn=jt[0],Wn=jt[1];(0,ue.useEffect)(function(){return Cn?Ge!=="open"?(De(),Wn(!1),Yd):Ce.current?Yd:(Ce.current=setTimeout(function(){Ce.current=null,Wn(!1)}),De):Yd},[Ge,Cn,De]);var On=Hn(function(Fn){Fn.propertyName==="height"&&(mt(),Ge==="close"&>())},[Ge,gt,mt]),Nn=ip({isAnimatingOpenOnMount:Cn,animate:Se.animate,placeholder:Se.placeholder});return ue.createElement(Se.placeholder.tagName,{style:Nn,"data-rbd-placeholder-context-id":Ft,onTransitionEnd:On,ref:Se.innerRef})}var rp=ue.memo(nu),Xd=ue.createContext(null);function hd(Se){Se&&Ks(Se)||Rn(!1)}function bh(Se){return typeof Se=="boolean"}function ie(Se,Ce){Ce.forEach(function(De){return De(Se)})}var ae=[function(Ce){var De=Ce.props;De.droppableId||Rn(!1),typeof De.droppableId!="string"&&Rn(!1)},function(Ce){var De=Ce.props;bh(De.isDropDisabled)||Rn(!1),bh(De.isCombineEnabled)||Rn(!1),bh(De.ignoreContainerClipping)||Rn(!1)},function(Ce){var De=Ce.getDroppableRef;hd(De())}],ge=[function(Ce){var De=Ce.props,Ge=Ce.getPlaceholderRef;if(De.placeholder)var mt=Ge()}],fe=[function(Ce){var De=Ce.props;De.renderClone||Rn(!1)},function(Ce){var De=Ce.getPlaceholderRef;De()&&Rn(!1)}];function xe(Se){Tl(function(){ie(Se,ae),Se.props.mode==="standard"&&ie(Se,ge),Se.props.mode==="virtual"&&ie(Se,fe)})}var Oe=function(Se){Ze(Ce,Se);function Ce(){for(var Ge,mt=arguments.length,gt=new Array(mt),Ft=0;Ft<mt;Ft++)gt[Ft]=arguments[Ft];return Ge=Se.call.apply(Se,[this].concat(gt))||this,Ge.state={isVisible:!!Ge.props.on,data:Ge.props.on,animate:Ge.props.shouldAnimate&&Ge.props.on?"open":"none"},Ge.onClose=function(){Ge.state.animate==="close"&&Ge.setState({isVisible:!1})},Ge}Ce.getDerivedStateFromProps=function(mt,gt){return mt.shouldAnimate?mt.on?{isVisible:!0,data:mt.on,animate:"open"}:gt.isVisible?{isVisible:!0,data:gt.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!mt.on,data:mt.on,animate:"none"}};var De=Ce.prototype;return De.render=function(){if(!this.state.isVisible)return null;var mt={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(mt)},Ce}(ue.PureComponent),Ve={dragging:5e3,dropAnimating:4500},ht=function(Ce,De){return De?el.drop(De.duration):Ce?el.snap:el.fluid},ut=function(Ce,De){return Ce?De?Os.opacity.drop:Os.opacity.combining:null},kt=function(Ce){return Ce.forceShouldAnimate!=null?Ce.forceShouldAnimate:Ce.mode==="SNAP"};function An(Se){var Ce=Se.dimension,De=Ce.client,Ge=Se.offset,mt=Se.combineWith,gt=Se.dropping,Ft=!!mt,jt=kt(Se),Cn=!!gt,Wn=Cn?Vl.drop(Ge,Ft):Vl.moveTo(Ge),On={position:"fixed",top:De.marginBox.top,left:De.marginBox.left,boxSizing:"border-box",width:De.borderBox.width,height:De.borderBox.height,transition:ht(jt,gt),transform:Wn,opacity:ut(Ft,Cn),zIndex:Cn?Ve.dropAnimating:Ve.dragging,pointerEvents:"none"};return On}function Yt(Se){return{transform:Vl.moveTo(Se.offset),transition:Se.shouldAnimateDisplacement?null:"none"}}function oi(Se){return Se.type==="DRAGGING"?An(Se):Yt(Se)}function ei(Se,Ce,De){De===void 0&&(De=Qr);var Ge=window.getComputedStyle(Ce),mt=Ce.getBoundingClientRect(),gt=Xr(mt,Ge),Ft=Be(gt,De),jt={client:gt,tagName:Ce.tagName.toLowerCase(),display:Ge.display},Cn={x:gt.marginBox.width,y:gt.marginBox.height},Wn={descriptor:Se,placeholder:jt,displaceBy:Cn,client:gt,page:Ft};return Wn}function rr(Se){var Ce=Ll("draggable"),De=Se.descriptor,Ge=Se.registry,mt=Se.getDraggableRef,gt=Se.canDragInteractiveElements,Ft=Se.shouldRespectForcePress,jt=Se.isEnabled,Cn=_n(function(){return{canDragInteractiveElements:gt,shouldRespectForcePress:Ft,isEnabled:jt}},[gt,jt,Ft]),Wn=Hn(function(qn){var ki=mt();return ki||Rn(!1),ei(De,ki,qn)},[De,mt]),On=_n(function(){return{uniqueId:Ce,descriptor:De,options:Cn,getDimension:Wn}},[De,Wn,Cn,Ce]),Nn=(0,ue.useRef)(On),Fn=(0,ue.useRef)(!0);El(function(){return Ge.draggable.register(Nn.current),function(){return Ge.draggable.unregister(Nn.current)}},[Ge.draggable]),El(function(){if(Fn.current){Fn.current=!1;return}var qn=Nn.current;Nn.current=On,Ge.draggable.update(On,qn)},[On,Ge.draggable])}function hr(Se,Ce,De){Tl(function(){function Ge(gt){return"Draggable[id: "+gt+"]: "}var mt=Se.draggableId;mt||Rn(!1),typeof mt!="string"&&Rn(!1),ua(Se.index)||Rn(!1),Se.mapped.type!=="DRAGGING"&&(hd(De()),Se.isEnabled&&(Zs(Ce,mt)||Rn(!1)))})}function Br(Se){}function uo(Se){Se.preventDefault()}function zo(Se){var Ce=(0,ue.useRef)(null),De=Hn(function(As){Ce.current=As},[]),Ge=Hn(function(){return Ce.current},[]),mt=Vs(_d),gt=mt.contextId,Ft=mt.dragHandleUsageInstructionsId,jt=mt.registry,Cn=Vs(Xd),Wn=Cn.type,On=Cn.droppableId,Nn=_n(function(){return{id:Se.draggableId,index:Se.index,type:Wn,droppableId:On}},[Se.draggableId,Se.index,Wn,On]),Fn=Se.children,qn=Se.draggableId,ki=Se.isEnabled,Vr=Se.shouldRespectForcePress,to=Se.canDragInteractiveElements,Po=Se.isClone,To=Se.mapped,ea=Se.dropAnimationFinished;if(hr(Se,gt,Ge),Br(Po),!Po){var Uo=_n(function(){return{descriptor:Nn,registry:jt,getDraggableRef:Ge,canDragInteractiveElements:to,shouldRespectForcePress:Vr,isEnabled:ki}},[Nn,jt,Ge,to,Vr,ki]);rr(Uo)}var Fa=_n(function(){return ki?{tabIndex:0,role:"button","aria-describedby":Ft,"data-rbd-drag-handle-draggable-id":qn,"data-rbd-drag-handle-context-id":gt,draggable:!1,onDragStart:uo}:null},[gt,Ft,qn,ki]),os=Hn(function(As){To.type==="DRAGGING"&&To.dropping&&As.propertyName==="transform"&&ea()},[ea,To]),Ts=_n(function(){var As=oi(To),Xl=To.type==="DRAGGING"&&To.dropping?os:null,Gu={innerRef:De,draggableProps:{"data-rbd-draggable-context-id":gt,"data-rbd-draggable-id":qn,style:As,onTransitionEnd:Xl},dragHandleProps:Fa};return Gu},[gt,Fa,qn,To,os,De]),ou=_n(function(){return{draggableId:Nn.id,type:Nn.type,source:{index:Nn.index,droppableId:Nn.droppableId}}},[Nn.droppableId,Nn.id,Nn.index,Nn.type]);return Fn(Ts,To.snapshot,ou)}var No=function(Se,Ce){return Se===Ce},Yo=function(Se){var Ce=Se.combine,De=Se.destination;return De?De.droppableId:Ce?Ce.droppableId:null},Oa=function(Ce){return Ce.combine?Ce.combine.draggableId:null},Bo=function(Ce){return Ce.at&&Ce.at.type==="COMBINE"?Ce.at.combine.draggableId:null};function qa(){var Se=Gn(function(mt,gt){return{x:mt,y:gt}}),Ce=Gn(function(mt,gt,Ft,jt,Cn){return{isDragging:!0,isClone:gt,isDropAnimating:!!Cn,dropAnimation:Cn,mode:mt,draggingOver:Ft,combineWith:jt,combineTargetFor:null}}),De=Gn(function(mt,gt,Ft,jt,Cn,Wn,On){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:Cn,combineWith:Wn,mode:gt,offset:mt,dimension:Ft,forceShouldAnimate:On,snapshot:Ce(gt,jt,Cn,Wn,null)}}}),Ge=function(gt,Ft){if(gt.isDragging){if(gt.critical.draggable.id!==Ft.draggableId)return null;var jt=gt.current.client.offset,Cn=gt.dimensions.draggables[Ft.draggableId],Wn=mr(gt.impact),On=Bo(gt.impact),Nn=gt.forceShouldAnimate;return De(Se(jt.x,jt.y),gt.movementMode,Cn,Ft.isClone,Wn,On,Nn)}if(gt.phase==="DROP_ANIMATING"){var Fn=gt.completed;if(Fn.result.draggableId!==Ft.draggableId)return null;var qn=Ft.isClone,ki=gt.dimensions.draggables[Ft.draggableId],Vr=Fn.result,to=Vr.mode,Po=Yo(Vr),To=Oa(Vr),ea=gt.dropDuration,Uo={duration:ea,curve:gs.drop,moveTo:gt.newHomeClientOffset,opacity:To?Os.opacity.drop:null,scale:To?Os.scale.drop:null};return{mapped:{type:"DRAGGING",offset:gt.newHomeClientOffset,dimension:ki,dropping:Uo,draggingOver:Po,combineWith:To,mode:to,forceShouldAnimate:null,snapshot:Ce(to,qn,Po,To,Uo)}}}return null};return Ge}function dl(Se){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:Se,combineWith:null}}var du={mapped:{type:"SECONDARY",offset:Qr,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:dl(null)}};function Fl(){var Se=Gn(function(Ft,jt){return{x:Ft,y:jt}}),Ce=Gn(dl),De=Gn(function(Ft,jt,Cn){return jt===void 0&&(jt=null),{mapped:{type:"SECONDARY",offset:Ft,combineTargetFor:jt,shouldAnimateDisplacement:Cn,snapshot:Ce(jt)}}}),Ge=function(jt){return jt?De(Qr,jt,!0):null},mt=function(jt,Cn,Wn,On){var Nn=Wn.displaced.visible[jt],Fn=!!(On.inVirtualList&&On.effected[jt]),qn=ls(Wn),ki=qn&&qn.draggableId===jt?Cn:null;if(!Nn){if(!Fn)return Ge(ki);if(Wn.displaced.invisible[jt])return null;var Vr=pr(On.displacedBy.point),to=Se(Vr.x,Vr.y);return De(to,ki,!0)}if(Fn)return Ge(ki);var Po=Wn.displacedBy.point,To=Se(Po.x,Po.y);return De(To,ki,Nn.shouldAnimate)},gt=function(jt,Cn){if(jt.isDragging)return jt.critical.draggable.id===Cn.draggableId?null:mt(Cn.draggableId,jt.critical.draggable.id,jt.impact,jt.afterCritical);if(jt.phase==="DROP_ANIMATING"){var Wn=jt.completed;return Wn.result.draggableId===Cn.draggableId?null:mt(Cn.draggableId,Wn.result.draggableId,Wn.impact,Wn.afterCritical)}return null};return gt}var qu=function(){var Ce=qa(),De=Fl(),Ge=function(gt,Ft){return Ce(gt,Ft)||De(gt,Ft)||du};return Ge},Lu={dropAnimationFinished:mi},iu=it(qu,Lu,null,{context:dc,pure:!0,areStatePropsEqual:No})(zo);function ec(Se){var Ce=Vs(Xd),De=Ce.isUsingCloneFor;return De===Se.draggableId&&!Se.isClone?null:ue.createElement(iu,Se)}function vu(Se){var Ce=typeof Se.isDragDisabled=="boolean"?!Se.isDragDisabled:!0,De=!!Se.disableInteractiveElementBlocking,Ge=!!Se.shouldRespectForcePress;return ue.createElement(ec,(0,ot.Z)({},Se,{isClone:!1,isEnabled:Ce,canDragInteractiveElements:De,shouldRespectForcePress:Ge}))}function ru(Se){var Ce=(0,ue.useContext)(_d);Ce||Rn(!1);var De=Ce.contextId,Ge=Ce.isMovementAllowed,mt=(0,ue.useRef)(null),gt=(0,ue.useRef)(null),Ft=Se.children,jt=Se.droppableId,Cn=Se.type,Wn=Se.mode,On=Se.direction,Nn=Se.ignoreContainerClipping,Fn=Se.isDropDisabled,qn=Se.isCombineEnabled,ki=Se.snapshot,Vr=Se.useClone,to=Se.updateViewportMaxScroll,Po=Se.getContainerForClone,To=Hn(function(){return mt.current},[]),ea=Hn(function(tc){mt.current=tc},[]),Uo=Hn(function(){return gt.current},[]),Fa=Hn(function(tc){gt.current=tc},[]);xe({props:Se,getDroppableRef:To,getPlaceholderRef:Uo});var os=Hn(function(){Ge()&&to({maxScroll:Fo()})},[Ge,to]);Fg({droppableId:jt,type:Cn,mode:Wn,direction:On,isDropDisabled:Fn,isCombineEnabled:qn,ignoreContainerClipping:Nn,getDroppableRef:To});var Ts=ue.createElement(Oe,{on:Se.placeholder,shouldAnimate:Se.shouldAnimatePlaceholder},function(tc){var fd=tc.onClose,Bc=tc.data,Cc=tc.animate;return ue.createElement(rp,{placeholder:Bc,onClose:fd,innerRef:Fa,animate:Cc,contextId:De,onTransitionEnd:os})}),ou=_n(function(){return{innerRef:ea,placeholder:Ts,droppableProps:{"data-rbd-droppable-id":jt,"data-rbd-droppable-context-id":De}}},[De,jt,Ts,ea]),As=Vr?Vr.dragging.draggableId:null,Xl=_n(function(){return{droppableId:jt,type:Cn,isUsingCloneFor:As}},[jt,As,Cn]);function Gu(){if(!Vr)return null;var tc=Vr.dragging,fd=Vr.render,Bc=ue.createElement(ec,{draggableId:tc.draggableId,index:tc.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(Cc,xu){return fd(Cc,xu,tc)});return bn.createPortal(Bc,Po())}return ue.createElement(Xd.Provider,{value:Xl},Ft(ou,ki),Gu())}var Bs=function(Ce,De){return Ce===De.droppable.type},Nl=function(Ce,De){return De.draggables[Ce.draggable.id]},pu=function(){var Ce={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},De=(0,ot.Z)({},Ce,{shouldAnimatePlaceholder:!1}),Ge=Gn(function(Ft){return{draggableId:Ft.id,type:Ft.type,source:{index:Ft.index,droppableId:Ft.droppableId}}}),mt=Gn(function(Ft,jt,Cn,Wn,On,Nn){var Fn=On.descriptor.id,qn=On.descriptor.droppableId===Ft;if(qn){var ki=Nn?{render:Nn,dragging:Ge(On.descriptor)}:null,Vr={isDraggingOver:Cn,draggingOverWith:Cn?Fn:null,draggingFromThisWith:Fn,isUsingPlaceholder:!0};return{placeholder:On.placeholder,shouldAnimatePlaceholder:!1,snapshot:Vr,useClone:ki}}if(!jt)return De;if(!Wn)return Ce;var to={isDraggingOver:Cn,draggingOverWith:Fn,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:On.placeholder,shouldAnimatePlaceholder:!0,snapshot:to,useClone:null}}),gt=function(jt,Cn){var Wn=Cn.droppableId,On=Cn.type,Nn=!Cn.isDropDisabled,Fn=Cn.renderClone;if(jt.isDragging){var qn=jt.critical;if(!Bs(On,qn))return De;var ki=Nl(qn,jt.dimensions),Vr=mr(jt.impact)===Wn;return mt(Wn,Nn,Vr,Vr,ki,Fn)}if(jt.phase==="DROP_ANIMATING"){var to=jt.completed;if(!Bs(On,to.critical))return De;var Po=Nl(to.critical,jt.dimensions);return mt(Wn,Nn,Yo(to.result)===Wn,mr(to.impact)===Wn,Po,Fn)}if(jt.phase==="IDLE"&&jt.completed&&!jt.shouldFlush){var To=jt.completed;if(!Bs(On,To.critical))return De;var ea=mr(To.impact)===Wn,Uo=!!(To.impact.at&&To.impact.at.type==="COMBINE"),Fa=To.critical.droppable.id===Wn;return ea?Uo?Ce:De:Fa?Ce:De}return De};return gt},yu={updateViewportMaxScroll:Rs};function _c(){return document.body||Rn(!1),document.body}var Bl={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:_c},wc=it(pu,yu,null,{context:dc,pure:!0,areStatePropsEqual:No})(ru);wc.defaultProps=Bl},38486:function(zn,En){"use strict";var me;var ue=60103,Re=60106,Ze=60107,ot=60108,We=60114,lt=60109,Me=60110,Mt=60112,Ct=60113,Ye=60120,st=60115,pt=60116,wt=60121,Ie=60122,te=60117,ee=60129,de=60131;if(typeof Symbol=="function"&&Symbol.for){var se=Symbol.for;ue=se("react.element"),Re=se("react.portal"),Ze=se("react.fragment"),ot=se("react.strict_mode"),We=se("react.profiler"),lt=se("react.provider"),Me=se("react.context"),Mt=se("react.forward_ref"),Ct=se("react.suspense"),Ye=se("react.suspense_list"),st=se("react.memo"),pt=se("react.lazy"),wt=se("react.block"),Ie=se("react.server.block"),te=se("react.fundamental"),ee=se("react.debug_trace_mode"),de=se("react.legacy_hidden")}function he(bt){if(typeof bt=="object"&&bt!==null){var et=bt.$$typeof;switch(et){case ue:switch(bt=bt.type,bt){case Ze:case We:case ot:case Ct:case Ye:return bt;default:switch(bt=bt&&bt.$$typeof,bt){case Me:case Mt:case pt:case st:case lt:return bt;default:return et}}case Re:return et}}}var ve=lt,be=ue,Ne=Mt,Fe=Ze,je=pt,ze=st,Xe=Re,Je=We,dt=ot,He=Ct;me=Me,me=ve,me=be,me=Ne,me=Fe,me=je,me=ze,me=Xe,me=Je,me=dt,me=He,me=function(){return!1},me=function(){return!1},En.isContextConsumer=function(bt){return he(bt)===Me},me=function(bt){return he(bt)===lt},me=function(bt){return typeof bt=="object"&&bt!==null&&bt.$$typeof===ue},me=function(bt){return he(bt)===Mt},me=function(bt){return he(bt)===Ze},me=function(bt){return he(bt)===pt},me=function(bt){return he(bt)===st},me=function(bt){return he(bt)===Re},me=function(bt){return he(bt)===We},me=function(bt){return he(bt)===ot},me=function(bt){return he(bt)===Ct},me=function(bt){return typeof bt=="string"||typeof bt=="function"||bt===Ze||bt===We||bt===ee||bt===ot||bt===Ct||bt===Ye||bt===de||typeof bt=="object"&&bt!==null&&(bt.$$typeof===pt||bt.$$typeof===st||bt.$$typeof===lt||bt.$$typeof===Me||bt.$$typeof===Mt||bt.$$typeof===te||bt.$$typeof===wt||bt[0]===Ie)},me=he},53410:function(zn,En,me){"use strict";zn.exports=me(38486)},32637:function(zn,En,me){"use strict";zn.exports=me.p+"static/AssistantCode3.a8740efb.jpeg"},93314:function(zn){"use strict";zn.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=="},73631:function(zn){"use strict";zn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAZxJREFUOBGtlL1Ow0AMgH2XUIkOLFXVASgTsDHxBIAEzAwMPBQjT8AATGVBgEBCYmHmFcICYmBogCbNYSe52HUTVZWwFJ3PP599Z+WMcy6Af5SwYkWnLYifTyBzq5XNK8YNwbbvYP381ZuaVlN1+HJwAc4d1QYaA+gDsHYANrhGHTdCMtSDMILtwSMDn7ZiANPKwyjeQ0Reo4r1gEoEwRkDb7spdPcBeocMk1Cv00oii5L+fgPwcR/zHfb3AJY2sEpUVLOUhB/l+w7I1iS9TYDFrM3AzhqGDstPZ3li2Z12U2WLvk4fGJh+F0elYN8ZrbWiA7igAP4WR6sFzDAKPgPHP0VnlMsFS5IyyIGoeAamCKybYI5UQLWVE2fgGI/s72wqQXRd9jyxiHgGJtihFxGQm8Qd5XvtF3fEQOrQH9mDm1Z9hyJuEphXIq9uSWSQqv8a4RbAUTFdcs7gifwplYGjT3wzbPFz6Q70EZv8WZoxMP66ApMc86inirNBA8njcFIuvOTXhowPyzuQJiukzi3hQgS7b+I9nJtQn/AHsLGsvlcPPWsAAAAASUVORK5CYII="},31328:function(zn){"use strict";zn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAodJREFUOBGtU0trFEEQ/qZnM5NsWBCfSEjwQdSggmAieAv4uOnFg5eIXgTvEY+ePJqToDf9AcZDFAUF8SgEQUxAjC6+QlhX4xo0G93ZnRnr697umSyKBCyY/aqqq76q6uoF/rN4lu/BmzSsLGFM7P4kAZQCiBTR64nCw/MHvRnj+fuvI7zxtDWJJD1lQulO5TPHnkAqpuAUFKZUqg8da8xI35+/cMh77AjHJ5cakh/oqHa2ZhGHpSb+STxJZA3lqesFG1CuLAdsqLfbb/dlTwQ7GdmG9VGVBuoNfT/nHGHUSnByeAN2binmmDK1gyM7aGvl6gruPvtadCOfvVlxN0PFjsF4qxMptjl7BflirsPAVxJoQjy5eUMqq6bkMgbWF7C4HGMlsnRmZE82xtEdYSwGnRTuhCvVqG3T8bGhHpweKaFWj3HpzqI7Z16SmHxHmKbcVE7yBs+k1uBm8wh6Q4VQJvrZMkEp98EGBB2h3pFUMWJmPLKniKGtXZhZiLC/L8CLhQbmqhHefmmi3pRYOwInY65gRiiM+ZEP9Ic4c7ik+Ye3dePK/W94/bmpbVNO4u2S2rmrOmRvtkEmlHraC9EUgEzo/optVwZM4IiCLivR1WhywwrT75p4WYlkqhTT7xs4vreIke2h3KWHTaUClC/ZnsR3fOTWMnarZi/QulYhr2l0MMDorhA7NhbwodbC5Xs/9FT5d+s6lJJSzHxWJ9ov9Xw8KceYX9LrQ9+6LF6pgs4luqVIIl+G69gp0id1tk+8/byJ77+AV9UEiRTJMnQMOYycuPZpNuhS+7TF+fgkiBSr55+J9eXOm1E86wjpPzrx8aI8hd3U1yryrOcejQ9cXWveP+N/A79g8eaXNDk4AAAAAElFTkSuQmCC"},96908:function(zn){"use strict";zn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAA8CAYAAADogBFvAAAAAXNSR0IArs4c6QAADzxJREFUeF7tnQl4VcUVx3/3JSEBARFEFllcQAMJuKDUD7FqtVbFtUqtS6ufS1soxaW1Si0KBaFVWy2ittqqdQ9xpYq4tLgVFWUThYQlJIEkkJXs63u333lzL+/mrfeF9/KSeM/35Xv3zZw5c+bM/83MOTN3ouGQY4EuZAGtC+niqOJYAAeQDgi6lAU0fUayHqCR5gJXEriS/T6TICkZNOMzIN/gFx7/8vvLiFxDtpfP4G2Xb5Ej6SaPKddav6mPtb5g9e/PF9nSvmTVlpD1S36Sr63WOj1ukD/d+PR+b1NpAekmj5Gve8Dd5lc2ivK4G2lzV4K7Eo/8eSrQ3ZW424rw6J/ST1utTb2jtkuhLAplwgDS7BDj09txdgFqgsjCbwVOKMCYAPH+IAzABIDf8qPYz+OygMus0+8HFQDmYDpaypj1mp+m/qKbgMoKQO+zxwIyCzhNPhOIQQFrAas/uK3l5dlt/SEY9bbn0ZsrS1obynfXNJQXFTeUbPugua5utQZrM7PZHgU2EsIaHJAJUcWp1JYFklKgVx/fX0oqpPSBgw6BASOh/xAlxgC+u6WJqh0bqdi2nrb66gI0sjQXL2W8xHpb9XUykwPITjZ43KuTpcnBw2HA4TBwFBw81Dt66+42aoq2U7FjAw0Ve8R52KxpLB6v86KWjTvuetmswAGkTUN1W7aDBsHIieiHjkVDlhpuavbkU7ThE9wtjQLMbTosyFzGc5pGoD/RyQ13ANnJBk9YdSm9YVg6+tB0NC2ZtqZ6dn/1P+rKirwqaRqrknVuSM9mZ8J0FD2CetmJ1MipO74WkPXn0VOg72CvY1ZRuJU9uRvQPW4ZLes0jdszlvG3+CoRWroDyERZPtH1Dk1HH56B5vHQWFvJzrUf42lrUaMlPJ4BMxOxtnQAmWhgJLL+3gPQR5+E1qsPDdXl5G9YjUdipIreGpzGFUOfpb4zVXQA2ZnW7op1paSiH30qWlIqdVWlFGz6Al1ipmqkXH0wnD0ym8bOUt0BZGdZuivXk9IH/ajJaK4Uasr3UJizUQX/Fb2WOZ7LtfniosefHEDG38bdo4bUvuijJqG5XFQU5VOSv22/3hr8NTObWzqjIQ4gO8PK3aWO3v3RR57gHR13blpHQ121FZTTM7N5Od5NcQAZbwt3N/mDjvDu8jQ11rHj6/XoskevqKxXMuOPfZHyeDbJAWQ8rdsdZct2zYjj0VJS2bu7gLLiXdZRMiszmx/Hs1kOIONp3e4qO60/+rBx6O5WdmzeRHOTz8lO0pg2fhkr4tU0B5Dxsmx3lytTd99B1FZVUZC31dqanMzxTNDmsz9gGcumOoCMpTV7kixXEvrwCV4HZ1vuZlqamqytu2VCNn+NR3MdQMbDqj1Epj5wBFqfgVSU7qWkWB3CENKgEhibme39jCklBpCysf/H3aohrY1w64CYNqrLCJOziRJg1hN+qqtjJklJQx88xrudmJuzBY+cVveBcmlmNr/qmODQpRIHyPuKlVYtjXBL/1i3K7HyDh4Gp94IU2+Ee0+A+pgPJJ3WPn3QEWgpvSkpKaaiosJabxsuJk7IYksslXEAGUtrmrIW5sHAkerb7UO6NSBJ6wcDhnvXkFu354HlDK8GKzOzOS+WJnQAGUtrmrIW5atXCHoCIDXwDDwSlyuJvIICGhran7OIdRjIAaQDyIgW0PsNRkvtR2l5OaXlAcuPmIaBuh4gp1wP/QYrI338ODRUBRpM0+Cc36p0OVT6nwd9PIcdAydcqr7nroL8NXDi5TBmKoyepPgL16n0dS+3dzgGjoaTjY0If7n+Wow+GdK/p1Jr9sC+Ihg1SX0X3Xob6+K3F0FLg0r/egUUbWovSRy8SdNh5PEw4jho2Ae71sOuDbDhVaWvP1nbWLIZvvo3TLwQvjtDvdQlaf+eB2Uxeuu1V2/oP4yGhnryCn3etqmWS+PmjGUsiYhsGwxdD5C/WwsjJirV7xkX3KjyPvZSY+poqoXbBvqaetzF8HPjDMAbc2HIWDjlp8FNsfldePIaH+iTU2FxIRxkyHvgu5D3afCyM5dDprF8emuBN4jM6TPDm/zZG+HTf/l4xpwG1z/nXaMFpYIv4fHpUGVEJEwmaxu/eBFyP4Br/t5exMPnwZb3bUDADouGPmiU9+3FnLxC3BZvW0rHMgzUswEpI5O8Q9LaDAVroHgzDE2H0SdB6kGqJyryYdFJ0GicbLnsfjjLOGn1yT/ghRmBPSajmgBXLg+Qwwd3j4WzboXTDV4J95jkPZxghH2e+xl89ozKEVDdlKVu8RAq/lqNikm91Eg++GiVXlsGD52tRr1ggCz+BgaPAXk/20oxBSTo/YagJfdiV8lequuMEd9SnwYxCQP1bECKwerK4ZELQUYbk2RbbNZbMOQYlbJyMSy/Wz3LdDjvG/XcWAN3Hg6t7XYp4IxZ8CNjmSCj7NJp7cEQyamRH8m8zT7H54WZ8MkTPhlyO4ZM+xcvUGkb3oDHLw8OSDP1m3fgw0ehtlSBWUb2ysL2eh3It7T+iMddVV1LUVnQMFZMwkA9H5CPXQqb3gzsChlVBBSyHm2uh7ljFHiFbn4Pjj1DPT/1U5Bp0Uq/XQ1HnKxSnrgC1r8aHSAvnAfn3aXKfPYsPHN9cKiYywIJrC+a5Ft/WqfsSDIOBITWsnJjRr/DaG1pIbewJKjUWISBejYgZTqeOzZ0l9zyPhxzusp/7BLY9JZ6FifjhhfUc85/YckPfDKsI6iMRnNGq3t+rBRphJyzBuQgrNBD34etHwTXcfLVcN3TKu/d++H136lnKyDlx3TXkcGdv1iB0ZTT7zDv0/aiMppaWoNKP9AwUM8G5Fdvwt8MjzuY+ab/Bc40dr+yfw2rDEdRRgMBlXSArAFl9KwyzgVaR7f3HoDX5gRKjgTIh6rV2lZow+uBSwJTojhX489R32QUltHYH5A7P4P7T4s19ILLk2k7JY3SqhpK99WFqvOAwkA9G5Af/R1emhW6s865HS5ZpPJXLYXsW328Fy+EH9yhvi+/B1YafH/YCoceqdLnZUBpu6NZKj0cICVgLvnRkoSCFk8OBOSXy+DJq6OV1jH+5F6Q1p/G5mZ2lAQJxxlSDyQMFHtATpgGR56iVNvyHmz7KLDxstcrXqpQUx3cdoiPJ5ZhnzUvwNPXhjb+tLth2lyV/86f4I3f+3jF8Zmfq+6SLNsB96TDUVPgNx8qHmnXg2cFlx0OkDIyPrhPrV2FJNbqe8MvtK4S3go2Zcv6Vta5nUGicp9B3vuBcooraXMHfxHxQMJAsQfkRQvg3DuVeazeq9Vgo06EOz9XKXu3wvwMX651fbXgeCgxPF5reQlgLzSCvuHikOJpSiwxFF3zBEy5TuU+exN8aqzXTP5fvgkZxvrxz2fC5CvhtJ+p3KevgzXPRw9IKWHd6w41yoYDmH8csrMAKTql9vWGqoqr6qisaw6pZUfDQLEH5Hd+Atc+qRRdmw3/vCpQaStPzn9gybk+nl+8BhMvUN+XXgCb3wksf+1T8J1rVHo4QMoux7xxwcMfElwXUJt7zg+cDnmr29clux+/MDxoGW0zzlVBc9lNmTMy9Nov0hpy1goY/31Vl3/Ix6rB8ZfACT9UKRJe+vw59ZxIQMq0nZJGbUMzBRVhL7XoUBgo9oCUoPMdxu6GBKQXTIByy4VaKWnwm4/VVpnQf5fAy7/2dcP0B+FMY90XbMo9fCLM+UJNpZEAKflfZqndGH8SZ0acGiEJSC82wjhWPokH3pvnA62ZJ/G+rJsDZZop1nWmePni7VvpuIvg56+oFNlynJ8JzX5OgswCd63zbUH+5Xuw/ePEA1KWGvIOt9vNlr21eDyhz3p2JAwUe0CKyWavhHRjfVVXoUAni38x8ik/geHGFC33yMgIZu2wcWfDr972dZ/slnz+PNTuhaNPhUvuVd6vSeFGSPGQBbjrXoH3/gxl22BIOpz0I593LXIevQi+ttRpBc/5c+ECI2hupt8rMcGvQgPSGk6SsFHO+2rPXLxyk2a8DrLeFirdrtaHEryXy0ZlmTD5Kt9uzTcrVXDfpESOkKKD7G3rOruqmqhuCv9qjcvF+RlZhDBuoAnjA0iJ1ckoaR4wCNV1794HrxsBYivPze/CsWcGLyUgWz5XAVMoHCAFiEInXhZcloBkxQKQvehQJFP6wh2+Lb78L+C+KaH5JUeWE7Ks8KdZaeqqZaFDRsCMN3z79qEk7t4IMjo21XQdQLpSvP8QoKaxlcJ9odeRorCmsSVjHBPtvhQWH0CKJtKRVz3mO4BgNXhFgQrHyC8/GMmhUNlTPvWG9rnVJarcphX2DleIByrOxxVL1Mhsxv5EqkyVWbNh4/Lw4JLc2e/4TvbI3raM2pFo6k1wxkwYPNa3z2wFpJSXeOf5v1d751bdJE/WqfJDkeWBf+A90SOkTNtJvdA9bWwpa8ET4RWNaMJA8QOk2WF9DlEHGmS6FhDszVX7rXao76EwdJy6yF2OjJXLieUIFKqzpPMlHCWjdsFadWTMDglQFhVAnwFqi/HOEYHrPTtywvFIBx96FAzPVODbk6PW3XbCQQdad0fLiz11D7urW9nXHP4eqmjCQPEHZEcb3NFysR49JMxz5SNKm9VPgZzYcQjE4ZOzKy1u8qtt3Jmv8fCEZcyOZDoHkJEsNHcjDBuvuO6bCvlG/DRSuW9Dvly74tHZUumOOG3LUWo7L4U5gAwHHHGsxMESkvOKC40DEd8GsEXRxqI6D1VNka+P1ODtzGzOD7t66XGX3sdyypaguATHhbJvg1UPR9FN3x7WxjbYsc/ezSqRwkA9b4QclqE8aiEJeH/5UseQITs5F81X/+tQSPa6g73f0zHpPaqUhMa3VrppDRMkNxscKQzU8wDZo7q6+zSmtFGntN6GcwOECwM5gOw+fd6lNW31QG6lADLytTHhwkAOILt0N3cv5XZWe6gXZNqhEGEgB5B2jOfw2LLAvmad3bX2pu1QYSAHkLZM7TDZsYD4NDn2YpJeccHCQA4g7Vja4bFtgeJ6D5WNNqdtcXD8TgM5gLRtaofRjgWa3LC9yl5M0jtK+p0GcgBpx8oOT1QWyKt209Aa2ds2hbpczM7Iwrvr4AAyKlM7zHYsEKVz0+5uIAeQdizs8Ni2gIyL8icxSbeNnZv9go0wkANI26Z2GKOxwJ56D+VRODdmGMgBZDRWdnhtW6C6WWeX/Zjk/jDQ/wHkSLPJ/mcrgQAAAABJRU5ErkJggg=="},57177:function(zn){"use strict";zn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANQAAAA8CAYAAAAeyZT3AAAAAXNSR0IArs4c6QAAEpJJREFUeF7tXQeYFdUV/mcbS1F6UUEsoLC7IGKNJWpERbEgSoxGo7HEQFDRWCAGgdASNBbEhglqsC1rAxVBNGg0qNgLsJRddmFhe3vby3uT7393ZmfeezOv7M57W3LP9/EtM3Pn3DPn3n/uvf85c58CKdID0gOOeUBxTJNUJD0gPQAJKNkJpAcc9EALoNRpCaqt3rh4QIkDvH/jxV/zuZZjrVy8uRzvSzDdrx3HxWnnEnz1eevhOf/79HpNdrAs6wrQr9VvtiMc+/kc0HSan9Nrq8Uzt9hquuZjv8kPev26r8x16X5VPYDHDYT7Vy/L8vo94d7P8u5mcV+w+1U34GEZ7a+5Tg/vV31tbrmu36ff23JcB9VdBo9a5v2rekq14/1wN30GNXGzctPKKgf7eExVKUGBpJsSEkgWYPMHXEuH0sHlB5iW8jrAtE6sd9AW8GidVD9mR/fvxDrAzJ3Yp/ObAGL3srC1XweJnf0awHUQWgGJ52i3P+D9OyOP/QHSAjYT8Lwd3gRGH3Bp5dza34D7LUDsD04vmPzuN9cZGkSAF3xm4JttNoFWdasNlRVNta4SV21l6YHakvyPGurrNivA12kZ2B1TdLSisvAA1QrF8hbpAUsP8EWVkAwkdgMSugHxiUB8EpDcC+g1AOjeG+BciSBWPXA3NaA8Pxel+7LRXF+bCwXpShxeTX0V33ZED0tAdcRW+X+2iaN3j35Ar/7iX/e+XnCpbg9cZfkozctBrauci/9tioIlKSpeUTLg7iguk4DqKC0h7bD2QPJBQP/hUHsNhsIVv+qBq7QI+7O2w93USGDtUoEFaavxoqJ4x7Z2FQmodnW/rDxsD3Ba2PcwqL0PhaLEobmxAXnZmaiuKPOqUBRsSlBx06gM7AlbZxQKSkBFwalSZRQ9kJAEDD4GSD7Yyz6WFu5HQV4uVI+Ho1W1ouCe1NV4OooWBFUtAdVenpf1ts0DfQ6F2mcoOMurq6nCnp2Z8DAMwNEKWJEKTG+PtZUEVNuaVd7dnh5I6gF1wFFQEpJQW+1CTtYueBgeEPLuwGRcNWQVamJpogRULL0t63LeA/GJUAeNhBKXgOpqF3Kzs6Ey3iVGqs29gQnDMlDnfMXWGiWgYuVpWU/0PBCfBHXQ0VCUeLgqK7B3b67I4BDyZloKrlTmQ6AsyiIBFWUHS/Ux8kBCMtT+w70MYGlJMfILCloqVoDH0jIwMxaWSEDFwsuyjth4IKk71D7DGKzCnj05qK0zZnoKMDUtA69F2xAJqGh7WOqPrQeYvtSjL+rr65C1JxeqMfUrTkpAyrGvoCSaBklARdO7UnfsPaAAat/DocTFo7C4FMWlIvBLUYD0tAz8KppGSUBF07tSd/t4ILE71N5DoHrcyMrJQ0NjY4sd8QompazGumgZJgEVLc9Kve3rgZ79gW49UVVdg9wDhWZbMtNSMEaZDxEFdlgkoBx2qFTXQTygxHnz/gAPdu3NR2Njk9mwmWMy8Fg0LJWAioZXpU7DA/0OB479hTguyQZ2/Sdm3lF79IWS2B2llVXILylvqVcBuLAamZbh/euotA+geg0E/ponHqSpDrizj6MP1WGU8WM671eq7fhVweTFwIQ/Cpe8PRfY8NfYuue4y4BbNbb6y1eA534Tu/rjEqEeNAAejxs7cgvg4VfGmijA8rQM3Oa0Me0HqKUHxLM01gEzD3b6udpXX+9DgNNvBs64GVh0PFDj+Isw/Oe7fAlw3t2i/NoHgPVLwr/XiZLtCShGpHr29zJ++aWVKHX5pPU1Iw5jx6RjuxOP2QLUsPaUcLJG6uII1ZUBtTAb6McAI4B7BktAtdcIRf/zM/vkg9HY3IydeQxBGbMFBVifloELnezecoRy0pu6rsU5QJ/DJKDogXYeoWiCp2c/7mWF7MJy1Nb7kBNwmkaXgJKAioYHDJ0dAFBqt55Q4ruhyFWDooqArzkcpdE7HqBOuxE4aKBokE9WALUGO9PSStxc4Px7xWFzI/DhI0YDDjoGOP5ycbxjE5CzBRh/JTDiDGD4CaL83m/E+W9e8yUM+g0HTtIC6f56/bvd8JOAURp75SoAKvYDh58gStG27tq68L3FQGOtOP/TOmD/j76aOP09YSowbBww9DigtgLY9y2w7zvguzeEvf5ifsb8bcAPbwNjLwF+Pg3oPQTgubfnAcW7ASfXUAOOBH52PTB0nKiHn6UXZwFFu4DPVwEFFssRK0BRz7gpwn/0U+7XQM6XwFfpYrsxpyUhEUjqhdqGJmQXVgRoj1NwR+pqLHOi2o4HqD99DQwdK55t7mjRKfyF++4t1xIf66uAu/oZJcwNuGYOMHgkcKoNs7TtfWDltQZoOd9eshfoqel76OdA9mfWfp6+FkjTpt/vLhA79Jw1PXibrLoZ+OwFo8yIM4EbXwT6MF5iIblfASumAuUaI6oX8e+kOz4Crn3GV8HjFwLbP3AOUJfMBybO9m7eYCnuJmDjQ4L4MIu/rR8+Bty2zvCxuezuT4AVVwHVxU70bR8dao8+XsY1c38F3Ca2j4WcpNG7NqA4MiT1AJoagNwtwIFtwJBRwPATvVF0r5TmAItPBOoqxfEVDwLnapn+n/4DeHlaYONyVCHw4hPErqoPjATOvRM4Syvr3RVWE2/jaQvhF38HfP4vcYEd7ZZ0sWsu5cBPYlTiW58j6cCjxfmqYuDRCWLU0cXcSQ9sBQaOEPvcmcVJQF08F7joz4b2sr3iRcOX2eHjxT9dVl4HfPWqta0cnRmX4r58WZ8CRbsD24Mvj8UnOE7kqN16eT/t2FdWjcrawFHfKRq9awOKzVpdAjxxCcC3vS79jwBmvCs2+6CQStbfrJxOzdsqzte5gFmHAU31vp317BnAL7VpJke55ZN8r4ciJQjyedsM4uLl6cCnzxo6uDcdp42XLRDnvlsDrLjSupPqZ7duAD5+EqgqEmBkh2fHb+uUjy+eJXliI0rK6/f6TrF5ji+TK5aK65wCzh1lbyvb48nJQM4XRpkBRwHT3gIOGS3Obfw78OYsX5+29YgvnLgklNc0YH+FNgX31ekIjd71AfXU5cCP7wQ2B9/q7NScwjTUAHNGCPBR7tgIHHu2+D8DkQxImuXezcARJ4kzz14FfPuG7/VQgLpkHnDh/eIerj3+daN1d9GnlQwM862tr7/MI1QoHW0FFNdLE+8ToQ6uFTlFtpJFe4C+Q8WVmb2NdaO/rS/cCHyxyro95m4Ve9ozNsn24MvBKeHW10nd0dTsxo5C663TnaDRuzagOJ2bM9K+SWZ+ABxzlrj+1GTgx3fF/0kS3PSy+H/mv4FlFxg6zCMYG3z28MCFdChAzd4CDDte6Hz0PGDnR9Y2nvxr4IbnxbX3HwTe+pP4v7mT8mVw/5HW5A3LthVQ4XboO94Hjj1HlF403hr8ZfsEULQ9HwJUz1gHpJwnTj89RZAtTgpHW9WD3cU1qG+y/iK+rTR61wbUD+8AT2uMn1XDTH0YOEfLPsn4I7BJI3q43zZBcdAgsUZiJyjfJzSYRxcuwt+cHag5FKAerRRrO8p3bwVOKXWNJEdSzhdHHAU5GvoDas/nwINn2nc7JwHF2NrxUwCydP2PFEQMiRzulcdjfV1Ke2iXv61b14vpt52Y169v3Ad88LCTcBJ2KvEoqmpAUbUFeypqaxON3rUB9Z9ngFdn2DfK+fcAzHWjbFoOZNxplL1sIXDBfeJ47VxgvVbuLztFh6LMSwWKdgbqDwYodkpej1RIpS85ObCTfrUaWPnr6AKKDNlVy4DxUwURE0rsABWqPZhzOEXLNfz4KSD99lA1RXbd+1NCiahrdCOrzH4jpLbQ6M4Daswk4MhTxYNu32idXcxcN7JklPpq4K6+hmOcpM23vAw8f7290yc9AEyaI65v+BuwxsRkkbiYv0PM6fWF9lGnAXd/LMoza/qRc611BwMUR6ZHKgz6mbE2uymQWTsZNaspX6iE07aOUInJwO0bgKNPM9qL8bHCXUBVoRhdmxuAibOMaawdoL54EXjht/btYR791y0E3pkfGWBClSbjH0c21IPM4no0e6yTlttCozsPqEsXCOdSzOyZ+WFJs87SWJ7CncD8VOOqeX2xYByQrzFu5vsZgF2oxaeCxaHIdDGWZCfXPgucdoO4uuoW4DNtvaKX/8M7QKq2fvr7OcDJVwNn/k5cff4GYMtLkQOKd5hz/exGuWCdI5Lsg7YCimzj5EXCmrzvBYXP4LO/zPrcCGzbASrYS4j6rvuHCBxT7MiLUKAJdZ3Teag44GpCWZ39j3a0lkZ3HlCnXAdcv1I81tcZwD+vCXxEc5nMD4FlE40yv38TGHuxOF5+MbBtQ+D91z8HnKKxTcEAxSyDeaMFfewvDA4TlHrO3UNnAdmbfUsx++D3GoPH0S51oghIskPNHma/9gm1hjIvvv0pc7MF4yaLNQuF9Dzf8JRYAop0NmcdlGeuBL5fE+hL/qbT0gJjOmgHKLbHn48CXD5f0Ap9bA/67eDB4njp6SKbxWnRfjmzqr4ZuZVBszJaRaM7DygGTe/TsgsYUF0wBigx/SACpxB3fyJSbSj/Xga8pn2vw+OpjwDnaOseqynbYWOB2V+KqRglGKB4neksVlQvyQiSEhQGVJdoNLi5ARkPWpRtgE6/xnhP+h32TW1eZ5FlJNtoluMuBW59XZxhytL8NKCh2rcMR+H7vzFSmB7+BcBMAkosAWWegvPlyJekv5hBx2t2gOK1/64EXro1UMeEu4ApfxPnmYa0VJti2nu59Vfi4r27y24vaYYnyLdqraHRnQcUH/P29cAobX1RXSpAw8U7O8mp1wGHalM8bu7OEcTc4UZPAG57z3AWsxW+eEnM148+XUw/yL7pEgxQZOgIvG9eF8HC4l3A4FHAib802D3qefJS4CdTneamumgOcLFfOs0ixoR+sG9QMx1P2j3zA5EzSFZQF3MnZMYA10cMPvOzbU4zT77GyJbwZ8daCyjq58sjHPlhrfDJb1aKNqMU7gBemgZk/VdkeHCtfPliY82s6w0GKJYhkULSgdN5Zq4wTKGzrbzOGQtnLtES9gmPB/uqPKhsCL6hbFwcLkpNh03nCDQwOoBirIajlJ4gaueY95cCb2kBTnMZc0zD/16CZO0cY14fDFAEEmX8FdYWsJOvWwAwF89OOCVcmGWkCIXz9uR0lNNSf5mRLH6rlsIg6LQ1Rt6iXf1ct3B0qncZJVoLqEg6qM5sWrUlM0hIruiM386PBdj09aUdoLZtFOSGTq8HtK1bZKywX0RVvL/cBlejir2u4D9+qCjYnjoaY8Pd1CU6gKIz2BGvecpIIDU7qDRX0Nl881oJf7WOMYnTb/K9Wpkv7vtxXXjJsWTASB6Q8uVbVo/9UCunWqRlv18buunIcumZ5czt46gZSs64BTh7OjBwpJFnZwYU7+cCmTlyzB0028ZrXKcR6Jxe+mdgxxJQtOWIU4CrHzdYPP3Z2Y7fvi5GV+b7MXmWYgcopi0xiM2g+aARvh7kfhP0LUf0GAk5vu2l7qDTPpoSCY0ePUDpTunRVwzrnO6xE/NNFm5KCXcBHTJaLFT5yQWdHkrsOhs7L6co+ucCTKMJR9jRF+cCjMUwK2HW0MD1Tjh6gpVh+hPz2Q5NE+ApyBTrznDo9LbWHe79tHFIigACaXJOH/VUrXB1mMuxTbne1j+nqSltjZY235NX5UFFiGlfJDR69AHV5keOUEEkb+9wVHMac/UTouTm5wBmjEvpMh6oblKRUxnGb14reHzMaoSMNEtAheoac74HDkkRpZae4ZslHepeeb3De4DL6O1load9/JQ1nE1dJKCCNTmTPUmQUPi90kItobXDdxNpYCQe2F/tQXl96J+PUoD30jJwUdDZe7vsehTJ00Za1skpH4O6DO5SMu4CNj0eqTWyfCfwQF0zkFUR3qf3oWj0rjdCHZJqxE0YczF/PRpJ4zJyf+l8b3ayV5jrZ7W/RSQ6ZdkO6QGyfTvL3Giyye0zGx2KRu96gOqQTSaN6ugeKKpTUVQTBjkRgkaXgOroLS3ti4kH+L3hjjICKvS22cFodAmomDSXrKQzeGBPpQc1Nl/yBthvQ6NLQHWGlpY2xsQDFQ0q8qrCm/bZ0egSUDFpKllJZ/AAOYnM8GJS3sexotEloDpDS0sbY+aBAzUelNWFjknpBvnT6BJQMWsqWVFn8EC9G9hdHl5MyjtK+WWjS0B1hlaWNsbUA9mVbtQ2hWb7TKPU7anp8Eb9JaBi2lSyss7ggQjJCZ+90SWgOkMLSxtj5gGOS/zHmJQ7jMyJFsM0Gl0CKmZNJSvqTB4oqPGgJAJyQqfRJaA6UytLW2PmgcoGFfvCj0m10Oj/A9jGm+feuyEMAAAAAElFTkSuQmCC"},81378:function(zn){"use strict";zn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA8CAYAAADGxTD9AAAAAXNSR0IArs4c6QAAFoFJREFUeF7tXQl4k1W6fv8sTbqvlJa2tJSy74ugsiMqq4AKIlDUueNwR2dGHR0XdLwixW3uuF6Xq3O9o15nxuUiIIsCsijK1pa20NJ937eke5tmmec7f/40TfInaUNK6+R7nj5Jk7Of93z/t55w8JBnBYbwCnBDeOyeoXtWAB4Ae0AwpFeA+1SWbbA1A07KQSID6JWT0ivAyThIpBwgBSQy4+fCq0T4jANnrEdlWFkpjK/0ndAetd/znpMaTO0LZcz74tsxti0xjqVXfeNYZcZyxvHSuK3GbDYX03iMbbLy5nOz+pzGbGDrwpfj52DQG2DQAwad8Gcwvudf9ToDQN/pDdBrDYBFWfqMry/UAytP9fjPjJ/rYVHf2L7Qph4GaA0tOj1UnBYqvd6gMugMKr0OKoOOq+UMhhQ5DGfHPRNWMaSRaxy8bQBzPGAZAI3AFMAoAIJtnBnA2WaagdlU39iOAKKeje85FKY2TYDkwWh+APi2ebD0AJ8HMn/AzAHFA4x9Jxwss7bN5yXUpbnwB4SvY3Nu9LmwLr36NIKWAEhA1BlMgOUBCAZYBtJe761Byx+A3vV54Av1efDrtUawm4G+N+D5MfUcHH5s7H890KnqNjRWNGkaqlXqhgp1VV1JwxkOSJUAqUB0xk4s0Q4FgIty4KEweM8Yba+ARCmBzBuQeksgVXKQKugVkAdIoRwhhU+EHJycg0GrNz01Whs6UJhegtLsCmi7tI0GYC8H7osYTPhuO2Z3D9a19gB4sO6Mm8flFSKBd4QcyuFS+MbKIfOWMM6v69KjIq8WhVlFaKpvAQeuFsCr/gh45wmsbXHzsPrcvAfAfV6yn18FjgN8YmUInKiAd4TMJObUlNQj42wWutq7SNtXA9zrIVC88nts7Bgsq+AB8GDZiUEyDrm/BAFj5PBLUAASniNnpeSgvLCSjZADl8dBev8ubD41GIbsAfBg2IVBOAaSnUNnK6GM5DlyQ5UKmSlZ6GjvJBiT5epdGRSP7MRGzbUcvgfA13L1h0DfPtFyBE9VMKuMVqNH2rl0NNapBG78vQ98b9+B2xuu1VQ8AL5WKz+E+pV6cQiaqoAyXAp9tx5pyZfQUNdoBDEKAG5VEhJzrsWUPAC+Fqs+RPsMnOgF3xg5dBod0i9eRmM9D2IAFYB03m5sKRnoqXkAPNArPsT7CxingE+UFDqdHpfSMtHYYJIecn2hnL8DG+sGcooeAA/kav9M+gpIkEMZJYdBq0PqxXS0NDcLMvEFKRTzB1Kx8wD4ZwKqgZ6G/2g5vCPlaGttR+rFZMaRiSSQvLILW58YqPF4ADxQK/1z64cDs05IlByqqiqRX5gvKHV6gLspCYknB2LKHgAPxCr/TPuQ+XAImOQFzsDh0pVLUDcJ5jWUSaGcuBMbW9099WsOYDKYU8Qbi5zqshnZ6e41uGrtSxScU3NQhErR1UBhae4hstkaBiiWzDtSykSJri4NLmYmQ6s1dfz6bmx7xD0z7Gn1mgN4bX48CyapP9eBI/NLXZ5v3JYAzHlnOGvnyMJSqNO7TG36xMjYe41KB22r+GGR+nC48aNIVrb4780o2+OYkYTOVWLRnijk/JcKee+qoVHzMqE5zXlvOGLW+0MRIsXBGUVouuweJ9bys7HwjpJBldaJk2vcH/brP9aLRb1V11aisLzAKEpwWimks3Zic4bLm2qngUED4K5GHWpOttuda+U3bSj83ya7ZeLvCcD1f+HBd3hOMVQXeQDL/DhsVI1l71MerUXOm/zjzhYRV1lfmsC+Sn28FtmviZcV6t/wUSRGbQ5g/575RRWKPuE1c3Ma8+sgXPcmf7gynqvH5d3OO7DkARIowigzwDEtPxcLryApmrK7cGqtYwB31evQ3Wx94Bz3xJcgOThwrBd0Wj1Ssi6gW8sfTA44swuJ8zje9ewWGjQAdmZ2OW+rkPIwRfeJ09UAsH+CHGuuxLNOzj9Yjfz37R8axTAp1hWPBnmsOuu02BtXCL3Ges8IhOvLRkPmI0FjSie+ud55u//YB4Iw+w0e/Febkh+qQe47apea9Y2VQeYrQXlNGcpqeubFQfKrJGz9wKXG7VQeNADuqNKi6FNrrmU+9rqfOlDxtf3HudMAfkuFmPV+iN0QgMyXG6BK6xE1gqYpsDI5jnX9071VKHYwrklPhWDa88NY+csvNiDj2XrRJZ/7fgRG3xfIvv8qrgAdFc4Jq4MdwHQoCcQkA6fmXIBOz8v4HNAog2zcc9gsviguoNutAKZHsdRHYnd4y76LgU+UHKr0TvxwFx+y54iIu7WX9Ww8SwGS8/mp8YkBmPNuBHv/7fwSHph6A0jBshQhVqbGIWiKAgUfqnFue42p22HzvHHzyZHs/+83VKB8r/ihoRQjkuMp6IVShvYlFGLyjlCEzVXanIZXiJS5Y4laizSij+78/2lisrRA8kAJCz53RKO2BLL+ic5tr0btaftiGZXrrNGhu6n/IoQwJt+RMrbOJTVFqG4030vJX3dj632Oxt6f790K4CWHohF5s29/xmW3DoH98Oyex9TY3wRh9mvij1f15S4cWVBiBWCBW2vb9fhqZIFpEyNv9sGSQzFsDCdWlqHqqDgIiIsv+DyKlS39/xac3lSJpd9EI+Im1+Z9+YUGZPyHbaYVMlOB0DneNtdo5J3+GL7Ih31HcraYtYPmXPSx/SdeXzeORAifETJ0dnYivTgFBoMgRpEMLF24G5tP97VNR+WHJIBL97TgtBm37i+AJV4c1hbEsywEc8XOHJRHl5Si7rTtBASZLwfi4n7xXmydT60rR8XBNkx/IQwhM3s4cMgsJVOqCDT1Z5xLZij6W7MowMxFFkcbLPZ9R7UWX8XwFoOrSd4jOUilMuRWZkHdZq78cpdliJ5xtZNFBwTAxAW+u7nMap1uOhbDTEo1p9qR8oh95Ywe9YJp68fESpT8oyc9K+x6JUas8GPtB09TIGoV/55Eg45qHTprtSj8qMmmFWLKs6GY8scwNOdqcGBSEas3KjEAN3xotGRcV9xLPjafBJnFEv4tyPTRsZtKUfu9NUBJTApf6NOrD1dAYw7gikOt0Hc7r+SHTFcys6W7AOwVLIFXoBQ16iqU1BdaTvOJ3dj2iitzt6w7IADuqNHiq2jr0357xWgow2UoP9CK8/9eDZ8YOXxjZPAZaXyNkcN7uBRHF5dh7gcRGH1vIHQaA/ZE5ovKjk4rcUYzmt9oOW7L5i0Ox28tQ/Xxdkz+YyimPhvGPvsyPA8albV8GLXaF4u+iu61nqIAPhGD8Pk+aM7R4MBk/pC4QuYA3juqAJo+yK/XvRUOkpPdBWB6qpHuo9F0I73sgsU0uTYZFOShc93gb2x5wAD89YQiDLteyUBKDgVSZGI3+bOUb0e0L6EAEx8PRfQaP6gyOnFytbhts68Apr5vOT0SYXO9Uba3BT9sqMSNn0QiblMAOuu12BNpffDIbLYqLY4dPnMSA/CKlFgET1UyRdVcdnc0b7HvB7MIQWP2jiJlk8OVqgy0a6wU4H27sW1df+d+zTjwiRXlTF60R6TFd1Rq0VbSjbYyLdpLu9FW2s2UoxG3+qK1RIumzC67GnN/AEwmqmlJw5D3ngppO+pBjgCSYet+bGfc35IW7olih4mIQK4M44EsBuC1hfHswDYkd+LECuv2zNunC0wcORXMAaxR060nzsNB6ith9mp3cWAaiVewFBQnUaEqRVVzudXgOEjWJGHrAedHLV5ywDjw/rGFWF86Gu2lWrSV8cCM3xbIjPoElB+3VjHw0gbaIsHlXPyPZvyUWCU6I0sAtxV3Y/QvApH332pRTxx56TgJZwLOBtUYyP0kKPhrE87dX92rL6k3hzvrEtiTgwBZ+HGTybsmBuCN6jHMyO8M0eElU5w9MgfwF2F5fTKBCXZodwKY3MoE4rauVmTX2vQkF4dCOfFqpOcPGIBtycArLsQieLoS3a16ZL/WaFOWkyo4hN3gjejVPMdLe7oOWa+YUlms9tkcwAR2Uuh0HXrsH1folCuZYgjWF4/m+9pRh6w/Wfe1+EAUgiYp8M0NJezJILiubQGYAmvu7hjnDHZZmeY8DQ5MtC8nmwOY5Gq6b81Z8o6UMYuIOwFM3gvv4TLGjDJqkqHVWcd8SICXdmHbU86OW6zcNQWwI/OX5aAJ6IdnFqO1yPZNR8RJJz8dhomPhfSqShz/4NQipwAcscwHSw/zNuDv76hA+X5rJwYFDJFtmQKFzA+MLQCbx1VUHmlD9bE2m3sx/qFg5tBRZ3bh0PRipzlwfwHgVgADkAdL2F1zZc1FqG/v/RQzjrmbg9e0JGy60t85UD23AniZUfsmj9P+sdZchTRWAgxxMb943jtli7Tt5HnrRsnnLWg4T/cS9KaEXwZi5EZ/pulLjB45KkHyYe7bauS8pWIXdDgTzDPrtXCM+00w62BPTD46q+2HPToCcNQqXyzay1srLM1/5rNYkRyL4GlKNKZ24pu59mMkzDnwoZnF0DQ5H5o546VhzH3ubgBLlRLI/Tk0dzQjX51pc185cCeTkLhk0AL4ttxR8BvlxdyZx5bwygu5Q8l1KRDJpxTk0pKnYU4Aoti7/EEu1/Zyba/YB3Kn2nJ5Lvh8BAtTtKRvbyxBwwUe8M5Go60rjudd2xmdODzLcbCNIwBPfT4Mk5/iXbv2QihXpsUxsaTuTAeOLrRvZTIHcOmXLcy06CyRJYgcL+4GMF1XJQ+RsvvWLjcmQ0fXadogCbh7diHxY2fHb1nOrRz4rtYxTNkp+byZhQ7OejUc4Yt9cHBKEVryeDFAUM7MvWurMuIQOEGB6hNtOH4Lr8WS6eq23HhUHm5F+tP1vcSIcb8NwqQdoaDNNHQD437Lc1BnwinZ3b7G8xS+0BvLvuNjILLfaETqY44TbB0BeOmRaEQs8WXOhs8CckUDzVdfHoWAcV6oOtYGstjYo8FuRhPGToyJ4lRKW4rQ2NUTa2I+N7o8UAq/cTuxvl/hcG4DMGUd3FHNx9ReebWRKV7ktiVtPPcdFZIf4j1vzgJ4WlIYJj0RCl0nKWRFzGIhELl0dZ383bt9MaORy3j6i8NwfHk5yFohgI3abS3U4OCMYuja7XM3ewCmw3Fn3RjQfWP15ztwZJ44Z70tLx5+cXKTLdpZAP90TxW0rc4H4ox9MAgRS33dzoFp/BTYQ0p4i6YZha1Z9qb03m5s+3V/uLDbAEw3uaxM4e2+KY/VIucNFWb+aRjGPxzCrA57YwuY2coZAFMg9205o9j9tln/2Yi0p8Q5oxiAzZUpciuTB45kZqLkR2qgvtSFZcd47isQZVc4cnHbA/DIDf6Y/7cRrDlH1hMyMZKFoOj/mnDmvt5KD3FmWk+BYtb5IXYjHzx/9pdVIB3BWRqzPYgF+5B+cP6BHq6ozuhinsKrSSRGyPwl7B7izJZU6ETynDhAL4X0hp3Ycr6v/bsNwObKy+m7K9njnUxUxIVJO039Qy2yX1c5BeDrP4xAfGIgU1b2jym06doVJi4GYOK0ltYJqlN9vA2Xkhow+9VwZtKjCKqa4+0smozeH1taJhrMQ/XtAfjmUyMx7EY+auzriYUmscnWJt1Zn8BiCLLfVCH10d5xIRMeDcaMl8L7urd9Kn/xyVpc+bPjzJM+NUpc2FsCCQeUdRRA1S3OeDjg4lQor9uIjc5rpO60Qlz39nCM+RUf6GKuTC3aH4WoFX4sFpZEgbV5fE6cmAx8OanBJJemP1uHzBfFbcCWgBJkYP8xcqzJ4uMdiAiYFBif+VIjU/JINhfk5rz31YzDr8kZxTxsZJc9NKNYNFlTDMAhsxRYfpZ/AjnjQt7UOZYd7LRn6pD1cu85DmUAc3L6SQgJ2rXNKOiwK0ZQbu9Du7Dtzb4cErdwYDLe316eAJKDyQa7L77HsxS9zg8Lv4hC7Q/tOL25EreejrULYJKdKZWGLBDkzeuLTGquxJFiSMmHJZ+1IOvlBjRl8Y9LYTz0XrAXU8KneQaEvYMjBmDzWGjhCSS2MaSg3lHJ6wskEhR+ZB2nS8qQJUUs8wVF01Ecx8Wn6pD9qu3DPeU53hJCQVXkkcx/X42uut6MTswD2hcwiZUlzxz9NkduZxq6DeJiCgeu2RsY/zTsuFotOnELgEes9MXifbzt0zLFhsBNFgaSOYmckYFJGfIf44XmbMcy2vTdYSzwh+jgtCITUClIvTmvmylrAo1Y7osFX45glhLiyidXlZuC16nPVem8ZYBk9q8nFNq0CdsCsLmVwBnuO/EPIZj+Ap+SRFkkDeesbd3CmAkMI1b4ghwfw+bxMjwRJcSeWF1u/aTggDlvDwc5X8htT0Q28eK/tzD7OMm+7ibBNl+tKUO9zn7WDQd8loRtm5wdk1sALERz0SBI9qOYh/GP8KYtSxKi0djPTxnjWsnBwXEcA5Wt5Ehq48y91UyuJgpf5I15n4xgSiEBjoiSK/dEFYgGukTe4ouFe3rAe+GBGuT/pXfyprkcbysugvqxBDB9tvRIDBMHaPxkEqv+js/oGLbAGzNfCYeuXQ9dFz9fUlDDjNkVFAdB4ZZkUbEkGi/FKUet9mNxGgK1FGhw8ck6u2lPVJZMWgRicvpQZJwJ+KfaWYZ2OeUaOq8LOosvVo7iTCgxuVuvQW53msO6UnC3PI/Eow4LuksGnvnncIz/XTDqz3bgyIJSZqqypUA5M0CxMj9urWTiABFpuhvqE/iFMpKjDGaSUZedGMnuM7jwYA3yP7CdeXzT0RgMX+xjU7myBWAy7y0+EA3/0V649Hw9Lu3qSZ2nQKA7ahLYD6pYEkXiHVtSivqztrmv5RqSKzv/AzX70/fxN4ToYFL0XdBk3rJBThvy/rnzMhT62TNyahTpMtFhsO1OF9aEfsYgHKFTfoeVDh8PbuHANJCJj4ewC0QIGOQgEMvh6i+IKw609hIpxv8+mAWp0O0+ZftanLo0hOKRyUYrBl4aG5mvKOWo6ojtRY+72x+z3+Lz8egOhrofOxhXpUd8+h+tc9oS7g9EAF0EYvwJLNJc6n/qQOW3bb0SVS3XhTyYK5LjUL6vlUXJNSaLixlOrSnHZ55MeSaU5fE1pjrEilPNOiqkMtSiSmc/1oNxbXDPJSFxp6P23AZgRx17vu/HCtAD5mo/5t3Rpp2p6aFHji4VBgdaIwd0SsFN2YlE/tZAEfIAuB848lRxbQUq9Plo0ts3hxp7+HY3ti33ANi19fbUvsor0GFoRZHOvk1Y6FIC7q5dSPzcw4Gv8iZ4mnNtBQp0l9BlcHzFAAeu0h8B48V+JdQjQri2D57a/VyBBkMNanSOw1WNCt0bSUh82FZXHgD3cwM81VxbAT10yNWlQm+6vceupKuTQTJ7J7ZYGZE9AHZtHzy1XViBSn0B1Hpnr5jlziZh642WV7V6AOzCBniqurYCnWhDodZ2upGtliXA9l3Y9r75dx4Au7YHntourkChLhOdDjxzPV1wKl8oxpn/Fp0HwC5ugKe6ayvQbGhAuc75SwY5cB8lIfFeoVcPgF1bf09tl1fAgDxdut0wS+supIt2Y8v3zELxqSz7ajsnXZ6Sp4F/rRVoMFShRmf/yq3eK8JljcSE6dsxu9sD4H8trAzK2eqgQ54uDXohPdyJUXLgnkxC4sseADuxWJ4i7l+Ban0JGvW2U+9t9c4B7QZIJ3oA7P698fTgxAo0GepRobN/qaFlMxy4/f8E90wA8RE2tUgAAAAASUVORK5CYII="},16722:function(zn,En,me){"use strict";me.d(En,{Z:function(){return Mt}});const ue=Ct=>typeof Ct=="object"&&Ct!=null&&Ct.nodeType===1,Re=(Ct,Ye)=>(!Ye||Ct!=="hidden")&&Ct!=="visible"&&Ct!=="clip",Ze=(Ct,Ye)=>{if(Ct.clientHeight<Ct.scrollHeight||Ct.clientWidth<Ct.scrollWidth){const st=getComputedStyle(Ct,null);return Re(st.overflowY,Ye)||Re(st.overflowX,Ye)||(pt=>{const wt=(Ie=>{if(!Ie.ownerDocument||!Ie.ownerDocument.defaultView)return null;try{return Ie.ownerDocument.defaultView.frameElement}catch(te){return null}})(pt);return!!wt&&(wt.clientHeight<pt.scrollHeight||wt.clientWidth<pt.scrollWidth)})(Ct)}return!1},ot=(Ct,Ye,st,pt,wt,Ie,te,ee)=>Ie<Ct&&te>Ye||Ie>Ct&&te<Ye?0:Ie<=Ct&&ee<=st||te>=Ye&&ee>=st?Ie-Ct-pt:te>Ye&&ee<st||Ie<Ct&&ee>st?te-Ye+wt:0,We=Ct=>{const Ye=Ct.parentElement;return Ye==null?Ct.getRootNode().host||null:Ye},lt=(Ct,Ye)=>{var st,pt,wt,Ie;if(typeof document=="undefined")return[];const{scrollMode:te,block:ee,inline:de,boundary:se,skipOverflowHiddenElements:he}=Ye,ve=typeof se=="function"?se:Mn=>Mn!==se;if(!ue(Ct))throw new TypeError("Invalid target");const be=document.scrollingElement||document.documentElement,Ne=[];let Fe=Ct;for(;ue(Fe)&&ve(Fe);){if(Fe=We(Fe),Fe===be){Ne.push(Fe);break}Fe!=null&&Fe===document.body&&Ze(Fe)&&!Ze(document.documentElement)||Fe!=null&&Ze(Fe,he)&&Ne.push(Fe)}const je=(pt=(st=window.visualViewport)==null?void 0:st.width)!=null?pt:innerWidth,ze=(Ie=(wt=window.visualViewport)==null?void 0:wt.height)!=null?Ie:innerHeight,{scrollX:Xe,scrollY:Je}=window,{height:dt,width:He,top:bt,right:et,bottom:It,left:xt}=Ct.getBoundingClientRect(),{top:Bt,right:Ut,bottom:Nt,left:qe}=(Mn=>{const zt=window.getComputedStyle(Mn);return{top:parseFloat(zt.scrollMarginTop)||0,right:parseFloat(zt.scrollMarginRight)||0,bottom:parseFloat(zt.scrollMarginBottom)||0,left:parseFloat(zt.scrollMarginLeft)||0}})(Ct);let Ke=ee==="start"||ee==="nearest"?bt-Bt:ee==="end"?It+Nt:bt+dt/2-Bt+Nt,Tt=de==="center"?xt+He/2-qe+Ut:de==="end"?et+Ut:xt-qe;const Ln=[];for(let Mn=0;Mn<Ne.length;Mn++){const zt=Ne[Mn],{height:rn,width:xn,top:Un,right:yn,bottom:sn,left:Lt}=zt.getBoundingClientRect();if(te==="if-needed"&&bt>=0&&xt>=0&&It<=ze&&et<=je&&(zt===be&&!Ze(zt)||bt>=Un&&It<=sn&&xt>=Lt&&et<=yn))return Ln;const ti=getComputedStyle(zt),gi=parseInt(ti.borderLeftWidth,10),Pn=parseInt(ti.borderTopWidth,10),Xt=parseInt(ti.borderRightWidth,10),Kt=parseInt(ti.borderBottomWidth,10);let Ot=0,rt=0;const Ue="offsetWidth"in zt?zt.offsetWidth-zt.clientWidth-gi-Xt:0,$t="offsetHeight"in zt?zt.offsetHeight-zt.clientHeight-Pn-Kt:0,Gt="offsetWidth"in zt?zt.offsetWidth===0?0:xn/zt.offsetWidth:0,it="offsetHeight"in zt?zt.offsetHeight===0?0:rn/zt.offsetHeight:0;if(be===zt)Ot=ee==="start"?Ke:ee==="end"?Ke-ze:ee==="nearest"?ot(Je,Je+ze,ze,Pn,Kt,Je+Ke,Je+Ke+dt,dt):Ke-ze/2,rt=de==="start"?Tt:de==="center"?Tt-je/2:de==="end"?Tt-je:ot(Xe,Xe+je,je,gi,Xt,Xe+Tt,Xe+Tt+He,He),Ot=Math.max(0,Ot+Je),rt=Math.max(0,rt+Xe);else{Ot=ee==="start"?Ke-Un-Pn:ee==="end"?Ke-sn+Kt+$t:ee==="nearest"?ot(Un,sn,rn,Pn,Kt+$t,Ke,Ke+dt,dt):Ke-(Un+rn/2)+$t/2,rt=de==="start"?Tt-Lt-gi:de==="center"?Tt-(Lt+xn/2)+Ue/2:de==="end"?Tt-yn+Xt+Ue:ot(Lt,yn,xn,gi,Xt+Ue,Tt,Tt+He,He);const{scrollLeft:at,scrollTop:Te}=zt;Ot=it===0?0:Math.max(0,Math.min(Te+Ot/it,zt.scrollHeight-rn/it+$t)),rt=Gt===0?0:Math.max(0,Math.min(at+rt/Gt,zt.scrollWidth-xn/Gt+Ue)),Ke+=Te-Ot,Tt+=at-rt}Ln.push({el:zt,top:Ot,left:rt})}return Ln},Me=Ct=>Ct===!1?{block:"end",inline:"nearest"}:(Ye=>Ye===Object(Ye)&&Object.keys(Ye).length!==0)(Ct)?Ct:{block:"start",inline:"nearest"};function Mt(Ct,Ye){if(!Ct.isConnected||!(wt=>{let Ie=wt;for(;Ie&&Ie.parentNode;){if(Ie.parentNode===document)return!0;Ie=Ie.parentNode instanceof ShadowRoot?Ie.parentNode.host:Ie.parentNode}return!1})(Ct))return;const st=(wt=>{const Ie=window.getComputedStyle(wt);return{top:parseFloat(Ie.scrollMarginTop)||0,right:parseFloat(Ie.scrollMarginRight)||0,bottom:parseFloat(Ie.scrollMarginBottom)||0,left:parseFloat(Ie.scrollMarginLeft)||0}})(Ct);if((wt=>typeof wt=="object"&&typeof wt.behavior=="function")(Ye))return Ye.behavior(lt(Ct,Ye));const pt=typeof Ye=="boolean"||Ye==null?void 0:Ye.behavior;for(const{el:wt,top:Ie,left:te}of lt(Ct,Me(Ye))){const ee=Ie-st.top+st.bottom,de=te-st.left+st.right;wt.scroll({top:ee,left:de,behavior:pt})}}}}]);
|