|
|
!(function(){var Wl=Math.pow;var Mc=(yn,dt,m)=>new Promise((K,j)=>{var A=N=>{try{R(m.next(N))}catch(x){j(x)}},xe=N=>{try{R(m.throw(N))}catch(x){j(x)}},R=N=>N.done?K(N.value):Promise.resolve(N.value).then(A,xe);R((m=m.apply(yn,dt)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[7166],{89489:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},59477:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},40001:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},49198:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},84105:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},18785:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},87169:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},73331:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},15277:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},52671:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},8657:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},56082:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},33853:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},15075:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},62772:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},43531:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},61485:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},38819:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},47472:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},87395:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(54476),j=m(59301),A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},xe=A,R=m(7657),N=function(V,Ie){return j.createElement(R.Z,(0,K.Z)({},V,{ref:Ie,icon:xe}))},x=j.forwardRef(N),E=x},76809:function(){"use strict"},17022:function(){"use strict"},50371:function(yn,dt){"use strict";function m(){const K=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let j=1;j<arguments.length;j++){const A=j<0||arguments.length<=j?void 0:arguments[j];A&&Object.keys(A).forEach(xe=>{const R=A[xe];R!==void 0&&(K[xe]=R)})}return K}dt.Z=m},13845:function(yn,dt,m){"use strict";m.d(dt,{F:function(){return K},Z:function(){return j}});function K(A){return A!=null&&A===A.window}function j(A,xe){var R,N;if(typeof window=="undefined")return 0;const x=xe?"scrollTop":"scrollLeft";let E=0;return K(A)?E=A[xe?"pageYOffset":"pageXOffset"]:A instanceof Document?E=A.documentElement[x]:(A instanceof HTMLElement||A)&&(E=A[x]),A&&!K(A)&&typeof E!="number"&&(E=(N=((R=A.ownerDocument)!==null&&R!==void 0?R:A).documentElement)===null||N===void 0?void 0:N[x]),E}},56762:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return j}});var K=m(59301);function j(){const[,A]=K.useReducer(xe=>xe+1,0);return A}},68031:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return xe}});var K=m(16089);function j(R,N,x,E){const F=x-N;return R/=E/2,R<1?F/2*R*R*R+N:F/2*((R-=2)*R*R+2)+N}var A=m(13845);function xe(R){let N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:x=()=>window,callback:E,duration:F=450}=N,V=x(),Ie=(0,A.Z)(V,!0),G=Date.now(),le=()=>{const ue=Date.now()-G,de=j(ue>F?F:ue,Ie,R,F);(0,A.F)(V)?V.scrollTo(window.pageXOffset,de):V instanceof Document||V.constructor.name==="HTMLDocument"?V.documentElement.scrollTop=de:V.scrollTop=de,ue<F?(0,K.Z)(le):typeof E=="function"&&E()};(0,K.Z)(le)}},19080:function(yn,dt,m){"use strict";m.d(dt,{F:function(){return R},Z:function(){return xe}});var K=m(92310),j=m.n(K);const A=null;function xe(N,x,E){return j()({[`${N}-status-success`]:x==="success",[`${N}-status-warning`]:x==="warning",[`${N}-status-error`]:x==="error",[`${N}-status-validating`]:x==="validating",[`${N}-has-feedback`]:E})}const R=(N,x)=>x||N},24905:function(yn,dt,m){"use strict";m.d(dt,{default:function(){return ie}});var K=m(92310),j=m.n(K),A=m(5630),xe=m(59301),R=m(36355),N=m(1684),x=m(32441),F=xe.createContext(null),V=m(98447),Ie=m(14088),G=m(4572),le=function(ae,Se){var se={};for(var be in ae)Object.prototype.hasOwnProperty.call(ae,be)&&Se.indexOf(be)<0&&(se[be]=ae[be]);if(ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var D=0,be=Object.getOwnPropertySymbols(ae);D<be.length;D++)Se.indexOf(be[D])<0&&Object.prototype.propertyIsEnumerable.call(ae,be[D])&&(se[be[D]]=ae[be[D]]);return se};const ke=(ae,Se)=>{var se;const{prefixCls:be,className:D,rootClassName:Le,children:z,indeterminate:we=!1,style:ge,onMouseEnter:Te,onMouseLeave:Fe,skipGroup:Re=!1,disabled:X}=ae,w=le(ae,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:ve,direction:Qe,checkbox:je}=xe.useContext(R.E_),Be=xe.useContext(F),{isFormItemInput:Oe}=xe.useContext(x.aM),lt=xe.useContext(N.Z),$t=(se=(Be==null?void 0:Be.disabled)||X)!==null&&se!==void 0?se:lt,vt=xe.useRef(w.value);xe.useEffect(()=>{Be==null||Be.registerValue(w.value)},[]),xe.useEffect(()=>{if(!Re)return w.value!==vt.current&&(Be==null||Be.cancelValue(vt.current),Be==null||Be.registerValue(w.value),vt.current=w.value),()=>Be==null?void 0:Be.cancelValue(w.value)},[w.value]);const Tt=ve("checkbox",be),[wt,pt]=(0,V.ZP)(Tt),at=Object.assign({},w);Be&&!Re&&(at.onChange=function(){w.onChange&&w.onChange.apply(w,arguments),Be.toggleOption&&Be.toggleOption({label:z,value:w.value})},at.name=Be.name,at.checked=Be.value.includes(w.value));const S=j()(`${Tt}-wrapper`,{[`${Tt}-rtl`]:Qe==="rtl",[`${Tt}-wrapper-checked`]:at.checked,[`${Tt}-wrapper-disabled`]:$t,[`${Tt}-wrapper-in-form-item`]:Oe},je==null?void 0:je.className,D,Le,pt),p=j()({[`${Tt}-indeterminate`]:we},G.A,pt),h=we?"mixed":void 0;return wt(xe.createElement(Ie.Z,{component:"Checkbox",disabled:$t},xe.createElement("label",{className:S,style:Object.assign(Object.assign({},je==null?void 0:je.style),ge),onMouseEnter:Te,onMouseLeave:Fe},xe.createElement(A.Z,Object.assign({"aria-checked":h},at,{prefixCls:Tt,className:p,disabled:$t,ref:Se})),z!==void 0&&xe.createElement("span",null,z))))};var de=xe.forwardRef(ke),_e=m(94480),Pe=m(2738),Ue=function(ae,Se){var se={};for(var be in ae)Object.prototype.hasOwnProperty.call(ae,be)&&Se.indexOf(be)<0&&(se[be]=ae[be]);if(ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var D=0,be=Object.getOwnPropertySymbols(ae);D<be.length;D++)Se.indexOf(be[D])<0&&Object.prototype.propertyIsEnumerable.call(ae,be[D])&&(se[be[D]]=ae[be[D]]);return se};const Ce=(ae,Se)=>{const{defaultValue:se,children:be,options:D=[],prefixCls:Le,className:z,rootClassName:we,style:ge,onChange:Te}=ae,Fe=Ue(ae,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Re,direction:X}=xe.useContext(R.E_),[w,ve]=xe.useState(Fe.value||se||[]),[Qe,je]=xe.useState([]);xe.useEffect(()=>{"value"in Fe&&ve(Fe.value||[])},[Fe.value]);const Be=xe.useMemo(()=>D.map(g=>typeof g=="string"||typeof g=="number"?{label:g,value:g}:g),[D]),Oe=g=>{je(y=>y.filter(d=>d!==g))},lt=g=>{je(y=>[].concat((0,_e.Z)(y),[g]))},$t=g=>{const y=w.indexOf(g.value),d=(0,_e.Z)(w);y===-1?d.push(g.value):d.splice(y,1),"value"in Fe||ve(d),Te==null||Te(d.filter(L=>Qe.includes(L)).sort((L,fe)=>{const O=Be.findIndex(he=>he.value===L),I=Be.findIndex(he=>he.value===fe);return O-I}))},vt=Re("checkbox",Le),Tt=`${vt}-group`,[wt,pt]=(0,V.ZP)(vt),at=(0,Pe.Z)(Fe,["value","disabled"]),S=D.length?Be.map(g=>xe.createElement(de,{prefixCls:vt,key:g.value.toString(),disabled:"disabled"in g?g.disabled:Fe.disabled,value:g.value,checked:w.includes(g.value),onChange:g.onChange,className:`${Tt}-item`,style:g.style,title:g.title},g.label)):be,p={toggleOption:$t,value:w,disabled:Fe.disabled,name:Fe.name,registerValue:lt,cancelValue:Oe},h=j()(Tt,{[`${Tt}-rtl`]:X==="rtl"},z,we,pt);return wt(xe.createElement("div",Object.assign({className:h,style:ge},at,{ref:Se}),xe.createElement(F.Provider,{value:p},S)))},pe=xe.forwardRef(Ce);var q=xe.memo(pe);const _=de;_.Group=q,_.__ANT_CHECKBOX=!0;var ie=_},98447:function(yn,dt,m){"use strict";m.d(dt,{C2:function(){return R}});var K=m(17313),j=m(37613),A=m(83116);const xe=N=>{const{checkboxCls:x}=N,E=`${x}-wrapper`;return[{[`${x}-group`]:Object.assign(Object.assign({},(0,K.Wf)(N)),{display:"inline-flex",flexWrap:"wrap",columnGap:N.marginXS,[`> ${N.antCls}-row`]:{flex:1}}),[E]:Object.assign(Object.assign({},(0,K.Wf)(N)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${E}`]:{marginInlineStart:0},[`&${E}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[x]:Object.assign(Object.assign({},(0,K.Wf)(N)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:N.borderRadiusSM,alignSelf:"center",[`${x}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${x}-inner`]:Object.assign({},(0,K.oN)(N))},[`${x}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:N.checkboxSize,height:N.checkboxSize,direction:"ltr",backgroundColor:N.colorBgContainer,border:`${N.lineWidth}px ${N.lineType} ${N.colorBorder}`,borderRadius:N.borderRadiusSM,borderCollapse:"separate",transition:`all ${N.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:N.checkboxSize/14*5,height:N.checkboxSize/14*8,border:`${N.lineWidthBold}px solid ${N.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${N.motionDurationFast} ${N.motionEaseInBack}, opacity ${N.motionDurationFast}`}},"& + span":{paddingInlineStart:N.paddingXS,paddingInlineEnd:N.paddingXS}})},{[`
|
|
|
${E}:not(${E}-disabled),
|
|
|
${x}:not(${x}-disabled)
|
|
|
`]:{[`&:hover ${x}-inner`]:{borderColor:N.colorPrimary}},[`${E}:not(${E}-disabled)`]:{[`&:hover ${x}-checked:not(${x}-disabled) ${x}-inner`]:{backgroundColor:N.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${x}-checked:not(${x}-disabled):after`]:{borderColor:N.colorPrimaryHover}}},{[`${x}-checked`]:{[`${x}-inner`]:{backgroundColor:N.colorPrimary,borderColor:N.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${N.motionDurationMid} ${N.motionEaseOutBack} ${N.motionDurationFast}`}}},[`
|
|
|
${E}-checked:not(${E}-disabled),
|
|
|
${x}-checked:not(${x}-disabled)
|
|
|
`]:{[`&:hover ${x}-inner`]:{backgroundColor:N.colorPrimaryHover,borderColor:"transparent"}}},{[x]:{"&-indeterminate":{[`${x}-inner`]:{backgroundColor:N.colorBgContainer,borderColor:N.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:N.fontSizeLG/2,height:N.fontSizeLG/2,backgroundColor:N.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${E}-disabled`]:{cursor:"not-allowed"},[`${x}-disabled`]:{[`&, ${x}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${x}-inner`]:{background:N.colorBgContainerDisabled,borderColor:N.colorBorder,"&:after":{borderColor:N.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:N.colorTextDisabled},[`&${x}-indeterminate ${x}-inner::after`]:{background:N.colorTextDisabled}}}]};function R(N,x){const E=(0,j.TS)(x,{checkboxCls:`.${N}`,checkboxSize:x.controlInteractiveSize});return[xe(E)]}dt.ZP=(0,A.Z)("Checkbox",(N,x)=>{let{prefixCls:E}=x;return[R(E,N)]})},36381:function(yn,dt,m){"use strict";m.d(dt,{default:function(){return at}});var K=m(38819),j=m(92310),A=m.n(j),xe=m(54476),R=m(94480),N=m(42978),x=m(76190),E=m(18929),F=m(48736),V=m(59301),Ie=m(75931),G=m(11592),le=m(20068),ke=m(77900),ue=m(10228),de=V.forwardRef(function(S,p){var h=S.prefixCls,g=S.forceRender,y=S.className,d=S.style,L=S.children,fe=S.isActive,O=S.role,I=V.useState(fe||g),he=(0,N.Z)(I,2),Y=he[0],U=he[1];return V.useEffect(function(){(g||fe)&&U(!0)},[g,fe]),Y?V.createElement("div",{ref:p,className:A()("".concat(h,"-content"),(0,le.Z)((0,le.Z)({},"".concat(h,"-content-active"),fe),"".concat(h,"-content-inactive"),!fe),y),style:d,role:O},V.createElement("div",{className:"".concat(h,"-content-box")},L)):null});de.displayName="PanelContent";var _e=de,Pe=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],Ue=V.forwardRef(function(S,p){var h=S.showArrow,g=h===void 0?!0:h,y=S.headerClass,d=S.isActive,L=S.onItemClick,fe=S.forceRender,O=S.className,I=S.prefixCls,he=S.collapsible,Y=S.accordion,U=S.panelKey,ye=S.extra,Ye=S.header,ce=S.expandIcon,Ae=S.openMotion,qe=S.destroyInactivePanel,oe=S.children,T=(0,Ie.Z)(S,Pe),re=he==="disabled",$e=he==="header",Ne=he==="icon",Xe=ye!=null&&typeof ye!="boolean",ct=function(){L==null||L(U)},mt=function(rn){(rn.key==="Enter"||rn.keyCode===ue.Z.ENTER||rn.which===ue.Z.ENTER)&&ct()},yt=typeof ce=="function"?ce(S):V.createElement("i",{className:"arrow"});yt&&(yt=V.createElement("div",{className:"".concat(I,"-expand-icon"),onClick:["header","icon"].includes(he)?ct:void 0},yt));var Bt=A()((0,le.Z)((0,le.Z)((0,le.Z)({},"".concat(I,"-item"),!0),"".concat(I,"-item-active"),d),"".concat(I,"-item-disabled"),re),O),Ft=A()(y,(0,le.Z)((0,le.Z)((0,le.Z)({},"".concat(I,"-header"),!0),"".concat(I,"-header-collapsible-only"),$e),"".concat(I,"-icon-collapsible-only"),Ne)),_t={className:Ft,"aria-expanded":d,"aria-disabled":re,onKeyDown:mt};return!$e&&!Ne&&(_t.onClick=ct,_t.role=Y?"tab":"button",_t.tabIndex=re?-1:0),V.createElement("div",(0,xe.Z)({},T,{ref:p,className:Bt}),V.createElement("div",_t,g&&yt,V.createElement("span",{className:"".concat(I,"-header-text"),onClick:he==="header"?ct:void 0},Ye),Xe&&V.createElement("div",{className:"".concat(I,"-extra")},ye)),V.createElement(ke.default,(0,xe.Z)({visible:d,leavedClassName:"".concat(I,"-content-hidden")},Ae,{forceRender:fe,removeOnLeave:qe}),function(Yt,rn){var hn=Yt.className,Wt=Yt.style;return V.createElement(_e,{ref:rn,prefixCls:I,className:hn,style:Wt,isActive:d,forceRender:fe,role:Y?"tabpanel":void 0},oe)}))}),Ce=Ue,pe=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],q=function(p,h){var g=h.prefixCls,y=h.accordion,d=h.collapsible,L=h.destroyInactivePanel,fe=h.onItemClick,O=h.activeKey,I=h.openMotion,he=h.expandIcon;return p.map(function(Y,U){var ye=Y.children,Ye=Y.label,ce=Y.key,Ae=Y.collapsible,qe=Y.onItemClick,oe=Y.destroyInactivePanel,T=(0,Ie.Z)(Y,pe),re=String(ce!=null?ce:U),$e=Ae!=null?Ae:d,Ne=oe!=null?oe:L,Xe=function(yt){$e!=="disabled"&&(fe(yt),qe==null||qe(yt))},ct=!1;return y?ct=O[0]===re:ct=O.indexOf(re)>-1,V.createElement(Ce,(0,xe.Z)({},T,{prefixCls:g,key:re,panelKey:re,isActive:ct,accordion:y,openMotion:I,expandIcon:he,header:Ye,collapsible:$e,onItemClick:Xe,destroyInactivePanel:Ne}),ye)})},_=function(p,h,g){if(!p)return null;var y=g.prefixCls,d=g.accordion,L=g.collapsible,fe=g.destroyInactivePanel,O=g.onItemClick,I=g.activeKey,he=g.openMotion,Y=g.expandIcon,U=p.key||String(h),ye=p.props,Ye=ye.header,ce=ye.headerClass,Ae=ye.destroyInactivePanel,qe=ye.collapsible,oe=ye.onItemClick,T=!1;d?T=I[0]===U:T=I.indexOf(U)>-1;var re=qe!=null?qe:L,$e=function(ct){re!=="disabled"&&(O(ct),oe==null||oe(ct))},Ne={key:U,panelKey:U,header:Ye,headerClass:ce,isActive:T,prefixCls:y,destroyInactivePanel:Ae!=null?Ae:fe,openMotion:he,accordion:d,children:p.props.children,onItemClick:$e,expandIcon:Y,collapsible:re};return typeof p.type=="string"?p:(Object.keys(Ne).forEach(function(Xe){typeof Ne[Xe]=="undefined"&&delete Ne[Xe]}),V.cloneElement(p,Ne))};function ie(S,p,h){return Array.isArray(S)?q(S,h):(0,G.Z)(p).map(function(g,y){return _(g,y,h)})}var ae=ie,Se=m(26112);function se(S){var p=S;if(!Array.isArray(p)){var h=(0,x.Z)(p);p=h==="number"||h==="string"?[p]:[]}return p.map(function(g){return String(g)})}var be=V.forwardRef(function(S,p){var h=S.prefixCls,g=h===void 0?"rc-collapse":h,y=S.destroyInactivePanel,d=y===void 0?!1:y,L=S.style,fe=S.accordion,O=S.className,I=S.children,he=S.collapsible,Y=S.openMotion,U=S.expandIcon,ye=S.activeKey,Ye=S.defaultActiveKey,ce=S.onChange,Ae=S.items,qe=A()(g,O),oe=(0,E.Z)([],{value:ye,onChange:function(mt){return ce==null?void 0:ce(mt)},defaultValue:Ye,postState:se}),T=(0,N.Z)(oe,2),re=T[0],$e=T[1],Ne=function(mt){return $e(function(){if(fe)return re[0]===mt?[]:[mt];var yt=re.indexOf(mt),Bt=yt>-1;return Bt?re.filter(function(Ft){return Ft!==mt}):[].concat((0,R.Z)(re),[mt])})};(0,F.ZP)(!I,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var Xe=ae(Ae,I,{prefixCls:g,accordion:fe,openMotion:Y,expandIcon:U,collapsible:he,destroyInactivePanel:d,onItemClick:Ne,activeKey:re});return V.createElement("div",(0,xe.Z)({ref:p,className:qe,style:L,role:fe?"tablist":void 0},(0,Se.Z)(S,{aria:!0,data:!0})),Xe)}),D=Object.assign(be,{Panel:Ce}),Le=D,z=D.Panel,we=m(2738),ge=m(62892),Te=m(92343),Fe=m(36355),Re=m(19716),w=V.forwardRef((S,p)=>{const{getPrefixCls:h}=V.useContext(Fe.E_),{prefixCls:g,className:y,showArrow:d=!0}=S,L=h("collapse",g),fe=A()({[`${L}-no-arrow`]:!d},y);return V.createElement(Le.Panel,Object.assign({ref:p},S,{prefixCls:L,className:fe}))}),ve=m(17313),Qe=m(8378),je=m(83116),Be=m(37613);const Oe=S=>{const{componentCls:p,contentBg:h,padding:g,headerBg:y,headerPadding:d,collapseHeaderPaddingSM:L,collapseHeaderPaddingLG:fe,collapsePanelBorderRadius:O,lineWidth:I,lineType:he,colorBorder:Y,colorText:U,colorTextHeading:ye,colorTextDisabled:Ye,fontSize:ce,fontSizeLG:Ae,lineHeight:qe,marginSM:oe,paddingSM:T,paddingLG:re,paddingXS:$e,motionDurationSlow:Ne,fontSizeIcon:Xe,contentPadding:ct}=S,mt=`${I}px ${he} ${Y}`;return{[p]:Object.assign(Object.assign({},(0,ve.Wf)(S)),{backgroundColor:y,border:mt,borderBottom:0,borderRadius:`${O}px`,"&-rtl":{direction:"rtl"},[`& > ${p}-item`]:{borderBottom:mt,"&:last-child":{[`
|
|
|
&,
|
|
|
& > ${p}-header`]:{borderRadius:`0 0 ${O}px ${O}px`}},[`> ${p}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:d,color:ye,lineHeight:qe,cursor:"pointer",transition:`all ${Ne}, visibility 0s`,[`> ${p}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${p}-expand-icon`]:{height:ce*qe,display:"flex",alignItems:"center",paddingInlineEnd:oe},[`${p}-arrow`]:Object.assign(Object.assign({},(0,ve.Ro)()),{fontSize:Xe,svg:{transition:`transform ${Ne}`}}),[`${p}-header-text`]:{marginInlineEnd:"auto"}},[`${p}-header-collapsible-only`]:{cursor:"default",[`${p}-header-text`]:{flex:"none",cursor:"pointer"}},[`${p}-icon-collapsible-only`]:{cursor:"default",[`${p}-expand-icon`]:{cursor:"pointer"}}},[`${p}-content`]:{color:U,backgroundColor:h,borderTop:mt,[`& > ${p}-content-box`]:{padding:ct},"&-hidden":{display:"none"}},"&-small":{[`> ${p}-item`]:{[`> ${p}-header`]:{padding:L,paddingInlineStart:$e,[`> ${p}-expand-icon`]:{marginInlineStart:T-$e}},[`> ${p}-content > ${p}-content-box`]:{padding:T}}},"&-large":{[`> ${p}-item`]:{fontSize:Ae,[`> ${p}-header`]:{padding:fe,paddingInlineStart:g,[`> ${p}-expand-icon`]:{height:Ae*qe,marginInlineStart:re-g}},[`> ${p}-content > ${p}-content-box`]:{padding:re}}},[`${p}-item:last-child`]:{[`> ${p}-content`]:{borderRadius:`0 0 ${O}px ${O}px`}},[`& ${p}-item-disabled > ${p}-header`]:{"\n &,\n & > .arrow\n ":{color:Ye,cursor:"not-allowed"}},[`&${p}-icon-position-end`]:{[`& > ${p}-item`]:{[`> ${p}-header`]:{[`${p}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:oe}}}}})}},lt=S=>{const{componentCls:p}=S,h=`> ${p}-item > ${p}-header ${p}-arrow svg`;return{[`${p}-rtl`]:{[h]:{transform:"rotate(180deg)"}}}},$t=S=>{const{componentCls:p,headerBg:h,paddingXXS:g,colorBorder:y}=S;return{[`${p}-borderless`]:{backgroundColor:h,border:0,[`> ${p}-item`]:{borderBottom:`1px solid ${y}`},[`
|
|
|
> ${p}-item:last-child,
|
|
|
> ${p}-item:last-child ${p}-header
|
|
|
`]:{borderRadius:0},[`> ${p}-item:last-child`]:{borderBottom:0},[`> ${p}-item > ${p}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${p}-item > ${p}-content > ${p}-content-box`]:{paddingTop:g}}}},vt=S=>{const{componentCls:p,paddingSM:h}=S;return{[`${p}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${p}-item`]:{borderBottom:0,[`> ${p}-content`]:{backgroundColor:"transparent",border:0,[`> ${p}-content-box`]:{paddingBlock:h}}}}}};var Tt=(0,je.Z)("Collapse",S=>{const p=(0,Be.TS)(S,{collapseHeaderPaddingSM:`${S.paddingXS}px ${S.paddingSM}px`,collapseHeaderPaddingLG:`${S.padding}px ${S.paddingLG}px`,collapsePanelBorderRadius:S.borderRadiusLG});return[Oe(p),$t(p),vt(p),lt(p),(0,Qe.Z)(p)]},S=>({headerPadding:`${S.paddingSM}px ${S.padding}px`,headerBg:S.colorFillAlter,contentPadding:`${S.padding}px 16px`,contentBg:S.colorBgContainer})),pt=Object.assign(V.forwardRef((S,p)=>{const{getPrefixCls:h,direction:g,collapse:y}=V.useContext(Fe.E_),{prefixCls:d,className:L,rootClassName:fe,style:O,bordered:I=!0,ghost:he,size:Y,expandIconPosition:U="start",children:ye,expandIcon:Ye}=S,ce=(0,Re.Z)(mt=>{var yt;return(yt=Y!=null?Y:mt)!==null&&yt!==void 0?yt:"middle"}),Ae=h("collapse",d),qe=h(),[oe,T]=Tt(Ae),re=V.useMemo(()=>U==="left"?"start":U==="right"?"end":U,[U]),$e=function(){let mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const yt=Ye?Ye(mt):V.createElement(K.Z,{rotate:mt.isActive?90:void 0});return(0,Te.Tm)(yt,()=>({className:A()(yt.props.className,`${Ae}-arrow`)}))},Ne=A()(`${Ae}-icon-position-${re}`,{[`${Ae}-borderless`]:!I,[`${Ae}-rtl`]:g==="rtl",[`${Ae}-ghost`]:!!he,[`${Ae}-${ce}`]:ce!=="middle"},y==null?void 0:y.className,L,fe,T),Xe=Object.assign(Object.assign({},(0,ge.Z)(qe)),{motionAppear:!1,leavedClassName:`${Ae}-content-hidden`}),ct=V.useMemo(()=>ye?(0,G.Z)(ye).map((mt,yt)=>{var Bt,Ft;if(!((Bt=mt.props)===null||Bt===void 0)&&Bt.disabled){const _t=(Ft=mt.key)!==null&&Ft!==void 0?Ft:String(yt),{disabled:Yt,collapsible:rn}=mt.props,hn=Object.assign(Object.assign({},(0,we.Z)(mt.props,["disabled"])),{key:_t,collapsible:rn!=null?rn:Yt?"disabled":void 0});return(0,Te.Tm)(mt,hn)}return mt}):null,[ye]);return oe(V.createElement(Le,Object.assign({ref:p,openMotion:Xe},(0,we.Z)(S,["rootClassName"]),{expandIcon:$e,prefixCls:Ae,className:Ne,style:Object.assign(Object.assign({},y==null?void 0:y.style),O)}),ct))}),{Panel:w}),at=pt},93891:function(yn,dt,m){"use strict";var K=m(59301),j=m(36355),A=m(64165);const xe=R=>{const{componentName:N}=R,{getPrefixCls:x}=(0,K.useContext)(j.E_),E=x("empty");switch(N){case"Table":case"List":return K.createElement(A.Z,{image:A.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return K.createElement(A.Z,{image:A.Z.PRESENTED_IMAGE_SIMPLE,className:`${E}-small`});default:return K.createElement(A.Z,null)}};dt.Z=xe},43428:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return wt}});var K=m(92310),j=m.n(K),A=m(33885),xe=m(42978),R=m(43403),N=m(34280),x=m(59301),E=x.createContext(null),F=x.createContext({}),V=E,Ie=m(20068),G=m(54476),le=m(77900),ke=m(10228),ue=m(26112),de=m(70425),_e=function(at){var S=at.prefixCls,p=at.className,h=at.style,g=at.children,y=at.containerRef,d=at.id,L=at.onMouseEnter,fe=at.onMouseOver,O=at.onMouseLeave,I=at.onClick,he=at.onKeyDown,Y=at.onKeyUp,U={onMouseEnter:L,onMouseOver:fe,onMouseLeave:O,onClick:I,onKeyDown:he,onKeyUp:Y},ye=x.useContext(F),Ye=ye.panel,ce=(0,de.useComposeRef)(Ye,y);return x.createElement(x.Fragment,null,x.createElement("div",(0,G.Z)({id:d,className:j()("".concat(S,"-content"),p),style:(0,A.Z)({},h),"aria-modal":"true",role:"dialog",ref:ce},U),g))},Pe=_e,Ue=m(48736);function Ce(pt){return typeof pt=="string"&&String(Number(pt))===pt?((0,Ue.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(pt)):pt}function pe(pt){warning(!("wrapperClassName"in pt),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!pt.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var q={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function _(pt,at){var S,p,h,g,y=pt.prefixCls,d=pt.open,L=pt.placement,fe=pt.inline,O=pt.push,I=pt.forceRender,he=pt.autoFocus,Y=pt.keyboard,U=pt.rootClassName,ye=pt.rootStyle,Ye=pt.zIndex,ce=pt.className,Ae=pt.id,qe=pt.style,oe=pt.motion,T=pt.width,re=pt.height,$e=pt.children,Ne=pt.contentWrapperStyle,Xe=pt.mask,ct=pt.maskClosable,mt=pt.maskMotion,yt=pt.maskClassName,Bt=pt.maskStyle,Ft=pt.afterOpenChange,_t=pt.onClose,Yt=pt.onMouseEnter,rn=pt.onMouseOver,hn=pt.onMouseLeave,Wt=pt.onClick,on=pt.onKeyDown,xn=pt.onKeyUp,Vt=x.useRef(),Mn=x.useRef(),qn=x.useRef();x.useImperativeHandle(at,function(){return Vt.current});var An=function(tt){var ut=tt.keyCode,It=tt.shiftKey;switch(ut){case ke.Z.TAB:{if(ut===ke.Z.TAB){if(!It&&document.activeElement===qn.current){var Pt;(Pt=Mn.current)===null||Pt===void 0||Pt.focus({preventScroll:!0})}else if(It&&document.activeElement===Mn.current){var At;(At=qn.current)===null||At===void 0||At.focus({preventScroll:!0})}}break}case ke.Z.ESC:{_t&&Y&&(tt.stopPropagation(),_t(tt));break}}};x.useEffect(function(){if(d&&he){var ft;(ft=Vt.current)===null||ft===void 0||ft.focus({preventScroll:!0})}},[d]);var pr=x.useState(!1),er=(0,xe.Z)(pr,2),gr=er[0],$r=er[1],Rn=x.useContext(V),pn;O===!1?pn={distance:0}:O===!0?pn={}:pn=O||{};var tr=(S=(p=(h=pn)===null||h===void 0?void 0:h.distance)!==null&&p!==void 0?p:Rn==null?void 0:Rn.pushDistance)!==null&&S!==void 0?S:180,Ke=x.useMemo(function(){return{pushDistance:tr,push:function(){$r(!0)},pull:function(){$r(!1)}}},[tr]);x.useEffect(function(){if(d){var ft;Rn==null||(ft=Rn.push)===null||ft===void 0||ft.call(Rn)}else{var tt;Rn==null||(tt=Rn.pull)===null||tt===void 0||tt.call(Rn)}},[d]),x.useEffect(function(){return function(){var ft;Rn==null||(ft=Rn.pull)===null||ft===void 0||ft.call(Rn)}},[]);var H=Xe&&x.createElement(le.default,(0,G.Z)({key:"mask"},mt,{visible:d}),function(ft,tt){var ut=ft.className,It=ft.style;return x.createElement("div",{className:j()("".concat(y,"-mask"),ut,yt),style:(0,A.Z)((0,A.Z)({},It),Bt),onClick:ct&&d?_t:void 0,ref:tt})}),ee=typeof oe=="function"?oe(L):oe,Q={};if(gr&&tr)switch(L){case"top":Q.transform="translateY(".concat(tr,"px)");break;case"bottom":Q.transform="translateY(".concat(-tr,"px)");break;case"left":Q.transform="translateX(".concat(tr,"px)");break;default:Q.transform="translateX(".concat(-tr,"px)");break}L==="left"||L==="right"?Q.width=Ce(T):Q.height=Ce(re);var J={onMouseEnter:Yt,onMouseOver:rn,onMouseLeave:hn,onClick:Wt,onKeyDown:on,onKeyUp:xn},Ee=x.createElement(le.default,(0,G.Z)({key:"panel"},ee,{visible:d,forceRender:I,onVisibleChanged:function(tt){Ft==null||Ft(tt)},removeOnLeave:!1,leavedClassName:"".concat(y,"-content-wrapper-hidden")}),function(ft,tt){var ut=ft.className,It=ft.style;return x.createElement("div",(0,G.Z)({className:j()("".concat(y,"-content-wrapper"),ut),style:(0,A.Z)((0,A.Z)((0,A.Z)({},Q),It),Ne)},(0,ue.Z)(pt,{data:!0})),x.createElement(Pe,(0,G.Z)({id:Ae,containerRef:tt,prefixCls:y,className:ce,style:qe},J),$e))}),Ze=(0,A.Z)({},ye);return Ye&&(Ze.zIndex=Ye),x.createElement(V.Provider,{value:Ke},x.createElement("div",{className:j()(y,"".concat(y,"-").concat(L),U,(g={},(0,Ie.Z)(g,"".concat(y,"-open"),d),(0,Ie.Z)(g,"".concat(y,"-inline"),fe),g)),style:Ze,tabIndex:-1,ref:Vt,onKeyDown:An},H,x.createElement("div",{tabIndex:0,ref:Mn,style:q,"aria-hidden":"true","data-sentinel":"start"}),Ee,x.createElement("div",{tabIndex:0,ref:qn,style:q,"aria-hidden":"true","data-sentinel":"end"})))}var ie=x.forwardRef(_),ae=ie,Se=function(at){var S=at.open,p=S===void 0?!1:S,h=at.prefixCls,g=h===void 0?"rc-drawer":h,y=at.placement,d=y===void 0?"right":y,L=at.autoFocus,fe=L===void 0?!0:L,O=at.keyboard,I=O===void 0?!0:O,he=at.width,Y=he===void 0?378:he,U=at.mask,ye=U===void 0?!0:U,Ye=at.maskClosable,ce=Ye===void 0?!0:Ye,Ae=at.getContainer,qe=at.forceRender,oe=at.afterOpenChange,T=at.destroyOnClose,re=at.onMouseEnter,$e=at.onMouseOver,Ne=at.onMouseLeave,Xe=at.onClick,ct=at.onKeyDown,mt=at.onKeyUp,yt=at.panelRef,Bt=x.useState(!1),Ft=(0,xe.Z)(Bt,2),_t=Ft[0],Yt=Ft[1],rn=x.useState(!1),hn=(0,xe.Z)(rn,2),Wt=hn[0],on=hn[1];(0,N.Z)(function(){on(!0)},[]);var xn=Wt?p:!1,Vt=x.useRef(),Mn=x.useRef();(0,N.Z)(function(){xn&&(Mn.current=document.activeElement)},[xn]);var qn=function($r){var Rn;if(Yt($r),oe==null||oe($r),!$r&&Mn.current&&!((Rn=Vt.current)!==null&&Rn!==void 0&&Rn.contains(Mn.current))){var pn;(pn=Mn.current)===null||pn===void 0||pn.focus({preventScroll:!0})}},An=x.useMemo(function(){return{panel:yt}},[yt]);if(!qe&&!_t&&!xn&&T)return null;var pr={onMouseEnter:re,onMouseOver:$e,onMouseLeave:Ne,onClick:Xe,onKeyDown:ct,onKeyUp:mt},er=(0,A.Z)((0,A.Z)({},at),{},{open:xn,prefixCls:g,placement:d,autoFocus:fe,keyboard:I,width:Y,mask:ye,maskClosable:ce,inline:Ae===!1,afterOpenChange:qn,ref:Vt},pr);return x.createElement(F.Provider,{value:An},x.createElement(R.Z,{open:xn||qe||_t,autoDestroy:!1,getContainer:Ae,autoLock:ye&&(xn||_t)},x.createElement(ae,er)))},se=Se,be=se,D=m(62892),Le=m(36355),z=m(32441),we=m(47729),Te=pt=>{const{prefixCls:at,title:S,footer:p,extra:h,closeIcon:g,closable:y,onClose:d,headerStyle:L,drawerStyle:fe,bodyStyle:O,footerStyle:I,children:he}=pt,Y=x.useCallback(Ae=>x.createElement("button",{type:"button",onClick:d,"aria-label":"Close",className:`${at}-close`},Ae),[d]),[U,ye]=(0,we.Z)(y,g,Y,void 0,!0),Ye=x.useMemo(()=>!S&&!U?null:x.createElement("div",{style:L,className:j()(`${at}-header`,{[`${at}-header-close-only`]:U&&!S&&!h})},x.createElement("div",{className:`${at}-header-title`},ye,S&&x.createElement("div",{className:`${at}-title`},S)),h&&x.createElement("div",{className:`${at}-extra`},h)),[U,ye,h,L,at,S]),ce=x.useMemo(()=>{if(!p)return null;const Ae=`${at}-footer`;return x.createElement("div",{className:Ae,style:I},p)},[p,I,at]);return x.createElement("div",{className:`${at}-wrapper-body`,style:fe},Ye,x.createElement("div",{className:`${at}-body`,style:O},he),ce)},Fe=m(33234),Re=m(83116),X=m(37613),ve=pt=>{const{componentCls:at,motionDurationSlow:S}=pt,p={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${S}`}}};return{[at]:{[`${at}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${S}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${at}-panel-motion`]:{"&-left":[p,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[p,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[p,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[p,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}};const Qe=pt=>{const{componentCls:at,zIndexPopup:S,colorBgMask:p,colorBgElevated:h,motionDurationSlow:g,motionDurationMid:y,padding:d,paddingLG:L,fontSizeLG:fe,lineHeightLG:O,lineWidth:I,lineType:he,colorSplit:Y,marginSM:U,colorIcon:ye,colorIconHover:Ye,colorText:ce,fontWeightStrong:Ae,footerPaddingBlock:qe,footerPaddingInline:oe}=pt,T=`${at}-content-wrapper`;return{[at]:{position:"fixed",inset:0,zIndex:S,pointerEvents:"none","&-pure":{position:"relative",background:h,[`&${at}-left`]:{boxShadow:pt.boxShadowDrawerLeft},[`&${at}-right`]:{boxShadow:pt.boxShadowDrawerRight},[`&${at}-top`]:{boxShadow:pt.boxShadowDrawerUp},[`&${at}-bottom`]:{boxShadow:pt.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${at}-mask`]:{position:"absolute",inset:0,zIndex:S,background:p,pointerEvents:"auto"},[T]:{position:"absolute",zIndex:S,maxWidth:"100vw",transition:`all ${g}`,"&-hidden":{display:"none"}},[`&-left > ${T}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:pt.boxShadowDrawerLeft},[`&-right > ${T}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:pt.boxShadowDrawerRight},[`&-top > ${T}`]:{top:0,insetInline:0,boxShadow:pt.boxShadowDrawerUp},[`&-bottom > ${T}`]:{bottom:0,insetInline:0,boxShadow:pt.boxShadowDrawerDown},[`${at}-content`]:{width:"100%",height:"100%",overflow:"auto",background:h,pointerEvents:"auto"},[`${at}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${at}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${d}px ${L}px`,fontSize:fe,lineHeight:O,borderBottom:`${I}px ${he} ${Y}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${at}-extra`]:{flex:"none"},[`${at}-close`]:{display:"inline-block",marginInlineEnd:U,color:ye,fontWeight:Ae,fontSize:fe,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${y}`,textRendering:"auto","&:focus, &:hover":{color:Ye,textDecoration:"none"}},[`${at}-title`]:{flex:1,margin:0,color:ce,fontWeight:pt.fontWeightStrong,fontSize:fe,lineHeight:O},[`${at}-body`]:{flex:1,minWidth:0,minHeight:0,padding:L,overflow:"auto"},[`${at}-footer`]:{flexShrink:0,padding:`${qe}px ${oe}px`,borderTop:`${I}px ${he} ${Y}`},"&-rtl":{direction:"rtl"}}}};var je=(0,Re.Z)("Drawer",pt=>{const at=(0,X.TS)(pt,{});return[Qe(at),ve(at)]},pt=>({zIndexPopup:pt.zIndexPopupBase,footerPaddingBlock:pt.paddingXS,footerPaddingInline:pt.padding})),Be=m(11575),Oe=function(pt,at){var S={};for(var p in pt)Object.prototype.hasOwnProperty.call(pt,p)&&at.indexOf(p)<0&&(S[p]=pt[p]);if(pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var h=0,p=Object.getOwnPropertySymbols(pt);h<p.length;h++)at.indexOf(p[h])<0&&Object.prototype.propertyIsEnumerable.call(pt,p[h])&&(S[p[h]]=pt[p[h]]);return S};const lt=null,$t={distance:180},vt=pt=>{var at;const{rootClassName:S,width:p,height:h,size:g="default",mask:y=!0,push:d=$t,open:L,afterOpenChange:fe,onClose:O,prefixCls:I,getContainer:he,style:Y,className:U,visible:ye,afterVisibleChange:Ye}=pt,ce=Oe(pt,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","style","className","visible","afterVisibleChange"]),{getPopupContainer:Ae,getPrefixCls:qe,direction:oe,drawer:T}=x.useContext(Le.E_),re=qe("drawer",I),[$e,Ne]=je(re),Xe=he===void 0&&Ae?()=>Ae(document.body):he,ct=j()({"no-mask":!y,[`${re}-rtl`]:oe==="rtl"},S,Ne),mt=x.useMemo(()=>p!=null?p:g==="large"?736:378,[p,g]),yt=x.useMemo(()=>h!=null?h:g==="large"?736:378,[h,g]),Bt={motionName:(0,D.m)(re,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},Ft=Yt=>({motionName:(0,D.m)(re,`panel-motion-${Yt}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),_t=(0,Be.H)();return $e(x.createElement(Fe.BR,null,x.createElement(z.Ux,{status:!0,override:!0},x.createElement(be,Object.assign({prefixCls:re,onClose:O,maskMotion:Bt,motion:Ft},ce,{open:L!=null?L:ye,mask:y,push:d,width:mt,height:yt,style:Object.assign(Object.assign({},T==null?void 0:T.style),Y),className:j()(T==null?void 0:T.className,U),rootClassName:ct,getContainer:Xe,afterOpenChange:fe!=null?fe:Ye,panelRef:_t}),x.createElement(Te,Object.assign({prefixCls:re},ce,{onClose:O}))))))},Tt=pt=>{const{prefixCls:at,style:S,className:p,placement:h="right"}=pt,g=Oe(pt,["prefixCls","style","className","placement"]),{getPrefixCls:y}=x.useContext(Le.E_),d=y("drawer",at),[L,fe]=je(d),O=j()(d,`${d}-pure`,`${d}-${h}`,fe,p);return L(x.createElement("div",{className:O,style:S},x.createElement(Te,Object.assign({prefixCls:d},g))))};vt._InternalPanelDoNotUseOrYouWillBeFired=Tt;var wt=vt},91857:function(yn,dt,m){"use strict";var K=m(59301),j=m(38819),A=m(92310),xe=m.n(A),R=m(31561),N=m(70425),x=m(18929),E=m(2738),F=m(79676),V=m(53487),Ie=m(92343),G=m(36355),le=m(20834),ke=m(40875),ue=m(88088),de=m(47211);const _e=null,Pe=q=>{const{menu:_,arrow:ie,prefixCls:ae,children:Se,trigger:se,disabled:be,dropdownRender:D,getPopupContainer:Le,overlayClassName:z,rootClassName:we,open:ge,onOpenChange:Te,visible:Fe,onVisibleChange:Re,mouseEnterDelay:X=.15,mouseLeaveDelay:w=.1,autoAdjustOverflow:ve=!0,placement:Qe="",overlay:je,transitionName:Be}=q,{getPopupContainer:Oe,getPrefixCls:lt,direction:$t}=K.useContext(G.E_),vt=K.useMemo(()=>{const U=lt();return Be!==void 0?Be:Qe.includes("top")?`${U}-slide-down`:`${U}-slide-up`},[lt,Qe,Be]),Tt=K.useMemo(()=>Qe?Qe.includes("Center")?Qe.slice(0,Qe.indexOf("Center")):Qe:$t==="rtl"?"bottomRight":"bottomLeft",[Qe,$t]),wt=lt("dropdown",ae),[pt,at]=(0,de.Z)(wt),[,S]=(0,ue.Z)(),p=K.Children.only(Se),h=(0,Ie.Tm)(p,{className:xe()(`${wt}-trigger`,{[`${wt}-rtl`]:$t==="rtl"},p.props.className),disabled:be}),g=be?[]:se;let y;g&&g.includes("contextMenu")&&(y=!0);const[d,L]=(0,x.Z)(!1,{value:ge!=null?ge:Fe}),fe=(0,N.useEvent)(U=>{Te==null||Te(U),Re==null||Re(U),L(U)}),O=xe()(z,we,at,{[`${wt}-rtl`]:$t==="rtl"}),I=(0,F.Z)({arrowPointAtCenter:typeof ie=="object"&&ie.pointAtCenter,autoAdjustOverflow:ve,offset:S.marginXXS,arrowWidth:ie?S.sizePopupArrow:0,borderRadius:S.borderRadius}),he=K.useCallback(()=>{L(!1)},[]),Y=()=>{let U;return _!=null&&_.items?U=K.createElement(le.default,Object.assign({},_)):typeof je=="function"?U=je():U=je,D&&(U=D(U)),U=K.Children.only(typeof U=="string"?K.createElement("span",null,U):U),K.createElement(ke.J,{prefixCls:`${wt}-menu`,expandIcon:K.createElement("span",{className:`${wt}-menu-submenu-arrow`},K.createElement(j.Z,{className:`${wt}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:he,validator:ye=>{let{mode:Ye}=ye}},U)};return pt(K.createElement(R.Z,Object.assign({alignPoint:y},(0,E.Z)(q,["rootClassName"]),{mouseEnterDelay:X,mouseLeaveDelay:w,visible:d,builtinPlacements:I,arrow:!!ie,overlayClassName:O,prefixCls:wt,getPopupContainer:Le||Oe,transitionName:vt,trigger:g,overlay:Y,placement:Tt,onVisibleChange:fe}),h))};function Ue(q){return Object.assign(Object.assign({},q),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const Ce=(0,V.Z)(Pe,"dropdown",q=>q,Ue),pe=q=>K.createElement(Ce,Object.assign({},q),K.createElement("span",null));Pe._InternalPanelDoNotUseOrYouWillBeFired=pe,dt.Z=Pe},38854:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return ue}});var K=m(91857),j=m(92310),A=m.n(j),xe=m(59301),R=m(18785),N=m(3113),x=m(36355),E=m(81327),F=m(33234),V=m(47211),Ie=function(de,_e){var Pe={};for(var Ue in de)Object.prototype.hasOwnProperty.call(de,Ue)&&_e.indexOf(Ue)<0&&(Pe[Ue]=de[Ue]);if(de!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ce=0,Ue=Object.getOwnPropertySymbols(de);Ce<Ue.length;Ce++)_e.indexOf(Ue[Ce])<0&&Object.prototype.propertyIsEnumerable.call(de,Ue[Ce])&&(Pe[Ue[Ce]]=de[Ue[Ce]]);return Pe};const G=de=>{const{getPopupContainer:_e,getPrefixCls:Pe,direction:Ue}=xe.useContext(x.E_),{prefixCls:Ce,type:pe="default",danger:q,disabled:_,loading:ie,onClick:ae,htmlType:Se,children:se,className:be,menu:D,arrow:Le,autoFocus:z,overlay:we,trigger:ge,align:Te,open:Fe,onOpenChange:Re,placement:X,getPopupContainer:w,href:ve,icon:Qe=xe.createElement(R.Z,null),title:je,buttonsRender:Be=Y=>Y,mouseEnterDelay:Oe,mouseLeaveDelay:lt,overlayClassName:$t,overlayStyle:vt,destroyPopupOnHide:Tt,dropdownRender:wt}=de,pt=Ie(de,["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"]),at=Pe("dropdown",Ce),S=`${at}-button`,[p,h]=(0,V.Z)(at),g={menu:D,arrow:Le,autoFocus:z,align:Te,disabled:_,trigger:_?[]:ge,onOpenChange:Re,getPopupContainer:w||_e,mouseEnterDelay:Oe,mouseLeaveDelay:lt,overlayClassName:$t,overlayStyle:vt,destroyPopupOnHide:Tt,dropdownRender:wt},{compactSize:y,compactItemClassnames:d}=(0,F.ri)(at,Ue),L=A()(S,d,be,h);"overlay"in de&&(g.overlay=we),"open"in de&&(g.open=Fe),"placement"in de?g.placement=X:g.placement=Ue==="rtl"?"bottomLeft":"bottomRight";const fe=xe.createElement(N.ZP,{type:pe,danger:q,disabled:_,loading:ie,onClick:ae,htmlType:Se,href:ve,title:je},se),O=xe.createElement(N.ZP,{type:pe,danger:q,icon:Qe}),[I,he]=Be([fe,O]);return p(xe.createElement(E.Z.Compact,Object.assign({className:L,size:y,block:!0},pt),I,xe.createElement(K.Z,Object.assign({},g),he)))};G.__ANT_BUTTON=!0;var le=G;const ke=K.Z;ke.Button=le;var ue=ke},47211:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return Ie}});var K=m(17313),j=m(13826),A=m(92899),xe=m(29878),R=m(19447),N=m(83116),x=m(37613),F=G=>{const{componentCls:le,menuCls:ke,colorError:ue,colorTextLightSolid:de}=G,_e=`${ke}-item`;return{[`${le}, ${le}-menu-submenu`]:{[`${ke} ${_e}`]:{[`&${_e}-danger:not(${_e}-disabled)`]:{color:ue,"&:hover":{color:de,backgroundColor:ue}}}}}};const V=G=>{const{componentCls:le,menuCls:ke,zIndexPopup:ue,dropdownArrowDistance:de,sizePopupArrow:_e,antCls:Pe,iconCls:Ue,motionDurationMid:Ce,dropdownPaddingVertical:pe,fontSize:q,dropdownEdgeChildPadding:_,colorTextDisabled:ie,fontSizeIcon:ae,controlPaddingHorizontal:Se,colorBgElevated:se}=G;return[{[le]:Object.assign(Object.assign({},(0,K.Wf)(G)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:ue,display:"block","&::before":{position:"absolute",insetBlock:-de+_e/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${Pe}-btn`]:{[`& > ${Ue}-down, & > ${Pe}-btn-icon > ${Ue}-down`]:{fontSize:ae}},[`${le}-wrap`]:{position:"relative",[`${Pe}-btn > ${Ue}-down`]:{fontSize:ae},[`${Ue}-down::before`]:{transition:`transform ${Ce}`}},[`${le}-wrap-open`]:{[`${Ue}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${Pe}-slide-down-enter${Pe}-slide-down-enter-active${le}-placement-bottomLeft,
|
|
|
&${Pe}-slide-down-appear${Pe}-slide-down-appear-active${le}-placement-bottomLeft,
|
|
|
&${Pe}-slide-down-enter${Pe}-slide-down-enter-active${le}-placement-bottom,
|
|
|
&${Pe}-slide-down-appear${Pe}-slide-down-appear-active${le}-placement-bottom,
|
|
|
&${Pe}-slide-down-enter${Pe}-slide-down-enter-active${le}-placement-bottomRight,
|
|
|
&${Pe}-slide-down-appear${Pe}-slide-down-appear-active${le}-placement-bottomRight`]:{animationName:j.fJ},[`&${Pe}-slide-up-enter${Pe}-slide-up-enter-active${le}-placement-topLeft,
|
|
|
&${Pe}-slide-up-appear${Pe}-slide-up-appear-active${le}-placement-topLeft,
|
|
|
&${Pe}-slide-up-enter${Pe}-slide-up-enter-active${le}-placement-top,
|
|
|
&${Pe}-slide-up-appear${Pe}-slide-up-appear-active${le}-placement-top,
|
|
|
&${Pe}-slide-up-enter${Pe}-slide-up-enter-active${le}-placement-topRight,
|
|
|
&${Pe}-slide-up-appear${Pe}-slide-up-appear-active${le}-placement-topRight`]:{animationName:j.Qt},[`&${Pe}-slide-down-leave${Pe}-slide-down-leave-active${le}-placement-bottomLeft,
|
|
|
&${Pe}-slide-down-leave${Pe}-slide-down-leave-active${le}-placement-bottom,
|
|
|
&${Pe}-slide-down-leave${Pe}-slide-down-leave-active${le}-placement-bottomRight`]:{animationName:j.Uw},[`&${Pe}-slide-up-leave${Pe}-slide-up-leave-active${le}-placement-topLeft,
|
|
|
&${Pe}-slide-up-leave${Pe}-slide-up-leave-active${le}-placement-top,
|
|
|
&${Pe}-slide-up-leave${Pe}-slide-up-leave-active${le}-placement-topRight`]:{animationName:j.ly}})},(0,R.ZP)(G,{colorBg:se,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${le} ${ke}`]:{position:"relative",margin:0},[`${ke}-submenu-popup`]:{position:"absolute",zIndex:ue,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${le}, ${le}-menu-submenu`]:{[ke]:Object.assign(Object.assign({padding:_,listStyleType:"none",backgroundColor:se,backgroundClip:"padding-box",borderRadius:G.borderRadiusLG,outline:"none",boxShadow:G.boxShadowSecondary},(0,K.Qy)(G)),{[`${ke}-item-group-title`]:{padding:`${pe}px ${Se}px`,color:G.colorTextDescription,transition:`all ${Ce}`},[`${ke}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${ke}-item-icon`]:{minWidth:q,marginInlineEnd:G.marginXS,fontSize:G.fontSizeSM},[`${ke}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${Ce}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${ke}-item, ${ke}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${pe}px ${Se}px`,color:G.colorText,fontWeight:"normal",fontSize:q,lineHeight:G.lineHeight,cursor:"pointer",transition:`all ${Ce}`,borderRadius:G.borderRadiusSM,"&:hover, &-active":{backgroundColor:G.controlItemBgHover}},(0,K.Qy)(G)),{"&-selected":{color:G.colorPrimary,backgroundColor:G.controlItemBgActive,"&:hover, &-active":{backgroundColor:G.controlItemBgActiveHover}},"&-disabled":{color:ie,cursor:"not-allowed","&:hover":{color:ie,backgroundColor:se,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${G.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:G.colorSplit},[`${le}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:G.paddingXS,[`${le}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:G.colorTextDescription,fontSize:ae,fontStyle:"normal"}}}),[`${ke}-item-group-list`]:{margin:`0 ${G.marginXS}px`,padding:0,listStyle:"none"},[`${ke}-submenu-title`]:{paddingInlineEnd:Se+G.fontSizeSM},[`${ke}-submenu-vertical`]:{position:"relative"},[`${ke}-submenu${ke}-submenu-disabled ${le}-menu-submenu-title`]:{[`&, ${le}-menu-submenu-arrow-icon`]:{color:ie,backgroundColor:se,cursor:"not-allowed"}},[`${ke}-submenu-selected ${le}-menu-submenu-title`]:{color:G.colorPrimary}})}},[(0,j.oN)(G,"slide-up"),(0,j.oN)(G,"slide-down"),(0,A.Fm)(G,"move-up"),(0,A.Fm)(G,"move-down"),(0,xe._y)(G,"zoom-big")]]};var Ie=(0,N.Z)("Dropdown",(G,le)=>{let{rootPrefixCls:ke}=le;const{marginXXS:ue,sizePopupArrow:de,controlHeight:_e,fontSize:Pe,lineHeight:Ue,paddingXXS:Ce,componentCls:pe,borderRadiusLG:q}=G,_=(_e-Pe*Ue)/2,{dropdownArrowOffset:ie}=(0,R.fS)({contentRadius:q}),ae=(0,x.TS)(G,{menuCls:`${pe}-menu`,rootPrefixCls:ke,dropdownArrowDistance:de/2+ue,dropdownArrowOffset:ie,dropdownPaddingVertical:_,dropdownEdgeChildPadding:Ce});return[V(ae),F(ae)]},G=>({zIndexPopup:G.zIndexPopupBase+50}))},64165:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return Ce}});var K=m(92310),j=m.n(K),A=m(59301),xe=m(36355),R=m(9763),N=m(64993),x=m(88088),F=()=>{const[,pe]=(0,x.Z)(),_=new N.C(pe.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return A.createElement("svg",{style:_,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},A.createElement("g",{fill:"none",fillRule:"evenodd"},A.createElement("g",{transform:"translate(24 31.67)"},A.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),A.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"}),A.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)"}),A.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"}),A.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"})),A.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"}),A.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},A.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),A.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Ie=()=>{const[,pe]=(0,x.Z)(),{colorFill:q,colorFillTertiary:_,colorFillQuaternary:ie,colorBgContainer:ae}=pe,{borderColor:Se,shadowColor:se,contentColor:be}=(0,A.useMemo)(()=>({borderColor:new N.C(q).onBackground(ae).toHexShortString(),shadowColor:new N.C(_).onBackground(ae).toHexShortString(),contentColor:new N.C(ie).onBackground(ae).toHexShortString()}),[q,_,ie,ae]);return A.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},A.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},A.createElement("ellipse",{fill:se,cx:"32",cy:"33",rx:"32",ry:"7"}),A.createElement("g",{fillRule:"nonzero",stroke:Se},A.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"}),A.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:be}))))},G=m(83116),le=m(37613);const ke=pe=>{const{componentCls:q,margin:_,marginXS:ie,marginXL:ae,fontSize:Se,lineHeight:se}=pe;return{[q]:{marginInline:ie,fontSize:Se,lineHeight:se,textAlign:"center",[`${q}-image`]:{height:pe.emptyImgHeight,marginBottom:ie,opacity:pe.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${q}-description`]:{color:pe.colorText},[`${q}-footer`]:{marginTop:_},"&-normal":{marginBlock:ae,color:pe.colorTextDisabled,[`${q}-description`]:{color:pe.colorTextDisabled},[`${q}-image`]:{height:pe.emptyImgHeightMD}},"&-small":{marginBlock:ie,color:pe.colorTextDisabled,[`${q}-image`]:{height:pe.emptyImgHeightSM}}}}};var ue=(0,G.Z)("Empty",pe=>{const{componentCls:q,controlHeightLG:_}=pe,ie=(0,le.TS)(pe,{emptyImgCls:`${q}-img`,emptyImgHeight:_*2.5,emptyImgHeightMD:_,emptyImgHeightSM:_*.875});return[ke(ie)]}),de=function(pe,q){var _={};for(var ie in pe)Object.prototype.hasOwnProperty.call(pe,ie)&&q.indexOf(ie)<0&&(_[ie]=pe[ie]);if(pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ae=0,ie=Object.getOwnPropertySymbols(pe);ae<ie.length;ae++)q.indexOf(ie[ae])<0&&Object.prototype.propertyIsEnumerable.call(pe,ie[ae])&&(_[ie[ae]]=pe[ie[ae]]);return _};const _e=A.createElement(F,null),Pe=A.createElement(Ie,null),Ue=pe=>{var{className:q,rootClassName:_,prefixCls:ie,image:ae=_e,description:Se,children:se,imageStyle:be,style:D}=pe,Le=de(pe,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:z,direction:we,empty:ge}=A.useContext(xe.E_),Te=z("empty",ie),[Fe,Re]=ue(Te),[X]=(0,R.Z)("Empty"),w=typeof Se!="undefined"?Se:X==null?void 0:X.description,ve=typeof w=="string"?w:"empty";let Qe=null;return typeof ae=="string"?Qe=A.createElement("img",{alt:ve,src:ae}):Qe=ae,Fe(A.createElement("div",Object.assign({className:j()(Re,Te,ge==null?void 0:ge.className,{[`${Te}-normal`]:ae===Pe,[`${Te}-rtl`]:we==="rtl"},q,_),style:Object.assign(Object.assign({},ge==null?void 0:ge.style),D)},Le),A.createElement("div",{className:`${Te}-image`,style:be},Qe),w&&A.createElement("div",{className:`${Te}-description`},w),se&&A.createElement("div",{className:`${Te}-footer`},se)))};Ue.PRESENTED_IMAGE_DEFAULT=_e,Ue.PRESENTED_IMAGE_SIMPLE=Pe;var Ce=Ue},78241:function(yn,dt,m){"use strict";m.d(dt,{default:function(){return tr}});var K=m(94480),j=m(92310),A=m.n(j),xe=m(77900),R=m(59301),N=m(62892),x=m(32441);function E(Ke){const[H,ee]=R.useState(Ke);return R.useEffect(()=>{const Q=setTimeout(()=>{ee(Ke)},Ke.length?0:10);return()=>{clearTimeout(Q)}},[Ke]),H}var F=m(17313),V=m(29878),Ie=m(8378),G=m(37613),le=m(83116),ue=Ke=>{const{componentCls:H}=Ke,ee=`${H}-show-help`,Q=`${H}-show-help-item`;return{[ee]:{transition:`opacity ${Ke.motionDurationSlow} ${Ke.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Q]:{overflow:"hidden",transition:`height ${Ke.motionDurationSlow} ${Ke.motionEaseInOut},
|
|
|
opacity ${Ke.motionDurationSlow} ${Ke.motionEaseInOut},
|
|
|
transform ${Ke.motionDurationSlow} ${Ke.motionEaseInOut} !important`,[`&${Q}-appear, &${Q}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Q}-leave-active`]:{transform:"translateY(-5px)"}}}}};const de=Ke=>({legend:{display:"block",width:"100%",marginBottom:Ke.marginLG,padding:0,color:Ke.colorTextDescription,fontSize:Ke.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Ke.lineWidth}px ${Ke.lineType} ${Ke.colorBorder}`},label:{fontSize:Ke.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 ${Ke.controlOutlineWidth}px ${Ke.controlOutline}`},output:{display:"block",paddingTop:15,color:Ke.colorText,fontSize:Ke.fontSize,lineHeight:Ke.lineHeight}}),_e=(Ke,H)=>{const{formItemCls:ee}=Ke;return{[ee]:{[`${ee}-label > label`]:{height:H},[`${ee}-control-input`]:{minHeight:H}}}},Pe=Ke=>{const{componentCls:H}=Ke;return{[Ke.componentCls]:Object.assign(Object.assign(Object.assign({},(0,F.Wf)(Ke)),de(Ke)),{[`${H}-text`]:{display:"inline-block",paddingInlineEnd:Ke.paddingSM},"&-small":Object.assign({},_e(Ke,Ke.controlHeightSM)),"&-large":Object.assign({},_e(Ke,Ke.controlHeightLG))})}},Ue=Ke=>{const{formItemCls:H,iconCls:ee,componentCls:Q,rootPrefixCls:J,labelRequiredMarkColor:Ee,labelColor:Ze,labelFontSize:ft,labelHeight:tt,labelColonMarginInlineStart:ut,labelColonMarginInlineEnd:It,itemMarginBottom:Pt}=Ke;return{[H]:Object.assign(Object.assign({},(0,F.Wf)(Ke)),{marginBottom:Pt,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${J}-row`]:{display:"none"},"&-has-warning":{[`${H}-split`]:{color:Ke.colorError}},"&-has-error":{[`${H}-split`]:{color:Ke.colorWarning}},[`${H}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Ke.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:tt,color:Ze,fontSize:ft,[`> ${ee}`]:{fontSize:Ke.fontSize,verticalAlign:"top"},[`&${H}-required:not(${H}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Ke.marginXXS,color:Ee,fontSize:Ke.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Q}-hide-required-mark &`]:{display:"none"}},[`${H}-optional`]:{display:"inline-block",marginInlineStart:Ke.marginXXS,color:Ke.colorTextDescription,[`${Q}-hide-required-mark &`]:{display:"none"}},[`${H}-tooltip`]:{color:Ke.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Ke.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:ut,marginInlineEnd:It},[`&${H}-no-colon::after`]:{content:'"\\a0"'}}},[`${H}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${J}-col-'"]):not([class*="' ${J}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Ke.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[H]:{"&-explain, &-extra":{clear:"both",color:Ke.colorTextDescription,fontSize:Ke.fontSize,lineHeight:Ke.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Ke.controlHeightSM,transition:`color ${Ke.motionDurationMid} ${Ke.motionEaseOut}`},"&-explain":{"&-error":{color:Ke.colorError},"&-warning":{color:Ke.colorWarning}}},[`&-with-help ${H}-explain`]:{height:"auto",opacity:1},[`${H}-feedback-icon`]:{fontSize:Ke.fontSize,textAlign:"center",visibility:"visible",animationName:V.kr,animationDuration:Ke.motionDurationMid,animationTimingFunction:Ke.motionEaseOutBack,pointerEvents:"none","&-success":{color:Ke.colorSuccess},"&-error":{color:Ke.colorError},"&-warning":{color:Ke.colorWarning},"&-validating":{color:Ke.colorPrimary}}})}},Ce=Ke=>{const{componentCls:H,formItemCls:ee}=Ke;return{[`${H}-horizontal`]:{[`${ee}-label`]:{flexGrow:0},[`${ee}-control`]:{flex:"1 1 0",minWidth:0},[`${ee}-label[class$='-24'], ${ee}-label[class*='-24 ']`]:{[`& + ${ee}-control`]:{minWidth:"unset"}}}}},pe=Ke=>{const{componentCls:H,formItemCls:ee}=Ke;return{[`${H}-inline`]:{display:"flex",flexWrap:"wrap",[ee]:{flex:"none",marginInlineEnd:Ke.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${ee}-label,
|
|
|
> ${ee}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${ee}-label`]:{flex:"none"},[`${H}-text`]:{display:"inline-block"},[`${ee}-has-feedback`]:{display:"inline-block"}}}}},q=Ke=>({padding:Ke.verticalLabelPadding,margin:Ke.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),_=Ke=>{const{componentCls:H,formItemCls:ee,rootPrefixCls:Q}=Ke;return{[`${ee} ${ee}-label`]:q(Ke),[H]:{[ee]:{flexWrap:"wrap",[`${ee}-label, ${ee}-control`]:{[`&:not([class*=" ${Q}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},ie=Ke=>{const{componentCls:H,formItemCls:ee,rootPrefixCls:Q}=Ke;return{[`${H}-vertical`]:{[ee]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${H}-item-control`]:{width:"100%"}}},[`${H}-vertical ${ee}-label,
|
|
|
.${Q}-col-24${ee}-label,
|
|
|
.${Q}-col-xl-24${ee}-label`]:q(Ke),[`@media (max-width: ${Ke.screenXSMax}px)`]:[_(Ke),{[H]:{[`.${Q}-col-xs-24${ee}-label`]:q(Ke)}}],[`@media (max-width: ${Ke.screenSMMax}px)`]:{[H]:{[`.${Q}-col-sm-24${ee}-label`]:q(Ke)}},[`@media (max-width: ${Ke.screenMDMax}px)`]:{[H]:{[`.${Q}-col-md-24${ee}-label`]:q(Ke)}},[`@media (max-width: ${Ke.screenLGMax}px)`]:{[H]:{[`.${Q}-col-lg-24${ee}-label`]:q(Ke)}}}},ae=(Ke,H)=>(0,G.TS)(Ke,{formItemCls:`${Ke.componentCls}-item`,rootPrefixCls:H});var Se=(0,le.Z)("Form",(Ke,H)=>{let{rootPrefixCls:ee}=H;const Q=ae(Ke,ee);return[Pe(Q),Ue(Q),ue(Q),Ce(Q),pe(Q),ie(Q),(0,Ie.Z)(Q),V.kr]},Ke=>({labelRequiredMarkColor:Ke.colorError,labelColor:Ke.colorTextHeading,labelFontSize:Ke.fontSize,labelHeight:Ke.controlHeight,labelColonMarginInlineStart:Ke.marginXXS/2,labelColonMarginInlineEnd:Ke.marginXS,itemMarginBottom:Ke.marginLG,verticalLabelPadding:`0 0 ${Ke.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const se=[];function be(Ke,H,ee){let Q=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Ke=="string"?Ke:`${H}-${Q}`,error:Ke,errorStatus:ee}}var Le=Ke=>{let{help:H,helpStatus:ee,errors:Q=se,warnings:J=se,className:Ee,fieldId:Ze,onVisibleChanged:ft}=Ke;const{prefixCls:tt}=R.useContext(x.Rk),ut=`${tt}-item-explain`,[,It]=Se(tt),Pt=(0,R.useMemo)(()=>(0,N.Z)(tt),[tt]),At=E(Q),Ge=E(J),St=R.useMemo(()=>H!=null?[be(H,"help",ee)]:[].concat((0,K.Z)(At.map((Kt,tn)=>be(Kt,"error","error",tn))),(0,K.Z)(Ge.map((Kt,tn)=>be(Kt,"warning","warning",tn)))),[H,ee,At,Ge]),Qt={};return Ze&&(Qt.id=`${Ze}_help`),R.createElement(xe.default,{motionDeadline:Pt.motionDeadline,motionName:`${tt}-show-help`,visible:!!St.length,onVisibleChanged:ft},Kt=>{const{className:tn,style:Ut}=Kt;return R.createElement("div",Object.assign({},Qt,{className:A()(ut,tn,Ee,It),style:Ut,role:"alert"}),R.createElement(xe.CSSMotionList,Object.assign({keys:St},(0,N.Z)(tt),{motionName:`${tt}-show-help-item`,component:!1}),Sn=>{const{key:Nt,error:mn,errorStatus:ot,className:st,style:ht}=Sn;return R.createElement("div",{key:Nt,className:A()(st,{[`${ut}-${ot}`]:ot}),style:ht},mn)}))})},z=m(95013),we=m(36355),ge=m(1684),Te=m(52946),Fe=m(19716),Re=m(16722);const X=["parentNode"],w="form_item";function ve(Ke){return Ke===void 0||Ke===!1?[]:Array.isArray(Ke)?Ke:[Ke]}function Qe(Ke,H){if(!Ke.length)return;const ee=Ke.join("_");return H?`${H}_${ee}`:X.includes(ee)?`${w}_${ee}`:ee}function je(Ke,H,ee,Q,J,Ee){let Ze=Q;return Ee!==void 0?Ze=Ee:ee.validating?Ze="validating":Ke.length?Ze="error":H.length?Ze="warning":(ee.touched||J&&ee.validated)&&(Ze="success"),Ze}function Be(Ke){return ve(Ke).join("_")}function Oe(Ke){const[H]=(0,z.useForm)(),ee=R.useRef({}),Q=R.useMemo(()=>Ke!=null?Ke:Object.assign(Object.assign({},H),{__INTERNAL__:{itemRef:J=>Ee=>{const Ze=Be(J);Ee?ee.current[Ze]=Ee:delete ee.current[Ze]}},scrollToField:function(J){let Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const Ze=ve(J),ft=Qe(Ze,Q.__INTERNAL__.name),tt=ft?document.getElementById(ft):null;tt&&(0,Re.Z)(tt,Object.assign({scrollMode:"if-needed",block:"nearest"},Ee))},getFieldInstance:J=>{const Ee=Be(J);return ee.current[Ee]}}),[Ke,H]);return[Q]}var lt=m(28726),$t=function(Ke,H){var ee={};for(var Q in Ke)Object.prototype.hasOwnProperty.call(Ke,Q)&&H.indexOf(Q)<0&&(ee[Q]=Ke[Q]);if(Ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var J=0,Q=Object.getOwnPropertySymbols(Ke);J<Q.length;J++)H.indexOf(Q[J])<0&&Object.prototype.propertyIsEnumerable.call(Ke,Q[J])&&(ee[Q[J]]=Ke[Q[J]]);return ee};const vt=(Ke,H)=>{const ee=R.useContext(ge.Z),{getPrefixCls:Q,direction:J,form:Ee}=R.useContext(we.E_),{prefixCls:Ze,className:ft,rootClassName:tt,size:ut,disabled:It=ee,form:Pt,colon:At,labelAlign:Ge,labelWrap:St,labelCol:Qt,wrapperCol:Kt,hideRequiredMark:tn,layout:Ut="horizontal",scrollToFirstError:Sn,requiredMark:Nt,onFinishFailed:mn,name:ot,style:st,feedbackIcons:ht}=Ke,Mt=$t(Ke,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),gt=(0,Fe.Z)(ut),bt=R.useContext(lt.Z),xt=(0,R.useMemo)(()=>Nt!==void 0?Nt:Ee&&Ee.requiredMark!==void 0?Ee.requiredMark:!tn,[tn,Nt,Ee]),Rt=At!=null?At:Ee==null?void 0:Ee.colon,Gt=Q("form",Ze),[an,Pn]=Se(Gt),Kn=A()(Gt,`${Gt}-${Ut}`,{[`${Gt}-hide-required-mark`]:xt===!1,[`${Gt}-rtl`]:J==="rtl",[`${Gt}-${gt}`]:gt},Pn,Ee==null?void 0:Ee.className,ft,tt),[Qn]=Oe(Pt),{__INTERNAL__:$n}=Qn;$n.name=ot;const Cn=(0,R.useMemo)(()=>({name:ot,labelAlign:Ge,labelCol:Qt,labelWrap:St,wrapperCol:Kt,vertical:Ut==="vertical",colon:Rt,requiredMark:xt,itemRef:$n.itemRef,form:Qn,feedbackIcons:ht}),[ot,Ge,Qt,Kt,Ut,Rt,xt,Qn,ht]);R.useImperativeHandle(H,()=>Qn);const rr=(Vn,wn)=>{if(Vn){let On={block:"nearest"};typeof Vn=="object"&&(On=Vn),Qn.scrollToField(wn,On)}},jn=Vn=>{if(mn==null||mn(Vn),Vn.errorFields.length){const wn=Vn.errorFields[0].name;if(Sn!==void 0){rr(Sn,wn);return}Ee&&Ee.scrollToFirstError!==void 0&&rr(Ee.scrollToFirstError,wn)}};return an(R.createElement(ge.n,{disabled:It},R.createElement(Te.q,{size:gt},R.createElement(x.RV,Object.assign({},{validateMessages:bt}),R.createElement(x.q3.Provider,{value:Cn},R.createElement(z.default,Object.assign({id:ot},Mt,{name:ot,onFinishFailed:jn,form:Qn,style:Object.assign(Object.assign({},Ee==null?void 0:Ee.style),st),className:Kn})))))))};var wt=R.forwardRef(vt),pt=m(41799),at=m(8654),S=m(92343),p=m(11592);function h(Ke){if(typeof Ke=="function")return Ke;const H=(0,p.Z)(Ke);return H.length<=1?H[0]:H}const g=()=>{const{status:Ke,errors:H=[],warnings:ee=[]}=(0,R.useContext)(x.aM);return{status:Ke,errors:H,warnings:ee}};g.Context=x.aM;var y=g,d=m(16089);function L(Ke){const[H,ee]=R.useState(Ke),Q=(0,R.useRef)(null),J=(0,R.useRef)([]),Ee=(0,R.useRef)(!1);R.useEffect(()=>(Ee.current=!1,()=>{Ee.current=!0,d.Z.cancel(Q.current),Q.current=null}),[]);function Ze(ft){Ee.current||(Q.current===null&&(J.current=[],Q.current=(0,d.Z)(()=>{Q.current=null,ee(tt=>{let ut=tt;return J.current.forEach(It=>{ut=It(ut)}),ut})})),J.current.push(ft))}return[H,Ze]}function fe(){const{itemRef:Ke}=R.useContext(x.q3),H=R.useRef({});function ee(Q,J){const Ee=J&&typeof J=="object"&&J.ref,Ze=Q.join("_");return(H.current.name!==Ze||H.current.originRef!==Ee)&&(H.current.name=Ze,H.current.originRef=Ee,H.current.ref=(0,at.sQ)(Ke(Q),Ee)),H.current.ref}return ee}var O=m(29194),I=m(34280),he=m(2738),Y=m(27382),U=m(37028);const ye=Ke=>{const{formItemCls:H}=Ke;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${H}-control`]:{display:"flex"}}}};var Ye=(0,le.b)(["Form","item-item"],(Ke,H)=>{let{rootPrefixCls:ee}=H;const Q=ae(Ke,ee);return[ye(Q)]}),Ae=Ke=>{const{prefixCls:H,status:ee,wrapperCol:Q,children:J,errors:Ee,warnings:Ze,_internalItemRender:ft,extra:tt,help:ut,fieldId:It,marginBottom:Pt,onErrorVisibleChanged:At}=Ke,Ge=`${H}-item`,St=R.useContext(x.q3),Qt=Q||St.wrapperCol||{},Kt=A()(`${Ge}-control`,Qt.className),tn=R.useMemo(()=>Object.assign({},St),[St]);delete tn.labelCol,delete tn.wrapperCol;const Ut=R.createElement("div",{className:`${Ge}-control-input`},R.createElement("div",{className:`${Ge}-control-input-content`},J)),Sn=R.useMemo(()=>({prefixCls:H,status:ee}),[H,ee]),Nt=Pt!==null||Ee.length||Ze.length?R.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},R.createElement(x.Rk.Provider,{value:Sn},R.createElement(Le,{fieldId:It,errors:Ee,warnings:Ze,help:ut,helpStatus:ee,className:`${Ge}-explain-connected`,onVisibleChanged:At})),!!Pt&&R.createElement("div",{style:{width:0,height:Pt}})):null,mn={};It&&(mn.id=`${It}_extra`);const ot=tt?R.createElement("div",Object.assign({},mn,{className:`${Ge}-extra`}),tt):null,st=ft&&ft.mark==="pro_table_render"&&ft.render?ft.render(Ke,{input:Ut,errorList:Nt,extra:ot}):R.createElement(R.Fragment,null,Ut,Nt,ot);return R.createElement(x.q3.Provider,{value:tn},R.createElement(U.Z,Object.assign({},Qt,{className:Kt}),st),R.createElement(Ye,{prefixCls:H}))},qe=m(61485),oe=m(31724),T=m(9763),re=m(6848),$e=function(Ke,H){var ee={};for(var Q in Ke)Object.prototype.hasOwnProperty.call(Ke,Q)&&H.indexOf(Q)<0&&(ee[Q]=Ke[Q]);if(Ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var J=0,Q=Object.getOwnPropertySymbols(Ke);J<Q.length;J++)H.indexOf(Q[J])<0&&Object.prototype.propertyIsEnumerable.call(Ke,Q[J])&&(ee[Q[J]]=Ke[Q[J]]);return ee};function Ne(Ke){return Ke?typeof Ke=="object"&&!R.isValidElement(Ke)?Ke:{title:Ke}:null}var ct=Ke=>{let{prefixCls:H,label:ee,htmlFor:Q,labelCol:J,labelAlign:Ee,colon:Ze,required:ft,requiredMark:tt,tooltip:ut}=Ke;var It;const[Pt]=(0,T.Z)("Form"),{vertical:At,labelAlign:Ge,labelCol:St,labelWrap:Qt,colon:Kt}=R.useContext(x.q3);if(!ee)return null;const tn=J||St||{},Ut=Ee||Ge,Sn=`${H}-item-label`,Nt=A()(Sn,Ut==="left"&&`${Sn}-left`,tn.className,{[`${Sn}-wrap`]:!!Qt});let mn=ee;const ot=Ze===!0||Kt!==!1&&Ze!==!1;ot&&!At&&typeof ee=="string"&&ee.trim()!==""&&(mn=ee.replace(/[:|:]\s*$/,""));const ht=Ne(ut);if(ht){const{icon:xt=R.createElement(qe.Z,null)}=ht,Rt=$e(ht,["icon"]),Gt=R.createElement(re.Z,Object.assign({},Rt),R.cloneElement(xt,{className:`${H}-item-tooltip`,title:""}));mn=R.createElement(R.Fragment,null,mn,Gt)}const Mt=tt==="optional",gt=typeof tt=="function";gt?mn=tt(mn,{required:!!ft}):Mt&&!ft&&(mn=R.createElement(R.Fragment,null,mn,R.createElement("span",{className:`${H}-item-optional`,title:""},(Pt==null?void 0:Pt.optional)||((It=oe.Z.Form)===null||It===void 0?void 0:It.optional))));const bt=A()({[`${H}-item-required`]:ft,[`${H}-item-required-mark-optional`]:Mt||gt,[`${H}-item-no-colon`]:!ot});return R.createElement(U.Z,Object.assign({},tn,{className:Nt}),R.createElement("label",{htmlFor:Q,className:bt,title:typeof ee=="string"?ee:""},mn))},mt=m(29679),yt=m(19248),Bt=m(96512),Ft=m(58617);const _t={success:mt.Z,warning:Bt.Z,error:yt.Z,validating:Ft.Z};function Yt(Ke){let{children:H,errors:ee,warnings:Q,hasFeedback:J,validateStatus:Ee,prefixCls:Ze,meta:ft,noStyle:tt}=Ke;const ut=`${Ze}-item`,{feedbackIcons:It}=R.useContext(x.q3),Pt=je(ee,Q,ft,null,!!J,Ee),{isFormItemInput:At,status:Ge}=R.useContext(x.aM),St=R.useMemo(()=>{var Qt;let Kt;if(J){const Sn=J!==!0&&J.icons||It,Nt=Pt&&((Qt=Sn==null?void 0:Sn({status:Pt,errors:ee,warnings:Q}))===null||Qt===void 0?void 0:Qt[Pt]),mn=Pt&&_t[Pt];Kt=Nt!==!1&&mn?R.createElement("span",{className:A()(`${ut}-feedback-icon`,`${ut}-feedback-icon-${Pt}`)},Nt||R.createElement(mn,null)):null}let tn=!0,Ut=Pt||"";return tt&&(tn=At,Ut=(Pt!=null?Pt:Ge)||""),{status:Ut,errors:ee,warnings:Q,hasFeedback:!!J,feedbackIcon:Kt,isFormItemInput:tn}},[Pt,J,tt,At,Ge]);return R.createElement(x.aM.Provider,{value:St},H)}var rn=function(Ke,H){var ee={};for(var Q in Ke)Object.prototype.hasOwnProperty.call(Ke,Q)&&H.indexOf(Q)<0&&(ee[Q]=Ke[Q]);if(Ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var J=0,Q=Object.getOwnPropertySymbols(Ke);J<Q.length;J++)H.indexOf(Q[J])<0&&Object.prototype.propertyIsEnumerable.call(Ke,Q[J])&&(ee[Q[J]]=Ke[Q[J]]);return ee};function hn(Ke){const{prefixCls:H,className:ee,rootClassName:Q,style:J,help:Ee,errors:Ze,warnings:ft,validateStatus:tt,meta:ut,hasFeedback:It,hidden:Pt,children:At,fieldId:Ge,required:St,isRequired:Qt,onSubItemMetaChange:Kt}=Ke,tn=rn(Ke,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Ut=`${H}-item`,{requiredMark:Sn}=R.useContext(x.q3),Nt=R.useRef(null),mn=E(Ze),ot=E(ft),st=Ee!=null,ht=!!(st||Ze.length||ft.length),Mt=!!Nt.current&&(0,O.Z)(Nt.current),[gt,bt]=R.useState(null);(0,I.Z)(()=>{if(ht&&Nt.current){const Pn=getComputedStyle(Nt.current);bt(parseInt(Pn.marginBottom,10))}},[ht,Mt]);const xt=Pn=>{Pn||bt(null)},Gt=function(){let Pn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Kn=Pn?mn:ut.errors,Qn=Pn?ot:ut.warnings;return je(Kn,Qn,ut,"",!!It,tt)}(),an=A()(Ut,ee,Q,{[`${Ut}-with-help`]:st||mn.length||ot.length,[`${Ut}-has-feedback`]:Gt&&It,[`${Ut}-has-success`]:Gt==="success",[`${Ut}-has-warning`]:Gt==="warning",[`${Ut}-has-error`]:Gt==="error",[`${Ut}-is-validating`]:Gt==="validating",[`${Ut}-hidden`]:Pt});return R.createElement("div",{className:an,style:J,ref:Nt},R.createElement(Y.Z,Object.assign({className:`${Ut}-row`},(0,he.Z)(tn,["_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"])),R.createElement(ct,Object.assign({htmlFor:Ge},Ke,{requiredMark:Sn,required:St!=null?St:Qt,prefixCls:H})),R.createElement(Ae,Object.assign({},Ke,ut,{errors:mn,warnings:ot,prefixCls:H,status:Gt,help:Ee,marginBottom:gt,onErrorVisibleChanged:xt}),R.createElement(x.qI.Provider,{value:Kt},R.createElement(Yt,{prefixCls:H,meta:ut,errors:ut.errors,warnings:ut.warnings,hasFeedback:It,validateStatus:Gt},At)))),!!gt&&R.createElement("div",{className:`${Ut}-margin-offset`,style:{marginBottom:-gt}}))}const Wt="__SPLIT__",on=null,xn=R.memo(Ke=>{let{children:H}=Ke;return H},(Ke,H)=>Ke.value===H.value&&Ke.update===H.update&&Ke.childProps.length===H.childProps.length&&Ke.childProps.every((ee,Q)=>ee===H.childProps[Q]));function Vt(Ke){return Ke!=null}function Mn(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function qn(Ke){const{name:H,noStyle:ee,className:Q,dependencies:J,prefixCls:Ee,shouldUpdate:Ze,rules:ft,children:tt,required:ut,label:It,messageVariables:Pt,trigger:At="onChange",validateTrigger:Ge,hidden:St,help:Qt}=Ke,{getPrefixCls:Kt}=R.useContext(we.E_),{name:tn}=R.useContext(x.q3),Ut=h(tt),Sn=typeof Ut=="function",Nt=R.useContext(x.qI),{validateTrigger:mn}=R.useContext(z.FieldContext),ot=Ge!==void 0?Ge:mn,st=Vt(H),ht=Kt("form",Ee),[Mt,gt]=Se(ht),bt=R.useContext(z.ListContext),xt=R.useRef(),[Rt,Gt]=L({}),[an,Pn]=(0,pt.Z)(()=>Mn()),Kn=wn=>{const On=bt==null?void 0:bt.getKey(wn.name);if(Pn(wn.destroy?Mn():wn,!0),ee&&Qt!==!1&&Nt){let Un=wn.name;if(wn.destroy)Un=xt.current||Un;else if(On!==void 0){const[Nn,vr]=On;Un=[Nn].concat((0,K.Z)(vr)),xt.current=Un}Nt(wn,Un)}},Qn=(wn,On)=>{Gt(Un=>{const Nn=Object.assign({},Un),Zr=[].concat((0,K.Z)(wn.name.slice(0,-1)),(0,K.Z)(On)).join(Wt);return wn.destroy?delete Nn[Zr]:Nn[Zr]=wn,Nn})},[$n,Cn]=R.useMemo(()=>{const wn=(0,K.Z)(an.errors),On=(0,K.Z)(an.warnings);return Object.values(Rt).forEach(Un=>{wn.push.apply(wn,(0,K.Z)(Un.errors||[])),On.push.apply(On,(0,K.Z)(Un.warnings||[]))}),[wn,On]},[Rt,an.errors,an.warnings]),rr=fe();function jn(wn,On,Un){return ee&&!St?R.createElement(Yt,{prefixCls:ht,hasFeedback:Ke.hasFeedback,validateStatus:Ke.validateStatus,meta:an,errors:$n,warnings:Cn,noStyle:!0},wn):R.createElement(hn,Object.assign({key:"row"},Ke,{className:A()(Q,gt),prefixCls:ht,fieldId:On,isRequired:Un,errors:$n,warnings:Cn,meta:an,onSubItemMetaChange:Qn}),wn)}if(!st&&!Sn&&!J)return Mt(jn(Ut));let Vn={};return typeof It=="string"?Vn.label=It:H&&(Vn.label=String(H)),Pt&&(Vn=Object.assign(Object.assign({},Vn),Pt)),Mt(R.createElement(z.Field,Object.assign({},Ke,{messageVariables:Vn,trigger:At,validateTrigger:ot,onMetaChange:Kn}),(wn,On,Un)=>{const Nn=ve(H).length&&On?On.name:[],vr=Qe(Nn,tn),Zr=ut!==void 0?ut:!!(ft&&ft.some(Ht=>{if(Ht&&typeof Ht=="object"&&Ht.required&&!Ht.warningOnly)return!0;if(typeof Ht=="function"){const Zn=Ht(Un);return Zn&&Zn.required&&!Zn.warningOnly}return!1})),Gn=Object.assign({},wn);let nn=null;if(Array.isArray(Ut)&&st)nn=Ut;else if(!(Sn&&(!(Ze||J)||st))){if(!(J&&!Sn&&!st))if((0,S.l$)(Ut)){const Ht=Object.assign(Object.assign({},Ut.props),Gn);if(Ht.id||(Ht.id=vr),Qt||$n.length>0||Cn.length>0||Ke.extra){const ir=[];(Qt||$n.length>0)&&ir.push(`${vr}_help`),Ke.extra&&ir.push(`${vr}_extra`),Ht["aria-describedby"]=ir.join(" ")}$n.length>0&&(Ht["aria-invalid"]="true"),Zr&&(Ht["aria-required"]="true"),(0,at.Yr)(Ut)&&(Ht.ref=rr(Nn,Ut)),new Set([].concat((0,K.Z)(ve(At)),(0,K.Z)(ve(ot)))).forEach(ir=>{Ht[ir]=function(){for(var xr,ar,Wr,Pr,hi,zn=arguments.length,kn=new Array(zn),dr=0;dr<zn;dr++)kn[dr]=arguments[dr];(Wr=Gn[ir])===null||Wr===void 0||(xr=Wr).call.apply(xr,[Gn].concat(kn)),(hi=(Pr=Ut.props)[ir])===null||hi===void 0||(ar=hi).call.apply(ar,[Pr].concat(kn))}});const In=[Ht["aria-required"],Ht["aria-invalid"],Ht["aria-describedby"]];nn=R.createElement(xn,{value:Gn[Ke.valuePropName||"value"],update:Ut,childProps:In},(0,S.Tm)(Ut,Ht))}else Sn&&(Ze||J)&&!st?nn=Ut(Un):nn=Ut}return jn(nn,vr,Zr)}))}const An=qn;An.useStatus=y;var pr=An,er=function(Ke,H){var ee={};for(var Q in Ke)Object.prototype.hasOwnProperty.call(Ke,Q)&&H.indexOf(Q)<0&&(ee[Q]=Ke[Q]);if(Ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var J=0,Q=Object.getOwnPropertySymbols(Ke);J<Q.length;J++)H.indexOf(Q[J])<0&&Object.prototype.propertyIsEnumerable.call(Ke,Q[J])&&(ee[Q[J]]=Ke[Q[J]]);return ee},$r=Ke=>{var{prefixCls:H,children:ee}=Ke,Q=er(Ke,["prefixCls","children"]);const{getPrefixCls:J}=R.useContext(we.E_),Ee=J("form",H),Ze=R.useMemo(()=>({prefixCls:Ee,status:"error"}),[Ee]);return R.createElement(z.List,Object.assign({},Q),(ft,tt,ut)=>R.createElement(x.Rk.Provider,{value:Ze},ee(ft.map(It=>Object.assign(Object.assign({},It),{fieldKey:It.key})),tt,{errors:ut.errors,warnings:ut.warnings})))};function Rn(){const{form:Ke}=(0,R.useContext)(x.q3);return Ke}const pn=wt;pn.Item=pr,pn.List=$r,pn.ErrorList=Le,pn.useForm=Oe,pn.useFormInstance=Rn,pn.useWatch=z.useWatch,pn.Provider=x.RV,pn.create=()=>{};var tr=pn},8628:function(yn,dt,m){"use strict";var K=m(59301),j=m(34280),A=m(56762),xe=m(69507);function R(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const x=(0,K.useRef)({}),E=(0,A.Z)(),F=(0,xe.ZP)();return(0,j.Z)(()=>{const V=F.subscribe(Ie=>{x.current=Ie,N&&E()});return()=>F.unsubscribe(V)},[]),x.current}dt.Z=R},5871:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return qe}});var K=m(84105),j=m(87395),A=m(92310),xe=m.n(A),R=m(54476),N=m(20068),x=m(76190),E=m(42978),F=m(75931),V=m(67732),Ie=m(83652);function G(){return typeof BigInt=="function"}function le(oe){return!oe&&oe!==0&&!Number.isNaN(oe)||!String(oe).trim()}function ke(oe){var T=oe.trim(),re=T.startsWith("-");re&&(T=T.slice(1)),T=T.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),T.startsWith(".")&&(T="0".concat(T));var $e=T||"0",Ne=$e.split("."),Xe=Ne[0]||"0",ct=Ne[1]||"0";Xe==="0"&&ct==="0"&&(re=!1);var mt=re?"-":"";return{negative:re,negativeStr:mt,trimStr:$e,integerStr:Xe,decimalStr:ct,fullStr:"".concat(mt).concat($e)}}function ue(oe){var T=String(oe);return!Number.isNaN(Number(T))&&T.includes("e")}function de(oe){var T=String(oe);if(ue(oe)){var re=Number(T.slice(T.indexOf("e-")+2)),$e=T.match(/\.(\d+)/);return $e!=null&&$e[1]&&(re+=$e[1].length),re}return T.includes(".")&&Pe(T)?T.length-T.indexOf(".")-1:0}function _e(oe){var T=String(oe);if(ue(oe)){if(oe>Number.MAX_SAFE_INTEGER)return String(G()?BigInt(oe).toString():Number.MAX_SAFE_INTEGER);if(oe<Number.MIN_SAFE_INTEGER)return String(G()?BigInt(oe).toString():Number.MIN_SAFE_INTEGER);T=oe.toFixed(de(T))}return ke(T).fullStr}function Pe(oe){return typeof oe=="number"?!Number.isNaN(oe):oe?/^\s*-?\d+(\.\d+)?\s*$/.test(oe)||/^\s*-?\d+\.\s*$/.test(oe)||/^\s*-?\.\d+\s*$/.test(oe):!1}var Ue=function(){function oe(T){if((0,V.Z)(this,oe),(0,N.Z)(this,"origin",""),(0,N.Z)(this,"negative",void 0),(0,N.Z)(this,"integer",void 0),(0,N.Z)(this,"decimal",void 0),(0,N.Z)(this,"decimalLen",void 0),(0,N.Z)(this,"empty",void 0),(0,N.Z)(this,"nan",void 0),le(T)){this.empty=!0;return}if(this.origin=String(T),T==="-"||Number.isNaN(T)){this.nan=!0;return}var re=T;if(ue(re)&&(re=Number(re)),re=typeof re=="string"?re:_e(re),Pe(re)){var $e=ke(re);this.negative=$e.negative;var Ne=$e.trimStr.split(".");this.integer=BigInt(Ne[0]);var Xe=Ne[1]||"0";this.decimal=BigInt(Xe),this.decimalLen=Xe.length}else this.nan=!0}return(0,Ie.Z)(oe,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(re){var $e="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(re,"0"));return BigInt($e)}},{key:"negate",value:function(){var re=new oe(this.toString());return re.negative=!re.negative,re}},{key:"cal",value:function(re,$e,Ne){var Xe=Math.max(this.getDecimalStr().length,re.getDecimalStr().length),ct=this.alignDecimal(Xe),mt=re.alignDecimal(Xe),yt=$e(ct,mt).toString(),Bt=Ne(Xe),Ft=ke(yt),_t=Ft.negativeStr,Yt=Ft.trimStr,rn="".concat(_t).concat(Yt.padStart(Bt+1,"0"));return new oe("".concat(rn.slice(0,-Bt),".").concat(rn.slice(-Bt)))}},{key:"add",value:function(re){if(this.isInvalidate())return new oe(re);var $e=new oe(re);return $e.isInvalidate()?this:this.cal($e,function(Ne,Xe){return Ne+Xe},function(Ne){return Ne})}},{key:"multi",value:function(re){var $e=new oe(re);return this.isInvalidate()||$e.isInvalidate()?new oe(NaN):this.cal($e,function(Ne,Xe){return Ne*Xe},function(Ne){return Ne*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(re){return this.toString()===(re==null?void 0:re.toString())}},{key:"lessEquals",value:function(re){return this.add(re.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return re?this.isInvalidate()?"":ke("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),oe}(),Ce=function(){function oe(T){if((0,V.Z)(this,oe),(0,N.Z)(this,"origin",""),(0,N.Z)(this,"number",void 0),(0,N.Z)(this,"empty",void 0),le(T)){this.empty=!0;return}this.origin=String(T),this.number=Number(T)}return(0,Ie.Z)(oe,[{key:"negate",value:function(){return new oe(-this.toNumber())}},{key:"add",value:function(re){if(this.isInvalidate())return new oe(re);var $e=Number(re);if(Number.isNaN($e))return this;var Ne=this.number+$e;if(Ne>Number.MAX_SAFE_INTEGER)return new oe(Number.MAX_SAFE_INTEGER);if(Ne<Number.MIN_SAFE_INTEGER)return new oe(Number.MIN_SAFE_INTEGER);var Xe=Math.max(de(this.number),de($e));return new oe(Ne.toFixed(Xe))}},{key:"multi",value:function(re){var $e=Number(re);if(this.isInvalidate()||Number.isNaN($e))return new oe(NaN);var Ne=this.number*$e;if(Ne>Number.MAX_SAFE_INTEGER)return new oe(Number.MAX_SAFE_INTEGER);if(Ne<Number.MIN_SAFE_INTEGER)return new oe(Number.MIN_SAFE_INTEGER);var Xe=Math.max(de(this.number),de($e));return new oe(Ne.toFixed(Xe))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(re){return this.toNumber()===(re==null?void 0:re.toNumber())}},{key:"lessEquals",value:function(re){return this.add(re.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return re?this.isInvalidate()?"":_e(this.number):this.origin}}]),oe}();function pe(oe){return G()?new Ue(oe):new Ce(oe)}function q(oe,T,re){var $e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(oe==="")return"";var Ne=ke(oe),Xe=Ne.negativeStr,ct=Ne.integerStr,mt=Ne.decimalStr,yt="".concat(T).concat(mt),Bt="".concat(Xe).concat(ct);if(re>=0){var Ft=Number(mt[re]);if(Ft>=5&&!$e){var _t=pe(oe).add("".concat(Xe,"0.").concat("0".repeat(re)).concat(10-Ft));return q(_t.toString(),T,re,$e)}return re===0?Bt:"".concat(Bt).concat(T).concat(mt.padEnd(re,"0").slice(0,re))}return yt===".0"?Bt:"".concat(Bt).concat(yt)}var _=pe,ie=m(93681),ae=m(34280),Se=m(8654),se=m(59301),be=m(48736);function D(oe,T){var re=(0,se.useRef)(null);function $e(){try{var Xe=oe.selectionStart,ct=oe.selectionEnd,mt=oe.value,yt=mt.substring(0,Xe),Bt=mt.substring(ct);re.current={start:Xe,end:ct,value:mt,beforeTxt:yt,afterTxt:Bt}}catch(Ft){}}function Ne(){if(oe&&re.current&&T)try{var Xe=oe.value,ct=re.current,mt=ct.beforeTxt,yt=ct.afterTxt,Bt=ct.start,Ft=Xe.length;if(Xe.endsWith(yt))Ft=Xe.length-re.current.afterTxt.length;else if(Xe.startsWith(mt))Ft=mt.length;else{var _t=mt[Bt-1],Yt=Xe.indexOf(_t,Bt-1);Yt!==-1&&(Ft=Yt+1)}oe.setSelectionRange(Ft,Ft)}catch(rn){(0,be.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(rn.message))}}return[$e,Ne]}var Le=m(49658),z=function(){var T=(0,se.useState)(!1),re=(0,E.Z)(T,2),$e=re[0],Ne=re[1];return(0,ae.Z)(function(){Ne((0,Le.Z)())},[]),$e},we=z,ge=m(16089),Te=200,Fe=600;function Re(oe){var T=oe.prefixCls,re=oe.upNode,$e=oe.downNode,Ne=oe.upDisabled,Xe=oe.downDisabled,ct=oe.onStep,mt=se.useRef(),yt=se.useRef([]),Bt=se.useRef();Bt.current=ct;var Ft=function(){clearTimeout(mt.current)},_t=function(Mn,qn){Mn.preventDefault(),Ft(),Bt.current(qn);function An(){Bt.current(qn),mt.current=setTimeout(An,Te)}mt.current=setTimeout(An,Fe)};se.useEffect(function(){return function(){Ft(),yt.current.forEach(function(Vt){return ge.Z.cancel(Vt)})}},[]);var Yt=we();if(Yt)return null;var rn="".concat(T,"-handler"),hn=xe()(rn,"".concat(rn,"-up"),(0,N.Z)({},"".concat(rn,"-up-disabled"),Ne)),Wt=xe()(rn,"".concat(rn,"-down"),(0,N.Z)({},"".concat(rn,"-down-disabled"),Xe)),on=function(){return yt.current.push((0,ge.Z)(Ft))},xn={unselectable:"on",role:"button",onMouseUp:on,onMouseLeave:on};return se.createElement("div",{className:"".concat(rn,"-wrap")},se.createElement("span",(0,R.Z)({},xn,{onMouseDown:function(Mn){_t(Mn,!0)},"aria-label":"Increase Value","aria-disabled":Ne,className:hn}),re||se.createElement("span",{unselectable:"on",className:"".concat(T,"-handler-up-inner")})),se.createElement("span",(0,R.Z)({},xn,{onMouseDown:function(Mn){_t(Mn,!1)},"aria-label":"Decrease Value","aria-disabled":Xe,className:Wt}),$e||se.createElement("span",{unselectable:"on",className:"".concat(T,"-handler-down-inner")})))}function X(oe){var T=typeof oe=="number"?_e(oe):ke(oe).fullStr,re=T.includes(".");return re?ke(T.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:oe+"0"}var w=m(5643),ve=function(){var oe=(0,se.useRef)(0),T=function(){ge.Z.cancel(oe.current)};return(0,se.useEffect)(function(){return T},[]),function(re){T(),oe.current=(0,ge.Z)(function(){re()})}},Qe=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],je=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","classes","className","classNames"],Be=function(T,re){return T||re.isEmpty()?re.toString():re.toNumber()},Oe=function(T){var re=_(T);return re.isInvalidate()?null:re},lt=se.forwardRef(function(oe,T){var re,$e=oe.prefixCls,Ne=$e===void 0?"rc-input-number":$e,Xe=oe.className,ct=oe.style,mt=oe.min,yt=oe.max,Bt=oe.step,Ft=Bt===void 0?1:Bt,_t=oe.defaultValue,Yt=oe.value,rn=oe.disabled,hn=oe.readOnly,Wt=oe.upHandler,on=oe.downHandler,xn=oe.keyboard,Vt=oe.controls,Mn=Vt===void 0?!0:Vt,qn=oe.classNames,An=oe.stringMode,pr=oe.parser,er=oe.formatter,gr=oe.precision,$r=oe.decimalSeparator,Rn=oe.onChange,pn=oe.onInput,tr=oe.onPressEnter,Ke=oe.onStep,H=(0,F.Z)(oe,Qe),ee="".concat(Ne,"-input"),Q=se.useRef(null),J=se.useState(!1),Ee=(0,E.Z)(J,2),Ze=Ee[0],ft=Ee[1],tt=se.useRef(!1),ut=se.useRef(!1),It=se.useRef(!1),Pt=se.useState(function(){return _(Yt!=null?Yt:_t)}),At=(0,E.Z)(Pt,2),Ge=At[0],St=At[1];function Qt(nn){Yt===void 0&&St(nn)}var Kt=se.useCallback(function(nn,Ht){if(!Ht)return gr>=0?gr:Math.max(de(nn),de(Ft))},[gr,Ft]),tn=se.useCallback(function(nn){var Ht=String(nn);if(pr)return pr(Ht);var Zn=Ht;return $r&&(Zn=Zn.replace($r,".")),Zn.replace(/[^\w.-]+/g,"")},[pr,$r]),Ut=se.useRef(""),Sn=se.useCallback(function(nn,Ht){if(er)return er(nn,{userTyping:Ht,input:String(Ut.current)});var Zn=typeof nn=="number"?_e(nn):nn;if(!Ht){var In=Kt(Zn,Ht);if(Pe(Zn)&&($r||In>=0)){var ir=$r||".";Zn=q(Zn,ir,In)}}return Zn},[er,Kt,$r]),Nt=se.useState(function(){var nn=_t!=null?_t:Yt;return Ge.isInvalidate()&&["string","number"].includes((0,x.Z)(nn))?Number.isNaN(nn)?"":nn:Sn(Ge.toString(),!1)}),mn=(0,E.Z)(Nt,2),ot=mn[0],st=mn[1];Ut.current=ot;function ht(nn,Ht){st(Sn(nn.isInvalidate()?nn.toString(!1):nn.toString(!Ht),Ht))}var Mt=se.useMemo(function(){return Oe(yt)},[yt,gr]),gt=se.useMemo(function(){return Oe(mt)},[mt,gr]),bt=se.useMemo(function(){return!Mt||!Ge||Ge.isInvalidate()?!1:Mt.lessEquals(Ge)},[Mt,Ge]),xt=se.useMemo(function(){return!gt||!Ge||Ge.isInvalidate()?!1:Ge.lessEquals(gt)},[gt,Ge]),Rt=D(Q.current,Ze),Gt=(0,E.Z)(Rt,2),an=Gt[0],Pn=Gt[1],Kn=function(Ht){return Mt&&!Ht.lessEquals(Mt)?Mt:gt&&!gt.lessEquals(Ht)?gt:null},Qn=function(Ht){return!Kn(Ht)},$n=function(Ht,Zn){var In=Ht,ir=Qn(In)||In.isEmpty();if(!In.isEmpty()&&!Zn&&(In=Kn(In)||In,ir=!0),!hn&&!rn&&ir){var xr=In.toString(),ar=Kt(xr,Zn);return ar>=0&&(In=_(q(xr,".",ar)),Qn(In)||(In=_(q(xr,".",ar,!0)))),In.equals(Ge)||(Qt(In),Rn==null||Rn(In.isEmpty()?null:Be(An,In)),Yt===void 0&&ht(In,Zn)),In}return Ge},Cn=ve(),rr=function nn(Ht){if(an(),Ut.current=Ht,st(Ht),!ut.current){var Zn=tn(Ht),In=_(Zn);In.isNaN()||$n(In,!0)}pn==null||pn(Ht),Cn(function(){var ir=Ht;pr||(ir=Ht.replace(/。/g,".")),ir!==Ht&&nn(ir)})},jn=function(){ut.current=!0},Vn=function(){ut.current=!1,rr(Q.current.value)},wn=function(Ht){rr(Ht.target.value)},On=function(Ht){var Zn;if(!(Ht&&bt||!Ht&&xt)){tt.current=!1;var In=_(It.current?X(Ft):Ft);Ht||(In=In.negate());var ir=(Ge||_(0)).add(In.toString()),xr=$n(ir,!1);Ke==null||Ke(Be(An,xr),{offset:It.current?X(Ft):Ft,type:Ht?"up":"down"}),(Zn=Q.current)===null||Zn===void 0||Zn.focus()}},Un=function(Ht){var Zn=_(tn(ot)),In=Zn;Zn.isNaN()?In=$n(Ge,Ht):In=$n(Zn,Ht),Yt!==void 0?ht(Ge,!1):In.isNaN()||ht(In,!1)},Nn=function(){tt.current=!0},vr=function(Ht){var Zn=Ht.key,In=Ht.shiftKey;tt.current=!0,It.current=In,Zn==="Enter"&&(ut.current||(tt.current=!1),Un(!1),tr==null||tr(Ht)),xn!==!1&&!ut.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Zn)&&(On(Zn==="Up"||Zn==="ArrowUp"),Ht.preventDefault())},Zr=function(){tt.current=!1,It.current=!1},Gn=function(){Un(!1),ft(!1),tt.current=!1};return(0,ae.o)(function(){Ge.isInvalidate()||ht(Ge,!1)},[gr]),(0,ae.o)(function(){var nn=_(Yt);St(nn);var Ht=_(tn(ot));(!nn.equals(Ht)||!tt.current||er)&&ht(nn,tt.current)},[Yt]),(0,ae.o)(function(){er&&Pn()},[ot]),se.createElement("div",{className:xe()(Ne,qn==null?void 0:qn.input,Xe,(re={},(0,N.Z)(re,"".concat(Ne,"-focused"),Ze),(0,N.Z)(re,"".concat(Ne,"-disabled"),rn),(0,N.Z)(re,"".concat(Ne,"-readonly"),hn),(0,N.Z)(re,"".concat(Ne,"-not-a-number"),Ge.isNaN()),(0,N.Z)(re,"".concat(Ne,"-out-of-range"),!Ge.isInvalidate()&&!Qn(Ge)),re)),style:ct,onFocus:function(){ft(!0)},onBlur:Gn,onKeyDown:vr,onKeyUp:Zr,onCompositionStart:jn,onCompositionEnd:Vn,onBeforeInput:Nn},Mn&&se.createElement(Re,{prefixCls:Ne,upNode:Wt,downNode:on,upDisabled:bt,downDisabled:xt,onStep:On}),se.createElement("div",{className:"".concat(ee,"-wrap")},se.createElement("input",(0,R.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":mt,"aria-valuemax":yt,"aria-valuenow":Ge.isInvalidate()?null:Ge.toString(),step:Ft},H,{ref:(0,Se.sQ)(Q,T),className:ee,value:ot,onChange:wn,disabled:rn,readOnly:hn}))))}),$t=se.forwardRef(function(oe,T){var re=oe.disabled,$e=oe.style,Ne=oe.prefixCls,Xe=oe.value,ct=oe.prefix,mt=oe.suffix,yt=oe.addonBefore,Bt=oe.addonAfter,Ft=oe.classes,_t=oe.className,Yt=oe.classNames,rn=(0,F.Z)(oe,je),hn=se.useRef(null),Wt=function(xn){hn.current&&(0,w.nH)(hn.current,xn)};return se.createElement(ie.BaseInput,{inputElement:se.createElement(lt,(0,R.Z)({prefixCls:Ne,disabled:re,classNames:Yt,ref:(0,Se.sQ)(hn,T)},rn)),className:_t,triggerFocus:Wt,prefixCls:Ne,value:Xe,disabled:re,style:$e,prefix:ct,suffix:mt,addonAfter:Bt,addonBefore:yt,classes:Ft,classNames:Yt,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});$t.displayName="InputNumber";var vt=$t,Tt=vt,wt=m(19080),pt=m(36355),at=m(92736),S=m(1684),p=m(19716),h=m(32441),g=m(33234),y=m(9937),d=m(17313),L=m(74207),fe=m(83116),O=m(37613);const I=(oe,T)=>{let{componentCls:re,borderRadiusSM:$e,borderRadiusLG:Ne}=oe;const Xe=T==="lg"?Ne:$e;return{[`&-${T}`]:{[`${re}-handler-wrap`]:{borderStartEndRadius:Xe,borderEndEndRadius:Xe},[`${re}-handler-up`]:{borderStartEndRadius:Xe},[`${re}-handler-down`]:{borderEndEndRadius:Xe}}}},he=oe=>{const{componentCls:T,lineWidth:re,lineType:$e,colorBorder:Ne,borderRadius:Xe,fontSizeLG:ct,controlHeightLG:mt,controlHeightSM:yt,colorError:Bt,paddingInlineSM:Ft,colorTextDescription:_t,motionDurationMid:Yt,handleHoverColor:rn,paddingInline:hn,paddingBlock:Wt,handleBg:on,handleActiveBg:xn,colorTextDisabled:Vt,borderRadiusSM:Mn,borderRadiusLG:qn,controlWidth:An,handleVisible:pr,handleBorderColor:er}=oe;return[{[T]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,d.Wf)(oe)),(0,y.ik)(oe)),(0,y.bi)(oe,T)),{display:"inline-block",width:An,margin:0,padding:0,border:`${re}px ${$e} ${Ne}`,borderRadius:Xe,"&-rtl":{direction:"rtl",[`${T}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:ct,borderRadius:qn,[`input${T}-input`]:{height:mt-2*re}},"&-sm":{padding:0,borderRadius:Mn,[`input${T}-input`]:{height:yt-2*re,padding:`0 ${Ft}px`}},"&:hover":Object.assign({},(0,y.pU)(oe)),"&-focused":Object.assign({},(0,y.M1)(oe)),"&-out-of-range":{[`${T}-input-wrap`]:{input:{color:Bt}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,d.Wf)(oe)),(0,y.s7)(oe)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${T}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${T}-group-addon`]:{borderRadius:qn,fontSize:oe.fontSizeLG}},"&-sm":{[`${T}-group-addon`]:{borderRadius:Mn}},[`${T}-wrapper-disabled > ${T}-group-addon`]:Object.assign({},(0,y.Xy)(oe))}}),[`&-disabled ${T}-input`]:{cursor:"not-allowed"},[T]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,d.Wf)(oe)),{width:"100%",padding:`${Wt}px ${hn}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:Xe,outline:0,transition:`all ${Yt} linear`,appearance:"textfield",fontSize:"inherit"}),(0,y.nz)(oe.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[T]:Object.assign(Object.assign(Object.assign({[`&:hover ${T}-handler-wrap, &-focused ${T}-handler-wrap`]:{opacity:1},[`${T}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:oe.handleWidth,height:"100%",background:on,borderStartStartRadius:0,borderStartEndRadius:Xe,borderEndEndRadius:Xe,borderEndStartRadius:0,opacity:pr===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${Yt} linear ${Yt}`,[`${T}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
|
${T}-handler-up-inner,
|
|
|
${T}-handler-down-inner
|
|
|
`]:{marginInlineEnd:0,fontSize:oe.handleFontSize}}},[`${T}-handler`]:{height:"50%",overflow:"hidden",color:_t,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${re}px ${$e} ${er}`,transition:`all ${Yt} linear`,"&:active":{background:xn},"&:hover":{height:"60%",[`
|
|
|
${T}-handler-up-inner,
|
|
|
${T}-handler-down-inner
|
|
|
`]:{color:rn}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,d.Ro)()),{color:_t,transition:`all ${Yt} linear`,userSelect:"none"})},[`${T}-handler-up`]:{borderStartEndRadius:Xe},[`${T}-handler-down`]:{borderBlockStart:`${re}px ${$e} ${er}`,borderEndEndRadius:Xe}},I(oe,"lg")),I(oe,"sm")),{"&-disabled, &-readonly":{[`${T}-handler-wrap`]:{display:"none"},[`${T}-input`]:{color:"inherit"}},[`
|
|
|
${T}-handler-up-disabled,
|
|
|
${T}-handler-down-disabled
|
|
|
`]:{cursor:"not-allowed"},[`
|
|
|
${T}-handler-up-disabled:hover &-handler-up-inner,
|
|
|
${T}-handler-down-disabled:hover &-handler-down-inner
|
|
|
`]:{color:Vt}})},{[`${T}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${T}-handler-down`]:{borderBlockStartWidth:0}}}]},Y=oe=>{const{componentCls:T,paddingBlock:re,paddingInline:$e,inputAffixPadding:Ne,controlWidth:Xe,borderRadiusLG:ct,borderRadiusSM:mt}=oe;return{[`${T}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,y.ik)(oe)),(0,y.bi)(oe,`${T}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:Xe,padding:0,paddingInlineStart:$e,"&-lg":{borderRadius:ct},"&-sm":{borderRadius:mt},[`&:not(${T}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,y.pU)(oe)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${T}-disabled`]:{background:"transparent"},[`> div${T}`]:{width:"100%",border:"none",outline:"none",[`&${T}-focused`]:{boxShadow:"none !important"}},[`input${T}-input`]:{padding:`${re}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${T}-handler-wrap`]:{zIndex:2},[T]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:Ne},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:$e,marginInlineStart:Ne}}})}};var U=(0,fe.Z)("InputNumber",oe=>{const T=(0,O.TS)(oe,(0,y.e5)(oe));return[he(T),Y(T),(0,L.c)(T)]},oe=>Object.assign(Object.assign({},(0,y.TM)(oe)),{controlWidth:90,handleWidth:oe.controlHeightSM-oe.lineWidth*2,handleFontSize:oe.fontSize/2,handleVisible:"auto",handleActiveBg:oe.colorFillAlter,handleBg:oe.colorBgContainer,handleHoverColor:oe.colorPrimary,handleBorderColor:oe.colorBorder})),ye=function(oe,T){var re={};for(var $e in oe)Object.prototype.hasOwnProperty.call(oe,$e)&&T.indexOf($e)<0&&(re[$e]=oe[$e]);if(oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ne=0,$e=Object.getOwnPropertySymbols(oe);Ne<$e.length;Ne++)T.indexOf($e[Ne])<0&&Object.prototype.propertyIsEnumerable.call(oe,$e[Ne])&&(re[$e[Ne]]=oe[$e[Ne]]);return re};const Ye=se.forwardRef((oe,T)=>{const{getPrefixCls:re,direction:$e}=se.useContext(pt.E_),Ne=se.useRef(null);se.useImperativeHandle(T,()=>Ne.current);const{className:Xe,rootClassName:ct,size:mt,disabled:yt,prefixCls:Bt,addonBefore:Ft,addonAfter:_t,prefix:Yt,bordered:rn=!0,readOnly:hn,status:Wt,controls:on}=oe,xn=ye(oe,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),Vt=re("input-number",Bt),[Mn,qn]=U(Vt),{compactSize:An,compactItemClassnames:pr}=(0,g.ri)(Vt,$e);let er=se.createElement(j.Z,{className:`${Vt}-handler-up-inner`}),gr=se.createElement(K.Z,{className:`${Vt}-handler-down-inner`});const $r=typeof on=="boolean"?on:void 0;typeof on=="object"&&(er=typeof on.upIcon=="undefined"?er:se.createElement("span",{className:`${Vt}-handler-up-inner`},on.upIcon),gr=typeof on.downIcon=="undefined"?gr:se.createElement("span",{className:`${Vt}-handler-down-inner`},on.downIcon));const{hasFeedback:Rn,status:pn,isFormItemInput:tr,feedbackIcon:Ke}=se.useContext(h.aM),H=(0,wt.F)(pn,Wt),ee=(0,p.Z)(tt=>{var ut;return(ut=mt!=null?mt:An)!==null&&ut!==void 0?ut:tt}),Q=se.useContext(S.Z),J=yt!=null?yt:Q,Ee=xe()({[`${Vt}-lg`]:ee==="large",[`${Vt}-sm`]:ee==="small",[`${Vt}-rtl`]:$e==="rtl",[`${Vt}-borderless`]:!rn,[`${Vt}-in-form-item`]:tr},(0,wt.Z)(Vt,H),pr,qn),Ze=`${Vt}-group`,ft=se.createElement(Tt,Object.assign({ref:Ne,disabled:J,className:xe()(Xe,ct),upHandler:er,downHandler:gr,prefixCls:Vt,readOnly:hn,controls:$r,prefix:Yt,suffix:Rn&&Ke,addonAfter:_t&&se.createElement(g.BR,null,se.createElement(h.Ux,{override:!0,status:!0},_t)),addonBefore:Ft&&se.createElement(g.BR,null,se.createElement(h.Ux,{override:!0,status:!0},Ft)),classNames:{input:Ee},classes:{affixWrapper:xe()((0,wt.Z)(`${Vt}-affix-wrapper`,H,Rn),{[`${Vt}-affix-wrapper-sm`]:ee==="small",[`${Vt}-affix-wrapper-lg`]:ee==="large",[`${Vt}-affix-wrapper-rtl`]:$e==="rtl",[`${Vt}-affix-wrapper-borderless`]:!rn},qn),wrapper:xe()({[`${Ze}-rtl`]:$e==="rtl",[`${Vt}-wrapper-disabled`]:J},qn),group:xe()({[`${Vt}-group-wrapper-sm`]:ee==="small",[`${Vt}-group-wrapper-lg`]:ee==="large",[`${Vt}-group-wrapper-rtl`]:$e==="rtl"},(0,wt.Z)(`${Vt}-group-wrapper`,H,Rn),qn)}},xn));return Mn(ft)}),ce=Ye,Ae=oe=>se.createElement(at.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},se.createElement(Ye,Object.assign({},oe)));ce._InternalPanelDoNotUseOrYouWillBeFired=Ae;var qe=ce},9432:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return Ue},n:function(){return _e}});var K=m(19248),j=m(92310),A=m.n(j),xe=m(93681),R=m(8654),N=m(59301),x=m(19080),E=m(36355),F=m(1684),V=m(19716),Ie=m(32441),G=m(33234),le=m(59412),ke=m(9937);function ue(Ce){return!!(Ce.prefix||Ce.suffix||Ce.allowClear)}var de=function(Ce,pe){var q={};for(var _ in Ce)Object.prototype.hasOwnProperty.call(Ce,_)&&pe.indexOf(_)<0&&(q[_]=Ce[_]);if(Ce!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ie=0,_=Object.getOwnPropertySymbols(Ce);ie<_.length;ie++)pe.indexOf(_[ie])<0&&Object.prototype.propertyIsEnumerable.call(Ce,_[ie])&&(q[_[ie]]=Ce[_[ie]]);return q};function _e(Ce,pe){if(!Ce)return;Ce.focus(pe);const{cursor:q}=pe||{};if(q){const _=Ce.value.length;switch(q){case"start":Ce.setSelectionRange(0,0);break;case"end":Ce.setSelectionRange(_,_);break;default:Ce.setSelectionRange(0,_);break}}}var Ue=(0,N.forwardRef)((Ce,pe)=>{var q;const{prefixCls:_,bordered:ie=!0,status:ae,size:Se,disabled:se,onBlur:be,onFocus:D,suffix:Le,allowClear:z,addonAfter:we,addonBefore:ge,className:Te,style:Fe,styles:Re,rootClassName:X,onChange:w,classNames:ve}=Ce,Qe=de(Ce,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:je,direction:Be,input:Oe}=N.useContext(E.E_),lt=je("input",_),$t=(0,N.useRef)(null),[vt,Tt]=(0,ke.ZP)(lt),{compactSize:wt,compactItemClassnames:pt}=(0,G.ri)(lt,Be),at=(0,V.Z)(Ye=>{var ce;return(ce=Se!=null?Se:wt)!==null&&ce!==void 0?ce:Ye}),S=N.useContext(F.Z),p=se!=null?se:S,{status:h,hasFeedback:g,feedbackIcon:y}=(0,N.useContext)(Ie.aM),d=(0,x.F)(h,ae),L=ue(Ce)||!!g,fe=(0,N.useRef)(L);(0,N.useEffect)(()=>{var Ye;L&&fe.current,fe.current=L},[L]);const O=(0,le.Z)($t,!0),I=Ye=>{O(),be==null||be(Ye)},he=Ye=>{O(),D==null||D(Ye)},Y=Ye=>{O(),w==null||w(Ye)},U=(g||Le)&&N.createElement(N.Fragment,null,Le,g&&y);let ye;return typeof z=="object"&&(z!=null&&z.clearIcon)?ye=z:z&&(ye={clearIcon:N.createElement(K.Z,null)}),vt(N.createElement(xe.default,Object.assign({ref:(0,R.sQ)(pe,$t),prefixCls:lt,autoComplete:Oe==null?void 0:Oe.autoComplete},Qe,{disabled:p,onBlur:I,onFocus:he,style:Object.assign(Object.assign({},Oe==null?void 0:Oe.style),Fe),styles:Object.assign(Object.assign({},Oe==null?void 0:Oe.styles),Re),suffix:U,allowClear:ye,className:A()(Te,X,pt,Oe==null?void 0:Oe.className),onChange:Y,addonAfter:we&&N.createElement(G.BR,null,N.createElement(Ie.Ux,{override:!0,status:!0},we)),addonBefore:ge&&N.createElement(G.BR,null,N.createElement(Ie.Ux,{override:!0,status:!0},ge)),classNames:Object.assign(Object.assign(Object.assign({},ve),Oe==null?void 0:Oe.classNames),{input:A()({[`${lt}-sm`]:at==="small",[`${lt}-lg`]:at==="large",[`${lt}-rtl`]:Be==="rtl",[`${lt}-borderless`]:!ie},!L&&(0,x.Z)(lt,d),ve==null?void 0:ve.input,(q=Oe==null?void 0:Oe.classNames)===null||q===void 0?void 0:q.input,Tt)}),classes:{affixWrapper:A()({[`${lt}-affix-wrapper-sm`]:at==="small",[`${lt}-affix-wrapper-lg`]:at==="large",[`${lt}-affix-wrapper-rtl`]:Be==="rtl",[`${lt}-affix-wrapper-borderless`]:!ie},(0,x.Z)(`${lt}-affix-wrapper`,d,g),Tt),wrapper:A()({[`${lt}-group-rtl`]:Be==="rtl"},Tt),group:A()({[`${lt}-group-wrapper-sm`]:at==="small",[`${lt}-group-wrapper-lg`]:at==="large",[`${lt}-group-wrapper-rtl`]:Be==="rtl",[`${lt}-group-wrapper-disabled`]:p},(0,x.Z)(`${lt}-group-wrapper`,d,g),Tt)}})))})},1643:function(yn,dt,m){"use strict";var K=m(19248),j=m(92310),A=m.n(j),xe=m(9296),R=m(59301),N=m(19080),x=m(36355),E=m(1684),F=m(19716),V=m(32441),Ie=m(9432),G=m(9937),le=function(ue,de){var _e={};for(var Pe in ue)Object.prototype.hasOwnProperty.call(ue,Pe)&&de.indexOf(Pe)<0&&(_e[Pe]=ue[Pe]);if(ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ue=0,Pe=Object.getOwnPropertySymbols(ue);Ue<Pe.length;Ue++)de.indexOf(Pe[Ue])<0&&Object.prototype.propertyIsEnumerable.call(ue,Pe[Ue])&&(_e[Pe[Ue]]=ue[Pe[Ue]]);return _e};const ke=(0,R.forwardRef)((ue,de)=>{const{prefixCls:_e,bordered:Pe=!0,size:Ue,disabled:Ce,status:pe,allowClear:q,showCount:_,classNames:ie,rootClassName:ae,className:Se}=ue,se=le(ue,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:be,direction:D}=R.useContext(x.E_),Le=(0,F.Z)(Ue),z=R.useContext(E.Z),we=Ce!=null?Ce:z,{status:ge,hasFeedback:Te,feedbackIcon:Fe}=R.useContext(V.aM),Re=(0,N.F)(ge,pe),X=R.useRef(null);R.useImperativeHandle(de,()=>{var Be;return{resizableTextArea:(Be=X.current)===null||Be===void 0?void 0:Be.resizableTextArea,focus:Oe=>{var lt,$t;(0,Ie.n)(($t=(lt=X.current)===null||lt===void 0?void 0:lt.resizableTextArea)===null||$t===void 0?void 0:$t.textArea,Oe)},blur:()=>{var Oe;return(Oe=X.current)===null||Oe===void 0?void 0:Oe.blur()}}});const w=be("input",_e);let ve;typeof q=="object"&&(q!=null&&q.clearIcon)?ve=q:q&&(ve={clearIcon:R.createElement(K.Z,null)});const[Qe,je]=(0,G.ZP)(w);return Qe(R.createElement(xe.default,Object.assign({},se,{disabled:we,allowClear:ve,className:A()(Se,ae),classes:{affixWrapper:A()(`${w}-textarea-affix-wrapper`,{[`${w}-affix-wrapper-rtl`]:D==="rtl",[`${w}-affix-wrapper-borderless`]:!Pe,[`${w}-affix-wrapper-sm`]:Le==="small",[`${w}-affix-wrapper-lg`]:Le==="large",[`${w}-textarea-show-count`]:_},(0,N.Z)(`${w}-affix-wrapper`,Re),je)},classNames:Object.assign(Object.assign({},ie),{textarea:A()({[`${w}-borderless`]:!Pe,[`${w}-sm`]:Le==="small",[`${w}-lg`]:Le==="large"},(0,N.Z)(w,Re),je,ie==null?void 0:ie.textarea)}),prefixCls:w,suffix:Te&&R.createElement("span",{className:`${w}-textarea-suffix`},Fe),showCount:_,ref:X})))});dt.Z=ke},59412:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return j}});var K=m(59301);function j(A,xe){const R=(0,K.useRef)([]),N=()=>{R.current.push(setTimeout(()=>{var x,E,F,V;!((x=A.current)===null||x===void 0)&&x.input&&((E=A.current)===null||E===void 0?void 0:E.input.getAttribute("type"))==="password"&&(!((F=A.current)===null||F===void 0)&&F.input.hasAttribute("value"))&&((V=A.current)===null||V===void 0||V.input.removeAttribute("value"))}))};return(0,K.useEffect)(()=>(xe&&N(),()=>R.current.forEach(x=>{x&&clearTimeout(x)})),[]),N}},92832:function(yn,dt,m){"use strict";m.d(dt,{default:function(){return Le}});var K=m(92310),j=m.n(K),A=m(59301),xe=m(36355),R=m(32441),N=m(9937),E=z=>{const{getPrefixCls:we,direction:ge}=(0,A.useContext)(xe.E_),{prefixCls:Te,className:Fe}=z,Re=we("input-group",Te),X=we("input"),[w,ve]=(0,N.ZP)(X),Qe=j()(Re,{[`${Re}-lg`]:z.size==="large",[`${Re}-sm`]:z.size==="small",[`${Re}-compact`]:z.compact,[`${Re}-rtl`]:ge==="rtl"},ve,Fe),je=(0,A.useContext)(R.aM),Be=(0,A.useMemo)(()=>Object.assign(Object.assign({},je),{isFormItemInput:!1}),[je]);return w(A.createElement("span",{className:Qe,style:z.style,onMouseEnter:z.onMouseEnter,onMouseLeave:z.onMouseLeave,onFocus:z.onFocus,onBlur:z.onBlur},A.createElement(R.aM.Provider,{value:Be},z.children)))},F=m(9432),V=m(73331),Ie=m(15277),G=m(2738),le=m(8654),ke=m(59412),ue=function(z,we){var ge={};for(var Te in z)Object.prototype.hasOwnProperty.call(z,Te)&&we.indexOf(Te)<0&&(ge[Te]=z[Te]);if(z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Fe=0,Te=Object.getOwnPropertySymbols(z);Fe<Te.length;Fe++)we.indexOf(Te[Fe])<0&&Object.prototype.propertyIsEnumerable.call(z,Te[Fe])&&(ge[Te[Fe]]=z[Te[Fe]]);return ge};const de=z=>z?A.createElement(Ie.Z,null):A.createElement(V.Z,null),_e={click:"onClick",hover:"onMouseOver"};var Ue=A.forwardRef((z,we)=>{const{visibilityToggle:ge=!0}=z,Te=typeof ge=="object"&&ge.visible!==void 0,[Fe,Re]=(0,A.useState)(()=>Te?ge.visible:!1),X=(0,A.useRef)(null);A.useEffect(()=>{Te&&Re(ge.visible)},[Te,ge]);const w=(0,ke.Z)(X),ve=()=>{const{disabled:p}=z;p||(Fe&&w(),Re(h=>{var g;const y=!h;return typeof ge=="object"&&((g=ge.onVisibleChange)===null||g===void 0||g.call(ge,y)),y}))},Qe=p=>{const{action:h="click",iconRender:g=de}=z,y=_e[h]||"",d=g(Fe),L={[y]:ve,className:`${p}-icon`,key:"passwordIcon",onMouseDown:fe=>{fe.preventDefault()},onMouseUp:fe=>{fe.preventDefault()}};return A.cloneElement(A.isValidElement(d)?d:A.createElement("span",null,d),L)},{className:je,prefixCls:Be,inputPrefixCls:Oe,size:lt}=z,$t=ue(z,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:vt}=A.useContext(xe.E_),Tt=vt("input",Oe),wt=vt("input-password",Be),pt=ge&&Qe(wt),at=j()(wt,je,{[`${wt}-${lt}`]:!!lt}),S=Object.assign(Object.assign({},(0,G.Z)($t,["suffix","iconRender","visibilityToggle"])),{type:Fe?"text":"password",className:at,prefixCls:Tt,suffix:pt});return lt&&(S.size=lt),A.createElement(F.Z,Object.assign({ref:(0,le.sQ)(we,X)},S))}),Ce=m(47472),pe=m(92343),q=m(3113),_=m(19716),ie=m(33234),ae=function(z,we){var ge={};for(var Te in z)Object.prototype.hasOwnProperty.call(z,Te)&&we.indexOf(Te)<0&&(ge[Te]=z[Te]);if(z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Fe=0,Te=Object.getOwnPropertySymbols(z);Fe<Te.length;Fe++)we.indexOf(Te[Fe])<0&&Object.prototype.propertyIsEnumerable.call(z,Te[Fe])&&(ge[Te[Fe]]=z[Te[Fe]]);return ge},se=A.forwardRef((z,we)=>{const{prefixCls:ge,inputPrefixCls:Te,className:Fe,size:Re,suffix:X,enterButton:w=!1,addonAfter:ve,loading:Qe,disabled:je,onSearch:Be,onChange:Oe,onCompositionStart:lt,onCompositionEnd:$t}=z,vt=ae(z,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Tt,direction:wt}=A.useContext(xe.E_),pt=A.useRef(!1),at=Tt("input-search",ge),S=Tt("input",Te),{compactSize:p}=(0,ie.ri)(at,wt),h=(0,_.Z)(Ae=>{var qe;return(qe=Re!=null?Re:p)!==null&&qe!==void 0?qe:Ae}),g=A.useRef(null),y=Ae=>{Ae&&Ae.target&&Ae.type==="click"&&Be&&Be(Ae.target.value,Ae,{source:"clear"}),Oe&&Oe(Ae)},d=Ae=>{var qe;document.activeElement===((qe=g.current)===null||qe===void 0?void 0:qe.input)&&Ae.preventDefault()},L=Ae=>{var qe,oe;Be&&Be((oe=(qe=g.current)===null||qe===void 0?void 0:qe.input)===null||oe===void 0?void 0:oe.value,Ae,{source:"input"})},fe=Ae=>{pt.current||Qe||L(Ae)},O=typeof w=="boolean"?A.createElement(Ce.Z,null):null,I=`${at}-button`;let he;const Y=w||{},U=Y.type&&Y.type.__ANT_BUTTON===!0;U||Y.type==="button"?he=(0,pe.Tm)(Y,Object.assign({onMouseDown:d,onClick:Ae=>{var qe,oe;(oe=(qe=Y==null?void 0:Y.props)===null||qe===void 0?void 0:qe.onClick)===null||oe===void 0||oe.call(qe,Ae),L(Ae)},key:"enterButton"},U?{className:I,size:h}:{})):he=A.createElement(q.ZP,{className:I,type:w?"primary":void 0,size:h,disabled:je,key:"enterButton",onMouseDown:d,onClick:L,loading:Qe,icon:O},w),ve&&(he=[he,(0,pe.Tm)(ve,{key:"addonAfter"})]);const ye=j()(at,{[`${at}-rtl`]:wt==="rtl",[`${at}-${h}`]:!!h,[`${at}-with-button`]:!!w},Fe),Ye=Ae=>{pt.current=!0,lt==null||lt(Ae)},ce=Ae=>{pt.current=!1,$t==null||$t(Ae)};return A.createElement(F.Z,Object.assign({ref:(0,le.sQ)(g,we),onPressEnter:fe},vt,{size:h,onCompositionStart:Ye,onCompositionEnd:ce,prefixCls:S,addonAfter:he,suffix:X,onChange:y,className:ye,disabled:je}))}),be=m(1643);const D=F.Z;D.Group=E,D.Search=se,D.TextArea=be.Z,D.Password=Ue;var Le=D},9937:function(yn,dt,m){"use strict";m.d(dt,{M1:function(){return x},TM:function(){return pe},Xy:function(){return E},bi:function(){return Ie},e5:function(){return Ce},ik:function(){return G},nz:function(){return R},pU:function(){return N},s7:function(){return le},x0:function(){return V}});var K=m(17313),j=m(74207),A=m(37613),xe=m(83116);const R=q=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:q,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),N=q=>({borderColor:q.hoverBorderColor}),x=q=>({borderColor:q.activeBorderColor,boxShadow:q.activeShadow,outline:0}),E=q=>({color:q.colorTextDisabled,backgroundColor:q.colorBgContainerDisabled,borderColor:q.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},N((0,A.TS)(q,{hoverBorderColor:q.colorBorder})))}),F=q=>{const{paddingBlockLG:_,fontSizeLG:ie,lineHeightLG:ae,borderRadiusLG:Se,paddingInlineLG:se}=q;return{padding:`${_}px ${se}px`,fontSize:ie,lineHeight:ae,borderRadius:Se}},V=q=>({padding:`${q.paddingBlockSM}px ${q.paddingInlineSM}px`,borderRadius:q.borderRadiusSM}),Ie=(q,_)=>{const{componentCls:ie,colorError:ae,colorWarning:Se,errorActiveShadow:se,warningActiveShadow:be,colorErrorBorderHover:D,colorWarningBorderHover:Le}=q;return{[`&-status-error:not(${_}-disabled):not(${_}-borderless)${_}`]:{borderColor:ae,"&:hover":{borderColor:D},"&:focus, &-focused":Object.assign({},x((0,A.TS)(q,{activeBorderColor:ae,activeShadow:se}))),[`${ie}-prefix, ${ie}-suffix`]:{color:ae}},[`&-status-warning:not(${_}-disabled):not(${_}-borderless)${_}`]:{borderColor:Se,"&:hover":{borderColor:Le},"&:focus, &-focused":Object.assign({},x((0,A.TS)(q,{activeBorderColor:Se,activeShadow:be}))),[`${ie}-prefix, ${ie}-suffix`]:{color:Se}}}},G=q=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${q.paddingBlock}px ${q.paddingInline}px`,color:q.colorText,fontSize:q.fontSize,lineHeight:q.lineHeight,backgroundColor:q.colorBgContainer,backgroundImage:"none",borderWidth:q.lineWidth,borderStyle:q.lineType,borderColor:q.colorBorder,borderRadius:q.borderRadius,transition:`all ${q.motionDurationMid}`},R(q.colorTextPlaceholder)),{"&:hover":Object.assign({},N(q)),"&:focus, &-focused":Object.assign({},x(q)),"&-disabled, &[disabled]":Object.assign({},E(q)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:q.controlHeight,lineHeight:q.lineHeight,verticalAlign:"bottom",transition:`all ${q.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},F(q)),"&-sm":Object.assign({},V(q)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),le=q=>{const{componentCls:_,antCls:ie}=q;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:q.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${_}, &-lg > ${_}-group-addon`]:Object.assign({},F(q)),[`&-sm ${_}, &-sm > ${_}-group-addon`]:Object.assign({},V(q)),[`&-lg ${ie}-select-single ${ie}-select-selector`]:{height:q.controlHeightLG},[`&-sm ${ie}-select-single ${ie}-select-selector`]:{height:q.controlHeightSM},[`> ${_}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${_}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${q.paddingInline}px`,color:q.colorText,fontWeight:"normal",fontSize:q.fontSize,textAlign:"center",backgroundColor:q.colorFillAlter,border:`${q.lineWidth}px ${q.lineType} ${q.colorBorder}`,borderRadius:q.borderRadius,transition:`all ${q.motionDurationSlow}`,lineHeight:1,[`${ie}-select`]:{margin:`-${q.paddingBlock+1}px -${q.paddingInline}px`,[`&${ie}-select-single:not(${ie}-select-customize-input)`]:{[`${ie}-select-selector`]:{backgroundColor:"inherit",border:`${q.lineWidth}px ${q.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${ie}-select-selector`]:{color:q.colorPrimary}}},[`${ie}-cascader-picker`]:{margin:`-9px -${q.paddingInline}px`,backgroundColor:"transparent",[`${ie}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${_}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${_}-search-with-button &`]:{zIndex:0}}},[`> ${_}:first-child, ${_}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${ie}-select ${ie}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${_}-affix-wrapper`]:{[`&:not(:first-child) ${_}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${_}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${_}:last-child, ${_}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${ie}-select ${ie}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${_}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${_}-search &`]:{borderStartStartRadius:q.borderRadius,borderEndStartRadius:q.borderRadius}},[`&:not(:first-child), ${_}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${_}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,K.dF)()),{[`${_}-group-addon, ${_}-group-wrap, > ${_}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:q.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${_}-affix-wrapper,
|
|
|
& > ${_}-number-affix-wrapper,
|
|
|
& > ${ie}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-q.lineWidth,borderInlineEndWidth:q.lineWidth},[`${_}`]:{float:"none"},[`& > ${ie}-select > ${ie}-select-selector,
|
|
|
& > ${ie}-select-auto-complete ${_},
|
|
|
& > ${ie}-cascader-picker ${_},
|
|
|
& > ${_}-group-wrapper ${_}`]:{borderInlineEndWidth:q.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${ie}-select-focused`]:{zIndex:1},[`& > ${ie}-select > ${ie}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${ie}-select:first-child > ${ie}-select-selector,
|
|
|
& > ${ie}-select-auto-complete:first-child ${_},
|
|
|
& > ${ie}-cascader-picker:first-child ${_}`]:{borderStartStartRadius:q.borderRadius,borderEndStartRadius:q.borderRadius},[`& > *:last-child,
|
|
|
& > ${ie}-select:last-child > ${ie}-select-selector,
|
|
|
& > ${ie}-cascader-picker:last-child ${_},
|
|
|
& > ${ie}-cascader-picker-focused:last-child ${_}`]:{borderInlineEndWidth:q.lineWidth,borderStartEndRadius:q.borderRadius,borderEndEndRadius:q.borderRadius},[`& > ${ie}-select-auto-complete ${_}`]:{verticalAlign:"top"},[`${_}-group-wrapper + ${_}-group-wrapper`]:{marginInlineStart:-q.lineWidth,[`${_}-affix-wrapper`]:{borderRadius:0}},[`${_}-group-wrapper:not(:last-child)`]:{[`&${_}-search > ${_}-group`]:{[`& > ${_}-group-addon > ${_}-search-button`]:{borderRadius:0},[`& > ${_}`]:{borderStartStartRadius:q.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:q.borderRadius}}}})}},ke=q=>{const{componentCls:_,controlHeightSM:ie,lineWidth:ae}=q,se=(ie-ae*2-16)/2;return{[_]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,K.Wf)(q)),G(q)),Ie(q,_)),{'&[type="color"]':{height:q.controlHeight,[`&${_}-lg`]:{height:q.controlHeightLG},[`&${_}-sm`]:{height:ie,paddingTop:se,paddingBottom:se}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},ue=q=>{const{componentCls:_}=q;return{[`${_}-clear-icon`]:{margin:0,color:q.colorTextQuaternary,fontSize:q.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${q.motionDurationSlow}`,"&:hover":{color:q.colorTextTertiary},"&:active":{color:q.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${q.inputAffixPadding}px`}}}},de=q=>{const{componentCls:_,inputAffixPadding:ie,colorTextDescription:ae,motionDurationSlow:Se,colorIcon:se,colorIconHover:be,iconCls:D}=q;return{[`${_}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},G(q)),{display:"inline-flex",[`&:not(${_}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},N(q)),{zIndex:1,[`${_}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${_}[disabled]`]:{background:"transparent"}},[`> input${_}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${_}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:q.paddingXS}},"&-show-count-suffix":{color:ae},"&-show-count-has-suffix":{marginInlineEnd:q.paddingXXS},"&-prefix":{marginInlineEnd:ie},"&-suffix":{marginInlineStart:ie}}}),ue(q)),{[`${D}${_}-password-icon`]:{color:se,cursor:"pointer",transition:`all ${Se}`,"&:hover":{color:be}}}),Ie(q,`${_}-affix-wrapper`))}},_e=q=>{const{componentCls:_,colorError:ie,colorWarning:ae,borderRadiusLG:Se,borderRadiusSM:se}=q;return{[`${_}-group`]:Object.assign(Object.assign(Object.assign({},(0,K.Wf)(q)),le(q)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${_}-group-addon`]:{borderRadius:Se,fontSize:q.fontSizeLG}},"&-sm":{[`${_}-group-addon`]:{borderRadius:se}},"&-status-error":{[`${_}-group-addon`]:{color:ie,borderColor:ie}},"&-status-warning":{[`${_}-group-addon`]:{color:ae,borderColor:ae}},"&-disabled":{[`${_}-group-addon`]:Object.assign({},E(q))},[`&:not(${_}-compact-first-item):not(${_}-compact-last-item)${_}-compact-item`]:{[`${_}, ${_}-group-addon`]:{borderRadius:0}},[`&:not(${_}-compact-last-item)${_}-compact-first-item`]:{[`${_}, ${_}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${_}-compact-first-item)${_}-compact-last-item`]:{[`${_}, ${_}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},Pe=q=>{const{componentCls:_,antCls:ie}=q,ae=`${_}-search`;return{[ae]:{[`${_}`]:{"&:hover, &:focus":{borderColor:q.colorPrimaryHover,[`+ ${_}-group-addon ${ae}-button:not(${ie}-btn-primary)`]:{borderInlineStartColor:q.colorPrimaryHover}}},[`${_}-affix-wrapper`]:{borderRadius:0},[`${_}-lg`]:{lineHeight:q.lineHeightLG-2e-4},[`> ${_}-group`]:{[`> ${_}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${ae}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:q.borderRadius,borderEndEndRadius:q.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${ae}-button:not(${ie}-btn-primary)`]:{color:q.colorTextDescription,"&:hover":{color:q.colorPrimaryHover},"&:active":{color:q.colorPrimaryActive},[`&${ie}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${ae}-button`]:{height:q.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${ae}-button`]:{height:q.controlHeightLG},[`&-small ${ae}-button`]:{height:q.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${_}-compact-item`]:{[`&:not(${_}-compact-last-item)`]:{[`${_}-group-addon`]:{[`${_}-search-button`]:{marginInlineEnd:-q.lineWidth,borderRadius:0}}},[`&:not(${_}-compact-first-item)`]:{[`${_},${_}-affix-wrapper`]:{borderRadius:0}},[`> ${_}-group-addon ${_}-search-button,
|
|
|
> ${_},
|
|
|
${_}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${_}-affix-wrapper-focused`]:{zIndex:2}}}}},Ue=q=>{const{componentCls:_,paddingLG:ie}=q,ae=`${_}-textarea`;return{[ae]:{position:"relative","&-show-count":{[`> ${_}`]:{height:"100%"},[`${_}-data-count`]:{position:"absolute",bottom:-q.fontSize*q.lineHeight,insetInlineEnd:0,color:q.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${_}`]:{paddingInlineEnd:ie}},[`&-affix-wrapper${ae}-has-feedback`]:{[`${_}`]:{paddingInlineEnd:ie}},[`&-affix-wrapper${_}-affix-wrapper`]:{padding:0,[`> textarea${_}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${_}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${_}-clear-icon`]:{position:"absolute",insetInlineEnd:q.paddingXS,insetBlockStart:q.paddingXS},[`${ae}-suffix`]:{position:"absolute",top:0,insetInlineEnd:q.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function Ce(q){return(0,A.TS)(q,{inputAffixPadding:q.paddingXXS})}const pe=q=>{const{controlHeight:_,fontSize:ie,lineHeight:ae,lineWidth:Se,controlHeightSM:se,controlHeightLG:be,fontSizeLG:D,lineHeightLG:Le,paddingSM:z,controlPaddingHorizontalSM:we,controlPaddingHorizontal:ge,colorFillAlter:Te,colorPrimaryHover:Fe,controlOutlineWidth:Re,controlOutline:X,colorErrorOutline:w,colorWarningOutline:ve}=q;return{paddingBlock:Math.max(Math.round((_-ie*ae)/2*10)/10-Se,3),paddingBlockSM:Math.max(Math.round((se-ie*ae)/2*10)/10-Se,0),paddingBlockLG:Math.ceil((be-D*Le)/2*10)/10-Se,paddingInline:z-Se,paddingInlineSM:we-Se,paddingInlineLG:ge-Se,addonBg:Te,activeBorderColor:Fe,hoverBorderColor:Fe,activeShadow:`0 0 0 ${Re}px ${X}`,errorActiveShadow:`0 0 0 ${Re}px ${w}`,warningActiveShadow:`0 0 0 ${Re}px ${ve}`}};dt.ZP=(0,xe.Z)("Input",q=>{const _=(0,A.TS)(q,Ce(q));return[ke(_),Ue(_),de(_),_e(_),Pe(_),(0,j.c)(_)]},pe)},45818:function(yn,dt,m){"use strict";m.d(dt,{D:function(){return Ce},Z:function(){return _}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(ae,Se){return j.createElement(R.Z,(0,K.Z)({},ae,{ref:Se,icon:xe}))},x=j.forwardRef(N),E=x,F=m(33853),V=m(38819),Ie=m(92310),G=m.n(Ie),le=m(2738),ue=ie=>!isNaN(parseFloat(ie))&&isFinite(ie),de=m(36355),_e=m(84966),Pe=function(ie,ae){var Se={};for(var se in ie)Object.prototype.hasOwnProperty.call(ie,se)&&ae.indexOf(se)<0&&(Se[se]=ie[se]);if(ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var be=0,se=Object.getOwnPropertySymbols(ie);be<se.length;be++)ae.indexOf(se[be])<0&&Object.prototype.propertyIsEnumerable.call(ie,se[be])&&(Se[se[be]]=ie[se[be]]);return Se};const Ue={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},Ce=j.createContext({}),pe=(()=>{let ie=0;return function(){let ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return ie+=1,`${ae}${ie}`}})();var _=j.forwardRef((ie,ae)=>{const{prefixCls:Se,className:se,trigger:be,children:D,defaultCollapsed:Le=!1,theme:z="dark",style:we={},collapsible:ge=!1,reverseArrow:Te=!1,width:Fe=200,collapsedWidth:Re=80,zeroWidthTriggerStyle:X,breakpoint:w,onCollapse:ve,onBreakpoint:Qe}=ie,je=Pe(ie,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Be}=(0,j.useContext)(_e.Gs),[Oe,lt]=(0,j.useState)("collapsed"in ie?ie.collapsed:Le),[$t,vt]=(0,j.useState)(!1);(0,j.useEffect)(()=>{"collapsed"in ie&<(ie.collapsed)},[ie.collapsed]);const Tt=(h,g)=>{"collapsed"in ie||lt(h),ve==null||ve(h,g)},wt=(0,j.useRef)();wt.current=h=>{vt(h.matches),Qe==null||Qe(h.matches),Oe!==h.matches&&Tt(h.matches,"responsive")},(0,j.useEffect)(()=>{function h(y){return wt.current(y)}let g;if(typeof window!="undefined"){const{matchMedia:y}=window;if(y&&w&&w in Ue){g=y(`(max-width: ${Ue[w]})`);try{g.addEventListener("change",h)}catch(d){g.addListener(h)}h(g)}}return()=>{try{g==null||g.removeEventListener("change",h)}catch(y){g==null||g.removeListener(h)}}},[w]),(0,j.useEffect)(()=>{const h=pe("ant-sider-");return Be.addSider(h),()=>Be.removeSider(h)},[]);const pt=()=>{Tt(!Oe,"clickTrigger")},{getPrefixCls:at}=(0,j.useContext)(de.E_),S=()=>{const h=at("layout-sider",Se),g=(0,le.Z)(je,["collapsed"]),y=Oe?Re:Fe,d=ue(y)?`${y}px`:String(y),L=parseFloat(String(Re||0))===0?j.createElement("span",{onClick:pt,className:G()(`${h}-zero-width-trigger`,`${h}-zero-width-trigger-${Te?"right":"left"}`),style:X},be||j.createElement(E,null)):null,I={expanded:Te?j.createElement(V.Z,null):j.createElement(F.Z,null),collapsed:Te?j.createElement(F.Z,null):j.createElement(V.Z,null)}[Oe?"collapsed":"expanded"],he=be!==null?L||j.createElement("div",{className:`${h}-trigger`,onClick:pt,style:{width:d}},be||I):null,Y=Object.assign(Object.assign({},we),{flex:`0 0 ${d}`,maxWidth:d,minWidth:d,width:d}),U=G()(h,`${h}-${z}`,{[`${h}-collapsed`]:!!Oe,[`${h}-has-trigger`]:ge&&be!==null&&!L,[`${h}-below`]:!!$t,[`${h}-zero-width`]:parseFloat(d)===0},se);return j.createElement("aside",Object.assign({className:U},g,{style:Y,ref:ae}),j.createElement("div",{className:`${h}-children`},D),ge||$t&&L?he:null)},p=j.useMemo(()=>({siderCollapsed:Oe}),[Oe]);return j.createElement(Ce.Provider,{value:p},S())})},84966:function(yn,dt,m){"use strict";m.d(dt,{VY:function(){return Ce},$_:function(){return Ue},h4:function(){return Pe},Gs:function(){return le},ZP:function(){return pe}});var K=m(94480),j=m(92310),A=m.n(j),xe=m(2738),R=m(59301),N=m(36355),x=m(83116),F=q=>{const{componentCls:_,bodyBg:ie,lightSiderBg:ae,lightTriggerBg:Se,lightTriggerColor:se}=q;return{[`${_}-sider-light`]:{background:ae,[`${_}-sider-trigger`]:{color:se,background:Se},[`${_}-sider-zero-width-trigger`]:{color:se,background:Se,border:`1px solid ${ie}`,borderInlineStart:0}}}};const V=q=>{const{antCls:_,componentCls:ie,colorText:ae,triggerColor:Se,footerBg:se,triggerBg:be,headerHeight:D,headerPadding:Le,headerColor:z,footerPadding:we,triggerHeight:ge,zeroTriggerHeight:Te,zeroTriggerWidth:Fe,motionDurationMid:Re,motionDurationSlow:X,fontSize:w,borderRadius:ve,bodyBg:Qe,headerBg:je,siderBg:Be}=q;return{[ie]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Qe,"&, *":{boxSizing:"border-box"},[`&${ie}-has-sider`]:{flexDirection:"row",[`> ${ie}, > ${ie}-content`]:{width:0}},[`${ie}-header, &${ie}-footer`]:{flex:"0 0 auto"},[`${ie}-sider`]:{position:"relative",minWidth:0,background:Be,transition:`all ${Re}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${_}-menu${_}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:ge},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:ge,color:Se,lineHeight:`${ge}px`,textAlign:"center",background:be,cursor:"pointer",transition:`all ${Re}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:D,insetInlineEnd:-Fe,zIndex:1,width:Fe,height:Te,color:Se,fontSize:q.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Be,borderStartStartRadius:0,borderStartEndRadius:ve,borderEndEndRadius:ve,borderEndStartRadius:0,cursor:"pointer",transition:`background ${X} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${X}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-Fe,borderStartStartRadius:ve,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:ve}}}}},F(q)),{"&-rtl":{direction:"rtl"}}),[`${ie}-header`]:{height:D,padding:Le,color:z,lineHeight:`${D}px`,background:je,[`${_}-menu`]:{lineHeight:"inherit"}},[`${ie}-footer`]:{padding:we,color:ae,fontSize:w,background:se},[`${ie}-content`]:{flex:"auto",minHeight:0}}};var Ie=(0,x.Z)("Layout",q=>[V(q)],q=>{const{colorBgLayout:_,controlHeight:ie,controlHeightLG:ae,colorText:Se,controlHeightSM:se,marginXXS:be,colorTextLightSolid:D,colorBgContainer:Le}=q,z=ae*1.25;return{colorBgHeader:"#001529",colorBgBody:_,colorBgTrigger:"#002140",bodyBg:_,headerBg:"#001529",headerHeight:ie*2,headerPadding:`0 ${z}px`,headerColor:Se,footerPadding:`${se}px ${z}px`,footerBg:_,siderBg:"#001529",triggerHeight:ae+be*2,triggerBg:"#002140",triggerColor:D,zeroTriggerWidth:ae,zeroTriggerHeight:ae,lightSiderBg:Le,lightTriggerBg:Le,lightTriggerColor:Se}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),G=function(q,_){var ie={};for(var ae in q)Object.prototype.hasOwnProperty.call(q,ae)&&_.indexOf(ae)<0&&(ie[ae]=q[ae]);if(q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Se=0,ae=Object.getOwnPropertySymbols(q);Se<ae.length;Se++)_.indexOf(ae[Se])<0&&Object.prototype.propertyIsEnumerable.call(q,ae[Se])&&(ie[ae[Se]]=q[ae[Se]]);return ie};const le=R.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function ke(q){let{suffixCls:_,tagName:ie,displayName:ae}=q;return Se=>R.forwardRef((be,D)=>R.createElement(Se,Object.assign({ref:D,suffixCls:_,tagName:ie},be)))}const ue=R.forwardRef((q,_)=>{const{prefixCls:ie,suffixCls:ae,className:Se,tagName:se}=q,be=G(q,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:D}=R.useContext(N.E_),Le=D("layout",ie),[z,we]=Ie(Le),ge=ae?`${Le}-${ae}`:Le;return z(R.createElement(se,Object.assign({className:A()(ie||ge,Se,we),ref:_},be)))}),de=R.forwardRef((q,_)=>{const{direction:ie}=R.useContext(N.E_),[ae,Se]=R.useState([]),{prefixCls:se,className:be,rootClassName:D,children:Le,hasSider:z,tagName:we,style:ge}=q,Te=G(q,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Fe=(0,xe.Z)(Te,["suffixCls"]),{getPrefixCls:Re,layout:X}=R.useContext(N.E_),w=Re("layout",se),[ve,Qe]=Ie(w),je=A()(w,{[`${w}-has-sider`]:typeof z=="boolean"?z:ae.length>0,[`${w}-rtl`]:ie==="rtl"},X==null?void 0:X.className,be,D,Qe),Be=R.useMemo(()=>({siderHook:{addSider:Oe=>{Se(lt=>[].concat((0,K.Z)(lt),[Oe]))},removeSider:Oe=>{Se(lt=>lt.filter($t=>$t!==Oe))}}}),[]);return ve(R.createElement(le.Provider,{value:Be},R.createElement(we,Object.assign({ref:_,className:je,style:Object.assign(Object.assign({},X==null?void 0:X.style),ge)},Fe),Le)))}),_e=ke({tagName:"div",displayName:"Layout"})(de),Pe=ke({suffixCls:"header",tagName:"header",displayName:"Header"})(ue),Ue=ke({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(ue),Ce=ke({suffixCls:"content",tagName:"main",displayName:"Content"})(ue);var pe=_e},40875:function(yn,dt,m){"use strict";m.d(dt,{J:function(){return N}});var K=m(59301),j=m(33234),A=m(70425),xe=function(x,E){var F={};for(var V in x)Object.prototype.hasOwnProperty.call(x,V)&&E.indexOf(V)<0&&(F[V]=x[V]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ie=0,V=Object.getOwnPropertySymbols(x);Ie<V.length;Ie++)E.indexOf(V[Ie])<0&&Object.prototype.propertyIsEnumerable.call(x,V[Ie])&&(F[V[Ie]]=x[V[Ie]]);return F};const R=K.createContext(null),N=K.forwardRef((x,E)=>{const{children:F}=x,V=xe(x,["children"]),Ie=K.useContext(R),G=K.useMemo(()=>Object.assign(Object.assign({},Ie),V),[Ie,V.prefixCls,V.mode,V.selectable]);return K.createElement(R.Provider,{value:G},K.createElement(j.BR,null,(0,A.supportNodeRef)(F)?K.cloneElement(F,{ref:E}):F))});dt.Z=R},20834:function(yn,dt,m){"use strict";m.d(dt,{default:function(){return p}});var K=m(15285),j=m(59301),A=m(45818),xe=m(92310),R=m.n(xe),N=m(36355),x=function(h,g){var y={};for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&g.indexOf(d)<0&&(y[d]=h[d]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,d=Object.getOwnPropertySymbols(h);L<d.length;L++)g.indexOf(d[L])<0&&Object.prototype.propertyIsEnumerable.call(h,d[L])&&(y[d[L]]=h[d[L]]);return y},F=h=>{const{prefixCls:g,className:y,dashed:d}=h,L=x(h,["prefixCls","className","dashed"]),{getPrefixCls:fe}=j.useContext(N.E_),O=fe("menu",g),I=R()({[`${O}-item-divider-dashed`]:!!d},y);return j.createElement(K.iz,Object.assign({className:I},L))},V=m(11592),Ie=m(2738),G=m(6848),le=m(92343),ue=(0,j.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),_e=h=>{var g;const{className:y,children:d,icon:L,title:fe,danger:O}=h,{prefixCls:I,firstLevel:he,direction:Y,disableMenuItemTitleTooltip:U,inlineCollapsed:ye}=j.useContext(ue),Ye=re=>{const $e=j.createElement("span",{className:`${I}-title-content`},d);return(!L||(0,le.l$)(d)&&d.type==="span")&&d&&re&&he&&typeof d=="string"?j.createElement("div",{className:`${I}-inline-collapsed-noicon`},d.charAt(0)):$e},{siderCollapsed:ce}=j.useContext(A.D);let Ae=fe;typeof fe=="undefined"?Ae=he?d:"":fe===!1&&(Ae="");const qe={title:Ae};!ce&&!ye&&(qe.title=null,qe.open=!1);const oe=(0,V.Z)(d).length;let T=j.createElement(K.ck,Object.assign({},(0,Ie.Z)(h,["title","icon","danger"]),{className:R()({[`${I}-item-danger`]:O,[`${I}-item-only-child`]:(L?oe+1:oe)===1},y),title:typeof fe=="string"?fe:void 0}),(0,le.Tm)(L,{className:R()((0,le.l$)(L)?(g=L.props)===null||g===void 0?void 0:g.className:"",`${I}-item-icon`)}),Ye(ye));return U||(T=j.createElement(G.Z,Object.assign({},qe,{placement:Y==="rtl"?"left":"right",overlayClassName:`${I}-inline-collapsed-tooltip`}),T)),T},Ue=h=>{var g;const{popupClassName:y,icon:d,title:L,theme:fe}=h,O=j.useContext(ue),{prefixCls:I,inlineCollapsed:he,theme:Y}=O,U=(0,K.Xl)();let ye;if(!d)ye=he&&!U.length&&L&&typeof L=="string"?j.createElement("div",{className:`${I}-inline-collapsed-noicon`},L.charAt(0)):j.createElement("span",{className:`${I}-title-content`},L);else{const ce=(0,le.l$)(L)&&L.type==="span";ye=j.createElement(j.Fragment,null,(0,le.Tm)(d,{className:R()((0,le.l$)(d)?(g=d.props)===null||g===void 0?void 0:g.className:"",`${I}-item-icon`)}),ce?L:j.createElement("span",{className:`${I}-title-content`},L))}const Ye=j.useMemo(()=>Object.assign(Object.assign({},O),{firstLevel:!1}),[O]);return j.createElement(ue.Provider,{value:Ye},j.createElement(K.Wd,Object.assign({},(0,Ie.Z)(h,["icon"]),{title:ye,popupClassName:R()(I,y,`${I}-${fe||Y}`)})))},Ce=m(18785),pe=m(70425),q=m(62892),_=m(40875),ie=function(h,g){var y={};for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&g.indexOf(d)<0&&(y[d]=h[d]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,d=Object.getOwnPropertySymbols(h);L<d.length;L++)g.indexOf(d[L])<0&&Object.prototype.propertyIsEnumerable.call(h,d[L])&&(y[d[L]]=h[d[L]]);return y};function ae(h){return(h||[]).map((g,y)=>{if(g&&typeof g=="object"){const d=g,{label:L,children:fe,key:O,type:I}=d,he=ie(d,["label","children","key","type"]),Y=O!=null?O:`tmp-${y}`;return fe||I==="group"?I==="group"?j.createElement(K.BW,Object.assign({key:Y},he,{title:L}),ae(fe)):j.createElement(Ue,Object.assign({key:Y},he,{title:L}),ae(fe)):I==="divider"?j.createElement(F,Object.assign({key:Y},he)):j.createElement(_e,Object.assign({key:Y},he),L)}return null}).filter(g=>g)}function Se(h){return j.useMemo(()=>h&&ae(h),[h])}var se=m(64993),be=m(17313),D=m(8378),Le=m(13826),z=m(29878),we=m(83116),ge=m(37613),Fe=h=>{const{componentCls:g,motionDurationSlow:y,horizontalLineHeight:d,colorSplit:L,lineWidth:fe,lineType:O,itemPaddingInline:I}=h;return{[`${g}-horizontal`]:{lineHeight:d,border:0,borderBottom:`${fe}px ${O} ${L}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${g}-item, ${g}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:I},[`> ${g}-item:hover,
|
|
|
> ${g}-item-active,
|
|
|
> ${g}-submenu ${g}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${g}-item, ${g}-submenu-title`]:{transition:[`border-color ${y}`,`background ${y}`].join(",")},[`${g}-submenu-arrow`]:{display:"none"}}}},X=h=>{let{componentCls:g,menuArrowOffset:y}=h;return{[`${g}-rtl`]:{direction:"rtl"},[`${g}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${g}-rtl${g}-vertical,
|
|
|
${g}-submenu-rtl ${g}-vertical`]:{[`${g}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${y})`},"&::after":{transform:`rotate(45deg) translateY(${y})`}}}}};const w=h=>Object.assign({},(0,be.oN)(h));var Qe=(h,g)=>{const{componentCls:y,itemColor:d,itemSelectedColor:L,groupTitleColor:fe,itemBg:O,subMenuItemBg:I,itemSelectedBg:he,activeBarHeight:Y,activeBarWidth:U,activeBarBorderWidth:ye,motionDurationSlow:Ye,motionEaseInOut:ce,motionEaseOut:Ae,itemPaddingInline:qe,motionDurationMid:oe,itemHoverColor:T,lineType:re,colorSplit:$e,itemDisabledColor:Ne,dangerItemColor:Xe,dangerItemHoverColor:ct,dangerItemSelectedColor:mt,dangerItemActiveBg:yt,dangerItemSelectedBg:Bt,itemHoverBg:Ft,itemActiveBg:_t,menuSubMenuBg:Yt,horizontalItemSelectedColor:rn,horizontalItemSelectedBg:hn,horizontalItemBorderRadius:Wt,horizontalItemHoverBg:on,popupBg:xn}=h;return{[`${y}-${g}, ${y}-${g} > ${y}`]:{color:d,background:O,[`&${y}-root:focus-visible`]:Object.assign({},w(h)),[`${y}-item-group-title`]:{color:fe},[`${y}-submenu-selected`]:{[`> ${y}-submenu-title`]:{color:L}},[`${y}-item-disabled, ${y}-submenu-disabled`]:{color:`${Ne} !important`},[`${y}-item:not(${y}-item-selected):not(${y}-submenu-selected)`]:{[`&:hover, > ${y}-submenu-title:hover`]:{color:T}},[`&:not(${y}-horizontal)`]:{[`${y}-item:not(${y}-item-selected)`]:{"&:hover":{backgroundColor:Ft},"&:active":{backgroundColor:_t}},[`${y}-submenu-title`]:{"&:hover":{backgroundColor:Ft},"&:active":{backgroundColor:_t}}},[`${y}-item-danger`]:{color:Xe,[`&${y}-item:hover`]:{[`&:not(${y}-item-selected):not(${y}-submenu-selected)`]:{color:ct}},[`&${y}-item:active`]:{background:yt}},[`${y}-item a`]:{"&, &:hover":{color:"inherit"}},[`${y}-item-selected`]:{color:L,[`&${y}-item-danger`]:{color:mt},"a, a:hover":{color:"inherit"}},[`& ${y}-item-selected`]:{backgroundColor:he,[`&${y}-item-danger`]:{backgroundColor:Bt}},[`${y}-item, ${y}-submenu-title`]:{[`&:not(${y}-item-disabled):focus-visible`]:Object.assign({},w(h))},[`&${y}-submenu > ${y}`]:{backgroundColor:Yt},[`&${y}-popup > ${y}`]:{backgroundColor:xn},[`&${y}-horizontal`]:Object.assign(Object.assign({},g==="dark"?{borderBottom:0}:{}),{[`> ${y}-item, > ${y}-submenu`]:{top:ye,marginTop:-ye,marginBottom:0,borderRadius:Wt,"&::after":{position:"absolute",insetInline:qe,bottom:0,borderBottom:`${Y}px solid transparent`,transition:`border-color ${Ye} ${ce}`,content:'""'},"&:hover, &-active, &-open":{background:on,"&::after":{borderBottomWidth:Y,borderBottomColor:rn}},"&-selected":{color:rn,backgroundColor:hn,"&:hover":{backgroundColor:hn},"&::after":{borderBottomWidth:Y,borderBottomColor:rn}}}}),[`&${y}-root`]:{[`&${y}-inline, &${y}-vertical`]:{borderInlineEnd:`${ye}px ${re} ${$e}`}},[`&${y}-inline`]:{[`${y}-sub${y}-inline`]:{background:I},[`${y}-item, ${y}-submenu-title`]:ye&&U?{width:`calc(100% + ${ye}px)`}:{},[`${y}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${U}px solid ${L}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${oe} ${Ae}`,`opacity ${oe} ${Ae}`].join(","),content:'""'},[`&${y}-item-danger`]:{"&::after":{borderInlineEndColor:mt}}},[`${y}-selected, ${y}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${oe} ${ce}`,`opacity ${oe} ${ce}`].join(",")}}}}}};const je=h=>{const{componentCls:g,itemHeight:y,itemMarginInline:d,padding:L,menuArrowSize:fe,marginXS:O,itemMarginBlock:I}=h,he=L+fe+O;return{[`${g}-item`]:{position:"relative",overflow:"hidden"},[`${g}-item, ${g}-submenu-title`]:{height:y,lineHeight:`${y}px`,paddingInline:L,overflow:"hidden",textOverflow:"ellipsis",marginInline:d,marginBlock:I,width:`calc(100% - ${d*2}px)`},[`> ${g}-item,
|
|
|
> ${g}-submenu > ${g}-submenu-title`]:{height:y,lineHeight:`${y}px`},[`${g}-item-group-list ${g}-submenu-title,
|
|
|
${g}-submenu-title`]:{paddingInlineEnd:he}}};var Oe=h=>{const{componentCls:g,iconCls:y,itemHeight:d,colorTextLightSolid:L,dropdownWidth:fe,controlHeightLG:O,motionDurationMid:I,motionEaseOut:he,paddingXL:Y,itemMarginInline:U,fontSizeLG:ye,motionDurationSlow:Ye,paddingXS:ce,boxShadowSecondary:Ae,collapsedWidth:qe,collapsedIconSize:oe}=h,T={height:d,lineHeight:`${d}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[g]:{"&-inline, &-vertical":Object.assign({[`&${g}-root`]:{boxShadow:"none"}},je(h))},[`${g}-submenu-popup`]:{[`${g}-vertical`]:Object.assign(Object.assign({},je(h)),{boxShadow:Ae})}},{[`${g}-submenu-popup ${g}-vertical${g}-sub`]:{minWidth:fe,maxHeight:`calc(100vh - ${O*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${g}-inline`]:{width:"100%",[`&${g}-root`]:{[`${g}-item, ${g}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${Ye}`,`background ${Ye}`,`padding ${I} ${he}`].join(","),[`> ${g}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${g}-sub${g}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${g}-submenu > ${g}-submenu-title`]:T,[`& ${g}-item-group-title`]:{paddingInlineStart:Y}},[`${g}-item`]:T}},{[`${g}-inline-collapsed`]:{width:qe,[`&${g}-root`]:{[`${g}-item, ${g}-submenu ${g}-submenu-title`]:{[`> ${g}-inline-collapsed-noicon`]:{fontSize:ye,textAlign:"center"}}},[`> ${g}-item,
|
|
|
> ${g}-item-group > ${g}-item-group-list > ${g}-item,
|
|
|
> ${g}-item-group > ${g}-item-group-list > ${g}-submenu > ${g}-submenu-title,
|
|
|
> ${g}-submenu > ${g}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${ye/2}px - ${U}px)`,textOverflow:"clip",[`
|
|
|
${g}-submenu-arrow,
|
|
|
${g}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${g}-item-icon, ${y}`]:{margin:0,fontSize:oe,lineHeight:`${d}px`,"+ span":{display:"inline-block",opacity:0}}},[`${g}-item-icon, ${y}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${g}-item-icon, ${y}`]:{display:"none"},"a, a:hover":{color:L}},[`${g}-item-group-title`]:Object.assign(Object.assign({},be.vS),{paddingInline:ce})}}]};const lt=h=>{const{componentCls:g,motionDurationSlow:y,motionDurationMid:d,motionEaseInOut:L,motionEaseOut:fe,iconCls:O,iconSize:I,iconMarginInlineEnd:he}=h;return{[`${g}-item, ${g}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${y}`,`background ${y}`,`padding ${y} ${L}`].join(","),[`${g}-item-icon, ${O}`]:{minWidth:I,fontSize:I,transition:[`font-size ${d} ${fe}`,`margin ${y} ${L}`,`color ${y}`].join(","),"+ span":{marginInlineStart:he,opacity:1,transition:[`opacity ${y} ${L}`,`margin ${y}`,`color ${y}`].join(",")}},[`${g}-item-icon`]:Object.assign({},(0,be.Ro)()),[`&${g}-item-only-child`]:{[`> ${O}, > ${g}-item-icon`]:{marginInlineEnd:0}}},[`${g}-item-disabled, ${g}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${g}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},$t=h=>{const{componentCls:g,motionDurationSlow:y,motionEaseInOut:d,borderRadius:L,menuArrowSize:fe,menuArrowOffset:O}=h;return{[`${g}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:h.margin,width:fe,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${y} ${d}, opacity ${y}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:fe*.6,height:fe*.15,backgroundColor:"currentcolor",borderRadius:L,transition:[`background ${y} ${d}`,`transform ${y} ${d}`,`top ${y} ${d}`,`color ${y} ${d}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${O})`},"&::after":{transform:`rotate(-45deg) translateY(${O})`}}}}},vt=h=>{const{antCls:g,componentCls:y,fontSize:d,motionDurationSlow:L,motionDurationMid:fe,motionEaseInOut:O,paddingXS:I,padding:he,colorSplit:Y,lineWidth:U,zIndexPopup:ye,borderRadiusLG:Ye,subMenuItemBorderRadius:ce,menuArrowSize:Ae,menuArrowOffset:qe,lineType:oe,menuPanelMaskInset:T,groupTitleLineHeight:re,groupTitleFontSize:$e}=h;return[{"":{[`${y}`]:Object.assign(Object.assign({},(0,be.dF)()),{"&-hidden":{display:"none"}})},[`${y}-submenu-hidden`]:{display:"none"}},{[y]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,be.Wf)(h)),(0,be.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:d,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${L} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${y}-item`]:{flex:"none"}},[`${y}-item, ${y}-submenu, ${y}-submenu-title`]:{borderRadius:h.itemBorderRadius},[`${y}-item-group-title`]:{padding:`${I}px ${he}px`,fontSize:$e,lineHeight:re,transition:`all ${L}`},[`&-horizontal ${y}-submenu`]:{transition:[`border-color ${L} ${O}`,`background ${L} ${O}`].join(",")},[`${y}-submenu, ${y}-submenu-inline`]:{transition:[`border-color ${L} ${O}`,`background ${L} ${O}`,`padding ${fe} ${O}`].join(",")},[`${y}-submenu ${y}-sub`]:{cursor:"initial",transition:[`background ${L} ${O}`,`padding ${L} ${O}`].join(",")},[`${y}-title-content`]:{transition:`color ${L}`},[`${y}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${y}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Y,borderStyle:oe,borderWidth:0,borderTopWidth:U,marginBlock:U,padding:0,"&-dashed":{borderStyle:"dashed"}}}),lt(h)),{[`${y}-item-group`]:{[`${y}-item-group-list`]:{margin:0,padding:0,[`${y}-item, ${y}-submenu-title`]:{paddingInline:`${d*2}px ${he}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:ye,borderRadius:Ye,boxShadow:"none",transformOrigin:"0 0",[`&${y}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${T}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:T},"\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:h.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:h.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:h.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:h.paddingXS},[`> ${y}`]:Object.assign(Object.assign(Object.assign({borderRadius:Ye},lt(h)),$t(h)),{[`${y}-item, ${y}-submenu > ${y}-submenu-title`]:{borderRadius:ce},[`${y}-submenu-title::after`]:{transition:`transform ${L} ${O}`}})}}),$t(h)),{[`&-inline-collapsed ${y}-submenu-arrow,
|
|
|
&-inline ${y}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${qe})`},"&::after":{transform:`rotate(45deg) translateX(-${qe})`}},[`${y}-submenu-open${y}-submenu-inline > ${y}-submenu-title > ${y}-submenu-arrow`]:{transform:`translateY(-${Ae*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${qe})`},"&::before":{transform:`rotate(45deg) translateX(${qe})`}}})},{[`${g}-layout-header`]:{[y]:{lineHeight:"inherit"}}}]};var Tt=(h,g)=>(0,we.Z)("Menu",d=>{if(g===!1)return[];const{colorBgElevated:L,colorPrimary:fe,colorTextLightSolid:O,controlHeightLG:I,fontSize:he,darkItemColor:Y,darkDangerItemColor:U,darkItemBg:ye,darkSubMenuItemBg:Ye,darkItemSelectedColor:ce,darkItemSelectedBg:Ae,darkDangerItemSelectedBg:qe,darkItemHoverBg:oe,darkGroupTitleColor:T,darkItemHoverColor:re,darkItemDisabledColor:$e,darkDangerItemHoverColor:Ne,darkDangerItemSelectedColor:Xe,darkDangerItemActiveBg:ct}=d,mt=he/7*5,yt=(0,ge.TS)(d,{menuArrowSize:mt,menuHorizontalHeight:I*1.15,menuArrowOffset:`${mt*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:L}),Bt=(0,ge.TS)(yt,{itemColor:Y,itemHoverColor:re,groupTitleColor:T,itemSelectedColor:ce,itemBg:ye,popupBg:ye,subMenuItemBg:Ye,itemActiveBg:"transparent",itemSelectedBg:Ae,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:oe,itemDisabledColor:$e,dangerItemColor:U,dangerItemHoverColor:Ne,dangerItemSelectedColor:Xe,dangerItemActiveBg:ct,dangerItemSelectedBg:qe,menuSubMenuBg:Ye,horizontalItemSelectedColor:O,horizontalItemSelectedBg:fe});return[vt(yt),Fe(yt),Oe(yt),Qe(yt,"light"),Qe(Bt,"dark"),X(yt),(0,D.Z)(yt),(0,Le.oN)(yt,"slide-up"),(0,Le.oN)(yt,"slide-down"),(0,z._y)(yt,"zoom-big")]},d=>{const{colorPrimary:L,colorError:fe,colorTextDisabled:O,colorErrorBg:I,colorText:he,colorTextDescription:Y,colorBgContainer:U,colorFillAlter:ye,colorFillContent:Ye,lineWidth:ce,lineWidthBold:Ae,controlItemBgActive:qe,colorBgTextHover:oe,controlHeightLG:T,lineHeight:re,colorBgElevated:$e,marginXXS:Ne,padding:Xe,fontSize:ct,controlHeightSM:mt,fontSizeLG:yt,colorTextLightSolid:Bt,colorErrorHover:Ft}=d,_t=new se.C(Bt).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:d.zIndexPopupBase+50,radiusItem:d.borderRadiusLG,itemBorderRadius:d.borderRadiusLG,radiusSubMenuItem:d.borderRadiusSM,subMenuItemBorderRadius:d.borderRadiusSM,colorItemText:he,itemColor:he,colorItemTextHover:he,itemHoverColor:he,colorItemTextHoverHorizontal:L,horizontalItemHoverColor:L,colorGroupTitle:Y,groupTitleColor:Y,colorItemTextSelected:L,itemSelectedColor:L,colorItemTextSelectedHorizontal:L,horizontalItemSelectedColor:L,colorItemBg:U,itemBg:U,colorItemBgHover:oe,itemHoverBg:oe,colorItemBgActive:Ye,itemActiveBg:qe,colorSubItemBg:ye,subMenuItemBg:ye,colorItemBgSelected:qe,itemSelectedBg:qe,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Ae,activeBarHeight:Ae,colorActiveBarBorderSize:ce,activeBarBorderWidth:ce,colorItemTextDisabled:O,itemDisabledColor:O,colorDangerItemText:fe,dangerItemColor:fe,colorDangerItemTextHover:fe,dangerItemHoverColor:fe,colorDangerItemTextSelected:fe,dangerItemSelectedColor:fe,colorDangerItemBgActive:I,dangerItemActiveBg:I,colorDangerItemBgSelected:I,dangerItemSelectedBg:I,itemMarginInline:d.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:T,groupTitleLineHeight:re,collapsedWidth:T*2,popupBg:$e,itemMarginBlock:Ne,itemPaddingInline:Xe,horizontalLineHeight:`${T*1.15}px`,iconSize:ct,iconMarginInlineEnd:mt-ct,collapsedIconSize:yt,groupTitleFontSize:ct,darkItemDisabledColor:new se.C(Bt).setAlpha(.25).toRgbString(),darkItemColor:_t,darkDangerItemColor:fe,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Bt,darkItemSelectedBg:L,darkDangerItemSelectedBg:fe,darkItemHoverBg:"transparent",darkGroupTitleColor:_t,darkItemHoverColor:Bt,darkDangerItemHoverColor:Ft,darkDangerItemSelectedColor:Bt,darkDangerItemActiveBg:fe}},{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"]]})(h),wt=function(h,g){var y={};for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&g.indexOf(d)<0&&(y[d]=h[d]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,d=Object.getOwnPropertySymbols(h);L<d.length;L++)g.indexOf(d[L])<0&&Object.prototype.propertyIsEnumerable.call(h,d[L])&&(y[d[L]]=h[d[L]]);return y},at=(0,j.forwardRef)((h,g)=>{var y,d;const L=j.useContext(_.Z),fe=L||{},{getPrefixCls:O,getPopupContainer:I,direction:he,menu:Y}=j.useContext(N.E_),U=O(),{prefixCls:ye,className:Ye,style:ce,theme:Ae="light",expandIcon:qe,_internalDisableMenuItemTitleTooltip:oe,inlineCollapsed:T,siderCollapsed:re,items:$e,children:Ne,rootClassName:Xe,mode:ct,selectable:mt,onClick:yt,overflowedIndicatorPopupClassName:Bt}=h,Ft=wt(h,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),_t=(0,Ie.Z)(Ft,["collapsedWidth"]),Yt=Se($e)||Ne;(y=fe.validator)===null||y===void 0||y.call(fe,{mode:ct});const rn=(0,pe.useEvent)(function(){var gr;yt==null||yt.apply(void 0,arguments),(gr=fe.onClick)===null||gr===void 0||gr.call(fe)}),hn=fe.mode||ct,Wt=mt!=null?mt:fe.selectable,on=j.useMemo(()=>re!==void 0?re:T,[T,re]),xn={horizontal:{motionName:`${U}-slide-up`},inline:(0,q.Z)(U),other:{motionName:`${U}-zoom-big`}},Vt=O("menu",ye||fe.prefixCls),[Mn,qn]=Tt(Vt,!L),An=R()(`${Vt}-${Ae}`,Y==null?void 0:Y.className,Ye);let pr;if(typeof qe=="function")pr=qe;else if(qe===null||qe===!1)pr=null;else if(fe.expandIcon===null||fe.expandIcon===!1)pr=null;else{const gr=qe!=null?qe:fe.expandIcon;pr=(0,le.Tm)(gr,{className:R()(`${Vt}-submenu-expand-icon`,(0,le.l$)(gr)?(d=gr.props)===null||d===void 0?void 0:d.className:"")})}const er=j.useMemo(()=>({prefixCls:Vt,inlineCollapsed:on||!1,direction:he,firstLevel:!0,theme:Ae,mode:hn,disableMenuItemTitleTooltip:oe}),[Vt,on,he,oe,Ae]);return Mn(j.createElement(_.Z.Provider,{value:null},j.createElement(ue.Provider,{value:er},j.createElement(K.ZP,Object.assign({getPopupContainer:I,overflowedIndicator:j.createElement(Ce.Z,null),overflowedIndicatorPopupClassName:R()(Vt,`${Vt}-${Ae}`,Bt),mode:hn,selectable:Wt,onClick:rn},_t,{inlineCollapsed:on,style:Object.assign(Object.assign({},Y==null?void 0:Y.style),ce),className:An,prefixCls:Vt,direction:he,defaultMotions:xn,expandIcon:pr,ref:g,rootClassName:R()(Xe,qn)}),Yt))))});const S=(0,j.forwardRef)((h,g)=>{const y=(0,j.useRef)(null),d=j.useContext(A.D);return(0,j.useImperativeHandle)(g,()=>({menu:y.current,focus:L=>{var fe;(fe=y.current)===null||fe===void 0||fe.focus(L)}})),j.createElement(at,Object.assign({ref:y},h,d))});S.Item=_e,S.SubMenu=Ue,S.Divider=F,S.ItemGroup=K.BW;var p=S},58421:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return fe}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(I,he){return j.createElement(R.Z,(0,K.Z)({},I,{ref:he,icon:xe}))},x=j.forwardRef(N),E=x,F=m(49198),V=m(33853),Ie=m(38819),G=m(92310),le=m.n(G),ke=m(20068),ue=m(33885),de=m(67732),_e=m(83652),Pe=m(42403),Ue=m(158),Ce=m(26112),pe={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},q=pe,_=m(91735),ie=function(O){(0,Pe.Z)(he,O);var I=(0,Ue.Z)(he);function he(){var Y;(0,de.Z)(this,he);for(var U=arguments.length,ye=new Array(U),Ye=0;Ye<U;Ye++)ye[Ye]=arguments[Ye];return Y=I.call.apply(I,[this].concat(ye)),Y.state={goInputText:""},Y.getValidValue=function(){var ce=Y.state.goInputText;return!ce||Number.isNaN(ce)?void 0:Number(ce)},Y.buildOptionText=function(ce){return"".concat(ce," ").concat(Y.props.locale.items_per_page)},Y.changeSize=function(ce){Y.props.changeSize(Number(ce))},Y.handleChange=function(ce){Y.setState({goInputText:ce.target.value})},Y.handleBlur=function(ce){var Ae=Y.props,qe=Ae.goButton,oe=Ae.quickGo,T=Ae.rootPrefixCls,re=Y.state.goInputText;qe||re===""||(Y.setState({goInputText:""}),!(ce.relatedTarget&&(ce.relatedTarget.className.indexOf("".concat(T,"-item-link"))>=0||ce.relatedTarget.className.indexOf("".concat(T,"-item"))>=0))&&oe(Y.getValidValue()))},Y.go=function(ce){var Ae=Y.state.goInputText;Ae!==""&&(ce.keyCode===q.ENTER||ce.type==="click")&&(Y.setState({goInputText:""}),Y.props.quickGo(Y.getValidValue()))},Y}return(0,_e.Z)(he,[{key:"getPageSizeOptions",value:function(){var U=this.props,ye=U.pageSize,Ye=U.pageSizeOptions;return Ye.some(function(ce){return ce.toString()===ye.toString()})?Ye:Ye.concat([ye.toString()]).sort(function(ce,Ae){var qe=Number.isNaN(Number(ce))?0:Number(ce),oe=Number.isNaN(Number(Ae))?0:Number(Ae);return qe-oe})}},{key:"render",value:function(){var U=this,ye=this.props,Ye=ye.pageSize,ce=ye.locale,Ae=ye.rootPrefixCls,qe=ye.changeSize,oe=ye.quickGo,T=ye.goButton,re=ye.selectComponentClass,$e=ye.buildOptionText,Ne=ye.selectPrefixCls,Xe=ye.disabled,ct=this.state.goInputText,mt="".concat(Ae,"-options"),yt=re,Bt=null,Ft=null,_t=null;if(!qe&&!oe)return null;var Yt=this.getPageSizeOptions();if(qe&&yt){var rn=Yt.map(function(hn,Wt){return j.createElement(yt.Option,{key:Wt,value:hn.toString()},($e||U.buildOptionText)(hn))});Bt=j.createElement(yt,{disabled:Xe,prefixCls:Ne,showSearch:!1,className:"".concat(mt,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(Ye||Yt[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Wt){return Wt.parentNode},"aria-label":ce.page_size,defaultOpen:!1},rn)}return oe&&(T&&(_t=typeof T=="boolean"?j.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Xe,className:"".concat(mt,"-quick-jumper-button")},ce.jump_to_confirm):j.createElement("span",{onClick:this.go,onKeyUp:this.go},T)),Ft=j.createElement("div",{className:"".concat(mt,"-quick-jumper")},ce.jump_to,j.createElement("input",{disabled:Xe,type:"text",value:ct,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":ce.page}),ce.page,_t)),j.createElement("li",{className:"".concat(mt)},Bt,Ft)}}]),he}(j.Component);ie.defaultProps={pageSizeOptions:["10","20","50","100"]};var ae=ie,Se=function(I){var he,Y=I.rootPrefixCls,U=I.page,ye=I.active,Ye=I.className,ce=I.showTitle,Ae=I.onClick,qe=I.onKeyPress,oe=I.itemRender,T="".concat(Y,"-item"),re=le()(T,"".concat(T,"-").concat(U),(he={},(0,ke.Z)(he,"".concat(T,"-active"),ye),(0,ke.Z)(he,"".concat(T,"-disabled"),!U),(0,ke.Z)(he,I.className,Ye),he)),$e=function(){Ae(U)},Ne=function(mt){qe(mt,Ae,U)},Xe=oe(U,"page",j.createElement("a",{rel:"nofollow"},U));return Xe?j.createElement("li",{title:ce?U.toString():null,className:re,onClick:$e,onKeyPress:Ne,tabIndex:0},Xe):null},se=Se;function be(){}function D(O){var I=Number(O);return typeof I=="number"&&!Number.isNaN(I)&&isFinite(I)&&Math.floor(I)===I}var Le=function(I,he,Y){return Y};function z(O,I,he){var Y=typeof O=="undefined"?I.pageSize:O;return Math.floor((he.total-1)/Y)+1}var we=function(O){(0,Pe.Z)(he,O);var I=(0,Ue.Z)(he);function he(Y){var U;(0,de.Z)(this,he),U=I.call(this,Y),U.paginationNode=j.createRef(),U.getJumpPrevPage=function(){return Math.max(1,U.state.current-(U.props.showLessItems?3:5))},U.getJumpNextPage=function(){return Math.min(z(void 0,U.state,U.props),U.state.current+(U.props.showLessItems?3:5))},U.getItemIcon=function(qe,oe){var T=U.props.prefixCls,re=qe||j.createElement("button",{type:"button","aria-label":oe,className:"".concat(T,"-item-link")});return typeof qe=="function"&&(re=j.createElement(qe,(0,ue.Z)({},U.props))),re},U.isValid=function(qe){var oe=U.props.total;return D(qe)&&qe!==U.state.current&&D(oe)&&oe>0},U.shouldDisplayQuickJumper=function(){var qe=U.props,oe=qe.showQuickJumper,T=qe.total,re=U.state.pageSize;return T<=re?!1:oe},U.handleKeyDown=function(qe){(qe.keyCode===q.ARROW_UP||qe.keyCode===q.ARROW_DOWN)&&qe.preventDefault()},U.handleKeyUp=function(qe){var oe=U.getValidValue(qe),T=U.state.currentInputValue;oe!==T&&U.setState({currentInputValue:oe}),qe.keyCode===q.ENTER?U.handleChange(oe):qe.keyCode===q.ARROW_UP?U.handleChange(oe-1):qe.keyCode===q.ARROW_DOWN&&U.handleChange(oe+1)},U.handleBlur=function(qe){var oe=U.getValidValue(qe);U.handleChange(oe)},U.changePageSize=function(qe){var oe=U.state.current,T=z(qe,U.state,U.props);oe=oe>T?T:oe,T===0&&(oe=U.state.current),typeof qe=="number"&&("pageSize"in U.props||U.setState({pageSize:qe}),"current"in U.props||U.setState({current:oe,currentInputValue:oe})),U.props.onShowSizeChange(oe,qe),"onChange"in U.props&&U.props.onChange&&U.props.onChange(oe,qe)},U.handleChange=function(qe){var oe=U.props,T=oe.disabled,re=oe.onChange,$e=U.state,Ne=$e.pageSize,Xe=$e.current,ct=$e.currentInputValue;if(U.isValid(qe)&&!T){var mt=z(void 0,U.state,U.props),yt=qe;return qe>mt?yt=mt:qe<1&&(yt=1),"current"in U.props||U.setState({current:yt}),yt!==ct&&U.setState({currentInputValue:yt}),re(yt,Ne),yt}return Xe},U.prev=function(){U.hasPrev()&&U.handleChange(U.state.current-1)},U.next=function(){U.hasNext()&&U.handleChange(U.state.current+1)},U.jumpPrev=function(){U.handleChange(U.getJumpPrevPage())},U.jumpNext=function(){U.handleChange(U.getJumpNextPage())},U.hasPrev=function(){return U.state.current>1},U.hasNext=function(){return U.state.current<z(void 0,U.state,U.props)},U.runIfEnter=function(qe,oe){if(qe.key==="Enter"||qe.charCode===13){for(var T=arguments.length,re=new Array(T>2?T-2:0),$e=2;$e<T;$e++)re[$e-2]=arguments[$e];oe.apply(void 0,re)}},U.runIfEnterPrev=function(qe){U.runIfEnter(qe,U.prev)},U.runIfEnterNext=function(qe){U.runIfEnter(qe,U.next)},U.runIfEnterJumpPrev=function(qe){U.runIfEnter(qe,U.jumpPrev)},U.runIfEnterJumpNext=function(qe){U.runIfEnter(qe,U.jumpNext)},U.handleGoTO=function(qe){(qe.keyCode===q.ENTER||qe.type==="click")&&U.handleChange(U.state.currentInputValue)},U.renderPrev=function(qe){var oe=U.props,T=oe.prevIcon,re=oe.itemRender,$e=re(qe,"prev",U.getItemIcon(T,"prev page")),Ne=!U.hasPrev();return(0,j.isValidElement)($e)?(0,j.cloneElement)($e,{disabled:Ne}):$e},U.renderNext=function(qe){var oe=U.props,T=oe.nextIcon,re=oe.itemRender,$e=re(qe,"next",U.getItemIcon(T,"next page")),Ne=!U.hasNext();return(0,j.isValidElement)($e)?(0,j.cloneElement)($e,{disabled:Ne}):$e};var ye=Y.onChange!==be,Ye="current"in Y;Ye&&!ye&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var ce=Y.defaultCurrent;"current"in Y&&(ce=Y.current);var Ae=Y.defaultPageSize;return"pageSize"in Y&&(Ae=Y.pageSize),ce=Math.min(ce,z(Ae,void 0,Y)),U.state={current:ce,currentInputValue:ce,pageSize:Ae},U}return(0,_e.Z)(he,[{key:"componentDidUpdate",value:function(U,ye){var Ye=this.props.prefixCls;if(ye.current!==this.state.current&&this.paginationNode.current){var ce=this.paginationNode.current.querySelector(".".concat(Ye,"-item-").concat(ye.current));if(ce&&document.activeElement===ce){var Ae;ce==null||(Ae=ce.blur)===null||Ae===void 0||Ae.call(ce)}}}},{key:"getValidValue",value:function(U){var ye=U.target.value,Ye=z(void 0,this.state,this.props),ce=this.state.currentInputValue,Ae;return ye===""?Ae=ye:Number.isNaN(Number(ye))?Ae=ce:ye>=Ye?Ae=Ye:Ae=Number(ye),Ae}},{key:"getShowSizeChanger",value:function(){var U=this.props,ye=U.showSizeChanger,Ye=U.total,ce=U.totalBoundaryShowSizeChanger;return typeof ye!="undefined"?ye:Ye>ce}},{key:"render",value:function(){var U=this.props,ye=U.prefixCls,Ye=U.className,ce=U.style,Ae=U.disabled,qe=U.hideOnSinglePage,oe=U.total,T=U.locale,re=U.showQuickJumper,$e=U.showLessItems,Ne=U.showTitle,Xe=U.showTotal,ct=U.simple,mt=U.itemRender,yt=U.showPrevNextJumpers,Bt=U.jumpPrevIcon,Ft=U.jumpNextIcon,_t=U.selectComponentClass,Yt=U.selectPrefixCls,rn=U.pageSizeOptions,hn=this.state,Wt=hn.current,on=hn.pageSize,xn=hn.currentInputValue;if(qe===!0&&oe<=on)return null;var Vt=z(void 0,this.state,this.props),Mn=[],qn=null,An=null,pr=null,er=null,gr=null,$r=re&&re.goButton,Rn=$e?1:2,pn=Wt-1>0?Wt-1:0,tr=Wt+1<Vt?Wt+1:Vt,Ke=(0,Ce.Z)(this.props,{aria:!0,data:!0}),H=Xe&&j.createElement("li",{className:"".concat(ye,"-total-text")},Xe(oe,[oe===0?0:(Wt-1)*on+1,Wt*on>oe?oe:Wt*on]));if(ct){$r&&(typeof $r=="boolean"?gr=j.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},T.jump_to_confirm):gr=j.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},$r),gr=j.createElement("li",{title:Ne?"".concat(T.jump_to).concat(Wt,"/").concat(Vt):null,className:"".concat(ye,"-simple-pager")},gr));var ee=this.renderPrev(pn);return j.createElement("ul",(0,K.Z)({className:le()(ye,"".concat(ye,"-simple"),(0,ke.Z)({},"".concat(ye,"-disabled"),Ae),Ye),style:ce,ref:this.paginationNode},Ke),H,ee?j.createElement("li",{title:Ne?T.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:le()("".concat(ye,"-prev"),(0,ke.Z)({},"".concat(ye,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},ee):null,j.createElement("li",{title:Ne?"".concat(Wt,"/").concat(Vt):null,className:"".concat(ye,"-simple-pager")},j.createElement("input",{type:"text",value:xn,disabled:Ae,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),j.createElement("span",{className:"".concat(ye,"-slash")},"/"),Vt),j.createElement("li",{title:Ne?T.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:le()("".concat(ye,"-next"),(0,ke.Z)({},"".concat(ye,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(tr)),gr)}if(Vt<=3+Rn*2){var Q={locale:T,rootPrefixCls:ye,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Ne,itemRender:mt};Vt||Mn.push(j.createElement(se,(0,K.Z)({},Q,{key:"noPager",page:1,className:"".concat(ye,"-item-disabled")})));for(var J=1;J<=Vt;J+=1){var Ee=Wt===J;Mn.push(j.createElement(se,(0,K.Z)({},Q,{key:J,page:J,active:Ee})))}}else{var Ze=$e?T.prev_3:T.prev_5,ft=$e?T.next_3:T.next_5,tt=mt(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Bt,"prev page")),ut=mt(this.getJumpNextPage(),"jump-next",this.getItemIcon(Ft,"next page"));yt&&(qn=tt?j.createElement("li",{title:Ne?Ze:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:le()("".concat(ye,"-jump-prev"),(0,ke.Z)({},"".concat(ye,"-jump-prev-custom-icon"),!!Bt))},tt):null,An=ut?j.createElement("li",{title:Ne?ft:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:le()("".concat(ye,"-jump-next"),(0,ke.Z)({},"".concat(ye,"-jump-next-custom-icon"),!!Ft))},ut):null),er=j.createElement(se,{locale:T,last:!0,rootPrefixCls:ye,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Vt,page:Vt,active:!1,showTitle:Ne,itemRender:mt}),pr=j.createElement(se,{locale:T,rootPrefixCls:ye,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Ne,itemRender:mt});var It=Math.max(1,Wt-Rn),Pt=Math.min(Wt+Rn,Vt);Wt-1<=Rn&&(Pt=1+Rn*2),Vt-Wt<=Rn&&(It=Vt-Rn*2);for(var At=It;At<=Pt;At+=1){var Ge=Wt===At;Mn.push(j.createElement(se,{locale:T,rootPrefixCls:ye,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:At,page:At,active:Ge,showTitle:Ne,itemRender:mt}))}Wt-1>=Rn*2&&Wt!==3&&(Mn[0]=(0,j.cloneElement)(Mn[0],{className:"".concat(ye,"-item-after-jump-prev")}),Mn.unshift(qn)),Vt-Wt>=Rn*2&&Wt!==Vt-2&&(Mn[Mn.length-1]=(0,j.cloneElement)(Mn[Mn.length-1],{className:"".concat(ye,"-item-before-jump-next")}),Mn.push(An)),It!==1&&Mn.unshift(pr),Pt!==Vt&&Mn.push(er)}var St=!this.hasPrev()||!Vt,Qt=!this.hasNext()||!Vt,Kt=this.renderPrev(pn),tn=this.renderNext(tr);return j.createElement("ul",(0,K.Z)({className:le()(ye,Ye,(0,ke.Z)({},"".concat(ye,"-disabled"),Ae)),style:ce,ref:this.paginationNode},Ke),H,Kt?j.createElement("li",{title:Ne?T.prev_page:null,onClick:this.prev,tabIndex:St?null:0,onKeyPress:this.runIfEnterPrev,className:le()("".concat(ye,"-prev"),(0,ke.Z)({},"".concat(ye,"-disabled"),St)),"aria-disabled":St},Kt):null,Mn,tn?j.createElement("li",{title:Ne?T.next_page:null,onClick:this.next,tabIndex:Qt?null:0,onKeyPress:this.runIfEnterNext,className:le()("".concat(ye,"-next"),(0,ke.Z)({},"".concat(ye,"-disabled"),Qt)),"aria-disabled":Qt},tn):null,j.createElement(ae,{disabled:Ae,locale:T,rootPrefixCls:ye,selectComponentClass:_t,selectPrefixCls:Yt,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Wt,pageSize:on,pageSizeOptions:rn,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:$r}))}}],[{key:"getDerivedStateFromProps",value:function(U,ye){var Ye={};if("current"in U&&(Ye.current=U.current,U.current!==ye.current&&(Ye.currentInputValue=Ye.current)),"pageSize"in U&&U.pageSize!==ye.pageSize){var ce=ye.current,Ae=z(U.pageSize,ye,U);ce=ce>Ae?Ae:ce,"current"in U||(Ye.current=ce,Ye.currentInputValue=ce),Ye.pageSize=U.pageSize}return Ye}}]),he}(j.Component);we.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:be,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:be,locale:_.Z,style:{},itemRender:Le,totalBoundaryShowSizeChanger:50};var ge=we,Te=m(22075),Fe=m(36355),Re=m(19716),X=m(8628),w=m(9763),ve=m(57809);const Qe=O=>j.createElement(ve.default,Object.assign({},O,{showSearch:!0,size:"small"})),je=O=>j.createElement(ve.default,Object.assign({},O,{showSearch:!0,size:"middle"}));Qe.Option=ve.default.Option,je.Option=ve.default.Option;var Be=m(9937),Oe=m(17313),lt=m(83116),$t=m(37613);const vt=O=>{const{componentCls:I}=O;return{[`${I}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${I}-item-link`]:{color:O.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${I}-item-link`]:{color:O.colorTextDisabled,cursor:"not-allowed"}}},[`&${I}-disabled`]:{cursor:"not-allowed",[`${I}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:O.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:O.colorBorder,backgroundColor:O.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:O.itemActiveBgDisabled},a:{color:O.itemActiveColorDisabled}}},[`${I}-item-link`]:{color:O.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${I}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${I}-simple-pager`]:{color:O.colorTextDisabled},[`${I}-jump-prev, ${I}-jump-next`]:{[`${I}-item-link-icon`]:{opacity:0},[`${I}-item-ellipsis`]:{opacity:1}}},[`&${I}-simple`]:{[`${I}-prev, ${I}-next`]:{[`&${I}-disabled ${I}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},Tt=O=>{const{componentCls:I}=O;return{[`&${I}-mini ${I}-total-text, &${I}-mini ${I}-simple-pager`]:{height:O.itemSizeSM,lineHeight:`${O.itemSizeSM}px`},[`&${I}-mini ${I}-item`]:{minWidth:O.itemSizeSM,height:O.itemSizeSM,margin:0,lineHeight:`${O.itemSizeSM-2}px`},[`&${I}-mini:not(${I}-disabled) ${I}-item:not(${I}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:O.colorBgTextHover},"&:active":{backgroundColor:O.colorBgTextActive}},[`&${I}-mini ${I}-prev, &${I}-mini ${I}-next`]:{minWidth:O.itemSizeSM,height:O.itemSizeSM,margin:0,lineHeight:`${O.itemSizeSM}px`},[`&${I}-mini:not(${I}-disabled)`]:{[`${I}-prev, ${I}-next`]:{[`&:hover ${I}-item-link`]:{backgroundColor:O.colorBgTextHover},[`&:active ${I}-item-link`]:{backgroundColor:O.colorBgTextActive},[`&${I}-disabled:hover ${I}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${I}-mini ${I}-prev ${I}-item-link,
|
|
|
&${I}-mini ${I}-next ${I}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:O.itemSizeSM,lineHeight:`${O.itemSizeSM}px`}},[`&${I}-mini ${I}-jump-prev, &${I}-mini ${I}-jump-next`]:{height:O.itemSizeSM,marginInlineEnd:0,lineHeight:`${O.itemSizeSM}px`},[`&${I}-mini ${I}-options`]:{marginInlineStart:O.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:O.miniOptionsSizeChangerTop},"&-quick-jumper":{height:O.itemSizeSM,lineHeight:`${O.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,Be.x0)(O)),{width:O.paginationMiniQuickJumperInputWidth,height:O.controlHeightSM})}}}},wt=O=>{const{componentCls:I}=O;return{[`
|
|
|
&${I}-simple ${I}-prev,
|
|
|
&${I}-simple ${I}-next
|
|
|
`]:{height:O.itemSizeSM,lineHeight:`${O.itemSizeSM}px`,verticalAlign:"top",[`${I}-item-link`]:{height:O.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:O.colorBgTextHover},"&:active":{backgroundColor:O.colorBgTextActive},"&::after":{height:O.itemSizeSM,lineHeight:`${O.itemSizeSM}px`}}},[`&${I}-simple ${I}-simple-pager`]:{display:"inline-block",height:O.itemSizeSM,marginInlineEnd:O.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:O.marginXS,padding:`0 ${O.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:O.itemInputBg,border:`${O.lineWidth}px ${O.lineType} ${O.colorBorder}`,borderRadius:O.borderRadius,outline:"none",transition:`border-color ${O.motionDurationMid}`,color:"inherit","&:hover":{borderColor:O.colorPrimary},"&:focus":{borderColor:O.colorPrimaryHover,boxShadow:`${O.inputOutlineOffset}px 0 ${O.controlOutlineWidth}px ${O.controlOutline}`},"&[disabled]":{color:O.colorTextDisabled,backgroundColor:O.colorBgContainerDisabled,borderColor:O.colorBorder,cursor:"not-allowed"}}}}},pt=O=>{const{componentCls:I}=O;return{[`${I}-jump-prev, ${I}-jump-next`]:{outline:0,[`${I}-item-container`]:{position:"relative",[`${I}-item-link-icon`]:{color:O.colorPrimary,fontSize:O.fontSizeSM,opacity:0,transition:`all ${O.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${I}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:O.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:O.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:O.paginationEllipsisTextIndent,opacity:1,transition:`all ${O.motionDurationMid}`}},"&:hover":{[`${I}-item-link-icon`]:{opacity:1},[`${I}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${I}-prev,
|
|
|
${I}-jump-prev,
|
|
|
${I}-jump-next
|
|
|
`]:{marginInlineEnd:O.marginXS},[`
|
|
|
${I}-prev,
|
|
|
${I}-next,
|
|
|
${I}-jump-prev,
|
|
|
${I}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:O.itemSize,height:O.itemSize,color:O.colorText,fontFamily:O.fontFamily,lineHeight:`${O.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:O.borderRadius,cursor:"pointer",transition:`all ${O.motionDurationMid}`},[`${I}-prev, ${I}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:O.colorText,cursor:"pointer",userSelect:"none"},[`${I}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:O.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${O.lineWidth}px ${O.lineType} transparent`,borderRadius:O.borderRadius,outline:"none",transition:`all ${O.motionDurationMid}`},[`&:hover ${I}-item-link`]:{backgroundColor:O.colorBgTextHover},[`&:active ${I}-item-link`]:{backgroundColor:O.colorBgTextActive},[`&${I}-disabled:hover`]:{[`${I}-item-link`]:{backgroundColor:"transparent"}}},[`${I}-slash`]:{marginInlineEnd:O.paginationSlashMarginInlineEnd,marginInlineStart:O.paginationSlashMarginInlineStart},[`${I}-options`]:{display:"inline-block",marginInlineStart:O.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:O.controlHeight,marginInlineStart:O.marginXS,lineHeight:`${O.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,Be.ik)(O)),{width:O.controlHeightLG*1.25,height:O.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:O.marginXS,marginInlineEnd:O.marginXS})}}}},at=O=>{const{componentCls:I}=O;return{[`${I}-item`]:{display:"inline-block",minWidth:O.itemSize,height:O.itemSize,marginInlineEnd:O.marginXS,fontFamily:O.fontFamily,lineHeight:`${O.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${O.lineWidth}px ${O.lineType} transparent`,borderRadius:O.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${O.paginationItemPaddingInline}px`,color:O.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${I}-item-active)`]:{"&:hover":{transition:`all ${O.motionDurationMid}`,backgroundColor:O.colorBgTextHover},"&:active":{backgroundColor:O.colorBgTextActive}},"&-active":{fontWeight:O.fontWeightStrong,backgroundColor:O.itemActiveBg,borderColor:O.colorPrimary,a:{color:O.colorPrimary},"&:hover":{borderColor:O.colorPrimaryHover},"&:hover a":{color:O.colorPrimaryHover}}}}},S=O=>{const{componentCls:I}=O;return{[I]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Oe.Wf)(O)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${I}-total-text`]:{display:"inline-block",height:O.itemSize,marginInlineEnd:O.marginXS,lineHeight:`${O.itemSize-2}px`,verticalAlign:"middle"}}),at(O)),pt(O)),wt(O)),Tt(O)),vt(O)),{[`@media only screen and (max-width: ${O.screenLG}px)`]:{[`${I}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${O.screenSM}px)`]:{[`${I}-options`]:{display:"none"}}}),[`&${O.componentCls}-rtl`]:{direction:"rtl"}}},p=O=>{const{componentCls:I}=O;return{[`${I}${I}-disabled:not(${I}-mini)`]:{"&, &:hover":{[`${I}-item-link`]:{borderColor:O.colorBorder}},"&:focus-visible":{[`${I}-item-link`]:{borderColor:O.colorBorder}},[`${I}-item, ${I}-item-link`]:{backgroundColor:O.colorBgContainerDisabled,borderColor:O.colorBorder,[`&:hover:not(${I}-item-active)`]:{backgroundColor:O.colorBgContainerDisabled,borderColor:O.colorBorder,a:{color:O.colorTextDisabled}},[`&${I}-item-active`]:{backgroundColor:O.itemActiveBgDisabled}},[`${I}-prev, ${I}-next`]:{"&:hover button":{backgroundColor:O.colorBgContainerDisabled,borderColor:O.colorBorder,color:O.colorTextDisabled},[`${I}-item-link`]:{backgroundColor:O.colorBgContainerDisabled,borderColor:O.colorBorder}}},[`${I}:not(${I}-mini)`]:{[`${I}-prev, ${I}-next`]:{"&:hover button":{borderColor:O.colorPrimaryHover,backgroundColor:O.itemBg},[`${I}-item-link`]:{backgroundColor:O.itemLinkBg,borderColor:O.colorBorder},[`&:hover ${I}-item-link`]:{borderColor:O.colorPrimary,backgroundColor:O.itemBg,color:O.colorPrimary},[`&${I}-disabled`]:{[`${I}-item-link`]:{borderColor:O.colorBorder,color:O.colorTextDisabled}}},[`${I}-item`]:{backgroundColor:O.itemBg,border:`${O.lineWidth}px ${O.lineType} ${O.colorBorder}`,[`&:hover:not(${I}-item-active)`]:{borderColor:O.colorPrimary,backgroundColor:O.itemBg,a:{color:O.colorPrimary}},"&-active":{borderColor:O.colorPrimary}}}}},h=O=>{const{componentCls:I}=O;return{[`${I}:not(${I}-disabled)`]:{[`${I}-item`]:Object.assign({},(0,Oe.Qy)(O)),[`${I}-jump-prev, ${I}-jump-next`]:{"&:focus-visible":Object.assign({[`${I}-item-link-icon`]:{opacity:1},[`${I}-item-ellipsis`]:{opacity:0}},(0,Oe.oN)(O))},[`${I}-prev, ${I}-next`]:{[`&:focus-visible ${I}-item-link`]:Object.assign({},(0,Oe.oN)(O))}}}};var g=(0,lt.Z)("Pagination",O=>{const I=(0,$t.TS)(O,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:O.marginXXS/2,paginationMiniQuickJumperInputWidth:O.controlHeightLG*1.1,paginationItemPaddingInline:O.marginXXS*1.5,paginationEllipsisLetterSpacing:O.marginXXS/2,paginationSlashMarginInlineStart:O.marginXXS,paginationSlashMarginInlineEnd:O.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,Be.e5)(O),(0,Be.TM)(O));return[S(I),h(I),O.wireframe&&p(I)]},O=>({itemBg:O.colorBgContainer,itemSize:O.controlHeight,itemSizeSM:O.controlHeightSM,itemActiveBg:O.colorBgContainer,itemLinkBg:O.colorBgContainer,itemActiveColorDisabled:O.colorTextDisabled,itemActiveBgDisabled:O.controlItemBgActiveDisabled,itemInputBg:O.colorBgContainer,miniOptionsSizeChangerTop:0})),y=function(O,I){var he={};for(var Y in O)Object.prototype.hasOwnProperty.call(O,Y)&&I.indexOf(Y)<0&&(he[Y]=O[Y]);if(O!=null&&typeof Object.getOwnPropertySymbols=="function")for(var U=0,Y=Object.getOwnPropertySymbols(O);U<Y.length;U++)I.indexOf(Y[U])<0&&Object.prototype.propertyIsEnumerable.call(O,Y[U])&&(he[Y[U]]=O[Y[U]]);return he},L=O=>{const{prefixCls:I,selectPrefixCls:he,className:Y,rootClassName:U,style:ye,size:Ye,locale:ce,selectComponentClass:Ae,responsive:qe,showSizeChanger:oe}=O,T=y(O,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:re}=(0,X.Z)(qe),{getPrefixCls:$e,direction:Ne,pagination:Xe={}}=j.useContext(Fe.E_),ct=$e("pagination",I),[mt,yt]=g(ct),Bt=oe!=null?oe:Xe.showSizeChanger,Ft=j.useMemo(()=>{const Vt=j.createElement("span",{className:`${ct}-item-ellipsis`},"\u2022\u2022\u2022"),Mn=j.createElement("button",{className:`${ct}-item-link`,type:"button",tabIndex:-1},Ne==="rtl"?j.createElement(Ie.Z,null):j.createElement(V.Z,null)),qn=j.createElement("button",{className:`${ct}-item-link`,type:"button",tabIndex:-1},Ne==="rtl"?j.createElement(V.Z,null):j.createElement(Ie.Z,null)),An=j.createElement("a",{className:`${ct}-item-link`},j.createElement("div",{className:`${ct}-item-container`},Ne==="rtl"?j.createElement(F.Z,{className:`${ct}-item-link-icon`}):j.createElement(E,{className:`${ct}-item-link-icon`}),Vt)),pr=j.createElement("a",{className:`${ct}-item-link`},j.createElement("div",{className:`${ct}-item-container`},Ne==="rtl"?j.createElement(E,{className:`${ct}-item-link-icon`}):j.createElement(F.Z,{className:`${ct}-item-link-icon`}),Vt));return{prevIcon:Mn,nextIcon:qn,jumpPrevIcon:An,jumpNextIcon:pr}},[Ne,ct]),[_t]=(0,w.Z)("Pagination",Te.Z),Yt=Object.assign(Object.assign({},_t),ce),rn=(0,Re.Z)(Ye),hn=rn==="small"||!!(re&&!rn&&qe),Wt=$e("select",he),on=le()({[`${ct}-mini`]:hn,[`${ct}-rtl`]:Ne==="rtl"},Xe==null?void 0:Xe.className,Y,U,yt),xn=Object.assign(Object.assign({},Xe==null?void 0:Xe.style),ye);return mt(j.createElement(ge,Object.assign({},Ft,T,{style:xn,prefixCls:ct,selectPrefixCls:Wt,className:on,selectComponentClass:Ae||(hn?Qe:je),locale:Yt,showSizeChanger:Bt})))},fe=L},93948:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return oe}});var K=m(59301),j=m(29679),A=m(40001),xe=m(19248),R=m(99267),N=m(92310),x=m.n(N),E=m(2738),F=m(36355),V=m(54476),Ie=m(33885),G=m(75931),le={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},ke=function(){var re=(0,K.useRef)([]),$e=(0,K.useRef)(null);return(0,K.useEffect)(function(){var Ne=Date.now(),Xe=!1;re.current.forEach(function(ct){if(ct){Xe=!0;var mt=ct.style;mt.transitionDuration=".3s, .3s, .3s, .06s",$e.current&&Ne-$e.current<100&&(mt.transitionDuration="0s, 0s")}}),Xe&&($e.current=Date.now())}),re.current},ue=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],de=function(re){var $e=(0,Ie.Z)((0,Ie.Z)({},le),re),Ne=$e.className,Xe=$e.percent,ct=$e.prefixCls,mt=$e.strokeColor,yt=$e.strokeLinecap,Bt=$e.strokeWidth,Ft=$e.style,_t=$e.trailColor,Yt=$e.trailWidth,rn=$e.transition,hn=(0,G.Z)($e,ue);delete hn.gapPosition;var Wt=Array.isArray(Xe)?Xe:[Xe],on=Array.isArray(mt)?mt:[mt],xn=ke(),Vt=Bt/2,Mn=100-Bt/2,qn="M ".concat(yt==="round"?Vt:0,",").concat(Vt,`
|
|
|
L `).concat(yt==="round"?Mn:100,",").concat(Vt),An="0 0 100 ".concat(Bt),pr=0;return K.createElement("svg",(0,V.Z)({className:x()("".concat(ct,"-line"),Ne),viewBox:An,preserveAspectRatio:"none",style:Ft},hn),K.createElement("path",{className:"".concat(ct,"-line-trail"),d:qn,strokeLinecap:yt,stroke:_t,strokeWidth:Yt||Bt,fillOpacity:"0"}),Wt.map(function(er,gr){var $r=1;switch(yt){case"round":$r=1-Bt/100;break;case"square":$r=1-Bt/2/100;break;default:$r=1;break}var Rn={strokeDasharray:"".concat(er*$r,"px, 100px"),strokeDashoffset:"-".concat(pr,"px"),transition:rn||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},pn=on[gr]||on[on.length-1];return pr+=er,K.createElement("path",{key:gr,className:"".concat(ct,"-line-path"),d:qn,strokeLinecap:yt,stroke:pn,strokeWidth:Bt,fillOpacity:"0",ref:function(Ke){xn[gr]=Ke},style:Rn})}))},_e=de,Pe=m(76190),Ue=m(42978),Ce=m(47273),pe=0,q=(0,Ce.Z)();function _(){var T;return q?(T=pe,pe+=1):T="TEST_OR_SSR",T}var ie=function(T){var re=K.useState(),$e=(0,Ue.Z)(re,2),Ne=$e[0],Xe=$e[1];return K.useEffect(function(){Xe("rc_progress_".concat(_()))},[]),T||Ne},ae=function(re){var $e=re.bg,Ne=re.children;return K.createElement("div",{style:{width:"100%",height:"100%",background:$e}},Ne)};function Se(T,re){return Object.keys(T).map(function($e){var Ne=parseFloat($e),Xe="".concat(Math.floor(Ne*re),"%");return"".concat(T[$e]," ").concat(Xe)})}var se=K.forwardRef(function(T,re){var $e=T.prefixCls,Ne=T.color,Xe=T.gradientId,ct=T.radius,mt=T.style,yt=T.ptg,Bt=T.strokeLinecap,Ft=T.strokeWidth,_t=T.size,Yt=T.gapDegree,rn=Ne&&(0,Pe.Z)(Ne)==="object",hn=rn?"#FFF":void 0,Wt=_t/2,on=K.createElement("circle",{className:"".concat($e,"-circle-path"),r:ct,cx:Wt,cy:Wt,stroke:hn,strokeLinecap:Bt,strokeWidth:Ft,opacity:yt===0?0:1,style:mt,ref:re});if(!rn)return on;var xn="".concat(Xe,"-conic"),Vt=Yt?"".concat(180+Yt/2,"deg"):"0deg",Mn=Se(Ne,(360-Yt)/360),qn=Se(Ne,1),An="conic-gradient(from ".concat(Vt,", ").concat(Mn.join(", "),")"),pr="linear-gradient(to ".concat(Yt?"bottom":"top",", ").concat(qn.join(", "),")");return K.createElement(K.Fragment,null,K.createElement("mask",{id:xn},on),K.createElement("foreignObject",{x:0,y:0,width:_t,height:_t,mask:"url(#".concat(xn,")")},K.createElement(ae,{bg:pr},K.createElement(ae,{bg:An}))))}),be=se,D=100,Le=function(re,$e,Ne,Xe,ct,mt,yt,Bt,Ft,_t){var Yt=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,rn=Ne/100*360*((360-mt)/360),hn=mt===0?0:{bottom:0,top:180,left:90,right:-90}[yt],Wt=(100-Xe)/100*$e;Ft==="round"&&Xe!==100&&(Wt+=_t/2,Wt>=$e&&(Wt=$e-.01));var on=D/2;return{stroke:typeof Bt=="string"?Bt:void 0,strokeDasharray:"".concat($e,"px ").concat(re),strokeDashoffset:Wt+Yt,transform:"rotate(".concat(ct+rn+hn,"deg)"),transformOrigin:"".concat(on,"px ").concat(on,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},z=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function we(T){var re=T!=null?T:[];return Array.isArray(re)?re:[re]}var ge=function(re){var $e=(0,Ie.Z)((0,Ie.Z)({},le),re),Ne=$e.id,Xe=$e.prefixCls,ct=$e.steps,mt=$e.strokeWidth,yt=$e.trailWidth,Bt=$e.gapDegree,Ft=Bt===void 0?0:Bt,_t=$e.gapPosition,Yt=$e.trailColor,rn=$e.strokeLinecap,hn=$e.style,Wt=$e.className,on=$e.strokeColor,xn=$e.percent,Vt=(0,G.Z)($e,z),Mn=D/2,qn=ie(Ne),An="".concat(qn,"-gradient"),pr=Mn-mt/2,er=Math.PI*2*pr,gr=Ft>0?90+Ft/2:-90,$r=er*((360-Ft)/360),Rn=(0,Pe.Z)(ct)==="object"?ct:{count:ct,space:2},pn=Rn.count,tr=Rn.space,Ke=we(xn),H=we(on),ee=H.find(function(ut){return ut&&(0,Pe.Z)(ut)==="object"}),Q=ee&&(0,Pe.Z)(ee)==="object",J=Q?"butt":rn,Ee=Le(er,$r,0,100,gr,Ft,_t,Yt,J,mt),Ze=ke(),ft=function(){var It=0;return Ke.map(function(Pt,At){var Ge=H[At]||H[H.length-1],St=Le(er,$r,It,Pt,gr,Ft,_t,Ge,J,mt);return It+=Pt,K.createElement(be,{key:At,color:Ge,ptg:Pt,radius:pr,prefixCls:Xe,gradientId:An,style:St,strokeLinecap:J,strokeWidth:mt,gapDegree:Ft,ref:function(Kt){Ze[At]=Kt},size:D})}).reverse()},tt=function(){var It=Math.round(pn*(Ke[0]/100)),Pt=100/pn,At=0;return new Array(pn).fill(null).map(function(Ge,St){var Qt=St<=It-1?H[0]:Yt,Kt=Qt&&(0,Pe.Z)(Qt)==="object"?"url(#".concat(An,")"):void 0,tn=Le(er,$r,At,Pt,gr,Ft,_t,Qt,"butt",mt,tr);return At+=($r-tn.strokeDashoffset+tr)*100/$r,K.createElement("circle",{key:St,className:"".concat(Xe,"-circle-path"),r:pr,cx:Mn,cy:Mn,stroke:Kt,strokeWidth:mt,opacity:1,style:tn,ref:function(Sn){Ze[St]=Sn}})})};return K.createElement("svg",(0,V.Z)({className:x()("".concat(Xe,"-circle"),Wt),viewBox:"0 0 ".concat(D," ").concat(D),style:hn,id:Ne,role:"presentation"},Vt),!pn&&K.createElement("circle",{className:"".concat(Xe,"-circle-trail"),r:pr,cx:Mn,cy:Mn,stroke:Yt,strokeLinecap:J,strokeWidth:yt||mt,style:Ee}),pn?tt():ft())},Te=ge,Fe={Line:_e,Circle:Te},Re=m(6848),X=m(30071);function w(T){return!T||T<0?0:T>100?100:T}function ve(T){let{success:re,successPercent:$e}=T,Ne=$e;return re&&"progress"in re&&(Ne=re.progress),re&&"percent"in re&&(Ne=re.percent),Ne}const Qe=T=>{let{percent:re,success:$e,successPercent:Ne}=T;const Xe=w(ve({success:$e,successPercent:Ne}));return[Xe,w(w(re)-Xe)]},je=T=>{let{success:re={},strokeColor:$e}=T;const{strokeColor:Ne}=re;return[Ne||X.presetPrimaryColors.green,$e||null]},Be=(T,re,$e)=>{var Ne,Xe,ct,mt;let yt=-1,Bt=-1;if(re==="step"){const Ft=$e.steps,_t=$e.strokeWidth;typeof T=="string"||typeof T=="undefined"?(yt=T==="small"?2:14,Bt=_t!=null?_t:8):typeof T=="number"?[yt,Bt]=[T,T]:[yt=14,Bt=8]=T,yt*=Ft}else if(re==="line"){const Ft=$e==null?void 0:$e.strokeWidth;typeof T=="string"||typeof T=="undefined"?Bt=Ft||(T==="small"?6:8):typeof T=="number"?[yt,Bt]=[T,T]:[yt=-1,Bt=8]=T}else(re==="circle"||re==="dashboard")&&(typeof T=="string"||typeof T=="undefined"?[yt,Bt]=T==="small"?[60,60]:[120,120]:typeof T=="number"?[yt,Bt]=[T,T]:(yt=(Xe=(Ne=T[0])!==null&&Ne!==void 0?Ne:T[1])!==null&&Xe!==void 0?Xe:120,Bt=(mt=(ct=T[0])!==null&&ct!==void 0?ct:T[1])!==null&&mt!==void 0?mt:120));return[yt,Bt]},Oe=3,lt=T=>Oe/T*100;var vt=T=>{const{prefixCls:re,trailColor:$e=null,strokeLinecap:Ne="round",gapPosition:Xe,gapDegree:ct,width:mt=120,type:yt,children:Bt,success:Ft,size:_t=mt}=T,[Yt,rn]=Be(_t,"circle");let{strokeWidth:hn}=T;hn===void 0&&(hn=Math.max(lt(Yt),6));const Wt={width:Yt,height:rn,fontSize:Yt*.15+6},on=K.useMemo(()=>{if(ct||ct===0)return ct;if(yt==="dashboard")return 75},[ct,yt]),xn=Xe||yt==="dashboard"&&"bottom"||void 0,Vt=Object.prototype.toString.call(T.strokeColor)==="[object Object]",Mn=je({success:Ft,strokeColor:T.strokeColor}),qn=x()(`${re}-inner`,{[`${re}-circle-gradient`]:Vt}),An=K.createElement(Te,{percent:Qe(T),strokeWidth:hn,trailWidth:hn,strokeColor:Mn,strokeLinecap:Ne,trailColor:$e,prefixCls:re,gapDegree:on,gapPosition:xn});return K.createElement("div",{className:qn,style:Wt},Yt<=20?K.createElement(Re.Z,{title:Bt},K.createElement("span",null,An)):K.createElement(K.Fragment,null,An,Bt))},Tt=function(T,re){var $e={};for(var Ne in T)Object.prototype.hasOwnProperty.call(T,Ne)&&re.indexOf(Ne)<0&&($e[Ne]=T[Ne]);if(T!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,Ne=Object.getOwnPropertySymbols(T);Xe<Ne.length;Xe++)re.indexOf(Ne[Xe])<0&&Object.prototype.propertyIsEnumerable.call(T,Ne[Xe])&&($e[Ne[Xe]]=T[Ne[Xe]]);return $e};const wt=T=>{let re=[];return Object.keys(T).forEach($e=>{const Ne=parseFloat($e.replace(/%/g,""));isNaN(Ne)||re.push({key:Ne,value:T[$e]})}),re=re.sort(($e,Ne)=>$e.key-Ne.key),re.map($e=>{let{key:Ne,value:Xe}=$e;return`${Xe} ${Ne}%`}).join(", ")},pt=(T,re)=>{const{from:$e=X.presetPrimaryColors.blue,to:Ne=X.presetPrimaryColors.blue,direction:Xe=re==="rtl"?"to left":"to right"}=T,ct=Tt(T,["from","to","direction"]);if(Object.keys(ct).length!==0){const mt=wt(ct);return{backgroundImage:`linear-gradient(${Xe}, ${mt})`}}return{backgroundImage:`linear-gradient(${Xe}, ${$e}, ${Ne})`}};var S=T=>{const{prefixCls:re,direction:$e,percent:Ne,size:Xe,strokeWidth:ct,strokeColor:mt,strokeLinecap:yt="round",children:Bt,trailColor:Ft=null,success:_t}=T,Yt=mt&&typeof mt!="string"?pt(mt,$e):{backgroundColor:mt},rn=yt==="square"||yt==="butt"?0:void 0,hn={backgroundColor:Ft||void 0,borderRadius:rn},Wt=Xe!=null?Xe:[-1,ct||(Xe==="small"?6:8)],[on,xn]=Be(Wt,"line",{strokeWidth:ct}),Vt=Object.assign({width:`${w(Ne)}%`,height:xn,borderRadius:rn},Yt),Mn=ve(T),qn={width:`${w(Mn)}%`,height:xn,borderRadius:rn,backgroundColor:_t==null?void 0:_t.strokeColor},An={width:on<0?"100%":on,height:xn};return K.createElement(K.Fragment,null,K.createElement("div",{className:`${re}-outer`,style:An},K.createElement("div",{className:`${re}-inner`,style:hn},K.createElement("div",{className:`${re}-bg`,style:Vt}),Mn!==void 0?K.createElement("div",{className:`${re}-success-bg`,style:qn}):null)),Bt)},h=T=>{const{size:re,steps:$e,percent:Ne=0,strokeWidth:Xe=8,strokeColor:ct,trailColor:mt=null,prefixCls:yt,children:Bt}=T,Ft=Math.round($e*(Ne/100)),_t=re==="small"?2:14,Yt=re!=null?re:[_t,Xe],[rn,hn]=Be(Yt,"step",{steps:$e,strokeWidth:Xe}),Wt=rn/$e,on=new Array($e);for(let xn=0;xn<$e;xn++){const Vt=Array.isArray(ct)?ct[xn]:ct;on[xn]=K.createElement("div",{key:xn,className:x()(`${yt}-steps-item`,{[`${yt}-steps-item-active`]:xn<=Ft-1}),style:{backgroundColor:xn<=Ft-1?Vt:mt,width:Wt,height:hn}})}return K.createElement("div",{className:`${yt}-steps-outer`},on,Bt)},g=m(36237),y=m(17313),d=m(83116),L=m(37613);const fe=T=>{const re=T?"100%":"-100%";return new g.Keyframes(`antProgress${T?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${re}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${re}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},O=T=>{const{componentCls:re,iconCls:$e}=T;return{[re]:Object.assign(Object.assign({},(0,y.Wf)(T)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:T.fontSize,marginInlineEnd:T.marginXS,marginBottom:T.marginXS},[`${re}-outer`]:{display:"inline-block",width:"100%"},[`&${re}-show-info`]:{[`${re}-outer`]:{marginInlineEnd:`calc(-2em - ${T.marginXS}px)`,paddingInlineEnd:`calc(2em + ${T.paddingXS}px)`}},[`${re}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:T.remainingColor,borderRadius:T.lineBorderRadius},[`${re}-inner:not(${re}-circle-gradient)`]:{[`${re}-circle-path`]:{stroke:T.defaultColor}},[`${re}-success-bg, ${re}-bg`]:{position:"relative",backgroundColor:T.defaultColor,borderRadius:T.lineBorderRadius,transition:`all ${T.motionDurationSlow} ${T.motionEaseInOutCirc}`},[`${re}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:T.colorSuccess},[`${re}-text`]:{display:"inline-block",width:"2em",marginInlineStart:T.marginXS,color:T.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[$e]:{fontSize:T.fontSize}},[`&${re}-status-active`]:{[`${re}-bg::before`]:{position:"absolute",inset:0,backgroundColor:T.colorBgContainer,borderRadius:T.lineBorderRadius,opacity:0,animationName:fe(),animationDuration:T.progressActiveMotionDuration,animationTimingFunction:T.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${re}-rtl${re}-status-active`]:{[`${re}-bg::before`]:{animationName:fe(!0)}},[`&${re}-status-exception`]:{[`${re}-bg`]:{backgroundColor:T.colorError},[`${re}-text`]:{color:T.colorError}},[`&${re}-status-exception ${re}-inner:not(${re}-circle-gradient)`]:{[`${re}-circle-path`]:{stroke:T.colorError}},[`&${re}-status-success`]:{[`${re}-bg`]:{backgroundColor:T.colorSuccess},[`${re}-text`]:{color:T.colorSuccess}},[`&${re}-status-success ${re}-inner:not(${re}-circle-gradient)`]:{[`${re}-circle-path`]:{stroke:T.colorSuccess}}})}},I=T=>{const{componentCls:re,iconCls:$e}=T;return{[re]:{[`${re}-circle-trail`]:{stroke:T.remainingColor},[`&${re}-circle ${re}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${re}-circle ${re}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:T.circleTextColor,fontSize:T.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[$e]:{fontSize:`${T.fontSize/T.fontSizeSM}em`}},[`${re}-circle&-status-exception`]:{[`${re}-text`]:{color:T.colorError}},[`${re}-circle&-status-success`]:{[`${re}-text`]:{color:T.colorSuccess}}},[`${re}-inline-circle`]:{lineHeight:1,[`${re}-inner`]:{verticalAlign:"bottom"}}}},he=T=>{const{componentCls:re}=T;return{[re]:{[`${re}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:T.progressStepMinWidth,marginInlineEnd:T.progressStepMarginInlineEnd,backgroundColor:T.remainingColor,transition:`all ${T.motionDurationSlow}`,"&-active":{backgroundColor:T.defaultColor}}}}}},Y=T=>{const{componentCls:re,iconCls:$e}=T;return{[re]:{[`${re}-small&-line, ${re}-small&-line ${re}-text ${$e}`]:{fontSize:T.fontSizeSM}}}};var U=(0,d.Z)("Progress",T=>{const re=T.marginXXS/2,$e=(0,L.TS)(T,{progressStepMarginInlineEnd:re,progressStepMinWidth:re,progressActiveMotionDuration:"2.4s"});return[O($e),I($e),he($e),Y($e)]},T=>({circleTextColor:T.colorText,defaultColor:T.colorInfo,remainingColor:T.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em"})),ye=function(T,re){var $e={};for(var Ne in T)Object.prototype.hasOwnProperty.call(T,Ne)&&re.indexOf(Ne)<0&&($e[Ne]=T[Ne]);if(T!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,Ne=Object.getOwnPropertySymbols(T);Xe<Ne.length;Xe++)re.indexOf(Ne[Xe])<0&&Object.prototype.propertyIsEnumerable.call(T,Ne[Xe])&&($e[Ne[Xe]]=T[Ne[Xe]]);return $e};const Ye=null,ce=["normal","exception","active","success"];var qe=K.forwardRef((T,re)=>{const{prefixCls:$e,className:Ne,rootClassName:Xe,steps:ct,strokeColor:mt,percent:yt=0,size:Bt="default",showInfo:Ft=!0,type:_t="line",status:Yt,format:rn,style:hn}=T,Wt=ye(T,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),on=K.useMemo(()=>{var Ke,H;const ee=ve(T);return parseInt(ee!==void 0?(Ke=ee!=null?ee:0)===null||Ke===void 0?void 0:Ke.toString():(H=yt!=null?yt:0)===null||H===void 0?void 0:H.toString(),10)},[yt,T.success,T.successPercent]),xn=K.useMemo(()=>!ce.includes(Yt)&&on>=100?"success":Yt||"normal",[Yt,on]),{getPrefixCls:Vt,direction:Mn,progress:qn}=K.useContext(F.E_),An=Vt("progress",$e),[pr,er]=U(An),gr=K.useMemo(()=>{if(!Ft)return null;const Ke=ve(T);let H;const ee=rn||(J=>`${J}%`),Q=_t==="line";return rn||xn!=="exception"&&xn!=="success"?H=ee(w(yt),w(Ke)):xn==="exception"?H=Q?K.createElement(xe.Z,null):K.createElement(R.Z,null):xn==="success"&&(H=Q?K.createElement(j.Z,null):K.createElement(A.Z,null)),K.createElement("span",{className:`${An}-text`,title:typeof H=="string"?H:void 0},H)},[Ft,yt,on,xn,_t,An,rn]),$r=Array.isArray(mt)?mt[0]:mt,Rn=typeof mt=="string"||Array.isArray(mt)?mt:void 0;let pn;_t==="line"?pn=ct?K.createElement(h,Object.assign({},T,{strokeColor:Rn,prefixCls:An,steps:ct}),gr):K.createElement(S,Object.assign({},T,{strokeColor:$r,prefixCls:An,direction:Mn}),gr):(_t==="circle"||_t==="dashboard")&&(pn=K.createElement(vt,Object.assign({},T,{strokeColor:$r,prefixCls:An,progressStatus:xn}),gr));const tr=x()(An,`${An}-status-${xn}`,`${An}-${_t==="dashboard"&&"circle"||ct&&"steps"||_t}`,{[`${An}-inline-circle`]:_t==="circle"&&Be(Bt,"circle")[0]<=20,[`${An}-show-info`]:Ft,[`${An}-${Bt}`]:typeof Bt=="string",[`${An}-rtl`]:Mn==="rtl"},qn==null?void 0:qn.className,Ne,Xe,er);return pr(K.createElement("div",Object.assign({ref:re,style:Object.assign(Object.assign({},qn==null?void 0:qn.style),hn),className:tr,role:"progressbar","aria-valuenow":on},(0,E.Z)(Wt,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),pn))}),oe=qe},5112:function(yn,dt,m){"use strict";m.d(dt,{ZP:function(){return X}});var K=m(92310),j=m.n(K),A=m(18929),xe=m(26112),R=m(59301),N=m(36355),x=m(19716);const E=R.createContext(null),F=E.Provider;var V=E;const Ie=R.createContext(null),G=Ie.Provider;var le=m(5630),ke=m(8654),ue=m(1684),de=m(32441),_e=m(17313),Pe=m(83116),Ue=m(37613);const Ce=w=>{const{componentCls:ve,antCls:Qe}=w,je=`${ve}-group`;return{[je]:Object.assign(Object.assign({},(0,_e.Wf)(w)),{display:"inline-block",fontSize:0,[`&${je}-rtl`]:{direction:"rtl"},[`${Qe}-badge ${Qe}-badge-count`]:{zIndex:1},[`> ${Qe}-badge:not(:first-child) > ${Qe}-button-wrapper`]:{borderInlineStart:"none"}})}},pe=w=>{const{componentCls:ve,wrapperMarginInlineEnd:Qe,colorPrimary:je,radioSize:Be,motionDurationSlow:Oe,motionDurationMid:lt,motionEaseInOutCirc:$t,colorBgContainer:vt,colorBorder:Tt,lineWidth:wt,dotSize:pt,colorBgContainerDisabled:at,colorTextDisabled:S,paddingXS:p,dotColorDisabled:h,lineType:g,radioDotDisabledSize:y,wireframe:d,colorWhite:L}=w,fe=`${ve}-inner`;return{[`${ve}-wrapper`]:Object.assign(Object.assign({},(0,_e.Wf)(w)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:Qe,cursor:"pointer",[`&${ve}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:w.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${ve}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${wt}px ${g} ${je}`,borderRadius:"50%",visibility:"hidden",content:'""'},[ve]:Object.assign(Object.assign({},(0,_e.Wf)(w)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${ve}-wrapper:hover &,
|
|
|
&:hover ${fe}`]:{borderColor:je},[`${ve}-input:focus-visible + ${fe}`]:Object.assign({},(0,_e.oN)(w)),[`${ve}:hover::after, ${ve}-wrapper:hover &::after`]:{visibility:"visible"},[`${ve}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:Be,height:Be,marginBlockStart:Be/-2,marginInlineStart:Be/-2,backgroundColor:d?je:L,borderBlockStart:0,borderInlineStart:0,borderRadius:Be,transform:"scale(0)",opacity:0,transition:`all ${Oe} ${$t}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:Be,height:Be,backgroundColor:vt,borderColor:Tt,borderStyle:"solid",borderWidth:wt,borderRadius:"50%",transition:`all ${lt}`},[`${ve}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${ve}-checked`]:{[fe]:{borderColor:je,backgroundColor:d?vt:je,"&::after":{transform:`scale(${pt/Be})`,opacity:1,transition:`all ${Oe} ${$t}`}}},[`${ve}-disabled`]:{cursor:"not-allowed",[fe]:{backgroundColor:at,borderColor:Tt,cursor:"not-allowed","&::after":{backgroundColor:h}},[`${ve}-input`]:{cursor:"not-allowed"},[`${ve}-disabled + span`]:{color:S,cursor:"not-allowed"},[`&${ve}-checked`]:{[fe]:{"&::after":{transform:`scale(${y/Be})`}}}},[`span${ve} + *`]:{paddingInlineStart:p,paddingInlineEnd:p}})}},q=w=>{const{buttonColor:ve,controlHeight:Qe,componentCls:je,lineWidth:Be,lineType:Oe,colorBorder:lt,motionDurationSlow:$t,motionDurationMid:vt,buttonPaddingInline:Tt,fontSize:wt,buttonBg:pt,fontSizeLG:at,controlHeightLG:S,controlHeightSM:p,paddingXS:h,borderRadius:g,borderRadiusSM:y,borderRadiusLG:d,buttonCheckedBg:L,buttonSolidCheckedColor:fe,colorTextDisabled:O,colorBgContainerDisabled:I,buttonCheckedBgDisabled:he,buttonCheckedColorDisabled:Y,colorPrimary:U,colorPrimaryHover:ye,colorPrimaryActive:Ye,buttonSolidCheckedBg:ce,buttonSolidCheckedHoverBg:Ae,buttonSolidCheckedActiveBg:qe}=w;return{[`${je}-button-wrapper`]:{position:"relative",display:"inline-block",height:Qe,margin:0,paddingInline:Tt,paddingBlock:0,color:ve,fontSize:wt,lineHeight:`${Qe-Be*2}px`,background:pt,border:`${Be}px ${Oe} ${lt}`,borderBlockStartWidth:Be+.02,borderInlineStartWidth:0,borderInlineEndWidth:Be,cursor:"pointer",transition:[`color ${vt}`,`background ${vt}`,`box-shadow ${vt}`].join(","),a:{color:ve},[`> ${je}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-Be,insetInlineStart:-Be,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:Be,paddingInline:0,backgroundColor:lt,transition:`background-color ${$t}`,content:'""'}},"&:first-child":{borderInlineStart:`${Be}px ${Oe} ${lt}`,borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g},"&:first-child:last-child":{borderRadius:g},[`${je}-group-large &`]:{height:S,fontSize:at,lineHeight:`${S-Be*2}px`,"&:first-child":{borderStartStartRadius:d,borderEndStartRadius:d},"&:last-child":{borderStartEndRadius:d,borderEndEndRadius:d}},[`${je}-group-small &`]:{height:p,paddingInline:h-Be,paddingBlock:0,lineHeight:`${p-Be*2}px`,"&:first-child":{borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y}},"&:hover":{position:"relative",color:U},"&:has(:focus-visible)":Object.assign({},(0,_e.oN)(w)),[`${je}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${je}-button-wrapper-disabled)`]:{zIndex:1,color:U,background:L,borderColor:U,"&::before":{backgroundColor:U},"&:first-child":{borderColor:U},"&:hover":{color:ye,borderColor:ye,"&::before":{backgroundColor:ye}},"&:active":{color:Ye,borderColor:Ye,"&::before":{backgroundColor:Ye}}},[`${je}-group-solid &-checked:not(${je}-button-wrapper-disabled)`]:{color:fe,background:ce,borderColor:ce,"&:hover":{color:fe,background:Ae,borderColor:Ae},"&:active":{color:fe,background:qe,borderColor:qe}},"&-disabled":{color:O,backgroundColor:I,borderColor:lt,cursor:"not-allowed","&:first-child, &:hover":{color:O,backgroundColor:I,borderColor:lt}},[`&-disabled${je}-button-wrapper-checked`]:{color:Y,backgroundColor:he,borderColor:lt,boxShadow:"none"}}}},_=w=>w-4*2;var ie=(0,Pe.Z)("Radio",w=>{const{controlOutline:ve,controlOutlineWidth:Qe,radioSize:je}=w,Be=`0 0 0 ${Qe}px ${ve}`,Oe=Be,lt=_(je),$t=(0,Ue.TS)(w,{radioDotDisabledSize:lt,radioFocusShadow:Be,radioButtonFocusShadow:Oe});return[Ce($t),pe($t),q($t)]},w=>{const{wireframe:ve,padding:Qe,marginXS:je,lineWidth:Be,fontSizeLG:Oe,colorText:lt,colorBgContainer:$t,colorTextDisabled:vt,controlItemBgActiveDisabled:Tt,colorTextLightSolid:wt,colorPrimary:pt,colorPrimaryHover:at,colorPrimaryActive:S}=w,p=4,h=Oe,g=ve?_(h):h-(p+Be)*2;return{radioSize:h,dotSize:g,dotColorDisabled:vt,buttonSolidCheckedColor:wt,buttonSolidCheckedBg:pt,buttonSolidCheckedHoverBg:at,buttonSolidCheckedActiveBg:S,buttonBg:$t,buttonCheckedBg:$t,buttonColor:lt,buttonCheckedBgDisabled:Tt,buttonCheckedColorDisabled:vt,buttonPaddingInline:Qe-Be,wrapperMarginInlineEnd:je}}),ae=m(14088),Se=m(4572),se=function(w,ve){var Qe={};for(var je in w)Object.prototype.hasOwnProperty.call(w,je)&&ve.indexOf(je)<0&&(Qe[je]=w[je]);if(w!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,je=Object.getOwnPropertySymbols(w);Be<je.length;Be++)ve.indexOf(je[Be])<0&&Object.prototype.propertyIsEnumerable.call(w,je[Be])&&(Qe[je[Be]]=w[je[Be]]);return Qe};const be=(w,ve)=>{var Qe,je;const Be=R.useContext(V),Oe=R.useContext(Ie),{getPrefixCls:lt,direction:$t,radio:vt}=R.useContext(N.E_),Tt=R.useRef(null),wt=(0,ke.sQ)(ve,Tt),{isFormItemInput:pt}=R.useContext(de.aM),at=Ye=>{var ce,Ae;(ce=w.onChange)===null||ce===void 0||ce.call(w,Ye),(Ae=Be==null?void 0:Be.onChange)===null||Ae===void 0||Ae.call(Be,Ye)},{prefixCls:S,className:p,rootClassName:h,children:g,style:y}=w,d=se(w,["prefixCls","className","rootClassName","children","style"]),L=lt("radio",S),fe=((Be==null?void 0:Be.optionType)||Oe)==="button",O=fe?`${L}-button`:L,[I,he]=ie(L),Y=Object.assign({},d),U=R.useContext(ue.Z);Be&&(Y.name=Be.name,Y.onChange=at,Y.checked=w.value===Be.value,Y.disabled=(Qe=Y.disabled)!==null&&Qe!==void 0?Qe:Be.disabled),Y.disabled=(je=Y.disabled)!==null&&je!==void 0?je:U;const ye=j()(`${O}-wrapper`,{[`${O}-wrapper-checked`]:Y.checked,[`${O}-wrapper-disabled`]:Y.disabled,[`${O}-wrapper-rtl`]:$t==="rtl",[`${O}-wrapper-in-form-item`]:pt},vt==null?void 0:vt.className,p,h,he);return I(R.createElement(ae.Z,{component:"Radio",disabled:Y.disabled},R.createElement("label",{className:ye,style:Object.assign(Object.assign({},vt==null?void 0:vt.style),y),onMouseEnter:w.onMouseEnter,onMouseLeave:w.onMouseLeave},R.createElement(le.Z,Object.assign({},Y,{className:j()(Y.className,!fe&&Se.A),type:"radio",prefixCls:O,ref:wt})),g!==void 0?R.createElement("span",null,g):null)))};var Le=R.forwardRef(be);const z=R.forwardRef((w,ve)=>{const{getPrefixCls:Qe,direction:je}=R.useContext(N.E_),[Be,Oe]=(0,A.Z)(w.defaultValue,{value:w.value}),lt=ce=>{const Ae=Be,qe=ce.target.value;"value"in w||Oe(qe);const{onChange:oe}=w;oe&&qe!==Ae&&oe(ce)},{prefixCls:$t,className:vt,rootClassName:Tt,options:wt,buttonStyle:pt="outline",disabled:at,children:S,size:p,style:h,id:g,onMouseEnter:y,onMouseLeave:d,onFocus:L,onBlur:fe}=w,O=Qe("radio",$t),I=`${O}-group`,[he,Y]=ie(O);let U=S;wt&&wt.length>0&&(U=wt.map(ce=>typeof ce=="string"||typeof ce=="number"?R.createElement(Le,{key:ce.toString(),prefixCls:O,disabled:at,value:ce,checked:Be===ce},ce):R.createElement(Le,{key:`radio-group-value-options-${ce.value}`,prefixCls:O,disabled:ce.disabled||at,value:ce.value,checked:Be===ce.value,title:ce.title,style:ce.style},ce.label)));const ye=(0,x.Z)(p),Ye=j()(I,`${I}-${pt}`,{[`${I}-${ye}`]:ye,[`${I}-rtl`]:je==="rtl"},vt,Tt,Y);return he(R.createElement("div",Object.assign({},(0,xe.Z)(w,{aria:!0,data:!0}),{className:Ye,style:h,onMouseEnter:y,onMouseLeave:d,onFocus:L,onBlur:fe,id:g,ref:ve}),R.createElement(F,{value:{onChange:lt,value:Be,disabled:w.disabled,name:w.name,optionType:w.optionType}},U)))});var we=R.memo(z),ge=function(w,ve){var Qe={};for(var je in w)Object.prototype.hasOwnProperty.call(w,je)&&ve.indexOf(je)<0&&(Qe[je]=w[je]);if(w!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,je=Object.getOwnPropertySymbols(w);Be<je.length;Be++)ve.indexOf(je[Be])<0&&Object.prototype.propertyIsEnumerable.call(w,je[Be])&&(Qe[je[Be]]=w[je[Be]]);return Qe};const Te=(w,ve)=>{const{getPrefixCls:Qe}=R.useContext(N.E_),{prefixCls:je}=w,Be=ge(w,["prefixCls"]),Oe=Qe("radio",je);return R.createElement(G,{value:"button"},R.createElement(Le,Object.assign({prefixCls:Oe},Be,{type:"radio",ref:ve})))};var Fe=R.forwardRef(Te);const Re=Le;Re.Button=Fe,Re.Group=we,Re.__ANT_RADIO=!0;var X=Re},57809:function(yn,dt,m){"use strict";var K=m(92310),j=m.n(K),A=m(77861),xe=m(2738),R=m(59301),N=m(53487),x=m(62892),E=m(19080),F=m(36355),V=m(1684),Ie=m(93891),G=m(19716),le=m(32441),ke=m(33234),ue=m(14154),de=m(58582),_e=m(84443),Pe=m(66339),Ue=function(ie,ae){var Se={};for(var se in ie)Object.prototype.hasOwnProperty.call(ie,se)&&ae.indexOf(se)<0&&(Se[se]=ie[se]);if(ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var be=0,se=Object.getOwnPropertySymbols(ie);be<se.length;be++)ae.indexOf(se[be])<0&&Object.prototype.propertyIsEnumerable.call(ie,se[be])&&(Se[se[be]]=ie[se[be]]);return Se};const Ce="SECRET_COMBOBOX_MODE_DO_NOT_USE",pe=(ie,ae)=>{var Se,{prefixCls:se,bordered:be=!0,className:D,rootClassName:Le,getPopupContainer:z,popupClassName:we,dropdownClassName:ge,listHeight:Te=256,placement:Fe,listItemHeight:Re=24,size:X,disabled:w,notFoundContent:ve,status:Qe,builtinPlacements:je,dropdownMatchSelectWidth:Be,popupMatchSelectWidth:Oe,direction:lt,style:$t,allowClear:vt}=ie,Tt=Ue(ie,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:wt,getPrefixCls:pt,renderEmpty:at,direction:S,virtual:p,popupMatchSelectWidth:h,popupOverflow:g,select:y}=R.useContext(F.E_),d=pt("select",se),L=pt(),fe=lt!=null?lt:S,{compactSize:O,compactItemClassnames:I}=(0,ke.ri)(d,fe),[he,Y]=(0,ue.Z)(d),U=R.useMemo(()=>{const{mode:xn}=Tt;if(xn!=="combobox")return xn===Ce?"combobox":xn},[Tt.mode]),ye=U==="multiple"||U==="tags",Ye=(0,_e.Z)(Tt.suffixIcon,Tt.showArrow),ce=(Se=Oe!=null?Oe:Be)!==null&&Se!==void 0?Se:h,{status:Ae,hasFeedback:qe,isFormItemInput:oe,feedbackIcon:T}=R.useContext(le.aM),re=(0,E.F)(Ae,Qe);let $e;ve!==void 0?$e=ve:U==="combobox"?$e=null:$e=(at==null?void 0:at("Select"))||R.createElement(Ie.Z,{componentName:"Select"});const{suffixIcon:Ne,itemIcon:Xe,removeIcon:ct,clearIcon:mt}=(0,Pe.Z)(Object.assign(Object.assign({},Tt),{multiple:ye,hasFeedback:qe,feedbackIcon:T,showSuffixIcon:Ye,prefixCls:d,showArrow:Tt.showArrow,componentName:"Select"})),yt=vt===!0?{clearIcon:mt}:vt,Bt=(0,xe.Z)(Tt,["suffixIcon","itemIcon"]),Ft=j()(we||ge,{[`${d}-dropdown-${fe}`]:fe==="rtl"},Le,Y),_t=(0,G.Z)(xn=>{var Vt;return(Vt=X!=null?X:O)!==null&&Vt!==void 0?Vt:xn}),Yt=R.useContext(V.Z),rn=w!=null?w:Yt,hn=j()({[`${d}-lg`]:_t==="large",[`${d}-sm`]:_t==="small",[`${d}-rtl`]:fe==="rtl",[`${d}-borderless`]:!be,[`${d}-in-form-item`]:oe},(0,E.Z)(d,re,qe),I,y==null?void 0:y.className,D,Le,Y),Wt=R.useMemo(()=>Fe!==void 0?Fe:fe==="rtl"?"bottomRight":"bottomLeft",[Fe,fe]),on=(0,de.Z)(je,g);return he(R.createElement(A.ZP,Object.assign({ref:ae,virtual:p,showSearch:y==null?void 0:y.showSearch},Bt,{style:Object.assign(Object.assign({},y==null?void 0:y.style),$t),dropdownMatchSelectWidth:ce,builtinPlacements:on,transitionName:(0,x.m)(L,"slide-up",Tt.transitionName),listHeight:Te,listItemHeight:Re,mode:U,prefixCls:d,placement:Wt,direction:fe,suffixIcon:Ne,menuItemSelectedIcon:Xe,removeIcon:ct,allowClear:yt,notFoundContent:$e,className:hn,getPopupContainer:z||wt,dropdownClassName:Ft,disabled:rn})))},q=R.forwardRef(pe),_=(0,N.Z)(q);q.SECRET_COMBOBOX_MODE_DO_NOT_USE=Ce,q.Option=A.Wx,q.OptGroup=A.Xo,q._InternalPanelDoNotUseOrYouWillBeFired=_,dt.default=q},14154:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return q}});var K=m(17313),j=m(74207),A=m(37613),xe=m(83116),R=m(13826),N=m(92899);const x=_=>{const{optionHeight:ie,optionFontSize:ae,optionLineHeight:Se,optionPadding:se}=_;return{position:"relative",display:"block",minHeight:ie,padding:se,color:_.colorText,fontWeight:"normal",fontSize:ae,lineHeight:Se,boxSizing:"border-box"}};var F=_=>{const{antCls:ie,componentCls:ae}=_,Se=`${ae}-item`,se=`&${ie}-slide-up-enter${ie}-slide-up-enter-active`,be=`&${ie}-slide-up-appear${ie}-slide-up-appear-active`,D=`&${ie}-slide-up-leave${ie}-slide-up-leave-active`,Le=`${ae}-dropdown-placement-`;return[{[`${ae}-dropdown`]:Object.assign(Object.assign({},(0,K.Wf)(_)),{position:"absolute",top:-9999,zIndex:_.zIndexPopup,boxSizing:"border-box",padding:_.paddingXXS,overflow:"hidden",fontSize:_.fontSize,fontVariant:"initial",backgroundColor:_.colorBgElevated,borderRadius:_.borderRadiusLG,outline:"none",boxShadow:_.boxShadowSecondary,[`
|
|
|
${se}${Le}bottomLeft,
|
|
|
${be}${Le}bottomLeft
|
|
|
`]:{animationName:R.fJ},[`
|
|
|
${se}${Le}topLeft,
|
|
|
${be}${Le}topLeft,
|
|
|
${se}${Le}topRight,
|
|
|
${be}${Le}topRight
|
|
|
`]:{animationName:R.Qt},[`${D}${Le}bottomLeft`]:{animationName:R.Uw},[`
|
|
|
${D}${Le}topLeft,
|
|
|
${D}${Le}topRight
|
|
|
`]:{animationName:R.ly},"&-hidden":{display:"none"},[`${Se}`]:Object.assign(Object.assign({},x(_)),{cursor:"pointer",transition:`background ${_.motionDurationSlow} ease`,borderRadius:_.borderRadiusSM,"&-group":{color:_.colorTextDescription,fontSize:_.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},K.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Se}-option-disabled)`]:{backgroundColor:_.optionActiveBg},[`&-selected:not(${Se}-option-disabled)`]:{color:_.optionSelectedColor,fontWeight:_.optionSelectedFontWeight,backgroundColor:_.optionSelectedBg,[`${Se}-option-state`]:{color:_.colorPrimary}},"&-disabled":{[`&${Se}-option-selected`]:{backgroundColor:_.colorBgContainerDisabled},color:_.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:_.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,R.oN)(_,"slide-up"),(0,R.oN)(_,"slide-down"),(0,N.Fm)(_,"move-up"),(0,N.Fm)(_,"move-down")]};const V=2,Ie=_=>{let{controlHeightSM:ie,controlHeight:ae,lineWidth:Se}=_;const se=(ae-ie)/2-Se,be=Math.ceil(se/2);return[se,be]};function G(_,ie){const{componentCls:ae,iconCls:Se}=_,se=`${ae}-selection-overflow`,be=_.multipleSelectItemHeight,[D]=Ie(_),Le=ie?`${ae}-${ie}`:"";return{[`${ae}-multiple${Le}`]:{fontSize:_.fontSize,[se]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${ae}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${D-V}px ${V*2}px`,borderRadius:_.borderRadius,[`${ae}-show-search&`]:{cursor:"text"},[`${ae}-disabled&`]:{background:_.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${V}px 0`,lineHeight:`${be}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${ae}-show-arrow ${ae}-selector,
|
|
|
&${ae}-allow-clear ${ae}-selector
|
|
|
`]:{paddingInlineEnd:_.fontSizeIcon+_.controlPaddingHorizontal},[`${ae}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:be,marginTop:V,marginBottom:V,lineHeight:`${be-_.lineWidth*2}px`,background:_.multipleItemBg,border:`${_.lineWidth}px ${_.lineType} ${_.multipleItemBorderColor}`,borderRadius:_.borderRadiusSM,cursor:"default",transition:`font-size ${_.motionDurationSlow}, line-height ${_.motionDurationSlow}, height ${_.motionDurationSlow}`,userSelect:"none",marginInlineEnd:V*2,paddingInlineStart:_.paddingXS,paddingInlineEnd:_.paddingXS/2,[`${ae}-disabled&`]:{color:_.multipleItemColorDisabled,borderColor:_.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:_.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,K.Ro)()),{display:"inline-flex",alignItems:"center",color:_.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${Se}`]:{verticalAlign:"-0.2em"},"&:hover":{color:_.colorIconHover}})},[`${se}-item + ${se}-item`]:{[`${ae}-selection-search`]:{marginInlineStart:0}},[`${ae}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:_.inputPaddingHorizontalBase-D,"\n &-input,\n &-mirror\n ":{height:be,fontFamily:_.fontFamily,lineHeight:`${be}px`,transition:`all ${_.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${ae}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:_.inputPaddingHorizontalBase,insetInlineEnd:_.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${_.motionDurationSlow}`}}}}var ke=_=>{const{componentCls:ie}=_,ae=(0,A.TS)(_,{controlHeight:_.controlHeightSM,multipleSelectItemHeight:_.controlHeightXS,borderRadius:_.borderRadiusSM,borderRadiusSM:_.borderRadiusXS}),Se=(0,A.TS)(_,{fontSize:_.fontSizeLG,controlHeight:_.controlHeightLG,multipleSelectItemHeight:_.multipleItemHeightLG,borderRadius:_.borderRadiusLG,borderRadiusSM:_.borderRadius}),[,se]=Ie(_);return[G(_),G(ae,"sm"),{[`${ie}-multiple${ie}-sm`]:{[`${ie}-selection-placeholder`]:{insetInline:_.controlPaddingHorizontalSM-_.lineWidth},[`${ie}-selection-search`]:{marginInlineStart:se}}},G(Se,"lg")]};function ue(_,ie){const{componentCls:ae,inputPaddingHorizontalBase:Se,borderRadius:se}=_,be=_.controlHeight-_.lineWidth*2,D=Math.ceil(_.fontSize*1.25),Le=ie?`${ae}-${ie}`:"";return{[`${ae}-single${Le}`]:{fontSize:_.fontSize,[`${ae}-selector`]:Object.assign(Object.assign({},(0,K.Wf)(_)),{display:"flex",borderRadius:se,[`${ae}-selection-search`]:{position:"absolute",top:0,insetInlineStart:Se,insetInlineEnd:Se,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${ae}-selection-item,
|
|
|
${ae}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${be}px`,transition:`all ${_.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${be}px`}},[`${ae}-selection-item`]:{position:"relative",userSelect:"none"},[`${ae}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${ae}-selection-item:after`,`${ae}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${ae}-show-arrow ${ae}-selection-item,
|
|
|
&${ae}-show-arrow ${ae}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:D},[`&${ae}-open ${ae}-selection-item`]:{color:_.colorTextPlaceholder},[`&:not(${ae}-customize-input)`]:{[`${ae}-selector`]:{width:"100%",height:_.controlHeight,padding:`0 ${Se}px`,[`${ae}-selection-search-input`]:{height:be},"&:after":{lineHeight:`${be}px`}}},[`&${ae}-customize-input`]:{[`${ae}-selector`]:{"&:after":{display:"none"},[`${ae}-selection-search`]:{position:"static",width:"100%"},[`${ae}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Se}px`,"&:after":{display:"none"}}}}}}}function de(_){const{componentCls:ie}=_,ae=_.controlPaddingHorizontalSM-_.lineWidth;return[ue(_),ue((0,A.TS)(_,{controlHeight:_.controlHeightSM,borderRadius:_.borderRadiusSM}),"sm"),{[`${ie}-single${ie}-sm`]:{[`&:not(${ie}-customize-input)`]:{[`${ie}-selection-search`]:{insetInlineStart:ae,insetInlineEnd:ae},[`${ie}-selector`]:{padding:`0 ${ae}px`},[`&${ie}-show-arrow ${ie}-selection-search`]:{insetInlineEnd:ae+_.fontSize*1.5},[`
|
|
|
&${ie}-show-arrow ${ie}-selection-item,
|
|
|
&${ie}-show-arrow ${ie}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:_.fontSize*1.5}}}},ue((0,A.TS)(_,{controlHeight:_.singleItemHeightLG,fontSize:_.fontSizeLG,borderRadius:_.borderRadiusLG}),"lg")]}const _e=_=>{const{componentCls:ie,selectorBg:ae}=_;return{position:"relative",backgroundColor:ae,border:`${_.lineWidth}px ${_.lineType} ${_.colorBorder}`,transition:`all ${_.motionDurationMid} ${_.motionEaseInOut}`,input:{cursor:"pointer"},[`${ie}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${ie}-disabled&`]:{color:_.colorTextDisabled,background:_.colorBgContainerDisabled,cursor:"not-allowed",[`${ie}-multiple&`]:{background:_.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},Pe=function(_,ie){let ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:Se,borderHoverColor:se,outlineColor:be,antCls:D}=ie,Le=ae?{[`${Se}-selector`]:{borderColor:se}}:{};return{[_]:{[`&:not(${Se}-disabled):not(${Se}-customize-input):not(${D}-pagination-size-changer)`]:Object.assign(Object.assign({},Le),{[`${Se}-focused& ${Se}-selector`]:{borderColor:se,boxShadow:`0 0 0 ${ie.controlOutlineWidth}px ${be}`,outline:0},[`&:hover ${Se}-selector`]:{borderColor:se}})}}},Ue=_=>{const{componentCls:ie}=_;return{[`${ie}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},Ce=_=>{const{componentCls:ie,inputPaddingHorizontalBase:ae,iconCls:Se}=_;return{[ie]:Object.assign(Object.assign({},(0,K.Wf)(_)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${ie}-customize-input) ${ie}-selector`]:Object.assign(Object.assign({},_e(_)),Ue(_)),[`${ie}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},K.vS),[`${ie}-selection-placeholder`]:Object.assign(Object.assign({},K.vS),{flex:1,color:_.colorTextPlaceholder,pointerEvents:"none"}),[`${ie}-arrow`]:Object.assign(Object.assign({},(0,K.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:ae,height:_.fontSizeIcon,marginTop:-_.fontSizeIcon/2,color:_.colorTextQuaternary,fontSize:_.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[Se]:{verticalAlign:"top",transition:`transform ${_.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${ie}-suffix)`]:{pointerEvents:"auto"}},[`${ie}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${ie}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:ae,zIndex:1,display:"inline-block",width:_.fontSizeIcon,height:_.fontSizeIcon,marginTop:-_.fontSizeIcon/2,color:_.colorTextQuaternary,fontSize:_.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:_.clearBg,cursor:"pointer",opacity:0,transition:`color ${_.motionDurationMid} ease, opacity ${_.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:_.colorTextTertiary}},"&:hover":{[`${ie}-clear`]:{opacity:1}}}),[`${ie}-has-feedback`]:{[`${ie}-clear`]:{insetInlineEnd:ae+_.fontSize+_.paddingXS}}}},pe=_=>{const{componentCls:ie}=_;return[{[ie]:{[`&-borderless ${ie}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${ie}-in-form-item`]:{width:"100%"}}},Ce(_),de(_),ke(_),F(_),{[`${ie}-rtl`]:{direction:"rtl"}},Pe(ie,(0,A.TS)(_,{borderHoverColor:_.colorPrimaryHover,outlineColor:_.controlOutline})),Pe(`${ie}-status-error`,(0,A.TS)(_,{borderHoverColor:_.colorErrorHover,outlineColor:_.colorErrorOutline}),!0),Pe(`${ie}-status-warning`,(0,A.TS)(_,{borderHoverColor:_.colorWarningHover,outlineColor:_.colorWarningOutline}),!0),(0,j.c)(_,{borderElCls:`${ie}-selector`,focusElCls:`${ie}-focused`})]};var q=(0,xe.Z)("Select",(_,ie)=>{let{rootPrefixCls:ae}=ie;const Se=(0,A.TS)(_,{rootPrefixCls:ae,inputPaddingHorizontalBase:_.paddingSM-1,multipleSelectItemHeight:_.multipleItemHeight});return[pe(Se)]},_=>{const{fontSize:ie,lineHeight:ae,controlHeight:Se,controlPaddingHorizontal:se,zIndexPopupBase:be,colorText:D,fontWeightStrong:Le,controlItemBgActive:z,controlItemBgHover:we,colorBgContainer:ge,colorFillSecondary:Te,controlHeightLG:Fe,controlHeightSM:Re,colorBgContainerDisabled:X,colorTextDisabled:w}=_;return{zIndexPopup:be+50,optionSelectedColor:D,optionSelectedFontWeight:Le,optionSelectedBg:z,optionActiveBg:we,optionPadding:`${(Se-ie*ae)/2}px ${se}px`,optionFontSize:ie,optionLineHeight:ae,optionHeight:Se,selectorBg:ge,clearBg:ge,singleItemHeightLG:Fe,multipleItemBg:Te,multipleItemBorderColor:"transparent",multipleItemHeight:Re,multipleItemHeightLG:Se,multipleSelectorBgDisabled:X,multipleItemColorDisabled:w,multipleItemBorderColorDisabled:"transparent"}})},58582:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return j}});const K=A=>{const R={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:A==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},R),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},R),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},R),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},R),{points:["br","tr"],offset:[0,-4]})}};function j(A,xe){return A||K(xe)}},84443:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return K}});function K(j,A){return A!==void 0?A:j!==null}},66339:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});var K=m(40001),j=m(19248),A=m(99267),xe=m(84105),R=m(58617),N=m(47472),x=m(59301);function E(F){let{suffixIcon:V,clearIcon:Ie,menuItemSelectedIcon:G,removeIcon:le,loading:ke,multiple:ue,hasFeedback:de,prefixCls:_e,showSuffixIcon:Pe,feedbackIcon:Ue,showArrow:Ce,componentName:pe}=F;const q=Ie!=null?Ie:x.createElement(j.Z,null),_=se=>V===null&&!de&&!Ce?null:x.createElement(x.Fragment,null,Pe!==!1&&se,de&&Ue);let ie=null;if(V!==void 0)ie=_(V);else if(ke)ie=_(x.createElement(R.Z,{spin:!0}));else{const se=`${_e}-suffix`;ie=be=>{let{open:D,showSearch:Le}=be;return _(D&&Le?x.createElement(N.Z,{className:se}):x.createElement(xe.Z,{className:se}))}}let ae=null;G!==void 0?ae=G:ue?ae=x.createElement(K.Z,null):ae=null;let Se=null;return le!==void 0?Se=le:Se=x.createElement(A.Z,null),{clearIcon:q,suffixIcon:ie,itemIcon:ae,removeIcon:Se}}},61621:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return g}});var K=m(92310),j=m.n(K),A=m(59301),xe=m(36355),R=m(2738),x=y=>{const{prefixCls:d,className:L,style:fe,size:O,shape:I}=y,he=j()({[`${d}-lg`]:O==="large",[`${d}-sm`]:O==="small"}),Y=j()({[`${d}-circle`]:I==="circle",[`${d}-square`]:I==="square",[`${d}-round`]:I==="round"}),U=A.useMemo(()=>typeof O=="number"?{width:O,height:O,lineHeight:`${O}px`}:{},[O]);return A.createElement("span",{className:j()(d,he,Y,L),style:Object.assign(Object.assign({},U),fe)})},E=m(36237),F=m(83116),V=m(37613);const Ie=new E.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),G=y=>({height:y,lineHeight:`${y}px`}),le=y=>Object.assign({width:y},G(y)),ke=y=>({background:y.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:Ie,animationDuration:y.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),ue=y=>Object.assign({width:y*5,minWidth:y*5},G(y)),de=y=>{const{skeletonAvatarCls:d,gradientFromColor:L,controlHeight:fe,controlHeightLG:O,controlHeightSM:I}=y;return{[`${d}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:L},le(fe)),[`${d}${d}-circle`]:{borderRadius:"50%"},[`${d}${d}-lg`]:Object.assign({},le(O)),[`${d}${d}-sm`]:Object.assign({},le(I))}},_e=y=>{const{controlHeight:d,borderRadiusSM:L,skeletonInputCls:fe,controlHeightLG:O,controlHeightSM:I,gradientFromColor:he}=y;return{[`${fe}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:he,borderRadius:L},ue(d)),[`${fe}-lg`]:Object.assign({},ue(O)),[`${fe}-sm`]:Object.assign({},ue(I))}},Pe=y=>Object.assign({width:y},G(y)),Ue=y=>{const{skeletonImageCls:d,imageSizeBase:L,gradientFromColor:fe,borderRadiusSM:O}=y;return{[`${d}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:fe,borderRadius:O},Pe(L*2)),{[`${d}-path`]:{fill:"#bfbfbf"},[`${d}-svg`]:Object.assign(Object.assign({},Pe(L)),{maxWidth:L*4,maxHeight:L*4}),[`${d}-svg${d}-svg-circle`]:{borderRadius:"50%"}}),[`${d}${d}-circle`]:{borderRadius:"50%"}}},Ce=(y,d,L)=>{const{skeletonButtonCls:fe}=y;return{[`${L}${fe}-circle`]:{width:d,minWidth:d,borderRadius:"50%"},[`${L}${fe}-round`]:{borderRadius:d}}},pe=y=>Object.assign({width:y*2,minWidth:y*2},G(y)),q=y=>{const{borderRadiusSM:d,skeletonButtonCls:L,controlHeight:fe,controlHeightLG:O,controlHeightSM:I,gradientFromColor:he}=y;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${L}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:he,borderRadius:d,width:fe*2,minWidth:fe*2},pe(fe))},Ce(y,fe,L)),{[`${L}-lg`]:Object.assign({},pe(O))}),Ce(y,O,`${L}-lg`)),{[`${L}-sm`]:Object.assign({},pe(I))}),Ce(y,I,`${L}-sm`))},_=y=>{const{componentCls:d,skeletonAvatarCls:L,skeletonTitleCls:fe,skeletonParagraphCls:O,skeletonButtonCls:I,skeletonInputCls:he,skeletonImageCls:Y,controlHeight:U,controlHeightLG:ye,controlHeightSM:Ye,gradientFromColor:ce,padding:Ae,marginSM:qe,borderRadius:oe,titleHeight:T,blockRadius:re,paragraphLiHeight:$e,controlHeightXS:Ne,paragraphMarginTop:Xe}=y;return{[`${d}`]:{display:"table",width:"100%",[`${d}-header`]:{display:"table-cell",paddingInlineEnd:Ae,verticalAlign:"top",[`${L}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:ce},le(U)),[`${L}-circle`]:{borderRadius:"50%"},[`${L}-lg`]:Object.assign({},le(ye)),[`${L}-sm`]:Object.assign({},le(Ye))},[`${d}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${fe}`]:{width:"100%",height:T,background:ce,borderRadius:re,[`+ ${O}`]:{marginBlockStart:Ye}},[`${O}`]:{padding:0,"> li":{width:"100%",height:$e,listStyle:"none",background:ce,borderRadius:re,"+ li":{marginBlockStart:Ne}}},[`${O}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${d}-content`]:{[`${fe}, ${O} > li`]:{borderRadius:oe}}},[`${d}-with-avatar ${d}-content`]:{[`${fe}`]:{marginBlockStart:qe,[`+ ${O}`]:{marginBlockStart:Xe}}},[`${d}${d}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},q(y)),de(y)),_e(y)),Ue(y)),[`${d}${d}-block`]:{width:"100%",[`${I}`]:{width:"100%"},[`${he}`]:{width:"100%"}},[`${d}${d}-active`]:{[`
|
|
|
${fe},
|
|
|
${O} > li,
|
|
|
${L},
|
|
|
${I},
|
|
|
${he},
|
|
|
${Y}
|
|
|
`]:Object.assign({},ke(y))}}};var ie=(0,F.Z)("Skeleton",y=>{const{componentCls:d}=y,L=(0,V.TS)(y,{skeletonAvatarCls:`${d}-avatar`,skeletonTitleCls:`${d}-title`,skeletonParagraphCls:`${d}-paragraph`,skeletonButtonCls:`${d}-button`,skeletonInputCls:`${d}-input`,skeletonImageCls:`${d}-image`,imageSizeBase:y.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${y.gradientFromColor} 25%, ${y.gradientToColor} 37%, ${y.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[_(L)]},y=>{const{colorFillContent:d,colorFill:L}=y,fe=d,O=L;return{color:fe,colorGradientEnd:O,gradientFromColor:fe,gradientToColor:O,titleHeight:y.controlHeight/2,blockRadius:y.borderRadiusSM,paragraphMarginTop:y.marginLG+y.marginXXS,paragraphLiHeight:y.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),Se=y=>{const{prefixCls:d,className:L,rootClassName:fe,active:O,shape:I="circle",size:he="default"}=y,{getPrefixCls:Y}=A.useContext(xe.E_),U=Y("skeleton",d),[ye,Ye]=ie(U),ce=(0,R.Z)(y,["prefixCls","className"]),Ae=j()(U,`${U}-element`,{[`${U}-active`]:O},L,fe,Ye);return ye(A.createElement("div",{className:Ae},A.createElement(x,Object.assign({prefixCls:`${U}-avatar`,shape:I,size:he},ce))))},be=y=>{const{prefixCls:d,className:L,rootClassName:fe,active:O,block:I=!1,size:he="default"}=y,{getPrefixCls:Y}=A.useContext(xe.E_),U=Y("skeleton",d),[ye,Ye]=ie(U),ce=(0,R.Z)(y,["prefixCls"]),Ae=j()(U,`${U}-element`,{[`${U}-active`]:O,[`${U}-block`]:I},L,fe,Ye);return ye(A.createElement("div",{className:Ae},A.createElement(x,Object.assign({prefixCls:`${U}-button`,size:he},ce))))};const D="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 z=y=>{const{prefixCls:d,className:L,rootClassName:fe,style:O,active:I}=y,{getPrefixCls:he}=A.useContext(xe.E_),Y=he("skeleton",d),[U,ye]=ie(Y),Ye=j()(Y,`${Y}-element`,{[`${Y}-active`]:I},L,fe,ye);return U(A.createElement("div",{className:Ye},A.createElement("div",{className:j()(`${Y}-image`,L),style:O},A.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${Y}-image-svg`},A.createElement("path",{d:D,className:`${Y}-image-path`})))))},ge=y=>{const{prefixCls:d,className:L,rootClassName:fe,active:O,block:I,size:he="default"}=y,{getPrefixCls:Y}=A.useContext(xe.E_),U=Y("skeleton",d),[ye,Ye]=ie(U),ce=(0,R.Z)(y,["prefixCls"]),Ae=j()(U,`${U}-element`,{[`${U}-active`]:O,[`${U}-block`]:I},L,fe,Ye);return ye(A.createElement("div",{className:Ae},A.createElement(x,Object.assign({prefixCls:`${U}-input`,size:he},ce))))},Te=m(54476),Fe={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"},Re=Fe,X=m(7657),w=function(d,L){return A.createElement(X.Z,(0,Te.Z)({},d,{ref:L,icon:Re}))},ve=A.forwardRef(w),Qe=ve,Be=y=>{const{prefixCls:d,className:L,rootClassName:fe,style:O,active:I,children:he}=y,{getPrefixCls:Y}=A.useContext(xe.E_),U=Y("skeleton",d),[ye,Ye]=ie(U),ce=j()(U,`${U}-element`,{[`${U}-active`]:I},Ye,L,fe),Ae=he!=null?he:A.createElement(Qe,null);return ye(A.createElement("div",{className:ce},A.createElement("div",{className:j()(`${U}-image`,L),style:O},Ae)))},Oe=m(94480),$t=y=>{const d=Y=>{const{width:U,rows:ye=2}=y;if(Array.isArray(U))return U[Y];if(ye-1===Y)return U},{prefixCls:L,className:fe,style:O,rows:I}=y,he=(0,Oe.Z)(Array(I)).map((Y,U)=>A.createElement("li",{key:U,style:{width:d(U)}}));return A.createElement("ul",{className:j()(L,fe),style:O},he)},Tt=y=>{let{prefixCls:d,className:L,width:fe,style:O}=y;return A.createElement("h3",{className:j()(d,L),style:Object.assign({width:fe},O)})};function wt(y){return y&&typeof y=="object"?y:{}}function pt(y,d){return y&&!d?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function at(y,d){return!y&&d?{width:"38%"}:y&&d?{width:"50%"}:{}}function S(y,d){const L={};return(!y||!d)&&(L.width="61%"),!y&&d?L.rows=3:L.rows=2,L}const p=y=>{const{prefixCls:d,loading:L,className:fe,rootClassName:O,style:I,children:he,avatar:Y=!1,title:U=!0,paragraph:ye=!0,active:Ye,round:ce}=y,{getPrefixCls:Ae,direction:qe,skeleton:oe}=A.useContext(xe.E_),T=Ae("skeleton",d),[re,$e]=ie(T);if(L||!("loading"in y)){const Ne=!!Y,Xe=!!U,ct=!!ye;let mt;if(Ne){const Ft=Object.assign(Object.assign({prefixCls:`${T}-avatar`},pt(Xe,ct)),wt(Y));mt=A.createElement("div",{className:`${T}-header`},A.createElement(x,Object.assign({},Ft)))}let yt;if(Xe||ct){let Ft;if(Xe){const Yt=Object.assign(Object.assign({prefixCls:`${T}-title`},at(Ne,ct)),wt(U));Ft=A.createElement(Tt,Object.assign({},Yt))}let _t;if(ct){const Yt=Object.assign(Object.assign({prefixCls:`${T}-paragraph`},S(Ne,Xe)),wt(ye));_t=A.createElement($t,Object.assign({},Yt))}yt=A.createElement("div",{className:`${T}-content`},Ft,_t)}const Bt=j()(T,{[`${T}-with-avatar`]:Ne,[`${T}-active`]:Ye,[`${T}-rtl`]:qe==="rtl",[`${T}-round`]:ce},oe==null?void 0:oe.className,fe,O,$e);return re(A.createElement("div",{className:Bt,style:Object.assign(Object.assign({},oe==null?void 0:oe.style),I)},mt,yt))}return typeof he!="undefined"?he:null};p.Button=be,p.Avatar=Se,p.Input=ge,p.Image=z,p.Node=Be;var h=p,g=h},31797:function(yn,dt,m){"use strict";m.d(dt,{default:function(){return ie}});var K=m(59301),j=m(56762),A=m(92343),xe=m(92310),R=m.n(xe),N=m(36355),x=m(61621),F=ae=>{const{value:Se,formatter:se,precision:be,decimalSeparator:D,groupSeparator:Le="",prefixCls:z}=ae;let we;if(typeof se=="function")we=se(Se);else{const ge=String(Se),Te=ge.match(/^(-?)(\d*)(\.(\d+))?$/);if(!Te||ge==="-")we=ge;else{const Fe=Te[1];let Re=Te[2]||"0",X=Te[4]||"";Re=Re.replace(/\B(?=(\d{3})+(?!\d))/g,Le),typeof be=="number"&&(X=X.padEnd(be,"0").slice(0,be>0?be:0)),X&&(X=`${D}${X}`),we=[K.createElement("span",{key:"int",className:`${z}-content-value-int`},Fe,Re),X&&K.createElement("span",{key:"decimal",className:`${z}-content-value-decimal`},X)]}}return K.createElement("span",{className:`${z}-content-value`},we)},V=m(17313),Ie=m(83116),G=m(37613);const le=ae=>{const{componentCls:Se,marginXXS:se,padding:be,colorTextDescription:D,titleFontSize:Le,colorTextHeading:z,contentFontSize:we,fontFamily:ge}=ae;return{[`${Se}`]:Object.assign(Object.assign({},(0,V.Wf)(ae)),{[`${Se}-title`]:{marginBottom:se,color:D,fontSize:Le},[`${Se}-skeleton`]:{paddingTop:be},[`${Se}-content`]:{color:z,fontSize:we,fontFamily:ge,[`${Se}-content-value`]:{display:"inline-block",direction:"ltr"},[`${Se}-content-prefix, ${Se}-content-suffix`]:{display:"inline-block"},[`${Se}-content-prefix`]:{marginInlineEnd:se},[`${Se}-content-suffix`]:{marginInlineStart:se}}})}};var ke=(0,Ie.Z)("Statistic",ae=>{const Se=(0,G.TS)(ae,{});return[le(Se)]},ae=>{const{fontSizeHeading3:Se,fontSize:se}=ae;return{titleFontSize:se,contentFontSize:Se}}),de=ae=>{const{prefixCls:Se,className:se,rootClassName:be,style:D,valueStyle:Le,value:z=0,title:we,valueRender:ge,prefix:Te,suffix:Fe,loading:Re=!1,onMouseEnter:X,onMouseLeave:w,decimalSeparator:ve=".",groupSeparator:Qe=","}=ae,{getPrefixCls:je,direction:Be,statistic:Oe}=K.useContext(N.E_),lt=je("statistic",Se),[$t,vt]=ke(lt),Tt=K.createElement(F,Object.assign({decimalSeparator:ve,groupSeparator:Qe,prefixCls:lt},ae,{value:z})),wt=R()(lt,{[`${lt}-rtl`]:Be==="rtl"},Oe==null?void 0:Oe.className,se,be,vt);return $t(K.createElement("div",{className:wt,style:Object.assign(Object.assign({},Oe==null?void 0:Oe.style),D),onMouseEnter:X,onMouseLeave:w},we&&K.createElement("div",{className:`${lt}-title`},we),K.createElement(x.Z,{paragraph:!1,loading:Re,className:`${lt}-skeleton`},K.createElement("div",{style:Le,className:`${lt}-content`},Te&&K.createElement("span",{className:`${lt}-content-prefix`},Te),ge?ge(Tt):Tt,Fe&&K.createElement("span",{className:`${lt}-content-suffix`},Fe)))))};const _e=[["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 Pe(ae,Se){let se=ae;const be=/\[[^\]]*]/g,D=(Se.match(be)||[]).map(ge=>ge.slice(1,-1)),Le=Se.replace(be,"[]"),z=_e.reduce((ge,Te)=>{let[Fe,Re]=Te;if(ge.includes(Fe)){const X=Math.floor(se/Re);return se-=X*Re,ge.replace(new RegExp(`${Fe}+`,"g"),w=>{const ve=w.length;return X.toString().padStart(ve,"0")})}return ge},Le);let we=0;return z.replace(be,()=>{const ge=D[we];return we+=1,ge})}function Ue(ae,Se){const{format:se=""}=Se,be=new Date(ae).getTime(),D=Date.now(),Le=Math.max(be-D,0);return Pe(Le,se)}const Ce=1e3/30;function pe(ae){return new Date(ae).getTime()}const q=ae=>{const{value:Se,format:se="HH:mm:ss",onChange:be,onFinish:D}=ae,Le=(0,j.Z)(),z=K.useRef(null),we=()=>{D==null||D(),z.current&&(clearInterval(z.current),z.current=null)},ge=()=>{const Re=pe(Se);Re>=Date.now()&&(z.current=setInterval(()=>{Le(),be==null||be(Re-Date.now()),Re<Date.now()&&we()},Ce))};K.useEffect(()=>(ge(),()=>{z.current&&(clearInterval(z.current),z.current=null)}),[Se]);const Te=(Re,X)=>Ue(Re,Object.assign(Object.assign({},X),{format:se})),Fe=Re=>(0,A.Tm)(Re,{title:void 0});return K.createElement(de,Object.assign({},ae,{valueRender:Fe,formatter:Te}))};var _=K.memo(q);de.Countdown=_;var ie=de},8378:function(yn,dt){"use strict";const m=K=>({[K.componentCls]:{[`${K.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${K.motionDurationMid} ${K.motionEaseInOut},
|
|
|
opacity ${K.motionDurationMid} ${K.motionEaseInOut} !important`}},[`${K.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${K.motionDurationMid} ${K.motionEaseInOut},
|
|
|
opacity ${K.motionDurationMid} ${K.motionEaseInOut} !important`}}});dt.Z=m},92899:function(yn,dt,m){"use strict";m.d(dt,{Fm:function(){return G}});var K=m(36237),j=m(95406);const A=new K.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),xe=new K.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),R=new K.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),N=new K.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),x=new K.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),E=new K.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),F=new K.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),V=new K.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Ie={"move-up":{inKeyframes:F,outKeyframes:V},"move-down":{inKeyframes:A,outKeyframes:xe},"move-left":{inKeyframes:R,outKeyframes:N},"move-right":{inKeyframes:x,outKeyframes:E}},G=(le,ke)=>{const{antCls:ue}=le,de=`${ue}-${ke}`,{inKeyframes:_e,outKeyframes:Pe}=Ie[ke];return[(0,j.R)(de,_e,Pe,le.motionDurationMid),{[`
|
|
|
${de}-enter,
|
|
|
${de}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:le.motionEaseOutCirc},[`${de}-leave`]:{animationTimingFunction:le.motionEaseInOutCirc}}]}},13826:function(yn,dt,m){"use strict";m.d(dt,{Qt:function(){return R},Uw:function(){return xe},fJ:function(){return A},ly:function(){return N},oN:function(){return G}});var K=m(36237),j=m(95406);const A=new K.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),xe=new K.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),R=new K.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),N=new K.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),x=new K.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),E=new K.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),F=new K.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),V=new K.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Ie={"slide-up":{inKeyframes:A,outKeyframes:xe},"slide-down":{inKeyframes:R,outKeyframes:N},"slide-left":{inKeyframes:x,outKeyframes:E},"slide-right":{inKeyframes:F,outKeyframes:V}},G=(le,ke)=>{const{antCls:ue}=le,de=`${ue}-${ke}`,{inKeyframes:_e,outKeyframes:Pe}=Ie[ke];return[(0,j.R)(de,_e,Pe,le.motionDurationMid),{[`
|
|
|
${de}-enter,
|
|
|
${de}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:le.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${de}-leave`]:{animationTimingFunction:le.motionEaseInQuint}}]}},15969:function(yn,dt,m){"use strict";m.d(dt,{N:function(){return K}});const K=j=>({color:j.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${j.motionDurationSlow}`,"&:focus, &:hover":{color:j.colorLinkHover},"&:active":{color:j.colorLinkActive}})},78673:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return Le}});var K=m(58617),j=m(92310),A=m.n(j),xe=m(54476),R=m(20068),N=m(42978),x=m(75931),E=m(59301),F=m(18929),V=m(10228),Ie=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],G=E.forwardRef(function(z,we){var ge,Te=z.prefixCls,Fe=Te===void 0?"rc-switch":Te,Re=z.className,X=z.checked,w=z.defaultChecked,ve=z.disabled,Qe=z.loadingIcon,je=z.checkedChildren,Be=z.unCheckedChildren,Oe=z.onClick,lt=z.onChange,$t=z.onKeyDown,vt=(0,x.Z)(z,Ie),Tt=(0,F.Z)(!1,{value:X,defaultValue:w}),wt=(0,N.Z)(Tt,2),pt=wt[0],at=wt[1];function S(y,d){var L=pt;return ve||(L=y,at(L),lt==null||lt(L,d)),L}function p(y){y.which===V.Z.LEFT?S(!1,y):y.which===V.Z.RIGHT&&S(!0,y),$t==null||$t(y)}function h(y){var d=S(!pt,y);Oe==null||Oe(d,y)}var g=A()(Fe,Re,(ge={},(0,R.Z)(ge,"".concat(Fe,"-checked"),pt),(0,R.Z)(ge,"".concat(Fe,"-disabled"),ve),ge));return E.createElement("button",(0,xe.Z)({},vt,{type:"button",role:"switch","aria-checked":pt,disabled:ve,className:g,ref:we,onKeyDown:p,onClick:h}),Qe,E.createElement("span",{className:"".concat(Fe,"-inner")},E.createElement("span",{className:"".concat(Fe,"-inner-checked")},je),E.createElement("span",{className:"".concat(Fe,"-inner-unchecked")},Be)))});G.displayName="Switch";var le=G,ke=m(14088),ue=m(36355),de=m(1684),_e=m(19716),Pe=m(64993),Ue=m(17313),Ce=m(83116),pe=m(37613);const q=z=>{const{componentCls:we,trackHeightSM:ge,trackPadding:Te,trackMinWidthSM:Fe,innerMinMarginSM:Re,innerMaxMarginSM:X,handleSizeSM:w}=z,ve=`${we}-inner`;return{[we]:{[`&${we}-small`]:{minWidth:Fe,height:ge,lineHeight:`${ge}px`,[`${we}-inner`]:{paddingInlineStart:X,paddingInlineEnd:Re,[`${ve}-checked`]:{marginInlineStart:`calc(-100% + ${w+Te*2}px - ${X*2}px)`,marginInlineEnd:`calc(100% - ${w+Te*2}px + ${X*2}px)`},[`${ve}-unchecked`]:{marginTop:-ge,marginInlineStart:0,marginInlineEnd:0}},[`${we}-handle`]:{width:w,height:w},[`${we}-loading-icon`]:{top:(w-z.switchLoadingIconSize)/2,fontSize:z.switchLoadingIconSize},[`&${we}-checked`]:{[`${we}-inner`]:{paddingInlineStart:Re,paddingInlineEnd:X,[`${ve}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${ve}-unchecked`]:{marginInlineStart:`calc(100% - ${w+Te*2}px + ${X*2}px)`,marginInlineEnd:`calc(-100% + ${w+Te*2}px - ${X*2}px)`}},[`${we}-handle`]:{insetInlineStart:`calc(100% - ${w+Te}px)`}},[`&:not(${we}-disabled):active`]:{[`&:not(${we}-checked) ${ve}`]:{[`${ve}-unchecked`]:{marginInlineStart:z.marginXXS/2,marginInlineEnd:-z.marginXXS/2}},[`&${we}-checked ${ve}`]:{[`${ve}-checked`]:{marginInlineStart:-z.marginXXS/2,marginInlineEnd:z.marginXXS/2}}}}}}},_=z=>{const{componentCls:we,handleSize:ge}=z;return{[we]:{[`${we}-loading-icon${z.iconCls}`]:{position:"relative",top:(ge-z.fontSize)/2,color:z.switchLoadingIconColor,verticalAlign:"top"},[`&${we}-checked ${we}-loading-icon`]:{color:z.switchColor}}}},ie=z=>{const{componentCls:we,motion:ge,trackPadding:Te,handleBg:Fe,handleShadow:Re,handleSize:X}=z,w=`${we}-handle`;return{[we]:{[w]:{position:"absolute",top:Te,insetInlineStart:Te,width:X,height:X,transition:`all ${z.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Fe,borderRadius:X/2,boxShadow:Re,transition:`all ${z.switchDuration} ease-in-out`,content:'""'}},[`&${we}-checked ${w}`]:{insetInlineStart:`calc(100% - ${X+Te}px)`},[`&:not(${we}-disabled):active`]:ge?{[`${w}::before`]:{insetInlineEnd:z.switchHandleActiveInset,insetInlineStart:0},[`&${we}-checked ${w}::before`]:{insetInlineEnd:0,insetInlineStart:z.switchHandleActiveInset}}:{}}}},ae=z=>{const{componentCls:we,trackHeight:ge,trackPadding:Te,innerMinMargin:Fe,innerMaxMargin:Re,handleSize:X}=z,w=`${we}-inner`;return{[we]:{[w]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Re,paddingInlineEnd:Fe,transition:`padding-inline-start ${z.switchDuration} ease-in-out, padding-inline-end ${z.switchDuration} ease-in-out`,[`${w}-checked, ${w}-unchecked`]:{display:"block",color:z.colorTextLightSolid,fontSize:z.fontSizeSM,transition:`margin-inline-start ${z.switchDuration} ease-in-out, margin-inline-end ${z.switchDuration} ease-in-out`,pointerEvents:"none"},[`${w}-checked`]:{marginInlineStart:`calc(-100% + ${X+Te*2}px - ${Re*2}px)`,marginInlineEnd:`calc(100% - ${X+Te*2}px + ${Re*2}px)`},[`${w}-unchecked`]:{marginTop:-ge,marginInlineStart:0,marginInlineEnd:0}},[`&${we}-checked ${w}`]:{paddingInlineStart:Fe,paddingInlineEnd:Re,[`${w}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${w}-unchecked`]:{marginInlineStart:`calc(100% - ${X+Te*2}px + ${Re*2}px)`,marginInlineEnd:`calc(-100% + ${X+Te*2}px - ${Re*2}px)`}},[`&:not(${we}-disabled):active`]:{[`&:not(${we}-checked) ${w}`]:{[`${w}-unchecked`]:{marginInlineStart:Te*2,marginInlineEnd:-Te*2}},[`&${we}-checked ${w}`]:{[`${w}-checked`]:{marginInlineStart:-Te*2,marginInlineEnd:Te*2}}}}}},Se=z=>{const{componentCls:we,trackHeight:ge,trackMinWidth:Te}=z;return{[we]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ue.Wf)(z)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Te,height:ge,lineHeight:`${ge}px`,verticalAlign:"middle",background:z.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${z.motionDurationMid}`,userSelect:"none",[`&:hover:not(${we}-disabled)`]:{background:z.colorTextTertiary}}),(0,Ue.Qy)(z)),{[`&${we}-checked`]:{background:z.switchColor,[`&:hover:not(${we}-disabled)`]:{background:z.colorPrimaryHover}},[`&${we}-loading, &${we}-disabled`]:{cursor:"not-allowed",opacity:z.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${we}-rtl`]:{direction:"rtl"}})}};var se=(0,Ce.Z)("Switch",z=>{const we=(0,pe.TS)(z,{switchDuration:z.motionDurationMid,switchColor:z.colorPrimary,switchDisabledOpacity:z.opacityLoading,switchLoadingIconSize:z.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${z.opacityLoading})`,switchHandleActiveInset:"-30%"});return[Se(we),ae(we),ie(we),_(we),q(we)]},z=>{const{fontSize:we,lineHeight:ge,controlHeight:Te,colorWhite:Fe}=z,Re=we*ge,X=Te/2,w=2,ve=Re-w*2,Qe=X-w*2;return{trackHeight:Re,trackHeightSM:X,trackMinWidth:ve*2+w*4,trackMinWidthSM:Qe*2+w*2,trackPadding:w,handleBg:Fe,handleSize:ve,handleSizeSM:Qe,handleShadow:`0 2px 4px 0 ${new Pe.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:ve/2,innerMaxMargin:ve+w+w*2,innerMinMarginSM:Qe/2,innerMaxMarginSM:Qe+w+w*2}}),be=function(z,we){var ge={};for(var Te in z)Object.prototype.hasOwnProperty.call(z,Te)&&we.indexOf(Te)<0&&(ge[Te]=z[Te]);if(z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Fe=0,Te=Object.getOwnPropertySymbols(z);Fe<Te.length;Fe++)we.indexOf(Te[Fe])<0&&Object.prototype.propertyIsEnumerable.call(z,Te[Fe])&&(ge[Te[Fe]]=z[Te[Fe]]);return ge};const D=E.forwardRef((z,we)=>{const{prefixCls:ge,size:Te,disabled:Fe,loading:Re,className:X,rootClassName:w,style:ve}=z,Qe=be(z,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:je,direction:Be,switch:Oe}=E.useContext(ue.E_),lt=E.useContext(de.Z),$t=(Fe!=null?Fe:lt)||Re,vt=je("switch",ge),Tt=E.createElement("div",{className:`${vt}-handle`},Re&&E.createElement(K.Z,{className:`${vt}-loading-icon`})),[wt,pt]=se(vt),at=(0,_e.Z)(Te),S=A()(Oe==null?void 0:Oe.className,{[`${vt}-small`]:at==="small",[`${vt}-loading`]:Re,[`${vt}-rtl`]:Be==="rtl"},X,w,pt),p=Object.assign(Object.assign({},Oe==null?void 0:Oe.style),ve);return wt(E.createElement(ke.Z,{component:"Switch"},E.createElement(le,Object.assign({},Qe,{prefixCls:vt,className:S,style:p,disabled:$t,ref:we,loadingIcon:Tt}))))});D.__ANT_SWITCH=!0;var Le=D},1710:function(yn,dt,m){"use strict";m.d(dt,{default:function(){return iu}});var K={},j="rc-table-internal-hook",A=m(42978),xe=m(6089),R=m(34280),N=m(13697),x=m(59301),E=m(4676);function F(B){var W=x.createContext(void 0),me=function(Ve){var ze=Ve.value,it=Ve.children,rt=x.useRef(ze);rt.current=ze;var nt=x.useState(function(){return{getValue:function(){return rt.current},listeners:new Set}}),kt=(0,A.Z)(nt,1),zt=kt[0];return(0,R.Z)(function(){(0,E.unstable_batchedUpdates)(function(){zt.listeners.forEach(function(Lt){Lt(ze)})})},[ze]),x.createElement(W.Provider,{value:zt},it)};return{Context:W,Provider:me,defaultValue:B}}function V(B,W){var me=(0,xe.Z)(typeof W=="function"?W:function(Lt){if(W===void 0)return Lt;if(!Array.isArray(W))return Lt[W];var qt={};return W.forEach(function(Xt){qt[Xt]=Lt[Xt]}),qt}),De=x.useContext(B==null?void 0:B.Context),Ve=De||{},ze=Ve.listeners,it=Ve.getValue,rt=x.useRef();rt.current=me(De?it():B==null?void 0:B.defaultValue);var nt=x.useState({}),kt=(0,A.Z)(nt,2),zt=kt[1];return(0,R.Z)(function(){if(!De)return;function Lt(qt){var Xt=me(qt);(0,N.Z)(rt.current,Xt,!0)||zt({})}return ze.add(Lt),function(){ze.delete(Lt)}},[De]),rt.current}var Ie=m(54476),G=m(8654);function le(){var B=x.createContext(null);function W(){return x.useContext(B)}function me(Ve,ze){var it=(0,G.Yr)(Ve),rt=function(kt,zt){var Lt=it?{ref:zt}:{},qt=x.useRef(0),Xt=x.useRef(kt),Jt=W();return Jt!==null?x.createElement(Ve,(0,Ie.Z)({},kt,Lt)):((!ze||ze(Xt.current,kt))&&(qt.current+=1),Xt.current=kt,x.createElement(B.Provider,{value:qt.current},x.createElement(Ve,(0,Ie.Z)({},kt,Lt))))};return it?x.forwardRef(rt):rt}function De(Ve,ze){var it=(0,G.Yr)(Ve),rt=function(kt,zt){var Lt=it?{ref:zt}:{};return W(),x.createElement(Ve,(0,Ie.Z)({},kt,Lt))};return it?x.memo(x.forwardRef(rt),ze):x.memo(rt,ze)}return{makeImmutable:me,responseImmutable:De,useImmutableMark:W}}var ke=le(),ue=ke.makeImmutable,de=ke.responseImmutable,_e=ke.useImmutableMark,Pe=le(),Ue=Pe.makeImmutable,Ce=Pe.responseImmutable,pe=Pe.useImmutableMark,q=F(),_=q;function ie(B,W){var me=x.useRef(0);me.current+=1;var De=x.useRef(B),Ve=[];Object.keys(B||{}).map(function(it){var rt;(B==null?void 0:B[it])!==((rt=De.current)===null||rt===void 0?void 0:rt[it])&&Ve.push(it)}),De.current=B;var ze=x.useRef([]);return Ve.length&&(ze.current=Ve),x.useDebugValue(me.current),x.useDebugValue(ze.current.join(", ")),W&&console.log("".concat(W,":"),me.current,ze.current),me.current}var ae=null,Se=x.memo(function(){var B=ie();return x.createElement("h1",null,"Render Times: ",B)});Se.displayName="RenderBlock";var se=m(76190),be=m(33885),D=m(20068),Le=m(92310),z=m.n(Le),we=m(80547),ge=m(97938),Te=m(48736),Fe=x.createContext({renderWithProps:!1}),Re=Fe,X="RC_TABLE_KEY";function w(B){return B==null?[]:Array.isArray(B)?B:[B]}function ve(B){var W=[],me={};return B.forEach(function(De){for(var Ve=De||{},ze=Ve.key,it=Ve.dataIndex,rt=ze||w(it).join("-")||X;me[rt];)rt="".concat(rt,"_next");me[rt]=!0,W.push(rt)}),W}function Qe(B){return B!=null}function je(B){return B&&(0,se.Z)(B)==="object"&&!Array.isArray(B)&&!x.isValidElement(B)}function Be(B,W,me,De,Ve,ze){var it=x.useContext(Re),rt=pe(),nt=(0,we.Z)(function(){if(Qe(De))return[De];var kt=W==null||W===""?[]:Array.isArray(W)?W:[W],zt=(0,ge.Z)(B,kt),Lt=zt,qt=void 0;if(Ve){var Xt=Ve(zt,B,me);je(Xt)?(Lt=Xt.children,qt=Xt.props,it.renderWithProps=!0):Lt=Xt}return[Lt,qt]},[rt,B,De,W,Ve,me],function(kt,zt){if(ze){var Lt=(0,A.Z)(kt,2),qt=Lt[1],Xt=(0,A.Z)(zt,2),Jt=Xt[1];return ze(Jt,qt)}return it.renderWithProps?!0:!(0,N.Z)(kt,zt,!0)});return nt}function Oe(B,W,me,De){var Ve=B+W-1;return B<=De&&Ve>=me}function lt(B,W){return V(_,function(me){var De=Oe(B,W||1,me.hoverStartRow,me.hoverEndRow);return[De,me.onHover]})}var $t=function(W){var me=W.ellipsis,De=W.rowType,Ve=W.children,ze,it=me===!0?{showTitle:!0}:me;return it&&(it.showTitle||De==="header")&&(typeof Ve=="string"||typeof Ve=="number"?ze=Ve.toString():x.isValidElement(Ve)&&typeof Ve.props.children=="string"&&(ze=Ve.props.children)),ze};function vt(B){var W,me,De,Ve,ze,it,rt,nt,kt=B.component,zt=B.children,Lt=B.ellipsis,qt=B.scope,Xt=B.prefixCls,Jt=B.className,En=B.align,fn=B.record,_n=B.render,gn=B.dataIndex,Fn=B.renderIndex,yr=B.shouldCellUpdate,Sr=B.index,nr=B.rowType,Tr=B.colSpan,Kr=B.rowSpan,Wn=B.fixLeft,lr=B.fixRight,Xn=B.firstFixLeft,un=B.lastFixLeft,Yn=B.firstFixRight,Ir=B.lastFixRight,Vr=B.appendNode,kr=B.additionalProps,Tn=kr===void 0?{}:kr,Nr=B.isSticky,Hr="".concat(Xt,"-cell"),fi=V(_,["supportSticky","allColumnsFixedLeft"]),si=fi.supportSticky,ji=fi.allColumnsFixedLeft,$i=Be(fn,gn,Fn,zt,_n,yr),Fr=(0,A.Z)($i,2),ca=Fr[0],ei=Fr[1],Ri={},Pi=typeof Wn=="number"&&si,Sa=typeof lr=="number"&&si;Pi&&(Ri.position="sticky",Ri.left=Wn),Sa&&(Ri.position="sticky",Ri.right=lr);var Er=(W=(me=(De=ei==null?void 0:ei.colSpan)!==null&&De!==void 0?De:Tn.colSpan)!==null&&me!==void 0?me:Tr)!==null&&W!==void 0?W:1,Cr=(Ve=(ze=(it=ei==null?void 0:ei.rowSpan)!==null&&it!==void 0?it:Tn.rowSpan)!==null&&ze!==void 0?ze:Kr)!==null&&Ve!==void 0?Ve:1,wr=lt(Sr,Cr),fr=(0,A.Z)(wr,2),li=fr[0],br=fr[1],Rr=function(ha){var Aa;fn&&br(Sr,Sr+Cr-1),Tn==null||(Aa=Tn.onMouseEnter)===null||Aa===void 0||Aa.call(Tn,ha)},ti=function(ha){var Aa;fn&&br(-1,-1),Tn==null||(Aa=Tn.onMouseLeave)===null||Aa===void 0||Aa.call(Tn,ha)};if(Er===0||Cr===0)return null;var Yr=(rt=Tn.title)!==null&&rt!==void 0?rt:$t({rowType:nr,ellipsis:Lt,children:ca}),Va=z()(Hr,Jt,(nt={},(0,D.Z)(nt,"".concat(Hr,"-fix-left"),Pi&&si),(0,D.Z)(nt,"".concat(Hr,"-fix-left-first"),Xn&&si),(0,D.Z)(nt,"".concat(Hr,"-fix-left-last"),un&&si),(0,D.Z)(nt,"".concat(Hr,"-fix-left-all"),un&&ji&&si),(0,D.Z)(nt,"".concat(Hr,"-fix-right"),Sa&&si),(0,D.Z)(nt,"".concat(Hr,"-fix-right-first"),Yn&&si),(0,D.Z)(nt,"".concat(Hr,"-fix-right-last"),Ir&&si),(0,D.Z)(nt,"".concat(Hr,"-ellipsis"),Lt),(0,D.Z)(nt,"".concat(Hr,"-with-append"),Vr),(0,D.Z)(nt,"".concat(Hr,"-fix-sticky"),(Pi||Sa)&&Nr&&si),(0,D.Z)(nt,"".concat(Hr,"-row-hover"),!ei&&li),nt),Tn.className,ei==null?void 0:ei.className),Ca={};En&&(Ca.textAlign=En);var Zo=(0,be.Z)((0,be.Z)((0,be.Z)((0,be.Z)({},Ri),Tn.style),Ca),ei==null?void 0:ei.style),ua=ca;return(0,se.Z)(ua)==="object"&&!Array.isArray(ua)&&!x.isValidElement(ua)&&(ua=null),Lt&&(un||Yn)&&(ua=x.createElement("span",{className:"".concat(Hr,"-content")},ua)),x.createElement(kt,(0,Ie.Z)({},ei,Tn,{className:Va,style:Zo,title:Yr,scope:qt,onMouseEnter:Rr,onMouseLeave:ti,colSpan:Er!==1?Er:null,rowSpan:Cr!==1?Cr:null}),Vr,ua)}var Tt=x.memo(vt);function wt(B,W,me,De,Ve,ze){var it=me[B]||{},rt=me[W]||{},nt,kt;it.fixed==="left"?nt=De.left[Ve==="rtl"?W:B]:rt.fixed==="right"&&(kt=De.right[Ve==="rtl"?B:W]);var zt=!1,Lt=!1,qt=!1,Xt=!1,Jt=me[W+1],En=me[B-1],fn=!(ze!=null&&ze.children);if(Ve==="rtl"){if(nt!==void 0){var _n=En&&En.fixed==="left";Xt=!_n&&fn}else if(kt!==void 0){var gn=Jt&&Jt.fixed==="right";qt=!gn&&fn}}else if(nt!==void 0){var Fn=Jt&&Jt.fixed==="left";zt=!Fn&&fn}else if(kt!==void 0){var yr=En&&En.fixed==="right";Lt=!yr&&fn}return{fixLeft:nt,fixRight:kt,lastFixLeft:zt,firstFixRight:Lt,lastFixRight:qt,firstFixLeft:Xt,isSticky:De.isSticky}}var pt=x.createContext({}),at=pt;function S(B){var W=B.className,me=B.index,De=B.children,Ve=B.colSpan,ze=Ve===void 0?1:Ve,it=B.rowSpan,rt=B.align,nt=V(_,["prefixCls","direction"]),kt=nt.prefixCls,zt=nt.direction,Lt=x.useContext(at),qt=Lt.scrollColumnIndex,Xt=Lt.stickyOffsets,Jt=Lt.flattenColumns,En=Lt.columns,fn=me+ze-1,_n=fn+1===qt?ze+1:ze,gn=wt(me,me+_n-1,Jt,Xt,zt,En==null?void 0:En[me]);return x.createElement(Tt,(0,Ie.Z)({className:W,index:me,component:"td",prefixCls:kt,record:null,dataIndex:null,align:rt,colSpan:_n,rowSpan:it,render:function(){return De}},gn))}var p=m(75931),h=["children"];function g(B){var W=B.children,me=(0,p.Z)(B,h);return x.createElement("tr",me,W)}function y(B){var W=B.children;return W}y.Row=g,y.Cell=S;var d=y;function L(B){var W=B.children,me=B.stickyOffsets,De=B.flattenColumns,Ve=B.columns,ze=V(_,"prefixCls"),it=De.length-1,rt=De[it],nt=x.useMemo(function(){return{stickyOffsets:me,flattenColumns:De,scrollColumnIndex:rt!=null&&rt.scrollbar?it:null,columns:Ve}},[rt,De,it,me,Ve]);return x.createElement(at.Provider,{value:nt},x.createElement("tfoot",{className:"".concat(ze,"-summary")},W))}var fe=Ce(L),O=d,I=m(70425),he=m(29301),Y=m(29194),U=m(24514),ye=m(75152),Ye=m(26112);function ce(B,W,me,De,Ve,ze,it){B.push({record:W,indent:me,index:it});var rt=ze(W),nt=Ve==null?void 0:Ve.has(rt);if(W&&Array.isArray(W[De])&&nt)for(var kt=0;kt<W[De].length;kt+=1)ce(B,W[De][kt],me+1,De,Ve,ze,kt)}function Ae(B,W,me,De){var Ve=x.useMemo(function(){if(me!=null&&me.size){for(var ze=[],it=0;it<(B==null?void 0:B.length);it+=1){var rt=B[it];ce(ze,rt,0,W,me,De,it)}return ze}return B==null?void 0:B.map(function(nt,kt){return{record:nt,indent:0,index:kt}})},[B,W,me,De]);return Ve}function qe(B){var W=B.prefixCls,me=B.children,De=B.component,Ve=B.cellComponent,ze=B.className,it=B.expanded,rt=B.colSpan,nt=B.isEmpty,kt=V(_,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),zt=kt.scrollbarSize,Lt=kt.fixHeader,qt=kt.fixColumn,Xt=kt.componentWidth,Jt=kt.horizonScroll,En=me;return(nt?Jt&&Xt:qt)&&(En=x.createElement("div",{style:{width:Xt-(Lt?zt:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(W,"-expanded-row-fixed")},En)),x.createElement(De,{className:ze,style:{display:it?null:"none"}},x.createElement(Tt,{component:Ve,prefixCls:W,colSpan:rt},En))}var oe=qe;function T(B,W,me,De){var Ve=V(_,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),ze=Ve.flattenColumns,it=Ve.expandableType,rt=Ve.expandedKeys,nt=Ve.childrenColumnName,kt=Ve.onTriggerExpand,zt=Ve.rowExpandable,Lt=Ve.onRow,qt=Ve.expandRowByClick,Xt=Ve.rowClassName,Jt=it==="nest",En=it==="row"&&(!zt||zt(B)),fn=En||Jt,_n=rt&&rt.has(W),gn=nt&&B&&B[nt],Fn=(0,I.useEvent)(kt),yr=Lt==null?void 0:Lt(B,me),Sr=yr==null?void 0:yr.onClick,nr=function(lr){qt&&fn&&kt(B,lr);for(var Xn=arguments.length,un=new Array(Xn>1?Xn-1:0),Yn=1;Yn<Xn;Yn++)un[Yn-1]=arguments[Yn];Sr==null||Sr.apply(void 0,[lr].concat(un))},Tr;typeof Xt=="string"?Tr=Xt:typeof Xt=="function"&&(Tr=Xt(B,me,De));var Kr=ve(ze);return(0,be.Z)((0,be.Z)({},Ve),{},{columnsKey:Kr,nestExpandable:Jt,expanded:_n,hasNestChildren:gn,record:B,onTriggerExpand:Fn,rowSupportExpand:En,expandable:fn,rowProps:(0,be.Z)((0,be.Z)({},yr),{},{className:z()(Tr,yr==null?void 0:yr.className),onClick:nr})})}function re(B,W,me,De,Ve){var ze=B.record,it=B.prefixCls,rt=B.columnsKey,nt=B.fixedInfoList,kt=B.expandIconColumnIndex,zt=B.nestExpandable,Lt=B.indentSize,qt=B.expandIcon,Xt=B.expanded,Jt=B.hasNestChildren,En=B.onTriggerExpand,fn=rt[me],_n=nt[me],gn;me===(kt||0)&&zt&&(gn=x.createElement(x.Fragment,null,x.createElement("span",{style:{paddingLeft:"".concat(Lt*De,"px")},className:"".concat(it,"-row-indent indent-level-").concat(De)}),qt({prefixCls:it,expanded:Xt,expandable:Jt,record:ze,onExpand:En})));var Fn;return W.onCell&&(Fn=W.onCell(ze,Ve)),{key:fn,fixedInfo:_n,appendCellNode:gn,additionalCellProps:Fn||{}}}function $e(B){var W=B.className,me=B.style,De=B.record,Ve=B.index,ze=B.renderIndex,it=B.rowKey,rt=B.indent,nt=rt===void 0?0:rt,kt=B.rowComponent,zt=B.cellComponent,Lt=B.scopeCellComponent,qt=T(De,it,Ve,nt),Xt=qt.prefixCls,Jt=qt.flattenColumns,En=qt.expandedRowClassName,fn=qt.expandedRowRender,_n=qt.rowProps,gn=qt.expanded,Fn=qt.rowSupportExpand,yr=x.useState(!1),Sr=(0,A.Z)(yr,2),nr=Sr[0],Tr=Sr[1];x.useEffect(function(){gn&&Tr(!0)},[gn]);var Kr=x.createElement(kt,(0,Ie.Z)({},_n,{"data-row-key":it,className:z()(W,"".concat(Xt,"-row"),"".concat(Xt,"-row-level-").concat(nt),_n==null?void 0:_n.className),style:(0,be.Z)((0,be.Z)({},me),_n==null?void 0:_n.style)}),Jt.map(function(un,Yn){var Ir=un.render,Vr=un.dataIndex,kr=un.className,Tn=re(qt,un,Yn,nt,Ve),Nr=Tn.key,Hr=Tn.fixedInfo,fi=Tn.appendCellNode,si=Tn.additionalCellProps;return x.createElement(Tt,(0,Ie.Z)({className:kr,ellipsis:un.ellipsis,align:un.align,scope:un.rowScope,component:un.rowScope?Lt:zt,prefixCls:Xt,key:Nr,record:De,index:Ve,renderIndex:ze,dataIndex:Vr,render:Ir,shouldCellUpdate:un.shouldCellUpdate},Hr,{appendNode:fi,additionalProps:si}))})),Wn;if(Fn&&(nr||gn)){var lr=fn(De,Ve,nt+1,gn),Xn=En&&En(De,Ve,nt);Wn=x.createElement(oe,{expanded:gn,className:z()("".concat(Xt,"-expanded-row"),"".concat(Xt,"-expanded-row-level-").concat(nt+1),Xn),prefixCls:Xt,component:kt,cellComponent:zt,colSpan:Jt.length,isEmpty:!1},lr)}return x.createElement(x.Fragment,null,Kr,Wn)}$e.displayName="BodyRow";var Ne=Ce($e);function Xe(B){var W=B.columnKey,me=B.onColumnResize,De=x.useRef();return x.useEffect(function(){De.current&&me(W,De.current.offsetWidth)},[]),x.createElement(he.Z,{data:W},x.createElement("td",{ref:De,style:{padding:0,border:0,height:0}},x.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ct(B){var W=B.prefixCls,me=B.columnsKey,De=B.onColumnResize;return x.createElement("tr",{"aria-hidden":"true",className:"".concat(W,"-measure-row"),style:{height:0,fontSize:0}},x.createElement(he.Z.Collection,{onBatchResize:function(ze){ze.forEach(function(it){var rt=it.data,nt=it.size;De(rt,nt.offsetWidth)})}},me.map(function(Ve){return x.createElement(Xe,{key:Ve,columnKey:Ve,onColumnResize:De})})))}function mt(B){var W=B.data,me=B.measureColumnWidth,De=V(_,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Ve=De.prefixCls,ze=De.getComponent,it=De.onColumnResize,rt=De.flattenColumns,nt=De.getRowKey,kt=De.expandedKeys,zt=De.childrenColumnName,Lt=De.emptyNode,qt=Ae(W,zt,kt,nt),Xt=x.useRef({renderWithProps:!1}),Jt=ze(["body","wrapper"],"tbody"),En=ze(["body","row"],"tr"),fn=ze(["body","cell"],"td"),_n=ze(["body","cell"],"th"),gn;W.length?gn=qt.map(function(yr,Sr){var nr=yr.record,Tr=yr.indent,Kr=yr.index,Wn=nt(nr,Sr);return x.createElement(Ne,{key:Wn,rowKey:Wn,record:nr,index:Sr,renderIndex:Kr,rowComponent:En,cellComponent:fn,scopeCellComponent:_n,getRowKey:nt,indent:Tr})}):gn=x.createElement(oe,{expanded:!0,className:"".concat(Ve,"-placeholder"),prefixCls:Ve,component:En,cellComponent:fn,colSpan:rt.length,isEmpty:!0},Lt);var Fn=ve(rt);return x.createElement(Re.Provider,{value:Xt.current},x.createElement(Jt,{className:"".concat(Ve,"-tbody")},me&&x.createElement(ct,{prefixCls:Ve,columnsKey:Fn,onColumnResize:it}),gn))}mt.displayName="Body";var yt=Ce(mt),Bt=["expandable"],Ft="RC_TABLE_INTERNAL_COL_DEFINE";function _t(B){var W=B.expandable,me=(0,p.Z)(B,Bt),De;return"expandable"in B?De=(0,be.Z)((0,be.Z)({},me),W):De=me,De.showExpandColumn===!1&&(De.expandIconColumnIndex=-1),De}var Yt=["columnType"];function rn(B){for(var W=B.colWidths,me=B.columns,De=B.columCount,Ve=[],ze=De||me.length,it=!1,rt=ze-1;rt>=0;rt-=1){var nt=W[rt],kt=me&&me[rt],zt=kt&&kt[Ft];if(nt||zt||it){var Lt=zt||{},qt=Lt.columnType,Xt=(0,p.Z)(Lt,Yt);Ve.unshift(x.createElement("col",(0,Ie.Z)({key:rt,style:{width:nt}},Xt))),it=!0}}return x.createElement("colgroup",null,Ve)}var hn=rn,Wt=m(94480),on=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function xn(B,W){return(0,x.useMemo)(function(){for(var me=[],De=0;De<W;De+=1){var Ve=B[De];if(Ve!==void 0)me[De]=Ve;else return null}return me},[B.join("_"),W])}var Vt=x.forwardRef(function(B,W){var me=B.className,De=B.noData,Ve=B.columns,ze=B.flattenColumns,it=B.colWidths,rt=B.columCount,nt=B.stickyOffsets,kt=B.direction,zt=B.fixHeader,Lt=B.stickyTopOffset,qt=B.stickyBottomOffset,Xt=B.stickyClassName,Jt=B.onScroll,En=B.maxContentScroll,fn=B.children,_n=(0,p.Z)(B,on),gn=V(_,["prefixCls","scrollbarSize","isSticky"]),Fn=gn.prefixCls,yr=gn.scrollbarSize,Sr=gn.isSticky,nr=Sr&&!zt?0:yr,Tr=x.useRef(null),Kr=x.useCallback(function(kr){(0,G.mH)(W,kr),(0,G.mH)(Tr,kr)},[]);x.useEffect(function(){var kr;function Tn(Nr){var Hr=Nr,fi=Hr.currentTarget,si=Hr.deltaX;si&&(Jt({currentTarget:fi,scrollLeft:fi.scrollLeft+si}),Nr.preventDefault())}return(kr=Tr.current)===null||kr===void 0||kr.addEventListener("wheel",Tn),function(){var Nr;(Nr=Tr.current)===null||Nr===void 0||Nr.removeEventListener("wheel",Tn)}},[]);var Wn=x.useMemo(function(){return ze.every(function(kr){return kr.width})},[ze]),lr=ze[ze.length-1],Xn={fixed:lr?lr.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Fn,"-cell-scrollbar")}}},un=(0,x.useMemo)(function(){return nr?[].concat((0,Wt.Z)(Ve),[Xn]):Ve},[nr,Ve]),Yn=(0,x.useMemo)(function(){return nr?[].concat((0,Wt.Z)(ze),[Xn]):ze},[nr,ze]),Ir=(0,x.useMemo)(function(){var kr=nt.right,Tn=nt.left;return(0,be.Z)((0,be.Z)({},nt),{},{left:kt==="rtl"?[].concat((0,Wt.Z)(Tn.map(function(Nr){return Nr+nr})),[0]):Tn,right:kt==="rtl"?kr:[].concat((0,Wt.Z)(kr.map(function(Nr){return Nr+nr})),[0]),isSticky:Sr})},[nr,nt,Sr]),Vr=xn(it,rt);return x.createElement("div",{style:(0,be.Z)({overflow:"hidden"},Sr?{top:Lt,bottom:qt}:{}),ref:Kr,className:z()(me,(0,D.Z)({},Xt,!!Xt))},x.createElement("table",{style:{tableLayout:"fixed",visibility:De||Vr?null:"hidden"}},(!De||!En||Wn)&&x.createElement(hn,{colWidths:Vr?[].concat((0,Wt.Z)(Vr),[nr]):[],columCount:rt+1,columns:Yn}),fn((0,be.Z)((0,be.Z)({},_n),{},{stickyOffsets:Ir,columns:un,flattenColumns:Yn}))))});Vt.displayName="FixedHolder";var Mn=x.memo(Vt);function qn(B){var W=B.cells,me=B.stickyOffsets,De=B.flattenColumns,Ve=B.rowComponent,ze=B.cellComponent,it=B.tdCellComponent,rt=B.onHeaderRow,nt=B.index,kt=V(_,["prefixCls","direction"]),zt=kt.prefixCls,Lt=kt.direction,qt;rt&&(qt=rt(W.map(function(Jt){return Jt.column}),nt));var Xt=ve(W.map(function(Jt){return Jt.column}));return x.createElement(Ve,qt,W.map(function(Jt,En){var fn=Jt.column,_n=wt(Jt.colStart,Jt.colEnd,De,me,Lt,fn),gn;return fn&&fn.onHeaderCell&&(gn=Jt.column.onHeaderCell(fn)),x.createElement(Tt,(0,Ie.Z)({},Jt,{scope:fn.title?Jt.colSpan>1?"colgroup":"col":null,ellipsis:fn.ellipsis,align:fn.align,component:fn.title?ze:it,prefixCls:zt,key:Xt[En]},_n,{additionalProps:gn,rowType:"header"}))}))}qn.displayName="HeaderRow";var An=qn;function pr(B){var W=[];function me(it,rt){var nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;W[nt]=W[nt]||[];var kt=rt,zt=it.filter(Boolean).map(function(Lt){var qt={key:Lt.key,className:Lt.className||"",children:Lt.title,column:Lt,colStart:kt},Xt=1,Jt=Lt.children;return Jt&&Jt.length>0&&(Xt=me(Jt,kt,nt+1).reduce(function(En,fn){return En+fn},0),qt.hasSubColumns=!0),"colSpan"in Lt&&(Xt=Lt.colSpan),"rowSpan"in Lt&&(qt.rowSpan=Lt.rowSpan),qt.colSpan=Xt,qt.colEnd=qt.colStart+Xt-1,W[nt].push(qt),kt+=Xt,Xt});return zt}me(B,0);for(var De=W.length,Ve=function(rt){W[rt].forEach(function(nt){!("rowSpan"in nt)&&!nt.hasSubColumns&&(nt.rowSpan=De-rt)})},ze=0;ze<De;ze+=1)Ve(ze);return W}function er(B){var W=B.stickyOffsets,me=B.columns,De=B.flattenColumns,Ve=B.onHeaderRow,ze=V(_,["prefixCls","getComponent"]),it=ze.prefixCls,rt=ze.getComponent,nt=x.useMemo(function(){return pr(me)},[me]),kt=rt(["header","wrapper"],"thead"),zt=rt(["header","row"],"tr"),Lt=rt(["header","cell"],"th"),qt=rt(["header","cell"],"td");return x.createElement(kt,{className:"".concat(it,"-thead")},nt.map(function(Xt,Jt){var En=x.createElement(An,{key:Jt,flattenColumns:De,cells:Xt,stickyOffsets:W,rowComponent:zt,cellComponent:Lt,tdCellComponent:qt,onHeaderRow:Ve,index:Jt});return En}))}var gr=Ce(er),$r=m(11592);function Rn(B){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof W=="number"?W:W.endsWith("%")?B*parseFloat(W)/100:null}function pn(B,W){return x.useMemo(function(){if(W&&W>0){var me=0,De=0;B.forEach(function(kt){var zt=Rn(W,kt.width);zt?me+=zt:De+=1});var Ve=W-me,ze=De,it=Ve/De,rt=0,nt=B.map(function(kt){var zt=(0,be.Z)({},kt),Lt=Rn(W,zt.width);if(Lt)zt.width=Lt;else{var qt=Math.floor(it);zt.width=ze===1?Ve:qt,Ve-=qt,ze-=1}return rt+=zt.width,zt});return[nt,rt]}return[B,W]},[B,W])}var tr=["children"],Ke=["fixed"];function H(B){return(0,$r.Z)(B).filter(function(W){return x.isValidElement(W)}).map(function(W){var me=W.key,De=W.props,Ve=De.children,ze=(0,p.Z)(De,tr),it=(0,be.Z)({key:me},ze);return Ve&&(it.children=H(Ve)),it})}function ee(B){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return B.filter(function(me){return me&&(0,se.Z)(me)==="object"}).reduce(function(me,De,Ve){var ze=De.fixed,it=ze===!0?"left":ze,rt="".concat(W,"-").concat(Ve),nt=De.children;return nt&&nt.length>0?[].concat((0,Wt.Z)(me),(0,Wt.Z)(ee(nt,rt).map(function(kt){return(0,be.Z)({fixed:it},kt)}))):[].concat((0,Wt.Z)(me),[(0,be.Z)((0,be.Z)({key:rt},De),{},{fixed:it})])},[])}function Q(B){for(var W=!0,me=0;me<B.length;me+=1){var De=B[me];if(W&&De.fixed!=="left")W=!1;else if(!W&&De.fixed==="left"){warning(!1,"Index ".concat(me-1," of `columns` missing `fixed='left'` prop."));break}}for(var Ve=!0,ze=B.length-1;ze>=0;ze-=1){var it=B[ze];if(Ve&&it.fixed!=="right")Ve=!1;else if(!Ve&&it.fixed==="right"){warning(!1,"Index ".concat(ze+1," of `columns` missing `fixed='right'` prop."));break}}}function J(B){return B.map(function(W){var me=W.fixed,De=(0,p.Z)(W,Ke),Ve=me;return me==="left"?Ve="right":me==="right"&&(Ve="left"),(0,be.Z)({fixed:Ve},De)})}function Ee(B,W){var me=B.prefixCls,De=B.columns,Ve=B.children,ze=B.expandable,it=B.expandedKeys,rt=B.columnTitle,nt=B.getRowKey,kt=B.onTriggerExpand,zt=B.expandIcon,Lt=B.rowExpandable,qt=B.expandIconColumnIndex,Xt=B.direction,Jt=B.expandRowByClick,En=B.columnWidth,fn=B.fixed,_n=B.scrollWidth,gn=x.useMemo(function(){return De||H(Ve)},[De,Ve]),Fn=x.useMemo(function(){if(ze){var lr,Xn=gn.slice();if(!Xn.includes(K)){var un=qt||0;un>=0&&Xn.splice(un,0,K)}var Yn=Xn.indexOf(K);Xn=Xn.filter(function(Tn,Nr){return Tn!==K||Nr===Yn});var Ir=gn[Yn],Vr;(fn==="left"||fn)&&!qt?Vr="left":(fn==="right"||fn)&&qt===gn.length?Vr="right":Vr=Ir?Ir.fixed:null;var kr=(lr={},(0,D.Z)(lr,Ft,{className:"".concat(me,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,D.Z)(lr,"title",rt),(0,D.Z)(lr,"fixed",Vr),(0,D.Z)(lr,"className","".concat(me,"-row-expand-icon-cell")),(0,D.Z)(lr,"width",En),(0,D.Z)(lr,"render",function(Nr,Hr,fi){var si=nt(Hr,fi),ji=it.has(si),$i=Lt?Lt(Hr):!0,Fr=zt({prefixCls:me,expanded:ji,expandable:$i,record:Hr,onExpand:kt});return Jt?x.createElement("span",{onClick:function(ei){return ei.stopPropagation()}},Fr):Fr}),lr);return Xn.map(function(Tn){return Tn===K?kr:Tn})}return gn.filter(function(Tn){return Tn!==K})},[ze,gn,nt,it,zt,Xt]),yr=x.useMemo(function(){var lr=Fn;return W&&(lr=W(lr)),lr.length||(lr=[{render:function(){return null}}]),lr},[W,Fn,Xt]),Sr=x.useMemo(function(){return Xt==="rtl"?J(ee(yr)):ee(yr)},[yr,Xt,_n]),nr=pn(Sr,_n),Tr=(0,A.Z)(nr,2),Kr=Tr[0],Wn=Tr[1];return[yr,Kr,Wn]}var Ze=Ee;function ft(B){var W,me=B.prefixCls,De=B.record,Ve=B.onExpand,ze=B.expanded,it=B.expandable,rt="".concat(me,"-row-expand-icon");if(!it)return x.createElement("span",{className:z()(rt,"".concat(me,"-row-spaced"))});var nt=function(zt){Ve(De,zt),zt.stopPropagation()};return x.createElement("span",{className:z()(rt,(W={},(0,D.Z)(W,"".concat(me,"-row-expanded"),ze),(0,D.Z)(W,"".concat(me,"-row-collapsed"),!ze),W)),onClick:nt})}function tt(B,W,me){var De=[];function Ve(ze){(ze||[]).forEach(function(it,rt){De.push(W(it,rt)),Ve(it[me])})}return Ve(B),De}function ut(B,W,me){var De=_t(B),Ve=De.expandIcon,ze=De.expandedRowKeys,it=De.defaultExpandedRowKeys,rt=De.defaultExpandAllRows,nt=De.expandedRowRender,kt=De.onExpand,zt=De.onExpandedRowsChange,Lt=De.childrenColumnName,qt=Ve||ft,Xt=Lt||"children",Jt=x.useMemo(function(){return nt?"row":B.expandable&&B.internalHooks===j&&B.expandable.__PARENT_RENDER_ICON__||W.some(function(Sr){return Sr&&(0,se.Z)(Sr)==="object"&&Sr[Xt]})?"nest":!1},[!!nt,W]),En=x.useState(function(){return it||(rt?tt(W,me,Xt):[])}),fn=(0,A.Z)(En,2),_n=fn[0],gn=fn[1],Fn=x.useMemo(function(){return new Set(ze||_n||[])},[ze,_n]),yr=x.useCallback(function(Sr){var nr=me(Sr,W.indexOf(Sr)),Tr,Kr=Fn.has(nr);Kr?(Fn.delete(nr),Tr=(0,Wt.Z)(Fn)):Tr=[].concat((0,Wt.Z)(Fn),[nr]),gn(Tr),kt&&kt(!Kr,Sr),zt&&zt(Tr)},[me,Fn,W,kt,zt]);return[De,Jt,Fn,qt,Xt,yr]}function It(B,W,me,De){var Ve=B.map(function(ze,it){return wt(it,it,B,W,me,De==null?void 0:De[it])});return(0,we.Z)(function(){return Ve},[Ve],function(ze,it){return!(0,N.Z)(ze,it)})}function Pt(B){var W=(0,x.useRef)(B),me=(0,x.useState)({}),De=(0,A.Z)(me,2),Ve=De[1],ze=(0,x.useRef)(null),it=(0,x.useRef)([]);function rt(nt){it.current.push(nt);var kt=Promise.resolve();ze.current=kt,kt.then(function(){if(ze.current===kt){var zt=it.current,Lt=W.current;it.current=[],zt.forEach(function(qt){W.current=qt(W.current)}),ze.current=null,Lt!==W.current&&Ve({})}})}return(0,x.useEffect)(function(){return function(){ze.current=null}},[]),[W.current,rt]}function At(B){var W=(0,x.useRef)(B||null),me=(0,x.useRef)();function De(){window.clearTimeout(me.current)}function Ve(it){W.current=it,De(),me.current=window.setTimeout(function(){W.current=null,me.current=void 0},100)}function ze(){return W.current}return(0,x.useEffect)(function(){return De},[]),[Ve,ze]}function Ge(){var B=x.useState(-1),W=(0,A.Z)(B,2),me=W[0],De=W[1],Ve=x.useState(-1),ze=(0,A.Z)(Ve,2),it=ze[0],rt=ze[1],nt=x.useCallback(function(kt,zt){De(kt),rt(zt)},[]);return[me,it,nt]}var St=m(47273),Qt=(0,St.Z)()?window:null;function Kt(B,W){var me=(0,se.Z)(B)==="object"?B:{},De=me.offsetHeader,Ve=De===void 0?0:De,ze=me.offsetSummary,it=ze===void 0?0:ze,rt=me.offsetScroll,nt=rt===void 0?0:rt,kt=me.getContainer,zt=kt===void 0?function(){return Qt}:kt,Lt=zt()||Qt;return x.useMemo(function(){var qt=!!B;return{isSticky:qt,stickyClassName:qt?"".concat(W,"-sticky-holder"):"",offsetHeader:Ve,offsetSummary:it,offsetScroll:nt,container:Lt}},[nt,Ve,it,W,Lt])}function tn(B,W,me){var De=(0,x.useMemo)(function(){for(var Ve=[],ze=[],it=0,rt=0,nt=0;nt<W;nt+=1)if(me==="rtl"){ze[nt]=rt,rt+=B[nt]||0;var kt=W-nt-1;Ve[kt]=it,it+=B[kt]||0}else{Ve[nt]=it,it+=B[nt]||0;var zt=W-nt-1;ze[zt]=rt,rt+=B[zt]||0}return{left:Ve,right:ze}},[B,W,me]);return De}var Ut=tn;function Sn(B){var W=B.className,me=B.children;return x.createElement("div",{className:W},me)}var Nt=Sn,mn=m(8224),ot=m(55468),st=function(W,me){var De,Ve,ze=W.scrollBodyRef,it=W.onScroll,rt=W.offsetScroll,nt=W.container,kt=V(_,"prefixCls"),zt=((De=ze.current)===null||De===void 0?void 0:De.scrollWidth)||0,Lt=((Ve=ze.current)===null||Ve===void 0?void 0:Ve.clientWidth)||0,qt=zt&&Lt*(Lt/zt),Xt=x.useRef(),Jt=Pt({scrollLeft:0,isHiddenScrollBar:!1}),En=(0,A.Z)(Jt,2),fn=En[0],_n=En[1],gn=x.useRef({delta:0,x:0}),Fn=x.useState(!1),yr=(0,A.Z)(Fn,2),Sr=yr[0],nr=yr[1],Tr=function(){nr(!1)},Kr=function(Yn){Yn.persist(),gn.current.delta=Yn.pageX-fn.scrollLeft,gn.current.x=0,nr(!0),Yn.preventDefault()},Wn=function(Yn){var Ir,Vr=Yn||((Ir=window)===null||Ir===void 0?void 0:Ir.event),kr=Vr.buttons;if(!Sr||kr===0){Sr&&nr(!1);return}var Tn=gn.current.x+Yn.pageX-gn.current.x-gn.current.delta;Tn<=0&&(Tn=0),Tn+qt>=Lt&&(Tn=Lt-qt),it({scrollLeft:Tn/Lt*(zt+2)}),gn.current.x=Yn.pageX},lr=function(){if(ze.current){var Yn=(0,ot.os)(ze.current).top,Ir=Yn+ze.current.offsetHeight,Vr=nt===window?document.documentElement.scrollTop+window.innerHeight:(0,ot.os)(nt).top+nt.clientHeight;Ir-(0,ye.Z)()<=Vr||Yn>=Vr-rt?_n(function(kr){return(0,be.Z)((0,be.Z)({},kr),{},{isHiddenScrollBar:!0})}):_n(function(kr){return(0,be.Z)((0,be.Z)({},kr),{},{isHiddenScrollBar:!1})})}},Xn=function(Yn){_n(function(Ir){return(0,be.Z)((0,be.Z)({},Ir),{},{scrollLeft:Yn/zt*Lt||0})})};return x.useImperativeHandle(me,function(){return{setScrollLeft:Xn}}),x.useEffect(function(){var un=(0,mn.Z)(document.body,"mouseup",Tr,!1),Yn=(0,mn.Z)(document.body,"mousemove",Wn,!1);return lr(),function(){un.remove(),Yn.remove()}},[qt,Sr]),x.useEffect(function(){var un=(0,mn.Z)(nt,"scroll",lr,!1),Yn=(0,mn.Z)(window,"resize",lr,!1);return function(){un.remove(),Yn.remove()}},[nt]),x.useEffect(function(){fn.isHiddenScrollBar||_n(function(un){var Yn=ze.current;return Yn?(0,be.Z)((0,be.Z)({},un),{},{scrollLeft:Yn.scrollLeft/Yn.scrollWidth*Yn.clientWidth}):un})},[fn.isHiddenScrollBar]),zt<=Lt||!qt||fn.isHiddenScrollBar?null:x.createElement("div",{style:{height:(0,ye.Z)(),width:Lt,bottom:rt},className:"".concat(kt,"-sticky-scroll")},x.createElement("div",{onMouseDown:Kr,ref:Xt,className:z()("".concat(kt,"-sticky-scroll-bar"),(0,D.Z)({},"".concat(kt,"-sticky-scroll-bar-active"),Sr)),style:{width:"".concat(qt,"px"),transform:"translate3d(".concat(fn.scrollLeft,"px, 0, 0)")}}))},ht=x.forwardRef(st);function Mt(B){return null}var gt=Mt;function bt(B){return null}var xt=bt,Rt="rc-table",Gt=[],an={};function Pn(){return"No Data"}function Kn(B){var W,me=(0,be.Z)({rowKey:"key",prefixCls:Rt,emptyText:Pn},B),De=me.prefixCls,Ve=me.className,ze=me.rowClassName,it=me.style,rt=me.data,nt=me.rowKey,kt=me.scroll,zt=me.tableLayout,Lt=me.direction,qt=me.title,Xt=me.footer,Jt=me.summary,En=me.caption,fn=me.id,_n=me.showHeader,gn=me.components,Fn=me.emptyText,yr=me.onRow,Sr=me.onHeaderRow,nr=me.internalHooks,Tr=me.transformColumns,Kr=me.internalRefs,Wn=me.tailor,lr=me.sticky,Xn=rt||Gt,un=!!Xn.length,Yn=nr===j,Ir=x.useCallback(function(ui,Si){return(0,ge.Z)(gn,ui)||Si},[gn]),Vr=x.useMemo(function(){return typeof nt=="function"?nt:function(ui){var Si=ui&&ui[nt];return Si}},[nt]),kr=Ir(["body"]),Tn=Ge(),Nr=(0,A.Z)(Tn,3),Hr=Nr[0],fi=Nr[1],si=Nr[2],ji=ut(me,Xn,Vr),$i=(0,A.Z)(ji,6),Fr=$i[0],ca=$i[1],ei=$i[2],Ri=$i[3],Pi=$i[4],Sa=$i[5],Er=kt==null?void 0:kt.x,Cr=x.useState(0),wr=(0,A.Z)(Cr,2),fr=wr[0],li=wr[1],br=Ze((0,be.Z)((0,be.Z)((0,be.Z)({},me),Fr),{},{expandable:!!Fr.expandedRowRender,columnTitle:Fr.columnTitle,expandedKeys:ei,getRowKey:Vr,onTriggerExpand:Sa,expandIcon:Ri,expandIconColumnIndex:Fr.expandIconColumnIndex,direction:Lt,scrollWidth:Yn&&Wn&&typeof Er=="number"?Er:null}),Yn?Tr:null),Rr=(0,A.Z)(br,3),ti=Rr[0],Yr=Rr[1],Va=Rr[2],Ca=Va!=null?Va:Er,Zo=x.useMemo(function(){return{columns:ti,flattenColumns:Yr}},[ti,Yr]),ua=x.useRef(),Yo=x.useRef(),ha=x.useRef(),Aa=x.useRef(),ws=x.useRef(),oi=x.useState(!1),cn=(0,A.Z)(oi,2),gi=cn[0],va=cn[1],wa=x.useState(!1),Or=(0,A.Z)(wa,2),wi=Or[0],Ba=Or[1],Bo=Pt(new Map),ps=(0,A.Z)(Bo,2),vo=ps[0],Ua=ps[1],os=ve(Yr),Ga=os.map(function(ui){return vo.get(ui)}),yo=x.useMemo(function(){return Ga},[Ga.join("_")]),to=Ut(yo,Yr.length,Lt),Vi=kt&&Qe(kt.y),Ui=kt&&Qe(Ca)||!!Fr.fixed,fo=Ui&&Yr.some(function(ui){var Si=ui.fixed;return Si}),Ms=x.useRef(),Wo=Kt(lr,De),ms=Wo.isSticky,Hs=Wo.offsetHeader,cc=Wo.offsetSummary,ci=Wo.offsetScroll,Ei=Wo.stickyClassName,_a=Wo.container,_i=x.useMemo(function(){return Jt==null?void 0:Jt(Xn)},[Jt,Xn]),La=(Vi||ms)&&x.isValidElement(_i)&&_i.type===d&&_i.props.fixed,Xa,Mo,ks;Vi&&(Mo={overflowY:"scroll",maxHeight:kt.y}),Ui&&(Xa={overflowX:"auto"},Vi||(Mo={overflowY:"hidden"}),ks={width:Ca===!0?"auto":Ca,minWidth:"100%"});var Dc=x.useCallback(function(ui,Si){(0,Y.Z)(ua.current)&&Ua(function(xo){if(xo.get(ui)!==Si){var Is=new Map(xo);return Is.set(ui,Si),Is}return xo})},[]),el=At(null),Es=(0,A.Z)(el,2),ri=Es[0],Ji=Es[1];function gs(ui,Si){Si&&(typeof Si=="function"?Si(ui):Si.scrollLeft!==ui&&(Si.scrollLeft=ui,Si.scrollLeft!==ui&&setTimeout(function(){Si.scrollLeft=ui},0)))}var hl=(0,xe.Z)(function(ui){var Si=ui.currentTarget,xo=ui.scrollLeft,Is=Lt==="rtl",Ts=typeof xo=="number"?xo:Si.scrollLeft,Oc=Si||an;if(!Ji()||Ji()===Oc){var ka;ri(Oc),gs(Ts,Yo.current),gs(Ts,ha.current),gs(Ts,ws.current),gs(Ts,(ka=Ms.current)===null||ka===void 0?void 0:ka.setScrollLeft)}var ls=Si||Yo.current;if(ls){var Ac=ls.scrollWidth,nl=ls.clientWidth;if(Ac===nl){va(!1),Ba(!1);return}Is?(va(-Ts<Ac-nl),Ba(-Ts>0)):(va(Ts>0),Ba(Ts<Ac-nl))}}),jo=function(){Ui&&ha.current?hl({currentTarget:ha.current}):(va(!1),Ba(!1))},au=function(Si){var xo=Si.width;xo!==fr&&(jo(),li(ua.current?ua.current.offsetWidth:xo))},Ma=x.useRef(!1);x.useEffect(function(){Ma.current&&jo()},[Ui,rt,ti.length]),x.useEffect(function(){Ma.current=!0},[]);var $c=x.useState(0),ou=(0,A.Z)($c,2),uc=ou[0],dc=ou[1],El=x.useState(!0),pl=(0,A.Z)(El,2),vn=pl[0],Pc=pl[1];x.useEffect(function(){(!Wn||!Yn)&&(ha.current instanceof Element?dc((0,ye.o)(ha.current).width):dc((0,ye.o)(Aa.current).width)),Pc((0,U.G)("position","sticky"))},[]),x.useEffect(function(){Yn&&Kr&&(Kr.body.current=ha.current)});var fc=x.useCallback(function(ui){return x.createElement(x.Fragment,null,x.createElement(gr,ui),La==="top"&&x.createElement(fe,ui,_i))},[La,_i]),hc=x.useCallback(function(ui){return x.createElement(fe,ui,_i)},[_i]),ss=Ir(["table"],"table"),tl=x.useMemo(function(){return zt||(fo?Ca==="max-content"?"auto":"fixed":Vi||ms||Yr.some(function(ui){var Si=ui.ellipsis;return Si})?"fixed":"auto")},[Vi,fo,Yr,zt,ms]),_l,ml={colWidths:yo,columCount:Yr.length,stickyOffsets:to,onHeaderRow:Sr,fixHeader:Vi,scroll:kt},zi=x.useMemo(function(){return un?null:typeof Fn=="function"?Fn():Fn},[un,Fn]),su=x.createElement(yt,{data:Xn,measureColumnWidth:Vi||Ui||ms}),pc=x.createElement(hn,{colWidths:Yr.map(function(ui){var Si=ui.width;return Si}),columns:Yr}),_s=En!=null?x.createElement("caption",{className:"".concat(De,"-caption")},En):void 0,Gl=(0,Ye.Z)(me,{data:!0}),Zs=(0,Ye.Z)(me,{aria:!0});if(Vi||ms){var Ws;typeof kr=="function"?(Ws=kr(Xn,{scrollbarSize:uc,ref:ha,onScroll:hl}),ml.colWidths=Yr.map(function(ui,Si){var xo=ui.width,Is=Si===Yr.length-1?xo-uc:xo;return typeof Is=="number"&&!Number.isNaN(Is)?Is:0})):Ws=x.createElement("div",{style:(0,be.Z)((0,be.Z)({},Xa),Mo),onScroll:hl,ref:ha,className:z()("".concat(De,"-body"))},x.createElement(ss,(0,Ie.Z)({style:(0,be.Z)((0,be.Z)({},ks),{},{tableLayout:tl})},Zs),_s,pc,su,!La&&_i&&x.createElement(fe,{stickyOffsets:to,flattenColumns:Yr,columns:ti},_i)));var bo=(0,be.Z)((0,be.Z)((0,be.Z)({noData:!Xn.length,maxContentScroll:Ui&&Ca==="max-content"},ml),Zo),{},{direction:Lt,stickyClassName:Ei,onScroll:hl});_l=x.createElement(x.Fragment,null,_n!==!1&&x.createElement(Mn,(0,Ie.Z)({},bo,{stickyTopOffset:Hs,className:"".concat(De,"-header"),ref:Yo}),fc),Ws,La&&La!=="top"&&x.createElement(Mn,(0,Ie.Z)({},bo,{stickyBottomOffset:cc,className:"".concat(De,"-summary"),ref:ws}),hc),ms&&x.createElement(ht,{ref:Ms,offsetScroll:ci,scrollBodyRef:ha,onScroll:hl,container:_a}))}else _l=x.createElement("div",{style:(0,be.Z)((0,be.Z)({},Xa),Mo),className:z()("".concat(De,"-content")),onScroll:hl,ref:ha},x.createElement(ss,(0,Ie.Z)({style:(0,be.Z)((0,be.Z)({},ks),{},{tableLayout:tl})},Zs),_s,pc,_n!==!1&&x.createElement(gr,(0,Ie.Z)({},ml,Zo)),su,_i&&x.createElement(fe,{stickyOffsets:to,flattenColumns:Yr,columns:ti},_i)));var Vo=x.createElement("div",(0,Ie.Z)({className:z()(De,Ve,(W={},(0,D.Z)(W,"".concat(De,"-rtl"),Lt==="rtl"),(0,D.Z)(W,"".concat(De,"-ping-left"),gi),(0,D.Z)(W,"".concat(De,"-ping-right"),wi),(0,D.Z)(W,"".concat(De,"-layout-fixed"),zt==="fixed"),(0,D.Z)(W,"".concat(De,"-fixed-header"),Vi),(0,D.Z)(W,"".concat(De,"-fixed-column"),fo),(0,D.Z)(W,"".concat(De,"-scroll-horizontal"),Ui),(0,D.Z)(W,"".concat(De,"-has-fix-left"),Yr[0]&&Yr[0].fixed),(0,D.Z)(W,"".concat(De,"-has-fix-right"),Yr[Yr.length-1]&&Yr[Yr.length-1].fixed==="right"),W)),style:it,id:fn,ref:ua},Gl),qt&&x.createElement(Nt,{className:"".concat(De,"-title")},qt(Xn)),x.createElement("div",{ref:Aa,className:"".concat(De,"-container")},_l),Xt&&x.createElement(Nt,{className:"".concat(De,"-footer")},Xt(Xn)));Ui&&(Vo=x.createElement(he.Z,{onResize:au},Vo));var no=It(Yr,to,Lt,ti),Ls=x.useMemo(function(){return{scrollX:Ca,prefixCls:De,getComponent:Ir,scrollbarSize:uc,direction:Lt,fixedInfoList:no,isSticky:ms,supportSticky:vn,componentWidth:fr,fixHeader:Vi,fixColumn:fo,horizonScroll:Ui,tableLayout:tl,rowClassName:ze,expandedRowClassName:Fr.expandedRowClassName,expandIcon:Ri,expandableType:ca,expandRowByClick:Fr.expandRowByClick,expandedRowRender:Fr.expandedRowRender,onTriggerExpand:Sa,expandIconColumnIndex:Fr.expandIconColumnIndex,indentSize:Fr.indentSize,allColumnsFixedLeft:Yr.every(function(ui){return ui.fixed==="left"}),emptyNode:zi,columns:ti,flattenColumns:Yr,onColumnResize:Dc,hoverStartRow:Hr,hoverEndRow:fi,onHover:si,rowExpandable:Fr.rowExpandable,onRow:yr,getRowKey:Vr,expandedKeys:ei,childrenColumnName:Pi}},[Ca,De,Ir,uc,Lt,no,ms,vn,fr,Vi,fo,Ui,tl,ze,Fr.expandedRowClassName,Ri,ca,Fr.expandRowByClick,Fr.expandedRowRender,Sa,Fr.expandIconColumnIndex,Fr.indentSize,zi,ti,Yr,Dc,Hr,fi,si,Fr.rowExpandable,yr,Vr,ei,Pi]);return x.createElement(_.Provider,{value:Ls},Vo)}function Qn(B){return Ue(Kn,B)}var $n=Qn();$n.EXPAND_COLUMN=K,$n.INTERNAL_HOOKS=j,$n.Column=gt,$n.ColumnGroup=xt,$n.Summary=O;var Cn=$n,rr=m(48911),jn=F(null),Vn=F(null);function wn(B,W,me){var De=W||1;return me[B+De]-(me[B]||0)}function On(B){var W=B.rowInfo,me=B.column,De=B.colIndex,Ve=B.indent,ze=B.index,it=B.renderIndex,rt=B.record,nt=B.style,kt=B.className,zt=B.inverse,Lt=B.getHeight,qt=me.render,Xt=me.dataIndex,Jt=me.className,En=me.width,fn=V(Vn,["columnsOffset"]),_n=fn.columnsOffset,gn=re(W,me,De,Ve,ze),Fn=gn.key,yr=gn.fixedInfo,Sr=gn.appendCellNode,nr=gn.additionalCellProps,Tr=nr.style,Kr=nr.colSpan,Wn=Kr===void 0?1:Kr,lr=nr.rowSpan,Xn=lr===void 0?1:lr,un=De-1,Yn=wn(un,Wn,_n),Ir=Wn>1?En-Yn:0,Vr=(0,be.Z)((0,be.Z)((0,be.Z)({},Tr),nt),{},{flex:"0 0 ".concat(Yn,"px"),width:"".concat(Yn,"px"),marginRight:Ir,pointerEvents:"auto"}),kr=x.useMemo(function(){return zt?Xn<=1:Wn===0||Xn===0||Xn>1},[Xn,Wn,zt]);kr?Vr.visibility="hidden":zt&&(Vr.height=Lt==null?void 0:Lt(Xn));var Tn=kr?function(){return null}:qt,Nr={};return(Xn===0||Wn===0)&&(Nr.rowSpan=1,Nr.colSpan=1),x.createElement(Tt,(0,Ie.Z)({className:z()(Jt,kt),ellipsis:me.ellipsis,align:me.align,scope:me.rowScope,component:"div",prefixCls:W.prefixCls,key:Fn,record:rt,index:ze,renderIndex:it,dataIndex:Xt,render:Tn,shouldCellUpdate:me.shouldCellUpdate},yr,{appendNode:Sr,additionalProps:(0,be.Z)((0,be.Z)({},nr),{},{style:Vr},Nr)}))}var Un=On,Nn=["data","index","className","rowKey","style","extra","getHeight"],vr=x.forwardRef(function(B,W){var me=B.data,De=B.index,Ve=B.className,ze=B.rowKey,it=B.style,rt=B.extra,nt=B.getHeight,kt=(0,p.Z)(B,Nn),zt=me.record,Lt=me.indent,qt=me.index,Xt=V(_,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Jt=Xt.scrollX,En=Xt.flattenColumns,fn=Xt.prefixCls,_n=Xt.fixColumn,gn=Xt.componentWidth,Fn=T(zt,ze,De,Lt),yr=Fn.rowSupportExpand,Sr=Fn.expanded,nr=Fn.rowProps,Tr=Fn.expandedRowRender,Kr=Fn.expandedRowClassName,Wn;if(yr&&Sr){var lr=Tr(zt,De,Lt+1,Sr),Xn=Kr==null?void 0:Kr(zt,De,Lt),un={};_n&&(un={style:(0,D.Z)({},"--virtual-width","".concat(gn,"px"))});var Yn="".concat(fn,"-expanded-row-cell");Wn=x.createElement("div",{className:z()("".concat(fn,"-expanded-row"),"".concat(fn,"-expanded-row-level-").concat(Lt+1),Xn)},x.createElement(Tt,{component:"div",prefixCls:fn,className:z()(Yn,(0,D.Z)({},"".concat(Yn,"-fixed"),_n)),additionalProps:un},lr))}var Ir=(0,be.Z)((0,be.Z)({},it),{},{width:Jt});rt&&(Ir.position="absolute",Ir.pointerEvents="none");var Vr=x.createElement("div",(0,Ie.Z)({},nr,kt,{ref:yr?null:W,className:z()(Ve,"".concat(fn,"-row"),nr==null?void 0:nr.className,(0,D.Z)({},"".concat(fn,"-row-extra"),rt)),style:(0,be.Z)((0,be.Z)({},Ir),nr==null?void 0:nr.style)}),En.map(function(kr,Tn){return x.createElement(Un,{key:Tn,rowInfo:Fn,column:kr,colIndex:Tn,indent:Lt,index:De,renderIndex:qt,record:zt,inverse:rt,getHeight:nt})}));return yr?x.createElement("div",{ref:W},Vr,Wn):Vr}),Zr=Ce(vr),Gn=Zr,nn=x.forwardRef(function(B,W){var me=B.data,De=B.onScroll,Ve=V(_,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),ze=Ve.flattenColumns,it=Ve.onColumnResize,rt=Ve.getRowKey,nt=Ve.expandedKeys,kt=Ve.prefixCls,zt=Ve.childrenColumnName,Lt=Ve.emptyNode,qt=Ve.scrollX,Xt=V(jn),Jt=Xt.scrollY,En=Xt.listItemHeight,fn=x.useRef(),_n=Ae(me,zt,nt,rt),gn=x.useMemo(function(){var Wn=0;return ze.map(function(lr){var Xn=lr.width,un=lr.key;return Wn+=Xn,[un,Xn,Wn]})},[ze]),Fn=x.useMemo(function(){return gn.map(function(Wn){return Wn[2]})},[gn]);x.useEffect(function(){gn.forEach(function(Wn){var lr=(0,A.Z)(Wn,2),Xn=lr[0],un=lr[1];it(Xn,un)})},[gn]),x.useImperativeHandle(W,function(){var Wn={};return Object.defineProperty(Wn,"scrollLeft",{get:function(){var Xn;return((Xn=fn.current)===null||Xn===void 0?void 0:Xn.getScrollInfo().x)||0},set:function(Xn){var un;(un=fn.current)===null||un===void 0||un.scrollTo({left:Xn})}}),Wn});var yr=function(lr,Xn){var un,Yn=(un=_n[Xn])===null||un===void 0?void 0:un.record,Ir=lr.onCell;if(Ir){var Vr,kr=Ir(Yn,Xn);return(Vr=kr==null?void 0:kr.rowSpan)!==null&&Vr!==void 0?Vr:1}return 1},Sr=function(lr){var Xn=lr.start,un=lr.end,Yn=lr.getSize,Ir=lr.offsetY;if(un<0)return null;for(var Vr=ze.filter(function(Er){return yr(Er,Xn)===0}),kr=Xn,Tn=function(Cr){if(Vr=Vr.filter(function(wr){return yr(wr,Cr)===0}),!Vr.length)return kr=Cr,"break"},Nr=Xn;Nr>=0;Nr-=1){var Hr=Tn(Nr);if(Hr==="break")break}for(var fi=ze.filter(function(Er){return yr(Er,un)!==1}),si=un,ji=function(Cr){if(fi=fi.filter(function(wr){return yr(wr,Cr)!==1}),!fi.length)return si=Math.max(Cr-1,un),"break"},$i=un;$i<_n.length;$i+=1){var Fr=ji($i);if(Fr==="break")break}for(var ca=[],ei=function(Cr){var wr=_n[Cr];if(!wr)return"continue";ze.some(function(fr){return yr(fr,Cr)>1})&&ca.push(Cr)},Ri=kr;Ri<=si;Ri+=1)var Pi=ei(Ri);var Sa=ca.map(function(Er){var Cr=_n[Er],wr=rt(Cr.record,Er),fr=function(Rr){var ti=Er+Rr-1,Yr=rt(_n[ti].record,ti),Va=Yn(wr,Yr);return Va.bottom-Va.top},li=Yn(wr);return x.createElement(Gn,{key:Er,data:Cr,rowKey:wr,index:Er,style:{top:-Ir+li.top},extra:!0,getHeight:fr})});return Sa},nr=x.useMemo(function(){return{columnsOffset:Fn}},[Fn]),Tr="".concat(kt,"-tbody"),Kr;return _n.length?Kr=x.createElement(rr.Z,{fullHeight:!1,ref:fn,className:z()(Tr,"".concat(Tr,"-virtual")),height:Jt,itemHeight:En||24,data:_n,itemKey:function(lr){return rt(lr.record)},scrollWidth:qt,onVirtualScroll:function(lr){var Xn=lr.x;De({scrollLeft:Xn})},extraRender:Sr},function(Wn,lr,Xn){var un=rt(Wn.record,lr);return x.createElement(Gn,(0,Ie.Z)({data:Wn,rowKey:un,index:lr},Xn))}):Kr=x.createElement("div",{className:z()("".concat(kt,"-placeholder"))},x.createElement(Tt,{component:"div",prefixCls:kt},Lt)),x.createElement(Vn.Provider,{value:nr},Kr)}),Ht=Ce(nn),Zn=Ht,In=function(W,me){var De=me.ref,Ve=me.onScroll;return x.createElement(Zn,{ref:De,data:W,onScroll:Ve})},ir=100;function xr(B){var W=B.columns,me=B.scroll,De=B.prefixCls,Ve=De===void 0?Rt:De,ze=B.className,it=B.listItemHeight,rt=me||{},nt=rt.x,kt=rt.y;typeof nt!="number"&&(nt=((W||[]).length+1)*ir),typeof kt!="number"&&(kt=500);var zt=x.useMemo(function(){return{scrollY:kt,listItemHeight:it}},[kt,it]);return x.createElement(jn.Provider,{value:zt},x.createElement(Cn,(0,Ie.Z)({},B,{className:z()(ze,"".concat(Ve,"-virtual")),scroll:(0,be.Z)((0,be.Z)({},me),{},{x:nt}),components:{body:In},columns:W,internalHooks:j,tailor:!0})))}function ar(B){return Ue(xr,B)}var Wr=ar(),Pr=null;function hi(B){return null}var zn=hi;function kn(B){return null}var dr=kn,mr=m(2738),Jr=m(68031),sa=m(36355),Ii=m(93891),zr=m(19716),yi=m(8628),pi=m(31724),ii=m(58421),Gi=m(71418),mi=m(88088);function Bi(B){return function(me){let{prefixCls:De,onExpand:Ve,record:ze,expanded:it,expandable:rt}=me;const nt=`${De}-row-expand-icon`;return x.createElement("button",{type:"button",onClick:kt=>{Ve(ze,kt),kt.stopPropagation()},className:z()(nt,{[`${nt}-spaced`]:!rt,[`${nt}-expanded`]:rt&&it,[`${nt}-collapsed`]:rt&&!it}),"aria-label":it?B.collapse:B.expand,"aria-expanded":it})}}var ba=Bi;function da(B,W){return"key"in B&&B.key!==void 0&&B.key!==null?B.key:B.dataIndex?Array.isArray(B.dataIndex)?B.dataIndex.join("."):B.dataIndex:W}function ea(B,W){return W?`${W}-${B}`:`${B}`}function ma(B,W){return typeof B=="function"?B(W):B}function xa(B,W){const me=ma(B,W);return Object.prototype.toString.call(me)==="[object Object]"?"":me}var Fa={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"},Ka=Fa,Do=m(7657),Co=function(W,me){return x.createElement(Do.Z,(0,Ie.Z)({},W,{ref:me,icon:Ka}))},ao=x.forwardRef(Co),la=ao,Fo=m(56762);function oo(B){const W=x.useRef(B),me=(0,Fo.Z)();return[()=>W.current,De=>{W.current=De,me()}]}var Da=m(3113),ta=m(24905),so=m(38854),cr=m(64165),Br=m(20834),_r=m(40875),sr=m(5112),Gr=m(17574),ai=m(47472),Fi=m(92832);function Xi(B){let{value:W,onChange:me,filterSearch:De,tablePrefixCls:Ve,locale:ze}=B;return De?x.createElement("div",{className:`${Ve}-filter-dropdown-search`},x.createElement(Fi.default,{prefix:x.createElement(ai.Z,null),placeholder:ze.filterSearchPlaceholder,onChange:me,value:W,htmlSize:1,className:`${Ve}-filter-dropdown-search-input`})):null}var Ki=Xi,Yi=m(10228);const Qr=B=>{const{keyCode:W}=B;W===Yi.Z.ENTER&&B.stopPropagation()};var Hi=x.forwardRef((B,W)=>x.createElement("div",{className:B.className,onClick:me=>me.stopPropagation(),onKeyDown:Qr,ref:W},B.children));function Zi(B){let W=[];return(B||[]).forEach(me=>{let{value:De,children:Ve}=me;W.push(De),Ve&&(W=[].concat((0,Wt.Z)(W),(0,Wt.Z)(Zi(Ve))))}),W}function fa(B){return B.some(W=>{let{children:me}=W;return me})}function Wi(B,W){return typeof W=="string"||typeof W=="number"?W==null?void 0:W.toString().toLowerCase().includes(B.trim().toLowerCase()):!1}function bs(B){let{filters:W,prefixCls:me,filteredKeys:De,filterMultiple:Ve,searchValue:ze,filterSearch:it}=B;return W.map((rt,nt)=>{const kt=String(rt.value);if(rt.children)return{key:kt||nt,label:rt.text,popupClassName:`${me}-dropdown-submenu`,children:bs({filters:rt.children,prefixCls:me,filteredKeys:De,filterMultiple:Ve,searchValue:ze,filterSearch:it})};const zt=Ve?ta.default:sr.ZP,Lt={key:rt.value!==void 0?kt:nt,label:x.createElement(x.Fragment,null,x.createElement(zt,{checked:De.includes(kt)}),x.createElement("span",null,rt.text))};return ze.trim()?typeof it=="function"?it(ze,rt)?Lt:null:Wi(ze,rt.text)?Lt:null:Lt})}function $o(B){var W,me;const{tablePrefixCls:De,prefixCls:Ve,column:ze,dropdownPrefixCls:it,columnKey:rt,filterMultiple:nt,filterMode:kt="menu",filterSearch:zt=!1,filterState:Lt,triggerFilter:qt,locale:Xt,children:Jt,getPopupContainer:En}=B,{filterDropdownOpen:fn,onFilterDropdownOpenChange:_n,filterResetToDefaultFilteredValue:gn,defaultFilteredValue:Fn,filterDropdownVisible:yr,onFilterDropdownVisibleChange:Sr}=ze,[nr,Tr]=x.useState(!1),Kr=!!(Lt&&(!((W=Lt.filteredKeys)===null||W===void 0)&&W.length||Lt.forceFiltered)),Wn=br=>{Tr(br),_n==null||_n(br),Sr==null||Sr(br)},lr=(me=fn!=null?fn:yr)!==null&&me!==void 0?me:nr,Xn=Lt==null?void 0:Lt.filteredKeys,[un,Yn]=oo(Xn||[]),Ir=br=>{let{selectedKeys:Rr}=br;Yn(Rr)},Vr=(br,Rr)=>{let{node:ti,checked:Yr}=Rr;Ir(nt?{selectedKeys:br}:{selectedKeys:Yr&&ti.key?[ti.key]:[]})};x.useEffect(()=>{nr&&Ir({selectedKeys:Xn||[]})},[Xn]);const[kr,Tn]=x.useState([]),Nr=br=>{Tn(br)},[Hr,fi]=x.useState(""),si=br=>{const{value:Rr}=br.target;fi(Rr)};x.useEffect(()=>{nr||fi("")},[nr]);const ji=br=>{const Rr=br&&br.length?br:null;if(Rr===null&&(!Lt||!Lt.filteredKeys)||(0,N.Z)(Rr,Lt==null?void 0:Lt.filteredKeys,!0))return null;qt({column:ze,key:rt,filteredKeys:Rr})},$i=()=>{Wn(!1),ji(un())},Fr=function(){let{confirm:br,closeDropdown:Rr}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};br&&ji([]),Rr&&Wn(!1),fi(""),Yn(gn?(Fn||[]).map(ti=>String(ti)):[])},ca=function(){let{closeDropdown:br}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};br&&Wn(!1),ji(un())},ei=br=>{br&&Xn!==void 0&&Yn(Xn||[]),Wn(br),!br&&!ze.filterDropdown&&$i()},Ri=z()({[`${it}-menu-without-submenu`]:!fa(ze.filters||[])}),Pi=br=>{if(br.target.checked){const Rr=Zi(ze==null?void 0:ze.filters).map(ti=>String(ti));Yn(Rr)}else Yn([])},Sa=br=>{let{filters:Rr}=br;return(Rr||[]).map((ti,Yr)=>{const Va=String(ti.value),Ca={title:ti.text,key:ti.value!==void 0?Va:Yr};return ti.children&&(Ca.children=Sa({filters:ti.children})),Ca})},Er=br=>{var Rr;return Object.assign(Object.assign({},br),{text:br.title,value:br.key,children:((Rr=br.children)===null||Rr===void 0?void 0:Rr.map(ti=>Er(ti)))||[]})};let Cr;if(typeof ze.filterDropdown=="function")Cr=ze.filterDropdown({prefixCls:`${it}-custom`,setSelectedKeys:br=>Ir({selectedKeys:br}),selectedKeys:un(),confirm:ca,clearFilters:Fr,filters:ze.filters,visible:lr,close:()=>{Wn(!1)}});else if(ze.filterDropdown)Cr=ze.filterDropdown;else{const br=un()||[],Rr=()=>(ze.filters||[]).length===0?x.createElement(cr.Z,{image:cr.Z.PRESENTED_IMAGE_SIMPLE,description:Xt.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):kt==="tree"?x.createElement(x.Fragment,null,x.createElement(Ki,{filterSearch:zt,value:Hr,onChange:si,tablePrefixCls:De,locale:Xt}),x.createElement("div",{className:`${De}-filter-dropdown-tree`},nt?x.createElement(ta.default,{checked:br.length===Zi(ze.filters).length,indeterminate:br.length>0&&br.length<Zi(ze.filters).length,className:`${De}-filter-dropdown-checkall`,onChange:Pi},Xt.filterCheckall):null,x.createElement(Gr.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:nt,checkStrictly:!nt,className:`${it}-menu`,onCheck:Vr,checkedKeys:br,selectedKeys:br,showIcon:!1,treeData:Sa({filters:ze.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Hr.trim()?Yr=>typeof zt=="function"?zt(Hr,Er(Yr)):Wi(Hr,Yr.title):void 0}))):x.createElement(x.Fragment,null,x.createElement(Ki,{filterSearch:zt,value:Hr,onChange:si,tablePrefixCls:De,locale:Xt}),x.createElement(Br.default,{selectable:!0,multiple:nt,prefixCls:`${it}-menu`,className:Ri,onSelect:Ir,onDeselect:Ir,selectedKeys:br,getPopupContainer:En,openKeys:kr,onOpenChange:Nr,items:bs({filters:ze.filters||[],filterSearch:zt,prefixCls:Ve,filteredKeys:un(),filterMultiple:nt,searchValue:Hr})})),ti=()=>gn?(0,N.Z)((Fn||[]).map(Yr=>String(Yr)),br,!0):br.length===0;Cr=x.createElement(x.Fragment,null,Rr(),x.createElement("div",{className:`${Ve}-dropdown-btns`},x.createElement(Da.ZP,{type:"link",size:"small",disabled:ti(),onClick:()=>Fr()},Xt.filterReset),x.createElement(Da.ZP,{type:"primary",size:"small",onClick:$i},Xt.filterConfirm)))}ze.filterDropdown&&(Cr=x.createElement(_r.J,{selectable:void 0},Cr));const wr=()=>x.createElement(Hi,{className:`${Ve}-dropdown`},Cr);let fr;typeof ze.filterIcon=="function"?fr=ze.filterIcon(Kr):ze.filterIcon?fr=ze.filterIcon:fr=x.createElement(la,null);const{direction:li}=x.useContext(sa.E_);return x.createElement("div",{className:`${Ve}-column`},x.createElement("span",{className:`${De}-column-title`},Jt),x.createElement(so.Z,{dropdownRender:wr,trigger:["click"],open:lr,onOpenChange:ei,getPopupContainer:En,placement:li==="rtl"?"bottomLeft":"bottomRight"},x.createElement("span",{role:"button",tabIndex:-1,className:z()(`${Ve}-trigger`,{active:Kr}),onClick:br=>{br.stopPropagation()}},fr)))}var Po=$o;function lo(B,W,me){let De=[];return(B||[]).forEach((Ve,ze)=>{var it;const rt=ea(ze,me);if(Ve.filters||"filterDropdown"in Ve||"onFilter"in Ve)if("filteredValue"in Ve){let nt=Ve.filteredValue;"filterDropdown"in Ve||(nt=(it=nt==null?void 0:nt.map(String))!==null&&it!==void 0?it:nt),De.push({column:Ve,key:da(Ve,rt),filteredKeys:nt,forceFiltered:Ve.filtered})}else De.push({column:Ve,key:da(Ve,rt),filteredKeys:W&&Ve.defaultFilteredValue?Ve.defaultFilteredValue:void 0,forceFiltered:Ve.filtered});"children"in Ve&&(De=[].concat((0,Wt.Z)(De),(0,Wt.Z)(lo(Ve.children,W,rt))))}),De}function Ps(B,W,me,De,Ve,ze,it,rt){return me.map((nt,kt)=>{const zt=ea(kt,rt),{filterMultiple:Lt=!0,filterMode:qt,filterSearch:Xt}=nt;let Jt=nt;if(Jt.filters||Jt.filterDropdown){const En=da(Jt,zt),fn=De.find(_n=>{let{key:gn}=_n;return En===gn});Jt=Object.assign(Object.assign({},Jt),{title:_n=>x.createElement(Po,{tablePrefixCls:B,prefixCls:`${B}-filter`,dropdownPrefixCls:W,column:Jt,columnKey:En,filterState:fn,filterMultiple:Lt,filterMode:qt,filterSearch:Xt,triggerFilter:ze,locale:Ve,getPopupContainer:it},ma(nt.title,_n))})}return"children"in Jt&&(Jt=Object.assign(Object.assign({},Jt),{children:Ps(B,W,Jt.children,De,Ve,ze,it,zt)})),Jt})}function Oo(B){const W={};return B.forEach(me=>{let{key:De,filteredKeys:Ve,column:ze}=me;const{filters:it,filterDropdown:rt}=ze;if(rt)W[De]=Ve||null;else if(Array.isArray(Ve)){const nt=Zi(it);W[De]=nt.filter(kt=>Ve.includes(String(kt)))}else W[De]=null}),W}function $a(B,W){return W.reduce((me,De)=>{const{column:{onFilter:Ve,filters:ze},filteredKeys:it}=De;return Ve&&it&&it.length?me.filter(rt=>it.some(nt=>{const kt=Zi(ze),zt=kt.findIndex(qt=>String(qt)===String(nt)),Lt=zt!==-1?kt[zt]:nt;return Ve(Lt,rt)})):me},B)}const ga=B=>B.flatMap(W=>"children"in W?[W].concat((0,Wt.Z)(ga(W.children||[]))):[W]);function Uo(B){let{prefixCls:W,dropdownPrefixCls:me,mergedColumns:De,onFilterChange:Ve,getPopupContainer:ze,locale:it}=B;const rt=x.useMemo(()=>ga(De||[]),[De]),[nt,kt]=x.useState(()=>lo(rt,!0)),zt=x.useMemo(()=>{const Jt=lo(rt,!1);if(Jt.length===0)return Jt;let En=!0,fn=!0;if(Jt.forEach(_n=>{let{filteredKeys:gn}=_n;gn!==void 0?En=!1:fn=!1}),En){const _n=(rt||[]).map((gn,Fn)=>da(gn,ea(Fn)));return nt.filter(gn=>{let{key:Fn}=gn;return _n.includes(Fn)}).map(gn=>{const Fn=rt[_n.findIndex(yr=>yr===gn.key)];return Object.assign(Object.assign({},gn),{column:Object.assign(Object.assign({},gn.column),Fn),forceFiltered:Fn.filtered})})}return Jt},[rt,nt]),Lt=x.useMemo(()=>Oo(zt),[zt]),qt=Jt=>{const En=zt.filter(fn=>{let{key:_n}=fn;return _n!==Jt.key});En.push(Jt),kt(En),Ve(Oo(En),En)};return[Jt=>Ps(W,me,Jt,zt,it,qt,ze),zt,Lt]}var es=Uo;function ts(B,W,me){const De=x.useRef({});function Ve(ze){if(!De.current||De.current.data!==B||De.current.childrenColumnName!==W||De.current.getRowKey!==me){let rt=function(nt){nt.forEach((kt,zt)=>{const Lt=me(kt,zt);it.set(Lt,kt),kt&&typeof kt=="object"&&W in kt&&rt(kt[W]||[])})};const it=new Map;rt(B),De.current={data:B,childrenColumnName:W,kvMap:it,getRowKey:me}}return De.current.kvMap.get(ze)}return[Ve]}var Os=m(50371),ds=function(B,W){var me={};for(var De in B)Object.prototype.hasOwnProperty.call(B,De)&&W.indexOf(De)<0&&(me[De]=B[De]);if(B!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,De=Object.getOwnPropertySymbols(B);Ve<De.length;Ve++)W.indexOf(De[Ve])<0&&Object.prototype.propertyIsEnumerable.call(B,De[Ve])&&(me[De[Ve]]=B[De[Ve]]);return me};const co=10;function qa(B,W){const me={current:B.current,pageSize:B.pageSize};return Object.keys(W&&typeof W=="object"?W:{}).forEach(Ve=>{const ze=B[Ve];typeof ze!="function"&&(me[Ve]=ze)}),me}function ki(B,W,me){const De=me&&typeof me=="object"?me:{},{total:Ve=0}=De,ze=ds(De,["total"]),[it,rt]=(0,x.useState)(()=>({current:"defaultCurrent"in ze?ze.defaultCurrent:1,pageSize:"defaultPageSize"in ze?ze.defaultPageSize:co})),nt=(0,Os.Z)(it,ze,{total:Ve>0?Ve:B}),kt=Math.ceil((Ve||B)/nt.pageSize);nt.current>kt&&(nt.current=kt||1);const zt=(qt,Xt)=>{rt({current:qt!=null?qt:1,pageSize:Xt||nt.pageSize})},Lt=(qt,Xt)=>{var Jt;me&&((Jt=me.onChange)===null||Jt===void 0||Jt.call(me,qt,Xt)),zt(qt,Xt),W(qt,Xt||(nt==null?void 0:nt.pageSize))};return me===!1?[{},()=>{}]:[Object.assign(Object.assign({},nt),{onChange:Lt}),zt]}var ns=ki,As=m(84105),Go=m(35654),ni=m(90782),Xr=m(71430),Ti=m(18929);const na={},Ni="SELECT_ALL",Pa="SELECT_INVERT",Ha="SELECT_NONE",mo=[],Za=(B,W)=>{let me=[];return(W||[]).forEach(De=>{me.push(De),De&&typeof De=="object"&&B in De&&(me=[].concat((0,Wt.Z)(me),(0,Wt.Z)(Za(B,De[B]))))}),me};var Ao=(B,W)=>{const{preserveSelectedRowKeys:me,selectedRowKeys:De,defaultSelectedRowKeys:Ve,getCheckboxProps:ze,onChange:it,onSelect:rt,onSelectAll:nt,onSelectInvert:kt,onSelectNone:zt,onSelectMultiple:Lt,columnWidth:qt,type:Xt,selections:Jt,fixed:En,renderCell:fn,hideSelectAll:_n,checkStrictly:gn=!0}=W||{},{prefixCls:Fn,data:yr,pageData:Sr,getRecordByKey:nr,getRowKey:Tr,expandType:Kr,childrenColumnName:Wn,locale:lr,getPopupContainer:Xn}=B,[un,Yn]=(0,Ti.Z)(De||Ve||mo,{value:De}),Ir=x.useRef(new Map),Vr=(0,x.useCallback)(Er=>{if(me){const Cr=new Map;Er.forEach(wr=>{let fr=nr(wr);!fr&&Ir.current.has(wr)&&(fr=Ir.current.get(wr)),Cr.set(wr,fr)}),Ir.current=Cr}},[nr,me]);x.useEffect(()=>{Vr(un)},[un]);const{keyEntities:kr}=(0,x.useMemo)(()=>{if(gn)return{keyEntities:null};let Er=yr;if(me){const Cr=new Set(yr.map((fr,li)=>Tr(fr,li))),wr=Array.from(Ir.current).reduce((fr,li)=>{let[br,Rr]=li;return Cr.has(br)?fr:fr.concat(Rr)},[]);Er=[].concat((0,Wt.Z)(Er),(0,Wt.Z)(wr))}return(0,Xr.I8)(Er,{externalGetKey:Tr,childrenPropName:Wn})},[yr,Tr,gn,Wn,me]),Tn=(0,x.useMemo)(()=>Za(Wn,Sr),[Wn,Sr]),Nr=(0,x.useMemo)(()=>{const Er=new Map;return Tn.forEach((Cr,wr)=>{const fr=Tr(Cr,wr),li=(ze?ze(Cr):null)||{};Er.set(fr,li)}),Er},[Tn,Tr,ze]),Hr=(0,x.useCallback)(Er=>{var Cr;return!!(!((Cr=Nr.get(Tr(Er)))===null||Cr===void 0)&&Cr.disabled)},[Nr,Tr]),[fi,si]=(0,x.useMemo)(()=>{if(gn)return[un||[],[]];const{checkedKeys:Er,halfCheckedKeys:Cr}=(0,ni.S)(un,!0,kr,Hr);return[Er||[],Cr]},[un,gn,kr,Hr]),ji=(0,x.useMemo)(()=>{const Er=Xt==="radio"?fi.slice(0,1):fi;return new Set(Er)},[fi,Xt]),$i=(0,x.useMemo)(()=>Xt==="radio"?new Set:new Set(si),[si,Xt]),[Fr,ca]=(0,x.useState)(null);x.useEffect(()=>{W||Yn(mo)},[!!W]);const ei=(0,x.useCallback)((Er,Cr)=>{let wr,fr;Vr(Er),me?(wr=Er,fr=Er.map(li=>Ir.current.get(li))):(wr=[],fr=[],Er.forEach(li=>{const br=nr(li);br!==void 0&&(wr.push(li),fr.push(br))})),Yn(wr),it==null||it(wr,fr,{type:Cr})},[Yn,nr,it,me]),Ri=(0,x.useCallback)((Er,Cr,wr,fr)=>{if(rt){const li=wr.map(br=>nr(br));rt(nr(Er),Cr,li,fr)}ei(wr,"single")},[rt,nr,ei]),Pi=(0,x.useMemo)(()=>!Jt||_n?null:(Jt===!0?[Ni,Pa,Ha]:Jt).map(Cr=>Cr===Ni?{key:"all",text:lr.selectionAll,onSelect(){ei(yr.map((wr,fr)=>Tr(wr,fr)).filter(wr=>{const fr=Nr.get(wr);return!(fr!=null&&fr.disabled)||ji.has(wr)}),"all")}}:Cr===Pa?{key:"invert",text:lr.selectInvert,onSelect(){const wr=new Set(ji);Sr.forEach((li,br)=>{const Rr=Tr(li,br),ti=Nr.get(Rr);ti!=null&&ti.disabled||(wr.has(Rr)?wr.delete(Rr):wr.add(Rr))});const fr=Array.from(wr);kt&&kt(fr),ei(fr,"invert")}}:Cr===Ha?{key:"none",text:lr.selectNone,onSelect(){zt==null||zt(),ei(Array.from(ji).filter(wr=>{const fr=Nr.get(wr);return fr==null?void 0:fr.disabled}),"none")}}:Cr).map(Cr=>Object.assign(Object.assign({},Cr),{onSelect:function(){for(var wr,fr,li=arguments.length,br=new Array(li),Rr=0;Rr<li;Rr++)br[Rr]=arguments[Rr];(fr=Cr.onSelect)===null||fr===void 0||(wr=fr).call.apply(wr,[Cr].concat(br)),ca(null)}})),[Jt,ji,Sr,Tr,kt,ei]);return[(0,x.useCallback)(Er=>{var Cr;if(!W)return Er.filter(oi=>oi!==na);let wr=(0,Wt.Z)(Er);const fr=new Set(ji),li=Tn.map(Tr).filter(oi=>!Nr.get(oi).disabled),br=li.every(oi=>fr.has(oi)),Rr=li.some(oi=>fr.has(oi)),ti=()=>{const oi=[];br?li.forEach(gi=>{fr.delete(gi),oi.push(gi)}):li.forEach(gi=>{fr.has(gi)||(fr.add(gi),oi.push(gi))});const cn=Array.from(fr);nt==null||nt(!br,cn.map(gi=>nr(gi)),oi.map(gi=>nr(gi))),ei(cn,"all"),ca(null)};let Yr;if(Xt!=="radio"){let oi;if(Pi){const Or={getPopupContainer:Xn,items:Pi.map((wi,Ba)=>{const{key:Bo,text:ps,onSelect:vo}=wi;return{key:Bo!=null?Bo:Ba,onClick:()=>{vo==null||vo(li)},label:ps}})};oi=x.createElement("div",{className:`${Fn}-selection-extra`},x.createElement(so.Z,{menu:Or,getPopupContainer:Xn},x.createElement("span",null,x.createElement(As.Z,null))))}const cn=Tn.map((Or,wi)=>{const Ba=Tr(Or,wi),Bo=Nr.get(Ba)||{};return Object.assign({checked:fr.has(Ba)},Bo)}).filter(Or=>{let{disabled:wi}=Or;return wi}),gi=!!cn.length&&cn.length===Tn.length,va=gi&&cn.every(Or=>{let{checked:wi}=Or;return wi}),wa=gi&&cn.some(Or=>{let{checked:wi}=Or;return wi});Yr=!_n&&x.createElement("div",{className:`${Fn}-selection`},x.createElement(ta.default,{checked:gi?va:!!Tn.length&&br,indeterminate:gi?!va&&wa:!br&&Rr,onChange:ti,disabled:Tn.length===0||gi,"aria-label":oi?"Custom selection":"Select all",skipGroup:!0}),oi)}let Va;Xt==="radio"?Va=(oi,cn,gi)=>{const va=Tr(cn,gi),wa=fr.has(va);return{node:x.createElement(sr.ZP,Object.assign({},Nr.get(va),{checked:wa,onClick:Or=>Or.stopPropagation(),onChange:Or=>{fr.has(va)||Ri(va,!0,[va],Or.nativeEvent)}})),checked:wa}}:Va=(oi,cn,gi)=>{var va;const wa=Tr(cn,gi),Or=fr.has(wa),wi=$i.has(wa),Ba=Nr.get(wa);let Bo;return Kr==="nest"?Bo=wi:Bo=(va=Ba==null?void 0:Ba.indeterminate)!==null&&va!==void 0?va:wi,{node:x.createElement(ta.default,Object.assign({},Ba,{indeterminate:Bo,checked:Or,skipGroup:!0,onClick:ps=>ps.stopPropagation(),onChange:ps=>{let{nativeEvent:vo}=ps;const{shiftKey:Ua}=vo;let os=-1,Ga=-1;if(Ua&&gn){const yo=new Set([Fr,wa]);li.some((to,Vi)=>{if(yo.has(to))if(os===-1)os=Vi;else return Ga=Vi,!0;return!1})}if(Ga!==-1&&os!==Ga&&gn){const yo=li.slice(os,Ga+1),to=[];Or?yo.forEach(Ui=>{fr.has(Ui)&&(to.push(Ui),fr.delete(Ui))}):yo.forEach(Ui=>{fr.has(Ui)||(to.push(Ui),fr.add(Ui))});const Vi=Array.from(fr);Lt==null||Lt(!Or,Vi.map(Ui=>nr(Ui)),to.map(Ui=>nr(Ui))),ei(Vi,"multiple")}else{const yo=fi;if(gn){const to=Or?(0,Go._5)(yo,wa):(0,Go.L0)(yo,wa);Ri(wa,!Or,to,vo)}else{const to=(0,ni.S)([].concat((0,Wt.Z)(yo),[wa]),!0,kr,Hr),{checkedKeys:Vi,halfCheckedKeys:Ui}=to;let fo=Vi;if(Or){const Ms=new Set(Vi);Ms.delete(wa),fo=(0,ni.S)(Array.from(Ms),{checked:!1,halfCheckedKeys:Ui},kr,Hr).checkedKeys}Ri(wa,!Or,fo,vo)}}ca(Or?null:wa)}})),checked:Or}};const Ca=(oi,cn,gi)=>{const{node:va,checked:wa}=Va(oi,cn,gi);return fn?fn(wa,cn,gi,va):va};if(!wr.includes(na))if(wr.findIndex(oi=>{var cn;return((cn=oi[Ft])===null||cn===void 0?void 0:cn.columnType)==="EXPAND_COLUMN"})===0){const[oi,...cn]=wr;wr=[oi,na].concat((0,Wt.Z)(cn))}else wr=[na].concat((0,Wt.Z)(wr));const Zo=wr.indexOf(na);wr=wr.filter((oi,cn)=>oi!==na||cn===Zo);const ua=wr[Zo-1],Yo=wr[Zo+1];let ha=En;ha===void 0&&((Yo==null?void 0:Yo.fixed)!==void 0?ha=Yo.fixed:(ua==null?void 0:ua.fixed)!==void 0&&(ha=ua.fixed)),ha&&ua&&((Cr=ua[Ft])===null||Cr===void 0?void 0:Cr.columnType)==="EXPAND_COLUMN"&&ua.fixed===void 0&&(ua.fixed=ha);const Aa=z()(`${Fn}-selection-col`,{[`${Fn}-selection-col-with-dropdown`]:Jt&&Xt==="checkbox"}),ws={fixed:ha,width:qt,className:`${Fn}-selection-column`,title:W.columnTitle||Yr,render:Ca,onCell:W.onCell,[Ft]:{className:Aa}};return wr.map(oi=>oi===na?ws:oi)},[Tr,Tn,W,fi,ji,$i,qt,Pi,Kr,Fr,Nr,Lt,Ri,Hr]),ji]},Wa=m(89489),Cl=m(59477),xs=m(6848);const Ss="ascend",ll="descend";function Js(B){return typeof B.sorter=="object"&&typeof B.sorter.multiple=="number"?B.sorter.multiple:!1}function Bs(B){return typeof B=="function"?B:B&&typeof B=="object"&&B.compare?B.compare:!1}function nc(B,W){return W?B[B.indexOf(W)+1]:B[0]}function fs(B,W,me){let De=[];function Ve(ze,it){De.push({column:ze,key:da(ze,it),multiplePriority:Js(ze),sortOrder:ze.sortOrder})}return(B||[]).forEach((ze,it)=>{const rt=ea(it,me);ze.children?("sortOrder"in ze&&Ve(ze,rt),De=[].concat((0,Wt.Z)(De),(0,Wt.Z)(fs(ze.children,W,rt)))):ze.sorter&&("sortOrder"in ze?Ve(ze,rt):W&&ze.defaultSortOrder&&De.push({column:ze,key:da(ze,rt),multiplePriority:Js(ze),sortOrder:ze.defaultSortOrder}))}),De}function cl(B,W,me,De,Ve,ze,it,rt){return(W||[]).map((nt,kt)=>{const zt=ea(kt,rt);let Lt=nt;if(Lt.sorter){const qt=Lt.sortDirections||Ve,Xt=Lt.showSorterTooltip===void 0?it:Lt.showSorterTooltip,Jt=da(Lt,zt),En=me.find(Kr=>{let{key:Wn}=Kr;return Wn===Jt}),fn=En?En.sortOrder:null,_n=nc(qt,fn);let gn;if(nt.sortIcon)gn=nt.sortIcon({sortOrder:fn});else{const Kr=qt.includes(Ss)&&x.createElement(Cl.Z,{className:z()(`${B}-column-sorter-up`,{active:fn===Ss})}),Wn=qt.includes(ll)&&x.createElement(Wa.Z,{className:z()(`${B}-column-sorter-down`,{active:fn===ll})});gn=x.createElement("span",{className:z()(`${B}-column-sorter`,{[`${B}-column-sorter-full`]:!!(Kr&&Wn)})},x.createElement("span",{className:`${B}-column-sorter-inner`,"aria-hidden":"true"},Kr,Wn))}const{cancelSort:Fn,triggerAsc:yr,triggerDesc:Sr}=ze||{};let nr=Fn;_n===ll?nr=Sr:_n===Ss&&(nr=yr);const Tr=typeof Xt=="object"?Xt:{title:nr};Lt=Object.assign(Object.assign({},Lt),{className:z()(Lt.className,{[`${B}-column-sort`]:fn}),title:Kr=>{const Wn=x.createElement("div",{className:`${B}-column-sorters`},x.createElement("span",{className:`${B}-column-title`},ma(nt.title,Kr)),gn);return Xt?x.createElement(xs.Z,Object.assign({},Tr),Wn):Wn},onHeaderCell:Kr=>{const Wn=nt.onHeaderCell&&nt.onHeaderCell(Kr)||{},lr=Wn.onClick,Xn=Wn.onKeyDown;Wn.onClick=Ir=>{De({column:nt,key:Jt,sortOrder:_n,multiplePriority:Js(nt)}),lr==null||lr(Ir)},Wn.onKeyDown=Ir=>{Ir.keyCode===Yi.Z.ENTER&&(De({column:nt,key:Jt,sortOrder:_n,multiplePriority:Js(nt)}),Xn==null||Xn(Ir))};const un=xa(nt.title,{}),Yn=un==null?void 0:un.toString();return fn?Wn["aria-sort"]=fn==="ascend"?"ascending":"descending":Wn["aria-label"]=Yn||"",Wn.className=z()(Wn.className,`${B}-column-has-sorters`),Wn.tabIndex=0,nt.ellipsis&&(Wn.title=(un!=null?un:"").toString()),Wn}})}return"children"in Lt&&(Lt=Object.assign(Object.assign({},Lt),{children:cl(B,Lt.children,me,De,Ve,ze,it,zt)})),Lt})}function hs(B){const{column:W,sortOrder:me}=B;return{column:W,order:me,field:W.dataIndex,columnKey:W.key}}function Cs(B){const W=B.filter(me=>{let{sortOrder:De}=me;return De}).map(hs);return W.length===0&&B.length?Object.assign(Object.assign({},hs(B[B.length-1])),{column:void 0}):W.length<=1?W[0]||{}:W}function bi(B,W,me){const De=W.slice().sort((it,rt)=>rt.multiplePriority-it.multiplePriority),Ve=B.slice(),ze=De.filter(it=>{let{column:{sorter:rt},sortOrder:nt}=it;return Bs(rt)&&nt});return ze.length?Ve.sort((it,rt)=>{for(let nt=0;nt<ze.length;nt+=1){const kt=ze[nt],{column:{sorter:zt},sortOrder:Lt}=kt,qt=Bs(zt);if(qt&&Lt){const Xt=qt(it,rt,Lt);if(Xt!==0)return Lt===Ss?Xt:-Xt}}return 0}).map(it=>{const rt=it[me];return rt?Object.assign(Object.assign({},it),{[me]:bi(rt,W,me)}):it}):Ve}function Mi(B){let{prefixCls:W,mergedColumns:me,onSorterChange:De,sortDirections:Ve,tableLocale:ze,showSorterTooltip:it}=B;const[rt,nt]=x.useState(fs(me,!0)),kt=x.useMemo(()=>{let Jt=!0;const En=fs(me,!1);if(!En.length)return rt;const fn=[];function _n(Fn){Jt?fn.push(Fn):fn.push(Object.assign(Object.assign({},Fn),{sortOrder:null}))}let gn=null;return En.forEach(Fn=>{gn===null?(_n(Fn),Fn.sortOrder&&(Fn.multiplePriority===!1?Jt=!1:gn=!0)):(gn&&Fn.multiplePriority!==!1||(Jt=!1),_n(Fn))}),fn},[me,rt]),zt=x.useMemo(()=>{const Jt=kt.map(En=>{let{column:fn,sortOrder:_n}=En;return{column:fn,order:_n}});return{sortColumns:Jt,sortColumn:Jt[0]&&Jt[0].column,sortOrder:Jt[0]&&Jt[0].order}},[kt]);function Lt(Jt){let En;Jt.multiplePriority===!1||!kt.length||kt[0].multiplePriority===!1?En=[Jt]:En=[].concat((0,Wt.Z)(kt.filter(fn=>{let{key:_n}=fn;return _n!==Jt.key})),[Jt]),nt(En),De(Cs(En),En)}return[Jt=>cl(W,Jt,kt,Lt,Ve,ze,it),kt,zt,()=>Cs(kt)]}function Di(B,W){return B.map(me=>{const De=Object.assign({},me);return De.title=ma(me.title,W),"children"in De&&(De.children=Di(De.children,W)),De})}function go(B){return[x.useCallback(me=>Di(me,B),[B])]}var ja=Qn((B,W)=>{const{_renderTimes:me}=B,{_renderTimes:De}=W;return me!==De}),Xo=ar((B,W)=>{const{_renderTimes:me}=B,{_renderTimes:De}=W;return me!==De}),uo=m(64993),Oa=m(17313),rs=m(83116),is=m(37613),Ns=B=>{const{componentCls:W}=B,me=`${B.lineWidth}px ${B.lineType} ${B.tableBorderColor}`,De=(Ve,ze,it)=>({[`&${W}-${Ve}`]:{[`> ${W}-container`]:{[`> ${W}-content, > ${W}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${W}-expanded-row-fixed`]:{margin:`-${ze}px -${it+B.lineWidth}px`}}}}}});return{[`${W}-wrapper`]:{[`${W}${W}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${W}-title`]:{border:me,borderBottom:0},[`> ${W}-container`]:{borderInlineStart:me,borderTop:me,[`
|
|
|
> ${W}-content,
|
|
|
> ${W}-header,
|
|
|
> ${W}-body,
|
|
|
> ${W}-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:me},"> thead":{"> tr:not(:last-child) > th":{borderBottom:me},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${W}-cell-fix-right-first::after`]:{borderInlineEnd:me}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${W}-expanded-row-fixed`]:{margin:`-${B.tablePaddingVertical}px -${B.tablePaddingHorizontal+B.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:B.lineWidth,bottom:0,borderInlineEnd:me,content:'""'}}}}}},[`&${W}-scroll-horizontal`]:{[`> ${W}-container > ${W}-body`]:{"> table > tbody":{[`
|
|
|
> tr${W}-expanded-row,
|
|
|
> tr${W}-placeholder
|
|
|
`]:{"> th, > td":{borderInlineEnd:0}}}}}},De("middle",B.tablePaddingVerticalMiddle,B.tablePaddingHorizontalMiddle)),De("small",B.tablePaddingVerticalSmall,B.tablePaddingHorizontalSmall)),{[`> ${W}-footer`]:{border:me,borderTop:0}}),[`${W}-cell`]:{[`${W}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${B.lineWidth}px 0 ${B.lineWidth}px ${B.tableHeaderBg}`}},[`${W}-bordered ${W}-cell-scrollbar`]:{borderInlineEnd:me}}}},wl=B=>{const{componentCls:W}=B;return{[`${W}-wrapper`]:{[`${W}-cell-ellipsis`]:Object.assign(Object.assign({},Oa.vS),{wordBreak:"keep-all",[`
|
|
|
&${W}-cell-fix-left-last,
|
|
|
&${W}-cell-fix-right-first
|
|
|
`]:{overflow:"visible",[`${W}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${W}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},kc=B=>{const{componentCls:W}=B;return{[`${W}-wrapper`]:{[`${W}-tbody > tr${W}-placeholder`]:{textAlign:"center",color:B.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:B.colorBgContainer}}}}},jl=m(15969),ic=B=>{const{componentCls:W,antCls:me,controlInteractiveSize:De,motionDurationSlow:Ve,lineWidth:ze,paddingXS:it,lineType:rt,tableBorderColor:nt,tableExpandIconBg:kt,tableExpandColumnWidth:zt,borderRadius:Lt,fontSize:qt,fontSizeSM:Xt,lineHeight:Jt,tablePaddingVertical:En,tablePaddingHorizontal:fn,tableExpandedRowBg:_n,paddingXXS:gn}=B,Fn=De/2-ze,yr=Fn*2+ze*3,Sr=`${ze}px ${rt} ${nt}`,nr=gn-ze;return{[`${W}-wrapper`]:{[`${W}-expand-icon-col`]:{width:zt},[`${W}-row-expand-icon-cell`]:{textAlign:"center",[`${W}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${W}-row-indent`]:{height:1,float:"left"},[`${W}-row-expand-icon`]:Object.assign(Object.assign({},(0,jl.N)(B)),{position:"relative",float:"left",boxSizing:"border-box",width:yr,height:yr,padding:0,color:"inherit",lineHeight:`${yr}px`,background:kt,border:Sr,borderRadius:Lt,transform:`scale(${De/yr})`,transition:`all ${Ve}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${Ve} ease-out`,content:'""'},"&::before":{top:Fn,insetInlineEnd:nr,insetInlineStart:nr,height:ze},"&::after":{top:nr,bottom:nr,insetInlineStart:Fn,width:ze,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"}}),[`${W}-row-indent + ${W}-row-expand-icon`]:{marginTop:(qt*Jt-ze*3)/2-Math.ceil((Xt*1.4-ze*3)/2),marginInlineEnd:it},[`tr${W}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:_n}},[`${me}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${W}-expanded-row-fixed`]:{position:"relative",margin:`-${En}px -${fn}px`,padding:`${En}px ${fn}px`}}}},Ec=B=>{const{componentCls:W,antCls:me,iconCls:De,tableFilterDropdownWidth:Ve,tableFilterDropdownSearchWidth:ze,paddingXXS:it,paddingXS:rt,colorText:nt,lineWidth:kt,lineType:zt,tableBorderColor:Lt,tableHeaderIconColor:qt,fontSizeSM:Xt,tablePaddingHorizontal:Jt,borderRadius:En,motionDurationSlow:fn,colorTextDescription:_n,colorPrimary:gn,tableHeaderFilterActiveBg:Fn,colorTextDisabled:yr,tableFilterDropdownBg:Sr,tableFilterDropdownHeight:nr,controlItemBgHover:Tr,controlItemBgActive:Kr,boxShadowSecondary:Wn,filterDropdownMenuBg:lr}=B,Xn=`${me}-dropdown`,un=`${W}-filter-dropdown`,Yn=`${me}-tree`,Ir=`${kt}px ${zt} ${Lt}`;return[{[`${W}-wrapper`]:{[`${W}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${W}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-it,marginInline:`${it}px ${-Jt/2}px`,padding:`0 ${it}px`,color:qt,fontSize:Xt,borderRadius:En,cursor:"pointer",transition:`all ${fn}`,"&:hover":{color:_n,background:Fn},"&.active":{color:gn}}}},{[`${me}-dropdown`]:{[un]:Object.assign(Object.assign({},(0,Oa.Wf)(B)),{minWidth:Ve,backgroundColor:Sr,borderRadius:En,boxShadow:Wn,overflow:"hidden",[`${Xn}-menu`]:{maxHeight:nr,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:lr,"&:empty::after":{display:"block",padding:`${rt}px 0`,color:yr,fontSize:Xt,textAlign:"center",content:'"Not Found"'}},[`${un}-tree`]:{paddingBlock:`${rt}px 0`,paddingInline:rt,[Yn]:{padding:0},[`${Yn}-treenode ${Yn}-node-content-wrapper:hover`]:{backgroundColor:Tr},[`${Yn}-treenode-checkbox-checked ${Yn}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:Kr}}},[`${un}-search`]:{padding:rt,borderBottom:Ir,"&-input":{input:{minWidth:ze},[De]:{color:yr}}},[`${un}-checkall`]:{width:"100%",marginBottom:it,marginInlineStart:it},[`${un}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${rt-kt}px ${rt}px`,overflow:"hidden",borderTop:Ir}})}},{[`${me}-dropdown ${un}, ${un}-submenu`]:{[`${me}-checkbox-wrapper + span`]:{paddingInlineStart:rt,color:nt},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},ul=B=>{const{componentCls:W,lineWidth:me,colorSplit:De,motionDurationSlow:Ve,zIndexTableFixed:ze,tableBg:it,zIndexTableSticky:rt}=B,nt=De;return{[`${W}-wrapper`]:{[`
|
|
|
${W}-cell-fix-left,
|
|
|
${W}-cell-fix-right
|
|
|
`]:{position:"sticky !important",zIndex:ze,background:it},[`
|
|
|
${W}-cell-fix-left-first::after,
|
|
|
${W}-cell-fix-left-last::after
|
|
|
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-me,width:30,transform:"translateX(100%)",transition:`box-shadow ${Ve}`,content:'""',pointerEvents:"none"},[`${W}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
|
${W}-cell-fix-right-first::after,
|
|
|
${W}-cell-fix-right-last::after
|
|
|
`]:{position:"absolute",top:0,bottom:-me,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${Ve}`,content:'""',pointerEvents:"none"},[`${W}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:rt+1,width:30,transition:`box-shadow ${Ve}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${W}-ping-left`]:{[`&:not(${W}-has-fix-left) ${W}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${nt}`}},[`
|
|
|
${W}-cell-fix-left-first::after,
|
|
|
${W}-cell-fix-left-last::after
|
|
|
`]:{boxShadow:`inset 10px 0 8px -8px ${nt}`},[`${W}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${W}-ping-right`]:{[`&:not(${W}-has-fix-right) ${W}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${nt}`}},[`
|
|
|
${W}-cell-fix-right-first::after,
|
|
|
${W}-cell-fix-right-last::after
|
|
|
`]:{boxShadow:`inset -10px 0 8px -8px ${nt}`}}}}},Lc=B=>{const{componentCls:W,antCls:me}=B;return{[`${W}-wrapper`]:{[`${W}-pagination${me}-pagination`]:{margin:`${B.margin}px 0`},[`${W}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:B.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Rs=B=>{const{componentCls:W,tableRadius:me}=B;return{[`${W}-wrapper`]:{[W]:{[`${W}-title, ${W}-header`]:{borderRadius:`${me}px ${me}px 0 0`},[`${W}-title + ${W}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${W}-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:me,borderStartEndRadius:me,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:me},"> *:last-child":{borderStartEndRadius:me}}},"&-footer":{borderRadius:`0 0 ${me}px ${me}px`}}}}},eu=B=>{const{componentCls:W}=B;return{[`${W}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${W}-pagination-left`]:{justifyContent:"flex-end"},[`${W}-pagination-right`]:{justifyContent:"flex-start"},[`${W}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${W}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${W}-row-indent`]:{float:"right"}}}}},sc=B=>{const{componentCls:W,antCls:me,iconCls:De,fontSizeIcon:Ve,padding:ze,paddingXS:it,tableHeaderIconColor:rt,tableHeaderIconColorHover:nt,tableSelectionColumnWidth:kt}=B;return{[`${W}-wrapper`]:{[`${W}-selection-col`]:{width:kt,[`&${W}-selection-col-with-dropdown`]:{width:kt+Ve+ze/4}},[`${W}-bordered ${W}-selection-col`]:{width:kt+it*2,[`&${W}-selection-col-with-dropdown`]:{width:kt+Ve+ze/4+it*2}},[`
|
|
|
table tr th${W}-selection-column,
|
|
|
table tr td${W}-selection-column
|
|
|
`]:{paddingInlineEnd:B.paddingXS,paddingInlineStart:B.paddingXS,textAlign:"center",[`${me}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${W}-selection-column${W}-cell-fix-left`]:{zIndex:B.zIndexTableFixed+1},[`table tr th${W}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${W}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${W}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${B.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${B.tablePaddingHorizontal/4}px`,[De]:{color:rt,fontSize:Ve,verticalAlign:"baseline","&:hover":{color:nt}}}}}},fl=B=>{const{componentCls:W}=B,me=(De,Ve,ze,it)=>({[`${W}${W}-${De}`]:{fontSize:it,[`
|
|
|
${W}-title,
|
|
|
${W}-footer,
|
|
|
${W}-cell,
|
|
|
${W}-thead > tr > th,
|
|
|
${W}-tbody > tr > th,
|
|
|
${W}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{padding:`${Ve}px ${ze}px`},[`${W}-filter-trigger`]:{marginInlineEnd:`-${ze/2}px`},[`${W}-expanded-row-fixed`]:{margin:`-${Ve}px -${ze}px`},[`${W}-tbody`]:{[`${W}-wrapper:only-child ${W}`]:{marginBlock:`-${Ve}px`,marginInline:`${B.tableExpandColumnWidth-ze}px -${ze}px`}},[`${W}-selection-column`]:{paddingInlineStart:`${ze/4}px`}}});return{[`${W}-wrapper`]:Object.assign(Object.assign({},me("middle",B.tablePaddingVerticalMiddle,B.tablePaddingHorizontalMiddle,B.tableFontSizeMiddle)),me("small",B.tablePaddingVerticalSmall,B.tablePaddingHorizontalSmall,B.tableFontSizeSmall))}},Ul=B=>{const{componentCls:W,marginXXS:me,fontSizeIcon:De,tableHeaderIconColor:Ve,tableHeaderIconColorHover:ze}=B;return{[`${W}-wrapper`]:{[`${W}-thead th${W}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${B.motionDurationSlow}`,"&:hover":{background:B.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:B.colorPrimary},[`
|
|
|
&${W}-cell-fix-left:hover,
|
|
|
&${W}-cell-fix-right:hover
|
|
|
`]:{background:B.tableFixedHeaderSortActiveBg}},[`${W}-thead th${W}-column-sort`]:{background:B.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${W}-column-sort`]:{background:B.tableBodySortBg},[`${W}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${W}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${W}-column-sorter`]:{marginInlineStart:me,color:Ve,fontSize:0,transition:`color ${B.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:De,"&.active":{color:B.colorPrimary}},[`${W}-column-sorter-up + ${W}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${W}-column-sorters:hover ${W}-column-sorter`]:{color:ze}}}},Qs=B=>{const{componentCls:W,opacityLoading:me,tableScrollThumbBg:De,tableScrollThumbBgHover:Ve,tableScrollThumbSize:ze,tableScrollBg:it,zIndexTableSticky:rt,stickyScrollBarBorderRadius:nt}=B,kt=`${B.lineWidth}px ${B.lineType} ${B.tableBorderColor}`;return{[`${W}-wrapper`]:{[`${W}-sticky`]:{"&-holder":{position:"sticky",zIndex:rt,background:B.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${ze}px !important`,zIndex:rt,display:"flex",alignItems:"center",background:it,borderTop:kt,opacity:me,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:ze,backgroundColor:De,borderRadius:nt,transition:`all ${B.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:Ve}}}}}}},zs=B=>{const{componentCls:W,lineWidth:me,tableBorderColor:De}=B,Ve=`${me}px ${B.lineType} ${De}`;return{[`${W}-wrapper`]:{[`${W}-summary`]:{position:"relative",zIndex:B.zIndexTableFixed,background:B.tableBg,"> tr":{"> th, > td":{borderBottom:Ve}}},[`div${W}-summary`]:{boxShadow:`0 -${me}px 0 ${De}`}}}},Fs=B=>{const{componentCls:W}=B,me=`${B.lineWidth}px ${B.lineType} ${B.tableBorderColor}`,De=`${W}-expanded-row-cell`;return{[`${W}-wrapper`]:{[`${W}-tbody-virtual`]:{[`${W}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${W}-cell`]:{borderBottom:me},[`${W}-expanded-row`]:{[`${De}${De}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${B.lineWidth}px)`,borderInlineEnd:"none"}}},[`${W}-bordered`]:{[`${W}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:me,position:"absolute"},[`${W}-cell`]:{borderInlineEnd:me,[`&${W}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-B.lineWidth,borderInlineStart:me}}}}}}};const Ho=B=>{const{componentCls:W,fontWeightStrong:me,tablePaddingVertical:De,tablePaddingHorizontal:Ve,lineWidth:ze,lineType:it,tableBorderColor:rt,tableFontSize:nt,tableBg:kt,tableRadius:zt,tableHeaderTextColor:Lt,motionDurationMid:qt,tableHeaderBg:Xt,tableHeaderCellSplitColor:Jt,tableRowHoverBg:En,tableSelectedRowBg:fn,tableSelectedRowHoverBg:_n,tableFooterTextColor:gn,tableFooterBg:Fn,paddingContentVerticalLG:yr}=B,Sr=`${ze}px ${it} ${rt}`;return{[`${W}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,Oa.dF)()),{[W]:Object.assign(Object.assign({},(0,Oa.Wf)(B)),{fontSize:nt,background:kt,borderRadius:`${zt}px ${zt}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${zt}px ${zt}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
|
${W}-cell,
|
|
|
${W}-thead > tr > th,
|
|
|
${W}-tbody > tr > th,
|
|
|
${W}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{position:"relative",padding:`${yr}px ${Ve}px`,overflowWrap:"break-word"},[`${W}-title`]:{padding:`${De}px ${Ve}px`},[`${W}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:Lt,fontWeight:me,textAlign:"start",background:Xt,borderBottom:Sr,transition:`background ${qt} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${W}-selection-column):not(${W}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:Jt,transform:"translateY(-50%)",transition:`background-color ${qt}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${W}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${qt}, border-color ${qt}`,borderBottom:Sr,[`
|
|
|
> ${W}-wrapper:only-child,
|
|
|
> ${W}-expanded-row-fixed > ${W}-wrapper:only-child
|
|
|
`]:{[W]:{marginBlock:`-${De}px`,marginInline:`${B.tableExpandColumnWidth-Ve}px -${Ve}px`,[`${W}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:Lt,fontWeight:me,textAlign:"start",background:Xt,borderBottom:Sr,transition:`background ${qt} ease`},[`
|
|
|
&${W}-row:hover > th,
|
|
|
&${W}-row:hover > td,
|
|
|
> th${W}-cell-row-hover,
|
|
|
> td${W}-cell-row-hover
|
|
|
`]:{background:En},[`&${W}-row-selected`]:{"> th, > td":{background:fn},"&:hover > th, &:hover > td":{background:_n}}}},[`${W}-footer`]:{padding:`${De}px ${Ve}px`,color:gn,background:Fn}})}};var qs=(0,rs.Z)("Table",B=>{const{colorTextHeading:W,colorSplit:me,colorIcon:De,colorIconHover:Ve,opacityLoading:ze,colorBgContainer:it,controlInteractiveSize:rt,headerBg:nt,headerColor:kt,headerSortActiveBg:zt,headerSortHoverBg:Lt,bodySortBg:qt,rowHoverBg:Xt,rowSelectedBg:Jt,rowSelectedHoverBg:En,rowExpandedBg:fn,cellPaddingBlock:_n,cellPaddingInline:gn,cellPaddingBlockMD:Fn,cellPaddingInlineMD:yr,cellPaddingBlockSM:Sr,cellPaddingInlineSM:nr,borderColor:Tr,footerBg:Kr,footerColor:Wn,headerBorderRadius:lr,cellFontSize:Xn,cellFontSizeMD:un,cellFontSizeSM:Yn,headerSplitColor:Ir,fixedHeaderSortActiveBg:Vr,headerFilterHoverBg:kr,filterDropdownBg:Tn,expandIconBg:Nr,selectionColumnWidth:Hr,stickyScrollBarBg:fi}=B,si=new uo.C(De),ji=new uo.C(Ve),$i=2,Fr=(0,is.TS)(B,{tableFontSize:Xn,tableBg:it,tableRadius:lr,tablePaddingVertical:_n,tablePaddingHorizontal:gn,tablePaddingVerticalMiddle:Fn,tablePaddingHorizontalMiddle:yr,tablePaddingVerticalSmall:Sr,tablePaddingHorizontalSmall:nr,tableBorderColor:Tr,tableHeaderTextColor:kt,tableHeaderBg:nt,tableFooterTextColor:Wn,tableFooterBg:Kr,tableHeaderCellSplitColor:Ir,tableHeaderSortBg:zt,tableHeaderSortHoverBg:Lt,tableHeaderIconColor:si.clone().setAlpha(si.getAlpha()*ze).toRgbString(),tableHeaderIconColorHover:ji.clone().setAlpha(ji.getAlpha()*ze).toRgbString(),tableBodySortBg:qt,tableFixedHeaderSortActiveBg:Vr,tableHeaderFilterActiveBg:kr,tableFilterDropdownBg:Tn,tableRowHoverBg:Xt,tableSelectedRowBg:Jt,tableSelectedRowHoverBg:En,zIndexTableFixed:$i,zIndexTableSticky:$i+1,tableFontSizeMiddle:un,tableFontSizeSmall:Yn,tableSelectionColumnWidth:Hr,tableExpandIconBg:Nr,tableExpandColumnWidth:rt+2*B.padding,tableExpandedRowBg:fn,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:fi,tableScrollThumbBgHover:W,tableScrollBg:me});return[Ho(Fr),Lc(Fr),zs(Fr),Ul(Fr),Ec(Fr),Ns(Fr),Rs(Fr),ic(Fr),zs(Fr),kc(Fr),sc(Fr),ul(Fr),Qs(Fr),wl(Fr),fl(Fr),eu(Fr),Fs(Fr)]},B=>{const{colorFillAlter:W,colorBgContainer:me,colorTextHeading:De,colorFillSecondary:Ve,colorFillContent:ze,controlItemBgActive:it,controlItemBgActiveHover:rt,padding:nt,paddingSM:kt,paddingXS:zt,colorBorderSecondary:Lt,borderRadiusLG:qt,fontSize:Xt,controlHeight:Jt,colorTextPlaceholder:En}=B,fn=new uo.C(Ve).onBackground(me).toHexShortString(),_n=new uo.C(ze).onBackground(me).toHexShortString(),gn=new uo.C(W).onBackground(me).toHexShortString();return{headerBg:gn,headerColor:De,headerSortActiveBg:fn,headerSortHoverBg:_n,bodySortBg:gn,rowHoverBg:gn,rowSelectedBg:it,rowSelectedHoverBg:rt,rowExpandedBg:W,cellPaddingBlock:nt,cellPaddingInline:nt,cellPaddingBlockMD:kt,cellPaddingInlineMD:zt,cellPaddingBlockSM:zt,cellPaddingInlineSM:zt,borderColor:Lt,headerBorderRadius:qt,footerBg:gn,footerColor:De,cellFontSize:Xt,cellFontSizeMD:Xt,cellFontSizeSM:Xt,headerSplitColor:Lt,fixedHeaderSortActiveBg:fn,headerFilterHoverBg:ze,filterDropdownMenuBg:me,filterDropdownBg:me,expandIconBg:me,selectionColumnWidth:Jt,stickyScrollBarBg:En,stickyScrollBarBorderRadius:100}});const lc=[],Ic=(B,W)=>{const{prefixCls:me,className:De,rootClassName:Ve,style:ze,size:it,bordered:rt,dropdownPrefixCls:nt,dataSource:kt,pagination:zt,rowSelection:Lt,rowKey:qt="key",rowClassName:Xt,columns:Jt,children:En,childrenColumnName:fn,onChange:_n,getPopupContainer:gn,loading:Fn,expandIcon:yr,expandable:Sr,expandedRowRender:nr,expandIconColumnIndex:Tr,indentSize:Kr,scroll:Wn,sortDirections:lr,locale:Xn,showSorterTooltip:un=!0,virtual:Yn}=B,Ir=x.useMemo(()=>Jt||H(En),[Jt,En]),Vr=x.useMemo(()=>Ir.some(ci=>ci.responsive),[Ir]),kr=(0,yi.Z)(Vr),Tn=x.useMemo(()=>{const ci=new Set(Object.keys(kr).filter(Ei=>kr[Ei]));return Ir.filter(Ei=>!Ei.responsive||Ei.responsive.some(_a=>ci.has(_a)))},[Ir,kr]),Nr=(0,mr.Z)(B,["className","style","columns"]),{locale:Hr=pi.Z,direction:fi,table:si,renderEmpty:ji,getPrefixCls:$i,getPopupContainer:Fr}=x.useContext(sa.E_),ca=(0,zr.Z)(it),ei=Object.assign(Object.assign({},Hr.Table),Xn),Ri=kt||lc,Pi=$i("table",me),Sa=$i("dropdown",nt),Er=Object.assign({childrenColumnName:fn,expandIconColumnIndex:Tr},Sr),{childrenColumnName:Cr="children"}=Er,wr=x.useMemo(()=>Ri.some(ci=>ci==null?void 0:ci[Cr])?"nest":nr||Sr&&Sr.expandedRowRender?"row":null,[Ri]),fr={body:x.useRef()},li=x.useMemo(()=>typeof qt=="function"?qt:ci=>ci==null?void 0:ci[qt],[qt]),[br]=ts(Ri,Cr,li),Rr={},ti=function(ci,Ei){let _a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var _i,La,Xa;const Mo=Object.assign(Object.assign({},Rr),ci);_a&&((_i=Rr.resetPagination)===null||_i===void 0||_i.call(Rr),!((La=Mo.pagination)===null||La===void 0)&&La.current&&(Mo.pagination.current=1),zt&&zt.onChange&&zt.onChange(1,(Xa=Mo.pagination)===null||Xa===void 0?void 0:Xa.pageSize)),Wn&&Wn.scrollToFirstRowOnChange!==!1&&fr.body.current&&(0,Jr.Z)(0,{getContainer:()=>fr.body.current}),_n==null||_n(Mo.pagination,Mo.filters,Mo.sorter,{currentDataSource:$a(bi(Ri,Mo.sorterStates,Cr),Mo.filterStates),action:Ei})},Yr=(ci,Ei)=>{ti({sorter:ci,sorterStates:Ei},"sort",!1)},[Va,Ca,Zo,ua]=Mi({prefixCls:Pi,mergedColumns:Tn,onSorterChange:Yr,sortDirections:lr||["ascend","descend"],tableLocale:ei,showSorterTooltip:un}),Yo=x.useMemo(()=>bi(Ri,Ca,Cr),[Ri,Ca]);Rr.sorter=ua(),Rr.sorterStates=Ca;const ha=(ci,Ei)=>{ti({filters:ci,filterStates:Ei},"filter",!0)},[Aa,ws,oi]=es({prefixCls:Pi,locale:ei,dropdownPrefixCls:Sa,mergedColumns:Tn,onFilterChange:ha,getPopupContainer:gn||Fr}),cn=$a(Yo,ws);Rr.filters=oi,Rr.filterStates=ws;const gi=x.useMemo(()=>{const ci={};return Object.keys(oi).forEach(Ei=>{oi[Ei]!==null&&(ci[Ei]=oi[Ei])}),Object.assign(Object.assign({},Zo),{filters:ci})},[Zo,oi]),[va]=go(gi),wa=(ci,Ei)=>{ti({pagination:Object.assign(Object.assign({},Rr.pagination),{current:ci,pageSize:Ei})},"paginate")},[Or,wi]=ns(cn.length,wa,zt);Rr.pagination=zt===!1?{}:qa(Or,zt),Rr.resetPagination=wi;const Ba=x.useMemo(()=>{if(zt===!1||!Or.pageSize)return cn;const{current:ci=1,total:Ei,pageSize:_a=co}=Or;return cn.length<Ei?cn.length>_a?cn.slice((ci-1)*_a,ci*_a):cn:cn.slice((ci-1)*_a,ci*_a)},[!!zt,cn,Or&&Or.current,Or&&Or.pageSize,Or&&Or.total]),[Bo,ps]=Ao({prefixCls:Pi,data:cn,pageData:Ba,getRowKey:li,getRecordByKey:br,expandType:wr,childrenColumnName:Cr,locale:ei,getPopupContainer:gn||Fr},Lt),vo=(ci,Ei,_a)=>{let _i;return typeof Xt=="function"?_i=z()(Xt(ci,Ei,_a)):_i=z()(Xt),z()({[`${Pi}-row-selected`]:ps.has(li(ci,Ei))},_i)};Er.__PARENT_RENDER_ICON__=Er.expandIcon,Er.expandIcon=Er.expandIcon||yr||ba(ei),wr==="nest"&&Er.expandIconColumnIndex===void 0?Er.expandIconColumnIndex=Lt?1:0:Er.expandIconColumnIndex>0&&Lt&&(Er.expandIconColumnIndex-=1),typeof Er.indentSize!="number"&&(Er.indentSize=typeof Kr=="number"?Kr:15);const Ua=x.useCallback(ci=>va(Bo(Aa(Va(ci)))),[Va,Aa,Bo]);let os,Ga;if(zt!==!1&&(Or!=null&&Or.total)){let ci;Or.size?ci=Or.size:ci=ca==="small"||ca==="middle"?"small":void 0;const Ei=La=>x.createElement(ii.Z,Object.assign({},Or,{className:z()(`${Pi}-pagination ${Pi}-pagination-${La}`,Or.className),size:ci})),_a=fi==="rtl"?"left":"right",{position:_i}=Or;if(_i!==null&&Array.isArray(_i)){const La=_i.find(ks=>ks.includes("top")),Xa=_i.find(ks=>ks.includes("bottom")),Mo=_i.every(ks=>`${ks}`=="none");!La&&!Xa&&!Mo&&(Ga=Ei(_a)),La&&(os=Ei(La.toLowerCase().replace("top",""))),Xa&&(Ga=Ei(Xa.toLowerCase().replace("bottom","")))}else Ga=Ei(_a)}let yo;typeof Fn=="boolean"?yo={spinning:Fn}:typeof Fn=="object"&&(yo=Object.assign({spinning:!0},Fn));const[to,Vi]=qs(Pi),[,Ui]=(0,mi.Z)(),fo=z()(`${Pi}-wrapper`,si==null?void 0:si.className,{[`${Pi}-wrapper-rtl`]:fi==="rtl"},De,Ve,Vi),Ms=Object.assign(Object.assign({},si==null?void 0:si.style),ze),Wo=Xn&&Xn.emptyText||(ji==null?void 0:ji("Table"))||x.createElement(Ii.Z,{componentName:"Table"}),ms=Yn?Xo:ja,Hs={},cc=x.useMemo(()=>{const{fontSize:ci,lineHeight:Ei,padding:_a,paddingXS:_i,paddingSM:La}=Ui,Xa=Math.floor(ci*Ei);switch(ca){case"large":return _a*2+Xa;case"small":return _i*2+Xa;default:return La*2+Xa}},[Ui,ca]);return Yn&&(Hs.listItemHeight=cc),to(x.createElement("div",{ref:W,className:fo,style:Ms},x.createElement(Gi.Z,Object.assign({spinning:!1},yo),os,x.createElement(ms,Object.assign({},Hs,Nr,{columns:Tn,direction:fi,expandable:Er,prefixCls:Pi,className:z()({[`${Pi}-middle`]:ca==="middle",[`${Pi}-small`]:ca==="small",[`${Pi}-bordered`]:rt,[`${Pi}-empty`]:Ri.length===0}),data:Ba,rowKey:li,rowClassName:vo,emptyText:Wo,internalHooks:j,internalRefs:fr,transformColumns:Ua})),Ga)))};var Tc=x.forwardRef(Ic);const ru=(B,W)=>{const me=x.useRef(0);return me.current+=1,x.createElement(Tc,Object.assign({},B,{ref:W,_renderTimes:me.current}))},wo=x.forwardRef(ru);wo.SELECTION_COLUMN=na,wo.EXPAND_COLUMN=K,wo.SELECTION_ALL=Ni,wo.SELECTION_INVERT=Pa,wo.SELECTION_NONE=Ha,wo.Column=zn,wo.ColumnGroup=dr,wo.Summary=O;var Ks=wo,iu=Ks},99313:function(yn,dt,m){"use strict";m.d(dt,{default:function(){return Ke}});var K=m(99267),j=m(18785),A=m(62772),xe=m(92310),R=m.n(xe),N=m(54476),x=m(20068),E=m(33885),F=m(42978),V=m(76190),Ie=m(75931),G=m(59301),le=m(49658),ke=m(18929),ue=m(77900),de=(0,G.createContext)(null),_e=G.forwardRef(function(H,ee){var Q=H.prefixCls,J=H.className,Ee=H.style,Ze=H.id,ft=H.active,tt=H.tabKey,ut=H.children;return G.createElement("div",{id:Ze&&"".concat(Ze,"-panel-").concat(tt),role:"tabpanel",tabIndex:ft?0:-1,"aria-labelledby":Ze&&"".concat(Ze,"-tab-").concat(tt),"aria-hidden":!ft,style:Ee,className:R()(Q,ft&&"".concat(Q,"-active"),J),ref:ee},ut)}),Pe=_e,Ue=["key","forceRender","style","className"];function Ce(H){var ee=H.id,Q=H.activeKey,J=H.animated,Ee=H.tabPosition,Ze=H.destroyInactiveTabPane,ft=G.useContext(de),tt=ft.prefixCls,ut=ft.tabs,It=J.tabPane,Pt="".concat(tt,"-tabpane");return G.createElement("div",{className:R()("".concat(tt,"-content-holder"))},G.createElement("div",{className:R()("".concat(tt,"-content"),"".concat(tt,"-content-").concat(Ee),(0,x.Z)({},"".concat(tt,"-content-animated"),It))},ut.map(function(At){var Ge=At.key,St=At.forceRender,Qt=At.style,Kt=At.className,tn=(0,Ie.Z)(At,Ue),Ut=Ge===Q;return G.createElement(ue.default,(0,N.Z)({key:Ge,visible:Ut,forceRender:St,removeOnLeave:!!Ze,leavedClassName:"".concat(Pt,"-hidden")},J.tabPaneMotion),function(Sn,Nt){var mn=Sn.style,ot=Sn.className;return G.createElement(Pe,(0,N.Z)({},tn,{prefixCls:Pt,id:ee,tabKey:Ge,animated:It,active:Ut,style:(0,E.Z)((0,E.Z)({},Qt),mn),className:R()(Kt,ot),ref:Nt}))})})))}var pe=m(94480),q=m(29301),_=m(6089),ie=m(8654),ae={width:0,height:0,left:0,top:0};function Se(H,ee,Q){return(0,G.useMemo)(function(){for(var J,Ee=new Map,Ze=ee.get((J=H[0])===null||J===void 0?void 0:J.key)||ae,ft=Ze.left+Ze.width,tt=0;tt<H.length;tt+=1){var ut=H[tt].key,It=ee.get(ut);if(!It){var Pt;It=ee.get((Pt=H[tt-1])===null||Pt===void 0?void 0:Pt.key)||ae}var At=Ee.get(ut)||(0,E.Z)({},It);At.right=ft-At.left-At.width,Ee.set(ut,At)}return Ee},[H.map(function(J){return J.key}).join("_"),ee,Q])}function se(H,ee){var Q=G.useRef(H),J=G.useState({}),Ee=(0,F.Z)(J,2),Ze=Ee[1];function ft(tt){var ut=typeof tt=="function"?tt(Q.current):tt;ut!==Q.current&&ee(ut,Q.current),Q.current=ut,Ze({})}return[Q.current,ft]}var be=.1,D=.01,Le=20,z=Math.pow(.995,Le);function we(H,ee){var Q=(0,G.useState)(),J=(0,F.Z)(Q,2),Ee=J[0],Ze=J[1],ft=(0,G.useState)(0),tt=(0,F.Z)(ft,2),ut=tt[0],It=tt[1],Pt=(0,G.useState)(0),At=(0,F.Z)(Pt,2),Ge=At[0],St=At[1],Qt=(0,G.useState)(),Kt=(0,F.Z)(Qt,2),tn=Kt[0],Ut=Kt[1],Sn=(0,G.useRef)();function Nt(gt){var bt=gt.touches[0],xt=bt.screenX,Rt=bt.screenY;Ze({x:xt,y:Rt}),window.clearInterval(Sn.current)}function mn(gt){if(Ee){gt.preventDefault();var bt=gt.touches[0],xt=bt.screenX,Rt=bt.screenY;Ze({x:xt,y:Rt});var Gt=xt-Ee.x,an=Rt-Ee.y;ee(Gt,an);var Pn=Date.now();It(Pn),St(Pn-ut),Ut({x:Gt,y:an})}}function ot(){if(Ee&&(Ze(null),Ut(null),tn)){var gt=tn.x/Ge,bt=tn.y/Ge,xt=Math.abs(gt),Rt=Math.abs(bt);if(Math.max(xt,Rt)<be)return;var Gt=gt,an=bt;Sn.current=window.setInterval(function(){if(Math.abs(Gt)<D&&Math.abs(an)<D){window.clearInterval(Sn.current);return}Gt*=z,an*=z,ee(Gt*Le,an*Le)},Le)}}var st=(0,G.useRef)();function ht(gt){var bt=gt.deltaX,xt=gt.deltaY,Rt=0,Gt=Math.abs(bt),an=Math.abs(xt);Gt===an?Rt=st.current==="x"?bt:xt:Gt>an?(Rt=bt,st.current="x"):(Rt=xt,st.current="y"),ee(-Rt,-Rt)&>.preventDefault()}var Mt=(0,G.useRef)(null);Mt.current={onTouchStart:Nt,onTouchMove:mn,onTouchEnd:ot,onWheel:ht},G.useEffect(function(){function gt(Gt){Mt.current.onTouchStart(Gt)}function bt(Gt){Mt.current.onTouchMove(Gt)}function xt(Gt){Mt.current.onTouchEnd(Gt)}function Rt(Gt){Mt.current.onWheel(Gt)}return document.addEventListener("touchmove",bt,{passive:!1}),document.addEventListener("touchend",xt,{passive:!1}),H.current.addEventListener("touchstart",gt,{passive:!1}),H.current.addEventListener("wheel",Rt),function(){document.removeEventListener("touchmove",bt),document.removeEventListener("touchend",xt)}},[])}var ge=m(34280);function Te(H){var ee=(0,G.useState)(0),Q=(0,F.Z)(ee,2),J=Q[0],Ee=Q[1],Ze=(0,G.useRef)(0),ft=(0,G.useRef)();return ft.current=H,(0,ge.o)(function(){var tt;(tt=ft.current)===null||tt===void 0||tt.call(ft)},[J]),function(){Ze.current===J&&(Ze.current+=1,Ee(Ze.current))}}function Fe(H){var ee=(0,G.useRef)([]),Q=(0,G.useState)({}),J=(0,F.Z)(Q,2),Ee=J[1],Ze=(0,G.useRef)(typeof H=="function"?H():H),ft=Te(function(){var ut=Ze.current;ee.current.forEach(function(It){ut=It(ut)}),ee.current=[],Ze.current=ut,Ee({})});function tt(ut){ee.current.push(ut),ft()}return[Ze.current,tt]}var Re={width:0,height:0,left:0,top:0,right:0};function X(H,ee,Q,J,Ee,Ze,ft){var tt=ft.tabs,ut=ft.tabPosition,It=ft.rtl,Pt,At,Ge;return["top","bottom"].includes(ut)?(Pt="width",At=It?"right":"left",Ge=Math.abs(Q)):(Pt="height",At="top",Ge=-Q),(0,G.useMemo)(function(){if(!tt.length)return[0,0];for(var St=tt.length,Qt=St,Kt=0;Kt<St;Kt+=1){var tn=H.get(tt[Kt].key)||Re;if(tn[At]+tn[Pt]>Ge+ee){Qt=Kt-1;break}}for(var Ut=0,Sn=St-1;Sn>=0;Sn-=1){var Nt=H.get(tt[Sn].key)||Re;if(Nt[At]<Ge){Ut=Sn+1;break}}return Ut>=Qt?[0,0]:[Ut,Qt]},[H,ee,J,Ee,Ze,Ge,ut,tt.map(function(St){return St.key}).join("_"),It])}function w(H){var ee;return H instanceof Map?(ee={},H.forEach(function(Q,J){ee[J]=Q})):ee=H,JSON.stringify(ee)}var ve="TABS_DQ";function Qe(H){return String(H).replace(/"/g,ve)}function je(H,ee,Q,J){return!(!Q||J||H===!1||H===void 0&&(ee===!1||ee===null))}function Be(H,ee){var Q=H.prefixCls,J=H.editable,Ee=H.locale,Ze=H.style;return!J||J.showAdd===!1?null:G.createElement("button",{ref:ee,type:"button",className:"".concat(Q,"-nav-add"),style:Ze,"aria-label":(Ee==null?void 0:Ee.addAriaLabel)||"Add tab",onClick:function(tt){J.onEdit("add",{event:tt})}},J.addIcon||"+")}var Oe=G.forwardRef(Be),lt=G.forwardRef(function(H,ee){var Q=H.position,J=H.prefixCls,Ee=H.extra;if(!Ee)return null;var Ze,ft={};return(0,V.Z)(Ee)==="object"&&!G.isValidElement(Ee)?ft=Ee:ft.right=Ee,Q==="right"&&(Ze=ft.right),Q==="left"&&(Ze=ft.left),Ze?G.createElement("div",{className:"".concat(J,"-extra-content"),ref:ee},Ze):null}),$t=lt,vt=m(31561),Tt=m(15285),wt=m(10228);function pt(H,ee){var Q=H.prefixCls,J=H.id,Ee=H.tabs,Ze=H.locale,ft=H.mobile,tt=H.moreIcon,ut=tt===void 0?"More":tt,It=H.moreTransitionName,Pt=H.style,At=H.className,Ge=H.editable,St=H.tabBarGutter,Qt=H.rtl,Kt=H.removeAriaLabel,tn=H.onTabClick,Ut=H.getPopupContainer,Sn=H.popupClassName,Nt=(0,G.useState)(!1),mn=(0,F.Z)(Nt,2),ot=mn[0],st=mn[1],ht=(0,G.useState)(null),Mt=(0,F.Z)(ht,2),gt=Mt[0],bt=Mt[1],xt="".concat(J,"-more-popup"),Rt="".concat(Q,"-dropdown"),Gt=gt!==null?"".concat(xt,"-").concat(gt):null,an=Ze==null?void 0:Ze.dropdownAriaLabel;function Pn(Vn,wn){Vn.preventDefault(),Vn.stopPropagation(),Ge.onEdit("remove",{key:wn,event:Vn})}var Kn=G.createElement(Tt.ZP,{onClick:function(wn){var On=wn.key,Un=wn.domEvent;tn(On,Un),st(!1)},prefixCls:"".concat(Rt,"-menu"),id:xt,tabIndex:-1,role:"listbox","aria-activedescendant":Gt,selectedKeys:[gt],"aria-label":an!==void 0?an:"expanded dropdown"},Ee.map(function(Vn){var wn=Vn.closable,On=Vn.disabled,Un=Vn.closeIcon,Nn=Vn.key,vr=Vn.label,Zr=je(wn,Un,Ge,On);return G.createElement(Tt.sN,{key:Nn,id:"".concat(xt,"-").concat(Nn),role:"option","aria-controls":J&&"".concat(J,"-panel-").concat(Nn),disabled:On},G.createElement("span",null,vr),Zr&&G.createElement("button",{type:"button","aria-label":Kt||"remove",tabIndex:0,className:"".concat(Rt,"-menu-item-remove"),onClick:function(nn){nn.stopPropagation(),Pn(nn,Nn)}},Un||Ge.removeIcon||"\xD7"))}));function Qn(Vn){for(var wn=Ee.filter(function(Zr){return!Zr.disabled}),On=wn.findIndex(function(Zr){return Zr.key===gt})||0,Un=wn.length,Nn=0;Nn<Un;Nn+=1){On=(On+Vn+Un)%Un;var vr=wn[On];if(!vr.disabled){bt(vr.key);return}}}function $n(Vn){var wn=Vn.which;if(!ot){[wt.Z.DOWN,wt.Z.SPACE,wt.Z.ENTER].includes(wn)&&(st(!0),Vn.preventDefault());return}switch(wn){case wt.Z.UP:Qn(-1),Vn.preventDefault();break;case wt.Z.DOWN:Qn(1),Vn.preventDefault();break;case wt.Z.ESC:st(!1);break;case wt.Z.SPACE:case wt.Z.ENTER:gt!==null&&tn(gt,Vn);break}}(0,G.useEffect)(function(){var Vn=document.getElementById(Gt);Vn&&Vn.scrollIntoView&&Vn.scrollIntoView(!1)},[gt]),(0,G.useEffect)(function(){ot||bt(null)},[ot]);var Cn=(0,x.Z)({},Qt?"marginRight":"marginLeft",St);Ee.length||(Cn.visibility="hidden",Cn.order=1);var rr=R()((0,x.Z)({},"".concat(Rt,"-rtl"),Qt)),jn=ft?null:G.createElement(vt.Z,{prefixCls:Rt,overlay:Kn,trigger:["hover"],visible:Ee.length?ot:!1,transitionName:It,onVisibleChange:st,overlayClassName:R()(rr,Sn),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:Ut},G.createElement("button",{type:"button",className:"".concat(Q,"-nav-more"),style:Cn,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":xt,id:"".concat(J,"-more"),"aria-expanded":ot,onKeyDown:$n},ut));return G.createElement("div",{className:R()("".concat(Q,"-nav-operations"),At),style:Pt,ref:ee},jn,G.createElement(Oe,{prefixCls:Q,locale:Ze,editable:Ge}))}var at=G.memo(G.forwardRef(pt),function(H,ee){return ee.tabMoving});function S(H){var ee,Q=H.prefixCls,J=H.id,Ee=H.active,Ze=H.tab,ft=Ze.key,tt=Ze.label,ut=Ze.disabled,It=Ze.closeIcon,Pt=H.closable,At=H.renderWrapper,Ge=H.removeAriaLabel,St=H.editable,Qt=H.onClick,Kt=H.onFocus,tn=H.style,Ut="".concat(Q,"-tab"),Sn=je(Pt,It,St,ut);function Nt(st){ut||Qt(st)}function mn(st){st.preventDefault(),st.stopPropagation(),St.onEdit("remove",{key:ft,event:st})}var ot=G.createElement("div",{key:ft,"data-node-key":Qe(ft),className:R()(Ut,(ee={},(0,x.Z)(ee,"".concat(Ut,"-with-remove"),Sn),(0,x.Z)(ee,"".concat(Ut,"-active"),Ee),(0,x.Z)(ee,"".concat(Ut,"-disabled"),ut),ee)),style:tn,onClick:Nt},G.createElement("div",{role:"tab","aria-selected":Ee,id:J&&"".concat(J,"-tab-").concat(ft),className:"".concat(Ut,"-btn"),"aria-controls":J&&"".concat(J,"-panel-").concat(ft),"aria-disabled":ut,tabIndex:ut?null:0,onClick:function(ht){ht.stopPropagation(),Nt(ht)},onKeyDown:function(ht){[wt.Z.SPACE,wt.Z.ENTER].includes(ht.which)&&(ht.preventDefault(),Nt(ht))},onFocus:Kt},tt),Sn&&G.createElement("button",{type:"button","aria-label":Ge||"remove",tabIndex:0,className:"".concat(Ut,"-remove"),onClick:function(ht){ht.stopPropagation(),mn(ht)}},It||St.removeIcon||"\xD7"));return At?At(ot):ot}var p=S,h=m(16089),g=function(ee){var Q=ee.activeTabOffset,J=ee.horizontal,Ee=ee.rtl,Ze=ee.indicatorSize,ft=(0,G.useState)(),tt=(0,F.Z)(ft,2),ut=tt[0],It=tt[1],Pt=(0,G.useRef)(),At=function(Qt){return typeof Ze=="function"?Ze(Qt):typeof Ze=="number"?Ze:Qt};function Ge(){h.Z.cancel(Pt.current)}return(0,G.useEffect)(function(){var St={};return Q&&(J?(Ee?(St.right=Q.right+Q.width/2,St.transform="translateX(50%)"):(St.left=Q.left+Q.width/2,St.transform="translateX(-50%)"),St.width=At(Q.width)):(St.top=Q.top+Q.height/2,St.transform="translateY(-50%)",St.height=At(Q.height))),Ge(),Pt.current=(0,h.Z)(function(){It(St)}),Ge},[Q,J,Ee,Ze]),{style:ut}},y=g,d=function(ee){var Q=ee.current||{},J=Q.offsetWidth,Ee=J===void 0?0:J,Ze=Q.offsetHeight,ft=Ze===void 0?0:Ze;return[Ee,ft]},L=function(ee,Q){return ee[Q?0:1]};function fe(H,ee){var Q,J=G.useContext(de),Ee=J.prefixCls,Ze=J.tabs,ft=H.className,tt=H.style,ut=H.id,It=H.animated,Pt=H.activeKey,At=H.rtl,Ge=H.extra,St=H.editable,Qt=H.locale,Kt=H.tabPosition,tn=H.tabBarGutter,Ut=H.children,Sn=H.onTabClick,Nt=H.onTabScroll,mn=H.indicatorSize,ot=(0,G.useRef)(),st=(0,G.useRef)(),ht=(0,G.useRef)(),Mt=(0,G.useRef)(),gt=(0,G.useRef)(),bt=(0,G.useRef)(),xt=(0,G.useRef)(),Rt=Kt==="top"||Kt==="bottom",Gt=se(0,function(Qr,qr){Rt&&Nt&&Nt({direction:Qr>qr?"left":"right"})}),an=(0,F.Z)(Gt,2),Pn=an[0],Kn=an[1],Qn=se(0,function(Qr,qr){!Rt&&Nt&&Nt({direction:Qr>qr?"top":"bottom"})}),$n=(0,F.Z)(Qn,2),Cn=$n[0],rr=$n[1],jn=(0,G.useState)([0,0]),Vn=(0,F.Z)(jn,2),wn=Vn[0],On=Vn[1],Un=(0,G.useState)([0,0]),Nn=(0,F.Z)(Un,2),vr=Nn[0],Zr=Nn[1],Gn=(0,G.useState)([0,0]),nn=(0,F.Z)(Gn,2),Ht=nn[0],Zn=nn[1],In=(0,G.useState)([0,0]),ir=(0,F.Z)(In,2),xr=ir[0],ar=ir[1],Wr=Fe(new Map),Pr=(0,F.Z)(Wr,2),hi=Pr[0],zn=Pr[1],kn=Se(Ze,hi,vr[0]),dr=L(wn,Rt),mr=L(vr,Rt),Jr=L(Ht,Rt),sa=L(xr,Rt),Ii=dr<mr+Jr,zr=Ii?dr-sa:dr-Jr,yi="".concat(Ee,"-nav-operations-hidden"),pi=0,ii=0;Rt&&At?(pi=0,ii=Math.max(0,mr-zr)):(pi=Math.min(0,zr-mr),ii=0);function Gi(Qr){return Qr<pi?pi:Qr>ii?ii:Qr}var mi=(0,G.useRef)(),Bi=(0,G.useState)(),ba=(0,F.Z)(Bi,2),da=ba[0],ea=ba[1];function ma(){ea(Date.now())}function xa(){window.clearTimeout(mi.current)}we(Mt,function(Qr,qr){function Hi(Zi,fa){Zi(function(Wi){var bs=Gi(Wi+fa);return bs})}return Ii?(Rt?Hi(Kn,Qr):Hi(rr,qr),xa(),ma(),!0):!1}),(0,G.useEffect)(function(){return xa(),da&&(mi.current=window.setTimeout(function(){ea(0)},100)),xa},[da]);var Fa=X(kn,zr,Rt?Pn:Cn,mr,Jr,sa,(0,E.Z)((0,E.Z)({},H),{},{tabs:Ze})),Ka=(0,F.Z)(Fa,2),Do=Ka[0],Co=Ka[1],ao=(0,_.Z)(function(){var Qr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Pt,qr=kn.get(Qr)||{width:0,height:0,left:0,right:0,top:0};if(Rt){var Hi=Pn;At?qr.right<Pn?Hi=qr.right:qr.right+qr.width>Pn+zr&&(Hi=qr.right+qr.width-zr):qr.left<-Pn?Hi=-qr.left:qr.left+qr.width>-Pn+zr&&(Hi=-(qr.left+qr.width-zr)),rr(0),Kn(Gi(Hi))}else{var Zi=Cn;qr.top<-Cn?Zi=-qr.top:qr.top+qr.height>-Cn+zr&&(Zi=-(qr.top+qr.height-zr)),Kn(0),rr(Gi(Zi))}}),la={};Kt==="top"||Kt==="bottom"?la[At?"marginRight":"marginLeft"]=tn:la.marginTop=tn;var Fo=Ze.map(function(Qr,qr){var Hi=Qr.key;return G.createElement(p,{id:ut,prefixCls:Ee,key:Hi,tab:Qr,style:qr===0?void 0:la,closable:Qr.closable,editable:St,active:Hi===Pt,renderWrapper:Ut,removeAriaLabel:Qt==null?void 0:Qt.removeAriaLabel,onClick:function(fa){Sn(Hi,fa)},onFocus:function(){ao(Hi),ma(),Mt.current&&(At||(Mt.current.scrollLeft=0),Mt.current.scrollTop=0)}})}),oo=function(){return zn(function(){var qr=new Map;return Ze.forEach(function(Hi){var Zi,fa=Hi.key,Wi=(Zi=gt.current)===null||Zi===void 0?void 0:Zi.querySelector('[data-node-key="'.concat(Qe(fa),'"]'));Wi&&qr.set(fa,{width:Wi.offsetWidth,height:Wi.offsetHeight,left:Wi.offsetLeft,top:Wi.offsetTop})}),qr})};(0,G.useEffect)(function(){oo()},[Ze.map(function(Qr){return Qr.key}).join("_")]);var Da=Te(function(){var Qr=d(ot),qr=d(st),Hi=d(ht);On([Qr[0]-qr[0]-Hi[0],Qr[1]-qr[1]-Hi[1]]);var Zi=d(xt);Zn(Zi);var fa=d(bt);ar(fa);var Wi=d(gt);Zr([Wi[0]-Zi[0],Wi[1]-Zi[1]]),oo()}),ta=Ze.slice(0,Do),so=Ze.slice(Co+1),cr=[].concat((0,pe.Z)(ta),(0,pe.Z)(so)),Br=kn.get(Pt),_r=y({activeTabOffset:Br,horizontal:Rt,rtl:At,indicatorSize:mn}),sr=_r.style;(0,G.useEffect)(function(){ao()},[Pt,pi,ii,w(Br),w(kn),Rt]),(0,G.useEffect)(function(){Da()},[At]);var Gr=!!cr.length,ai="".concat(Ee,"-nav-wrap"),Fi,Xi,Ki,Yi;return Rt?At?(Xi=Pn>0,Fi=Pn!==ii):(Fi=Pn<0,Xi=Pn!==pi):(Ki=Cn<0,Yi=Cn!==pi),G.createElement(q.Z,{onResize:Da},G.createElement("div",{ref:(0,ie.x1)(ee,ot),role:"tablist",className:R()("".concat(Ee,"-nav"),ft),style:tt,onKeyDown:function(){ma()}},G.createElement($t,{ref:st,position:"left",extra:Ge,prefixCls:Ee}),G.createElement(q.Z,{onResize:Da},G.createElement("div",{className:R()(ai,(Q={},(0,x.Z)(Q,"".concat(ai,"-ping-left"),Fi),(0,x.Z)(Q,"".concat(ai,"-ping-right"),Xi),(0,x.Z)(Q,"".concat(ai,"-ping-top"),Ki),(0,x.Z)(Q,"".concat(ai,"-ping-bottom"),Yi),Q)),ref:Mt},G.createElement(q.Z,{onResize:Da},G.createElement("div",{ref:gt,className:"".concat(Ee,"-nav-list"),style:{transform:"translate(".concat(Pn,"px, ").concat(Cn,"px)"),transition:da?"none":void 0}},Fo,G.createElement(Oe,{ref:xt,prefixCls:Ee,locale:Qt,editable:St,style:(0,E.Z)((0,E.Z)({},Fo.length===0?void 0:la),{},{visibility:Gr?"hidden":null})}),G.createElement("div",{className:R()("".concat(Ee,"-ink-bar"),(0,x.Z)({},"".concat(Ee,"-ink-bar-animated"),It.inkBar)),style:sr}))))),G.createElement(at,(0,N.Z)({},H,{removeAriaLabel:Qt==null?void 0:Qt.removeAriaLabel,ref:bt,prefixCls:Ee,tabs:cr,className:!Gr&&yi,tabMoving:!!da})),G.createElement($t,{ref:ht,position:"right",extra:Ge,prefixCls:Ee})))}var O=G.forwardRef(fe),I=["renderTabBar"],he=["label","key"];function Y(H){var ee=H.renderTabBar,Q=(0,Ie.Z)(H,I),J=G.useContext(de),Ee=J.tabs;if(ee){var Ze=(0,E.Z)((0,E.Z)({},Q),{},{panes:Ee.map(function(ft){var tt=ft.label,ut=ft.key,It=(0,Ie.Z)(ft,he);return G.createElement(Pe,(0,N.Z)({tab:tt,key:ut,tabKey:ut},It))})});return ee(Ze,O)}return G.createElement(O,Q)}var U=m(48736);function ye(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},ee;return H===!1?ee={inkBar:!1,tabPane:!1}:H===!0?ee={inkBar:!0,tabPane:!1}:ee=(0,E.Z)({inkBar:!0},(0,V.Z)(H)==="object"?H:{}),ee.tabPaneMotion&&ee.tabPane===void 0&&(ee.tabPane=!0),!ee.tabPaneMotion&&ee.tabPane&&(ee.tabPane=!1),ee}var Ye=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicatorSize"],ce=0;function Ae(H,ee){var Q,J=H.id,Ee=H.prefixCls,Ze=Ee===void 0?"rc-tabs":Ee,ft=H.className,tt=H.items,ut=H.direction,It=H.activeKey,Pt=H.defaultActiveKey,At=H.editable,Ge=H.animated,St=H.tabPosition,Qt=St===void 0?"top":St,Kt=H.tabBarGutter,tn=H.tabBarStyle,Ut=H.tabBarExtraContent,Sn=H.locale,Nt=H.moreIcon,mn=H.moreTransitionName,ot=H.destroyInactiveTabPane,st=H.renderTabBar,ht=H.onChange,Mt=H.onTabClick,gt=H.onTabScroll,bt=H.getPopupContainer,xt=H.popupClassName,Rt=H.indicatorSize,Gt=(0,Ie.Z)(H,Ye),an=G.useMemo(function(){return(tt||[]).filter(function(ar){return ar&&(0,V.Z)(ar)==="object"&&"key"in ar})},[tt]),Pn=ut==="rtl",Kn=ye(Ge),Qn=(0,G.useState)(!1),$n=(0,F.Z)(Qn,2),Cn=$n[0],rr=$n[1];(0,G.useEffect)(function(){rr((0,le.Z)())},[]);var jn=(0,ke.Z)(function(){var ar;return(ar=an[0])===null||ar===void 0?void 0:ar.key},{value:It,defaultValue:Pt}),Vn=(0,F.Z)(jn,2),wn=Vn[0],On=Vn[1],Un=(0,G.useState)(function(){return an.findIndex(function(ar){return ar.key===wn})}),Nn=(0,F.Z)(Un,2),vr=Nn[0],Zr=Nn[1];(0,G.useEffect)(function(){var ar=an.findIndex(function(Pr){return Pr.key===wn});if(ar===-1){var Wr;ar=Math.max(0,Math.min(vr,an.length-1)),On((Wr=an[ar])===null||Wr===void 0?void 0:Wr.key)}Zr(ar)},[an.map(function(ar){return ar.key}).join("_"),wn,vr]);var Gn=(0,ke.Z)(null,{value:J}),nn=(0,F.Z)(Gn,2),Ht=nn[0],Zn=nn[1];(0,G.useEffect)(function(){J||(Zn("rc-tabs-".concat(ce)),ce+=1)},[]);function In(ar,Wr){Mt==null||Mt(ar,Wr);var Pr=ar!==wn;On(ar),Pr&&(ht==null||ht(ar))}var ir={id:Ht,activeKey:wn,animated:Kn,tabPosition:Qt,rtl:Pn,mobile:Cn},xr=(0,E.Z)((0,E.Z)({},ir),{},{editable:At,locale:Sn,moreIcon:Nt,moreTransitionName:mn,tabBarGutter:Kt,onTabClick:In,onTabScroll:gt,extra:Ut,style:tn,panes:null,getPopupContainer:bt,popupClassName:xt,indicatorSize:Rt});return G.createElement(de.Provider,{value:{tabs:an,prefixCls:Ze}},G.createElement("div",(0,N.Z)({ref:ee,id:J,className:R()(Ze,"".concat(Ze,"-").concat(Qt),(Q={},(0,x.Z)(Q,"".concat(Ze,"-mobile"),Cn),(0,x.Z)(Q,"".concat(Ze,"-editable"),At),(0,x.Z)(Q,"".concat(Ze,"-rtl"),Pn),Q),ft)},Gt),G.createElement(Y,(0,N.Z)({},xr,{renderTabBar:st})),G.createElement(Ce,(0,N.Z)({destroyInactiveTabPane:ot},ir,{animated:Kn}))))}var qe=G.forwardRef(Ae),oe=qe,T=oe,re=m(36355),$e=m(19716),Xe=()=>null,ct=m(62892);const mt={motionAppear:!1,motionEnter:!0,motionLeave:!0};function yt(H){let ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inkBar:!0,tabPane:!1},Q;return ee===!1?Q={inkBar:!1,tabPane:!1}:ee===!0?Q={inkBar:!0,tabPane:!0}:Q=Object.assign({inkBar:!0},typeof ee=="object"?ee:{}),Q.tabPane&&(Q.tabPaneMotion=Object.assign(Object.assign({},mt),{motionName:(0,ct.m)(H,"switch")})),Q}var Bt=m(11592),Ft=function(H,ee){var Q={};for(var J in H)Object.prototype.hasOwnProperty.call(H,J)&&ee.indexOf(J)<0&&(Q[J]=H[J]);if(H!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ee=0,J=Object.getOwnPropertySymbols(H);Ee<J.length;Ee++)ee.indexOf(J[Ee])<0&&Object.prototype.propertyIsEnumerable.call(H,J[Ee])&&(Q[J[Ee]]=H[J[Ee]]);return Q};function _t(H){return H.filter(ee=>ee)}function Yt(H,ee){if(H)return H;const Q=(0,Bt.Z)(ee).map(J=>{if(G.isValidElement(J)){const{key:Ee,props:Ze}=J,ft=Ze||{},{tab:tt}=ft,ut=Ft(ft,["tab"]);return Object.assign(Object.assign({key:String(Ee)},ut),{label:tt})}return null});return _t(Q)}var rn=m(17313),hn=m(83116),Wt=m(37613),on=m(13826),Vt=H=>{const{componentCls:ee,motionDurationSlow:Q}=H;return[{[ee]:{[`${ee}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${Q}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${Q}`}}}}},[(0,on.oN)(H,"slide-up"),(0,on.oN)(H,"slide-down")]]};const Mn=H=>{const{componentCls:ee,tabsCardPadding:Q,cardBg:J,cardGutter:Ee,colorBorderSecondary:Ze,itemSelectedColor:ft}=H;return{[`${ee}-card`]:{[`> ${ee}-nav, > div > ${ee}-nav`]:{[`${ee}-tab`]:{margin:0,padding:Q,background:J,border:`${H.lineWidth}px ${H.lineType} ${Ze}`,transition:`all ${H.motionDurationSlow} ${H.motionEaseInOut}`},[`${ee}-tab-active`]:{color:ft,background:H.colorBgContainer},[`${ee}-ink-bar`]:{visibility:"hidden"}},[`&${ee}-top, &${ee}-bottom`]:{[`> ${ee}-nav, > div > ${ee}-nav`]:{[`${ee}-tab + ${ee}-tab`]:{marginLeft:{_skip_check_:!0,value:`${Ee}px`}}}},[`&${ee}-top`]:{[`> ${ee}-nav, > div > ${ee}-nav`]:{[`${ee}-tab`]:{borderRadius:`${H.borderRadiusLG}px ${H.borderRadiusLG}px 0 0`},[`${ee}-tab-active`]:{borderBottomColor:H.colorBgContainer}}},[`&${ee}-bottom`]:{[`> ${ee}-nav, > div > ${ee}-nav`]:{[`${ee}-tab`]:{borderRadius:`0 0 ${H.borderRadiusLG}px ${H.borderRadiusLG}px`},[`${ee}-tab-active`]:{borderTopColor:H.colorBgContainer}}},[`&${ee}-left, &${ee}-right`]:{[`> ${ee}-nav, > div > ${ee}-nav`]:{[`${ee}-tab + ${ee}-tab`]:{marginTop:`${Ee}px`}}},[`&${ee}-left`]:{[`> ${ee}-nav, > div > ${ee}-nav`]:{[`${ee}-tab`]:{borderRadius:{_skip_check_:!0,value:`${H.borderRadiusLG}px 0 0 ${H.borderRadiusLG}px`}},[`${ee}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:H.colorBgContainer}}}},[`&${ee}-right`]:{[`> ${ee}-nav, > div > ${ee}-nav`]:{[`${ee}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${H.borderRadiusLG}px ${H.borderRadiusLG}px 0`}},[`${ee}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:H.colorBgContainer}}}}}}},qn=H=>{const{componentCls:ee,itemHoverColor:Q,dropdownEdgeChildVerticalPadding:J}=H;return{[`${ee}-dropdown`]:Object.assign(Object.assign({},(0,rn.Wf)(H)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:H.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${ee}-dropdown-menu`]:{maxHeight:H.tabsDropdownHeight,margin:0,padding:`${J}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:H.colorBgContainer,backgroundClip:"padding-box",borderRadius:H.borderRadiusLG,outline:"none",boxShadow:H.boxShadowSecondary,"&-item":Object.assign(Object.assign({},rn.vS),{display:"flex",alignItems:"center",minWidth:H.tabsDropdownWidth,margin:0,padding:`${H.paddingXXS}px ${H.paddingSM}px`,color:H.colorText,fontWeight:"normal",fontSize:H.fontSize,lineHeight:H.lineHeight,cursor:"pointer",transition:`all ${H.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:H.marginSM},color:H.colorTextDescription,fontSize:H.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:Q}},"&:hover":{background:H.controlItemBgHover},"&-disabled":{"&, &:hover":{color:H.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},An=H=>{const{componentCls:ee,margin:Q,colorBorderSecondary:J,horizontalMargin:Ee,verticalItemPadding:Ze,verticalItemMargin:ft}=H;return{[`${ee}-top, ${ee}-bottom`]:{flexDirection:"column",[`> ${ee}-nav, > div > ${ee}-nav`]:{margin:Ee,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${H.lineWidth}px ${H.lineType} ${J}`,content:"''"},[`${ee}-ink-bar`]:{height:H.lineWidthBold,"&-animated":{transition:`width ${H.motionDurationSlow}, left ${H.motionDurationSlow},
|
|
|
right ${H.motionDurationSlow}`}},[`${ee}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:H.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:H.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:H.boxShadowTabsOverflowRight},[`&${ee}-nav-wrap-ping-left::before`]:{opacity:1},[`&${ee}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${ee}-top`]:{[`> ${ee}-nav,
|
|
|
> div > ${ee}-nav`]:{"&::before":{bottom:0},[`${ee}-ink-bar`]:{bottom:0}}},[`${ee}-bottom`]:{[`> ${ee}-nav, > div > ${ee}-nav`]:{order:1,marginTop:`${Q}px`,marginBottom:0,"&::before":{top:0},[`${ee}-ink-bar`]:{top:0}},[`> ${ee}-content-holder, > div > ${ee}-content-holder`]:{order:0}},[`${ee}-left, ${ee}-right`]:{[`> ${ee}-nav, > div > ${ee}-nav`]:{flexDirection:"column",minWidth:H.controlHeight*1.25,[`${ee}-tab`]:{padding:Ze,textAlign:"center"},[`${ee}-tab + ${ee}-tab`]:{margin:ft},[`${ee}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:H.controlHeight},"&::before":{top:0,boxShadow:H.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:H.boxShadowTabsOverflowBottom},[`&${ee}-nav-wrap-ping-top::before`]:{opacity:1},[`&${ee}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${ee}-ink-bar`]:{width:H.lineWidthBold,"&-animated":{transition:`height ${H.motionDurationSlow}, top ${H.motionDurationSlow}`}},[`${ee}-nav-list, ${ee}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${ee}-left`]:{[`> ${ee}-nav, > div > ${ee}-nav`]:{[`${ee}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${ee}-content-holder, > div > ${ee}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${H.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${H.lineWidth}px ${H.lineType} ${H.colorBorder}`},[`> ${ee}-content > ${ee}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:H.paddingLG}}}},[`${ee}-right`]:{[`> ${ee}-nav, > div > ${ee}-nav`]:{order:1,[`${ee}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${ee}-content-holder, > div > ${ee}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-H.lineWidth},borderRight:{_skip_check_:!0,value:`${H.lineWidth}px ${H.lineType} ${H.colorBorder}`},[`> ${ee}-content > ${ee}-tabpane`]:{paddingRight:{_skip_check_:!0,value:H.paddingLG}}}}}},pr=H=>{const{componentCls:ee,cardPaddingSM:Q,cardPaddingLG:J,horizontalItemPaddingSM:Ee,horizontalItemPaddingLG:Ze}=H;return{[ee]:{"&-small":{[`> ${ee}-nav`]:{[`${ee}-tab`]:{padding:Ee,fontSize:H.titleFontSizeSM}}},"&-large":{[`> ${ee}-nav`]:{[`${ee}-tab`]:{padding:Ze,fontSize:H.titleFontSizeLG}}}},[`${ee}-card`]:{[`&${ee}-small`]:{[`> ${ee}-nav`]:{[`${ee}-tab`]:{padding:Q}},[`&${ee}-bottom`]:{[`> ${ee}-nav ${ee}-tab`]:{borderRadius:`0 0 ${H.borderRadius}px ${H.borderRadius}px`}},[`&${ee}-top`]:{[`> ${ee}-nav ${ee}-tab`]:{borderRadius:`${H.borderRadius}px ${H.borderRadius}px 0 0`}},[`&${ee}-right`]:{[`> ${ee}-nav ${ee}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${H.borderRadius}px ${H.borderRadius}px 0`}}},[`&${ee}-left`]:{[`> ${ee}-nav ${ee}-tab`]:{borderRadius:{_skip_check_:!0,value:`${H.borderRadius}px 0 0 ${H.borderRadius}px`}}}},[`&${ee}-large`]:{[`> ${ee}-nav`]:{[`${ee}-tab`]:{padding:J}}}}}},er=H=>{const{componentCls:ee,itemActiveColor:Q,itemHoverColor:J,iconCls:Ee,tabsHorizontalItemMargin:Ze,horizontalItemPadding:ft,itemSelectedColor:tt,itemColor:ut}=H,It=`${ee}-tab`;return{[It]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:ft,fontSize:H.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:ut,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:Q}},(0,rn.Qy)(H)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-H.marginXXS},marginLeft:{_skip_check_:!0,value:H.marginXS},color:H.colorTextDescription,fontSize:H.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${H.motionDurationSlow}`,"&:hover":{color:H.colorTextHeading}},"&:hover":{color:J},[`&${It}-active ${It}-btn`]:{color:tt,textShadow:H.tabsActiveTextShadow},[`&${It}-disabled`]:{color:H.colorTextDisabled,cursor:"not-allowed"},[`&${It}-disabled ${It}-btn, &${It}-disabled ${ee}-remove`]:{"&:focus, &:active":{color:H.colorTextDisabled}},[`& ${It}-remove ${Ee}`]:{margin:0},[Ee]:{marginRight:{_skip_check_:!0,value:H.marginSM}}},[`${It} + ${It}`]:{margin:{_skip_check_:!0,value:Ze}}}},gr=H=>{const{componentCls:ee,tabsHorizontalItemMarginRTL:Q,iconCls:J,cardGutter:Ee}=H;return{[`${ee}-rtl`]:{direction:"rtl",[`${ee}-nav`]:{[`${ee}-tab`]:{margin:{_skip_check_:!0,value:Q},[`${ee}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[J]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${H.marginSM}px`}},[`${ee}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${H.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${H.marginXXS}px`},[J]:{margin:0}}}},[`&${ee}-left`]:{[`> ${ee}-nav`]:{order:1},[`> ${ee}-content-holder`]:{order:0}},[`&${ee}-right`]:{[`> ${ee}-nav`]:{order:0},[`> ${ee}-content-holder`]:{order:1}},[`&${ee}-card${ee}-top, &${ee}-card${ee}-bottom`]:{[`> ${ee}-nav, > div > ${ee}-nav`]:{[`${ee}-tab + ${ee}-tab`]:{marginRight:{_skip_check_:!0,value:Ee},marginLeft:{_skip_check_:!0,value:0}}}}},[`${ee}-dropdown-rtl`]:{direction:"rtl"},[`${ee}-menu-item`]:{[`${ee}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},$r=H=>{const{componentCls:ee,tabsCardPadding:Q,cardHeight:J,cardGutter:Ee,itemHoverColor:Ze,itemActiveColor:ft,colorBorderSecondary:tt}=H;return{[ee]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,rn.Wf)(H)),{display:"flex",[`> ${ee}-nav, > div > ${ee}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${ee}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${H.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${ee}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${H.motionDurationSlow}`},[`${ee}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${ee}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${ee}-nav-more`]:{position:"relative",padding:Q,background:"transparent",border:0,color:H.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:H.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${ee}-nav-add`]:Object.assign({minWidth:J,marginLeft:{_skip_check_:!0,value:Ee},padding:`0 ${H.paddingXS}px`,background:"transparent",border:`${H.lineWidth}px ${H.lineType} ${tt}`,borderRadius:`${H.borderRadiusLG}px ${H.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:H.colorText,transition:`all ${H.motionDurationSlow} ${H.motionEaseInOut}`,"&:hover":{color:Ze},"&:active, &:focus:not(:focus-visible)":{color:ft}},(0,rn.Qy)(H))},[`${ee}-extra-content`]:{flex:"none"},[`${ee}-ink-bar`]:{position:"absolute",background:H.inkBarColor,pointerEvents:"none"}}),er(H)),{[`${ee}-content`]:{position:"relative",width:"100%"},[`${ee}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${ee}-tabpane`]:{outline:"none","&-hidden":{display:"none"}}}),[`${ee}-centered`]:{[`> ${ee}-nav, > div > ${ee}-nav`]:{[`${ee}-nav-wrap`]:{[`&:not([class*='${ee}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}};var Rn=(0,hn.Z)("Tabs",H=>{const ee=(0,Wt.TS)(H,{tabsCardPadding:H.cardPadding||`${(H.cardHeight-Math.round(H.fontSize*H.lineHeight))/2-H.lineWidth}px ${H.padding}px`,dropdownEdgeChildVerticalPadding:H.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${H.horizontalItemGutter}px`,tabsHorizontalItemMarginRTL:`0 0 0 ${H.horizontalItemGutter}px`});return[pr(ee),gr(ee),An(ee),qn(ee),Mn(ee),$r(ee),Vt(ee)]},H=>{const ee=H.controlHeightLG;return{zIndexPopup:H.zIndexPopupBase+50,cardBg:H.colorFillAlter,cardHeight:ee,cardPadding:"",cardPaddingSM:`${H.paddingXXS*1.5}px ${H.padding}px`,cardPaddingLG:`${H.paddingXS}px ${H.padding}px ${H.paddingXXS*1.5}px`,titleFontSize:H.fontSize,titleFontSizeLG:H.fontSizeLG,titleFontSizeSM:H.fontSize,inkBarColor:H.colorPrimary,horizontalMargin:`0 0 ${H.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${H.paddingSM}px 0`,horizontalItemPaddingSM:`${H.paddingXS}px 0`,horizontalItemPaddingLG:`${H.padding}px 0`,verticalItemPadding:`${H.paddingXS}px ${H.paddingLG}px`,verticalItemMargin:`${H.margin}px 0 0 0`,itemColor:H.colorText,itemSelectedColor:H.colorPrimary,itemHoverColor:H.colorPrimaryHover,itemActiveColor:H.colorPrimaryActive,cardGutter:H.marginXXS/2}}),pn=function(H,ee){var Q={};for(var J in H)Object.prototype.hasOwnProperty.call(H,J)&&ee.indexOf(J)<0&&(Q[J]=H[J]);if(H!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ee=0,J=Object.getOwnPropertySymbols(H);Ee<J.length;Ee++)ee.indexOf(J[Ee])<0&&Object.prototype.propertyIsEnumerable.call(H,J[Ee])&&(Q[J[Ee]]=H[J[Ee]]);return Q};const tr=H=>{const{type:ee,className:Q,rootClassName:J,size:Ee,onEdit:Ze,hideAdd:ft,centered:tt,addIcon:ut,popupClassName:It,children:Pt,items:At,animated:Ge,style:St,indicatorSize:Qt}=H,Kt=pn(H,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize"]),{prefixCls:tn,moreIcon:Ut=G.createElement(j.Z,null)}=Kt,{direction:Sn,tabs:Nt,getPrefixCls:mn,getPopupContainer:ot}=G.useContext(re.E_),st=mn("tabs",tn),[ht,Mt]=Rn(st);let gt;ee==="editable-card"&&(gt={onEdit:(Pn,Kn)=>{let{key:Qn,event:$n}=Kn;Ze==null||Ze(Pn==="add"?$n:Qn,Pn)},removeIcon:G.createElement(K.Z,null),addIcon:ut||G.createElement(A.Z,null),showAdd:ft!==!0});const bt=mn(),xt=Yt(At,Pt),Rt=yt(st,Ge),Gt=(0,$e.Z)(Ee),an=Object.assign(Object.assign({},Nt==null?void 0:Nt.style),St);return ht(G.createElement(T,Object.assign({direction:Sn,getPopupContainer:ot,moreTransitionName:`${bt}-slide-up`},Kt,{items:xt,className:R()({[`${st}-${Gt}`]:Gt,[`${st}-card`]:["card","editable-card"].includes(ee),[`${st}-editable-card`]:ee==="editable-card",[`${st}-centered`]:tt},Nt==null?void 0:Nt.className,Q,J,Mt),popupClassName:R()(It,Mt),style:an,editable:gt,moreIcon:Ut,prefixCls:st,animated:Rt,indicatorSize:Qt!=null?Qt:Nt==null?void 0:Nt.indicatorSize})))};tr.TabPane=Xe;var Ke=tr},12563:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return be}});var K=m(59301),j=m(99267),A=m(92310),xe=m.n(A),R=m(36785),N=m(47729),x=m(14088),E=m(36355),F=m(17313),V=m(37613),Ie=m(83116);const G=D=>{const{paddingXXS:Le,lineWidth:z,tagPaddingHorizontal:we,componentCls:ge}=D,Te=we-z,Fe=Le-z;return{[ge]:Object.assign(Object.assign({},(0,F.Wf)(D)),{display:"inline-block",height:"auto",marginInlineEnd:D.marginXS,paddingInline:Te,fontSize:D.tagFontSize,lineHeight:D.tagLineHeight,whiteSpace:"nowrap",background:D.defaultBg,border:`${D.lineWidth}px ${D.lineType} ${D.colorBorder}`,borderRadius:D.borderRadiusSM,opacity:1,transition:`all ${D.motionDurationMid}`,textAlign:"start",position:"relative",[`&${ge}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:D.defaultColor},[`${ge}-close-icon`]:{marginInlineStart:Fe,color:D.colorTextDescription,fontSize:D.tagIconSize,cursor:"pointer",transition:`all ${D.motionDurationMid}`,"&:hover":{color:D.colorTextHeading}},[`&${ge}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${D.iconCls}-close, ${D.iconCls}-close:hover`]:{color:D.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${ge}-checkable-checked):hover`]:{color:D.colorPrimary,backgroundColor:D.colorFillSecondary},"&:active, &-checked":{color:D.colorTextLightSolid},"&-checked":{backgroundColor:D.colorPrimary,"&:hover":{backgroundColor:D.colorPrimaryHover}},"&:active":{backgroundColor:D.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${D.iconCls} + span, > span + ${D.iconCls}`]:{marginInlineStart:Te}}),[`${ge}-borderless`]:{borderColor:"transparent",background:D.tagBorderlessBg}}},le=D=>{const{lineWidth:Le,fontSizeIcon:z}=D,we=D.fontSizeSM,ge=`${D.lineHeightSM*we}px`;return(0,V.TS)(D,{tagFontSize:we,tagLineHeight:ge,tagIconSize:z-2*Le,tagPaddingHorizontal:8,tagBorderlessBg:D.colorFillTertiary})},ke=D=>({defaultBg:D.colorFillQuaternary,defaultColor:D.colorText});var ue=(0,Ie.Z)("Tag",D=>{const Le=le(D);return G(Le)},ke),de=function(D,Le){var z={};for(var we in D)Object.prototype.hasOwnProperty.call(D,we)&&Le.indexOf(we)<0&&(z[we]=D[we]);if(D!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ge=0,we=Object.getOwnPropertySymbols(D);ge<we.length;ge++)Le.indexOf(we[ge])<0&&Object.prototype.propertyIsEnumerable.call(D,we[ge])&&(z[we[ge]]=D[we[ge]]);return z},Pe=D=>{const{prefixCls:Le,style:z,className:we,checked:ge,onChange:Te,onClick:Fe}=D,Re=de(D,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:X,tag:w}=K.useContext(E.E_),ve=lt=>{Te==null||Te(!ge),Fe==null||Fe(lt)},Qe=X("tag",Le),[je,Be]=ue(Qe),Oe=xe()(Qe,`${Qe}-checkable`,{[`${Qe}-checkable-checked`]:ge},w==null?void 0:w.className,we,Be);return je(K.createElement("span",Object.assign({},Re,{style:Object.assign(Object.assign({},z),w==null?void 0:w.style),className:Oe,onClick:ve})))},Ue=m(45157);const Ce=D=>(0,Ue.Z)(D,(Le,z)=>{let{textColor:we,lightBorderColor:ge,lightColor:Te,darkColor:Fe}=z;return{[`${D.componentCls}-${Le}`]:{color:we,background:Te,borderColor:ge,"&-inverse":{color:D.colorTextLightSolid,background:Fe,borderColor:Fe},[`&${D.componentCls}-borderless`]:{borderColor:"transparent"}}}});var pe=(0,Ie.b)(["Tag","preset"],D=>{const Le=le(D);return Ce(Le)},ke);function q(D){return typeof D!="string"?D:D.charAt(0).toUpperCase()+D.slice(1)}const _=(D,Le,z)=>{const we=q(z);return{[`${D.componentCls}-${Le}`]:{color:D[`color${z}`],background:D[`color${we}Bg`],borderColor:D[`color${we}Border`],[`&${D.componentCls}-borderless`]:{borderColor:"transparent"}}}};var ie=(0,Ie.b)(["Tag","status"],D=>{const Le=le(D);return[_(Le,"success","Success"),_(Le,"processing","Info"),_(Le,"error","Error"),_(Le,"warning","Warning")]},ke),ae=function(D,Le){var z={};for(var we in D)Object.prototype.hasOwnProperty.call(D,we)&&Le.indexOf(we)<0&&(z[we]=D[we]);if(D!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ge=0,we=Object.getOwnPropertySymbols(D);ge<we.length;ge++)Le.indexOf(we[ge])<0&&Object.prototype.propertyIsEnumerable.call(D,we[ge])&&(z[we[ge]]=D[we[ge]]);return z};const Se=(D,Le)=>{const{prefixCls:z,className:we,rootClassName:ge,style:Te,children:Fe,icon:Re,color:X,onClose:w,closeIcon:ve,closable:Qe,bordered:je=!0}=D,Be=ae(D,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:Oe,direction:lt,tag:$t}=K.useContext(E.E_),[vt,Tt]=K.useState(!0);K.useEffect(()=>{"visible"in Be&&Tt(Be.visible)},[Be.visible]);const wt=(0,R.o2)(X),pt=(0,R.yT)(X),at=wt||pt,S=Object.assign(Object.assign({backgroundColor:X&&!at?X:void 0},$t==null?void 0:$t.style),Te),p=Oe("tag",z),[h,g]=ue(p),y=xe()(p,$t==null?void 0:$t.className,{[`${p}-${X}`]:at,[`${p}-has-color`]:X&&!at,[`${p}-hidden`]:!vt,[`${p}-rtl`]:lt==="rtl",[`${p}-borderless`]:!je},we,ge,g),d=Y=>{Y.stopPropagation(),w==null||w(Y),!Y.defaultPrevented&&Tt(!1)},[,L]=(0,N.Z)(Qe,ve,Y=>Y===null?K.createElement(j.Z,{className:`${p}-close-icon`,onClick:d}):K.createElement("span",{className:`${p}-close-icon`,onClick:d},Y),null,!1),fe=typeof Be.onClick=="function"||Fe&&Fe.type==="a",O=Re||null,I=O?K.createElement(K.Fragment,null,O,Fe&&K.createElement("span",null,Fe)):Fe,he=K.createElement("span",Object.assign({},Be,{ref:Le,className:y,style:S}),I,L,wt&&K.createElement(pe,{key:"preset",prefixCls:p}),pt&&K.createElement(ie,{key:"status",prefixCls:p}));return h(fe?K.createElement(x.Z,{component:"Tag"},he):he)},se=K.forwardRef(Se);se.CheckableTag=Pe;var be=se},17574:function(yn,dt,m){"use strict";m.d(dt,{default:function(){return X}});var K=m(60091),j=m(94480),A=m(52671),xe=m(8657),R=m(54476),N=m(59301),x={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"},E=x,F=m(7657),V=function(ve,Qe){return N.createElement(F.Z,(0,R.Z)({},ve,{ref:Qe,icon:E}))},Ie=N.forwardRef(V),G=Ie,le=m(92310),ke=m.n(le),ue=m(35654),de=m(71430),_e=m(36355),Pe=m(56082),Ue=m(62892),Ce=m(20648);const pe=4;function q(w){const{dropPosition:ve,dropLevelOffset:Qe,prefixCls:je,indent:Be,direction:Oe="ltr"}=w,lt=Oe==="ltr"?"left":"right",$t=Oe==="ltr"?"right":"left",vt={[lt]:-Qe*Be+pe,[$t]:0};switch(ve){case-1:vt.top=-3;break;case 1:vt.bottom=-3;break;default:vt.bottom=-3,vt[lt]=Be+pe;break}return N.createElement("div",{style:vt,className:`${je}-drop-indicator`})}var _=m(71997),ae=N.forwardRef((w,ve)=>{const{getPrefixCls:Qe,direction:je,virtual:Be,tree:Oe}=N.useContext(_e.E_),{prefixCls:lt,className:$t,showIcon:vt=!1,showLine:Tt,switcherIcon:wt,blockNode:pt=!1,children:at,checkable:S=!1,selectable:p=!0,draggable:h,motion:g,style:y}=w,d=Qe("tree",lt),L=Qe(),fe=g!=null?g:Object.assign(Object.assign({},(0,Ue.Z)(L)),{motionAppear:!1}),O=Object.assign(Object.assign({},w),{checkable:S,selectable:p,showIcon:vt,motion:fe,blockNode:pt,showLine:!!Tt,dropIndicatorRender:q}),[I,he]=(0,Ce.ZP)(d),Y=N.useMemo(()=>{if(!h)return!1;let ye={};switch(typeof h){case"function":ye.nodeDraggable=h;break;case"object":ye=Object.assign({},h);break;default:break}return ye.icon!==!1&&(ye.icon=ye.icon||N.createElement(Pe.Z,null)),ye},[h]),U=ye=>N.createElement(_.Z,{prefixCls:d,switcherIcon:wt,treeNodeProps:ye,showLine:Tt});return I(N.createElement(K.Z,Object.assign({itemHeight:20,ref:ve,virtual:Be},O,{style:Object.assign(Object.assign({},Oe==null?void 0:Oe.style),y),prefixCls:d,className:ke()({[`${d}-icon-hide`]:!vt,[`${d}-block-node`]:pt,[`${d}-unselectable`]:!p,[`${d}-rtl`]:je==="rtl"},Oe==null?void 0:Oe.className,$t,he),direction:je,checkable:S&&N.createElement("span",{className:`${d}-checkbox-inner`}),selectable:p,switcherIcon:U,draggable:Y}),at))}),Se;(function(w){w[w.None=0]="None",w[w.Start=1]="Start",w[w.End=2]="End"})(Se||(Se={}));function se(w,ve){function Qe(je){const{key:Be,children:Oe}=je;ve(Be,je)!==!1&&se(Oe||[],ve)}w.forEach(Qe)}function be(w){let{treeData:ve,expandedKeys:Qe,startKey:je,endKey:Be}=w;const Oe=[];let lt=Se.None;if(je&&je===Be)return[je];if(!je||!Be)return[];function $t(vt){return vt===je||vt===Be}return se(ve,vt=>{if(lt===Se.End)return!1;if($t(vt)){if(Oe.push(vt),lt===Se.None)lt=Se.Start;else if(lt===Se.Start)return lt=Se.End,!1}else lt===Se.Start&&Oe.push(vt);return Qe.includes(vt)}),Oe}function D(w,ve){const Qe=(0,j.Z)(ve),je=[];return se(w,(Be,Oe)=>{const lt=Qe.indexOf(Be);return lt!==-1&&(je.push(Oe),Qe.splice(lt,1)),!!Qe.length}),je}var Le=function(w,ve){var Qe={};for(var je in w)Object.prototype.hasOwnProperty.call(w,je)&&ve.indexOf(je)<0&&(Qe[je]=w[je]);if(w!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,je=Object.getOwnPropertySymbols(w);Be<je.length;Be++)ve.indexOf(je[Be])<0&&Object.prototype.propertyIsEnumerable.call(w,je[Be])&&(Qe[je[Be]]=w[je[Be]]);return Qe};function z(w){const{isLeaf:ve,expanded:Qe}=w;return ve?N.createElement(A.Z,null):Qe?N.createElement(xe.Z,null):N.createElement(G,null)}function we(w){let{treeData:ve,children:Qe}=w;return ve||(0,de.zn)(Qe)}const ge=(w,ve)=>{var{defaultExpandAll:Qe,defaultExpandParent:je,defaultExpandedKeys:Be}=w,Oe=Le(w,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const lt=N.useRef(),$t=N.useRef(),vt=()=>{const{keyEntities:Y}=(0,de.I8)(we(Oe));let U;return Qe?U=Object.keys(Y):je?U=(0,ue.r7)(Oe.expandedKeys||Be||[],Y):U=Oe.expandedKeys||Be,U},[Tt,wt]=N.useState(Oe.selectedKeys||Oe.defaultSelectedKeys||[]),[pt,at]=N.useState(()=>vt());N.useEffect(()=>{"selectedKeys"in Oe&&wt(Oe.selectedKeys)},[Oe.selectedKeys]),N.useEffect(()=>{"expandedKeys"in Oe&&at(Oe.expandedKeys)},[Oe.expandedKeys]);const S=(Y,U)=>{var ye;return"expandedKeys"in Oe||at(Y),(ye=Oe.onExpand)===null||ye===void 0?void 0:ye.call(Oe,Y,U)},p=(Y,U)=>{var ye;const{multiple:Ye}=Oe,{node:ce,nativeEvent:Ae}=U,{key:qe=""}=ce,oe=we(Oe),T=Object.assign(Object.assign({},U),{selected:!0}),re=(Ae==null?void 0:Ae.ctrlKey)||(Ae==null?void 0:Ae.metaKey),$e=Ae==null?void 0:Ae.shiftKey;let Ne;Ye&&re?(Ne=Y,lt.current=qe,$t.current=Ne,T.selectedNodes=D(oe,Ne)):Ye&&$e?(Ne=Array.from(new Set([].concat((0,j.Z)($t.current||[]),(0,j.Z)(be({treeData:oe,expandedKeys:pt,startKey:qe,endKey:lt.current}))))),T.selectedNodes=D(oe,Ne)):(Ne=[qe],lt.current=qe,$t.current=Ne,T.selectedNodes=D(oe,Ne)),(ye=Oe.onSelect)===null||ye===void 0||ye.call(Oe,Ne,T),"selectedKeys"in Oe||wt(Ne)},{getPrefixCls:h,direction:g}=N.useContext(_e.E_),{prefixCls:y,className:d,showIcon:L=!0,expandAction:fe="click"}=Oe,O=Le(Oe,["prefixCls","className","showIcon","expandAction"]),I=h("tree",y),he=ke()(`${I}-directory`,{[`${I}-directory-rtl`]:g==="rtl"},d);return N.createElement(ae,Object.assign({icon:z,ref:ve,blockNode:!0},O,{showIcon:L,expandAction:fe,prefixCls:I,className:he,expandedKeys:pt,selectedKeys:Tt,onSelect:p,onExpand:S}))};var Fe=N.forwardRef(ge);const Re=ae;Re.DirectoryTree=Fe,Re.TreeNode=K.O;var X=Re},20648:function(yn,dt,m){"use strict";m.d(dt,{TM:function(){return le},Yk:function(){return G}});var K=m(36237),j=m(98447),A=m(17313),xe=m(8378),R=m(37613),N=m(83116);const x=new K.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),E=(ke,ue)=>({[`.${ke}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${ue.motionDurationSlow}`}}}),F=(ke,ue)=>({[`.${ke}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:ue.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${ue.lineWidthBold}px solid ${ue.colorPrimary}`,borderRadius:"50%",content:'""'}}}),V=(ke,ue)=>{const{treeCls:de,treeNodeCls:_e,treeNodePadding:Pe,titleHeight:Ue,nodeSelectedBg:Ce,nodeHoverBg:pe}=ue,q=ue.paddingXS;return{[de]:Object.assign(Object.assign({},(0,A.Wf)(ue)),{background:ue.colorBgContainer,borderRadius:ue.borderRadius,transition:`background-color ${ue.motionDurationSlow}`,[`&${de}-rtl`]:{[`${de}-switcher`]:{"&_close":{[`${de}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${de}-active-focused)`]:Object.assign({},(0,A.oN)(ue)),[`${de}-list-holder-inner`]:{alignItems:"flex-start"},[`&${de}-block-node`]:{[`${de}-list-holder-inner`]:{alignItems:"stretch",[`${de}-node-content-wrapper`]:{flex:"auto"},[`${_e}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:Pe,insetInlineStart:0,border:`1px solid ${ue.colorPrimary}`,opacity:0,animationName:x,animationDuration:ue.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${_e}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${Pe}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${de}-node-content-wrapper`]:{color:ue.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${de}-node-content-wrapper`]:Object.assign({},(0,A.oN)(ue)),[`&:not(${_e}-disabled).filter-node ${de}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${de}-draggable-icon`]:{flexShrink:0,width:Ue,lineHeight:`${Ue}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${ue.motionDurationSlow}`,[`${_e}:hover &`]:{opacity:.45}},[`&${_e}-disabled`]:{[`${de}-draggable-icon`]:{visibility:"hidden"}}}},[`${de}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:Ue}},[`${de}-draggable-icon`]:{visibility:"hidden"},[`${de}-switcher`]:Object.assign(Object.assign({},E(ke,ue)),{position:"relative",flex:"none",alignSelf:"stretch",width:Ue,margin:0,lineHeight:`${Ue}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${de}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:ue.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:Ue/2,bottom:-Pe,marginInlineStart:-1,borderInlineEnd:`1px solid ${ue.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:Ue/2*.8,height:Ue/2,borderBottom:`1px solid ${ue.colorBorder}`,content:'""'}}}),[`${de}-checkbox`]:{top:"initial",marginInlineEnd:q},[`${de}-node-content-wrapper, ${de}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:Ue,margin:0,padding:`0 ${ue.paddingXS/2}px`,color:"inherit",lineHeight:`${Ue}px`,background:"transparent",borderRadius:ue.borderRadius,cursor:"pointer",transition:`all ${ue.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:pe},[`&${de}-node-selected`]:{backgroundColor:Ce},[`${de}-iconEle`]:{display:"inline-block",width:Ue,height:Ue,lineHeight:`${Ue}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${de}-unselectable ${de}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${de}-node-content-wrapper`]:Object.assign({lineHeight:`${Ue}px`,userSelect:"none"},F(ke,ue)),[`${_e}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${ue.colorPrimary}`}},"&-show-line":{[`${de}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:Ue/2,bottom:-Pe,borderInlineEnd:`1px solid ${ue.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${de}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${_e}-leaf-last`]:{[`${de}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${Ue/2}px !important`}}}}})}},Ie=ke=>{const{treeCls:ue,treeNodeCls:de,treeNodePadding:_e,directoryNodeSelectedBg:Pe,directoryNodeSelectedColor:Ue}=ke;return{[`${ue}${ue}-directory`]:{[de]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:_e,insetInlineStart:0,transition:`background-color ${ke.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:ke.controlItemBgHover}},"> *":{zIndex:1},[`${ue}-switcher`]:{transition:`color ${ke.motionDurationMid}`},[`${ue}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${ue}-node-selected`]:{color:Ue,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:Pe},[`${ue}-switcher`]:{color:Ue},[`${ue}-node-content-wrapper`]:{color:Ue,background:"transparent"}}}}}},G=(ke,ue)=>{const de=`.${ke}`,_e=`${de}-treenode`,Pe=ue.paddingXS/2,Ue=(0,R.TS)(ue,{treeCls:de,treeNodeCls:_e,treeNodePadding:Pe});return[V(ke,Ue),Ie(Ue)]},le=ke=>{const{controlHeightSM:ue}=ke;return{titleHeight:ue,nodeHoverBg:ke.controlItemBgHover,nodeSelectedBg:ke.controlItemBgActive}};dt.ZP=(0,N.Z)("Tree",(ke,ue)=>{let{prefixCls:de}=ue;return[{[ke.componentCls]:(0,j.C2)(`${de}-checkbox`,ke)},G(de,ke),(0,xe.Z)(ke)]},ke=>{const{colorTextLightSolid:ue,colorPrimary:de}=ke;return Object.assign(Object.assign({},le(ke)),{directoryNodeSelectedColor:ue,directoryNodeSelectedBg:de})})},71997:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return _e}});var K=m(54476),j=m(59301),A={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"},xe=A,R=m(7657),N=function(Ue,Ce){return j.createElement(R.Z,(0,K.Z)({},Ue,{ref:Ce,icon:xe}))},x=j.forwardRef(N),E=x,F=m(52671),V=m(58617),Ie=m(15075),G=m(43531),le=m(92310),ke=m.n(le),ue=m(92343),_e=Pe=>{const{prefixCls:Ue,switcherIcon:Ce,treeNodeProps:pe,showLine:q}=Pe,{isLeaf:_,expanded:ie,loading:ae}=pe;if(ae)return j.createElement(V.Z,{className:`${Ue}-switcher-loading-icon`});let Se;if(q&&typeof q=="object"&&(Se=q.showLeafIcon),_){if(!q)return null;if(typeof Se!="boolean"&&Se){const D=typeof Se=="function"?Se(pe):Se,Le=`${Ue}-switcher-line-custom-icon`;return(0,ue.l$)(D)?(0,ue.Tm)(D,{className:ke()(D.props.className||"",Le)}):D}return Se?j.createElement(F.Z,{className:`${Ue}-switcher-line-icon`}):j.createElement("span",{className:`${Ue}-switcher-leaf-line`})}const se=`${Ue}-switcher-icon`,be=typeof Ce=="function"?Ce(pe):Ce;return(0,ue.l$)(be)?(0,ue.Tm)(be,{className:ke()(be.props.className||"",se)}):be!==void 0?be:q?ie?j.createElement(Ie.Z,{className:`${Ue}-switcher-line-icon`}):j.createElement(G.Z,{className:`${Ue}-switcher-line-icon`}):j.createElement(E,{className:se})}},99498:function(yn,dt,m){(function(K){K(m(89780))})(function(K){K.defineOption("placeholder","",function(E,F,V){var Ie=V&&V!=K.Init;if(F&&!Ie)E.on("blur",R),E.on("change",N),E.on("swapDoc",N),K.on(E.getInputField(),"compositionupdate",E.state.placeholderCompose=function(){xe(E)}),N(E);else if(!F&&Ie){E.off("blur",R),E.off("change",N),E.off("swapDoc",N),K.off(E.getInputField(),"compositionupdate",E.state.placeholderCompose),j(E);var G=E.getWrapperElement();G.className=G.className.replace(" CodeMirror-empty","")}F&&!E.hasFocus()&&R(E)});function j(E){E.state.placeholder&&(E.state.placeholder.parentNode.removeChild(E.state.placeholder),E.state.placeholder=null)}function A(E){j(E);var F=E.state.placeholder=document.createElement("pre");F.style.cssText="height: 0; overflow: visible",F.style.direction=E.getOption("direction"),F.className="CodeMirror-placeholder CodeMirror-line-like";var V=E.getOption("placeholder");typeof V=="string"&&(V=document.createTextNode(V)),F.appendChild(V),E.display.lineSpace.insertBefore(F,E.display.lineSpace.firstChild)}function xe(E){setTimeout(function(){var F=!1,V=E.getInputField();V.nodeName=="TEXTAREA"?F=!V.value:E.lineCount()==1&&(F=!/[^\u200b]/.test(V.querySelector(".CodeMirror-line").textContent)),F?A(E):j(E)},20)}function R(E){x(E)&&A(E)}function N(E){var F=E.getWrapperElement(),V=x(E);F.className=F.className.replace(" CodeMirror-empty","")+(V?" CodeMirror-empty":""),V?A(E):j(E)}function x(E){return E.lineCount()===1&&E.getLine(0)===""}})},25717:function(yn,dt,m){(function(K){K(m(89780))})(function(K){var j={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},A=K.Pos;K.defineOption("autoCloseBrackets",!1,function(ue,de,_e){_e&&_e!=K.Init&&(ue.removeKeyMap(R),ue.state.closeBrackets=null),de&&(N(xe(de,"pairs")),ue.state.closeBrackets=de,ue.addKeyMap(R))});function xe(ue,de){return de=="pairs"&&typeof ue=="string"?ue:typeof ue=="object"&&ue[de]!=null?ue[de]:j[de]}var R={Backspace:F,Enter:V};function N(ue){for(var de=0;de<ue.length;de++){var _e=ue.charAt(de),Pe="'"+_e+"'";R[Pe]||(R[Pe]=x(_e))}}N(j.pairs+"`");function x(ue){return function(de){return G(de,ue)}}function E(ue){var de=ue.state.closeBrackets;if(!de||de.override)return de;var _e=ue.getModeAt(ue.getCursor());return _e.closeBrackets||de}function F(ue){var de=E(ue);if(!de||ue.getOption("disableInput"))return K.Pass;for(var _e=xe(de,"pairs"),Pe=ue.listSelections(),Ue=0;Ue<Pe.length;Ue++){if(!Pe[Ue].empty())return K.Pass;var Ce=le(ue,Pe[Ue].head);if(!Ce||_e.indexOf(Ce)%2!=0)return K.Pass}for(var Ue=Pe.length-1;Ue>=0;Ue--){var pe=Pe[Ue].head;ue.replaceRange("",A(pe.line,pe.ch-1),A(pe.line,pe.ch+1),"+delete")}}function V(ue){var de=E(ue),_e=de&&xe(de,"explode");if(!_e||ue.getOption("disableInput"))return K.Pass;for(var Pe=ue.listSelections(),Ue=0;Ue<Pe.length;Ue++){if(!Pe[Ue].empty())return K.Pass;var Ce=le(ue,Pe[Ue].head);if(!Ce||_e.indexOf(Ce)%2!=0)return K.Pass}ue.operation(function(){var pe=ue.lineSeparator()||`
|
|
|
`;ue.replaceSelection(pe+pe,null),ue.execCommand("goCharLeft"),Pe=ue.listSelections();for(var q=0;q<Pe.length;q++){var _=Pe[q].head.line;ue.indentLine(_,null,!0),ue.indentLine(_+1,null,!0)}})}function Ie(ue){var de=K.cmpPos(ue.anchor,ue.head)>0;return{anchor:new A(ue.anchor.line,ue.anchor.ch+(de?-1:1)),head:new A(ue.head.line,ue.head.ch+(de?1:-1))}}function G(ue,de){var _e=E(ue);if(!_e||ue.getOption("disableInput"))return K.Pass;var Pe=xe(_e,"pairs"),Ue=Pe.indexOf(de);if(Ue==-1)return K.Pass;for(var Ce=xe(_e,"closeBefore"),pe=xe(_e,"triples"),q=Pe.charAt(Ue+1)==de,_=ue.listSelections(),ie=Ue%2==0,ae,Se=0;Se<_.length;Se++){var se=_[Se],be=se.head,D,Le=ue.getRange(be,A(be.line,be.ch+1));if(ie&&!se.empty())D="surround";else if((q||!ie)&&Le==de)q&&ke(ue,be)?D="both":pe.indexOf(de)>=0&&ue.getRange(be,A(be.line,be.ch+3))==de+de+de?D="skipThree":D="skip";else if(q&&be.ch>1&&pe.indexOf(de)>=0&&ue.getRange(A(be.line,be.ch-2),be)==de+de){if(be.ch>2&&/\bstring/.test(ue.getTokenTypeAt(A(be.line,be.ch-2))))return K.Pass;D="addFour"}else if(q){var z=be.ch==0?" ":ue.getRange(A(be.line,be.ch-1),be);if(!K.isWordChar(Le)&&z!=de&&!K.isWordChar(z))D="both";else return K.Pass}else if(ie&&(Le.length===0||/\s/.test(Le)||Ce.indexOf(Le)>-1))D="both";else return K.Pass;if(!ae)ae=D;else if(ae!=D)return K.Pass}var we=Ue%2?Pe.charAt(Ue-1):de,ge=Ue%2?de:Pe.charAt(Ue+1);ue.operation(function(){if(ae=="skip")ue.execCommand("goCharRight");else if(ae=="skipThree")for(var Te=0;Te<3;Te++)ue.execCommand("goCharRight");else if(ae=="surround"){for(var Fe=ue.getSelections(),Te=0;Te<Fe.length;Te++)Fe[Te]=we+Fe[Te]+ge;ue.replaceSelections(Fe,"around"),Fe=ue.listSelections().slice();for(var Te=0;Te<Fe.length;Te++)Fe[Te]=Ie(Fe[Te]);ue.setSelections(Fe)}else ae=="both"?(ue.replaceSelection(we+ge,null),ue.triggerElectric(we+ge),ue.execCommand("goCharLeft")):ae=="addFour"&&(ue.replaceSelection(we+we+we+we,"before"),ue.execCommand("goCharRight"))})}function le(ue,de){var _e=ue.getRange(A(de.line,de.ch-1),A(de.line,de.ch+1));return _e.length==2?_e:null}function ke(ue,de){var _e=ue.getTokenAt(A(de.line,de.ch+1));return/\bstring/.test(_e.type)&&_e.start==de.ch&&(de.ch==0||!/\bstring/.test(ue.getTokenTypeAt(de)))}})},6313:function(yn,dt,m){(function(K){K(m(89780),m(32855))})(function(K){K.defineOption("autoCloseTags",!1,function(F,V,Ie){if(Ie!=K.Init&&Ie&&F.removeKeyMap("autoCloseTags"),!!V){var G={name:"autoCloseTags"};(typeof V!="object"||V.whenClosing!==!1)&&(G["'/'"]=function(le){return N(le)}),(typeof V!="object"||V.whenOpening!==!1)&&(G["'>'"]=function(le){return xe(le)}),F.addKeyMap(G)}});var j=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],A=["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 xe(F){if(F.getOption("disableInput"))return K.Pass;for(var V=F.listSelections(),Ie=[],G=F.getOption("autoCloseTags"),le=0;le<V.length;le++){if(!V[le].empty())return K.Pass;var ke=V[le].head,ue=F.getTokenAt(ke),de=K.innerMode(F.getMode(),ue.state),_e=de.state,Pe=de.mode.xmlCurrentTag&&de.mode.xmlCurrentTag(_e),Ue=Pe&&Pe.name;if(!Ue)return K.Pass;var Ce=de.mode.configuration=="html",pe=typeof G=="object"&&G.dontCloseTags||Ce&&j,q=typeof G=="object"&&G.indentTags||Ce&&A;ue.end>ke.ch&&(Ue=Ue.slice(0,Ue.length-ue.end+ke.ch));var _=Ue.toLowerCase();if(!Ue||ue.type=="string"&&(ue.end!=ke.ch||!/[\"\']/.test(ue.string.charAt(ue.string.length-1))||ue.string.length==1)||ue.type=="tag"&&Pe.close||ue.string.indexOf("/")==ke.ch-ue.start-1||pe&&x(pe,_)>-1||E(F,de.mode.xmlCurrentContext&&de.mode.xmlCurrentContext(_e)||[],Ue,ke,!0))return K.Pass;var ie=typeof G=="object"&&G.emptyTags;if(ie&&x(ie,Ue)>-1){Ie[le]={text:"/>",newPos:K.Pos(ke.line,ke.ch+2)};continue}var ae=q&&x(q,_)>-1;Ie[le]={indent:ae,text:">"+(ae?`
|
|
|
|
|
|
`:"")+"</"+Ue+">",newPos:ae?K.Pos(ke.line+1,0):K.Pos(ke.line,ke.ch+1)}}for(var Se=typeof G=="object"&&G.dontIndentOnAutoClose,le=V.length-1;le>=0;le--){var se=Ie[le];F.replaceRange(se.text,V[le].head,V[le].anchor,"+insert");var be=F.listSelections().slice(0);be[le]={head:se.newPos,anchor:se.newPos},F.setSelections(be),!Se&&se.indent&&(F.indentLine(se.newPos.line,null,!0),F.indentLine(se.newPos.line+1,null,!0))}}function R(F,V){for(var Ie=F.listSelections(),G=[],le=V?"/":"</",ke=F.getOption("autoCloseTags"),ue=typeof ke=="object"&&ke.dontIndentOnSlash,de=0;de<Ie.length;de++){if(!Ie[de].empty())return K.Pass;var _e=Ie[de].head,Pe=F.getTokenAt(_e),Ue=K.innerMode(F.getMode(),Pe.state),Ce=Ue.state;if(V&&(Pe.type=="string"||Pe.string.charAt(0)!="<"||Pe.start!=_e.ch-1))return K.Pass;var pe,q=Ue.mode.name!="xml"&&F.getMode().name=="htmlmixed";if(q&&Ue.mode.name=="javascript")pe=le+"script";else if(q&&Ue.mode.name=="css")pe=le+"style";else{var _=Ue.mode.xmlCurrentContext&&Ue.mode.xmlCurrentContext(Ce);if(!_||_.length&&E(F,_,_[_.length-1],_e))return K.Pass;pe=le+_[_.length-1]}F.getLine(_e.line).charAt(Pe.end)!=">"&&(pe+=">"),G[de]=pe}if(F.replaceSelections(G),Ie=F.listSelections(),!ue)for(var de=0;de<Ie.length;de++)(de==Ie.length-1||Ie[de].head.line<Ie[de+1].head.line)&&F.indentLine(Ie[de].head.line)}function N(F){return F.getOption("disableInput")?K.Pass:R(F,!0)}K.commands.closeTag=function(F){return R(F)};function x(F,V){if(F.indexOf)return F.indexOf(V);for(var Ie=0,G=F.length;Ie<G;++Ie)if(F[Ie]==V)return Ie;return-1}function E(F,V,Ie,G,le){if(!K.scanForClosingTag)return!1;var ke=Math.min(F.lastLine()+1,G.line+500),ue=K.scanForClosingTag(F,G,null,ke);if(!ue||ue.tag!=Ie)return!1;for(var de=le?1:0,_e=V.length-1;_e>=0&&V[_e]==Ie;_e--)++de;G=ue.to;for(var _e=1;_e<de;_e++){var Pe=K.scanForClosingTag(F,G,null,ke);if(!Pe||Pe.tag!=Ie)return!1;G=Pe.to}return!0}})},32855:function(yn,dt,m){(function(K){K(m(89780))})(function(K){"use strict";var j=K.Pos;function A(_e,Pe){return _e.line-Pe.line||_e.ch-Pe.ch}var xe="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",R=xe+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",N=new RegExp("<(/?)(["+xe+"]["+R+"]*)","g");function x(_e,Pe,Ue,Ce){this.line=Pe,this.ch=Ue,this.cm=_e,this.text=_e.getLine(Pe),this.min=Ce?Math.max(Ce.from,_e.firstLine()):_e.firstLine(),this.max=Ce?Math.min(Ce.to-1,_e.lastLine()):_e.lastLine()}function E(_e,Pe){var Ue=_e.cm.getTokenTypeAt(j(_e.line,Pe));return Ue&&/\btag\b/.test(Ue)}function F(_e){if(!(_e.line>=_e.max))return _e.ch=0,_e.text=_e.cm.getLine(++_e.line),!0}function V(_e){if(!(_e.line<=_e.min))return _e.text=_e.cm.getLine(--_e.line),_e.ch=_e.text.length,!0}function Ie(_e){for(;;){var Pe=_e.text.indexOf(">",_e.ch);if(Pe==-1){if(F(_e))continue;return}if(!E(_e,Pe+1)){_e.ch=Pe+1;continue}var Ue=_e.text.lastIndexOf("/",Pe),Ce=Ue>-1&&!/\S/.test(_e.text.slice(Ue+1,Pe));return _e.ch=Pe+1,Ce?"selfClose":"regular"}}function G(_e){for(;;){var Pe=_e.ch?_e.text.lastIndexOf("<",_e.ch-1):-1;if(Pe==-1){if(V(_e))continue;return}if(!E(_e,Pe+1)){_e.ch=Pe;continue}N.lastIndex=Pe,_e.ch=Pe;var Ue=N.exec(_e.text);if(Ue&&Ue.index==Pe)return Ue}}function le(_e){for(;;){N.lastIndex=_e.ch;var Pe=N.exec(_e.text);if(!Pe){if(F(_e))continue;return}if(!E(_e,Pe.index+1)){_e.ch=Pe.index+1;continue}return _e.ch=Pe.index+Pe[0].length,Pe}}function ke(_e){for(;;){var Pe=_e.ch?_e.text.lastIndexOf(">",_e.ch-1):-1;if(Pe==-1){if(V(_e))continue;return}if(!E(_e,Pe+1)){_e.ch=Pe;continue}var Ue=_e.text.lastIndexOf("/",Pe),Ce=Ue>-1&&!/\S/.test(_e.text.slice(Ue+1,Pe));return _e.ch=Pe+1,Ce?"selfClose":"regular"}}function ue(_e,Pe){for(var Ue=[];;){var Ce=le(_e),pe,q=_e.line,_=_e.ch-(Ce?Ce[0].length:0);if(!Ce||!(pe=Ie(_e)))return;if(pe!="selfClose")if(Ce[1]){for(var ie=Ue.length-1;ie>=0;--ie)if(Ue[ie]==Ce[2]){Ue.length=ie;break}if(ie<0&&(!Pe||Pe==Ce[2]))return{tag:Ce[2],from:j(q,_),to:j(_e.line,_e.ch)}}else Ue.push(Ce[2])}}function de(_e,Pe){for(var Ue=[];;){var Ce=ke(_e);if(!Ce)return;if(Ce=="selfClose"){G(_e);continue}var pe=_e.line,q=_e.ch,_=G(_e);if(!_)return;if(_[1])Ue.push(_[2]);else{for(var ie=Ue.length-1;ie>=0;--ie)if(Ue[ie]==_[2]){Ue.length=ie;break}if(ie<0&&(!Pe||Pe==_[2]))return{tag:_[2],from:j(_e.line,_e.ch),to:j(pe,q)}}}}K.registerHelper("fold","xml",function(_e,Pe){for(var Ue=new x(_e,Pe.line,0);;){var Ce=le(Ue);if(!Ce||Ue.line!=Pe.line)return;var pe=Ie(Ue);if(!pe)return;if(!Ce[1]&&pe!="selfClose"){var q=j(Ue.line,Ue.ch),_=ue(Ue,Ce[2]);return _&&A(_.from,q)>0?{from:q,to:_.from}:null}}}),K.findMatchingTag=function(_e,Pe,Ue){var Ce=new x(_e,Pe.line,Pe.ch,Ue);if(!(Ce.text.indexOf(">")==-1&&Ce.text.indexOf("<")==-1)){var pe=Ie(Ce),q=pe&&j(Ce.line,Ce.ch),_=pe&&G(Ce);if(!(!pe||!_||A(Ce,Pe)>0)){var ie={from:j(Ce.line,Ce.ch),to:q,tag:_[2]};return pe=="selfClose"?{open:ie,close:null,at:"open"}:_[1]?{open:de(Ce,_[2]),close:ie,at:"close"}:(Ce=new x(_e,q.line,q.ch,Ue),{open:ie,close:ue(Ce,_[2]),at:"open"})}}},K.findEnclosingTag=function(_e,Pe,Ue,Ce){for(var pe=new x(_e,Pe.line,Pe.ch,Ue);;){var q=de(pe,Ce);if(!q)break;var _=new x(_e,Pe.line,Pe.ch,Ue),ie=ue(_,q.tag);if(ie)return{open:q,close:ie}}},K.scanForClosingTag=function(_e,Pe,Ue,Ce){var pe=new x(_e,Pe.line,Pe.ch,Ce?{from:0,to:Ce}:null);return ue(pe,Ue)}})},89780:function(yn){(function(dt,m){yn.exports=m()})(this,function(){"use strict";var dt=navigator.userAgent,m=navigator.platform,K=/gecko\/\d/i.test(dt),j=/MSIE \d/.test(dt),A=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(dt),xe=/Edge\/(\d+)/.exec(dt),R=j||A||xe,N=R&&(j?document.documentMode||6:+(xe||A)[1]),x=!xe&&/WebKit\//.test(dt),E=x&&/Qt\/\d+\.\d+/.test(dt),F=!xe&&/Chrome\//.test(dt),V=/Opera\//.test(dt),Ie=/Apple Computer/.test(navigator.vendor),G=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(dt),le=/PhantomJS/.test(dt),ke=!xe&&/AppleWebKit/.test(dt)&&/Mobile\/\w+/.test(dt),ue=/Android/.test(dt),de=ke||ue||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(dt),_e=ke||/Mac/.test(m),Pe=/\bCrOS\b/.test(dt),Ue=/win/i.test(m),Ce=V&&dt.match(/Version\/(\d*\.\d*)/);Ce&&(Ce=Number(Ce[1])),Ce&&Ce>=15&&(V=!1,x=!0);var pe=_e&&(E||V&&(Ce==null||Ce<12.11)),q=K||R&&N>=9;function _(r){return new RegExp("(^|\\s)"+r+"(?:$|\\s)\\s*")}var ie=function(r,a){var l=r.className,s=_(a).exec(l);if(s){var u=l.slice(s.index+s[0].length);r.className=l.slice(0,s.index)+(u?s[1]+u:"")}};function ae(r){for(var a=r.childNodes.length;a>0;--a)r.removeChild(r.firstChild);return r}function Se(r,a){return ae(r).appendChild(a)}function se(r,a,l,s){var u=document.createElement(r);if(l&&(u.className=l),s&&(u.style.cssText=s),typeof a=="string")u.appendChild(document.createTextNode(a));else if(a)for(var v=0;v<a.length;++v)u.appendChild(a[v]);return u}function be(r,a,l,s){var u=se(r,a,l,s);return u.setAttribute("role","presentation"),u}var D;document.createRange?D=function(r,a,l,s){var u=document.createRange();return u.setEnd(s||r,l),u.setStart(r,a),u}:D=function(r,a,l){var s=document.body.createTextRange();try{s.moveToElementText(r.parentNode)}catch(u){return s}return s.collapse(!0),s.moveEnd("character",l),s.moveStart("character",a),s};function Le(r,a){if(a.nodeType==3&&(a=a.parentNode),r.contains)return r.contains(a);do if(a.nodeType==11&&(a=a.host),a==r)return!0;while(a=a.parentNode)}function z(){var r;try{r=document.activeElement}catch(a){r=document.body||null}for(;r&&r.shadowRoot&&r.shadowRoot.activeElement;)r=r.shadowRoot.activeElement;return r}function we(r,a){var l=r.className;_(a).test(l)||(r.className+=(l?" ":"")+a)}function ge(r,a){for(var l=r.split(" "),s=0;s<l.length;s++)l[s]&&!_(l[s]).test(a)&&(a+=" "+l[s]);return a}var Te=function(r){r.select()};ke?Te=function(r){r.selectionStart=0,r.selectionEnd=r.value.length}:R&&(Te=function(r){try{r.select()}catch(a){}});function Fe(r){var a=Array.prototype.slice.call(arguments,1);return function(){return r.apply(null,a)}}function Re(r,a,l){a||(a={});for(var s in r)r.hasOwnProperty(s)&&(l!==!1||!a.hasOwnProperty(s))&&(a[s]=r[s]);return a}function X(r,a,l,s,u){a==null&&(a=r.search(/[^\s\u00a0]/),a==-1&&(a=r.length));for(var v=s||0,M=u||0;;){var P=r.indexOf(" ",v);if(P<0||P>=a)return M+(a-v);M+=P-v,M+=l-M%l,v=P+1}}var w=function(){this.id=null,this.f=null,this.time=0,this.handler=Fe(this.onTimeout,this)};w.prototype.onTimeout=function(r){r.id=0,r.time<=+new Date?r.f():setTimeout(r.handler,r.time-+new Date)},w.prototype.set=function(r,a){this.f=a;var l=+new Date+r;(!this.id||l<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,r),this.time=l)};function ve(r,a){for(var l=0;l<r.length;++l)if(r[l]==a)return l;return-1}var Qe=50,je={toString:function(){return"CodeMirror.Pass"}},Be={scroll:!1},Oe={origin:"*mouse"},lt={origin:"+move"};function $t(r,a,l){for(var s=0,u=0;;){var v=r.indexOf(" ",s);v==-1&&(v=r.length);var M=v-s;if(v==r.length||u+M>=a)return s+Math.min(M,a-u);if(u+=v-s,u+=l-u%l,s=v+1,u>=a)return s}}var vt=[""];function Tt(r){for(;vt.length<=r;)vt.push(wt(vt)+" ");return vt[r]}function wt(r){return r[r.length-1]}function pt(r,a){for(var l=[],s=0;s<r.length;s++)l[s]=a(r[s],s);return l}function at(r,a,l){for(var s=0,u=l(a);s<r.length&&l(r[s])<=u;)s++;r.splice(s,0,a)}function S(){}function p(r,a){var l;return Object.create?l=Object.create(r):(S.prototype=r,l=new S),a&&Re(a,l),l}var h=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function g(r){return/\w/.test(r)||r>"\x80"&&(r.toUpperCase()!=r.toLowerCase()||h.test(r))}function y(r,a){return a?a.source.indexOf("\\w")>-1&&g(r)?!0:a.test(r):g(r)}function d(r){for(var a in r)if(r.hasOwnProperty(a)&&r[a])return!1;return!0}var L=/[\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 fe(r){return r.charCodeAt(0)>=768&&L.test(r)}function O(r,a,l){for(;(l<0?a>0:a<r.length)&&fe(r.charAt(a));)a+=l;return a}function I(r,a,l){for(var s=a>l?-1:1;;){if(a==l)return a;var u=(a+l)/2,v=s<0?Math.ceil(u):Math.floor(u);if(v==a)return r(v)?a:l;r(v)?l=v:a=v+s}}function he(r,a,l,s){if(!r)return s(a,l,"ltr",0);for(var u=!1,v=0;v<r.length;++v){var M=r[v];(M.from<l&&M.to>a||a==l&&M.to==a)&&(s(Math.max(M.from,a),Math.min(M.to,l),M.level==1?"rtl":"ltr",v),u=!0)}u||s(a,l,"ltr")}var Y=null;function U(r,a,l){var s;Y=null;for(var u=0;u<r.length;++u){var v=r[u];if(v.from<a&&v.to>a)return u;v.to==a&&(v.from!=v.to&&l=="before"?s=u:Y=u),v.from==a&&(v.from!=v.to&&l!="before"?s=u:Y=u)}return s!=null?s:Y}var ye=function(){var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",a="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function l(te){return te<=247?r.charAt(te):1424<=te&&te<=1524?"R":1536<=te&&te<=1785?a.charAt(te-1536):1774<=te&&te<=2220?"r":8192<=te&&te<=8203?"w":te==8204?"b":"L"}var s=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,u=/[stwN]/,v=/[LRr]/,M=/[Lb1n]/,P=/[1n]/;function Z(te,He,et){this.level=te,this.from=He,this.to=et}return function(te,He){var et=He=="ltr"?"L":"R";if(te.length==0||He=="ltr"&&!s.test(te))return!1;for(var Et=te.length,Ct=[],jt=0;jt<Et;++jt)Ct.push(l(te.charCodeAt(jt)));for(var ln=0,Dn=et;ln<Et;++ln){var Jn=Ct[ln];Jn=="m"?Ct[ln]=Dn:Dn=Jn}for(var or=0,Hn=et;or<Et;++or){var ur=Ct[or];ur=="1"&&Hn=="r"?Ct[or]="n":v.test(ur)&&(Hn=ur,ur=="r"&&(Ct[or]="R"))}for(var Dr=1,Ar=Ct[0];Dr<Et-1;++Dr){var di=Ct[Dr];di=="+"&&Ar=="1"&&Ct[Dr+1]=="1"?Ct[Dr]="1":di==","&&Ar==Ct[Dr+1]&&(Ar=="1"||Ar=="n")&&(Ct[Dr]=Ar),Ar=di}for(var ia=0;ia<Et;++ia){var So=Ct[ia];if(So==",")Ct[ia]="N";else if(So=="%"){var Ia=void 0;for(Ia=ia+1;Ia<Et&&Ct[Ia]=="%";++Ia);for(var Jo=ia&&Ct[ia-1]=="!"||Ia<Et&&Ct[Ia]=="1"?"1":"N",Qo=ia;Qo<Ia;++Qo)Ct[Qo]=Jo;ia=Ia-1}}for(var ro=0,qo=et;ro<Et;++ro){var Ur=Ct[ro];qo=="L"&&Ur=="1"?Ct[ro]="L":v.test(Ur)&&(qo=Ur)}for(var Na=0;Na<Et;++Na)if(u.test(Ct[Na])){var Ta=void 0;for(Ta=Na+1;Ta<Et&&u.test(Ct[Ta]);++Ta);for(var Ra=(Na?Ct[Na-1]:et)=="L",Ya=(Ta<Et?Ct[Ta]:et)=="L",Yl=Ra==Ya?Ra?"L":"R":et,cs=Na;cs<Ta;++cs)Ct[cs]=Yl;Na=Ta-1}for(var Eo=[],Oi,ho=0;ho<Et;)if(M.test(Ct[ho])){var pu=ho;for(++ho;ho<Et&&M.test(Ct[ho]);++ho);Eo.push(new Z(0,pu,ho))}else{var bl=ho,$l=Eo.length,rl=He=="rtl"?1:0;for(++ho;ho<Et&&Ct[ho]!="L";++ho);for(var io=bl;io<ho;)if(P.test(Ct[io])){bl<io&&(Eo.splice($l,0,new Z(1,bl,io)),$l+=rl);var Jl=io;for(++io;io<ho&&P.test(Ct[io]);++io);Eo.splice($l,0,new Z(2,Jl,io)),$l+=rl,bl=io}else++io;bl<ho&&Eo.splice($l,0,new Z(1,bl,ho))}return He=="ltr"&&(Eo[0].level==1&&(Oi=te.match(/^\s+/))&&(Eo[0].from=Oi[0].length,Eo.unshift(new Z(0,0,Oi[0].length))),wt(Eo).level==1&&(Oi=te.match(/\s+$/))&&(wt(Eo).to-=Oi[0].length,Eo.push(new Z(0,Et-Oi[0].length,Et)))),He=="rtl"?Eo.reverse():Eo}}();function Ye(r,a){var l=r.order;return l==null&&(l=r.order=ye(r.text,a)),l}var ce=[],Ae=function(r,a,l){if(r.addEventListener)r.addEventListener(a,l,!1);else if(r.attachEvent)r.attachEvent("on"+a,l);else{var s=r._handlers||(r._handlers={});s[a]=(s[a]||ce).concat(l)}};function qe(r,a){return r._handlers&&r._handlers[a]||ce}function oe(r,a,l){if(r.removeEventListener)r.removeEventListener(a,l,!1);else if(r.detachEvent)r.detachEvent("on"+a,l);else{var s=r._handlers,u=s&&s[a];if(u){var v=ve(u,l);v>-1&&(s[a]=u.slice(0,v).concat(u.slice(v+1)))}}}function T(r,a){var l=qe(r,a);if(l.length)for(var s=Array.prototype.slice.call(arguments,2),u=0;u<l.length;++u)l[u].apply(null,s)}function re(r,a,l){return typeof a=="string"&&(a={type:a,preventDefault:function(){this.defaultPrevented=!0}}),T(r,l||a.type,r,a),yt(a)||a.codemirrorIgnore}function $e(r){var a=r._handlers&&r._handlers.cursorActivity;if(a)for(var l=r.curOp.cursorActivityHandlers||(r.curOp.cursorActivityHandlers=[]),s=0;s<a.length;++s)ve(l,a[s])==-1&&l.push(a[s])}function Ne(r,a){return qe(r,a).length>0}function Xe(r){r.prototype.on=function(a,l){Ae(this,a,l)},r.prototype.off=function(a,l){oe(this,a,l)}}function ct(r){r.preventDefault?r.preventDefault():r.returnValue=!1}function mt(r){r.stopPropagation?r.stopPropagation():r.cancelBubble=!0}function yt(r){return r.defaultPrevented!=null?r.defaultPrevented:r.returnValue==!1}function Bt(r){ct(r),mt(r)}function Ft(r){return r.target||r.srcElement}function _t(r){var a=r.which;return a==null&&(r.button&1?a=1:r.button&2?a=3:r.button&4&&(a=2)),_e&&r.ctrlKey&&a==1&&(a=3),a}var Yt=function(){if(R&&N<9)return!1;var r=se("div");return"draggable"in r||"dragDrop"in r}(),rn;function hn(r){if(rn==null){var a=se("span","\u200B");Se(r,se("span",[a,document.createTextNode("x")])),r.firstChild.offsetHeight!=0&&(rn=a.offsetWidth<=1&&a.offsetHeight>2&&!(R&&N<8))}var l=rn?se("span","\u200B"):se("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return l.setAttribute("cm-text",""),l}var Wt;function on(r){if(Wt!=null)return Wt;var a=Se(r,document.createTextNode("A\u062EA")),l=D(a,0,1).getBoundingClientRect(),s=D(a,1,2).getBoundingClientRect();return ae(r),!l||l.left==l.right?!1:Wt=s.right-l.right<3}var xn=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(r){for(var a=0,l=[],s=r.length;a<=s;){var u=r.indexOf(`
|
|
|
`,a);u==-1&&(u=r.length);var v=r.slice(a,r.charAt(u-1)=="\r"?u-1:u),M=v.indexOf("\r");M!=-1?(l.push(v.slice(0,M)),a+=M+1):(l.push(v),a=u+1)}return l}:function(r){return r.split(/\r\n?|\n/)},Vt=window.getSelection?function(r){try{return r.selectionStart!=r.selectionEnd}catch(a){return!1}}:function(r){var a;try{a=r.ownerDocument.selection.createRange()}catch(l){}return!a||a.parentElement()!=r?!1:a.compareEndPoints("StartToEnd",a)!=0},Mn=function(){var r=se("div");return"oncopy"in r?!0:(r.setAttribute("oncopy","return;"),typeof r.oncopy=="function")}(),qn=null;function An(r){if(qn!=null)return qn;var a=Se(r,se("span","x")),l=a.getBoundingClientRect(),s=D(a,0,1).getBoundingClientRect();return qn=Math.abs(l.left-s.left)>1}var pr={},er={};function gr(r,a){arguments.length>2&&(a.dependencies=Array.prototype.slice.call(arguments,2)),pr[r]=a}function $r(r,a){er[r]=a}function Rn(r){if(typeof r=="string"&&er.hasOwnProperty(r))r=er[r];else if(r&&typeof r.name=="string"&&er.hasOwnProperty(r.name)){var a=er[r.name];typeof a=="string"&&(a={name:a}),r=p(a,r),r.name=a.name}else{if(typeof r=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(r))return Rn("application/xml");if(typeof r=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(r))return Rn("application/json")}return typeof r=="string"?{name:r}:r||{name:"null"}}function pn(r,a){a=Rn(a);var l=pr[a.name];if(!l)return pn(r,"text/plain");var s=l(r,a);if(tr.hasOwnProperty(a.name)){var u=tr[a.name];for(var v in u)u.hasOwnProperty(v)&&(s.hasOwnProperty(v)&&(s["_"+v]=s[v]),s[v]=u[v])}if(s.name=a.name,a.helperType&&(s.helperType=a.helperType),a.modeProps)for(var M in a.modeProps)s[M]=a.modeProps[M];return s}var tr={};function Ke(r,a){var l=tr.hasOwnProperty(r)?tr[r]:tr[r]={};Re(a,l)}function H(r,a){if(a===!0)return a;if(r.copyState)return r.copyState(a);var l={};for(var s in a){var u=a[s];u instanceof Array&&(u=u.concat([])),l[s]=u}return l}function ee(r,a){for(var l;r.innerMode&&(l=r.innerMode(a),!(!l||l.mode==r));)a=l.state,r=l.mode;return l||{mode:r,state:a}}function Q(r,a,l){return r.startState?r.startState(a,l):!0}var J=function(r,a,l){this.pos=this.start=0,this.string=r,this.tabSize=a||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=l};J.prototype.eol=function(){return this.pos>=this.string.length},J.prototype.sol=function(){return this.pos==this.lineStart},J.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},J.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},J.prototype.eat=function(r){var a=this.string.charAt(this.pos),l;if(typeof r=="string"?l=a==r:l=a&&(r.test?r.test(a):r(a)),l)return++this.pos,a},J.prototype.eatWhile=function(r){for(var a=this.pos;this.eat(r););return this.pos>a},J.prototype.eatSpace=function(){for(var r=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>r},J.prototype.skipToEnd=function(){this.pos=this.string.length},J.prototype.skipTo=function(r){var a=this.string.indexOf(r,this.pos);if(a>-1)return this.pos=a,!0},J.prototype.backUp=function(r){this.pos-=r},J.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=X(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},J.prototype.indentation=function(){return X(this.string,null,this.tabSize)-(this.lineStart?X(this.string,this.lineStart,this.tabSize):0)},J.prototype.match=function(r,a,l){if(typeof r=="string"){var s=function(M){return l?M.toLowerCase():M},u=this.string.substr(this.pos,r.length);if(s(u)==s(r))return a!==!1&&(this.pos+=r.length),!0}else{var v=this.string.slice(this.pos).match(r);return v&&v.index>0?null:(v&&a!==!1&&(this.pos+=v[0].length),v)}},J.prototype.current=function(){return this.string.slice(this.start,this.pos)},J.prototype.hideFirstChars=function(r,a){this.lineStart+=r;try{return a()}finally{this.lineStart-=r}},J.prototype.lookAhead=function(r){var a=this.lineOracle;return a&&a.lookAhead(r)},J.prototype.baseToken=function(){var r=this.lineOracle;return r&&r.baseToken(this.pos)};function Ee(r,a){if(a-=r.first,a<0||a>=r.size)throw new Error("There is no line "+(a+r.first)+" in the document.");for(var l=r;!l.lines;)for(var s=0;;++s){var u=l.children[s],v=u.chunkSize();if(a<v){l=u;break}a-=v}return l.lines[a]}function Ze(r,a,l){var s=[],u=a.line;return r.iter(a.line,l.line+1,function(v){var M=v.text;u==l.line&&(M=M.slice(0,l.ch)),u==a.line&&(M=M.slice(a.ch)),s.push(M),++u}),s}function ft(r,a,l){var s=[];return r.iter(a,l,function(u){s.push(u.text)}),s}function tt(r,a){var l=a-r.height;if(l)for(var s=r;s;s=s.parent)s.height+=l}function ut(r){if(r.parent==null)return null;for(var a=r.parent,l=ve(a.lines,r),s=a.parent;s;a=s,s=s.parent)for(var u=0;s.children[u]!=a;++u)l+=s.children[u].chunkSize();return l+a.first}function It(r,a){var l=r.first;e:do{for(var s=0;s<r.children.length;++s){var u=r.children[s],v=u.height;if(a<v){r=u;continue e}a-=v,l+=u.chunkSize()}return l}while(!r.lines);for(var M=0;M<r.lines.length;++M){var P=r.lines[M],Z=P.height;if(a<Z)break;a-=Z}return l+M}function Pt(r,a){return a>=r.first&&a<r.first+r.size}function At(r,a){return String(r.lineNumberFormatter(a+r.firstLineNumber))}function Ge(r,a,l){if(l===void 0&&(l=null),!(this instanceof Ge))return new Ge(r,a,l);this.line=r,this.ch=a,this.sticky=l}function St(r,a){return r.line-a.line||r.ch-a.ch}function Qt(r,a){return r.sticky==a.sticky&&St(r,a)==0}function Kt(r){return Ge(r.line,r.ch)}function tn(r,a){return St(r,a)<0?a:r}function Ut(r,a){return St(r,a)<0?r:a}function Sn(r,a){return Math.max(r.first,Math.min(a,r.first+r.size-1))}function Nt(r,a){if(a.line<r.first)return Ge(r.first,0);var l=r.first+r.size-1;return a.line>l?Ge(l,Ee(r,l).text.length):mn(a,Ee(r,a.line).text.length)}function mn(r,a){var l=r.ch;return l==null||l>a?Ge(r.line,a):l<0?Ge(r.line,0):r}function ot(r,a){for(var l=[],s=0;s<a.length;s++)l[s]=Nt(r,a[s]);return l}var st=function(r,a){this.state=r,this.lookAhead=a},ht=function(r,a,l,s){this.state=a,this.doc=r,this.line=l,this.maxLookAhead=s||0,this.baseTokens=null,this.baseTokenPos=1};ht.prototype.lookAhead=function(r){var a=this.doc.getLine(this.line+r);return a!=null&&r>this.maxLookAhead&&(this.maxLookAhead=r),a},ht.prototype.baseToken=function(r){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=r;)this.baseTokenPos+=2;var a=this.baseTokens[this.baseTokenPos+1];return{type:a&&a.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-r}},ht.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ht.fromSaved=function(r,a,l){return a instanceof st?new ht(r,H(r.mode,a.state),l,a.lookAhead):new ht(r,H(r.mode,a),l)},ht.prototype.save=function(r){var a=r!==!1?H(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new st(a,this.maxLookAhead):a};function Mt(r,a,l,s){var u=[r.state.modeGen],v={};Qn(r,a.text,r.doc.mode,l,function(te,He){return u.push(te,He)},v,s);for(var M=l.state,P=function(te){l.baseTokens=u;var He=r.state.overlays[te],et=1,Et=0;l.state=!0,Qn(r,a.text,He.mode,l,function(Ct,jt){for(var ln=et;Et<Ct;){var Dn=u[et];Dn>Ct&&u.splice(et,1,Ct,u[et+1],Dn),et+=2,Et=Math.min(Ct,Dn)}if(jt)if(He.opaque)u.splice(ln,et-ln,Ct,"overlay "+jt),et=ln+2;else for(;ln<et;ln+=2){var Jn=u[ln+1];u[ln+1]=(Jn?Jn+" ":"")+"overlay "+jt}},v),l.state=M,l.baseTokens=null,l.baseTokenPos=1},Z=0;Z<r.state.overlays.length;++Z)P(Z);return{styles:u,classes:v.bgClass||v.textClass?v:null}}function gt(r,a,l){if(!a.styles||a.styles[0]!=r.state.modeGen){var s=bt(r,ut(a)),u=a.text.length>r.options.maxHighlightLength&&H(r.doc.mode,s.state),v=Mt(r,a,s);u&&(s.state=u),a.stateAfter=s.save(!u),a.styles=v.styles,v.classes?a.styleClasses=v.classes:a.styleClasses&&(a.styleClasses=null),l===r.doc.highlightFrontier&&(r.doc.modeFrontier=Math.max(r.doc.modeFrontier,++r.doc.highlightFrontier))}return a.styles}function bt(r,a,l){var s=r.doc,u=r.display;if(!s.mode.startState)return new ht(s,!0,a);var v=$n(r,a,l),M=v>s.first&&Ee(s,v-1).stateAfter,P=M?ht.fromSaved(s,M,v):new ht(s,Q(s.mode),v);return s.iter(v,a,function(Z){xt(r,Z.text,P);var te=P.line;Z.stateAfter=te==a-1||te%5==0||te>=u.viewFrom&&te<u.viewTo?P.save():null,P.nextLine()}),l&&(s.modeFrontier=P.line),P}function xt(r,a,l,s){var u=r.doc.mode,v=new J(a,r.options.tabSize,l);for(v.start=v.pos=s||0,a==""&&Rt(u,l.state);!v.eol();)Gt(u,v,l.state),v.start=v.pos}function Rt(r,a){if(r.blankLine)return r.blankLine(a);if(r.innerMode){var l=ee(r,a);if(l.mode.blankLine)return l.mode.blankLine(l.state)}}function Gt(r,a,l,s){for(var u=0;u<10;u++){s&&(s[0]=ee(r,l).mode);var v=r.token(a,l);if(a.pos>a.start)return v}throw new Error("Mode "+r.name+" failed to advance stream.")}var an=function(r,a,l){this.start=r.start,this.end=r.pos,this.string=r.current(),this.type=a||null,this.state=l};function Pn(r,a,l,s){var u=r.doc,v=u.mode,M;a=Nt(u,a);var P=Ee(u,a.line),Z=bt(r,a.line,l),te=new J(P.text,r.options.tabSize,Z),He;for(s&&(He=[]);(s||te.pos<a.ch)&&!te.eol();)te.start=te.pos,M=Gt(v,te,Z.state),s&&He.push(new an(te,M,H(u.mode,Z.state)));return s?He:new an(te,M,Z.state)}function Kn(r,a){if(r)for(;;){var l=r.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!l)break;r=r.slice(0,l.index)+r.slice(l.index+l[0].length);var s=l[1]?"bgClass":"textClass";a[s]==null?a[s]=l[2]:new RegExp("(?:^|\\s)"+l[2]+"(?:$|\\s)").test(a[s])||(a[s]+=" "+l[2])}return r}function Qn(r,a,l,s,u,v,M){var P=l.flattenSpans;P==null&&(P=r.options.flattenSpans);var Z=0,te=null,He=new J(a,r.options.tabSize,s),et,Et=r.options.addModeClass&&[null];for(a==""&&Kn(Rt(l,s.state),v);!He.eol();){if(He.pos>r.options.maxHighlightLength?(P=!1,M&&xt(r,a,s,He.pos),He.pos=a.length,et=null):et=Kn(Gt(l,He,s.state,Et),v),Et){var Ct=Et[0].name;Ct&&(et="m-"+(et?Ct+" "+et:Ct))}if(!P||te!=et){for(;Z<He.start;)Z=Math.min(He.start,Z+5e3),u(Z,te);te=et}He.start=He.pos}for(;Z<He.pos;){var jt=Math.min(He.pos,Z+5e3);u(jt,te),Z=jt}}function $n(r,a,l){for(var s,u,v=r.doc,M=l?-1:a-(r.doc.mode.innerMode?1e3:100),P=a;P>M;--P){if(P<=v.first)return v.first;var Z=Ee(v,P-1),te=Z.stateAfter;if(te&&(!l||P+(te instanceof st?te.lookAhead:0)<=v.modeFrontier))return P;var He=X(Z.text,null,r.options.tabSize);(u==null||s>He)&&(u=P-1,s=He)}return u}function Cn(r,a){if(r.modeFrontier=Math.min(r.modeFrontier,a),!(r.highlightFrontier<a-10)){for(var l=r.first,s=a-1;s>l;s--){var u=Ee(r,s).stateAfter;if(u&&(!(u instanceof st)||s+u.lookAhead<a)){l=s+1;break}}r.highlightFrontier=Math.min(r.highlightFrontier,l)}}var rr=!1,jn=!1;function Vn(){rr=!0}function wn(){jn=!0}function On(r,a,l){this.marker=r,this.from=a,this.to=l}function Un(r,a){if(r)for(var l=0;l<r.length;++l){var s=r[l];if(s.marker==a)return s}}function Nn(r,a){for(var l,s=0;s<r.length;++s)r[s]!=a&&(l||(l=[])).push(r[s]);return l}function vr(r,a){r.markedSpans=r.markedSpans?r.markedSpans.concat([a]):[a],a.marker.attachLine(r)}function Zr(r,a,l){var s;if(r)for(var u=0;u<r.length;++u){var v=r[u],M=v.marker,P=v.from==null||(M.inclusiveLeft?v.from<=a:v.from<a);if(P||v.from==a&&M.type=="bookmark"&&(!l||!v.marker.insertLeft)){var Z=v.to==null||(M.inclusiveRight?v.to>=a:v.to>a);(s||(s=[])).push(new On(M,v.from,Z?null:v.to))}}return s}function Gn(r,a,l){var s;if(r)for(var u=0;u<r.length;++u){var v=r[u],M=v.marker,P=v.to==null||(M.inclusiveRight?v.to>=a:v.to>a);if(P||v.from==a&&M.type=="bookmark"&&(!l||v.marker.insertLeft)){var Z=v.from==null||(M.inclusiveLeft?v.from<=a:v.from<a);(s||(s=[])).push(new On(M,Z?null:v.from-a,v.to==null?null:v.to-a))}}return s}function nn(r,a){if(a.full)return null;var l=Pt(r,a.from.line)&&Ee(r,a.from.line).markedSpans,s=Pt(r,a.to.line)&&Ee(r,a.to.line).markedSpans;if(!l&&!s)return null;var u=a.from.ch,v=a.to.ch,M=St(a.from,a.to)==0,P=Zr(l,u,M),Z=Gn(s,v,M),te=a.text.length==1,He=wt(a.text).length+(te?u:0);if(P)for(var et=0;et<P.length;++et){var Et=P[et];if(Et.to==null){var Ct=Un(Z,Et.marker);Ct?te&&(Et.to=Ct.to==null?null:Ct.to+He):Et.to=u}}if(Z)for(var jt=0;jt<Z.length;++jt){var ln=Z[jt];if(ln.to!=null&&(ln.to+=He),ln.from==null){var Dn=Un(P,ln.marker);Dn||(ln.from=He,te&&(P||(P=[])).push(ln))}else ln.from+=He,te&&(P||(P=[])).push(ln)}P&&(P=Ht(P)),Z&&Z!=P&&(Z=Ht(Z));var Jn=[P];if(!te){var or=a.text.length-2,Hn;if(or>0&&P)for(var ur=0;ur<P.length;++ur)P[ur].to==null&&(Hn||(Hn=[])).push(new On(P[ur].marker,null,null));for(var Dr=0;Dr<or;++Dr)Jn.push(Hn);Jn.push(Z)}return Jn}function Ht(r){for(var a=0;a<r.length;++a){var l=r[a];l.from!=null&&l.from==l.to&&l.marker.clearWhenEmpty!==!1&&r.splice(a--,1)}return r.length?r:null}function Zn(r,a,l){var s=null;if(r.iter(a.line,l.line+1,function(Ct){if(Ct.markedSpans)for(var jt=0;jt<Ct.markedSpans.length;++jt){var ln=Ct.markedSpans[jt].marker;ln.readOnly&&(!s||ve(s,ln)==-1)&&(s||(s=[])).push(ln)}}),!s)return null;for(var u=[{from:a,to:l}],v=0;v<s.length;++v)for(var M=s[v],P=M.find(0),Z=0;Z<u.length;++Z){var te=u[Z];if(!(St(te.to,P.from)<0||St(te.from,P.to)>0)){var He=[Z,1],et=St(te.from,P.from),Et=St(te.to,P.to);(et<0||!M.inclusiveLeft&&!et)&&He.push({from:te.from,to:P.from}),(Et>0||!M.inclusiveRight&&!Et)&&He.push({from:P.to,to:te.to}),u.splice.apply(u,He),Z+=He.length-3}}return u}function In(r){var a=r.markedSpans;if(a){for(var l=0;l<a.length;++l)a[l].marker.detachLine(r);r.markedSpans=null}}function ir(r,a){if(a){for(var l=0;l<a.length;++l)a[l].marker.attachLine(r);r.markedSpans=a}}function xr(r){return r.inclusiveLeft?-1:0}function ar(r){return r.inclusiveRight?1:0}function Wr(r,a){var l=r.lines.length-a.lines.length;if(l!=0)return l;var s=r.find(),u=a.find(),v=St(s.from,u.from)||xr(r)-xr(a);if(v)return-v;var M=St(s.to,u.to)||ar(r)-ar(a);return M||a.id-r.id}function Pr(r,a){var l=jn&&r.markedSpans,s;if(l)for(var u=void 0,v=0;v<l.length;++v)u=l[v],u.marker.collapsed&&(a?u.from:u.to)==null&&(!s||Wr(s,u.marker)<0)&&(s=u.marker);return s}function hi(r){return Pr(r,!0)}function zn(r){return Pr(r,!1)}function kn(r,a){var l=jn&&r.markedSpans,s;if(l)for(var u=0;u<l.length;++u){var v=l[u];v.marker.collapsed&&(v.from==null||v.from<a)&&(v.to==null||v.to>a)&&(!s||Wr(s,v.marker)<0)&&(s=v.marker)}return s}function dr(r,a,l,s,u){var v=Ee(r,a),M=jn&&v.markedSpans;if(M)for(var P=0;P<M.length;++P){var Z=M[P];if(Z.marker.collapsed){var te=Z.marker.find(0),He=St(te.from,l)||xr(Z.marker)-xr(u),et=St(te.to,s)||ar(Z.marker)-ar(u);if(!(He>=0&&et<=0||He<=0&&et>=0)&&(He<=0&&(Z.marker.inclusiveRight&&u.inclusiveLeft?St(te.to,l)>=0:St(te.to,l)>0)||He>=0&&(Z.marker.inclusiveRight&&u.inclusiveLeft?St(te.from,s)<=0:St(te.from,s)<0)))return!0}}}function mr(r){for(var a;a=hi(r);)r=a.find(-1,!0).line;return r}function Jr(r){for(var a;a=zn(r);)r=a.find(1,!0).line;return r}function sa(r){for(var a,l;a=zn(r);)r=a.find(1,!0).line,(l||(l=[])).push(r);return l}function Ii(r,a){var l=Ee(r,a),s=mr(l);return l==s?a:ut(s)}function zr(r,a){if(a>r.lastLine())return a;var l=Ee(r,a),s;if(!yi(r,l))return a;for(;s=zn(l);)l=s.find(1,!0).line;return ut(l)+1}function yi(r,a){var l=jn&&a.markedSpans;if(l){for(var s=void 0,u=0;u<l.length;++u)if(s=l[u],!!s.marker.collapsed){if(s.from==null)return!0;if(!s.marker.widgetNode&&s.from==0&&s.marker.inclusiveLeft&&pi(r,a,s))return!0}}}function pi(r,a,l){if(l.to==null){var s=l.marker.find(1,!0);return pi(r,s.line,Un(s.line.markedSpans,l.marker))}if(l.marker.inclusiveRight&&l.to==a.text.length)return!0;for(var u=void 0,v=0;v<a.markedSpans.length;++v)if(u=a.markedSpans[v],u.marker.collapsed&&!u.marker.widgetNode&&u.from==l.to&&(u.to==null||u.to!=l.from)&&(u.marker.inclusiveLeft||l.marker.inclusiveRight)&&pi(r,a,u))return!0}function ii(r){r=mr(r);for(var a=0,l=r.parent,s=0;s<l.lines.length;++s){var u=l.lines[s];if(u==r)break;a+=u.height}for(var v=l.parent;v;l=v,v=l.parent)for(var M=0;M<v.children.length;++M){var P=v.children[M];if(P==l)break;a+=P.height}return a}function Gi(r){if(r.height==0)return 0;for(var a=r.text.length,l,s=r;l=hi(s);){var u=l.find(0,!0);s=u.from.line,a+=u.from.ch-u.to.ch}for(s=r;l=zn(s);){var v=l.find(0,!0);a-=s.text.length-v.from.ch,s=v.to.line,a+=s.text.length-v.to.ch}return a}function mi(r){var a=r.display,l=r.doc;a.maxLine=Ee(l,l.first),a.maxLineLength=Gi(a.maxLine),a.maxLineChanged=!0,l.iter(function(s){var u=Gi(s);u>a.maxLineLength&&(a.maxLineLength=u,a.maxLine=s)})}var Bi=function(r,a,l){this.text=r,ir(this,a),this.height=l?l(this):1};Bi.prototype.lineNo=function(){return ut(this)},Xe(Bi);function ba(r,a,l,s){r.text=a,r.stateAfter&&(r.stateAfter=null),r.styles&&(r.styles=null),r.order!=null&&(r.order=null),In(r),ir(r,l);var u=s?s(r):1;u!=r.height&&tt(r,u)}function da(r){r.parent=null,In(r)}var ea={},ma={};function xa(r,a){if(!r||/^\s*$/.test(r))return null;var l=a.addModeClass?ma:ea;return l[r]||(l[r]=r.replace(/\S+/g,"cm-$&"))}function Fa(r,a){var l=be("span",null,null,x?"padding-right: .1px":null),s={pre:be("pre",[l],"CodeMirror-line"),content:l,col:0,pos:0,cm:r,trailingSpace:!1,splitSpaces:r.getOption("lineWrapping")};a.measure={};for(var u=0;u<=(a.rest?a.rest.length:0);u++){var v=u?a.rest[u-1]:a.line,M=void 0;s.pos=0,s.addToken=Do,on(r.display.measure)&&(M=Ye(v,r.doc.direction))&&(s.addToken=ao(s.addToken,M)),s.map=[];var P=a!=r.display.externalMeasured&&ut(v);Fo(v,s,gt(r,v,P)),v.styleClasses&&(v.styleClasses.bgClass&&(s.bgClass=ge(v.styleClasses.bgClass,s.bgClass||"")),v.styleClasses.textClass&&(s.textClass=ge(v.styleClasses.textClass,s.textClass||""))),s.map.length==0&&s.map.push(0,0,s.content.appendChild(hn(r.display.measure))),u==0?(a.measure.map=s.map,a.measure.cache={}):((a.measure.maps||(a.measure.maps=[])).push(s.map),(a.measure.caches||(a.measure.caches=[])).push({}))}if(x){var Z=s.content.lastChild;(/\bcm-tab\b/.test(Z.className)||Z.querySelector&&Z.querySelector(".cm-tab"))&&(s.content.className="cm-tab-wrap-hack")}return T(r,"renderLine",r,a.line,s.pre),s.pre.className&&(s.textClass=ge(s.pre.className,s.textClass||"")),s}function Ka(r){var a=se("span","\u2022","cm-invalidchar");return a.title="\\u"+r.charCodeAt(0).toString(16),a.setAttribute("aria-label",a.title),a}function Do(r,a,l,s,u,v,M){if(a){var P=r.splitSpaces?Co(a,r.trailingSpace):a,Z=r.cm.state.specialChars,te=!1,He;if(!Z.test(a))r.col+=a.length,He=document.createTextNode(P),r.map.push(r.pos,r.pos+a.length,He),R&&N<9&&(te=!0),r.pos+=a.length;else{He=document.createDocumentFragment();for(var et=0;;){Z.lastIndex=et;var Et=Z.exec(a),Ct=Et?Et.index-et:a.length-et;if(Ct){var jt=document.createTextNode(P.slice(et,et+Ct));R&&N<9?He.appendChild(se("span",[jt])):He.appendChild(jt),r.map.push(r.pos,r.pos+Ct,jt),r.col+=Ct,r.pos+=Ct}if(!Et)break;et+=Ct+1;var ln=void 0;if(Et[0]==" "){var Dn=r.cm.options.tabSize,Jn=Dn-r.col%Dn;ln=He.appendChild(se("span",Tt(Jn),"cm-tab")),ln.setAttribute("role","presentation"),ln.setAttribute("cm-text"," "),r.col+=Jn}else Et[0]=="\r"||Et[0]==`
|
|
|
`?(ln=He.appendChild(se("span",Et[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ln.setAttribute("cm-text",Et[0]),r.col+=1):(ln=r.cm.options.specialCharPlaceholder(Et[0]),ln.setAttribute("cm-text",Et[0]),R&&N<9?He.appendChild(se("span",[ln])):He.appendChild(ln),r.col+=1);r.map.push(r.pos,r.pos+1,ln),r.pos++}}if(r.trailingSpace=P.charCodeAt(a.length-1)==32,l||s||u||te||v||M){var or=l||"";s&&(or+=s),u&&(or+=u);var Hn=se("span",[He],or,v);if(M)for(var ur in M)M.hasOwnProperty(ur)&&ur!="style"&&ur!="class"&&Hn.setAttribute(ur,M[ur]);return r.content.appendChild(Hn)}r.content.appendChild(He)}}function Co(r,a){if(r.length>1&&!/ /.test(r))return r;for(var l=a,s="",u=0;u<r.length;u++){var v=r.charAt(u);v==" "&&l&&(u==r.length-1||r.charCodeAt(u+1)==32)&&(v="\xA0"),s+=v,l=v==" "}return s}function ao(r,a){return function(l,s,u,v,M,P,Z){u=u?u+" cm-force-border":"cm-force-border";for(var te=l.pos,He=te+s.length;;){for(var et=void 0,Et=0;Et<a.length&&(et=a[Et],!(et.to>te&&et.from<=te));Et++);if(et.to>=He)return r(l,s,u,v,M,P,Z);r(l,s.slice(0,et.to-te),u,v,null,P,Z),v=null,s=s.slice(et.to-te),te=et.to}}}function la(r,a,l,s){var u=!s&&l.widgetNode;u&&r.map.push(r.pos,r.pos+a,u),!s&&r.cm.display.input.needsContentAttribute&&(u||(u=r.content.appendChild(document.createElement("span"))),u.setAttribute("cm-marker",l.id)),u&&(r.cm.display.input.setUneditable(u),r.content.appendChild(u)),r.pos+=a,r.trailingSpace=!1}function Fo(r,a,l){var s=r.markedSpans,u=r.text,v=0;if(!s){for(var M=1;M<l.length;M+=2)a.addToken(a,u.slice(v,v=l[M]),xa(l[M+1],a.cm.options));return}for(var P=u.length,Z=0,te=1,He="",et,Et,Ct=0,jt,ln,Dn,Jn,or;;){if(Ct==Z){jt=ln=Dn=Et="",or=null,Jn=null,Ct=1/0;for(var Hn=[],ur=void 0,Dr=0;Dr<s.length;++Dr){var Ar=s[Dr],di=Ar.marker;if(di.type=="bookmark"&&Ar.from==Z&&di.widgetNode)Hn.push(di);else if(Ar.from<=Z&&(Ar.to==null||Ar.to>Z||di.collapsed&&Ar.to==Z&&Ar.from==Z)){if(Ar.to!=null&&Ar.to!=Z&&Ct>Ar.to&&(Ct=Ar.to,ln=""),di.className&&(jt+=" "+di.className),di.css&&(Et=(Et?Et+";":"")+di.css),di.startStyle&&Ar.from==Z&&(Dn+=" "+di.startStyle),di.endStyle&&Ar.to==Ct&&(ur||(ur=[])).push(di.endStyle,Ar.to),di.title&&((or||(or={})).title=di.title),di.attributes)for(var ia in di.attributes)(or||(or={}))[ia]=di.attributes[ia];di.collapsed&&(!Jn||Wr(Jn.marker,di)<0)&&(Jn=Ar)}else Ar.from>Z&&Ct>Ar.from&&(Ct=Ar.from)}if(ur)for(var So=0;So<ur.length;So+=2)ur[So+1]==Ct&&(ln+=" "+ur[So]);if(!Jn||Jn.from==Z)for(var Ia=0;Ia<Hn.length;++Ia)la(a,0,Hn[Ia]);if(Jn&&(Jn.from||0)==Z){if(la(a,(Jn.to==null?P+1:Jn.to)-Z,Jn.marker,Jn.from==null),Jn.to==null)return;Jn.to==Z&&(Jn=!1)}}if(Z>=P)break;for(var Jo=Math.min(P,Ct);;){if(He){var Qo=Z+He.length;if(!Jn){var ro=Qo>Jo?He.slice(0,Jo-Z):He;a.addToken(a,ro,et?et+jt:jt,Dn,Z+ro.length==Ct?ln:"",Et,or)}if(Qo>=Jo){He=He.slice(Jo-Z),Z=Jo;break}Z=Qo,Dn=""}He=u.slice(v,v=l[te++]),et=xa(l[te++],a.cm.options)}}}function oo(r,a,l){this.line=a,this.rest=sa(a),this.size=this.rest?ut(wt(this.rest))-l+1:1,this.node=this.text=null,this.hidden=yi(r,a)}function Da(r,a,l){for(var s=[],u,v=a;v<l;v=u){var M=new oo(r.doc,Ee(r.doc,v),v);u=v+M.size,s.push(M)}return s}var ta=null;function so(r){ta?ta.ops.push(r):r.ownsGroup=ta={ops:[r],delayedCallbacks:[]}}function cr(r){var a=r.delayedCallbacks,l=0;do{for(;l<a.length;l++)a[l].call(null);for(var s=0;s<r.ops.length;s++){var u=r.ops[s];if(u.cursorActivityHandlers)for(;u.cursorActivityCalled<u.cursorActivityHandlers.length;)u.cursorActivityHandlers[u.cursorActivityCalled++].call(null,u.cm)}}while(l<a.length)}function Br(r,a){var l=r.ownsGroup;if(l)try{cr(l)}finally{ta=null,a(l)}}var _r=null;function sr(r,a){var l=qe(r,a);if(l.length){var s=Array.prototype.slice.call(arguments,2),u;ta?u=ta.delayedCallbacks:_r?u=_r:(u=_r=[],setTimeout(Gr,0));for(var v=function(P){u.push(function(){return l[P].apply(null,s)})},M=0;M<l.length;++M)v(M)}}function Gr(){var r=_r;_r=null;for(var a=0;a<r.length;++a)r[a]()}function ai(r,a,l,s){for(var u=0;u<a.changes.length;u++){var v=a.changes[u];v=="text"?Yi(r,a):v=="gutter"?qr(r,a,l,s):v=="class"?Qr(r,a):v=="widget"&&Hi(r,a,s)}a.changes=null}function Fi(r){return r.node==r.text&&(r.node=se("div",null,null,"position: relative"),r.text.parentNode&&r.text.parentNode.replaceChild(r.node,r.text),r.node.appendChild(r.text),R&&N<8&&(r.node.style.zIndex=2)),r.node}function Xi(r,a){var l=a.bgClass?a.bgClass+" "+(a.line.bgClass||""):a.line.bgClass;if(l&&(l+=" CodeMirror-linebackground"),a.background)l?a.background.className=l:(a.background.parentNode.removeChild(a.background),a.background=null);else if(l){var s=Fi(a);a.background=s.insertBefore(se("div",null,l),s.firstChild),r.display.input.setUneditable(a.background)}}function Ki(r,a){var l=r.display.externalMeasured;return l&&l.line==a.line?(r.display.externalMeasured=null,a.measure=l.measure,l.built):Fa(r,a)}function Yi(r,a){var l=a.text.className,s=Ki(r,a);a.text==a.node&&(a.node=s.pre),a.text.parentNode.replaceChild(s.pre,a.text),a.text=s.pre,s.bgClass!=a.bgClass||s.textClass!=a.textClass?(a.bgClass=s.bgClass,a.textClass=s.textClass,Qr(r,a)):l&&(a.text.className=l)}function Qr(r,a){Xi(r,a),a.line.wrapClass?Fi(a).className=a.line.wrapClass:a.node!=a.text&&(a.node.className="");var l=a.textClass?a.textClass+" "+(a.line.textClass||""):a.line.textClass;a.text.className=l||""}function qr(r,a,l,s){if(a.gutter&&(a.node.removeChild(a.gutter),a.gutter=null),a.gutterBackground&&(a.node.removeChild(a.gutterBackground),a.gutterBackground=null),a.line.gutterClass){var u=Fi(a);a.gutterBackground=se("div",null,"CodeMirror-gutter-background "+a.line.gutterClass,"left: "+(r.options.fixedGutter?s.fixedPos:-s.gutterTotalWidth)+"px; width: "+s.gutterTotalWidth+"px"),r.display.input.setUneditable(a.gutterBackground),u.insertBefore(a.gutterBackground,a.text)}var v=a.line.gutterMarkers;if(r.options.lineNumbers||v){var M=Fi(a),P=a.gutter=se("div",null,"CodeMirror-gutter-wrapper","left: "+(r.options.fixedGutter?s.fixedPos:-s.gutterTotalWidth)+"px");if(r.display.input.setUneditable(P),M.insertBefore(P,a.text),a.line.gutterClass&&(P.className+=" "+a.line.gutterClass),r.options.lineNumbers&&(!v||!v["CodeMirror-linenumbers"])&&(a.lineNumber=P.appendChild(se("div",At(r.options,l),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+s.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+r.display.lineNumInnerWidth+"px"))),v)for(var Z=0;Z<r.display.gutterSpecs.length;++Z){var te=r.display.gutterSpecs[Z].className,He=v.hasOwnProperty(te)&&v[te];He&&P.appendChild(se("div",[He],"CodeMirror-gutter-elt","left: "+s.gutterLeft[te]+"px; width: "+s.gutterWidth[te]+"px"))}}}function Hi(r,a,l){a.alignable&&(a.alignable=null);for(var s=_("CodeMirror-linewidget"),u=a.node.firstChild,v=void 0;u;u=v)v=u.nextSibling,s.test(u.className)&&a.node.removeChild(u);fa(r,a,l)}function Zi(r,a,l,s){var u=Ki(r,a);return a.text=a.node=u.pre,u.bgClass&&(a.bgClass=u.bgClass),u.textClass&&(a.textClass=u.textClass),Qr(r,a),qr(r,a,l,s),fa(r,a,s),a.node}function fa(r,a,l){if(Wi(r,a.line,a,l,!0),a.rest)for(var s=0;s<a.rest.length;s++)Wi(r,a.rest[s],a,l,!1)}function Wi(r,a,l,s,u){if(a.widgets)for(var v=Fi(l),M=0,P=a.widgets;M<P.length;++M){var Z=P[M],te=se("div",[Z.node],"CodeMirror-linewidget"+(Z.className?" "+Z.className:""));Z.handleMouseEvents||te.setAttribute("cm-ignore-events","true"),bs(Z,te,l,s),r.display.input.setUneditable(te),u&&Z.above?v.insertBefore(te,l.gutter||l.text):v.appendChild(te),sr(Z,"redraw")}}function bs(r,a,l,s){if(r.noHScroll){(l.alignable||(l.alignable=[])).push(a);var u=s.wrapperWidth;a.style.left=s.fixedPos+"px",r.coverGutter||(u-=s.gutterTotalWidth,a.style.paddingLeft=s.gutterTotalWidth+"px"),a.style.width=u+"px"}r.coverGutter&&(a.style.zIndex=5,a.style.position="relative",r.noHScroll||(a.style.marginLeft=-s.gutterTotalWidth+"px"))}function $o(r){if(r.height!=null)return r.height;var a=r.doc.cm;if(!a)return 0;if(!Le(document.body,r.node)){var l="position: relative;";r.coverGutter&&(l+="margin-left: -"+a.display.gutters.offsetWidth+"px;"),r.noHScroll&&(l+="width: "+a.display.wrapper.clientWidth+"px;"),Se(a.display.measure,se("div",[r.node],null,l))}return r.height=r.node.parentNode.offsetHeight}function Po(r,a){for(var l=Ft(a);l!=r.wrapper;l=l.parentNode)if(!l||l.nodeType==1&&l.getAttribute("cm-ignore-events")=="true"||l.parentNode==r.sizer&&l!=r.mover)return!0}function lo(r){return r.lineSpace.offsetTop}function Ps(r){return r.mover.offsetHeight-r.lineSpace.offsetHeight}function Oo(r){if(r.cachedPaddingH)return r.cachedPaddingH;var a=Se(r.measure,se("pre","x","CodeMirror-line-like")),l=window.getComputedStyle?window.getComputedStyle(a):a.currentStyle,s={left:parseInt(l.paddingLeft),right:parseInt(l.paddingRight)};return!isNaN(s.left)&&!isNaN(s.right)&&(r.cachedPaddingH=s),s}function $a(r){return Qe-r.display.nativeBarWidth}function ga(r){return r.display.scroller.clientWidth-$a(r)-r.display.barWidth}function Uo(r){return r.display.scroller.clientHeight-$a(r)-r.display.barHeight}function es(r,a,l){var s=r.options.lineWrapping,u=s&&ga(r);if(!a.measure.heights||s&&a.measure.width!=u){var v=a.measure.heights=[];if(s){a.measure.width=u;for(var M=a.text.firstChild.getClientRects(),P=0;P<M.length-1;P++){var Z=M[P],te=M[P+1];Math.abs(Z.bottom-te.bottom)>2&&v.push((Z.bottom+te.top)/2-l.top)}}v.push(l.bottom-l.top)}}function ts(r,a,l){if(r.line==a)return{map:r.measure.map,cache:r.measure.cache};for(var s=0;s<r.rest.length;s++)if(r.rest[s]==a)return{map:r.measure.maps[s],cache:r.measure.caches[s]};for(var u=0;u<r.rest.length;u++)if(ut(r.rest[u])>l)return{map:r.measure.maps[u],cache:r.measure.caches[u],before:!0}}function Os(r,a){a=mr(a);var l=ut(a),s=r.display.externalMeasured=new oo(r.doc,a,l);s.lineN=l;var u=s.built=Fa(r,s);return s.text=u.pre,Se(r.display.lineMeasure,u.pre),s}function ds(r,a,l,s){return ki(r,qa(r,a),l,s)}function co(r,a){if(a>=r.display.viewFrom&&a<r.display.viewTo)return r.display.view[uo(r,a)];var l=r.display.externalMeasured;if(l&&a>=l.lineN&&a<l.lineN+l.size)return l}function qa(r,a){var l=ut(a),s=co(r,l);s&&!s.text?s=null:s&&s.changes&&(ai(r,s,l,Mi(r)),r.curOp.forceUpdate=!0),s||(s=Os(r,a));var u=ts(s,a,l);return{line:a,view:s,rect:null,map:u.map,cache:u.cache,before:u.before,hasHeights:!1}}function ki(r,a,l,s,u){a.before&&(l=-1);var v=l+(s||""),M;return a.cache.hasOwnProperty(v)?M=a.cache[v]:(a.rect||(a.rect=a.view.text.getBoundingClientRect()),a.hasHeights||(es(r,a.view,a.rect),a.hasHeights=!0),M=ni(r,a,l,s),M.bogus||(a.cache[v]=M)),{left:M.left,right:M.right,top:u?M.rtop:M.top,bottom:u?M.rbottom:M.bottom}}var ns={left:0,right:0,top:0,bottom:0};function As(r,a,l){for(var s,u,v,M,P,Z,te=0;te<r.length;te+=3)if(P=r[te],Z=r[te+1],a<P?(u=0,v=1,M="left"):a<Z?(u=a-P,v=u+1):(te==r.length-3||a==Z&&r[te+3]>a)&&(v=Z-P,u=v-1,a>=Z&&(M="right")),u!=null){if(s=r[te+2],P==Z&&l==(s.insertLeft?"left":"right")&&(M=l),l=="left"&&u==0)for(;te&&r[te-2]==r[te-3]&&r[te-1].insertLeft;)s=r[(te-=3)+2],M="left";if(l=="right"&&u==Z-P)for(;te<r.length-3&&r[te+3]==r[te+4]&&!r[te+5].insertLeft;)s=r[(te+=3)+2],M="right";break}return{node:s,start:u,end:v,collapse:M,coverStart:P,coverEnd:Z}}function Go(r,a){var l=ns;if(a=="left")for(var s=0;s<r.length&&(l=r[s]).left==l.right;s++);else for(var u=r.length-1;u>=0&&(l=r[u]).left==l.right;u--);return l}function ni(r,a,l,s){var u=As(a.map,l,s),v=u.node,M=u.start,P=u.end,Z=u.collapse,te;if(v.nodeType==3){for(var He=0;He<4;He++){for(;M&&fe(a.line.text.charAt(u.coverStart+M));)--M;for(;u.coverStart+P<u.coverEnd&&fe(a.line.text.charAt(u.coverStart+P));)++P;if(R&&N<9&&M==0&&P==u.coverEnd-u.coverStart?te=v.parentNode.getBoundingClientRect():te=Go(D(v,M,P).getClientRects(),s),te.left||te.right||M==0)break;P=M,M=M-1,Z="right"}R&&N<11&&(te=Xr(r.display.measure,te))}else{M>0&&(Z=s="right");var et;r.options.lineWrapping&&(et=v.getClientRects()).length>1?te=et[s=="right"?et.length-1:0]:te=v.getBoundingClientRect()}if(R&&N<9&&!M&&(!te||!te.left&&!te.right)){var Et=v.parentNode.getClientRects()[0];Et?te={left:Et.left,right:Et.left+bi(r.display),top:Et.top,bottom:Et.bottom}:te=ns}for(var Ct=te.top-a.rect.top,jt=te.bottom-a.rect.top,ln=(Ct+jt)/2,Dn=a.view.measure.heights,Jn=0;Jn<Dn.length-1&&!(ln<Dn[Jn]);Jn++);var or=Jn?Dn[Jn-1]:0,Hn=Dn[Jn],ur={left:(Z=="right"?te.right:te.left)-a.rect.left,right:(Z=="left"?te.left:te.right)-a.rect.left,top:or,bottom:Hn};return!te.left&&!te.right&&(ur.bogus=!0),r.options.singleCursorHeightPerLine||(ur.rtop=Ct,ur.rbottom=jt),ur}function Xr(r,a){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!An(r))return a;var l=screen.logicalXDPI/screen.deviceXDPI,s=screen.logicalYDPI/screen.deviceYDPI;return{left:a.left*l,right:a.right*l,top:a.top*s,bottom:a.bottom*s}}function Ti(r){if(r.measure&&(r.measure.cache={},r.measure.heights=null,r.rest))for(var a=0;a<r.rest.length;a++)r.measure.caches[a]={}}function na(r){r.display.externalMeasure=null,ae(r.display.lineMeasure);for(var a=0;a<r.display.view.length;a++)Ti(r.display.view[a])}function Ni(r){na(r),r.display.cachedCharWidth=r.display.cachedTextHeight=r.display.cachedPaddingH=null,r.options.lineWrapping||(r.display.maxLineChanged=!0),r.display.lineNumChars=null}function Pa(){return F&&ue?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ha(){return F&&ue?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function mo(r){var a=0;if(r.widgets)for(var l=0;l<r.widgets.length;++l)r.widgets[l].above&&(a+=$o(r.widgets[l]));return a}function Za(r,a,l,s,u){if(!u){var v=mo(a);l.top+=v,l.bottom+=v}if(s=="line")return l;s||(s="local");var M=ii(a);if(s=="local"?M+=lo(r.display):M-=r.display.viewOffset,s=="page"||s=="window"){var P=r.display.lineSpace.getBoundingClientRect();M+=P.top+(s=="window"?0:Ha());var Z=P.left+(s=="window"?0:Pa());l.left+=Z,l.right+=Z}return l.top+=M,l.bottom+=M,l}function Ko(r,a,l){if(l=="div")return a;var s=a.left,u=a.top;if(l=="page")s-=Pa(),u-=Ha();else if(l=="local"||!l){var v=r.display.sizer.getBoundingClientRect();s+=v.left,u+=v.top}var M=r.display.lineSpace.getBoundingClientRect();return{left:s-M.left,top:u-M.top}}function Ao(r,a,l,s,u){return s||(s=Ee(r.doc,a.line)),Za(r,s,ds(r,s,a.ch,u),l)}function Wa(r,a,l,s,u,v){s=s||Ee(r.doc,a.line),u||(u=qa(r,s));function M(jt,ln){var Dn=ki(r,u,jt,ln?"right":"left",v);return ln?Dn.left=Dn.right:Dn.right=Dn.left,Za(r,s,Dn,l)}var P=Ye(s,r.doc.direction),Z=a.ch,te=a.sticky;if(Z>=s.text.length?(Z=s.text.length,te="before"):Z<=0&&(Z=0,te="after"),!P)return M(te=="before"?Z-1:Z,te=="before");function He(jt,ln,Dn){var Jn=P[ln],or=Jn.level==1;return M(Dn?jt-1:jt,or!=Dn)}var et=U(P,Z,te),Et=Y,Ct=He(Z,et,te=="before");return Et!=null&&(Ct.other=He(Z,Et,te!="before")),Ct}function Cl(r,a){var l=0;a=Nt(r.doc,a),r.options.lineWrapping||(l=bi(r.display)*a.ch);var s=Ee(r.doc,a.line),u=ii(s)+lo(r.display);return{left:l,right:l,top:u,bottom:u+s.height}}function xs(r,a,l,s,u){var v=Ge(r,a,l);return v.xRel=u,s&&(v.outside=s),v}function Ss(r,a,l){var s=r.doc;if(l+=r.display.viewOffset,l<0)return xs(s.first,0,null,-1,-1);var u=It(s,l),v=s.first+s.size-1;if(u>v)return xs(s.first+s.size-1,Ee(s,v).text.length,null,1,1);a<0&&(a=0);for(var M=Ee(s,u);;){var P=nc(r,M,u,a,l),Z=kn(M,P.ch+(P.xRel>0||P.outside>0?1:0));if(!Z)return P;var te=Z.find(1);if(te.line==u)return te;M=Ee(s,u=te.line)}}function ll(r,a,l,s){s-=mo(a);var u=a.text.length,v=I(function(M){return ki(r,l,M-1).bottom<=s},u,0);return u=I(function(M){return ki(r,l,M).top>s},v,u),{begin:v,end:u}}function Js(r,a,l,s){l||(l=qa(r,a));var u=Za(r,a,ki(r,l,s),"line").top;return ll(r,a,l,u)}function Bs(r,a,l,s){return r.bottom<=l?!1:r.top>l?!0:(s?r.left:r.right)>a}function nc(r,a,l,s,u){u-=ii(a);var v=qa(r,a),M=mo(a),P=0,Z=a.text.length,te=!0,He=Ye(a,r.doc.direction);if(He){var et=(r.options.lineWrapping?cl:fs)(r,a,l,v,He,s,u);te=et.level!=1,P=te?et.from:et.to-1,Z=te?et.to:et.from-1}var Et=null,Ct=null,jt=I(function(Dr){var Ar=ki(r,v,Dr);return Ar.top+=M,Ar.bottom+=M,Bs(Ar,s,u,!1)?(Ar.top<=u&&Ar.left<=s&&(Et=Dr,Ct=Ar),!0):!1},P,Z),ln,Dn,Jn=!1;if(Ct){var or=s-Ct.left<Ct.right-s,Hn=or==te;jt=Et+(Hn?0:1),Dn=Hn?"after":"before",ln=or?Ct.left:Ct.right}else{!te&&(jt==Z||jt==P)&&jt++,Dn=jt==0?"after":jt==a.text.length?"before":ki(r,v,jt-(te?1:0)).bottom+M<=u==te?"after":"before";var ur=Wa(r,Ge(l,jt,Dn),"line",a,v);ln=ur.left,Jn=u<ur.top?-1:u>=ur.bottom?1:0}return jt=O(a.text,jt,1),xs(l,jt,Dn,Jn,s-ln)}function fs(r,a,l,s,u,v,M){var P=I(function(et){var Et=u[et],Ct=Et.level!=1;return Bs(Wa(r,Ge(l,Ct?Et.to:Et.from,Ct?"before":"after"),"line",a,s),v,M,!0)},0,u.length-1),Z=u[P];if(P>0){var te=Z.level!=1,He=Wa(r,Ge(l,te?Z.from:Z.to,te?"after":"before"),"line",a,s);Bs(He,v,M,!0)&&He.top>M&&(Z=u[P-1])}return Z}function cl(r,a,l,s,u,v,M){var P=ll(r,a,s,M),Z=P.begin,te=P.end;/\s/.test(a.text.charAt(te-1))&&te--;for(var He=null,et=null,Et=0;Et<u.length;Et++){var Ct=u[Et];if(!(Ct.from>=te||Ct.to<=Z)){var jt=Ct.level!=1,ln=ki(r,s,jt?Math.min(te,Ct.to)-1:Math.max(Z,Ct.from)).right,Dn=ln<v?v-ln+1e9:ln-v;(!He||et>Dn)&&(He=Ct,et=Dn)}}return He||(He=u[u.length-1]),He.from<Z&&(He={from:Z,to:He.to,level:He.level}),He.to>te&&(He={from:He.from,to:te,level:He.level}),He}var hs;function Cs(r){if(r.cachedTextHeight!=null)return r.cachedTextHeight;if(hs==null){hs=se("pre",null,"CodeMirror-line-like");for(var a=0;a<49;++a)hs.appendChild(document.createTextNode("x")),hs.appendChild(se("br"));hs.appendChild(document.createTextNode("x"))}Se(r.measure,hs);var l=hs.offsetHeight/50;return l>3&&(r.cachedTextHeight=l),ae(r.measure),l||1}function bi(r){if(r.cachedCharWidth!=null)return r.cachedCharWidth;var a=se("span","xxxxxxxxxx"),l=se("pre",[a],"CodeMirror-line-like");Se(r.measure,l);var s=a.getBoundingClientRect(),u=(s.right-s.left)/10;return u>2&&(r.cachedCharWidth=u),u||10}function Mi(r){for(var a=r.display,l={},s={},u=a.gutters.clientLeft,v=a.gutters.firstChild,M=0;v;v=v.nextSibling,++M){var P=r.display.gutterSpecs[M].className;l[P]=v.offsetLeft+v.clientLeft+u,s[P]=v.clientWidth}return{fixedPos:Di(a),gutterTotalWidth:a.gutters.offsetWidth,gutterLeft:l,gutterWidth:s,wrapperWidth:a.wrapper.clientWidth}}function Di(r){return r.scroller.getBoundingClientRect().left-r.sizer.getBoundingClientRect().left}function go(r){var a=Cs(r.display),l=r.options.lineWrapping,s=l&&Math.max(5,r.display.scroller.clientWidth/bi(r.display)-3);return function(u){if(yi(r.doc,u))return 0;var v=0;if(u.widgets)for(var M=0;M<u.widgets.length;M++)u.widgets[M].height&&(v+=u.widgets[M].height);return l?v+(Math.ceil(u.text.length/s)||1)*a:v+a}}function ja(r){var a=r.doc,l=go(r);a.iter(function(s){var u=l(s);u!=s.height&&tt(s,u)})}function Xo(r,a,l,s){var u=r.display;if(!l&&Ft(a).getAttribute("cm-not-content")=="true")return null;var v,M,P=u.lineSpace.getBoundingClientRect();try{v=a.clientX-P.left,M=a.clientY-P.top}catch(et){return null}var Z=Ss(r,v,M),te;if(s&&Z.xRel>0&&(te=Ee(r.doc,Z.line).text).length==Z.ch){var He=X(te,te.length,r.options.tabSize)-te.length;Z=Ge(Z.line,Math.max(0,Math.round((v-Oo(r.display).left)/bi(r.display))-He))}return Z}function uo(r,a){if(a>=r.display.viewTo||(a-=r.display.viewFrom,a<0))return null;for(var l=r.display.view,s=0;s<l.length;s++)if(a-=l[s].size,a<0)return s}function Oa(r,a,l,s){a==null&&(a=r.doc.first),l==null&&(l=r.doc.first+r.doc.size),s||(s=0);var u=r.display;if(s&&l<u.viewTo&&(u.updateLineNumbers==null||u.updateLineNumbers>a)&&(u.updateLineNumbers=a),r.curOp.viewChanged=!0,a>=u.viewTo)jn&&Ii(r.doc,a)<u.viewTo&&is(r);else if(l<=u.viewFrom)jn&&zr(r.doc,l+s)>u.viewFrom?is(r):(u.viewFrom+=s,u.viewTo+=s);else if(a<=u.viewFrom&&l>=u.viewTo)is(r);else if(a<=u.viewFrom){var v=as(r,l,l+s,1);v?(u.view=u.view.slice(v.index),u.viewFrom=v.lineN,u.viewTo+=s):is(r)}else if(l>=u.viewTo){var M=as(r,a,a,-1);M?(u.view=u.view.slice(0,M.index),u.viewTo=M.lineN):is(r)}else{var P=as(r,a,a,-1),Z=as(r,l,l+s,1);P&&Z?(u.view=u.view.slice(0,P.index).concat(Da(r,P.lineN,Z.lineN)).concat(u.view.slice(Z.index)),u.viewTo+=s):is(r)}var te=u.externalMeasured;te&&(l<te.lineN?te.lineN+=s:a<te.lineN+te.size&&(u.externalMeasured=null))}function rs(r,a,l){r.curOp.viewChanged=!0;var s=r.display,u=r.display.externalMeasured;if(u&&a>=u.lineN&&a<u.lineN+u.size&&(s.externalMeasured=null),!(a<s.viewFrom||a>=s.viewTo)){var v=s.view[uo(r,a)];if(v.node!=null){var M=v.changes||(v.changes=[]);ve(M,l)==-1&&M.push(l)}}}function is(r){r.display.viewFrom=r.display.viewTo=r.doc.first,r.display.view=[],r.display.viewOffset=0}function as(r,a,l,s){var u=uo(r,a),v,M=r.display.view;if(!jn||l==r.doc.first+r.doc.size)return{index:u,lineN:l};for(var P=r.display.viewFrom,Z=0;Z<u;Z++)P+=M[Z].size;if(P!=a){if(s>0){if(u==M.length-1)return null;v=P+M[u].size-a,u++}else v=P-a;a+=v,l+=v}for(;Ii(r.doc,l)!=l;){if(u==(s<0?0:M.length-1))return null;l+=s*M[u-(s<0?1:0)].size,u+=s}return{index:u,lineN:l}}function Ns(r,a,l){var s=r.display,u=s.view;u.length==0||a>=s.viewTo||l<=s.viewFrom?(s.view=Da(r,a,l),s.viewFrom=a):(s.viewFrom>a?s.view=Da(r,a,s.viewFrom).concat(s.view):s.viewFrom<a&&(s.view=s.view.slice(uo(r,a))),s.viewFrom=a,s.viewTo<l?s.view=s.view.concat(Da(r,s.viewTo,l)):s.viewTo>l&&(s.view=s.view.slice(0,uo(r,l)))),s.viewTo=l}function rc(r){for(var a=r.display.view,l=0,s=0;s<a.length;s++){var u=a[s];!u.hidden&&(!u.node||u.changes)&&++l}return l}function wl(r){r.display.input.showSelection(r.display.input.prepareSelection())}function qc(r,a){a===void 0&&(a=!0);for(var l=r.doc,s={},u=s.cursors=document.createDocumentFragment(),v=s.selection=document.createDocumentFragment(),M=0;M<l.sel.ranges.length;M++)if(!(!a&&M==l.sel.primIndex)){var P=l.sel.ranges[M];if(!(P.from().line>=r.display.viewTo||P.to().line<r.display.viewFrom)){var Z=P.empty();(Z||r.options.showCursorWhenSelecting)&&kc(r,P.head,u),Z||Ou(r,P,v)}}return s}function kc(r,a,l){var s=Wa(r,a,"div",null,null,!r.options.singleCursorHeightPerLine),u=l.appendChild(se("div","\xA0","CodeMirror-cursor"));if(u.style.left=s.left+"px",u.style.top=s.top+"px",u.style.height=Math.max(0,s.bottom-s.top)*r.options.cursorHeight+"px",s.other){var v=l.appendChild(se("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));v.style.display="",v.style.left=s.other.left+"px",v.style.top=s.other.top+"px",v.style.height=(s.other.bottom-s.other.top)*.85+"px"}}function jl(r,a){return r.top-a.top||r.left-a.left}function Ou(r,a,l){var s=r.display,u=r.doc,v=document.createDocumentFragment(),M=Oo(r.display),P=M.left,Z=Math.max(s.sizerWidth,ga(r)-s.sizer.offsetLeft)-M.right,te=u.direction=="ltr";function He(Hn,ur,Dr,Ar){ur<0&&(ur=0),ur=Math.round(ur),Ar=Math.round(Ar),v.appendChild(se("div",null,"CodeMirror-selected","position: absolute; left: "+Hn+`px;
|
|
|
top: `+ur+"px; width: "+(Dr==null?Z-Hn:Dr)+`px;
|
|
|
height: `+(Ar-ur)+"px"))}function et(Hn,ur,Dr){var Ar=Ee(u,Hn),di=Ar.text.length,ia,So;function Ia(ro,qo){return Ao(r,Ge(Hn,ro),"div",Ar,qo)}function Jo(ro,qo,Ur){var Na=Js(r,Ar,null,ro),Ta=qo=="ltr"==(Ur=="after")?"left":"right",Ra=Ur=="after"?Na.begin:Na.end-(/\s/.test(Ar.text.charAt(Na.end-1))?2:1);return Ia(Ra,Ta)[Ta]}var Qo=Ye(Ar,u.direction);return he(Qo,ur||0,Dr==null?di:Dr,function(ro,qo,Ur,Na){var Ta=Ur=="ltr",Ra=Ia(ro,Ta?"left":"right"),Ya=Ia(qo-1,Ta?"right":"left"),Yl=ur==null&&ro==0,cs=Dr==null&&qo==di,Eo=Na==0,Oi=!Qo||Na==Qo.length-1;if(Ya.top-Ra.top<=3){var ho=(te?Yl:cs)&&Eo,pu=(te?cs:Yl)&&Oi,bl=ho?P:(Ta?Ra:Ya).left,$l=pu?Z:(Ta?Ya:Ra).right;He(bl,Ra.top,$l-bl,Ra.bottom)}else{var rl,io,Jl,_o;Ta?(rl=te&&Yl&&Eo?P:Ra.left,io=te?Z:Jo(ro,Ur,"before"),Jl=te?P:Jo(qo,Ur,"after"),_o=te&&cs&&Oi?Z:Ya.right):(rl=te?Jo(ro,Ur,"before"):P,io=!te&&Yl&&Eo?Z:Ra.right,Jl=!te&&cs&&Oi?P:Ya.left,_o=te?Jo(qo,Ur,"after"):Z),He(rl,Ra.top,io-rl,Ra.bottom),Ra.bottom<Ya.top&&He(P,Ra.bottom,null,Ya.top),He(Jl,Ya.top,_o-Jl,Ya.bottom)}(!ia||jl(Ra,ia)<0)&&(ia=Ra),jl(Ya,ia)<0&&(ia=Ya),(!So||jl(Ra,So)<0)&&(So=Ra),jl(Ya,So)<0&&(So=Ya)}),{start:ia,end:So}}var Et=a.from(),Ct=a.to();if(Et.line==Ct.line)et(Et.line,Et.ch,Ct.ch);else{var jt=Ee(u,Et.line),ln=Ee(u,Ct.line),Dn=mr(jt)==mr(ln),Jn=et(Et.line,Et.ch,Dn?jt.text.length+1:null).end,or=et(Ct.line,Dn?0:null,Ct.ch).start;Dn&&(Jn.top<or.top-2?(He(Jn.right,Jn.top,null,Jn.bottom),He(P,or.top,or.left,or.bottom)):He(Jn.right,Jn.top,or.left-Jn.right,Jn.bottom)),Jn.bottom<or.top&&He(P,Jn.bottom,null,or.top)}l.appendChild(v)}function ic(r){if(r.state.focused){var a=r.display;clearInterval(a.blinker);var l=!0;a.cursorDiv.style.visibility="",r.options.cursorBlinkRate>0?a.blinker=setInterval(function(){r.hasFocus()||ul(r),a.cursorDiv.style.visibility=(l=!l)?"":"hidden"},r.options.cursorBlinkRate):r.options.cursorBlinkRate<0&&(a.cursorDiv.style.visibility="hidden")}}function Vl(r){r.state.focused||(r.display.input.focus(),_c(r))}function Ec(r){r.state.delayingBlurEvent=!0,setTimeout(function(){r.state.delayingBlurEvent&&(r.state.delayingBlurEvent=!1,ul(r))},100)}function _c(r,a){r.state.delayingBlurEvent&&(r.state.delayingBlurEvent=!1),r.options.readOnly!="nocursor"&&(r.state.focused||(T(r,"focus",r,a),r.state.focused=!0,we(r.display.wrapper,"CodeMirror-focused"),!r.curOp&&r.display.selForContextMenu!=r.doc.sel&&(r.display.input.reset(),x&&setTimeout(function(){return r.display.input.reset(!0)},20)),r.display.input.receivedFocus()),ic(r))}function ul(r,a){r.state.delayingBlurEvent||(r.state.focused&&(T(r,"blur",r,a),r.state.focused=!1,ie(r.display.wrapper,"CodeMirror-focused")),clearInterval(r.display.blinker),setTimeout(function(){r.state.focused||(r.display.shift=!1)},150))}function ac(r){for(var a=r.display,l=a.lineDiv.offsetTop,s=0;s<a.view.length;s++){var u=a.view[s],v=r.options.lineWrapping,M=void 0,P=0;if(!u.hidden){if(R&&N<8){var Z=u.node.offsetTop+u.node.offsetHeight;M=Z-l,l=Z}else{var te=u.node.getBoundingClientRect();M=te.bottom-te.top,!v&&u.text.firstChild&&(P=u.text.firstChild.getBoundingClientRect().right-te.left-1)}var He=u.line.height-M;if((He>.005||He<-.005)&&(tt(u.line,M),Lc(u.line),u.rest))for(var et=0;et<u.rest.length;et++)Lc(u.rest[et]);if(P>r.display.sizerWidth){var Et=Math.ceil(P/bi(r.display));Et>r.display.maxLineLength&&(r.display.maxLineLength=Et,r.display.maxLine=u.line,r.display.maxLineChanged=!0)}}}}function Lc(r){if(r.widgets)for(var a=0;a<r.widgets.length;++a){var l=r.widgets[a],s=l.node.parentNode;s&&(l.height=s.offsetHeight)}}function eo(r,a,l){var s=l&&l.top!=null?Math.max(0,l.top):r.scroller.scrollTop;s=Math.floor(s-lo(r));var u=l&&l.bottom!=null?l.bottom:s+r.wrapper.clientHeight,v=It(a,s),M=It(a,u);if(l&&l.ensure){var P=l.ensure.from.line,Z=l.ensure.to.line;P<v?(v=P,M=It(a,ii(Ee(a,P))+r.wrapper.clientHeight)):Math.min(Z,a.lastLine())>=M&&(v=It(a,ii(Ee(a,Z))-r.wrapper.clientHeight),M=Z)}return{from:v,to:Math.max(M,v+1)}}function Rs(r,a){if(!re(r,"scrollCursorIntoView")){var l=r.display,s=l.sizer.getBoundingClientRect(),u=null;if(a.top+s.top<0?u=!0:a.bottom+s.top>(window.innerHeight||document.documentElement.clientHeight)&&(u=!1),u!=null&&!le){var v=se("div","\u200B",null,`position: absolute;
|
|
|
top: `+(a.top-l.viewOffset-lo(r.display))+`px;
|
|
|
height: `+(a.bottom-a.top+$a(r)+l.barHeight)+`px;
|
|
|
left: `+a.left+"px; width: "+Math.max(2,a.right-a.left)+"px;");r.display.lineSpace.appendChild(v),v.scrollIntoView(u),r.display.lineSpace.removeChild(v)}}}function dl(r,a,l,s){s==null&&(s=0);var u;!r.options.lineWrapping&&a==l&&(a=a.ch?Ge(a.line,a.sticky=="before"?a.ch-1:a.ch,"after"):a,l=a.sticky=="before"?Ge(a.line,a.ch+1,"before"):a);for(var v=0;v<5;v++){var M=!1,P=Wa(r,a),Z=!l||l==a?P:Wa(r,l);u={left:Math.min(P.left,Z.left),top:Math.min(P.top,Z.top)-s,right:Math.max(P.left,Z.left),bottom:Math.max(P.bottom,Z.bottom)+s};var te=oc(r,u),He=r.doc.scrollTop,et=r.doc.scrollLeft;if(te.scrollTop!=null&&(Qs(r,te.scrollTop),Math.abs(r.doc.scrollTop-He)>1&&(M=!0)),te.scrollLeft!=null&&(zs(r,te.scrollLeft),Math.abs(r.doc.scrollLeft-et)>1&&(M=!0)),!M)break}return u}function eu(r,a){var l=oc(r,a);l.scrollTop!=null&&Qs(r,l.scrollTop),l.scrollLeft!=null&&zs(r,l.scrollLeft)}function oc(r,a){var l=r.display,s=Cs(r.display);a.top<0&&(a.top=0);var u=r.curOp&&r.curOp.scrollTop!=null?r.curOp.scrollTop:l.scroller.scrollTop,v=Uo(r),M={};a.bottom-a.top>v&&(a.bottom=a.top+v);var P=r.doc.height+Ps(l),Z=a.top<s,te=a.bottom>P-s;if(a.top<u)M.scrollTop=Z?0:a.top;else if(a.bottom>u+v){var He=Math.min(a.top,(te?P:a.bottom)-v);He!=u&&(M.scrollTop=He)}var et=r.options.fixedGutter?0:l.gutters.offsetWidth,Et=r.curOp&&r.curOp.scrollLeft!=null?r.curOp.scrollLeft:l.scroller.scrollLeft-et,Ct=ga(r)-l.gutters.offsetWidth,jt=a.right-a.left>Ct;return jt&&(a.right=a.left+Ct),a.left<10?M.scrollLeft=0:a.left<Et?M.scrollLeft=Math.max(0,a.left+et-(jt?0:10)):a.right>Ct+Et-3&&(M.scrollLeft=a.right+(jt?0:10)-Ct),M}function sc(r,a){a!=null&&(Ul(r),r.curOp.scrollTop=(r.curOp.scrollTop==null?r.doc.scrollTop:r.curOp.scrollTop)+a)}function Ml(r){Ul(r);var a=r.getCursor();r.curOp.scrollToPos={from:a,to:a,margin:r.options.cursorScrollMargin}}function fl(r,a,l){(a!=null||l!=null)&&Ul(r),a!=null&&(r.curOp.scrollLeft=a),l!=null&&(r.curOp.scrollTop=l)}function Au(r,a){Ul(r),r.curOp.scrollToPos=a}function Ul(r){var a=r.curOp.scrollToPos;if(a){r.curOp.scrollToPos=null;var l=Cl(r,a.from),s=Cl(r,a.to);tu(r,l,s,a.margin)}}function tu(r,a,l,s){var u=oc(r,{left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-s,right:Math.max(a.right,l.right),bottom:Math.max(a.bottom,l.bottom)+s});fl(r,u.scrollLeft,u.scrollTop)}function Qs(r,a){Math.abs(r.doc.scrollTop-a)<2||(K||_n(r,{top:a}),nu(r,a,!0),K&&_n(r),kt(r,100))}function nu(r,a,l){a=Math.max(0,Math.min(r.display.scroller.scrollHeight-r.display.scroller.clientHeight,a)),!(r.display.scroller.scrollTop==a&&!l)&&(r.doc.scrollTop=a,r.display.scrollbars.setScrollTop(a),r.display.scroller.scrollTop!=a&&(r.display.scroller.scrollTop=a))}function zs(r,a,l,s){a=Math.max(0,Math.min(a,r.display.scroller.scrollWidth-r.display.scroller.clientWidth)),!((l?a==r.doc.scrollLeft:Math.abs(r.doc.scrollLeft-a)<2)&&!s)&&(r.doc.scrollLeft=a,Sr(r),r.display.scroller.scrollLeft!=a&&(r.display.scroller.scrollLeft=a),r.display.scrollbars.setScrollLeft(a))}function kl(r){var a=r.display,l=a.gutters.offsetWidth,s=Math.round(r.doc.height+Ps(r.display));return{clientHeight:a.scroller.clientHeight,viewHeight:a.wrapper.clientHeight,scrollWidth:a.scroller.scrollWidth,clientWidth:a.scroller.clientWidth,viewWidth:a.wrapper.clientWidth,barLeft:r.options.fixedGutter?l:0,docHeight:s,scrollHeight:s+$a(r)+a.barHeight,nativeBarWidth:a.nativeBarWidth,gutterWidth:l}}var Fs=function(r,a,l){this.cm=l;var s=this.vert=se("div",[se("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),u=this.horiz=se("div",[se("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");s.tabIndex=u.tabIndex=-1,r(s),r(u),Ae(s,"scroll",function(){s.clientHeight&&a(s.scrollTop,"vertical")}),Ae(u,"scroll",function(){u.clientWidth&&a(u.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,R&&N<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fs.prototype.update=function(r){var a=r.scrollWidth>r.clientWidth+1,l=r.scrollHeight>r.clientHeight+1,s=r.nativeBarWidth;if(l){this.vert.style.display="block",this.vert.style.bottom=a?s+"px":"0";var u=r.viewHeight-(a?s:0);this.vert.firstChild.style.height=Math.max(0,r.scrollHeight-r.clientHeight+u)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(a){this.horiz.style.display="block",this.horiz.style.right=l?s+"px":"0",this.horiz.style.left=r.barLeft+"px";var v=r.viewWidth-r.barLeft-(l?s:0);this.horiz.firstChild.style.width=Math.max(0,r.scrollWidth-r.clientWidth+v)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&r.clientHeight>0&&(s==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:l?s:0,bottom:a?s:0}},Fs.prototype.setScrollLeft=function(r){this.horiz.scrollLeft!=r&&(this.horiz.scrollLeft=r),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fs.prototype.setScrollTop=function(r){this.vert.scrollTop!=r&&(this.vert.scrollTop=r),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fs.prototype.zeroWidthHack=function(){var r=_e&&!G?"12px":"18px";this.horiz.style.height=this.vert.style.width=r,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new w,this.disableVert=new w},Fs.prototype.enableZeroWidthBar=function(r,a,l){r.style.pointerEvents="auto";function s(){var u=r.getBoundingClientRect(),v=l=="vert"?document.elementFromPoint(u.right-1,(u.top+u.bottom)/2):document.elementFromPoint((u.right+u.left)/2,u.bottom-1);v!=r?r.style.pointerEvents="none":a.set(1e3,s)}a.set(1e3,s)},Fs.prototype.clear=function(){var r=this.horiz.parentNode;r.removeChild(this.horiz),r.removeChild(this.vert)};var Ho=function(){};Ho.prototype.update=function(){return{bottom:0,right:0}},Ho.prototype.setScrollLeft=function(){},Ho.prototype.setScrollTop=function(){},Ho.prototype.clear=function(){};function qs(r,a){a||(a=kl(r));var l=r.display.barWidth,s=r.display.barHeight;lc(r,a);for(var u=0;u<4&&l!=r.display.barWidth||s!=r.display.barHeight;u++)l!=r.display.barWidth&&r.options.lineWrapping&&ac(r),lc(r,kl(r)),l=r.display.barWidth,s=r.display.barHeight}function lc(r,a){var l=r.display,s=l.scrollbars.update(a);l.sizer.style.paddingRight=(l.barWidth=s.right)+"px",l.sizer.style.paddingBottom=(l.barHeight=s.bottom)+"px",l.heightForcer.style.borderBottom=s.bottom+"px solid transparent",s.right&&s.bottom?(l.scrollbarFiller.style.display="block",l.scrollbarFiller.style.height=s.bottom+"px",l.scrollbarFiller.style.width=s.right+"px"):l.scrollbarFiller.style.display="",s.bottom&&r.options.coverGutterNextToScrollbar&&r.options.fixedGutter?(l.gutterFiller.style.display="block",l.gutterFiller.style.height=s.bottom+"px",l.gutterFiller.style.width=a.gutterWidth+"px"):l.gutterFiller.style.display=""}var Ic={native:Fs,null:Ho};function Tc(r){r.display.scrollbars&&(r.display.scrollbars.clear(),r.display.scrollbars.addClass&&ie(r.display.wrapper,r.display.scrollbars.addClass)),r.display.scrollbars=new Ic[r.options.scrollbarStyle](function(a){r.display.wrapper.insertBefore(a,r.display.scrollbarFiller),Ae(a,"mousedown",function(){r.state.focused&&setTimeout(function(){return r.display.input.focus()},0)}),a.setAttribute("cm-not-content","true")},function(a,l){l=="horizontal"?zs(r,a):Qs(r,a)},r),r.display.scrollbars.addClass&&we(r.display.wrapper,r.display.scrollbars.addClass)}var ru=0;function wo(r){r.curOp={cm:r,viewChanged:!1,startHeight:r.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:++ru},so(r.curOp)}function Ks(r){var a=r.curOp;a&&Br(a,function(l){for(var s=0;s<l.ops.length;s++)l.ops[s].cm.curOp=null;iu(l)})}function iu(r){for(var a=r.ops,l=0;l<a.length;l++)B(a[l]);for(var s=0;s<a.length;s++)W(a[s]);for(var u=0;u<a.length;u++)me(a[u]);for(var v=0;v<a.length;v++)De(a[v]);for(var M=0;M<a.length;M++)Ve(a[M])}function B(r){var a=r.cm,l=a.display;qt(a),r.updateMaxLine&&mi(a),r.mustUpdate=r.viewChanged||r.forceUpdate||r.scrollTop!=null||r.scrollToPos&&(r.scrollToPos.from.line<l.viewFrom||r.scrollToPos.to.line>=l.viewTo)||l.maxLineChanged&&a.options.lineWrapping,r.update=r.mustUpdate&&new Lt(a,r.mustUpdate&&{top:r.scrollTop,ensure:r.scrollToPos},r.forceUpdate)}function W(r){r.updatedDisplay=r.mustUpdate&&En(r.cm,r.update)}function me(r){var a=r.cm,l=a.display;r.updatedDisplay&&ac(a),r.barMeasure=kl(a),l.maxLineChanged&&!a.options.lineWrapping&&(r.adjustWidthTo=ds(a,l.maxLine,l.maxLine.text.length).left+3,a.display.sizerWidth=r.adjustWidthTo,r.barMeasure.scrollWidth=Math.max(l.scroller.clientWidth,l.sizer.offsetLeft+r.adjustWidthTo+$a(a)+a.display.barWidth),r.maxScrollLeft=Math.max(0,l.sizer.offsetLeft+r.adjustWidthTo-ga(a))),(r.updatedDisplay||r.selectionChanged)&&(r.preparedSelection=l.input.prepareSelection())}function De(r){var a=r.cm;r.adjustWidthTo!=null&&(a.display.sizer.style.minWidth=r.adjustWidthTo+"px",r.maxScrollLeft<a.doc.scrollLeft&&zs(a,Math.min(a.display.scroller.scrollLeft,r.maxScrollLeft),!0),a.display.maxLineChanged=!1);var l=r.focus&&r.focus==z();r.preparedSelection&&a.display.input.showSelection(r.preparedSelection,l),(r.updatedDisplay||r.startHeight!=a.doc.height)&&qs(a,r.barMeasure),r.updatedDisplay&&yr(a,r.barMeasure),r.selectionChanged&&ic(a),a.state.focused&&r.updateInput&&a.display.input.reset(r.typing),l&&Vl(r.cm)}function Ve(r){var a=r.cm,l=a.display,s=a.doc;if(r.updatedDisplay&&fn(a,r.update),l.wheelStartX!=null&&(r.scrollTop!=null||r.scrollLeft!=null||r.scrollToPos)&&(l.wheelStartX=l.wheelStartY=null),r.scrollTop!=null&&nu(a,r.scrollTop,r.forceScroll),r.scrollLeft!=null&&zs(a,r.scrollLeft,!0,!0),r.scrollToPos){var u=dl(a,Nt(s,r.scrollToPos.from),Nt(s,r.scrollToPos.to),r.scrollToPos.margin);Rs(a,u)}var v=r.maybeHiddenMarkers,M=r.maybeUnhiddenMarkers;if(v)for(var P=0;P<v.length;++P)v[P].lines.length||T(v[P],"hide");if(M)for(var Z=0;Z<M.length;++Z)M[Z].lines.length&&T(M[Z],"unhide");l.wrapper.offsetHeight&&(s.scrollTop=a.display.scroller.scrollTop),r.changeObjs&&T(a,"changes",a,r.changeObjs),r.update&&r.update.finish()}function ze(r,a){if(r.curOp)return a();wo(r);try{return a()}finally{Ks(r)}}function it(r,a){return function(){if(r.curOp)return a.apply(r,arguments);wo(r);try{return a.apply(r,arguments)}finally{Ks(r)}}}function rt(r){return function(){if(this.curOp)return r.apply(this,arguments);wo(this);try{return r.apply(this,arguments)}finally{Ks(this)}}}function nt(r){return function(){var a=this.cm;if(!a||a.curOp)return r.apply(this,arguments);wo(a);try{return r.apply(this,arguments)}finally{Ks(a)}}}function kt(r,a){r.doc.highlightFrontier<r.display.viewTo&&r.state.highlight.set(a,Fe(zt,r))}function zt(r){var a=r.doc;if(!(a.highlightFrontier>=r.display.viewTo)){var l=+new Date+r.options.workTime,s=bt(r,a.highlightFrontier),u=[];a.iter(s.line,Math.min(a.first+a.size,r.display.viewTo+500),function(v){if(s.line>=r.display.viewFrom){var M=v.styles,P=v.text.length>r.options.maxHighlightLength?H(a.mode,s.state):null,Z=Mt(r,v,s,!0);P&&(s.state=P),v.styles=Z.styles;var te=v.styleClasses,He=Z.classes;He?v.styleClasses=He:te&&(v.styleClasses=null);for(var et=!M||M.length!=v.styles.length||te!=He&&(!te||!He||te.bgClass!=He.bgClass||te.textClass!=He.textClass),Et=0;!et&&Et<M.length;++Et)et=M[Et]!=v.styles[Et];et&&u.push(s.line),v.stateAfter=s.save(),s.nextLine()}else v.text.length<=r.options.maxHighlightLength&&xt(r,v.text,s),v.stateAfter=s.line%5==0?s.save():null,s.nextLine();if(+new Date>l)return kt(r,r.options.workDelay),!0}),a.highlightFrontier=s.line,a.modeFrontier=Math.max(a.modeFrontier,s.line),u.length&&ze(r,function(){for(var v=0;v<u.length;v++)rs(r,u[v],"text")})}}var Lt=function(r,a,l){var s=r.display;this.viewport=a,this.visible=eo(s,r.doc,a),this.editorIsHidden=!s.wrapper.offsetWidth,this.wrapperHeight=s.wrapper.clientHeight,this.wrapperWidth=s.wrapper.clientWidth,this.oldDisplayWidth=ga(r),this.force=l,this.dims=Mi(r),this.events=[]};Lt.prototype.signal=function(r,a){Ne(r,a)&&this.events.push(arguments)},Lt.prototype.finish=function(){for(var r=0;r<this.events.length;r++)T.apply(null,this.events[r])};function qt(r){var a=r.display;!a.scrollbarsClipped&&a.scroller.offsetWidth&&(a.nativeBarWidth=a.scroller.offsetWidth-a.scroller.clientWidth,a.heightForcer.style.height=$a(r)+"px",a.sizer.style.marginBottom=-a.nativeBarWidth+"px",a.sizer.style.borderRightWidth=$a(r)+"px",a.scrollbarsClipped=!0)}function Xt(r){if(r.hasFocus())return null;var a=z();if(!a||!Le(r.display.lineDiv,a))return null;var l={activeElt:a};if(window.getSelection){var s=window.getSelection();s.anchorNode&&s.extend&&Le(r.display.lineDiv,s.anchorNode)&&(l.anchorNode=s.anchorNode,l.anchorOffset=s.anchorOffset,l.focusNode=s.focusNode,l.focusOffset=s.focusOffset)}return l}function Jt(r){if(!(!r||!r.activeElt||r.activeElt==z())&&(r.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(r.activeElt.nodeName)&&r.anchorNode&&Le(document.body,r.anchorNode)&&Le(document.body,r.focusNode))){var a=window.getSelection(),l=document.createRange();l.setEnd(r.anchorNode,r.anchorOffset),l.collapse(!1),a.removeAllRanges(),a.addRange(l),a.extend(r.focusNode,r.focusOffset)}}function En(r,a){var l=r.display,s=r.doc;if(a.editorIsHidden)return is(r),!1;if(!a.force&&a.visible.from>=l.viewFrom&&a.visible.to<=l.viewTo&&(l.updateLineNumbers==null||l.updateLineNumbers>=l.viewTo)&&l.renderedView==l.view&&rc(r)==0)return!1;nr(r)&&(is(r),a.dims=Mi(r));var u=s.first+s.size,v=Math.max(a.visible.from-r.options.viewportMargin,s.first),M=Math.min(u,a.visible.to+r.options.viewportMargin);l.viewFrom<v&&v-l.viewFrom<20&&(v=Math.max(s.first,l.viewFrom)),l.viewTo>M&&l.viewTo-M<20&&(M=Math.min(u,l.viewTo)),jn&&(v=Ii(r.doc,v),M=zr(r.doc,M));var P=v!=l.viewFrom||M!=l.viewTo||l.lastWrapHeight!=a.wrapperHeight||l.lastWrapWidth!=a.wrapperWidth;Ns(r,v,M),l.viewOffset=ii(Ee(r.doc,l.viewFrom)),r.display.mover.style.top=l.viewOffset+"px";var Z=rc(r);if(!P&&Z==0&&!a.force&&l.renderedView==l.view&&(l.updateLineNumbers==null||l.updateLineNumbers>=l.viewTo))return!1;var te=Xt(r);return Z>4&&(l.lineDiv.style.display="none"),gn(r,l.updateLineNumbers,a.dims),Z>4&&(l.lineDiv.style.display=""),l.renderedView=l.view,Jt(te),ae(l.cursorDiv),ae(l.selectionDiv),l.gutters.style.height=l.sizer.style.minHeight=0,P&&(l.lastWrapHeight=a.wrapperHeight,l.lastWrapWidth=a.wrapperWidth,kt(r,400)),l.updateLineNumbers=null,!0}function fn(r,a){for(var l=a.viewport,s=!0;;s=!1){if(!s||!r.options.lineWrapping||a.oldDisplayWidth==ga(r)){if(l&&l.top!=null&&(l={top:Math.min(r.doc.height+Ps(r.display)-Uo(r),l.top)}),a.visible=eo(r.display,r.doc,l),a.visible.from>=r.display.viewFrom&&a.visible.to<=r.display.viewTo)break}else s&&(a.visible=eo(r.display,r.doc,l));if(!En(r,a))break;ac(r);var u=kl(r);wl(r),qs(r,u),yr(r,u),a.force=!1}a.signal(r,"update",r),(r.display.viewFrom!=r.display.reportedViewFrom||r.display.viewTo!=r.display.reportedViewTo)&&(a.signal(r,"viewportChange",r,r.display.viewFrom,r.display.viewTo),r.display.reportedViewFrom=r.display.viewFrom,r.display.reportedViewTo=r.display.viewTo)}function _n(r,a){var l=new Lt(r,a);if(En(r,l)){ac(r),fn(r,l);var s=kl(r);wl(r),qs(r,s),yr(r,s),l.finish()}}function gn(r,a,l){var s=r.display,u=r.options.lineNumbers,v=s.lineDiv,M=v.firstChild;function P(jt){var ln=jt.nextSibling;return x&&_e&&r.display.currentWheelTarget==jt?jt.style.display="none":jt.parentNode.removeChild(jt),ln}for(var Z=s.view,te=s.viewFrom,He=0;He<Z.length;He++){var et=Z[He];if(!et.hidden)if(!et.node||et.node.parentNode!=v){var Et=Zi(r,et,te,l);v.insertBefore(Et,M)}else{for(;M!=et.node;)M=P(M);var Ct=u&&a!=null&&a<=te&&et.lineNumber;et.changes&&(ve(et.changes,"gutter")>-1&&(Ct=!1),ai(r,et,te,l)),Ct&&(ae(et.lineNumber),et.lineNumber.appendChild(document.createTextNode(At(r.options,te)))),M=et.node.nextSibling}te+=et.size}for(;M;)M=P(M)}function Fn(r){var a=r.gutters.offsetWidth;r.sizer.style.marginLeft=a+"px"}function yr(r,a){r.display.sizer.style.minHeight=a.docHeight+"px",r.display.heightForcer.style.top=a.docHeight+"px",r.display.gutters.style.height=a.docHeight+r.display.barHeight+$a(r)+"px"}function Sr(r){var a=r.display,l=a.view;if(!(!a.alignWidgets&&(!a.gutters.firstChild||!r.options.fixedGutter))){for(var s=Di(a)-a.scroller.scrollLeft+r.doc.scrollLeft,u=a.gutters.offsetWidth,v=s+"px",M=0;M<l.length;M++)if(!l[M].hidden){r.options.fixedGutter&&(l[M].gutter&&(l[M].gutter.style.left=v),l[M].gutterBackground&&(l[M].gutterBackground.style.left=v));var P=l[M].alignable;if(P)for(var Z=0;Z<P.length;Z++)P[Z].style.left=v}r.options.fixedGutter&&(a.gutters.style.left=s+u+"px")}}function nr(r){if(!r.options.lineNumbers)return!1;var a=r.doc,l=At(r.options,a.first+a.size-1),s=r.display;if(l.length!=s.lineNumChars){var u=s.measure.appendChild(se("div",[se("div",l)],"CodeMirror-linenumber CodeMirror-gutter-elt")),v=u.firstChild.offsetWidth,M=u.offsetWidth-v;return s.lineGutter.style.width="",s.lineNumInnerWidth=Math.max(v,s.lineGutter.offsetWidth-M)+1,s.lineNumWidth=s.lineNumInnerWidth+M,s.lineNumChars=s.lineNumInnerWidth?l.length:-1,s.lineGutter.style.width=s.lineNumWidth+"px",Fn(r.display),!0}return!1}function Tr(r,a){for(var l=[],s=!1,u=0;u<r.length;u++){var v=r[u],M=null;if(typeof v!="string"&&(M=v.style,v=v.className),v=="CodeMirror-linenumbers")if(a)s=!0;else continue;l.push({className:v,style:M})}return a&&!s&&l.push({className:"CodeMirror-linenumbers",style:null}),l}function Kr(r){var a=r.gutters,l=r.gutterSpecs;ae(a),r.lineGutter=null;for(var s=0;s<l.length;++s){var u=l[s],v=u.className,M=u.style,P=a.appendChild(se("div",null,"CodeMirror-gutter "+v));M&&(P.style.cssText=M),v=="CodeMirror-linenumbers"&&(r.lineGutter=P,P.style.width=(r.lineNumWidth||1)+"px")}a.style.display=l.length?"":"none",Fn(r)}function Wn(r){Kr(r.display),Oa(r),Sr(r)}function lr(r,a,l,s){var u=this;this.input=l,u.scrollbarFiller=se("div",null,"CodeMirror-scrollbar-filler"),u.scrollbarFiller.setAttribute("cm-not-content","true"),u.gutterFiller=se("div",null,"CodeMirror-gutter-filler"),u.gutterFiller.setAttribute("cm-not-content","true"),u.lineDiv=be("div",null,"CodeMirror-code"),u.selectionDiv=se("div",null,null,"position: relative; z-index: 1"),u.cursorDiv=se("div",null,"CodeMirror-cursors"),u.measure=se("div",null,"CodeMirror-measure"),u.lineMeasure=se("div",null,"CodeMirror-measure"),u.lineSpace=be("div",[u.measure,u.lineMeasure,u.selectionDiv,u.cursorDiv,u.lineDiv],null,"position: relative; outline: none");var v=be("div",[u.lineSpace],"CodeMirror-lines");u.mover=se("div",[v],null,"position: relative"),u.sizer=se("div",[u.mover],"CodeMirror-sizer"),u.sizerWidth=null,u.heightForcer=se("div",null,null,"position: absolute; height: "+Qe+"px; width: 1px;"),u.gutters=se("div",null,"CodeMirror-gutters"),u.lineGutter=null,u.scroller=se("div",[u.sizer,u.heightForcer,u.gutters],"CodeMirror-scroll"),u.scroller.setAttribute("tabIndex","-1"),u.wrapper=se("div",[u.scrollbarFiller,u.gutterFiller,u.scroller],"CodeMirror"),R&&N<8&&(u.gutters.style.zIndex=-1,u.scroller.style.paddingRight=0),!x&&!(K&&de)&&(u.scroller.draggable=!0),r&&(r.appendChild?r.appendChild(u.wrapper):r(u.wrapper)),u.viewFrom=u.viewTo=a.first,u.reportedViewFrom=u.reportedViewTo=a.first,u.view=[],u.renderedView=null,u.externalMeasured=null,u.viewOffset=0,u.lastWrapHeight=u.lastWrapWidth=0,u.updateLineNumbers=null,u.nativeBarWidth=u.barHeight=u.barWidth=0,u.scrollbarsClipped=!1,u.lineNumWidth=u.lineNumInnerWidth=u.lineNumChars=null,u.alignWidgets=!1,u.cachedCharWidth=u.cachedTextHeight=u.cachedPaddingH=null,u.maxLine=null,u.maxLineLength=0,u.maxLineChanged=!1,u.wheelDX=u.wheelDY=u.wheelStartX=u.wheelStartY=null,u.shift=!1,u.selForContextMenu=null,u.activeTouch=null,u.gutterSpecs=Tr(s.gutters,s.lineNumbers),Kr(u),l.init(u)}var Xn=0,un=null;R?un=-.53:K?un=15:F?un=-.7:Ie&&(un=-1/3);function Yn(r){var a=r.wheelDeltaX,l=r.wheelDeltaY;return a==null&&r.detail&&r.axis==r.HORIZONTAL_AXIS&&(a=r.detail),l==null&&r.detail&&r.axis==r.VERTICAL_AXIS?l=r.detail:l==null&&(l=r.wheelDelta),{x:a,y:l}}function Ir(r){var a=Yn(r);return a.x*=un,a.y*=un,a}function Vr(r,a){var l=Yn(a),s=l.x,u=l.y,v=r.display,M=v.scroller,P=M.scrollWidth>M.clientWidth,Z=M.scrollHeight>M.clientHeight;if(s&&P||u&&Z){if(u&&_e&&x){e:for(var te=a.target,He=v.view;te!=M;te=te.parentNode)for(var et=0;et<He.length;et++)if(He[et].node==te){r.display.currentWheelTarget=te;break e}}if(s&&!K&&!V&&un!=null){u&&Z&&Qs(r,Math.max(0,M.scrollTop+u*un)),zs(r,Math.max(0,M.scrollLeft+s*un)),(!u||u&&Z)&&ct(a),v.wheelStartX=null;return}if(u&&un!=null){var Et=u*un,Ct=r.doc.scrollTop,jt=Ct+v.wrapper.clientHeight;Et<0?Ct=Math.max(0,Ct+Et-50):jt=Math.min(r.doc.height,jt+Et+50),_n(r,{top:Ct,bottom:jt})}Xn<20&&(v.wheelStartX==null?(v.wheelStartX=M.scrollLeft,v.wheelStartY=M.scrollTop,v.wheelDX=s,v.wheelDY=u,setTimeout(function(){if(v.wheelStartX!=null){var ln=M.scrollLeft-v.wheelStartX,Dn=M.scrollTop-v.wheelStartY,Jn=Dn&&v.wheelDY&&Dn/v.wheelDY||ln&&v.wheelDX&&ln/v.wheelDX;v.wheelStartX=v.wheelStartY=null,Jn&&(un=(un*Xn+Jn)/(Xn+1),++Xn)}},200)):(v.wheelDX+=s,v.wheelDY+=u))}}var kr=function(r,a){this.ranges=r,this.primIndex=a};kr.prototype.primary=function(){return this.ranges[this.primIndex]},kr.prototype.equals=function(r){if(r==this)return!0;if(r.primIndex!=this.primIndex||r.ranges.length!=this.ranges.length)return!1;for(var a=0;a<this.ranges.length;a++){var l=this.ranges[a],s=r.ranges[a];if(!Qt(l.anchor,s.anchor)||!Qt(l.head,s.head))return!1}return!0},kr.prototype.deepCopy=function(){for(var r=[],a=0;a<this.ranges.length;a++)r[a]=new Tn(Kt(this.ranges[a].anchor),Kt(this.ranges[a].head));return new kr(r,this.primIndex)},kr.prototype.somethingSelected=function(){for(var r=0;r<this.ranges.length;r++)if(!this.ranges[r].empty())return!0;return!1},kr.prototype.contains=function(r,a){a||(a=r);for(var l=0;l<this.ranges.length;l++){var s=this.ranges[l];if(St(a,s.from())>=0&&St(r,s.to())<=0)return l}return-1};var Tn=function(r,a){this.anchor=r,this.head=a};Tn.prototype.from=function(){return Ut(this.anchor,this.head)},Tn.prototype.to=function(){return tn(this.anchor,this.head)},Tn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Nr(r,a,l){var s=r&&r.options.selectionsMayTouch,u=a[l];a.sort(function(Et,Ct){return St(Et.from(),Ct.from())}),l=ve(a,u);for(var v=1;v<a.length;v++){var M=a[v],P=a[v-1],Z=St(P.to(),M.from());if(s&&!M.empty()?Z>0:Z>=0){var te=Ut(P.from(),M.from()),He=tn(P.to(),M.to()),et=P.empty()?M.from()==M.head:P.from()==P.head;v<=l&&--l,a.splice(--v,2,new Tn(et?He:te,et?te:He))}}return new kr(a,l)}function Hr(r,a){return new kr([new Tn(r,a||r)],0)}function fi(r){return r.text?Ge(r.from.line+r.text.length-1,wt(r.text).length+(r.text.length==1?r.from.ch:0)):r.to}function si(r,a){if(St(r,a.from)<0)return r;if(St(r,a.to)<=0)return fi(a);var l=r.line+a.text.length-(a.to.line-a.from.line)-1,s=r.ch;return r.line==a.to.line&&(s+=fi(a).ch-a.to.ch),Ge(l,s)}function ji(r,a){for(var l=[],s=0;s<r.sel.ranges.length;s++){var u=r.sel.ranges[s];l.push(new Tn(si(u.anchor,a),si(u.head,a)))}return Nr(r.cm,l,r.sel.primIndex)}function $i(r,a,l){return r.line==a.line?Ge(l.line,r.ch-a.ch+l.ch):Ge(l.line+(r.line-a.line),r.ch)}function Fr(r,a,l){for(var s=[],u=Ge(r.first,0),v=u,M=0;M<a.length;M++){var P=a[M],Z=$i(P.from,u,v),te=$i(fi(P),u,v);if(u=P.to,v=te,l=="around"){var He=r.sel.ranges[M],et=St(He.head,He.anchor)<0;s[M]=new Tn(et?te:Z,et?Z:te)}else s[M]=new Tn(Z,Z)}return new kr(s,r.sel.primIndex)}function ca(r){r.doc.mode=pn(r.options,r.doc.modeOption),ei(r)}function ei(r){r.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null)}),r.doc.modeFrontier=r.doc.highlightFrontier=r.doc.first,kt(r,100),r.state.modeGen++,r.curOp&&Oa(r)}function Ri(r,a){return a.from.ch==0&&a.to.ch==0&&wt(a.text)==""&&(!r.cm||r.cm.options.wholeLineUpdateBefore)}function Pi(r,a,l,s){function u(or){return l?l[or]:null}function v(or,Hn,ur){ba(or,Hn,ur,s),sr(or,"change",or,a)}function M(or,Hn){for(var ur=[],Dr=or;Dr<Hn;++Dr)ur.push(new Bi(te[Dr],u(Dr),s));return ur}var P=a.from,Z=a.to,te=a.text,He=Ee(r,P.line),et=Ee(r,Z.line),Et=wt(te),Ct=u(te.length-1),jt=Z.line-P.line;if(a.full)r.insert(0,M(0,te.length)),r.remove(te.length,r.size-te.length);else if(Ri(r,a)){var ln=M(0,te.length-1);v(et,et.text,Ct),jt&&r.remove(P.line,jt),ln.length&&r.insert(P.line,ln)}else if(He==et)if(te.length==1)v(He,He.text.slice(0,P.ch)+Et+He.text.slice(Z.ch),Ct);else{var Dn=M(1,te.length-1);Dn.push(new Bi(Et+He.text.slice(Z.ch),Ct,s)),v(He,He.text.slice(0,P.ch)+te[0],u(0)),r.insert(P.line+1,Dn)}else if(te.length==1)v(He,He.text.slice(0,P.ch)+te[0]+et.text.slice(Z.ch),u(0)),r.remove(P.line+1,jt);else{v(He,He.text.slice(0,P.ch)+te[0],u(0)),v(et,Et+et.text.slice(Z.ch),Ct);var Jn=M(1,te.length-1);jt>1&&r.remove(P.line+1,jt-1),r.insert(P.line+1,Jn)}sr(r,"change",r,a)}function Sa(r,a,l){function s(u,v,M){if(u.linked)for(var P=0;P<u.linked.length;++P){var Z=u.linked[P];if(Z.doc!=v){var te=M&&Z.sharedHist;l&&!te||(a(Z.doc,te),s(Z.doc,u,te))}}}s(r,null,!0)}function Er(r,a){if(a.cm)throw new Error("This document is already in use.");r.doc=a,a.cm=r,ja(r),ca(r),Cr(r),r.options.lineWrapping||mi(r),r.options.mode=a.modeOption,Oa(r)}function Cr(r){(r.doc.direction=="rtl"?we:ie)(r.display.lineDiv,"CodeMirror-rtl")}function wr(r){ze(r,function(){Cr(r),Oa(r)})}function fr(r){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=r||1}function li(r,a){var l={from:Kt(a.from),to:fi(a),text:Ze(r,a.from,a.to)};return Zo(r,l,a.from.line,a.to.line+1),Sa(r,function(s){return Zo(s,l,a.from.line,a.to.line+1)},!0),l}function br(r){for(;r.length;){var a=wt(r);if(a.ranges)r.pop();else break}}function Rr(r,a){if(a)return br(r.done),wt(r.done);if(r.done.length&&!wt(r.done).ranges)return wt(r.done);if(r.done.length>1&&!r.done[r.done.length-2].ranges)return r.done.pop(),wt(r.done)}function ti(r,a,l,s){var u=r.history;u.undone.length=0;var v=+new Date,M,P;if((u.lastOp==s||u.lastOrigin==a.origin&&a.origin&&(a.origin.charAt(0)=="+"&&u.lastModTime>v-(r.cm?r.cm.options.historyEventDelay:500)||a.origin.charAt(0)=="*"))&&(M=Rr(u,u.lastOp==s)))P=wt(M.changes),St(a.from,a.to)==0&&St(a.from,P.to)==0?P.to=fi(a):M.changes.push(li(r,a));else{var Z=wt(u.done);for((!Z||!Z.ranges)&&Ca(r.sel,u.done),M={changes:[li(r,a)],generation:u.generation},u.done.push(M);u.done.length>u.undoDepth;)u.done.shift(),u.done[0].ranges||u.done.shift()}u.done.push(l),u.generation=++u.maxGeneration,u.lastModTime=u.lastSelTime=v,u.lastOp=u.lastSelOp=s,u.lastOrigin=u.lastSelOrigin=a.origin,P||T(r,"historyAdded")}function Yr(r,a,l,s){var u=a.charAt(0);return u=="*"||u=="+"&&l.ranges.length==s.ranges.length&&l.somethingSelected()==s.somethingSelected()&&new Date-r.history.lastSelTime<=(r.cm?r.cm.options.historyEventDelay:500)}function Va(r,a,l,s){var u=r.history,v=s&&s.origin;l==u.lastSelOp||v&&u.lastSelOrigin==v&&(u.lastModTime==u.lastSelTime&&u.lastOrigin==v||Yr(r,v,wt(u.done),a))?u.done[u.done.length-1]=a:Ca(a,u.done),u.lastSelTime=+new Date,u.lastSelOrigin=v,u.lastSelOp=l,s&&s.clearRedo!==!1&&br(u.undone)}function Ca(r,a){var l=wt(a);l&&l.ranges&&l.equals(r)||a.push(r)}function Zo(r,a,l,s){var u=a["spans_"+r.id],v=0;r.iter(Math.max(r.first,l),Math.min(r.first+r.size,s),function(M){M.markedSpans&&((u||(u=a["spans_"+r.id]={}))[v]=M.markedSpans),++v})}function ua(r){if(!r)return null;for(var a,l=0;l<r.length;++l)r[l].marker.explicitlyCleared?a||(a=r.slice(0,l)):a&&a.push(r[l]);return a?a.length?a:null:r}function Yo(r,a){var l=a["spans_"+r.id];if(!l)return null;for(var s=[],u=0;u<a.text.length;++u)s.push(ua(l[u]));return s}function ha(r,a){var l=Yo(r,a),s=nn(r,a);if(!l)return s;if(!s)return l;for(var u=0;u<l.length;++u){var v=l[u],M=s[u];if(v&&M)e:for(var P=0;P<M.length;++P){for(var Z=M[P],te=0;te<v.length;++te)if(v[te].marker==Z.marker)continue e;v.push(Z)}else M&&(l[u]=M)}return l}function Aa(r,a,l){for(var s=[],u=0;u<r.length;++u){var v=r[u];if(v.ranges){s.push(l?kr.prototype.deepCopy.call(v):v);continue}var M=v.changes,P=[];s.push({changes:P});for(var Z=0;Z<M.length;++Z){var te=M[Z],He=void 0;if(P.push({from:te.from,to:te.to,text:te.text}),a)for(var et in te)(He=et.match(/^spans_(\d+)$/))&&ve(a,Number(He[1]))>-1&&(wt(P)[et]=te[et],delete te[et])}}return s}function ws(r,a,l,s){if(s){var u=r.anchor;if(l){var v=St(a,u)<0;v!=St(l,u)<0?(u=a,a=l):v!=St(a,l)<0&&(a=l)}return new Tn(u,a)}else return new Tn(l||a,a)}function oi(r,a,l,s,u){u==null&&(u=r.cm&&(r.cm.display.shift||r.extend)),wi(r,new kr([ws(r.sel.primary(),a,l,u)],0),s)}function cn(r,a,l){for(var s=[],u=r.cm&&(r.cm.display.shift||r.extend),v=0;v<r.sel.ranges.length;v++)s[v]=ws(r.sel.ranges[v],a[v],null,u);var M=Nr(r.cm,s,r.sel.primIndex);wi(r,M,l)}function gi(r,a,l,s){var u=r.sel.ranges.slice(0);u[a]=l,wi(r,Nr(r.cm,u,r.sel.primIndex),s)}function va(r,a,l,s){wi(r,Hr(a,l),s)}function wa(r,a,l){var s={ranges:a.ranges,update:function(u){this.ranges=[];for(var v=0;v<u.length;v++)this.ranges[v]=new Tn(Nt(r,u[v].anchor),Nt(r,u[v].head))},origin:l&&l.origin};return T(r,"beforeSelectionChange",r,s),r.cm&&T(r.cm,"beforeSelectionChange",r.cm,s),s.ranges!=a.ranges?Nr(r.cm,s.ranges,s.ranges.length-1):a}function Or(r,a,l){var s=r.history.done,u=wt(s);u&&u.ranges?(s[s.length-1]=a,Ba(r,a,l)):wi(r,a,l)}function wi(r,a,l){Ba(r,a,l),Va(r,r.sel,r.cm?r.cm.curOp.id:NaN,l)}function Ba(r,a,l){(Ne(r,"beforeSelectionChange")||r.cm&&Ne(r.cm,"beforeSelectionChange"))&&(a=wa(r,a,l));var s=l&&l.bias||(St(a.primary().head,r.sel.primary().head)<0?-1:1);Bo(r,vo(r,a,s,!0)),!(l&&l.scroll===!1)&&r.cm&&Ml(r.cm)}function Bo(r,a){a.equals(r.sel)||(r.sel=a,r.cm&&(r.cm.curOp.updateInput=1,r.cm.curOp.selectionChanged=!0,$e(r.cm)),sr(r,"cursorActivity",r))}function ps(r){Bo(r,vo(r,r.sel,null,!1))}function vo(r,a,l,s){for(var u,v=0;v<a.ranges.length;v++){var M=a.ranges[v],P=a.ranges.length==r.sel.ranges.length&&r.sel.ranges[v],Z=os(r,M.anchor,P&&P.anchor,l,s),te=os(r,M.head,P&&P.head,l,s);(u||Z!=M.anchor||te!=M.head)&&(u||(u=a.ranges.slice(0,v)),u[v]=new Tn(Z,te))}return u?Nr(r.cm,u,a.primIndex):a}function Ua(r,a,l,s,u){var v=Ee(r,a.line);if(v.markedSpans)for(var M=0;M<v.markedSpans.length;++M){var P=v.markedSpans[M],Z=P.marker,te="selectLeft"in Z?!Z.selectLeft:Z.inclusiveLeft,He="selectRight"in Z?!Z.selectRight:Z.inclusiveRight;if((P.from==null||(te?P.from<=a.ch:P.from<a.ch))&&(P.to==null||(He?P.to>=a.ch:P.to>a.ch))){if(u&&(T(Z,"beforeCursorEnter"),Z.explicitlyCleared))if(v.markedSpans){--M;continue}else break;if(!Z.atomic)continue;if(l){var et=Z.find(s<0?1:-1),Et=void 0;if((s<0?He:te)&&(et=Ga(r,et,-s,et&&et.line==a.line?v:null)),et&&et.line==a.line&&(Et=St(et,l))&&(s<0?Et<0:Et>0))return Ua(r,et,a,s,u)}var Ct=Z.find(s<0?-1:1);return(s<0?te:He)&&(Ct=Ga(r,Ct,s,Ct.line==a.line?v:null)),Ct?Ua(r,Ct,a,s,u):null}}return a}function os(r,a,l,s,u){var v=s||1,M=Ua(r,a,l,v,u)||!u&&Ua(r,a,l,v,!0)||Ua(r,a,l,-v,u)||!u&&Ua(r,a,l,-v,!0);return M||(r.cantEdit=!0,Ge(r.first,0))}function Ga(r,a,l,s){return l<0&&a.ch==0?a.line>r.first?Nt(r,Ge(a.line-1)):null:l>0&&a.ch==(s||Ee(r,a.line)).text.length?a.line<r.first+r.size-1?Ge(a.line+1,0):null:new Ge(a.line,a.ch+l)}function yo(r){r.setSelection(Ge(r.firstLine(),0),Ge(r.lastLine()),Be)}function to(r,a,l){var s={canceled:!1,from:a.from,to:a.to,text:a.text,origin:a.origin,cancel:function(){return s.canceled=!0}};return l&&(s.update=function(u,v,M,P){u&&(s.from=Nt(r,u)),v&&(s.to=Nt(r,v)),M&&(s.text=M),P!==void 0&&(s.origin=P)}),T(r,"beforeChange",r,s),r.cm&&T(r.cm,"beforeChange",r.cm,s),s.canceled?(r.cm&&(r.cm.curOp.updateInput=2),null):{from:s.from,to:s.to,text:s.text,origin:s.origin}}function Vi(r,a,l){if(r.cm){if(!r.cm.curOp)return it(r.cm,Vi)(r,a,l);if(r.cm.state.suppressEdits)return}if(!((Ne(r,"beforeChange")||r.cm&&Ne(r.cm,"beforeChange"))&&(a=to(r,a,!0),!a))){var s=rr&&!l&&Zn(r,a.from,a.to);if(s)for(var u=s.length-1;u>=0;--u)Ui(r,{from:s[u].from,to:s[u].to,text:u?[""]:a.text,origin:a.origin});else Ui(r,a)}}function Ui(r,a){if(!(a.text.length==1&&a.text[0]==""&&St(a.from,a.to)==0)){var l=ji(r,a);ti(r,a,l,r.cm?r.cm.curOp.id:NaN),Wo(r,a,l,nn(r,a));var s=[];Sa(r,function(u,v){!v&&ve(s,u.history)==-1&&(Ei(u.history,a),s.push(u.history)),Wo(u,a,null,nn(u,a))})}}function fo(r,a,l){var s=r.cm&&r.cm.state.suppressEdits;if(!(s&&!l)){for(var u=r.history,v,M=r.sel,P=a=="undo"?u.done:u.undone,Z=a=="undo"?u.undone:u.done,te=0;te<P.length&&(v=P[te],!(l?v.ranges&&!v.equals(r.sel):!v.ranges));te++);if(te!=P.length){for(u.lastOrigin=u.lastSelOrigin=null;;)if(v=P.pop(),v.ranges){if(Ca(v,Z),l&&!v.equals(r.sel)){wi(r,v,{clearRedo:!1});return}M=v}else if(s){P.push(v);return}else break;var He=[];Ca(M,Z),Z.push({changes:He,generation:u.generation}),u.generation=v.generation||++u.maxGeneration;for(var et=Ne(r,"beforeChange")||r.cm&&Ne(r.cm,"beforeChange"),Et=function(ln){var Dn=v.changes[ln];if(Dn.origin=a,et&&!to(r,Dn,!1))return P.length=0,{};He.push(li(r,Dn));var Jn=ln?ji(r,Dn):wt(P);Wo(r,Dn,Jn,ha(r,Dn)),!ln&&r.cm&&r.cm.scrollIntoView({from:Dn.from,to:fi(Dn)});var or=[];Sa(r,function(Hn,ur){!ur&&ve(or,Hn.history)==-1&&(Ei(Hn.history,Dn),or.push(Hn.history)),Wo(Hn,Dn,null,ha(Hn,Dn))})},Ct=v.changes.length-1;Ct>=0;--Ct){var jt=Et(Ct);if(jt)return jt.v}}}}function Ms(r,a){if(a!=0&&(r.first+=a,r.sel=new kr(pt(r.sel.ranges,function(u){return new Tn(Ge(u.anchor.line+a,u.anchor.ch),Ge(u.head.line+a,u.head.ch))}),r.sel.primIndex),r.cm)){Oa(r.cm,r.first,r.first-a,a);for(var l=r.cm.display,s=l.viewFrom;s<l.viewTo;s++)rs(r.cm,s,"gutter")}}function Wo(r,a,l,s){if(r.cm&&!r.cm.curOp)return it(r.cm,Wo)(r,a,l,s);if(a.to.line<r.first){Ms(r,a.text.length-1-(a.to.line-a.from.line));return}if(!(a.from.line>r.lastLine())){if(a.from.line<r.first){var u=a.text.length-1-(r.first-a.from.line);Ms(r,u),a={from:Ge(r.first,0),to:Ge(a.to.line+u,a.to.ch),text:[wt(a.text)],origin:a.origin}}var v=r.lastLine();a.to.line>v&&(a={from:a.from,to:Ge(v,Ee(r,v).text.length),text:[a.text[0]],origin:a.origin}),a.removed=Ze(r,a.from,a.to),l||(l=ji(r,a)),r.cm?ms(r.cm,a,s):Pi(r,a,s),Ba(r,l,Be),r.cantEdit&&os(r,Ge(r.firstLine(),0))&&(r.cantEdit=!1)}}function ms(r,a,l){var s=r.doc,u=r.display,v=a.from,M=a.to,P=!1,Z=v.line;r.options.lineWrapping||(Z=ut(mr(Ee(s,v.line))),s.iter(Z,M.line+1,function(Ct){if(Ct==u.maxLine)return P=!0,!0})),s.sel.contains(a.from,a.to)>-1&&$e(r),Pi(s,a,l,go(r)),r.options.lineWrapping||(s.iter(Z,v.line+a.text.length,function(Ct){var jt=Gi(Ct);jt>u.maxLineLength&&(u.maxLine=Ct,u.maxLineLength=jt,u.maxLineChanged=!0,P=!1)}),P&&(r.curOp.updateMaxLine=!0)),Cn(s,v.line),kt(r,400);var te=a.text.length-(M.line-v.line)-1;a.full?Oa(r):v.line==M.line&&a.text.length==1&&!Ri(r.doc,a)?rs(r,v.line,"text"):Oa(r,v.line,M.line+1,te);var He=Ne(r,"changes"),et=Ne(r,"change");if(et||He){var Et={from:v,to:M,text:a.text,removed:a.removed,origin:a.origin};et&&sr(r,"change",r,Et),He&&(r.curOp.changeObjs||(r.curOp.changeObjs=[])).push(Et)}r.display.selForContextMenu=null}function Hs(r,a,l,s,u){var v;s||(s=l),St(s,l)<0&&(v=[s,l],l=v[0],s=v[1]),typeof a=="string"&&(a=r.splitLines(a)),Vi(r,{from:l,to:s,text:a,origin:u})}function cc(r,a,l,s){l<r.line?r.line+=s:a<r.line&&(r.line=a,r.ch=0)}function ci(r,a,l,s){for(var u=0;u<r.length;++u){var v=r[u],M=!0;if(v.ranges){v.copied||(v=r[u]=v.deepCopy(),v.copied=!0);for(var P=0;P<v.ranges.length;P++)cc(v.ranges[P].anchor,a,l,s),cc(v.ranges[P].head,a,l,s);continue}for(var Z=0;Z<v.changes.length;++Z){var te=v.changes[Z];if(l<te.from.line)te.from=Ge(te.from.line+s,te.from.ch),te.to=Ge(te.to.line+s,te.to.ch);else if(a<=te.to.line){M=!1;break}}M||(r.splice(0,u+1),u=0)}}function Ei(r,a){var l=a.from.line,s=a.to.line,u=a.text.length-(s-l)-1;ci(r.done,l,s,u),ci(r.undone,l,s,u)}function _a(r,a,l,s){var u=a,v=a;return typeof a=="number"?v=Ee(r,Sn(r,a)):u=ut(a),u==null?null:(s(v,u)&&r.cm&&rs(r.cm,u,l),v)}function _i(r){this.lines=r,this.parent=null;for(var a=0,l=0;l<r.length;++l)r[l].parent=this,a+=r[l].height;this.height=a}_i.prototype={chunkSize:function(){return this.lines.length},removeInner:function(r,a){for(var l=r,s=r+a;l<s;++l){var u=this.lines[l];this.height-=u.height,da(u),sr(u,"delete")}this.lines.splice(r,a)},collapse:function(r){r.push.apply(r,this.lines)},insertInner:function(r,a,l){this.height+=l,this.lines=this.lines.slice(0,r).concat(a).concat(this.lines.slice(r));for(var s=0;s<a.length;++s)a[s].parent=this},iterN:function(r,a,l){for(var s=r+a;r<s;++r)if(l(this.lines[r]))return!0}};function La(r){this.children=r;for(var a=0,l=0,s=0;s<r.length;++s){var u=r[s];a+=u.chunkSize(),l+=u.height,u.parent=this}this.size=a,this.height=l,this.parent=null}La.prototype={chunkSize:function(){return this.size},removeInner:function(r,a){this.size-=a;for(var l=0;l<this.children.length;++l){var s=this.children[l],u=s.chunkSize();if(r<u){var v=Math.min(a,u-r),M=s.height;if(s.removeInner(r,v),this.height-=M-s.height,u==v&&(this.children.splice(l--,1),s.parent=null),(a-=v)==0)break;r=0}else r-=u}if(this.size-a<25&&(this.children.length>1||!(this.children[0]instanceof _i))){var P=[];this.collapse(P),this.children=[new _i(P)],this.children[0].parent=this}},collapse:function(r){for(var a=0;a<this.children.length;++a)this.children[a].collapse(r)},insertInner:function(r,a,l){this.size+=a.length,this.height+=l;for(var s=0;s<this.children.length;++s){var u=this.children[s],v=u.chunkSize();if(r<=v){if(u.insertInner(r,a,l),u.lines&&u.lines.length>50){for(var M=u.lines.length%25+25,P=M;P<u.lines.length;){var Z=new _i(u.lines.slice(P,P+=25));u.height-=Z.height,this.children.splice(++s,0,Z),Z.parent=this}u.lines=u.lines.slice(0,M),this.maybeSpill()}break}r-=v}},maybeSpill:function(){if(!(this.children.length<=10)){var r=this;do{var a=r.children.splice(r.children.length-5,5),l=new La(a);if(r.parent){r.size-=l.size,r.height-=l.height;var u=ve(r.parent.children,r);r.parent.children.splice(u+1,0,l)}else{var s=new La(r.children);s.parent=r,r.children=[s,l],r=s}l.parent=r.parent}while(r.children.length>10);r.parent.maybeSpill()}},iterN:function(r,a,l){for(var s=0;s<this.children.length;++s){var u=this.children[s],v=u.chunkSize();if(r<v){var M=Math.min(a,v-r);if(u.iterN(r,M,l))return!0;if((a-=M)==0)break;r=0}else r-=v}}};var Xa=function(r,a,l){if(l)for(var s in l)l.hasOwnProperty(s)&&(this[s]=l[s]);this.doc=r,this.node=a};Xa.prototype.clear=function(){var r=this.doc.cm,a=this.line.widgets,l=this.line,s=ut(l);if(!(s==null||!a)){for(var u=0;u<a.length;++u)a[u]==this&&a.splice(u--,1);a.length||(l.widgets=null);var v=$o(this);tt(l,Math.max(0,l.height-v)),r&&(ze(r,function(){Mo(r,l,-v),rs(r,s,"widget")}),sr(r,"lineWidgetCleared",r,this,s))}},Xa.prototype.changed=function(){var r=this,a=this.height,l=this.doc.cm,s=this.line;this.height=null;var u=$o(this)-a;u&&(yi(this.doc,s)||tt(s,s.height+u),l&&ze(l,function(){l.curOp.forceUpdate=!0,Mo(l,s,u),sr(l,"lineWidgetChanged",l,r,ut(s))}))},Xe(Xa);function Mo(r,a,l){ii(a)<(r.curOp&&r.curOp.scrollTop||r.doc.scrollTop)&&sc(r,l)}function ks(r,a,l,s){var u=new Xa(r,l,s),v=r.cm;return v&&u.noHScroll&&(v.display.alignWidgets=!0),_a(r,a,"widget",function(M){var P=M.widgets||(M.widgets=[]);if(u.insertAt==null?P.push(u):P.splice(Math.min(P.length-1,Math.max(0,u.insertAt)),0,u),u.line=M,v&&!yi(r,M)){var Z=ii(M)<r.scrollTop;tt(M,M.height+$o(u)),Z&&sc(v,u.height),v.curOp.forceUpdate=!0}return!0}),v&&sr(v,"lineWidgetAdded",v,u,typeof a=="number"?a:ut(a)),u}var Dc=0,el=function(r,a){this.lines=[],this.type=a,this.doc=r,this.id=++Dc};el.prototype.clear=function(){if(!this.explicitlyCleared){var r=this.doc.cm,a=r&&!r.curOp;if(a&&wo(r),Ne(this,"clear")){var l=this.find();l&&sr(this,"clear",l.from,l.to)}for(var s=null,u=null,v=0;v<this.lines.length;++v){var M=this.lines[v],P=Un(M.markedSpans,this);r&&!this.collapsed?rs(r,ut(M),"text"):r&&(P.to!=null&&(u=ut(M)),P.from!=null&&(s=ut(M))),M.markedSpans=Nn(M.markedSpans,P),P.from==null&&this.collapsed&&!yi(this.doc,M)&&r&&tt(M,Cs(r.display))}if(r&&this.collapsed&&!r.options.lineWrapping)for(var Z=0;Z<this.lines.length;++Z){var te=mr(this.lines[Z]),He=Gi(te);He>r.display.maxLineLength&&(r.display.maxLine=te,r.display.maxLineLength=He,r.display.maxLineChanged=!0)}s!=null&&r&&this.collapsed&&Oa(r,s,u+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,r&&ps(r.doc)),r&&sr(r,"markerCleared",r,this,s,u),a&&Ks(r),this.parent&&this.parent.clear()}},el.prototype.find=function(r,a){r==null&&this.type=="bookmark"&&(r=1);for(var l,s,u=0;u<this.lines.length;++u){var v=this.lines[u],M=Un(v.markedSpans,this);if(M.from!=null&&(l=Ge(a?v:ut(v),M.from),r==-1))return l;if(M.to!=null&&(s=Ge(a?v:ut(v),M.to),r==1))return s}return l&&{from:l,to:s}},el.prototype.changed=function(){var r=this,a=this.find(-1,!0),l=this,s=this.doc.cm;!a||!s||ze(s,function(){var u=a.line,v=ut(a.line),M=co(s,v);if(M&&(Ti(M),s.curOp.selectionChanged=s.curOp.forceUpdate=!0),s.curOp.updateMaxLine=!0,!yi(l.doc,u)&&l.height!=null){var P=l.height;l.height=null;var Z=$o(l)-P;Z&&tt(u,u.height+Z)}sr(s,"markerChanged",s,r)})},el.prototype.attachLine=function(r){if(!this.lines.length&&this.doc.cm){var a=this.doc.cm.curOp;(!a.maybeHiddenMarkers||ve(a.maybeHiddenMarkers,this)==-1)&&(a.maybeUnhiddenMarkers||(a.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(r)},el.prototype.detachLine=function(r){if(this.lines.splice(ve(this.lines,r),1),!this.lines.length&&this.doc.cm){var a=this.doc.cm.curOp;(a.maybeHiddenMarkers||(a.maybeHiddenMarkers=[])).push(this)}},Xe(el);function Es(r,a,l,s,u){if(s&&s.shared)return Ji(r,a,l,s,u);if(r.cm&&!r.cm.curOp)return it(r.cm,Es)(r,a,l,s,u);var v=new el(r,u),M=St(a,l);if(s&&Re(s,v,!1),M>0||M==0&&v.clearWhenEmpty!==!1)return v;if(v.replacedWith&&(v.collapsed=!0,v.widgetNode=be("span",[v.replacedWith],"CodeMirror-widget"),s.handleMouseEvents||v.widgetNode.setAttribute("cm-ignore-events","true"),s.insertLeft&&(v.widgetNode.insertLeft=!0)),v.collapsed){if(dr(r,a.line,a,l,v)||a.line!=l.line&&dr(r,l.line,a,l,v))throw new Error("Inserting collapsed marker partially overlapping an existing one");wn()}v.addToHistory&&ti(r,{from:a,to:l,origin:"markText"},r.sel,NaN);var P=a.line,Z=r.cm,te;if(r.iter(P,l.line+1,function(et){Z&&v.collapsed&&!Z.options.lineWrapping&&mr(et)==Z.display.maxLine&&(te=!0),v.collapsed&&P!=a.line&&tt(et,0),vr(et,new On(v,P==a.line?a.ch:null,P==l.line?l.ch:null)),++P}),v.collapsed&&r.iter(a.line,l.line+1,function(et){yi(r,et)&&tt(et,0)}),v.clearOnEnter&&Ae(v,"beforeCursorEnter",function(){return v.clear()}),v.readOnly&&(Vn(),(r.history.done.length||r.history.undone.length)&&r.clearHistory()),v.collapsed&&(v.id=++Dc,v.atomic=!0),Z){if(te&&(Z.curOp.updateMaxLine=!0),v.collapsed)Oa(Z,a.line,l.line+1);else if(v.className||v.startStyle||v.endStyle||v.css||v.attributes||v.title)for(var He=a.line;He<=l.line;He++)rs(Z,He,"text");v.atomic&&ps(Z.doc),sr(Z,"markerAdded",Z,v)}return v}var ri=function(r,a){this.markers=r,this.primary=a;for(var l=0;l<r.length;++l)r[l].parent=this};ri.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var r=0;r<this.markers.length;++r)this.markers[r].clear();sr(this,"clear")}},ri.prototype.find=function(r,a){return this.primary.find(r,a)},Xe(ri);function Ji(r,a,l,s,u){s=Re(s),s.shared=!1;var v=[Es(r,a,l,s,u)],M=v[0],P=s.widgetNode;return Sa(r,function(Z){P&&(s.widgetNode=P.cloneNode(!0)),v.push(Es(Z,Nt(Z,a),Nt(Z,l),s,u));for(var te=0;te<Z.linked.length;++te)if(Z.linked[te].isParent)return;M=wt(v)}),new ri(v,M)}function gs(r){return r.findMarks(Ge(r.first,0),r.clipPos(Ge(r.lastLine())),function(a){return a.parent})}function hl(r,a){for(var l=0;l<a.length;l++){var s=a[l],u=s.find(),v=r.clipPos(u.from),M=r.clipPos(u.to);if(St(v,M)){var P=Es(r,v,M,s.primary,s.primary.type);s.markers.push(P),P.parent=s}}}function jo(r){for(var a=function(s){var u=r[s],v=[u.primary.doc];Sa(u.primary.doc,function(Z){return v.push(Z)});for(var M=0;M<u.markers.length;M++){var P=u.markers[M];ve(v,P.doc)==-1&&(P.parent=null,u.markers.splice(M--,1))}},l=0;l<r.length;l++)a(l)}var au=0,Ma=function(r,a,l,s,u){if(!(this instanceof Ma))return new Ma(r,a,l,s,u);l==null&&(l=0),La.call(this,[new _i([new Bi("",null)])]),this.first=l,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=l;var v=Ge(l,0);this.sel=Hr(v),this.history=new fr(null),this.id=++au,this.modeOption=a,this.lineSep=s,this.direction=u=="rtl"?"rtl":"ltr",this.extend=!1,typeof r=="string"&&(r=this.splitLines(r)),Pi(this,{from:v,to:v,text:r}),wi(this,Hr(v),Be)};Ma.prototype=p(La.prototype,{constructor:Ma,iter:function(r,a,l){l?this.iterN(r-this.first,a-r,l):this.iterN(this.first,this.first+this.size,r)},insert:function(r,a){for(var l=0,s=0;s<a.length;++s)l+=a[s].height;this.insertInner(r-this.first,a,l)},remove:function(r,a){this.removeInner(r-this.first,a)},getValue:function(r){var a=ft(this,this.first,this.first+this.size);return r===!1?a:a.join(r||this.lineSeparator())},setValue:nt(function(r){var a=Ge(this.first,0),l=this.first+this.size-1;Vi(this,{from:a,to:Ge(l,Ee(this,l).text.length),text:this.splitLines(r),origin:"setValue",full:!0},!0),this.cm&&fl(this.cm,0,0),wi(this,Hr(a),Be)}),replaceRange:function(r,a,l,s){a=Nt(this,a),l=l?Nt(this,l):a,Hs(this,r,a,l,s)},getRange:function(r,a,l){var s=Ze(this,Nt(this,r),Nt(this,a));return l===!1?s:s.join(l||this.lineSeparator())},getLine:function(r){var a=this.getLineHandle(r);return a&&a.text},getLineHandle:function(r){if(Pt(this,r))return Ee(this,r)},getLineNumber:function(r){return ut(r)},getLineHandleVisualStart:function(r){return typeof r=="number"&&(r=Ee(this,r)),mr(r)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(r){return Nt(this,r)},getCursor:function(r){var a=this.sel.primary(),l;return r==null||r=="head"?l=a.head:r=="anchor"?l=a.anchor:r=="end"||r=="to"||r===!1?l=a.to():l=a.from(),l},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:nt(function(r,a,l){va(this,Nt(this,typeof r=="number"?Ge(r,a||0):r),null,l)}),setSelection:nt(function(r,a,l){va(this,Nt(this,r),Nt(this,a||r),l)}),extendSelection:nt(function(r,a,l){oi(this,Nt(this,r),a&&Nt(this,a),l)}),extendSelections:nt(function(r,a){cn(this,ot(this,r),a)}),extendSelectionsBy:nt(function(r,a){var l=pt(this.sel.ranges,r);cn(this,ot(this,l),a)}),setSelections:nt(function(r,a,l){if(r.length){for(var s=[],u=0;u<r.length;u++)s[u]=new Tn(Nt(this,r[u].anchor),Nt(this,r[u].head));a==null&&(a=Math.min(r.length-1,this.sel.primIndex)),wi(this,Nr(this.cm,s,a),l)}}),addSelection:nt(function(r,a,l){var s=this.sel.ranges.slice(0);s.push(new Tn(Nt(this,r),Nt(this,a||r))),wi(this,Nr(this.cm,s,s.length-1),l)}),getSelection:function(r){for(var a=this.sel.ranges,l,s=0;s<a.length;s++){var u=Ze(this,a[s].from(),a[s].to());l=l?l.concat(u):u}return r===!1?l:l.join(r||this.lineSeparator())},getSelections:function(r){for(var a=[],l=this.sel.ranges,s=0;s<l.length;s++){var u=Ze(this,l[s].from(),l[s].to());r!==!1&&(u=u.join(r||this.lineSeparator())),a[s]=u}return a},replaceSelection:function(r,a,l){for(var s=[],u=0;u<this.sel.ranges.length;u++)s[u]=r;this.replaceSelections(s,a,l||"+input")},replaceSelections:nt(function(r,a,l){for(var s=[],u=this.sel,v=0;v<u.ranges.length;v++){var M=u.ranges[v];s[v]={from:M.from(),to:M.to(),text:this.splitLines(r[v]),origin:l}}for(var P=a&&a!="end"&&Fr(this,s,a),Z=s.length-1;Z>=0;Z--)Vi(this,s[Z]);P?Or(this,P):this.cm&&Ml(this.cm)}),undo:nt(function(){fo(this,"undo")}),redo:nt(function(){fo(this,"redo")}),undoSelection:nt(function(){fo(this,"undo",!0)}),redoSelection:nt(function(){fo(this,"redo",!0)}),setExtending:function(r){this.extend=r},getExtending:function(){return this.extend},historySize:function(){for(var r=this.history,a=0,l=0,s=0;s<r.done.length;s++)r.done[s].ranges||++a;for(var u=0;u<r.undone.length;u++)r.undone[u].ranges||++l;return{undo:a,redo:l}},clearHistory:function(){var r=this;this.history=new fr(this.history.maxGeneration),Sa(this,function(a){return a.history=r.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(r){return r&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(r){return this.history.generation==(r||this.cleanGeneration)},getHistory:function(){return{done:Aa(this.history.done),undone:Aa(this.history.undone)}},setHistory:function(r){var a=this.history=new fr(this.history.maxGeneration);a.done=Aa(r.done.slice(0),null,!0),a.undone=Aa(r.undone.slice(0),null,!0)},setGutterMarker:nt(function(r,a,l){return _a(this,r,"gutter",function(s){var u=s.gutterMarkers||(s.gutterMarkers={});return u[a]=l,!l&&d(u)&&(s.gutterMarkers=null),!0})}),clearGutter:nt(function(r){var a=this;this.iter(function(l){l.gutterMarkers&&l.gutterMarkers[r]&&_a(a,l,"gutter",function(){return l.gutterMarkers[r]=null,d(l.gutterMarkers)&&(l.gutterMarkers=null),!0})})}),lineInfo:function(r){var a;if(typeof r=="number"){if(!Pt(this,r)||(a=r,r=Ee(this,r),!r))return null}else if(a=ut(r),a==null)return null;return{line:a,handle:r,text:r.text,gutterMarkers:r.gutterMarkers,textClass:r.textClass,bgClass:r.bgClass,wrapClass:r.wrapClass,widgets:r.widgets}},addLineClass:nt(function(r,a,l){return _a(this,r,a=="gutter"?"gutter":"class",function(s){var u=a=="text"?"textClass":a=="background"?"bgClass":a=="gutter"?"gutterClass":"wrapClass";if(!s[u])s[u]=l;else{if(_(l).test(s[u]))return!1;s[u]+=" "+l}return!0})}),removeLineClass:nt(function(r,a,l){return _a(this,r,a=="gutter"?"gutter":"class",function(s){var u=a=="text"?"textClass":a=="background"?"bgClass":a=="gutter"?"gutterClass":"wrapClass",v=s[u];if(v)if(l==null)s[u]=null;else{var M=v.match(_(l));if(!M)return!1;var P=M.index+M[0].length;s[u]=v.slice(0,M.index)+(!M.index||P==v.length?"":" ")+v.slice(P)||null}else return!1;return!0})}),addLineWidget:nt(function(r,a,l){return ks(this,r,a,l)}),removeLineWidget:function(r){r.clear()},markText:function(r,a,l){return Es(this,Nt(this,r),Nt(this,a),l,l&&l.type||"range")},setBookmark:function(r,a){var l={replacedWith:a&&(a.nodeType==null?a.widget:a),insertLeft:a&&a.insertLeft,clearWhenEmpty:!1,shared:a&&a.shared,handleMouseEvents:a&&a.handleMouseEvents};return r=Nt(this,r),Es(this,r,r,l,"bookmark")},findMarksAt:function(r){r=Nt(this,r);var a=[],l=Ee(this,r.line).markedSpans;if(l)for(var s=0;s<l.length;++s){var u=l[s];(u.from==null||u.from<=r.ch)&&(u.to==null||u.to>=r.ch)&&a.push(u.marker.parent||u.marker)}return a},findMarks:function(r,a,l){r=Nt(this,r),a=Nt(this,a);var s=[],u=r.line;return this.iter(r.line,a.line+1,function(v){var M=v.markedSpans;if(M)for(var P=0;P<M.length;P++){var Z=M[P];!(Z.to!=null&&u==r.line&&r.ch>=Z.to||Z.from==null&&u!=r.line||Z.from!=null&&u==a.line&&Z.from>=a.ch)&&(!l||l(Z.marker))&&s.push(Z.marker.parent||Z.marker)}++u}),s},getAllMarks:function(){var r=[];return this.iter(function(a){var l=a.markedSpans;if(l)for(var s=0;s<l.length;++s)l[s].from!=null&&r.push(l[s].marker)}),r},posFromIndex:function(r){var a,l=this.first,s=this.lineSeparator().length;return this.iter(function(u){var v=u.text.length+s;if(v>r)return a=r,!0;r-=v,++l}),Nt(this,Ge(l,a))},indexFromPos:function(r){r=Nt(this,r);var a=r.ch;if(r.line<this.first||r.ch<0)return 0;var l=this.lineSeparator().length;return this.iter(this.first,r.line,function(s){a+=s.text.length+l}),a},copy:function(r){var a=new Ma(ft(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return a.scrollTop=this.scrollTop,a.scrollLeft=this.scrollLeft,a.sel=this.sel,a.extend=!1,r&&(a.history.undoDepth=this.history.undoDepth,a.setHistory(this.getHistory())),a},linkedDoc:function(r){r||(r={});var a=this.first,l=this.first+this.size;r.from!=null&&r.from>a&&(a=r.from),r.to!=null&&r.to<l&&(l=r.to);var s=new Ma(ft(this,a,l),r.mode||this.modeOption,a,this.lineSep,this.direction);return r.sharedHist&&(s.history=this.history),(this.linked||(this.linked=[])).push({doc:s,sharedHist:r.sharedHist}),s.linked=[{doc:this,isParent:!0,sharedHist:r.sharedHist}],hl(s,gs(this)),s},unlinkDoc:function(r){if(r instanceof jr&&(r=r.doc),this.linked)for(var a=0;a<this.linked.length;++a){var l=this.linked[a];if(l.doc==r){this.linked.splice(a,1),r.unlinkDoc(this),jo(gs(this));break}}if(r.history==this.history){var s=[r.id];Sa(r,function(u){return s.push(u.id)},!0),r.history=new fr(null),r.history.done=Aa(this.history.done,s),r.history.undone=Aa(this.history.undone,s)}},iterLinkedDocs:function(r){Sa(this,r)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(r){return this.lineSep?r.split(this.lineSep):xn(r)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:nt(function(r){r!="rtl"&&(r="ltr"),r!=this.direction&&(this.direction=r,this.iter(function(a){return a.order=null}),this.cm&&wr(this.cm))})}),Ma.prototype.eachLine=Ma.prototype.iter;var $c=0;function ou(r){var a=this;if(El(a),!(re(a,r)||Po(a.display,r))){ct(r),R&&($c=+new Date);var l=Xo(a,r,!0),s=r.dataTransfer.files;if(!(!l||a.isReadOnly()))if(s&&s.length&&window.FileReader&&window.File)for(var u=s.length,v=Array(u),M=0,P=function(){++M==u&&it(a,function(){l=Nt(a.doc,l);var Ct={from:l,to:l,text:a.doc.splitLines(v.filter(function(jt){return jt!=null}).join(a.doc.lineSeparator())),origin:"paste"};Vi(a.doc,Ct),Or(a.doc,Hr(Nt(a.doc,l),Nt(a.doc,fi(Ct))))})()},Z=function(Ct,jt){if(a.options.allowDropFileTypes&&ve(a.options.allowDropFileTypes,Ct.type)==-1){P();return}var ln=new FileReader;ln.onerror=function(){return P()},ln.onload=function(){var Dn=ln.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Dn)){P();return}v[jt]=Dn,P()},ln.readAsText(Ct)},te=0;te<s.length;te++)Z(s[te],te);else{if(a.state.draggingText&&a.doc.sel.contains(l)>-1){a.state.draggingText(r),setTimeout(function(){return a.display.input.focus()},20);return}try{var He=r.dataTransfer.getData("Text");if(He){var et;if(a.state.draggingText&&!a.state.draggingText.copy&&(et=a.listSelections()),Ba(a.doc,Hr(l,l)),et)for(var Et=0;Et<et.length;++Et)Hs(a.doc,"",et[Et].anchor,et[Et].head,"drag");a.replaceSelection(He,"around","paste"),a.display.input.focus()}}catch(Ct){}}}}function uc(r,a){if(R&&(!r.state.draggingText||+new Date-$c<100)){Bt(a);return}if(!(re(r,a)||Po(r.display,a))&&(a.dataTransfer.setData("Text",r.getSelection()),a.dataTransfer.effectAllowed="copyMove",a.dataTransfer.setDragImage&&!Ie)){var l=se("img",null,null,"position: fixed; left: 0; top: 0;");l.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",V&&(l.width=l.height=1,r.display.wrapper.appendChild(l),l._top=l.offsetTop),a.dataTransfer.setDragImage(l,0,0),V&&l.parentNode.removeChild(l)}}function dc(r,a){var l=Xo(r,a);if(l){var s=document.createDocumentFragment();kc(r,l,s),r.display.dragCursor||(r.display.dragCursor=se("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),r.display.lineSpace.insertBefore(r.display.dragCursor,r.display.cursorDiv)),Se(r.display.dragCursor,s)}}function El(r){r.display.dragCursor&&(r.display.lineSpace.removeChild(r.display.dragCursor),r.display.dragCursor=null)}function pl(r){if(document.getElementsByClassName){for(var a=document.getElementsByClassName("CodeMirror"),l=[],s=0;s<a.length;s++){var u=a[s].CodeMirror;u&&l.push(u)}l.length&&l[0].operation(function(){for(var v=0;v<l.length;v++)r(l[v])})}}var vn=!1;function Pc(){vn||(fc(),vn=!0)}function fc(){var r;Ae(window,"resize",function(){r==null&&(r=setTimeout(function(){r=null,pl(hc)},100))}),Ae(window,"blur",function(){return pl(ul)})}function hc(r){var a=r.display;a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.scrollbarsClipped=!1,r.setSize()}for(var ss={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"},tl=0;tl<10;tl++)ss[tl+48]=ss[tl+96]=String(tl);for(var _l=65;_l<=90;_l++)ss[_l]=String.fromCharCode(_l);for(var ml=1;ml<=12;ml++)ss[ml+111]=ss[ml+63235]="F"+ml;var zi={};zi.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"},zi.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"},zi.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"},zi.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"]},zi.default=_e?zi.macDefault:zi.pcDefault;function su(r){var a=r.split(/-(?!$)/);r=a[a.length-1];for(var l,s,u,v,M=0;M<a.length-1;M++){var P=a[M];if(/^(cmd|meta|m)$/i.test(P))v=!0;else if(/^a(lt)?$/i.test(P))l=!0;else if(/^(c|ctrl|control)$/i.test(P))s=!0;else if(/^s(hift)?$/i.test(P))u=!0;else throw new Error("Unrecognized modifier name: "+P)}return l&&(r="Alt-"+r),s&&(r="Ctrl-"+r),v&&(r="Cmd-"+r),u&&(r="Shift-"+r),r}function pc(r){var a={};for(var l in r)if(r.hasOwnProperty(l)){var s=r[l];if(/^(name|fallthrough|(de|at)tach)$/.test(l))continue;if(s=="..."){delete r[l];continue}for(var u=pt(l.split(" "),su),v=0;v<u.length;v++){var M=void 0,P=void 0;v==u.length-1?(P=u.join(" "),M=s):(P=u.slice(0,v+1).join(" "),M="...");var Z=a[P];if(!Z)a[P]=M;else if(Z!=M)throw new Error("Inconsistent bindings for "+P)}delete r[l]}for(var te in a)r[te]=a[te];return r}function _s(r,a,l,s){a=bo(a);var u=a.call?a.call(r,s):a[r];if(u===!1)return"nothing";if(u==="...")return"multi";if(u!=null&&l(u))return"handled";if(a.fallthrough){if(Object.prototype.toString.call(a.fallthrough)!="[object Array]")return _s(r,a.fallthrough,l,s);for(var v=0;v<a.fallthrough.length;v++){var M=_s(r,a.fallthrough[v],l,s);if(M)return M}}}function Gl(r){var a=typeof r=="string"?r:ss[r.keyCode];return a=="Ctrl"||a=="Alt"||a=="Shift"||a=="Mod"}function Zs(r,a,l){var s=r;return a.altKey&&s!="Alt"&&(r="Alt-"+r),(pe?a.metaKey:a.ctrlKey)&&s!="Ctrl"&&(r="Ctrl-"+r),(pe?a.ctrlKey:a.metaKey)&&s!="Mod"&&(r="Cmd-"+r),!l&&a.shiftKey&&s!="Shift"&&(r="Shift-"+r),r}function Ws(r,a){if(V&&r.keyCode==34&&r.char)return!1;var l=ss[r.keyCode];return l==null||r.altGraphKey?!1:(r.keyCode==3&&r.code&&(l=r.code),Zs(l,r,a))}function bo(r){return typeof r=="string"?zi[r]:r}function Vo(r,a){for(var l=r.doc.sel.ranges,s=[],u=0;u<l.length;u++){for(var v=a(l[u]);s.length&&St(v.from,wt(s).to)<=0;){var M=s.pop();if(St(M.from,v.from)<0){v.from=M.from;break}}s.push(v)}ze(r,function(){for(var P=s.length-1;P>=0;P--)Hs(r.doc,"",s[P].from,s[P].to,"+delete");Ml(r)})}function no(r,a,l){var s=O(r.text,a+l,l);return s<0||s>r.text.length?null:s}function Ls(r,a,l){var s=no(r,a.ch,l);return s==null?null:new Ge(a.line,s,l<0?"after":"before")}function ui(r,a,l,s,u){if(r){a.doc.direction=="rtl"&&(u=-u);var v=Ye(l,a.doc.direction);if(v){var M=u<0?wt(v):v[0],P=u<0==(M.level==1),Z=P?"after":"before",te;if(M.level>0||a.doc.direction=="rtl"){var He=qa(a,l);te=u<0?l.text.length-1:0;var et=ki(a,He,te).top;te=I(function(Et){return ki(a,He,Et).top==et},u<0==(M.level==1)?M.from:M.to-1,te),Z=="before"&&(te=no(l,te,1))}else te=u<0?M.to:M.from;return new Ge(s,te,Z)}}return new Ge(s,u<0?l.text.length:0,u<0?"before":"after")}function Si(r,a,l,s){var u=Ye(a,r.doc.direction);if(!u)return Ls(a,l,s);l.ch>=a.text.length?(l.ch=a.text.length,l.sticky="before"):l.ch<=0&&(l.ch=0,l.sticky="after");var v=U(u,l.ch,l.sticky),M=u[v];if(r.doc.direction=="ltr"&&M.level%2==0&&(s>0?M.to>l.ch:M.from<l.ch))return Ls(a,l,s);var P=function(Jn,or){return no(a,Jn instanceof Ge?Jn.ch:Jn,or)},Z,te=function(Jn){return r.options.lineWrapping?(Z=Z||qa(r,a),Js(r,a,Z,Jn)):{begin:0,end:a.text.length}},He=te(l.sticky=="before"?P(l,-1):l.ch);if(r.doc.direction=="rtl"||M.level==1){var et=M.level==1==s<0,Et=P(l,et?1:-1);if(Et!=null&&(et?Et<=M.to&&Et<=He.end:Et>=M.from&&Et>=He.begin)){var Ct=et?"before":"after";return new Ge(l.line,Et,Ct)}}var jt=function(Jn,or,Hn){for(var ur=function(ia,So){return So?new Ge(l.line,P(ia,1),"before"):new Ge(l.line,ia,"after")};Jn>=0&&Jn<u.length;Jn+=or){var Dr=u[Jn],Ar=or>0==(Dr.level!=1),di=Ar?Hn.begin:P(Hn.end,-1);if(Dr.from<=di&&di<Dr.to||(di=Ar?Dr.from:P(Dr.to,-1),Hn.begin<=di&&di<Hn.end))return ur(di,Ar)}},ln=jt(v+s,s,He);if(ln)return ln;var Dn=s>0?He.end:P(He.begin,-1);return Dn!=null&&!(s>0&&Dn==a.text.length)&&(ln=jt(s>0?0:u.length-1,s,te(Dn)),ln)?ln:null}var xo={selectAll:yo,singleSelection:function(r){return r.setSelection(r.getCursor("anchor"),r.getCursor("head"),Be)},killLine:function(r){return Vo(r,function(a){if(a.empty()){var l=Ee(r.doc,a.head.line).text.length;return a.head.ch==l&&a.head.line<r.lastLine()?{from:a.head,to:Ge(a.head.line+1,0)}:{from:a.head,to:Ge(a.head.line,l)}}else return{from:a.from(),to:a.to()}})},deleteLine:function(r){return Vo(r,function(a){return{from:Ge(a.from().line,0),to:Nt(r.doc,Ge(a.to().line+1,0))}})},delLineLeft:function(r){return Vo(r,function(a){return{from:Ge(a.from().line,0),to:a.from()}})},delWrappedLineLeft:function(r){return Vo(r,function(a){var l=r.charCoords(a.head,"div").top+5,s=r.coordsChar({left:0,top:l},"div");return{from:s,to:a.from()}})},delWrappedLineRight:function(r){return Vo(r,function(a){var l=r.charCoords(a.head,"div").top+5,s=r.coordsChar({left:r.display.lineDiv.offsetWidth+100,top:l},"div");return{from:a.from(),to:s}})},undo:function(r){return r.undo()},redo:function(r){return r.redo()},undoSelection:function(r){return r.undoSelection()},redoSelection:function(r){return r.redoSelection()},goDocStart:function(r){return r.extendSelection(Ge(r.firstLine(),0))},goDocEnd:function(r){return r.extendSelection(Ge(r.lastLine()))},goLineStart:function(r){return r.extendSelectionsBy(function(a){return Is(r,a.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(r){return r.extendSelectionsBy(function(a){return Oc(r,a.head)},{origin:"+move",bias:1})},goLineEnd:function(r){return r.extendSelectionsBy(function(a){return Ts(r,a.head.line)},{origin:"+move",bias:-1})},goLineRight:function(r){return r.extendSelectionsBy(function(a){var l=r.cursorCoords(a.head,"div").top+5;return r.coordsChar({left:r.display.lineDiv.offsetWidth+100,top:l},"div")},lt)},goLineLeft:function(r){return r.extendSelectionsBy(function(a){var l=r.cursorCoords(a.head,"div").top+5;return r.coordsChar({left:0,top:l},"div")},lt)},goLineLeftSmart:function(r){return r.extendSelectionsBy(function(a){var l=r.cursorCoords(a.head,"div").top+5,s=r.coordsChar({left:0,top:l},"div");return s.ch<r.getLine(s.line).search(/\S/)?Oc(r,a.head):s},lt)},goLineUp:function(r){return r.moveV(-1,"line")},goLineDown:function(r){return r.moveV(1,"line")},goPageUp:function(r){return r.moveV(-1,"page")},goPageDown:function(r){return r.moveV(1,"page")},goCharLeft:function(r){return r.moveH(-1,"char")},goCharRight:function(r){return r.moveH(1,"char")},goColumnLeft:function(r){return r.moveH(-1,"column")},goColumnRight:function(r){return r.moveH(1,"column")},goWordLeft:function(r){return r.moveH(-1,"word")},goGroupRight:function(r){return r.moveH(1,"group")},goGroupLeft:function(r){return r.moveH(-1,"group")},goWordRight:function(r){return r.moveH(1,"word")},delCharBefore:function(r){return r.deleteH(-1,"codepoint")},delCharAfter:function(r){return r.deleteH(1,"char")},delWordBefore:function(r){return r.deleteH(-1,"word")},delWordAfter:function(r){return r.deleteH(1,"word")},delGroupBefore:function(r){return r.deleteH(-1,"group")},delGroupAfter:function(r){return r.deleteH(1,"group")},indentAuto:function(r){return r.indentSelection("smart")},indentMore:function(r){return r.indentSelection("add")},indentLess:function(r){return r.indentSelection("subtract")},insertTab:function(r){return r.replaceSelection(" ")},insertSoftTab:function(r){for(var a=[],l=r.listSelections(),s=r.options.tabSize,u=0;u<l.length;u++){var v=l[u].from(),M=X(r.getLine(v.line),v.ch,s);a.push(Tt(s-M%s))}r.replaceSelections(a)},defaultTab:function(r){r.somethingSelected()?r.indentSelection("add"):r.execCommand("insertTab")},transposeChars:function(r){return ze(r,function(){for(var a=r.listSelections(),l=[],s=0;s<a.length;s++)if(a[s].empty()){var u=a[s].head,v=Ee(r.doc,u.line).text;if(v){if(u.ch==v.length&&(u=new Ge(u.line,u.ch-1)),u.ch>0)u=new Ge(u.line,u.ch+1),r.replaceRange(v.charAt(u.ch-1)+v.charAt(u.ch-2),Ge(u.line,u.ch-2),u,"+transpose");else if(u.line>r.doc.first){var M=Ee(r.doc,u.line-1).text;M&&(u=new Ge(u.line,1),r.replaceRange(v.charAt(0)+r.doc.lineSeparator()+M.charAt(M.length-1),Ge(u.line-1,M.length-1),u,"+transpose"))}}l.push(new Tn(u,u))}r.setSelections(l)})},newlineAndIndent:function(r){return ze(r,function(){for(var a=r.listSelections(),l=a.length-1;l>=0;l--)r.replaceRange(r.doc.lineSeparator(),a[l].anchor,a[l].head,"+input");a=r.listSelections();for(var s=0;s<a.length;s++)r.indentLine(a[s].from().line,null,!0);Ml(r)})},openLine:function(r){return r.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(r){return r.toggleOverwrite()}};function Is(r,a){var l=Ee(r.doc,a),s=mr(l);return s!=l&&(a=ut(s)),ui(!0,r,s,a,1)}function Ts(r,a){var l=Ee(r.doc,a),s=Jr(l);return s!=l&&(a=ut(s)),ui(!0,r,l,a,-1)}function Oc(r,a){var l=Is(r,a.line),s=Ee(r.doc,l.line),u=Ye(s,r.doc.direction);if(!u||u[0].level==0){var v=Math.max(l.ch,s.text.search(/\S/)),M=a.line==l.line&&a.ch<=v&&a.ch;return Ge(l.line,M?0:v,l.sticky)}return l}function ka(r,a,l){if(typeof a=="string"&&(a=xo[a],!a))return!1;r.display.input.ensurePolled();var s=r.display.shift,u=!1;try{r.isReadOnly()&&(r.state.suppressEdits=!0),l&&(r.display.shift=!1),u=a(r)!=je}finally{r.display.shift=s,r.state.suppressEdits=!1}return u}function ls(r,a,l){for(var s=0;s<r.state.keyMaps.length;s++){var u=_s(a,r.state.keyMaps[s],l,r);if(u)return u}return r.options.extraKeys&&_s(a,r.options.extraKeys,l,r)||_s(a,r.options.keyMap,l,r)}var Ac=new w;function nl(r,a,l,s){var u=r.state.keySeq;if(u){if(Gl(a))return"handled";if(/\'$/.test(a)?r.state.keySeq=null:Ac.set(50,function(){r.state.keySeq==u&&(r.state.keySeq=null,r.display.input.reset())}),lu(r,u+" "+a,l,s))return!0}return lu(r,a,l,s)}function lu(r,a,l,s){var u=ls(r,a,s);return u=="multi"&&(r.state.keySeq=a),u=="handled"&&sr(r,"keyHandled",r,a,l),(u=="handled"||u=="multi")&&(ct(l),ic(r)),!!u}function xi(r,a){var l=Ws(a,!0);return l?a.shiftKey&&!r.state.keySeq?nl(r,"Shift-"+l,a,function(s){return ka(r,s,!0)})||nl(r,l,a,function(s){if(typeof s=="string"?/^go[A-Z]/.test(s):s.motion)return ka(r,s)}):nl(r,l,a,function(s){return ka(r,s)}):!1}function mc(r,a,l){return nl(r,"'"+l+"'",a,function(s){return ka(r,s,!0)})}var gl=null;function Bc(r){var a=this;if(!(r.target&&r.target!=a.display.input.getField())&&(a.curOp.focus=z(),!re(a,r))){R&&N<11&&r.keyCode==27&&(r.returnValue=!1);var l=r.keyCode;a.display.shift=l==16||r.shiftKey;var s=xi(a,r);V&&(gl=s?l:null,!s&&l==88&&!Mn&&(_e?r.metaKey:r.ctrlKey)&&a.replaceSelection("",null,"cut")),K&&!_e&&!s&&l==46&&r.shiftKey&&!r.ctrlKey&&document.execCommand&&document.execCommand("cut"),l==18&&!/\bCodeMirror-crosshair\b/.test(a.display.lineDiv.className)&&Zt(a)}}function Zt(r){var a=r.display.lineDiv;we(a,"CodeMirror-crosshair");function l(s){(s.keyCode==18||!s.altKey)&&(ie(a,"CodeMirror-crosshair"),oe(document,"keyup",l),oe(document,"mouseover",l))}Ae(document,"keyup",l),Ae(document,"mouseover",l)}function yd(r){r.keyCode==16&&(this.doc.sel.shift=!1),re(this,r)}function bd(r){var a=this;if(!(r.target&&r.target!=a.display.input.getField())&&!(Po(a.display,r)||re(a,r)||r.ctrlKey&&!r.altKey||_e&&r.metaKey)){var l=r.keyCode,s=r.charCode;if(V&&l==gl){gl=null,ct(r);return}if(!(V&&(!r.which||r.which<10)&&xi(a,r))){var u=String.fromCharCode(s==null?l:s);u!="\b"&&(mc(a,r,u)||a.display.input.onKeyPress(r))}}}var Bu=400,Nu=function(r,a,l){this.time=r,this.pos=a,this.button=l};Nu.prototype.compare=function(r,a,l){return this.time+Bu>r&&St(a,this.pos)==0&&l==this.button};var vl,Nc;function uf(r,a){var l=+new Date;return Nc&&Nc.compare(l,r,a)?(vl=Nc=null,"triple"):vl&&vl.compare(l,r,a)?(Nc=new Nu(l,r,a),vl=null,"double"):(vl=new Nu(l,r,a),Nc=null,"single")}function ko(r){var a=this,l=a.display;if(!(re(a,r)||l.activeTouch&&l.input.supportsTouch())){if(l.input.ensurePolled(),l.shift=r.shiftKey,Po(l,r)){x||(l.scroller.draggable=!1,setTimeout(function(){return l.scroller.draggable=!0},100));return}if(!No(a,r)){var s=Xo(a,r),u=_t(r),v=s?uf(s,u):"single";window.focus(),u==1&&a.state.selectingText&&a.state.selectingText(r),!(s&&Ll(a,u,s,v,r))&&(u==1?s?uu(a,s,v,r):Ft(r)==l.scroller&&ct(r):u==2?(s&&oi(a.doc,s),setTimeout(function(){return l.input.focus()},20)):u==3&&(q?a.display.input.onContextMenu(r):Ec(a)))}}}function Ll(r,a,l,s,u){var v="Click";return s=="double"?v="Double"+v:s=="triple"&&(v="Triple"+v),v=(a==1?"Left":a==2?"Middle":"Right")+v,nl(r,Zs(v,u),u,function(M){if(typeof M=="string"&&(M=xo[M]),!M)return!1;var P=!1;try{r.isReadOnly()&&(r.state.suppressEdits=!0),P=M(r,l)!=je}finally{r.state.suppressEdits=!1}return P})}function cu(r,a,l){var s=r.getOption("configureMouse"),u=s?s(r,a,l):{};if(u.unit==null){var v=Pe?l.shiftKey&&l.metaKey:l.altKey;u.unit=v?"rectangle":a=="single"?"char":a=="double"?"word":"line"}return(u.extend==null||r.doc.extend)&&(u.extend=r.doc.extend||l.shiftKey),u.addNew==null&&(u.addNew=_e?l.metaKey:l.ctrlKey),u.moveOnDrag==null&&(u.moveOnDrag=!(_e?l.altKey:l.ctrlKey)),u}function uu(r,a,l,s){R?setTimeout(Fe(Vl,r),0):r.curOp.focus=z();var u=cu(r,l,s),v=r.doc.sel,M;r.options.dragDrop&&Yt&&!r.isReadOnly()&&l=="single"&&(M=v.contains(a))>-1&&(St((M=v.ranges[M]).from(),a)<0||a.xRel>0)&&(St(M.to(),a)>0||a.xRel<0)?df(r,s,a,u):Ru(r,s,a,u)}function df(r,a,l,s){var u=r.display,v=!1,M=it(r,function(te){x&&(u.scroller.draggable=!1),r.state.draggingText=!1,oe(u.wrapper.ownerDocument,"mouseup",M),oe(u.wrapper.ownerDocument,"mousemove",P),oe(u.scroller,"dragstart",Z),oe(u.scroller,"drop",M),v||(ct(te),s.addNew||oi(r.doc,l,null,null,s.extend),x&&!Ie||R&&N==9?setTimeout(function(){u.wrapper.ownerDocument.body.focus({preventScroll:!0}),u.input.focus()},20):u.input.focus())}),P=function(te){v=v||Math.abs(a.clientX-te.clientX)+Math.abs(a.clientY-te.clientY)>=10},Z=function(){return v=!0};x&&(u.scroller.draggable=!0),r.state.draggingText=M,M.copy=!s.moveOnDrag,u.scroller.dragDrop&&u.scroller.dragDrop(),Ae(u.wrapper.ownerDocument,"mouseup",M),Ae(u.wrapper.ownerDocument,"mousemove",P),Ae(u.scroller,"dragstart",Z),Ae(u.scroller,"drop",M),Ec(r),setTimeout(function(){return u.input.focus()},20)}function xd(r,a,l){if(l=="char")return new Tn(a,a);if(l=="word")return r.findWordAt(a);if(l=="line")return new Tn(Ge(a.line,0),Nt(r.doc,Ge(a.line+1,0)));var s=l(r,a);return new Tn(s.from,s.to)}function Ru(r,a,l,s){var u=r.display,v=r.doc;ct(a);var M,P,Z=v.sel,te=Z.ranges;if(s.addNew&&!s.extend?(P=v.sel.contains(l),P>-1?M=te[P]:M=new Tn(l,l)):(M=v.sel.primary(),P=v.sel.primIndex),s.unit=="rectangle")s.addNew||(M=new Tn(l,l)),l=Xo(r,a,!0,!0),P=-1;else{var He=xd(r,l,s.unit);s.extend?M=ws(M,He.anchor,He.head,s.extend):M=He}s.addNew?P==-1?(P=te.length,wi(v,Nr(r,te.concat([M]),P),{scroll:!1,origin:"*mouse"})):te.length>1&&te[P].empty()&&s.unit=="char"&&!s.extend?(wi(v,Nr(r,te.slice(0,P).concat(te.slice(P+1)),0),{scroll:!1,origin:"*mouse"}),Z=v.sel):gi(v,P,M,Oe):(P=0,wi(v,new kr([M],0),Oe),Z=v.sel);var et=l;function Et(Hn){if(St(et,Hn)!=0)if(et=Hn,s.unit=="rectangle"){for(var ur=[],Dr=r.options.tabSize,Ar=X(Ee(v,l.line).text,l.ch,Dr),di=X(Ee(v,Hn.line).text,Hn.ch,Dr),ia=Math.min(Ar,di),So=Math.max(Ar,di),Ia=Math.min(l.line,Hn.line),Jo=Math.min(r.lastLine(),Math.max(l.line,Hn.line));Ia<=Jo;Ia++){var Qo=Ee(v,Ia).text,ro=$t(Qo,ia,Dr);ia==So?ur.push(new Tn(Ge(Ia,ro),Ge(Ia,ro))):Qo.length>ro&&ur.push(new Tn(Ge(Ia,ro),Ge(Ia,$t(Qo,So,Dr))))}ur.length||ur.push(new Tn(l,l)),wi(v,Nr(r,Z.ranges.slice(0,P).concat(ur),P),{origin:"*mouse",scroll:!1}),r.scrollIntoView(Hn)}else{var qo=M,Ur=xd(r,Hn,s.unit),Na=qo.anchor,Ta;St(Ur.anchor,Na)>0?(Ta=Ur.head,Na=Ut(qo.from(),Ur.anchor)):(Ta=Ur.anchor,Na=tn(qo.to(),Ur.head));var Ra=Z.ranges.slice(0);Ra[P]=Sd(r,new Tn(Nt(v,Na),Ta)),wi(v,Nr(r,Ra,P),Oe)}}var Ct=u.wrapper.getBoundingClientRect(),jt=0;function ln(Hn){var ur=++jt,Dr=Xo(r,Hn,!0,s.unit=="rectangle");if(Dr)if(St(Dr,et)!=0){r.curOp.focus=z(),Et(Dr);var Ar=eo(u,v);(Dr.line>=Ar.to||Dr.line<Ar.from)&&setTimeout(it(r,function(){jt==ur&&ln(Hn)}),150)}else{var di=Hn.clientY<Ct.top?-20:Hn.clientY>Ct.bottom?20:0;di&&setTimeout(it(r,function(){jt==ur&&(u.scroller.scrollTop+=di,ln(Hn))}),50)}}function Dn(Hn){r.state.selectingText=!1,jt=1/0,Hn&&(ct(Hn),u.input.focus()),oe(u.wrapper.ownerDocument,"mousemove",Jn),oe(u.wrapper.ownerDocument,"mouseup",or),v.history.lastSelOrigin=null}var Jn=it(r,function(Hn){Hn.buttons===0||!_t(Hn)?Dn(Hn):ln(Hn)}),or=it(r,Dn);r.state.selectingText=or,Ae(u.wrapper.ownerDocument,"mousemove",Jn),Ae(u.wrapper.ownerDocument,"mouseup",or)}function Sd(r,a){var l=a.anchor,s=a.head,u=Ee(r.doc,l.line);if(St(l,s)==0&&l.sticky==s.sticky)return a;var v=Ye(u);if(!v)return a;var M=U(v,l.ch,l.sticky),P=v[M];if(P.from!=l.ch&&P.to!=l.ch)return a;var Z=M+(P.from==l.ch==(P.level!=1)?0:1);if(Z==0||Z==v.length)return a;var te;if(s.line!=l.line)te=(s.line-l.line)*(r.doc.direction=="ltr"?1:-1)>0;else{var He=U(v,s.ch,s.sticky),et=He-M||(s.ch-l.ch)*(P.level==1?-1:1);He==Z-1||He==Z?te=et<0:te=et>0}var Et=v[Z+(te?-1:0)],Ct=te==(Et.level==1),jt=Ct?Et.from:Et.to,ln=Ct?"after":"before";return l.ch==jt&&l.sticky==ln?a:new Tn(new Ge(l.line,jt,ln),s)}function Rc(r,a,l,s){var u,v;if(a.touches)u=a.touches[0].clientX,v=a.touches[0].clientY;else try{u=a.clientX,v=a.clientY}catch(Et){return!1}if(u>=Math.floor(r.display.gutters.getBoundingClientRect().right))return!1;s&&ct(a);var M=r.display,P=M.lineDiv.getBoundingClientRect();if(v>P.bottom||!Ne(r,l))return yt(a);v-=P.top-M.viewOffset;for(var Z=0;Z<r.display.gutterSpecs.length;++Z){var te=M.gutters.childNodes[Z];if(te&&te.getBoundingClientRect().right>=u){var He=It(r.doc,v),et=r.display.gutterSpecs[Z];return T(r,l,r,He,et.className,a),yt(a)}}}function No(r,a){return Rc(r,a,"gutterClick",!0)}function Il(r,a){Po(r.display,a)||Cd(r,a)||re(r,a,"contextmenu")||q||r.display.input.onContextMenu(a)}function Cd(r,a){return Ne(r,"gutterContextMenu")?Rc(r,a,"gutterContextMenu",!1):!1}function zu(r){r.display.wrapper.className=r.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+r.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ni(r)}var Tl={toString:function(){return"CodeMirror.Init"}},wd={},du={};function ff(r){var a=r.optionHandlers;function l(s,u,v,M){r.defaults[s]=u,v&&(a[s]=M?function(P,Z,te){te!=Tl&&v(P,Z,te)}:v)}r.defineOption=l,r.Init=Tl,l("value","",function(s,u){return s.setValue(u)},!0),l("mode",null,function(s,u){s.doc.modeOption=u,ca(s)},!0),l("indentUnit",2,ca,!0),l("indentWithTabs",!1),l("smartIndent",!0),l("tabSize",4,function(s){ei(s),Ni(s),Oa(s)},!0),l("lineSeparator",null,function(s,u){if(s.doc.lineSep=u,!!u){var v=[],M=s.doc.first;s.doc.iter(function(Z){for(var te=0;;){var He=Z.text.indexOf(u,te);if(He==-1)break;te=He+u.length,v.push(Ge(M,He))}M++});for(var P=v.length-1;P>=0;P--)Hs(s.doc,u,v[P],Ge(v[P].line,v[P].ch+u.length))}}),l("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(s,u,v){s.state.specialChars=new RegExp(u.source+(u.test(" ")?"":"| "),"g"),v!=Tl&&s.refresh()}),l("specialCharPlaceholder",Ka,function(s){return s.refresh()},!0),l("electricChars",!0),l("inputStyle",de?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),l("spellcheck",!1,function(s,u){return s.getInputField().spellcheck=u},!0),l("autocorrect",!1,function(s,u){return s.getInputField().autocorrect=u},!0),l("autocapitalize",!1,function(s,u){return s.getInputField().autocapitalize=u},!0),l("rtlMoveVisually",!Ue),l("wholeLineUpdateBefore",!0),l("theme","default",function(s){zu(s),Wn(s)},!0),l("keyMap","default",function(s,u,v){var M=bo(u),P=v!=Tl&&bo(v);P&&P.detach&&P.detach(s,M),M.attach&&M.attach(s,P||null)}),l("extraKeys",null),l("configureMouse",null),l("lineWrapping",!1,Md,!0),l("gutters",[],function(s,u){s.display.gutterSpecs=Tr(u,s.options.lineNumbers),Wn(s)},!0),l("fixedGutter",!0,function(s,u){s.display.gutters.style.left=u?Di(s.display)+"px":"0",s.refresh()},!0),l("coverGutterNextToScrollbar",!1,function(s){return qs(s)},!0),l("scrollbarStyle","native",function(s){Tc(s),qs(s),s.display.scrollbars.setScrollTop(s.doc.scrollTop),s.display.scrollbars.setScrollLeft(s.doc.scrollLeft)},!0),l("lineNumbers",!1,function(s,u){s.display.gutterSpecs=Tr(s.options.gutters,u),Wn(s)},!0),l("firstLineNumber",1,Wn,!0),l("lineNumberFormatter",function(s){return s},Wn,!0),l("showCursorWhenSelecting",!1,wl,!0),l("resetSelectionOnContextMenu",!0),l("lineWiseCopyCut",!0),l("pasteLinesPerSelection",!0),l("selectionsMayTouch",!1),l("readOnly",!1,function(s,u){u=="nocursor"&&(ul(s),s.display.input.blur()),s.display.input.readOnlyChanged(u)}),l("screenReaderLabel",null,function(s,u){u=u===""?null:u,s.display.input.screenReaderLabelChanged(u)}),l("disableInput",!1,function(s,u){u||s.display.input.reset()},!0),l("dragDrop",!0,hf),l("allowDropFileTypes",null),l("cursorBlinkRate",530),l("cursorScrollMargin",0),l("cursorHeight",1,wl,!0),l("singleCursorHeightPerLine",!0,wl,!0),l("workTime",100),l("workDelay",100),l("flattenSpans",!0,ei,!0),l("addModeClass",!1,ei,!0),l("pollInterval",100),l("undoDepth",200,function(s,u){return s.doc.history.undoDepth=u}),l("historyEventDelay",1250),l("viewportMargin",10,function(s){return s.refresh()},!0),l("maxHighlightLength",1e4,ei,!0),l("moveInputWithCursor",!0,function(s,u){u||s.display.input.resetPosition()}),l("tabindex",null,function(s,u){return s.display.input.getField().tabIndex=u||""}),l("autofocus",null),l("direction","ltr",function(s,u){return s.doc.setDirection(u)},!0),l("phrases",null)}function hf(r,a,l){var s=l&&l!=Tl;if(!a!=!s){var u=r.display.dragFunctions,v=a?Ae:oe;v(r.display.scroller,"dragstart",u.start),v(r.display.scroller,"dragenter",u.enter),v(r.display.scroller,"dragover",u.over),v(r.display.scroller,"dragleave",u.leave),v(r.display.scroller,"drop",u.drop)}}function Md(r){r.options.lineWrapping?(we(r.display.wrapper,"CodeMirror-wrap"),r.display.sizer.style.minWidth="",r.display.sizerWidth=null):(ie(r.display.wrapper,"CodeMirror-wrap"),mi(r)),ja(r),Oa(r),Ni(r),setTimeout(function(){return qs(r)},100)}function jr(r,a){var l=this;if(!(this instanceof jr))return new jr(r,a);this.options=a=a?Re(a):{},Re(wd,a,!1);var s=a.value;typeof s=="string"?s=new Ma(s,a.mode,null,a.lineSeparator,a.direction):a.mode&&(s.modeOption=a.mode),this.doc=s;var u=new jr.inputStyles[a.inputStyle](this),v=this.display=new lr(r,s,u,a);v.wrapper.CodeMirror=this,zu(this),a.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Tc(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 w,keySeq:null,specialChars:null},a.autofocus&&!de&&v.input.focus(),R&&N<11&&setTimeout(function(){return l.display.input.reset(!0)},20),pf(this),Pc(),wo(this),this.curOp.forceUpdate=!0,Er(this,s),a.autofocus&&!de||this.hasFocus()?setTimeout(function(){l.hasFocus()&&!l.state.focused&&_c(l)},20):ul(this);for(var M in du)du.hasOwnProperty(M)&&du[M](this,a[M],Tl);nr(this),a.finishInit&&a.finishInit(this);for(var P=0;P<Fu.length;++P)Fu[P](this);Ks(this),x&&a.lineWrapping&&getComputedStyle(v.lineDiv).textRendering=="optimizelegibility"&&(v.lineDiv.style.textRendering="auto")}jr.defaults=wd,jr.optionHandlers=du;function pf(r){var a=r.display;Ae(a.scroller,"mousedown",it(r,ko)),R&&N<11?Ae(a.scroller,"dblclick",it(r,function(Z){if(!re(r,Z)){var te=Xo(r,Z);if(!(!te||No(r,Z)||Po(r.display,Z))){ct(Z);var He=r.findWordAt(te);oi(r.doc,He.anchor,He.head)}}})):Ae(a.scroller,"dblclick",function(Z){return re(r,Z)||ct(Z)}),Ae(a.scroller,"contextmenu",function(Z){return Il(r,Z)}),Ae(a.input.getField(),"contextmenu",function(Z){a.scroller.contains(Z.target)||Il(r,Z)});var l,s={end:0};function u(){a.activeTouch&&(l=setTimeout(function(){return a.activeTouch=null},1e3),s=a.activeTouch,s.end=+new Date)}function v(Z){if(Z.touches.length!=1)return!1;var te=Z.touches[0];return te.radiusX<=1&&te.radiusY<=1}function M(Z,te){if(te.left==null)return!0;var He=te.left-Z.left,et=te.top-Z.top;return He*He+et*et>20*20}Ae(a.scroller,"touchstart",function(Z){if(!re(r,Z)&&!v(Z)&&!No(r,Z)){a.input.ensurePolled(),clearTimeout(l);var te=+new Date;a.activeTouch={start:te,moved:!1,prev:te-s.end<=300?s:null},Z.touches.length==1&&(a.activeTouch.left=Z.touches[0].pageX,a.activeTouch.top=Z.touches[0].pageY)}}),Ae(a.scroller,"touchmove",function(){a.activeTouch&&(a.activeTouch.moved=!0)}),Ae(a.scroller,"touchend",function(Z){var te=a.activeTouch;if(te&&!Po(a,Z)&&te.left!=null&&!te.moved&&new Date-te.start<300){var He=r.coordsChar(a.activeTouch,"page"),et;!te.prev||M(te,te.prev)?et=new Tn(He,He):!te.prev.prev||M(te,te.prev.prev)?et=r.findWordAt(He):et=new Tn(Ge(He.line,0),Nt(r.doc,Ge(He.line+1,0))),r.setSelection(et.anchor,et.head),r.focus(),ct(Z)}u()}),Ae(a.scroller,"touchcancel",u),Ae(a.scroller,"scroll",function(){a.scroller.clientHeight&&(Qs(r,a.scroller.scrollTop),zs(r,a.scroller.scrollLeft,!0),T(r,"scroll",r))}),Ae(a.scroller,"mousewheel",function(Z){return Vr(r,Z)}),Ae(a.scroller,"DOMMouseScroll",function(Z){return Vr(r,Z)}),Ae(a.wrapper,"scroll",function(){return a.wrapper.scrollTop=a.wrapper.scrollLeft=0}),a.dragFunctions={enter:function(Z){re(r,Z)||Bt(Z)},over:function(Z){re(r,Z)||(dc(r,Z),Bt(Z))},start:function(Z){return uc(r,Z)},drop:it(r,ou),leave:function(Z){re(r,Z)||El(r)}};var P=a.input.getField();Ae(P,"keyup",function(Z){return yd.call(r,Z)}),Ae(P,"keydown",it(r,Bc)),Ae(P,"keypress",it(r,bd)),Ae(P,"focus",function(Z){return _c(r,Z)}),Ae(P,"blur",function(Z){return ul(r,Z)})}var Fu=[];jr.defineInitHook=function(r){return Fu.push(r)};function js(r,a,l,s){var u=r.doc,v;l==null&&(l="add"),l=="smart"&&(u.mode.indent?v=bt(r,a).state:l="prev");var M=r.options.tabSize,P=Ee(u,a),Z=X(P.text,null,M);P.stateAfter&&(P.stateAfter=null);var te=P.text.match(/^\s*/)[0],He;if(!s&&!/\S/.test(P.text))He=0,l="not";else if(l=="smart"&&(He=u.mode.indent(v,P.text.slice(te.length),P.text),He==je||He>150)){if(!s)return;l="prev"}l=="prev"?a>u.first?He=X(Ee(u,a-1).text,null,M):He=0:l=="add"?He=Z+r.options.indentUnit:l=="subtract"?He=Z-r.options.indentUnit:typeof l=="number"&&(He=Z+l),He=Math.max(0,He);var et="",Et=0;if(r.options.indentWithTabs)for(var Ct=Math.floor(He/M);Ct;--Ct)Et+=M,et+=" ";if(Et<He&&(et+=Tt(He-Et)),et!=te)return Hs(u,et,Ge(a,0),Ge(a,te.length),"+input"),P.stateAfter=null,!0;for(var jt=0;jt<u.sel.ranges.length;jt++){var ln=u.sel.ranges[jt];if(ln.head.line==a&&ln.head.ch<te.length){var Dn=Ge(a,te.length);gi(u,jt,new Tn(Dn,Dn));break}}}var Vs=null;function Dl(r){Vs=r}function Ku(r,a,l,s,u){var v=r.doc;r.display.shift=!1,s||(s=v.sel);var M=+new Date-200,P=u=="paste"||r.state.pasteIncoming>M,Z=xn(a),te=null;if(P&&s.ranges.length>1)if(Vs&&Vs.text.join(`
|
|
|
`)==a){if(s.ranges.length%Vs.text.length==0){te=[];for(var He=0;He<Vs.text.length;He++)te.push(v.splitLines(Vs.text[He]))}}else Z.length==s.ranges.length&&r.options.pasteLinesPerSelection&&(te=pt(Z,function(Jn){return[Jn]}));for(var et=r.curOp.updateInput,Et=s.ranges.length-1;Et>=0;Et--){var Ct=s.ranges[Et],jt=Ct.from(),ln=Ct.to();Ct.empty()&&(l&&l>0?jt=Ge(jt.line,jt.ch-l):r.state.overwrite&&!P?ln=Ge(ln.line,Math.min(Ee(v,ln.line).text.length,ln.ch+wt(Z).length)):P&&Vs&&Vs.lineWise&&Vs.text.join(`
|
|
|
`)==Z.join(`
|
|
|
`)&&(jt=ln=Ge(jt.line,0)));var Dn={from:jt,to:ln,text:te?te[Et%te.length]:Z,origin:u||(P?"paste":r.state.cutIncoming>M?"cut":"+input")};Vi(r.doc,Dn),sr(r,"inputRead",r,Dn)}a&&!P&&Zu(r,a),Ml(r),r.curOp.updateInput<2&&(r.curOp.updateInput=et),r.curOp.typing=!0,r.state.pasteIncoming=r.state.cutIncoming=-1}function Hu(r,a){var l=r.clipboardData&&r.clipboardData.getData("Text");if(l)return r.preventDefault(),!a.isReadOnly()&&!a.options.disableInput&&ze(a,function(){return Ku(a,l,0,null,"paste")}),!0}function Zu(r,a){if(!(!r.options.electricChars||!r.options.smartIndent))for(var l=r.doc.sel,s=l.ranges.length-1;s>=0;s--){var u=l.ranges[s];if(!(u.head.ch>100||s&&l.ranges[s-1].head.line==u.head.line)){var v=r.getModeAt(u.head),M=!1;if(v.electricChars){for(var P=0;P<v.electricChars.length;P++)if(a.indexOf(v.electricChars.charAt(P))>-1){M=js(r,u.head.line,"smart");break}}else v.electricInput&&v.electricInput.test(Ee(r.doc,u.head.line).text.slice(0,u.head.ch))&&(M=js(r,u.head.line,"smart"));M&&sr(r,"electricInput",r,u.head.line)}}}function gc(r){for(var a=[],l=[],s=0;s<r.doc.sel.ranges.length;s++){var u=r.doc.sel.ranges[s].head.line,v={anchor:Ge(u,0),head:Ge(u+1,0)};l.push(v),a.push(r.getRange(v.anchor,v.head))}return{text:a,ranges:l}}function kd(r,a,l,s){r.setAttribute("autocorrect",l?"":"off"),r.setAttribute("autocapitalize",s?"":"off"),r.setAttribute("spellcheck",!!a)}function Wu(){var r=se("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),a=se("div",[r],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return x?r.style.width="1000px":r.setAttribute("wrap","off"),ke&&(r.style.border="1px solid black"),kd(r),a}function ju(r){var a=r.optionHandlers,l=r.helpers={};r.prototype={constructor:r,focus:function(){window.focus(),this.display.input.focus()},setOption:function(s,u){var v=this.options,M=v[s];v[s]==u&&s!="mode"||(v[s]=u,a.hasOwnProperty(s)&&it(this,a[s])(this,u,M),T(this,"optionChange",this,s))},getOption:function(s){return this.options[s]},getDoc:function(){return this.doc},addKeyMap:function(s,u){this.state.keyMaps[u?"push":"unshift"](bo(s))},removeKeyMap:function(s){for(var u=this.state.keyMaps,v=0;v<u.length;++v)if(u[v]==s||u[v].name==s)return u.splice(v,1),!0},addOverlay:rt(function(s,u){var v=s.token?s:r.getMode(this.options,s);if(v.startState)throw new Error("Overlays may not be stateful.");at(this.state.overlays,{mode:v,modeSpec:s,opaque:u&&u.opaque,priority:u&&u.priority||0},function(M){return M.priority}),this.state.modeGen++,Oa(this)}),removeOverlay:rt(function(s){for(var u=this.state.overlays,v=0;v<u.length;++v){var M=u[v].modeSpec;if(M==s||typeof s=="string"&&M.name==s){u.splice(v,1),this.state.modeGen++,Oa(this);return}}}),indentLine:rt(function(s,u,v){typeof u!="string"&&typeof u!="number"&&(u==null?u=this.options.smartIndent?"smart":"prev":u=u?"add":"subtract"),Pt(this.doc,s)&&js(this,s,u,v)}),indentSelection:rt(function(s){for(var u=this.doc.sel.ranges,v=-1,M=0;M<u.length;M++){var P=u[M];if(P.empty())P.head.line>v&&(js(this,P.head.line,s,!0),v=P.head.line,M==this.doc.sel.primIndex&&Ml(this));else{var Z=P.from(),te=P.to(),He=Math.max(v,Z.line);v=Math.min(this.lastLine(),te.line-(te.ch?0:1))+1;for(var et=He;et<v;++et)js(this,et,s);var Et=this.doc.sel.ranges;Z.ch==0&&u.length==Et.length&&Et[M].from().ch>0&&gi(this.doc,M,new Tn(Z,Et[M].to()),Be)}}}),getTokenAt:function(s,u){return Pn(this,s,u)},getLineTokens:function(s,u){return Pn(this,Ge(s),u,!0)},getTokenTypeAt:function(s){s=Nt(this.doc,s);var u=gt(this,Ee(this.doc,s.line)),v=0,M=(u.length-1)/2,P=s.ch,Z;if(P==0)Z=u[2];else for(;;){var te=v+M>>1;if((te?u[te*2-1]:0)>=P)M=te;else if(u[te*2+1]<P)v=te+1;else{Z=u[te*2+2];break}}var He=Z?Z.indexOf("overlay "):-1;return He<0?Z:He==0?null:Z.slice(0,He-1)},getModeAt:function(s){var u=this.doc.mode;return u.innerMode?r.innerMode(u,this.getTokenAt(s).state).mode:u},getHelper:function(s,u){return this.getHelpers(s,u)[0]},getHelpers:function(s,u){var v=[];if(!l.hasOwnProperty(u))return v;var M=l[u],P=this.getModeAt(s);if(typeof P[u]=="string")M[P[u]]&&v.push(M[P[u]]);else if(P[u])for(var Z=0;Z<P[u].length;Z++){var te=M[P[u][Z]];te&&v.push(te)}else P.helperType&&M[P.helperType]?v.push(M[P.helperType]):M[P.name]&&v.push(M[P.name]);for(var He=0;He<M._global.length;He++){var et=M._global[He];et.pred(P,this)&&ve(v,et.val)==-1&&v.push(et.val)}return v},getStateAfter:function(s,u){var v=this.doc;return s=Sn(v,s==null?v.first+v.size-1:s),bt(this,s+1,u).state},cursorCoords:function(s,u){var v,M=this.doc.sel.primary();return s==null?v=M.head:typeof s=="object"?v=Nt(this.doc,s):v=s?M.from():M.to(),Wa(this,v,u||"page")},charCoords:function(s,u){return Ao(this,Nt(this.doc,s),u||"page")},coordsChar:function(s,u){return s=Ko(this,s,u||"page"),Ss(this,s.left,s.top)},lineAtHeight:function(s,u){return s=Ko(this,{top:s,left:0},u||"page").top,It(this.doc,s+this.display.viewOffset)},heightAtLine:function(s,u,v){var M=!1,P;if(typeof s=="number"){var Z=this.doc.first+this.doc.size-1;s<this.doc.first?s=this.doc.first:s>Z&&(s=Z,M=!0),P=Ee(this.doc,s)}else P=s;return Za(this,P,{top:0,left:0},u||"page",v||M).top+(M?this.doc.height-ii(P):0)},defaultTextHeight:function(){return Cs(this.display)},defaultCharWidth:function(){return bi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(s,u,v,M,P){var Z=this.display;s=Wa(this,Nt(this.doc,s));var te=s.bottom,He=s.left;if(u.style.position="absolute",u.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(u),Z.sizer.appendChild(u),M=="over")te=s.top;else if(M=="above"||M=="near"){var et=Math.max(Z.wrapper.clientHeight,this.doc.height),Et=Math.max(Z.sizer.clientWidth,Z.lineSpace.clientWidth);(M=="above"||s.bottom+u.offsetHeight>et)&&s.top>u.offsetHeight?te=s.top-u.offsetHeight:s.bottom+u.offsetHeight<=et&&(te=s.bottom),He+u.offsetWidth>Et&&(He=Et-u.offsetWidth)}u.style.top=te+"px",u.style.left=u.style.right="",P=="right"?(He=Z.sizer.clientWidth-u.offsetWidth,u.style.right="0px"):(P=="left"?He=0:P=="middle"&&(He=(Z.sizer.clientWidth-u.offsetWidth)/2),u.style.left=He+"px"),v&&eu(this,{left:He,top:te,right:He+u.offsetWidth,bottom:te+u.offsetHeight})},triggerOnKeyDown:rt(Bc),triggerOnKeyPress:rt(bd),triggerOnKeyUp:yd,triggerOnMouseDown:rt(ko),execCommand:function(s){if(xo.hasOwnProperty(s))return xo[s].call(null,this)},triggerElectric:rt(function(s){Zu(this,s)}),findPosH:function(s,u,v,M){var P=1;u<0&&(P=-1,u=-u);for(var Z=Nt(this.doc,s),te=0;te<u&&(Z=fu(this.doc,Z,P,v,M),!Z.hitSide);++te);return Z},moveH:rt(function(s,u){var v=this;this.extendSelectionsBy(function(M){return v.display.shift||v.doc.extend||M.empty()?fu(v.doc,M.head,s,u,v.options.rtlMoveVisually):s<0?M.from():M.to()},lt)}),deleteH:rt(function(s,u){var v=this.doc.sel,M=this.doc;v.somethingSelected()?M.replaceSelection("",null,"+delete"):Vo(this,function(P){var Z=fu(M,P.head,s,u,!1);return s<0?{from:Z,to:P.head}:{from:P.head,to:Z}})}),findPosV:function(s,u,v,M){var P=1,Z=M;u<0&&(P=-1,u=-u);for(var te=Nt(this.doc,s),He=0;He<u;++He){var et=Wa(this,te,"div");if(Z==null?Z=et.left:et.left=Z,te=Ed(this,et,P,v),te.hitSide)break}return te},moveV:rt(function(s,u){var v=this,M=this.doc,P=[],Z=!this.display.shift&&!M.extend&&M.sel.somethingSelected();if(M.extendSelectionsBy(function(He){if(Z)return s<0?He.from():He.to();var et=Wa(v,He.head,"div");He.goalColumn!=null&&(et.left=He.goalColumn),P.push(et.left);var Et=Ed(v,et,s,u);return u=="page"&&He==M.sel.primary()&&sc(v,Ao(v,Et,"div").top-et.top),Et},lt),P.length)for(var te=0;te<M.sel.ranges.length;te++)M.sel.ranges[te].goalColumn=P[te]}),findWordAt:function(s){var u=this.doc,v=Ee(u,s.line).text,M=s.ch,P=s.ch;if(v){var Z=this.getHelper(s,"wordChars");(s.sticky=="before"||P==v.length)&&M?--M:++P;for(var te=v.charAt(M),He=y(te,Z)?function(et){return y(et,Z)}:/\s/.test(te)?function(et){return/\s/.test(et)}:function(et){return!/\s/.test(et)&&!y(et)};M>0&&He(v.charAt(M-1));)--M;for(;P<v.length&&He(v.charAt(P));)++P}return new Tn(Ge(s.line,M),Ge(s.line,P))},toggleOverwrite:function(s){s!=null&&s==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?we(this.display.cursorDiv,"CodeMirror-overwrite"):ie(this.display.cursorDiv,"CodeMirror-overwrite"),T(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==z()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:rt(function(s,u){fl(this,s,u)}),getScrollInfo:function(){var s=this.display.scroller;return{left:s.scrollLeft,top:s.scrollTop,height:s.scrollHeight-$a(this)-this.display.barHeight,width:s.scrollWidth-$a(this)-this.display.barWidth,clientHeight:Uo(this),clientWidth:ga(this)}},scrollIntoView:rt(function(s,u){s==null?(s={from:this.doc.sel.primary().head,to:null},u==null&&(u=this.options.cursorScrollMargin)):typeof s=="number"?s={from:Ge(s,0),to:null}:s.from==null&&(s={from:s,to:null}),s.to||(s.to=s.from),s.margin=u||0,s.from.line!=null?Au(this,s):tu(this,s.from,s.to,s.margin)}),setSize:rt(function(s,u){var v=this,M=function(Z){return typeof Z=="number"||/^\d+$/.test(String(Z))?Z+"px":Z};s!=null&&(this.display.wrapper.style.width=M(s)),u!=null&&(this.display.wrapper.style.height=M(u)),this.options.lineWrapping&&na(this);var P=this.display.viewFrom;this.doc.iter(P,this.display.viewTo,function(Z){if(Z.widgets){for(var te=0;te<Z.widgets.length;te++)if(Z.widgets[te].noHScroll){rs(v,P,"widget");break}}++P}),this.curOp.forceUpdate=!0,T(this,"refresh",this)}),operation:function(s){return ze(this,s)},startOperation:function(){return wo(this)},endOperation:function(){return Ks(this)},refresh:rt(function(){var s=this.display.cachedTextHeight;Oa(this),this.curOp.forceUpdate=!0,Ni(this),fl(this,this.doc.scrollLeft,this.doc.scrollTop),Fn(this.display),(s==null||Math.abs(s-Cs(this.display))>.5||this.options.lineWrapping)&&ja(this),T(this,"refresh",this)}),swapDoc:rt(function(s){var u=this.doc;return u.cm=null,this.state.selectingText&&this.state.selectingText(),Er(this,s),Ni(this),this.display.input.reset(),fl(this,s.scrollLeft,s.scrollTop),this.curOp.forceScroll=!0,sr(this,"swapDoc",this,u),u}),phrase:function(s){var u=this.options.phrases;return u&&Object.prototype.hasOwnProperty.call(u,s)?u[s]:s},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}},Xe(r),r.registerHelper=function(s,u,v){l.hasOwnProperty(s)||(l[s]=r[s]={_global:[]}),l[s][u]=v},r.registerGlobalHelper=function(s,u,v,M){r.registerHelper(s,u,M),l[s]._global.push({pred:v,val:M})}}function fu(r,a,l,s,u){var v=a,M=l,P=Ee(r,a.line),Z=u&&r.direction=="rtl"?-l:l;function te(){var or=a.line+Z;return or<r.first||or>=r.first+r.size?!1:(a=new Ge(or,a.ch,a.sticky),P=Ee(r,or))}function He(or){var Hn;if(s=="codepoint"){var ur=P.text.charCodeAt(a.ch+(s>0?0:-1));isNaN(ur)?Hn=null:Hn=new Ge(a.line,Math.max(0,Math.min(P.text.length,a.ch+l*(ur>=55296&&ur<56320?2:1))),-l)}else u?Hn=Si(r.cm,P,a,l):Hn=Ls(P,a,l);if(Hn==null)if(!or&&te())a=ui(u,r.cm,P,a.line,Z);else return!1;else a=Hn;return!0}if(s=="char"||s=="codepoint")He();else if(s=="column")He(!0);else if(s=="word"||s=="group")for(var et=null,Et=s=="group",Ct=r.cm&&r.cm.getHelper(a,"wordChars"),jt=!0;!(l<0&&!He(!jt));jt=!1){var ln=P.text.charAt(a.ch)||`
|
|
|
`,Dn=y(ln,Ct)?"w":Et&&ln==`
|
|
|
`?"n":!Et||/\s/.test(ln)?null:"p";if(Et&&!jt&&!Dn&&(Dn="s"),et&&et!=Dn){l<0&&(l=1,He(),a.sticky="after");break}if(Dn&&(et=Dn),l>0&&!He(!jt))break}var Jn=os(r,a,v,M,!0);return Qt(v,Jn)&&(Jn.hitSide=!0),Jn}function Ed(r,a,l,s){var u=r.doc,v=a.left,M;if(s=="page"){var P=Math.min(r.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Z=Math.max(P-.5*Cs(r.display),3);M=(l>0?a.bottom:a.top)+l*Z}else s=="line"&&(M=l>0?a.bottom+3:a.top-3);for(var te;te=Ss(r,v,M),!!te.outside;){if(l<0?M<=0:M>=u.height){te.hitSide=!0;break}M+=l*5}return te}var Qi=function(r){this.cm=r,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new w,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Qi.prototype.init=function(r){var a=this,l=this,s=l.cm,u=l.div=r.lineDiv;kd(u,s.options.spellcheck,s.options.autocorrect,s.options.autocapitalize);function v(P){for(var Z=P.target;Z;Z=Z.parentNode){if(Z==u)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Z.className))break}return!1}Ae(u,"paste",function(P){!v(P)||re(s,P)||Hu(P,s)||N<=11&&setTimeout(it(s,function(){return a.updateFromDOM()}),20)}),Ae(u,"compositionstart",function(P){a.composing={data:P.data,done:!1}}),Ae(u,"compositionupdate",function(P){a.composing||(a.composing={data:P.data,done:!1})}),Ae(u,"compositionend",function(P){a.composing&&(P.data!=a.composing.data&&a.readFromDOMSoon(),a.composing.done=!0)}),Ae(u,"touchstart",function(){return l.forceCompositionEnd()}),Ae(u,"input",function(){a.composing||a.readFromDOMSoon()});function M(P){if(!(!v(P)||re(s,P))){if(s.somethingSelected())Dl({lineWise:!1,text:s.getSelections()}),P.type=="cut"&&s.replaceSelection("",null,"cut");else if(s.options.lineWiseCopyCut){var Z=gc(s);Dl({lineWise:!0,text:Z.text}),P.type=="cut"&&s.operation(function(){s.setSelections(Z.ranges,0,Be),s.replaceSelection("",null,"cut")})}else return;if(P.clipboardData){P.clipboardData.clearData();var te=Vs.text.join(`
|
|
|
`);if(P.clipboardData.setData("Text",te),P.clipboardData.getData("Text")==te){P.preventDefault();return}}var He=Wu(),et=He.firstChild;s.display.lineSpace.insertBefore(He,s.display.lineSpace.firstChild),et.value=Vs.text.join(`
|
|
|
`);var Et=document.activeElement;Te(et),setTimeout(function(){s.display.lineSpace.removeChild(He),Et.focus(),Et==u&&l.showPrimarySelection()},50)}}Ae(u,"copy",M),Ae(u,"cut",M)},Qi.prototype.screenReaderLabelChanged=function(r){r?this.div.setAttribute("aria-label",r):this.div.removeAttribute("aria-label")},Qi.prototype.prepareSelection=function(){var r=qc(this.cm,!1);return r.focus=document.activeElement==this.div,r},Qi.prototype.showSelection=function(r,a){!r||!this.cm.display.view.length||((r.focus||a)&&this.showPrimarySelection(),this.showMultipleSelections(r))},Qi.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Qi.prototype.showPrimarySelection=function(){var r=this.getSelection(),a=this.cm,l=a.doc.sel.primary(),s=l.from(),u=l.to();if(a.display.viewTo==a.display.viewFrom||s.line>=a.display.viewTo||u.line<a.display.viewFrom){r.removeAllRanges();return}var v=hu(a,r.anchorNode,r.anchorOffset),M=hu(a,r.focusNode,r.focusOffset);if(!(v&&!v.bad&&M&&!M.bad&&St(Ut(v,M),s)==0&&St(tn(v,M),u)==0)){var P=a.display.view,Z=s.line>=a.display.viewFrom&&_d(a,s)||{node:P[0].measure.map[2],offset:0},te=u.line<a.display.viewTo&&_d(a,u);if(!te){var He=P[P.length-1].measure,et=He.maps?He.maps[He.maps.length-1]:He.map;te={node:et[et.length-1],offset:et[et.length-2]-et[et.length-3]}}if(!Z||!te){r.removeAllRanges();return}var Et=r.rangeCount&&r.getRangeAt(0),Ct;try{Ct=D(Z.node,Z.offset,te.offset,te.node)}catch(jt){}Ct&&(!K&&a.state.focused?(r.collapse(Z.node,Z.offset),Ct.collapsed||(r.removeAllRanges(),r.addRange(Ct))):(r.removeAllRanges(),r.addRange(Ct)),Et&&r.anchorNode==null?r.addRange(Et):K&&this.startGracePeriod()),this.rememberSelection()}},Qi.prototype.startGracePeriod=function(){var r=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){r.gracePeriod=!1,r.selectionChanged()&&r.cm.operation(function(){return r.cm.curOp.selectionChanged=!0})},20)},Qi.prototype.showMultipleSelections=function(r){Se(this.cm.display.cursorDiv,r.cursors),Se(this.cm.display.selectionDiv,r.selection)},Qi.prototype.rememberSelection=function(){var r=this.getSelection();this.lastAnchorNode=r.anchorNode,this.lastAnchorOffset=r.anchorOffset,this.lastFocusNode=r.focusNode,this.lastFocusOffset=r.focusOffset},Qi.prototype.selectionInEditor=function(){var r=this.getSelection();if(!r.rangeCount)return!1;var a=r.getRangeAt(0).commonAncestorContainer;return Le(this.div,a)},Qi.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Qi.prototype.blur=function(){this.div.blur()},Qi.prototype.getField=function(){return this.div},Qi.prototype.supportsTouch=function(){return!0},Qi.prototype.receivedFocus=function(){var r=this;this.selectionInEditor()?this.pollSelection():ze(this.cm,function(){return r.cm.curOp.selectionChanged=!0});function a(){r.cm.state.focused&&(r.pollSelection(),r.polling.set(r.cm.options.pollInterval,a))}this.polling.set(this.cm.options.pollInterval,a)},Qi.prototype.selectionChanged=function(){var r=this.getSelection();return r.anchorNode!=this.lastAnchorNode||r.anchorOffset!=this.lastAnchorOffset||r.focusNode!=this.lastFocusNode||r.focusOffset!=this.lastFocusOffset},Qi.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var r=this.getSelection(),a=this.cm;if(ue&&F&&this.cm.display.gutterSpecs.length&&mf(r.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var l=hu(a,r.anchorNode,r.anchorOffset),s=hu(a,r.focusNode,r.focusOffset);l&&s&&ze(a,function(){wi(a.doc,Hr(l,s),Be),(l.bad||s.bad)&&(a.curOp.selectionChanged=!0)})}}},Qi.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var r=this.cm,a=r.display,l=r.doc.sel.primary(),s=l.from(),u=l.to();if(s.ch==0&&s.line>r.firstLine()&&(s=Ge(s.line-1,Ee(r.doc,s.line-1).length)),u.ch==Ee(r.doc,u.line).text.length&&u.line<r.lastLine()&&(u=Ge(u.line+1,0)),s.line<a.viewFrom||u.line>a.viewTo-1)return!1;var v,M,P;s.line==a.viewFrom||(v=uo(r,s.line))==0?(M=ut(a.view[0].line),P=a.view[0].node):(M=ut(a.view[v].line),P=a.view[v-1].node.nextSibling);var Z=uo(r,u.line),te,He;if(Z==a.view.length-1?(te=a.viewTo-1,He=a.lineDiv.lastChild):(te=ut(a.view[Z+1].line)-1,He=a.view[Z+1].node.previousSibling),!P)return!1;for(var et=r.doc.splitLines(gf(r,P,He,M,te)),Et=Ze(r.doc,Ge(M,0),Ge(te,Ee(r.doc,te).text.length));et.length>1&&Et.length>1;)if(wt(et)==wt(Et))et.pop(),Et.pop(),te--;else if(et[0]==Et[0])et.shift(),Et.shift(),M++;else break;for(var Ct=0,jt=0,ln=et[0],Dn=Et[0],Jn=Math.min(ln.length,Dn.length);Ct<Jn&&ln.charCodeAt(Ct)==Dn.charCodeAt(Ct);)++Ct;for(var or=wt(et),Hn=wt(Et),ur=Math.min(or.length-(et.length==1?Ct:0),Hn.length-(Et.length==1?Ct:0));jt<ur&&or.charCodeAt(or.length-jt-1)==Hn.charCodeAt(Hn.length-jt-1);)++jt;if(et.length==1&&Et.length==1&&M==s.line)for(;Ct&&Ct>s.ch&&or.charCodeAt(or.length-jt-1)==Hn.charCodeAt(Hn.length-jt-1);)Ct--,jt++;et[et.length-1]=or.slice(0,or.length-jt).replace(/^\u200b+/,""),et[0]=et[0].slice(Ct).replace(/\u200b+$/,"");var Dr=Ge(M,Ct),Ar=Ge(te,Et.length?wt(Et).length-jt:0);if(et.length>1||et[0]||St(Dr,Ar))return Hs(r.doc,et,Dr,Ar,"+input"),!0},Qi.prototype.ensurePolled=function(){this.forceCompositionEnd()},Qi.prototype.reset=function(){this.forceCompositionEnd()},Qi.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Qi.prototype.readFromDOMSoon=function(){var r=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(r.readDOMTimeout=null,r.composing)if(r.composing.done)r.composing=null;else return;r.updateFromDOM()},80))},Qi.prototype.updateFromDOM=function(){var r=this;(this.cm.isReadOnly()||!this.pollContent())&&ze(this.cm,function(){return Oa(r.cm)})},Qi.prototype.setUneditable=function(r){r.contentEditable="false"},Qi.prototype.onKeyPress=function(r){r.charCode==0||this.composing||(r.preventDefault(),this.cm.isReadOnly()||it(this.cm,Ku)(this.cm,String.fromCharCode(r.charCode==null?r.keyCode:r.charCode),0))},Qi.prototype.readOnlyChanged=function(r){this.div.contentEditable=String(r!="nocursor")},Qi.prototype.onContextMenu=function(){},Qi.prototype.resetPosition=function(){},Qi.prototype.needsContentAttribute=!0;function _d(r,a){var l=co(r,a.line);if(!l||l.hidden)return null;var s=Ee(r.doc,a.line),u=ts(l,s,a.line),v=Ye(s,r.doc.direction),M="left";if(v){var P=U(v,a.ch);M=P%2?"right":"left"}var Z=As(u.map,a.ch,M);return Z.offset=Z.collapse=="right"?Z.end:Z.start,Z}function mf(r){for(var a=r;a;a=a.parentNode)if(/CodeMirror-gutter-wrapper/.test(a.className))return!0;return!1}function vc(r,a){return a&&(r.bad=!0),r}function gf(r,a,l,s,u){var v="",M=!1,P=r.doc.lineSeparator(),Z=!1;function te(Ct){return function(jt){return jt.id==Ct}}function He(){M&&(v+=P,Z&&(v+=P),M=Z=!1)}function et(Ct){Ct&&(He(),v+=Ct)}function Et(Ct){if(Ct.nodeType==1){var jt=Ct.getAttribute("cm-text");if(jt){et(jt);return}var ln=Ct.getAttribute("cm-marker"),Dn;if(ln){var Jn=r.findMarks(Ge(s,0),Ge(u+1,0),te(+ln));Jn.length&&(Dn=Jn[0].find(0))&&et(Ze(r.doc,Dn.from,Dn.to).join(P));return}if(Ct.getAttribute("contenteditable")=="false")return;var or=/^(pre|div|p|li|table|br)$/i.test(Ct.nodeName);if(!/^br$/i.test(Ct.nodeName)&&Ct.textContent.length==0)return;or&&He();for(var Hn=0;Hn<Ct.childNodes.length;Hn++)Et(Ct.childNodes[Hn]);/^(pre|p)$/i.test(Ct.nodeName)&&(Z=!0),or&&(M=!0)}else Ct.nodeType==3&&et(Ct.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Et(a),a!=l;)a=a.nextSibling,Z=!1;return v}function hu(r,a,l){var s;if(a==r.display.lineDiv){if(s=r.display.lineDiv.childNodes[l],!s)return vc(r.clipPos(Ge(r.display.viewTo-1)),!0);a=null,l=0}else for(s=a;;s=s.parentNode){if(!s||s==r.display.lineDiv)return null;if(s.parentNode&&s.parentNode==r.display.lineDiv)break}for(var u=0;u<r.display.view.length;u++){var v=r.display.view[u];if(v.node==s)return vf(v,a,l)}}function vf(r,a,l){var s=r.text.firstChild,u=!1;if(!a||!Le(s,a))return vc(Ge(ut(r.line),0),!0);if(a==s&&(u=!0,a=s.childNodes[l],l=0,!a)){var v=r.rest?wt(r.rest):r.line;return vc(Ge(ut(v),v.text.length),u)}var M=a.nodeType==3?a:null,P=a;for(!M&&a.childNodes.length==1&&a.firstChild.nodeType==3&&(M=a.firstChild,l&&(l=M.nodeValue.length));P.parentNode!=s;)P=P.parentNode;var Z=r.measure,te=Z.maps;function He(Dn,Jn,or){for(var Hn=-1;Hn<(te?te.length:0);Hn++)for(var ur=Hn<0?Z.map:te[Hn],Dr=0;Dr<ur.length;Dr+=3){var Ar=ur[Dr+2];if(Ar==Dn||Ar==Jn){var di=ut(Hn<0?r.line:r.rest[Hn]),ia=ur[Dr]+or;return(or<0||Ar!=Dn)&&(ia=ur[Dr+(or?1:0)]),Ge(di,ia)}}}var et=He(M,P,l);if(et)return vc(et,u);for(var Et=P.nextSibling,Ct=M?M.nodeValue.length-l:0;Et;Et=Et.nextSibling){if(et=He(Et,Et.firstChild,0),et)return vc(Ge(et.line,et.ch-Ct),u);Ct+=Et.textContent.length}for(var jt=P.previousSibling,ln=l;jt;jt=jt.previousSibling){if(et=He(jt,jt.firstChild,-1),et)return vc(Ge(et.line,et.ch+ln),u);ln+=jt.textContent.length}}var ra=function(r){this.cm=r,this.prevInput="",this.pollingFast=!1,this.polling=new w,this.hasSelection=!1,this.composing=null};ra.prototype.init=function(r){var a=this,l=this,s=this.cm;this.createField(r);var u=this.textarea;r.wrapper.insertBefore(this.wrapper,r.wrapper.firstChild),ke&&(u.style.width="0px"),Ae(u,"input",function(){R&&N>=9&&a.hasSelection&&(a.hasSelection=null),l.poll()}),Ae(u,"paste",function(M){re(s,M)||Hu(M,s)||(s.state.pasteIncoming=+new Date,l.fastPoll())});function v(M){if(!re(s,M)){if(s.somethingSelected())Dl({lineWise:!1,text:s.getSelections()});else if(s.options.lineWiseCopyCut){var P=gc(s);Dl({lineWise:!0,text:P.text}),M.type=="cut"?s.setSelections(P.ranges,null,Be):(l.prevInput="",u.value=P.text.join(`
|
|
|
`),Te(u))}else return;M.type=="cut"&&(s.state.cutIncoming=+new Date)}}Ae(u,"cut",v),Ae(u,"copy",v),Ae(r.scroller,"paste",function(M){if(!(Po(r,M)||re(s,M))){if(!u.dispatchEvent){s.state.pasteIncoming=+new Date,l.focus();return}var P=new Event("paste");P.clipboardData=M.clipboardData,u.dispatchEvent(P)}}),Ae(r.lineSpace,"selectstart",function(M){Po(r,M)||ct(M)}),Ae(u,"compositionstart",function(){var M=s.getCursor("from");l.composing&&l.composing.range.clear(),l.composing={start:M,range:s.markText(M,s.getCursor("to"),{className:"CodeMirror-composing"})}}),Ae(u,"compositionend",function(){l.composing&&(l.poll(),l.composing.range.clear(),l.composing=null)})},ra.prototype.createField=function(r){this.wrapper=Wu(),this.textarea=this.wrapper.firstChild},ra.prototype.screenReaderLabelChanged=function(r){r?this.textarea.setAttribute("aria-label",r):this.textarea.removeAttribute("aria-label")},ra.prototype.prepareSelection=function(){var r=this.cm,a=r.display,l=r.doc,s=qc(r);if(r.options.moveInputWithCursor){var u=Wa(r,l.sel.primary().head,"div"),v=a.wrapper.getBoundingClientRect(),M=a.lineDiv.getBoundingClientRect();s.teTop=Math.max(0,Math.min(a.wrapper.clientHeight-10,u.top+M.top-v.top)),s.teLeft=Math.max(0,Math.min(a.wrapper.clientWidth-10,u.left+M.left-v.left))}return s},ra.prototype.showSelection=function(r){var a=this.cm,l=a.display;Se(l.cursorDiv,r.cursors),Se(l.selectionDiv,r.selection),r.teTop!=null&&(this.wrapper.style.top=r.teTop+"px",this.wrapper.style.left=r.teLeft+"px")},ra.prototype.reset=function(r){if(!(this.contextMenuPending||this.composing)){var a=this.cm;if(a.somethingSelected()){this.prevInput="";var l=a.getSelection();this.textarea.value=l,a.state.focused&&Te(this.textarea),R&&N>=9&&(this.hasSelection=l)}else r||(this.prevInput=this.textarea.value="",R&&N>=9&&(this.hasSelection=null))}},ra.prototype.getField=function(){return this.textarea},ra.prototype.supportsTouch=function(){return!1},ra.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!de||z()!=this.textarea))try{this.textarea.focus()}catch(r){}},ra.prototype.blur=function(){this.textarea.blur()},ra.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ra.prototype.receivedFocus=function(){this.slowPoll()},ra.prototype.slowPoll=function(){var r=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){r.poll(),r.cm.state.focused&&r.slowPoll()})},ra.prototype.fastPoll=function(){var r=!1,a=this;a.pollingFast=!0;function l(){var s=a.poll();!s&&!r?(r=!0,a.polling.set(60,l)):(a.pollingFast=!1,a.slowPoll())}a.polling.set(20,l)},ra.prototype.poll=function(){var r=this,a=this.cm,l=this.textarea,s=this.prevInput;if(this.contextMenuPending||!a.state.focused||Vt(l)&&!s&&!this.composing||a.isReadOnly()||a.options.disableInput||a.state.keySeq)return!1;var u=l.value;if(u==s&&!a.somethingSelected())return!1;if(R&&N>=9&&this.hasSelection===u||_e&&/[\uf700-\uf7ff]/.test(u))return a.display.input.reset(),!1;if(a.doc.sel==a.display.selForContextMenu){var v=u.charCodeAt(0);if(v==8203&&!s&&(s="\u200B"),v==8666)return this.reset(),this.cm.execCommand("undo")}for(var M=0,P=Math.min(s.length,u.length);M<P&&s.charCodeAt(M)==u.charCodeAt(M);)++M;return ze(a,function(){Ku(a,u.slice(M),s.length-M,null,r.composing?"*compose":null),u.length>1e3||u.indexOf(`
|
|
|
`)>-1?l.value=r.prevInput="":r.prevInput=u,r.composing&&(r.composing.range.clear(),r.composing.range=a.markText(r.composing.start,a.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ra.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ra.prototype.onKeyPress=function(){R&&N>=9&&(this.hasSelection=null),this.fastPoll()},ra.prototype.onContextMenu=function(r){var a=this,l=a.cm,s=l.display,u=a.textarea;a.contextMenuPending&&a.contextMenuPending();var v=Xo(l,r),M=s.scroller.scrollTop;if(!v||V)return;var P=l.options.resetSelectionOnContextMenu;P&&l.doc.sel.contains(v)==-1&&it(l,wi)(l.doc,Hr(v),Be);var Z=u.style.cssText,te=a.wrapper.style.cssText,He=a.wrapper.offsetParent.getBoundingClientRect();a.wrapper.style.cssText="position: static",u.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(r.clientY-He.top-5)+"px; left: "+(r.clientX-He.left-5)+`px;
|
|
|
z-index: 1000; background: `+(R?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var et;x&&(et=window.scrollY),s.input.focus(),x&&window.scrollTo(null,et),s.input.reset(),l.somethingSelected()||(u.value=a.prevInput=" "),a.contextMenuPending=Ct,s.selForContextMenu=l.doc.sel,clearTimeout(s.detectingSelectAll);function Et(){if(u.selectionStart!=null){var ln=l.somethingSelected(),Dn="\u200B"+(ln?u.value:"");u.value="\u21DA",u.value=Dn,a.prevInput=ln?"":"\u200B",u.selectionStart=1,u.selectionEnd=Dn.length,s.selForContextMenu=l.doc.sel}}function Ct(){if(a.contextMenuPending==Ct&&(a.contextMenuPending=!1,a.wrapper.style.cssText=te,u.style.cssText=Z,R&&N<9&&s.scrollbars.setScrollTop(s.scroller.scrollTop=M),u.selectionStart!=null)){(!R||R&&N<9)&&Et();var ln=0,Dn=function(){s.selForContextMenu==l.doc.sel&&u.selectionStart==0&&u.selectionEnd>0&&a.prevInput=="\u200B"?it(l,yo)(l):ln++<10?s.detectingSelectAll=setTimeout(Dn,500):(s.selForContextMenu=null,s.input.reset())};s.detectingSelectAll=setTimeout(Dn,200)}}if(R&&N>=9&&Et(),q){Bt(r);var jt=function(){oe(window,"mouseup",jt),setTimeout(Ct,20)};Ae(window,"mouseup",jt)}else setTimeout(Ct,50)},ra.prototype.readOnlyChanged=function(r){r||this.reset(),this.textarea.disabled=r=="nocursor",this.textarea.readOnly=!!r},ra.prototype.setUneditable=function(){},ra.prototype.needsContentAttribute=!1;function Xl(r,a){if(a=a?Re(a):{},a.value=r.value,!a.tabindex&&r.tabIndex&&(a.tabindex=r.tabIndex),!a.placeholder&&r.placeholder&&(a.placeholder=r.placeholder),a.autofocus==null){var l=z();a.autofocus=l==r||r.getAttribute("autofocus")!=null&&l==document.body}function s(){r.value=P.getValue()}var u;if(r.form&&(Ae(r.form,"submit",s),!a.leaveSubmitMethodAlone)){var v=r.form;u=v.submit;try{var M=v.submit=function(){s(),v.submit=u,v.submit(),v.submit=M}}catch(Z){}}a.finishInit=function(Z){Z.save=s,Z.getTextArea=function(){return r},Z.toTextArea=function(){Z.toTextArea=isNaN,s(),r.parentNode.removeChild(Z.getWrapperElement()),r.style.display="",r.form&&(oe(r.form,"submit",s),!a.leaveSubmitMethodAlone&&typeof r.form.submit=="function"&&(r.form.submit=u))}},r.style.display="none";var P=jr(function(Z){return r.parentNode.insertBefore(Z,r.nextSibling)},a);return P}function yc(r){r.off=oe,r.on=Ae,r.wheelEventPixels=Ir,r.Doc=Ma,r.splitLines=xn,r.countColumn=X,r.findColumn=$t,r.isWordChar=g,r.Pass=je,r.signal=T,r.Line=Bi,r.changeEnd=fi,r.scrollbarModel=Ic,r.Pos=Ge,r.cmpPos=St,r.modes=pr,r.mimeModes=er,r.resolveMode=Rn,r.getMode=pn,r.modeExtensions=tr,r.extendMode=Ke,r.copyState=H,r.startState=Q,r.innerMode=ee,r.commands=xo,r.keyMap=zi,r.keyName=Ws,r.isModifierKey=Gl,r.lookupKey=_s,r.normalizeKeyMap=pc,r.StringStream=J,r.SharedTextMarker=ri,r.TextMarker=el,r.LineWidget=Xa,r.e_preventDefault=ct,r.e_stopPropagation=mt,r.e_stop=Bt,r.addClass=we,r.contains=Le,r.rmClass=ie,r.keyNames=ss}ff(jr),ju(jr);var yl="iter insert remove copy getEditor constructor".split(" ");for(var Ds in Ma.prototype)Ma.prototype.hasOwnProperty(Ds)&&ve(yl,Ds)<0&&(jr.prototype[Ds]=function(r){return function(){return r.apply(this.doc,arguments)}}(Ma.prototype[Ds]));return Xe(Ma),jr.inputStyles={textarea:ra,contenteditable:Qi},jr.defineMode=function(r){!jr.defaults.mode&&r!="null"&&(jr.defaults.mode=r),gr.apply(this,arguments)},jr.defineMIME=$r,jr.defineMode("null",function(){return{token:function(r){return r.skipToEnd()}}}),jr.defineMIME("text/plain","null"),jr.defineExtension=function(r,a){jr.prototype[r]=a},jr.defineDocExtension=function(r,a){Ma.prototype[r]=a},jr.fromTextArea=Xl,yc(jr),jr.version="5.58.2",jr})},25419:function(yn,dt,m){(function(K){K(m(89780),m(15525),m(98101))})(function(K){"use strict";K.defineMode("markdown",function(j,A){var xe=K.getMode(j,"text/html"),R=xe.name=="null";function N(X){if(K.findModeByName){var w=K.findModeByName(X);w&&(X=w.mime||w.mimes[0])}var ve=K.getMode(j,X);return ve.name=="null"?null:ve}A.highlightFormatting===void 0&&(A.highlightFormatting=!1),A.maxBlockquoteDepth===void 0&&(A.maxBlockquoteDepth=0),A.taskLists===void 0&&(A.taskLists=!1),A.strikethrough===void 0&&(A.strikethrough=!1),A.emoji===void 0&&(A.emoji=!1),A.fencedCodeBlockHighlighting===void 0&&(A.fencedCodeBlockHighlighting=!0),A.fencedCodeBlockDefaultMode===void 0&&(A.fencedCodeBlockDefaultMode="text/plain"),A.xml===void 0&&(A.xml=!0),A.tokenTypeOverrides===void 0&&(A.tokenTypeOverrides={});var x={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 E in x)x.hasOwnProperty(E)&&A.tokenTypeOverrides[E]&&(x[E]=A.tokenTypeOverrides[E]);var F=/^([*\-_])(?:\s*\1){2,}\s*$/,V=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ie=/^\[(x| )\](?=\s)/i,G=A.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,le=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ke=/^[^#!\[\]*_\\<>` "'(~:]+/,ue=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,de=/^\s*\[[^\]]+?\]:.*$/,_e=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,Pe=" ";function Ue(X,w,ve){return w.f=w.inline=ve,ve(X,w)}function Ce(X,w,ve){return w.f=w.block=ve,ve(X,w)}function pe(X){return!X||!/\S/.test(X.string)}function q(X){if(X.linkTitle=!1,X.linkHref=!1,X.linkText=!1,X.em=!1,X.strong=!1,X.strikethrough=!1,X.quote=0,X.indentedCode=!1,X.f==ie){var w=R;if(!w){var ve=K.innerMode(xe,X.htmlState);w=ve.mode.name=="xml"&&ve.state.tagStart===null&&!ve.state.context&&ve.state.tokenize.isInText}w&&(X.f=be,X.block=_,X.htmlState=null)}return X.trailingSpace=0,X.trailingSpaceNewLine=!1,X.prevLine=X.thisLine,X.thisLine={stream:null},null}function _(X,w){var ve=X.column()===w.indentation,Qe=pe(w.prevLine.stream),je=w.indentedCode,Be=w.prevLine.hr,Oe=w.list!==!1,lt=(w.listStack[w.listStack.length-1]||0)+3;w.indentedCode=!1;var $t=w.indentation;if(w.indentationDiff===null&&(w.indentationDiff=w.indentation,Oe)){for(w.list=null;$t<w.listStack[w.listStack.length-1];)w.listStack.pop(),w.listStack.length?w.indentation=w.listStack[w.listStack.length-1]:w.list=!1;w.list!==!1&&(w.indentationDiff=$t-w.listStack[w.listStack.length-1])}var vt=!Qe&&!Be&&!w.prevLine.header&&(!Oe||!je)&&!w.prevLine.fencedCodeEnd,Tt=(w.list===!1||Be||Qe)&&w.indentation<=lt&&X.match(F),wt=null;if(w.indentationDiff>=4&&(je||w.prevLine.fencedCodeEnd||w.prevLine.header||Qe))return X.skipToEnd(),w.indentedCode=!0,x.code;if(X.eatSpace())return null;if(ve&&w.indentation<=lt&&(wt=X.match(G))&&wt[1].length<=6)return w.quote=0,w.header=wt[1].length,w.thisLine.header=!0,A.highlightFormatting&&(w.formatting="header"),w.f=w.inline,Se(w);if(w.indentation<=lt&&X.eat(">"))return w.quote=ve?1:w.quote+1,A.highlightFormatting&&(w.formatting="quote"),X.eatSpace(),Se(w);if(!Tt&&!w.setext&&ve&&w.indentation<=lt&&(wt=X.match(V))){var pt=wt[1]?"ol":"ul";return w.indentation=$t+X.current().length,w.list=!0,w.quote=0,w.listStack.push(w.indentation),w.em=!1,w.strong=!1,w.code=!1,w.strikethrough=!1,A.taskLists&&X.match(Ie,!1)&&(w.taskList=!0),w.f=w.inline,A.highlightFormatting&&(w.formatting=["list","list-"+pt]),Se(w)}else{if(ve&&w.indentation<=lt&&(wt=X.match(ue,!0)))return w.quote=0,w.fencedEndRE=new RegExp(wt[1]+"+ *$"),w.localMode=A.fencedCodeBlockHighlighting&&N(wt[2]||A.fencedCodeBlockDefaultMode),w.localMode&&(w.localState=K.startState(w.localMode)),w.f=w.block=ae,A.highlightFormatting&&(w.formatting="code-block"),w.code=-1,Se(w);if(w.setext||(!vt||!Oe)&&!w.quote&&w.list===!1&&!w.code&&!Tt&&!de.test(X.string)&&(wt=X.lookAhead(1))&&(wt=wt.match(le)))return w.setext?(w.header=w.setext,w.setext=0,X.skipToEnd(),A.highlightFormatting&&(w.formatting="header")):(w.header=wt[0].charAt(0)=="="?1:2,w.setext=w.header),w.thisLine.header=!0,w.f=w.inline,Se(w);if(Tt)return X.skipToEnd(),w.hr=!0,w.thisLine.hr=!0,x.hr;if(X.peek()==="[")return Ue(X,w,ge)}return Ue(X,w,w.inline)}function ie(X,w){var ve=xe.token(X,w.htmlState);if(!R){var Qe=K.innerMode(xe,w.htmlState);(Qe.mode.name=="xml"&&Qe.state.tagStart===null&&!Qe.state.context&&Qe.state.tokenize.isInText||w.md_inside&&X.current().indexOf(">")>-1)&&(w.f=be,w.block=_,w.htmlState=null)}return ve}function ae(X,w){var ve=w.listStack[w.listStack.length-1]||0,Qe=w.indentation<ve,je=ve+3;if(w.fencedEndRE&&w.indentation<=je&&(Qe||X.match(w.fencedEndRE))){A.highlightFormatting&&(w.formatting="code-block");var Be;return Qe||(Be=Se(w)),w.localMode=w.localState=null,w.block=_,w.f=be,w.fencedEndRE=null,w.code=0,w.thisLine.fencedCodeEnd=!0,Qe?Ce(X,w,w.block):Be}else return w.localMode?w.localMode.token(X,w.localState):(X.skipToEnd(),x.code)}function Se(X){var w=[];if(X.formatting){w.push(x.formatting),typeof X.formatting=="string"&&(X.formatting=[X.formatting]);for(var ve=0;ve<X.formatting.length;ve++)w.push(x.formatting+"-"+X.formatting[ve]),X.formatting[ve]==="header"&&w.push(x.formatting+"-"+X.formatting[ve]+"-"+X.header),X.formatting[ve]==="quote"&&(!A.maxBlockquoteDepth||A.maxBlockquoteDepth>=X.quote?w.push(x.formatting+"-"+X.formatting[ve]+"-"+X.quote):w.push("error"))}if(X.taskOpen)return w.push("meta"),w.length?w.join(" "):null;if(X.taskClosed)return w.push("property"),w.length?w.join(" "):null;if(X.linkHref?w.push(x.linkHref,"url"):(X.strong&&w.push(x.strong),X.em&&w.push(x.em),X.strikethrough&&w.push(x.strikethrough),X.emoji&&w.push(x.emoji),X.linkText&&w.push(x.linkText),X.code&&w.push(x.code),X.image&&w.push(x.image),X.imageAltText&&w.push(x.imageAltText,"link"),X.imageMarker&&w.push(x.imageMarker)),X.header&&w.push(x.header,x.header+"-"+X.header),X.quote&&(w.push(x.quote),!A.maxBlockquoteDepth||A.maxBlockquoteDepth>=X.quote?w.push(x.quote+"-"+X.quote):w.push(x.quote+"-"+A.maxBlockquoteDepth)),X.list!==!1){var Qe=(X.listStack.length-1)%3;Qe?Qe===1?w.push(x.list2):w.push(x.list3):w.push(x.list1)}return X.trailingSpaceNewLine?w.push("trailing-space-new-line"):X.trailingSpace&&w.push("trailing-space-"+(X.trailingSpace%2?"a":"b")),w.length?w.join(" "):null}function se(X,w){if(X.match(ke,!0))return Se(w)}function be(X,w){var ve=w.text(X,w);if(typeof ve!="undefined")return ve;if(w.list)return w.list=null,Se(w);if(w.taskList){var Qe=X.match(Ie,!0)[1]===" ";return Qe?w.taskOpen=!0:w.taskClosed=!0,A.highlightFormatting&&(w.formatting="task"),w.taskList=!1,Se(w)}if(w.taskOpen=!1,w.taskClosed=!1,w.header&&X.match(/^#+$/,!0))return A.highlightFormatting&&(w.formatting="header"),Se(w);var je=X.next();if(w.linkTitle){w.linkTitle=!1;var Be=je;je==="("&&(Be=")"),Be=(Be+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Oe="^\\s*(?:[^"+Be+"\\\\]+|\\\\\\\\|\\\\.)"+Be;if(X.match(new RegExp(Oe),!0))return x.linkHref}if(je==="`"){var lt=w.formatting;A.highlightFormatting&&(w.formatting="code"),X.eatWhile("`");var $t=X.current().length;if(w.code==0&&(!w.quote||$t==1))return w.code=$t,Se(w);if($t==w.code){var vt=Se(w);return w.code=0,vt}else return w.formatting=lt,Se(w)}else if(w.code)return Se(w);if(je==="\\"&&(X.next(),A.highlightFormatting)){var Tt=Se(w),wt=x.formatting+"-escape";return Tt?Tt+" "+wt:wt}if(je==="!"&&X.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return w.imageMarker=!0,w.image=!0,A.highlightFormatting&&(w.formatting="image"),Se(w);if(je==="["&&w.imageMarker&&X.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return w.imageMarker=!1,w.imageAltText=!0,A.highlightFormatting&&(w.formatting="image"),Se(w);if(je==="]"&&w.imageAltText){A.highlightFormatting&&(w.formatting="image");var Tt=Se(w);return w.imageAltText=!1,w.image=!1,w.inline=w.f=Le,Tt}if(je==="["&&!w.image)return w.linkText&&X.match(/^.*?\]/)||(w.linkText=!0,A.highlightFormatting&&(w.formatting="link")),Se(w);if(je==="]"&&w.linkText){A.highlightFormatting&&(w.formatting="link");var Tt=Se(w);return w.linkText=!1,w.inline=w.f=X.match(/\(.*?\)| ?\[.*?\]/,!1)?Le:be,Tt}if(je==="<"&&X.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){w.f=w.inline=D,A.highlightFormatting&&(w.formatting="link");var Tt=Se(w);return Tt?Tt+=" ":Tt="",Tt+x.linkInline}if(je==="<"&&X.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){w.f=w.inline=D,A.highlightFormatting&&(w.formatting="link");var Tt=Se(w);return Tt?Tt+=" ":Tt="",Tt+x.linkEmail}if(A.xml&&je==="<"&&X.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var pt=X.string.indexOf(">",X.pos);if(pt!=-1){var at=X.string.substring(X.start,pt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(at)&&(w.md_inside=!0)}return X.backUp(1),w.htmlState=K.startState(xe),Ce(X,w,ie)}if(A.xml&&je==="<"&&X.match(/^\/\w*?>/))return w.md_inside=!1,"tag";if(je==="*"||je==="_"){for(var S=1,p=X.pos==1?" ":X.string.charAt(X.pos-2);S<3&&X.eat(je);)S++;var h=X.peek()||" ",g=!/\s/.test(h)&&(!_e.test(h)||/\s/.test(p)||_e.test(p)),y=!/\s/.test(p)&&(!_e.test(p)||/\s/.test(h)||_e.test(h)),d=null,L=null;if(S%2&&(!w.em&&g&&(je==="*"||!y||_e.test(p))?d=!0:w.em==je&&y&&(je==="*"||!g||_e.test(h))&&(d=!1)),S>1&&(!w.strong&&g&&(je==="*"||!y||_e.test(p))?L=!0:w.strong==je&&y&&(je==="*"||!g||_e.test(h))&&(L=!1)),L!=null||d!=null){A.highlightFormatting&&(w.formatting=d==null?"strong":L==null?"em":"strong em"),d===!0&&(w.em=je),L===!0&&(w.strong=je);var vt=Se(w);return d===!1&&(w.em=!1),L===!1&&(w.strong=!1),vt}}else if(je===" "&&(X.eat("*")||X.eat("_"))){if(X.peek()===" ")return Se(w);X.backUp(1)}if(A.strikethrough){if(je==="~"&&X.eatWhile(je)){if(w.strikethrough){A.highlightFormatting&&(w.formatting="strikethrough");var vt=Se(w);return w.strikethrough=!1,vt}else if(X.match(/^[^\s]/,!1))return w.strikethrough=!0,A.highlightFormatting&&(w.formatting="strikethrough"),Se(w)}else if(je===" "&&X.match(/^~~/,!0)){if(X.peek()===" ")return Se(w);X.backUp(2)}}if(A.emoji&&je===":"&&X.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){w.emoji=!0,A.highlightFormatting&&(w.formatting="emoji");var fe=Se(w);return w.emoji=!1,fe}return je===" "&&(X.match(/^ +$/,!1)?w.trailingSpace++:w.trailingSpace&&(w.trailingSpaceNewLine=!0)),Se(w)}function D(X,w){var ve=X.next();if(ve===">"){w.f=w.inline=be,A.highlightFormatting&&(w.formatting="link");var Qe=Se(w);return Qe?Qe+=" ":Qe="",Qe+x.linkInline}return X.match(/^[^>]+/,!0),x.linkInline}function Le(X,w){if(X.eatSpace())return null;var ve=X.next();return ve==="("||ve==="["?(w.f=w.inline=we(ve==="("?")":"]"),A.highlightFormatting&&(w.formatting="link-string"),w.linkHref=!0,Se(w)):"error"}var z={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function we(X){return function(w,ve){var Qe=w.next();if(Qe===X){ve.f=ve.inline=be,A.highlightFormatting&&(ve.formatting="link-string");var je=Se(ve);return ve.linkHref=!1,je}return w.match(z[X]),ve.linkHref=!0,Se(ve)}}function ge(X,w){return X.match(/^([^\]\\]|\\.)*\]:/,!1)?(w.f=Te,X.next(),A.highlightFormatting&&(w.formatting="link"),w.linkText=!0,Se(w)):Ue(X,w,be)}function Te(X,w){if(X.match(/^\]:/,!0)){w.f=w.inline=Fe,A.highlightFormatting&&(w.formatting="link");var ve=Se(w);return w.linkText=!1,ve}return X.match(/^([^\]\\]|\\.)+/,!0),x.linkText}function Fe(X,w){return X.eatSpace()?null:(X.match(/^[^\s]+/,!0),X.peek()===void 0?w.linkTitle=!0:X.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),w.f=w.inline=be,x.linkHref+" url")}var Re={startState:function(){return{f:_,prevLine:{stream:null},thisLine:{stream:null},block:_,htmlState:null,indentation:0,inline:be,text:se,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(X){return{f:X.f,prevLine:X.prevLine,thisLine:X.thisLine,block:X.block,htmlState:X.htmlState&&K.copyState(xe,X.htmlState),indentation:X.indentation,localMode:X.localMode,localState:X.localMode?K.copyState(X.localMode,X.localState):null,inline:X.inline,text:X.text,formatting:!1,linkText:X.linkText,linkTitle:X.linkTitle,linkHref:X.linkHref,code:X.code,em:X.em,strong:X.strong,strikethrough:X.strikethrough,emoji:X.emoji,header:X.header,setext:X.setext,hr:X.hr,taskList:X.taskList,list:X.list,listStack:X.listStack.slice(0),quote:X.quote,indentedCode:X.indentedCode,trailingSpace:X.trailingSpace,trailingSpaceNewLine:X.trailingSpaceNewLine,md_inside:X.md_inside,fencedEndRE:X.fencedEndRE}},token:function(X,w){if(w.formatting=!1,X!=w.thisLine.stream){if(w.header=0,w.hr=!1,X.match(/^\s*$/,!0))return q(w),null;if(w.prevLine=w.thisLine,w.thisLine={stream:X},w.taskList=!1,w.trailingSpace=0,w.trailingSpaceNewLine=!1,!w.localState&&(w.f=w.block,w.f!=ie)){var ve=X.match(/^\s*/,!0)[0].replace(/\t/g,Pe).length;if(w.indentation=ve,w.indentationDiff=null,ve>0)return null}}return w.f(X,w)},innerMode:function(X){return X.block==ie?{state:X.htmlState,mode:xe}:X.localState?{state:X.localState,mode:X.localMode}:{state:X,mode:Re}},indent:function(X,w,ve){return X.block==ie&&xe.indent?xe.indent(X.htmlState,w,ve):X.localState&&X.localMode.indent?X.localMode.indent(X.localState,w,ve):K.Pass},blankLine:q,getType:Se,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Re},"xml"),K.defineMIME("text/markdown","markdown"),K.defineMIME("text/x-markdown","markdown")})},98101:function(yn,dt,m){(function(K){K(m(89780))})(function(K){"use strict";K.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 j=0;j<K.modeInfo.length;j++){var A=K.modeInfo[j];A.mimes&&(A.mime=A.mimes[0])}K.findModeByMIME=function(xe){xe=xe.toLowerCase();for(var R=0;R<K.modeInfo.length;R++){var N=K.modeInfo[R];if(N.mime==xe)return N;if(N.mimes){for(var x=0;x<N.mimes.length;x++)if(N.mimes[x]==xe)return N}}if(/\+xml$/.test(xe))return K.findModeByMIME("application/xml");if(/\+json$/.test(xe))return K.findModeByMIME("application/json")},K.findModeByExtension=function(xe){xe=xe.toLowerCase();for(var R=0;R<K.modeInfo.length;R++){var N=K.modeInfo[R];if(N.ext){for(var x=0;x<N.ext.length;x++)if(N.ext[x]==xe)return N}}},K.findModeByFileName=function(xe){for(var R=0;R<K.modeInfo.length;R++){var N=K.modeInfo[R];if(N.file&&N.file.test(xe))return N}var x=xe.lastIndexOf("."),E=x>-1&&xe.substring(x+1,xe.length);if(E)return K.findModeByExtension(E)},K.findModeByName=function(xe){xe=xe.toLowerCase();for(var R=0;R<K.modeInfo.length;R++){var N=K.modeInfo[R];if(N.name.toLowerCase()==xe)return N;if(N.alias){for(var x=0;x<N.alias.length;x++)if(N.alias[x].toLowerCase()==xe)return N}}}})},67549:function(yn,dt,m){(function(K){K(m(89780))})(function(K){"use strict";K.defineMode("stex",function(j,A){"use strict";function xe(ke,ue){ke.cmdState.push(ue)}function R(ke){return ke.cmdState.length>0?ke.cmdState[ke.cmdState.length-1]:null}function N(ke){var ue=ke.cmdState.pop();ue&&ue.closeBracket()}function x(ke){for(var ue=ke.cmdState,de=ue.length-1;de>=0;de--){var _e=ue[de];if(_e.name!="DEFAULT")return _e}return{styleIdentifier:function(){return null}}}function E(ke,ue,de){return function(){this.name=ke,this.bracketNo=0,this.style=ue,this.styles=de,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var F={};F.importmodule=E("importmodule","tag",["string","builtin"]),F.documentclass=E("documentclass","tag",["","atom"]),F.usepackage=E("usepackage","tag",["atom"]),F.begin=E("begin","tag",["atom"]),F.end=E("end","tag",["atom"]),F.label=E("label","tag",["atom"]),F.ref=E("ref","tag",["atom"]),F.eqref=E("eqref","tag",["atom"]),F.cite=E("cite","tag",["atom"]),F.bibitem=E("bibitem","tag",["atom"]),F.Bibitem=E("Bibitem","tag",["atom"]),F.RBibitem=E("RBibitem","tag",["atom"]),F.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function V(ke,ue){ke.f=ue}function Ie(ke,ue){var de;if(ke.match(/^\\[a-zA-Z@]+/)){var _e=ke.current().slice(1);return de=F.hasOwnProperty(_e)?F[_e]:F.DEFAULT,de=new de,xe(ue,de),V(ue,le),de.style}if(ke.match(/^\\[$&%#{}_]/)||ke.match(/^\\[,;!\/\\]/))return"tag";if(ke.match("\\["))return V(ue,function(Ue,Ce){return G(Ue,Ce,"\\]")}),"keyword";if(ke.match("\\("))return V(ue,function(Ue,Ce){return G(Ue,Ce,"\\)")}),"keyword";if(ke.match("$$"))return V(ue,function(Ue,Ce){return G(Ue,Ce,"$$")}),"keyword";if(ke.match("$"))return V(ue,function(Ue,Ce){return G(Ue,Ce,"$")}),"keyword";var Pe=ke.next();if(Pe=="%")return ke.skipToEnd(),"comment";if(Pe=="}"||Pe=="]"){if(de=R(ue),de)de.closeBracket(Pe),V(ue,le);else return"error";return"bracket"}else return Pe=="{"||Pe=="["?(de=F.DEFAULT,de=new de,xe(ue,de),"bracket"):/\d/.test(Pe)?(ke.eatWhile(/[\w.%]/),"atom"):(ke.eatWhile(/[\w\-_]/),de=x(ue),de.name=="begin"&&(de.argument=ke.current()),de.styleIdentifier())}function G(ke,ue,de){if(ke.eatSpace())return null;if(de&&ke.match(de))return V(ue,Ie),"keyword";if(ke.match(/^\\[a-zA-Z@]+/))return"tag";if(ke.match(/^[a-zA-Z]+/))return"variable-2";if(ke.match(/^\\[$&%#{}_]/)||ke.match(/^\\[,;!\/]/)||ke.match(/^[\^_&]/))return"tag";if(ke.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ke.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var _e=ke.next();return _e=="{"||_e=="}"||_e=="["||_e=="]"||_e=="("||_e==")"?"bracket":_e=="%"?(ke.skipToEnd(),"comment"):"error"}function le(ke,ue){var de=ke.peek(),_e;return de=="{"||de=="["?(_e=R(ue),_e.openBracket(de),ke.eat(de),V(ue,Ie),"bracket"):/[ \t\r]/.test(de)?(ke.eat(de),null):(V(ue,Ie),N(ue),Ie(ke,ue))}return{startState:function(){var ke=A.inMathMode?function(ue,de){return G(ue,de)}:Ie;return{cmdState:[],f:ke}},copyState:function(ke){return{cmdState:ke.cmdState.slice(),f:ke.f}},token:function(ke,ue){return ue.f(ke,ue)},blankLine:function(ke){ke.f=Ie,ke.cmdState.length=0},lineComment:"%"}}),K.defineMIME("text/x-stex","stex"),K.defineMIME("text/x-latex","stex")})},15525:function(yn,dt,m){(function(K){K(m(89780))})(function(K){"use strict";var j={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},A={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};K.defineMode("xml",function(xe,R){var N=xe.indentUnit,x={},E=R.htmlMode?j:A;for(var F in E)x[F]=E[F];for(var F in R)x[F]=R[F];var V,Ie;function G(D,Le){function z(Te){return Le.tokenize=Te,Te(D,Le)}var we=D.next();if(we=="<")return D.eat("!")?D.eat("[")?D.match("CDATA[")?z(ue("atom","]]>")):null:D.match("--")?z(ue("comment","-->")):D.match("DOCTYPE",!0,!0)?(D.eatWhile(/[\w\._\-]/),z(de(1))):null:D.eat("?")?(D.eatWhile(/[\w\._\-]/),Le.tokenize=ue("meta","?>"),"meta"):(V=D.eat("/")?"closeTag":"openTag",Le.tokenize=le,"tag bracket");if(we=="&"){var ge;return D.eat("#")?D.eat("x")?ge=D.eatWhile(/[a-fA-F\d]/)&&D.eat(";"):ge=D.eatWhile(/[\d]/)&&D.eat(";"):ge=D.eatWhile(/[\w\.\-:]/)&&D.eat(";"),ge?"atom":"error"}else return D.eatWhile(/[^&<]/),null}G.isInText=!0;function le(D,Le){var z=D.next();if(z==">"||z=="/"&&D.eat(">"))return Le.tokenize=G,V=z==">"?"endTag":"selfcloseTag","tag bracket";if(z=="=")return V="equals",null;if(z=="<"){Le.tokenize=G,Le.state=Ce,Le.tagName=Le.tagStart=null;var we=Le.tokenize(D,Le);return we?we+" tag error":"tag error"}else return/[\'\"]/.test(z)?(Le.tokenize=ke(z),Le.stringStartCol=D.column(),Le.tokenize(D,Le)):(D.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ke(D){var Le=function(z,we){for(;!z.eol();)if(z.next()==D){we.tokenize=le;break}return"string"};return Le.isInAttribute=!0,Le}function ue(D,Le){return function(z,we){for(;!z.eol();){if(z.match(Le)){we.tokenize=G;break}z.next()}return D}}function de(D){return function(Le,z){for(var we;(we=Le.next())!=null;){if(we=="<")return z.tokenize=de(D+1),z.tokenize(Le,z);if(we==">")if(D==1){z.tokenize=G;break}else return z.tokenize=de(D-1),z.tokenize(Le,z)}return"meta"}}function _e(D,Le,z){this.prev=D.context,this.tagName=Le,this.indent=D.indented,this.startOfLine=z,(x.doNotIndent.hasOwnProperty(Le)||D.context&&D.context.noIndent)&&(this.noIndent=!0)}function Pe(D){D.context&&(D.context=D.context.prev)}function Ue(D,Le){for(var z;;){if(!D.context||(z=D.context.tagName,!x.contextGrabbers.hasOwnProperty(z)||!x.contextGrabbers[z].hasOwnProperty(Le)))return;Pe(D)}}function Ce(D,Le,z){return D=="openTag"?(z.tagStart=Le.column(),pe):D=="closeTag"?q:Ce}function pe(D,Le,z){return D=="word"?(z.tagName=Le.current(),Ie="tag",ae):x.allowMissingTagName&&D=="endTag"?(Ie="tag bracket",ae(D,Le,z)):(Ie="error",pe)}function q(D,Le,z){if(D=="word"){var we=Le.current();return z.context&&z.context.tagName!=we&&x.implicitlyClosed.hasOwnProperty(z.context.tagName)&&Pe(z),z.context&&z.context.tagName==we||x.matchClosing===!1?(Ie="tag",_):(Ie="tag error",ie)}else return x.allowMissingTagName&&D=="endTag"?(Ie="tag bracket",_(D,Le,z)):(Ie="error",ie)}function _(D,Le,z){return D!="endTag"?(Ie="error",_):(Pe(z),Ce)}function ie(D,Le,z){return Ie="error",_(D,Le,z)}function ae(D,Le,z){if(D=="word")return Ie="attribute",Se;if(D=="endTag"||D=="selfcloseTag"){var we=z.tagName,ge=z.tagStart;return z.tagName=z.tagStart=null,D=="selfcloseTag"||x.autoSelfClosers.hasOwnProperty(we)?Ue(z,we):(Ue(z,we),z.context=new _e(z,we,ge==z.indented)),Ce}return Ie="error",ae}function Se(D,Le,z){return D=="equals"?se:(x.allowMissing||(Ie="error"),ae(D,Le,z))}function se(D,Le,z){return D=="string"?be:D=="word"&&x.allowUnquoted?(Ie="string",ae):(Ie="error",ae(D,Le,z))}function be(D,Le,z){return D=="string"?be:ae(D,Le,z)}return{startState:function(D){var Le={tokenize:G,state:Ce,indented:D||0,tagName:null,tagStart:null,context:null};return D!=null&&(Le.baseIndent=D),Le},token:function(D,Le){if(!Le.tagName&&D.sol()&&(Le.indented=D.indentation()),D.eatSpace())return null;V=null;var z=Le.tokenize(D,Le);return(z||V)&&z!="comment"&&(Ie=null,Le.state=Le.state(V||z,D,Le),Ie&&(z=Ie=="error"?z+" error":Ie)),z},indent:function(D,Le,z){var we=D.context;if(D.tokenize.isInAttribute)return D.tagStart==D.indented?D.stringStartCol+1:D.indented+N;if(we&&we.noIndent)return K.Pass;if(D.tokenize!=le&&D.tokenize!=G)return z?z.match(/^(\s*)/)[0].length:0;if(D.tagName)return x.multilineTagIndentPastTag!==!1?D.tagStart+D.tagName.length+2:D.tagStart+N*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/<!\[CDATA\[/.test(Le))return 0;var ge=Le&&/^<(\/)?([\w_:\.-]*)/.exec(Le);if(ge&&ge[1])for(;we;)if(we.tagName==ge[2]){we=we.prev;break}else if(x.implicitlyClosed.hasOwnProperty(we.tagName))we=we.prev;else break;else if(ge)for(;we;){var Te=x.contextGrabbers[we.tagName];if(Te&&Te.hasOwnProperty(ge[2]))we=we.prev;else break}for(;we&&we.prev&&!we.startOfLine;)we=we.prev;return we?we.indent+N:D.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(D){D.state==se&&(D.state=ae)},xmlCurrentTag:function(D){return D.tagName?{name:D.tagName,close:D.type=="closeTag"}:null},xmlCurrentContext:function(D){for(var Le=[],z=D.context;z;z=z.prev)z.tagName&&Le.push(z.tagName);return Le.reverse()}}}),K.defineMIME("text/xml","xml"),K.defineMIME("application/xml","xml"),K.mimeModes.hasOwnProperty("text/html")||K.defineMIME("text/html",{name:"xml",htmlMode:!0})})},24334:function(yn,dt,m){var K,j;(function(A,xe){yn.exports=xe(A)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof m.g!="undefined"?m.g:this,function(A){"use strict";A=A||{};var xe=A.Base64,R="2.6.4",N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",x=function(z){for(var we={},ge=0,Te=z.length;ge<Te;ge++)we[z.charAt(ge)]=ge;return we}(N),E=String.fromCharCode,F=function(z){if(z.length<2){var we=z.charCodeAt(0);return we<128?z:we<2048?E(192|we>>>6)+E(128|we&63):E(224|we>>>12&15)+E(128|we>>>6&63)+E(128|we&63)}else{var we=65536+(z.charCodeAt(0)-55296)*1024+(z.charCodeAt(1)-56320);return E(240|we>>>18&7)+E(128|we>>>12&63)+E(128|we>>>6&63)+E(128|we&63)}},V=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Ie=function(z){return z.replace(V,F)},G=function(z){var we=[0,2,1][z.length%3],ge=z.charCodeAt(0)<<16|(z.length>1?z.charCodeAt(1):0)<<8|(z.length>2?z.charCodeAt(2):0),Te=[N.charAt(ge>>>18),N.charAt(ge>>>12&63),we>=2?"=":N.charAt(ge>>>6&63),we>=1?"=":N.charAt(ge&63)];return Te.join("")},le=A.btoa&&typeof A.btoa=="function"?function(z){return A.btoa(z)}:function(z){if(z.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return z.replace(/[\s\S]{1,3}/g,G)},ke=function(z){return le(Ie(String(z)))},ue=function(z){return z.replace(/[+\/]/g,function(we){return we=="+"?"-":"_"}).replace(/=/g,"")},de=function(z,we){return we?ue(ke(z)):ke(z)},_e=function(z){return de(z,!0)},Pe;A.Uint8Array&&(Pe=function(z,we){for(var ge="",Te=0,Fe=z.length;Te<Fe;Te+=3){var Re=z[Te],X=z[Te+1],w=z[Te+2],ve=Re<<16|X<<8|w;ge+=N.charAt(ve>>>18)+N.charAt(ve>>>12&63)+(typeof X!="undefined"?N.charAt(ve>>>6&63):"=")+(typeof w!="undefined"?N.charAt(ve&63):"=")}return we?ue(ge):ge});var Ue=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Ce=function(z){switch(z.length){case 4:var we=(7&z.charCodeAt(0))<<18|(63&z.charCodeAt(1))<<12|(63&z.charCodeAt(2))<<6|63&z.charCodeAt(3),ge=we-65536;return E((ge>>>10)+55296)+E((ge&1023)+56320);case 3:return E((15&z.charCodeAt(0))<<12|(63&z.charCodeAt(1))<<6|63&z.charCodeAt(2));default:return E((31&z.charCodeAt(0))<<6|63&z.charCodeAt(1))}},pe=function(z){return z.replace(Ue,Ce)},q=function(z){var we=z.length,ge=we%4,Te=(we>0?x[z.charAt(0)]<<18:0)|(we>1?x[z.charAt(1)]<<12:0)|(we>2?x[z.charAt(2)]<<6:0)|(we>3?x[z.charAt(3)]:0),Fe=[E(Te>>>16),E(Te>>>8&255),E(Te&255)];return Fe.length-=[0,0,2,1][ge],Fe.join("")},_=A.atob&&typeof A.atob=="function"?function(z){return A.atob(z)}:function(z){return z.replace(/\S{1,4}/g,q)},ie=function(z){return _(String(z).replace(/[^A-Za-z0-9\+\/]/g,""))},ae=function(z){return pe(_(z))},Se=function(z){return String(z).replace(/[-_]/g,function(we){return we=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},se=function(z){return ae(Se(z))},be;A.Uint8Array&&(be=function(z){return Uint8Array.from(ie(Se(z)),function(we){return we.charCodeAt(0)})});var D=function(){var z=A.Base64;return A.Base64=xe,z};if(A.Base64={VERSION:R,atob:ie,btoa:le,fromBase64:se,toBase64:de,utob:Ie,encode:de,encodeURI:_e,btou:pe,decode:se,noConflict:D,fromUint8Array:Pe,toUint8Array:be},typeof Object.defineProperty=="function"){var Le=function(z){return{value:z,enumerable:!1,writable:!0,configurable:!0}};A.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Le(function(){return se(this)})),Object.defineProperty(String.prototype,"toBase64",Le(function(z){return de(this,z)})),Object.defineProperty(String.prototype,"toBase64URI",Le(function(){return de(this,!0)}))}}return A.Meteor&&(Base64=A.Base64),yn.exports?yn.exports.Base64=A.Base64:(K=[],j=function(){return A.Base64}.apply(dt,K),j!==void 0&&(yn.exports=j)),{Base64:A.Base64}})},2859:function(yn,dt,m){"use strict";m.d(dt,{hP:function(){return at}});var K=function(S,p){return(K=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,g){h.__proto__=g}||function(h,g){for(var y in g)Object.prototype.hasOwnProperty.call(g,y)&&(h[y]=g[y])})(S,p)};function j(S,p){function h(){this.constructor=S}K(S,p),S.prototype=p===null?Object.create(p):(h.prototype=p.prototype,new h)}function A(S,p,h,g){return new(h||(h=Promise))(function(y,d){function L(I){try{O(g.next(I))}catch(he){d(he)}}function fe(I){try{O(g.throw(I))}catch(he){d(he)}}function O(I){var he;I.done?y(I.value):(he=I.value,he instanceof h?he:new h(function(Y){Y(he)})).then(L,fe)}O((g=g.apply(S,p||[])).next())})}function xe(S,p){var h,g,y,d,L={label:0,sent:function(){if(1&y[0])throw y[1];return y[1]},trys:[],ops:[]};return d={next:fe(0),throw:fe(1),return:fe(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function fe(O){return function(I){return function(he){if(h)throw new TypeError("Generator is already executing.");for(;L;)try{if(h=1,g&&(y=2&he[0]?g.return:he[0]?g.throw||((y=g.return)&&y.call(g),0):g.next)&&!(y=y.call(g,he[1])).done)return y;switch(g=0,y&&(he=[2&he[0],y.value]),he[0]){case 0:case 1:y=he;break;case 4:return L.label++,{value:he[1],done:!1};case 5:L.label++,g=he[1],he=[0];continue;case 7:he=L.ops.pop(),L.trys.pop();continue;default:if(y=L.trys,!((y=y.length>0&&y[y.length-1])||he[0]!==6&&he[0]!==2)){L=0;continue}if(he[0]===3&&(!y||he[1]>y[0]&&he[1]<y[3])){L.label=he[1];break}if(he[0]===6&&L.label<y[1]){L.label=y[1],y=he;break}if(y&&L.label<y[2]){L.label=y[2],L.ops.push(he);break}y[2]&&L.ops.pop(),L.trys.pop();continue}he=p.call(S,L)}catch(Y){he=[6,Y],g=0}finally{h=y=0}if(5&he[0])throw he[1];return{value:he[0]?he[1]:void 0,done:!0}}([O,I])}}}function R(){for(var S=0,p=0,h=arguments.length;p<h;p++)S+=arguments[p].length;var g=Array(S),y=0;for(p=0;p<h;p++)for(var d=arguments[p],L=0,fe=d.length;L<fe;L++,y++)g[y]=d[L];return g}var N=function(){function S(){}return S.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},S.setAttributes=function(p,h){for(var g=0,y=h;g<y.length;g++){var d=y[g],L=d[0],fe=d[1];p.setAttribute(L,fe)}},S.createRect=function(p,h,g){var y=document.createElementNS("http://www.w3.org/2000/svg","rect");return y.setAttribute("width",p.toString()),y.setAttribute("height",h.toString()),g&&S.setAttributes(y,g),y},S.createLine=function(p,h,g,y,d){var L=document.createElementNS("http://www.w3.org/2000/svg","line");return L.setAttribute("x1",p.toString()),L.setAttribute("y1",h.toString()),L.setAttribute("x2",g.toString()),L.setAttribute("y2",y.toString()),d&&S.setAttributes(L,d),L},S.createPolygon=function(p,h){var g=document.createElementNS("http://www.w3.org/2000/svg","polygon");return g.setAttribute("points",p),h&&S.setAttributes(g,h),g},S.createCircle=function(p,h){var g=document.createElementNS("http://www.w3.org/2000/svg","circle");return g.setAttribute("cx",(p/2).toString()),g.setAttribute("cy",(p/2).toString()),g.setAttribute("r",p.toString()),h&&S.setAttributes(g,h),g},S.createEllipse=function(p,h,g){var y=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return y.setAttribute("cx",(p/2).toString()),y.setAttribute("cy",(h/2).toString()),y.setAttribute("rx",(p/2).toString()),y.setAttribute("ry",(h/2).toString()),g&&S.setAttributes(y,g),y},S.createGroup=function(p){var h=document.createElementNS("http://www.w3.org/2000/svg","g");return p&&S.setAttributes(h,p),h},S.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},S.createMarker=function(p,h,g,y,d,L,fe){var O=document.createElementNS("http://www.w3.org/2000/svg","marker");return S.setAttributes(O,[["id",p],["orient",h],["markerWidth",g.toString()],["markerHeight",y.toString()],["refX",d.toString()],["refY",L.toString()]]),O.appendChild(fe),O},S.createText=function(p){var h=document.createElementNS("http://www.w3.org/2000/svg","text");return h.setAttribute("x","0"),h.setAttribute("y","0"),p&&S.setAttributes(h,p),h},S.createTSpan=function(p,h){var g=document.createElementNS("http://www.w3.org/2000/svg","tspan");return g.textContent=p,h&&S.setAttributes(g,h),g},S.createImage=function(p){var h=document.createElementNS("http://www.w3.org/2000/svg","image");return p&&S.setAttributes(h,p),h},S.createPoint=function(p,h){var g=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return g.x=p,g.y=h,g},S.createPath=function(p,h){var g=document.createElementNS("http://www.w3.org/2000/svg","path");return g.setAttribute("d",p),h&&S.setAttributes(g,h),g},S}(),x=function(){function S(){}return S.addKey=function(p){S.key=p},Object.defineProperty(S,"isLicensed",{get:function(){return!!S.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(S.key)},enumerable:!1,configurable:!0}),S}(),E=function(){function S(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return S.prototype.rasterize=function(p,h,g){var y=this;return new Promise(function(d){var L=g!==void 0?g:document.createElement("canvas");p===null&&(y.markersOnly=!0,y.naturalSize=!1);var fe=document.createElementNS("http://www.w3.org/2000/svg","svg");fe.setAttribute("xmlns","http://www.w3.org/2000/svg"),fe.setAttribute("width",h.width.baseVal.valueAsString),fe.setAttribute("height",h.height.baseVal.valueAsString),fe.setAttribute("viewBox","0 0 "+h.viewBox.baseVal.width.toString()+" "+h.viewBox.baseVal.height.toString()),fe.innerHTML=h.innerHTML,y.naturalSize===!0?(fe.width.baseVal.value=p.naturalWidth,fe.height.baseVal.value=p.naturalHeight):y.width!==void 0&&y.height!==void 0&&(fe.width.baseVal.value=y.width,fe.height.baseVal.value=y.height),L.width=fe.width.baseVal.value,L.height=fe.height.baseVal.value;var O=fe.outerHTML,I=L.getContext("2d");y.markersOnly!==!0&&I.drawImage(p,0,0,L.width,L.height);var he=window.URL,Y=new Image(L.width,L.height);Y.setAttribute("crossOrigin","anonymous");var U=new Blob([O],{type:"image/svg+xml"}),ye=he.createObjectURL(U);Y.onload=function(){I.drawImage(Y,0,0),he.revokeObjectURL(ye);var Ye=L.toDataURL(y.imageType,y.imageQuality);d(Ye)},Y.src=ye})},S}(),F=function(){},V=function(){function S(p){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+p+"_"}return Object.defineProperty(S.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(S.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(S.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),S.prototype.addClass=function(p){return this.styleSheet===void 0&&this.addStyleSheet(),p.name=""+this.classNamePrefix+p.localName,this.classes.push(p),this.styleSheet.sheet.insertRule("."+p.name+" {"+p.style+"}",this.styleSheet.sheet.cssRules.length),p},S.prototype.addRule=function(p){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(p),this.styleSheet.sheet.insertRule(p.selector+" {"+p.style+"}",this.styleSheet.sheet.cssRules.length)},S.prototype.addStyleSheet=function(){var p;this.styleSheet=document.createElement("style"),((p=this.styleSheetRoot)!==null&&p!==void 0?p:document.head).appendChild(this.styleSheet),this.addRule(new Ie("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ie("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new Ie("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new G("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new G("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},S.prototype.removeStyleSheet=function(){var p;this.styleSheet&&(((p=this.styleSheetRoot)!==null&&p!==void 0?p:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},S}(),Ie=function(S,p){this.selector=S,this.style=p},G=function(S,p){this.localName=S,this.style=p},le=function(){function S(p,h,g,y,d){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=p,this.displayMode=h,this.markerItems=g,this.uiStyleSettings=y,this.styles=d,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return S.prototype.show=function(p){var h=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=p,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var g=document.createElement("div");g.className=this.toolbarBlockStyleClass.name,g.style.whiteSpace="nowrap",this.uiContainer.appendChild(g),this.addActionButton(g,'<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(g,'<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(g,'<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(g,'<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(g,'<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(g,'<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(g,'<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(g,'<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(d){var L=document.createElement("div");L.className=""+h.toolbarButtonStyleClass.name,L.setAttribute("data-type-name",d.typeName),L.innerHTML=d.icon,L.addEventListener("click",function(){h.markerToolbarButtonClicked(L,d)}),h.buttons.push(L),h.markerButtons.push(L)}),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 y=document.createElement("div");y.className=this.toolbarBlockStyleClass.name,y.style.whiteSpace="nowrap",y.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(y),this.addActionButton(y,'<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(y,'<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()},S.prototype.addButtonClickListener=function(p){this.buttonClickListeners.push(p)},S.prototype.removeButtonClickListener=function(p){this.buttonClickListeners.indexOf(p)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(p),1)},S.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},S.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var p=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var h=0;h<this.markerButtons.length;h++)h<p||h===p&&this.markerButtons.length-1===p?this.markerButtonBlock.appendChild(this.markerButtons[h]):(h===p&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[h]))}},S.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")},S.prototype.resetButtonStyles=function(){var p=this;this.buttons.forEach(function(h){h.className=h.className.replace(p.uiStyleSettings.toolbarButtonStyleColorsClassName?p.uiStyleSettings.toolbarButtonStyleColorsClassName:p.toolbarButtonStyleColorsClass.name,"").trim(),h.className=h.className.replace(p.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?p.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:p.toolbarActiveButtonStyleColorsClass.name,"").trim(),h.className+=" "+(p.uiStyleSettings.toolbarButtonStyleColorsClassName?p.uiStyleSettings.toolbarButtonStyleColorsClassName:p.toolbarButtonStyleColorsClass.name)})},S.prototype.addActionButton=function(p,h,g){var y=this,d=document.createElement("div");switch(d.className=""+this.toolbarButtonStyleClass.name,d.innerHTML=h,d.setAttribute("data-action",g),d.addEventListener("click",function(){y.actionToolbarButtonClicked(d,g)}),g){case"select":d.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":d.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":d.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":d.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":d.style.fill=this.uiStyleSettings.closeButtonColor}p.appendChild(d),this.buttons.push(d)},S.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new G("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 G("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new G("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new G("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 G("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var p=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new G("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*p)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*p)+`px;
|
|
|
padding: `+p+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new G("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new G("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Ie("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new Ie("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},S.prototype.markerToolbarButtonClicked=function(p,h){this.setActiveButton(p),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(g){return g("marker",h)}),this.markerButtonOverflowBlock.style.display="none"},S.prototype.actionToolbarButtonClicked=function(p,h){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(g){return g("action",h)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},S.prototype.setActiveButton=function(p){this.resetButtonStyles(),p.className=p.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),p.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},S.prototype.setActiveMarkerButton=function(p){var h=this.markerButtons.find(function(g){return g.getAttribute("data-type-name")===p});h&&this.setActiveButton(h)},S.prototype.setCurrentMarker=function(p){var h=this;this.currentMarker=p,this.buttons.filter(function(g){return/delete|notes/.test(g.getAttribute("data-action"))}).forEach(function(g){h.currentMarker===void 0?(g.style.fillOpacity="0.4",g.style.pointerEvents="none"):(g.style.fillOpacity="1",g.style.pointerEvents="all")})},S}(),ke=function(){function S(p,h,g,y){this.panels=[],this.panelButtons=[],this.markerjsContainer=p,this.displayMode=h,this.uiStyleSettings=g,this.styles=y,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return S.prototype.addStyles=function(){var p;this.toolboxStyleClass=this.styles.addClass(new G("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 G("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var h=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new G("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new G("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new G("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 G("toolbox-panel-row_colors",`
|
|
|
background-color: `+((p=this.uiStyleSettings.toolboxBackgroundColor)!==null&&p!==void 0?p:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new G("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*h)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*h)+`px;
|
|
|
padding: `+h+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new G("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new G("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new Ie("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Ie("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},S.prototype.show=function(p){var h;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=p,this.uiContainer.className=this.toolboxStyleClass.name+" "+((h=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&h!==void 0?h:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},S.prototype.setPanelButtons=function(p){var h,g,y=this;this.panels=p,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((h=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&h!==void 0?h:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((g=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&g!==void 0?g:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(d){var L;d.uiStyleSettings=y.uiStyleSettings;var fe=document.createElement("div");fe.className=y.toolboxButtonStyleClass.name+" "+((L=y.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&L!==void 0?L:y.toolboxButtonStyleColorsClass.name),fe.innerHTML=d.icon,fe.title=d.title,fe.addEventListener("click",function(){y.panelButtonClick(d)}),y.panelButtons.push(fe),y.buttonRow.appendChild(fe)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},S.prototype.panelButtonClick=function(p){var h=this,g=-1;if(p!==this.activePanel){g=this.panels.indexOf(p),this.panelRow.innerHTML="";var y=p.getUi();y.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(y),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=p}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){h.displayMode==="inline"?h.panelRow.style.display="none":h.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(d,L){var fe,O;d.className=h.toolboxButtonStyleClass.name+" "+(L===g?""+((fe=h.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&fe!==void 0?fe:h.toolboxActiveButtonStyleColorsClass.name):""+((O=h.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&O!==void 0?O:h.toolboxButtonStyleColorsClass.name))})},S}(),ue=function(S,p){this.title=S,this.icon=p},de=function(S){function p(h,g,y,d){var L=S.call(this,h,d||'<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 L.colors=[],L.addTransparent=!1,L.colorBoxes=[],L.colors=g,L.currentColor=y,L.setCurrentColor=L.setCurrentColor.bind(L),L.getColorBox=L.getColorBox.bind(L),L}return j(p,S),p.prototype.getUi=function(){var h=this,g=document.createElement("div");return g.style.overflow="hidden",g.style.whiteSpace="nowrap",this.colors.forEach(function(y){var d=h.getColorBox(y);g.appendChild(d),h.colorBoxes.push(d)}),g},p.prototype.getColorBox=function(h){var g=this,y=this.uiStyleSettings.toolbarHeight/4,d=this.uiStyleSettings.toolbarHeight-y,L=document.createElement("div");L.style.display="inline-block",L.style.boxSizing="content-box",L.style.width=d-2+"px",L.style.height=d-2+"px",L.style.padding="1px",L.style.marginRight="2px",L.style.marginBottom="2px",L.style.borderWidth="2px",L.style.borderStyle="solid",L.style.borderRadius=(d+2)/2+"px",L.style.borderColor=h===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",L.addEventListener("click",function(){g.setCurrentColor(h,L)});var fe=document.createElement("div");return fe.style.display="inline-block",fe.style.width=d-2+"px",fe.style.height=d-2+"px",fe.style.backgroundColor=h,fe.style.borderRadius=d/2+"px",h==="transparent"&&(fe.style.fill=this.uiStyleSettings.toolboxAccentColor,fe.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>`),L.appendChild(fe),L},p.prototype.setCurrentColor=function(h,g){var y=this;this.currentColor=h,this.colorBoxes.forEach(function(d){d.style.borderColor=d===g?y.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(h)},p}(ue),_e=function(){function S(p,h,g){this._state="new",this._isSelected=!1,this._container=p,this._overlayContainer=h,this.globalSettings=g,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(S.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),S.prototype.ownsTarget=function(p){return!1},Object.defineProperty(S.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),S.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},S.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},S.prototype.pointerDown=function(p,h){},S.prototype.dblClick=function(p,h){},S.prototype.manipulate=function(p){},S.prototype.pointerUp=function(p){this.stateChanged()},S.prototype.dispose=function(){},S.prototype.addMarkerVisualToContainer=function(p){this.container.childNodes.length>0?this.container.insertBefore(p,this.container.childNodes[0]):this.container.appendChild(p)},S.prototype.getState=function(){return{typeName:S.typeName,state:this.state,notes:this.notes}},S.prototype.restoreState=function(p){this._state=p.state,this.notes=p.notes},S.prototype.scale=function(p,h){},S.prototype.colorChanged=function(p){this.onColorChanged&&this.onColorChanged(p),this.stateChanged()},S.prototype.fillColorChanged=function(p){this.onFillColorChanged&&this.onFillColorChanged(p),this.stateChanged()},S.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var p=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),p.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(p)&&this.onStateChanged(this)}},S.typeName="MarkerBase",S}(),Pe=function(){function S(){this.findGripByVisual=this.findGripByVisual.bind(this)}return S.prototype.findGripByVisual=function(p){return this.topLeft.ownsTarget(p)?this.topLeft:this.topCenter.ownsTarget(p)?this.topCenter:this.topRight.ownsTarget(p)?this.topRight:this.centerLeft.ownsTarget(p)?this.centerLeft:this.centerRight.ownsTarget(p)?this.centerRight:this.bottomLeft.ownsTarget(p)?this.bottomLeft:this.bottomCenter.ownsTarget(p)?this.bottomCenter:this.bottomRight.ownsTarget(p)?this.bottomRight:void 0},S}(),Ue=function(){function S(){this.GRIP_SIZE=10,this.visual=N.createGroup(),this.visual.appendChild(N.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(N.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return S.prototype.ownsTarget=function(p){return p===this.visual||p===this.visual.childNodes[0]||p===this.visual.childNodes[1]},S}(),Ce=function(){function S(){}return S.toITransformMatrix=function(p){return{a:p.a,b:p.b,c:p.c,d:p.d,e:p.e,f:p.f}},S.toSVGMatrix=function(p,h){return p.a=h.a,p.b=h.b,p.c=h.c,p.d=h.d,p.e=h.e,p.f=h.f,p},S}(),pe=function(S){function p(h,g,y){var d=S.call(this,h,g,y)||this;return d.left=0,d.top=0,d.width=0,d.height=0,d.defaultSize={x:50,y:20},d.offsetX=0,d.offsetY=0,d.rotationAngle=0,d.CB_DISTANCE=10,d._suppressMarkerCreateEvent=!1,d.container.transform.baseVal.appendItem(N.createTransform()),d.setupControlBox(),d}return j(p,S),Object.defineProperty(p.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"visual",{get:function(){return this._visual},set:function(h){this._visual=h;var g=N.createTransform();this._visual.transform.baseVal.appendItem(g)},enumerable:!1,configurable:!0}),p.prototype.ownsTarget=function(h){return!!S.prototype.ownsTarget.call(this,h)||!!(this.controlGrips.findGripByVisual(h)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(h))},p.prototype.pointerDown=function(h,g){S.prototype.pointerDown.call(this,h,g),this.state==="new"&&(this.left=h.x,this.top=h.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var y=this.unrotatePoint(h);if(this.manipulationStartX=y.x,this.manipulationStartY=y.y,this.offsetX=y.x-this.left,this.offsetY=y.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(g),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(g)){this.activeGrip=this.rotatorGrip;var d=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=d.x-this.width/2,this.top=d.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var L=this.container.transform.baseVal.getItem(0);L.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(L,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},p.prototype.pointerUp=function(h){var g=this.state;S.prototype.pointerUp.call(this,h),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(h),this._state="select",g==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},p.prototype.moveVisual=function(h){this.visual.style.transform="translate("+h.x+"px, "+h.y+"px)"},p.prototype.manipulate=function(h){var g=this.unrotatePoint(h);this.state==="creating"?this.resize(h):this.state==="move"?(this.left=this.manipulationStartLeft+(g.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(g.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(g):this.state==="rotate"&&this.rotate(h)},p.prototype.resize=function(h){var g=this.manipulationStartLeft,y=this.manipulationStartWidth,d=this.manipulationStartTop,L=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:g=this.manipulationStartLeft+h.x-this.manipulationStartX,y=this.manipulationStartWidth+this.manipulationStartLeft-g;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:y=this.manipulationStartWidth+h.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:d=this.manipulationStartTop+h.y-this.manipulationStartY,L=this.manipulationStartHeight+this.manipulationStartTop-d;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:L=this.manipulationStartHeight+h.y-this.manipulationStartY}y>=0?(this.left=g,this.width=y):(this.left=g+y,this.width=-y),L>=0?(this.top=d,this.height=L):(this.top=d+L,this.height=-L),this.setSize()},p.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},p.prototype.rotate=function(h){if(Math.abs(h.x-this.centerX)>.1){var g=Math.sign(h.x-this.centerX);this.rotationAngle=180*Math.atan((h.y-this.centerY)/(h.x-this.centerX))/Math.PI+90*g,this.applyRotation()}},p.prototype.applyRotation=function(){var h=this.container.transform.baseVal.getItem(0);h.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(h,0)},p.prototype.rotatePoint=function(h){if(this.rotationAngle===0)return h;var g=this.container.getCTM(),y=N.createPoint(h.x,h.y);return{x:(y=y.matrixTransform(g)).x,y:y.y}},p.prototype.unrotatePoint=function(h){if(this.rotationAngle===0)return h;var g=this.container.getCTM();g=g.inverse();var y=N.createPoint(h.x,h.y);return{x:(y=y.matrixTransform(g)).x,y:y.y}},p.prototype.select=function(){S.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},p.prototype.deselect=function(){S.prototype.deselect.call(this),this.controlBox.style.display="none"},p.prototype.setupControlBox=function(){this.controlBox=N.createGroup();var h=N.createTransform();h.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(h),this.container.appendChild(this.controlBox),this.controlRect=N.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=N.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new Pe,this.addControlGrips(),this.controlBox.style.display="none"},p.prototype.adjustControlBox=function(){var h=this.controlBox.transform.baseVal.getItem(0);h.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(h,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()},p.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()},p.prototype.createGrip=function(){var h=new Ue;return h.visual.transform.baseVal.appendItem(N.createTransform()),this.controlBox.appendChild(h.visual),h},p.prototype.positionGrips=function(){var h=this.controlGrips.topLeft.GRIP_SIZE,g=-h/2,y=g,d=(this.width+this.CB_DISTANCE)/2-h/2,L=(this.height+this.CB_DISTANCE)/2-h/2,fe=this.height+this.CB_DISTANCE-h/2,O=this.width+this.CB_DISTANCE-h/2;this.positionGrip(this.controlGrips.topLeft.visual,g,y),this.positionGrip(this.controlGrips.topCenter.visual,d,y),this.positionGrip(this.controlGrips.topRight.visual,O,y),this.positionGrip(this.controlGrips.centerLeft.visual,g,L),this.positionGrip(this.controlGrips.centerRight.visual,O,L),this.positionGrip(this.controlGrips.bottomLeft.visual,g,fe),this.positionGrip(this.controlGrips.bottomCenter.visual,d,fe),this.positionGrip(this.controlGrips.bottomRight.visual,O,fe),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,d,y-3*this.CB_DISTANCE)},p.prototype.positionGrip=function(h,g,y){var d=h.transform.baseVal.getItem(0);d.setTranslate(g,y),h.transform.baseVal.replaceItem(d,0)},p.prototype.hideControlBox=function(){this.controlBox.style.display="none"},p.prototype.showControlBox=function(){this.controlBox.style.display=""},p.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Ce.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Ce.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},S.prototype.getState.call(this))},p.prototype.restoreState=function(h){S.prototype.restoreState.call(this,h);var g=h;this.left=g.left,this.top=g.top,this.width=g.width,this.height=g.height,this.rotationAngle=g.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Ce.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,g.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Ce.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,g.containerTransformMatrix))},p.prototype.scale=function(h,g){S.prototype.scale.call(this,h,g);var y=this.rotatePoint({x:this.left,y:this.top}),d=this.unrotatePoint({x:y.x*h,y:y.y*g});this.left=d.x,this.top=d.y,this.width=this.width*h,this.height=this.height*g,this.adjustControlBox()},p}(_e),q=function(S){function p(h,g,y){var d=S.call(this,h,g,y)||this;return d.fillColor="transparent",d.strokeColor="transparent",d.strokeWidth=0,d.strokeDasharray="",d.opacity=1,d.setStrokeColor=d.setStrokeColor.bind(d),d.setFillColor=d.setFillColor.bind(d),d.setStrokeWidth=d.setStrokeWidth.bind(d),d.setStrokeDasharray=d.setStrokeDasharray.bind(d),d.createVisual=d.createVisual.bind(d),d}return j(p,S),p.prototype.ownsTarget=function(h){return!(!S.prototype.ownsTarget.call(this,h)&&h!==this.visual)},p.prototype.createVisual=function(){this.visual=N.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)},p.prototype.pointerDown=function(h,g){S.prototype.pointerDown.call(this,h,g),this.state==="new"&&(this.createVisual(),this.moveVisual(h),this._state="creating")},p.prototype.manipulate=function(h){S.prototype.manipulate.call(this,h)},p.prototype.resize=function(h){S.prototype.resize.call(this,h),this.setSize()},p.prototype.setSize=function(){S.prototype.setSize.call(this),N.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},p.prototype.pointerUp=function(h){S.prototype.pointerUp.call(this,h),this.setSize()},p.prototype.setStrokeColor=function(h){this.strokeColor=h,this.visual&&N.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(h),this.stateChanged()},p.prototype.setFillColor=function(h){this.fillColor=h,this.visual&&N.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},p.prototype.setStrokeWidth=function(h){this.strokeWidth=h,this.visual&&N.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},p.prototype.setStrokeDasharray=function(h){this.strokeDasharray=h,this.visual&&N.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},p.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},S.prototype.getState.call(this))},p.prototype.restoreState=function(h){var g=h;this.fillColor=g.fillColor,this.strokeColor=g.strokeColor,this.strokeWidth=g.strokeWidth,this.strokeDasharray=g.strokeDasharray,this.opacity=g.opacity,this.createVisual(),S.prototype.restoreState.call(this,h),this.setSize()},p.prototype.scale=function(h,g){S.prototype.scale.call(this,h,g),this.setSize()},p.title="Rectangle marker",p}(pe),_=function(S){function p(h,g,y,d){var L=S.call(this,h,d||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return L.widths=[],L.widthBoxes=[],L.widths=g,L.currentWidth=y,L.setCurrentWidth=L.setCurrentWidth.bind(L),L}return j(p,S),p.prototype.getUi=function(){var h=this,g=document.createElement("div");return g.style.display="flex",g.style.overflow="hidden",g.style.flexGrow="2",this.widths.forEach(function(y){var d=document.createElement("div");d.style.display="flex",d.style.flexGrow="2",d.style.alignItems="center",d.style.justifyContent="space-between",d.style.padding="5px",d.style.borderWidth="2px",d.style.borderStyle="solid",d.style.borderColor=y===h.currentWidth?h.uiStyleSettings.toolboxAccentColor:"transparent",d.addEventListener("click",function(){h.setCurrentWidth(y,d)}),g.appendChild(d);var L=document.createElement("div");L.innerText=y.toString(),L.style.marginRight="5px",d.appendChild(L);var fe=document.createElement("div");fe.style.minHeight="20px",fe.style.flexGrow="2",fe.style.display="flex",fe.style.alignItems="center";var O=document.createElement("hr");O.style.minWidth="20px",O.style.border="0px",O.style.borderTop=y+"px solid "+h.uiStyleSettings.toolboxColor,O.style.flexGrow="2",fe.appendChild(O),d.appendChild(fe),h.widthBoxes.push(d)}),g},p.prototype.setCurrentWidth=function(h,g){var y=this;this.currentWidth=h,this.widthBoxes.forEach(function(d){d.style.borderColor=d===g?y.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},p}(ue),ie=function(S){function p(h,g,y,d){var L=S.call(this,h,d||'<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 L.styles=[],L.styleBoxes=[],L.styles=g,L.currentStyle=y,L.setCurrentStyle=L.setCurrentStyle.bind(L),L}return j(p,S),p.prototype.getUi=function(){var h=this,g=document.createElement("div");return g.style.display="flex",g.style.overflow="hidden",g.style.flexGrow="2",this.styles.forEach(function(y){var d=document.createElement("div");d.style.display="flex",d.style.alignItems="center",d.style.justifyContent="space-between",d.style.padding="5px",d.style.borderWidth="2px",d.style.borderStyle="solid",d.style.overflow="hidden",d.style.maxWidth=100/h.styles.length-5+"%",d.style.borderColor=y===h.currentStyle?h.uiStyleSettings.toolboxAccentColor:"transparent",d.addEventListener("click",function(){h.setCurrentStyle(y,d)}),g.appendChild(d);var L=document.createElement("div");L.style.minHeight="20px",L.style.flexGrow="2",L.style.overflow="hidden";var fe=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+h.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(y!==""?'stroke-dasharray="'+y+'"':"")+` />
|
|
|
</svg>`;L.innerHTML=fe,d.appendChild(L),h.styleBoxes.push(d)}),g},p.prototype.setCurrentStyle=function(h,g){var y=this;this.currentStyle=h,this.styleBoxes.forEach(function(d){d.style.borderColor=d===g?y.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},p}(ue),ae=function(S){function p(h,g,y){var d=S.call(this,h,g,y)||this;return d.strokeColor=y.defaultColor,d.strokeWidth=y.defaultStrokeWidth,d.strokeDasharray=y.defaultStrokeDasharray,d.strokePanel=new de("Line color",y.defaultColorSet,y.defaultColor),d.strokePanel.onColorChanged=d.setStrokeColor,d.strokeWidthPanel=new _("Line width",y.defaultStrokeWidths,y.defaultStrokeWidth),d.strokeWidthPanel.onWidthChanged=d.setStrokeWidth,d.strokeStylePanel=new ie("Line style",y.defaultStrokeDasharrays,y.defaultStrokeDasharray),d.strokeStylePanel.onStyleChanged=d.setStrokeDasharray,d}return j(p,S),Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var h=S.prototype.getState.call(this);return h.typeName=p.typeName,h},p.typeName="FrameMarker",p.title="Frame marker",p.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',p}(q),Se=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"},se=function(S){function p(h,g,y){var d=S.call(this,h,g,y)||this;return d.x1=0,d.y1=0,d.x2=0,d.y2=0,d.defaultLength=50,d.manipulationStartX=0,d.manipulationStartY=0,d.manipulationStartX1=0,d.manipulationStartY1=0,d.manipulationStartX2=0,d.manipulationStartY2=0,d.setupControlBox(),d}return j(p,S),p.prototype.ownsTarget=function(h){return!!S.prototype.ownsTarget.call(this,h)||!(!this.grip1.ownsTarget(h)&&!this.grip2.ownsTarget(h))},p.prototype.pointerDown=function(h,g){S.prototype.pointerDown.call(this,h,g),this.manipulationStartX=h.x,this.manipulationStartY=h.y,this.state==="new"&&(this.x1=h.x,this.y1=h.y,this.x2=h.x,this.y2=h.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(g)?this.activeGrip=this.grip1:this.grip2.ownsTarget(g)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},p.prototype.pointerUp=function(h){var g=this.state;S.prototype.pointerUp.call(this,h),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(h),this._state="select",g==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},p.prototype.adjustVisual=function(){},p.prototype.manipulate=function(h){this.state==="creating"?this.resize(h):this.state==="move"?(this.x1=this.manipulationStartX1+h.x-this.manipulationStartX,this.y1=this.manipulationStartY1+h.y-this.manipulationStartY,this.x2=this.manipulationStartX2+h.x-this.manipulationStartX,this.y2=this.manipulationStartY2+h.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(h)},p.prototype.resize=function(h){switch(this.activeGrip){case this.grip1:this.x1=h.x,this.y1=h.y;break;case this.grip2:case void 0:this.x2=h.x,this.y2=h.y}this.adjustVisual(),this.adjustControlBox()},p.prototype.select=function(){S.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},p.prototype.deselect=function(){S.prototype.deselect.call(this),this.controlBox.style.display="none"},p.prototype.setupControlBox=function(){this.controlBox=N.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},p.prototype.adjustControlBox=function(){this.positionGrips()},p.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},p.prototype.createGrip=function(){var h=new Ue;return h.visual.transform.baseVal.appendItem(N.createTransform()),this.controlBox.appendChild(h.visual),h},p.prototype.positionGrips=function(){var h=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-h/2,this.y1-h/2),this.positionGrip(this.grip2.visual,this.x2-h/2,this.y2-h/2)},p.prototype.positionGrip=function(h,g,y){var d=h.transform.baseVal.getItem(0);d.setTranslate(g,y),h.transform.baseVal.replaceItem(d,0)},p.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},S.prototype.getState.call(this))},p.prototype.restoreState=function(h){S.prototype.restoreState.call(this,h);var g=h;this.x1=g.x1,this.y1=g.y1,this.x2=g.x2,this.y2=g.y2},p.prototype.scale=function(h,g){S.prototype.scale.call(this,h,g),this.x1=this.x1*h,this.y1=this.y1*g,this.x2=this.x2*h,this.y2=this.y2*g,this.adjustVisual(),this.adjustControlBox()},p}(_e),be=function(S){function p(h,g,y){var d=S.call(this,h,g,y)||this;return d.strokeColor="transparent",d.strokeWidth=0,d.strokeDasharray="",d.setStrokeColor=d.setStrokeColor.bind(d),d.setStrokeWidth=d.setStrokeWidth.bind(d),d.setStrokeDasharray=d.setStrokeDasharray.bind(d),d.strokeColor=y.defaultColor,d.strokeWidth=y.defaultStrokeWidth,d.strokeDasharray=y.defaultStrokeDasharray,d.strokePanel=new de("Line color",y.defaultColorSet,y.defaultColor),d.strokePanel.onColorChanged=d.setStrokeColor,d.strokeWidthPanel=new _("Line width",y.defaultStrokeWidths,y.defaultStrokeWidth),d.strokeWidthPanel.onWidthChanged=d.setStrokeWidth,d.strokeStylePanel=new ie("Line style",y.defaultStrokeDasharrays,y.defaultStrokeDasharray),d.strokeStylePanel.onStyleChanged=d.setStrokeDasharray,d}return j(p,S),p.prototype.ownsTarget=function(h){return!(!S.prototype.ownsTarget.call(this,h)&&h!==this.visual&&h!==this.selectorLine&&h!==this.visibleLine)},p.prototype.createVisual=function(){this.visual=N.createGroup(),this.selectorLine=N.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=N.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)},p.prototype.pointerDown=function(h,g){S.prototype.pointerDown.call(this,h,g),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},p.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()),N.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),N.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),N.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},p.prototype.setStrokeColor=function(h){this.strokeColor=h,this.adjustVisual(),this.colorChanged(h)},p.prototype.setStrokeWidth=function(h){this.strokeWidth=h,this.adjustVisual()},p.prototype.setStrokeDasharray=function(h){this.strokeDasharray=h,this.adjustVisual(),this.stateChanged()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var h=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},S.prototype.getState.call(this));return h.typeName=p.typeName,h},p.prototype.restoreState=function(h){S.prototype.restoreState.call(this,h);var g=h;this.strokeColor=g.strokeColor,this.strokeWidth=g.strokeWidth,this.strokeDasharray=g.strokeDasharray,this.createVisual(),this.adjustVisual()},p.typeName="LineMarker",p.title="Line marker",p.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',p}(se),D=function(S){function p(h,g,y,d){var L=S.call(this,h,d||'<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 L.fonts=[],L.fontBoxes=[],L.fonts=g,L.currentFont=y,L.setCurrentFont=L.setCurrentFont.bind(L),L}return j(p,S),p.prototype.getUi=function(){var h=this,g=document.createElement("div");return g.style.overflow="hidden",g.style.flexGrow="2",this.fonts.forEach(function(y){var d=document.createElement("div");d.style.display="inline-block",d.style.alignItems="center",d.style.justifyContent="space-between",d.style.padding="5px",d.style.borderWidth="2px",d.style.borderStyle="solid",d.style.overflow="hidden",d.style.maxWidth=100/h.fonts.length-5+"%",d.style.borderColor=y===h.currentFont?h.uiStyleSettings.toolboxAccentColor:"transparent",d.addEventListener("click",function(){h.setCurrentFont(y,d)}),g.appendChild(d);var L=document.createElement("div");L.style.display="flex",L.style.minHeight="20px",L.style.flexGrow="2",L.style.fontFamily=y,L.style.overflow="hidden";var fe=document.createElement("div");fe.style.whiteSpace="nowrap",fe.style.overflow="hidden",fe.style.textOverflow="ellipsis",fe.innerHTML="The quick brown fox jumps over the lazy dog",L.appendChild(fe),d.appendChild(L),h.fontBoxes.push(d)}),g},p.prototype.setCurrentFont=function(h,g){var y=this;this.currentFont=h,this.fontBoxes.forEach(function(d){d.style.borderColor=d===g?y.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},p}(ue),Le=function(S){function p(h,g,y){var d=S.call(this,h,g,y)||this;return d.color="transparent",d.padding=5,d.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",d.text=d.DEFAULT_TEXT,d.isMoved=!1,d.color=y.defaultColor,d.fontFamily=y.defaultFontFamily,d.defaultSize={x:100,y:30},d.setColor=d.setColor.bind(d),d.setFont=d.setFont.bind(d),d.renderText=d.renderText.bind(d),d.sizeText=d.sizeText.bind(d),d.textEditDivClicked=d.textEditDivClicked.bind(d),d.showTextEditor=d.showTextEditor.bind(d),d.setSize=d.setSize.bind(d),d.positionTextEditor=d.positionTextEditor.bind(d),d.colorPanel=new de("Color",y.defaultColorSet,y.defaultColor),d.colorPanel.onColorChanged=d.setColor,d.fontFamilyPanel=new D("Font",y.defaultFontFamilies,y.defaultFontFamily),d.fontFamilyPanel.onFontChanged=d.setFont,d}return j(p,S),p.prototype.ownsTarget=function(h){if(S.prototype.ownsTarget.call(this,h)||h===this.visual||h===this.textElement||h===this.bgRectangle)return!0;var g=!1;return this.textElement.childNodes.forEach(function(y){y===h&&(g=!0)}),g},p.prototype.createVisual=function(){this.visual=N.createGroup(),this.bgRectangle=N.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=N.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(N.createTransform()),this.textElement.transform.baseVal.appendItem(N.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},p.prototype.pointerDown=function(h,g){S.prototype.pointerDown.call(this,h,g),this.isMoved=!1,this.pointerDownPoint=h,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(h),this._state="creating")},p.prototype.renderText=function(){var h=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(g){h.textElement.appendChild(N.createTSpan(g.trim()===""?" ":g.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},p.prototype.getTextScale=function(){var h=this.textElement.getBBox(),g=1;if(h.width>0&&h.height>0){var y=(1*this.width-this.width*this.padding*2/100)/h.width,d=(1*this.height-this.height*this.padding*2/100)/h.height;g=Math.min(y,d)}return g},p.prototype.getTextPosition=function(h){var g=this.textElement.getBBox(),y=0,d=0;return g.width>0&&g.height>0&&(y=(this.width-g.width*h)/2,d=this.height/2-g.height*h/2),{x:y,y:d}},p.prototype.sizeText=function(){var h=this.textElement.getBBox(),g=this.getTextScale(),y=this.getTextPosition(g);y.y-=h.y*g,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+y.x+"px, "+y.y+"px) scale("+g+", "+g+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(y.x,y.y),this.textElement.transform.baseVal.getItem(1).setScale(g,g))},p.prototype.manipulate=function(h){S.prototype.manipulate.call(this,h),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(h.x-this.pointerDownPoint.x)>5||Math.abs(h.y-this.pointerDownPoint.y)>5)},p.prototype.resize=function(h){S.prototype.resize.call(this,h),this.isMoved=!0,this.setSize(),this.sizeText()},p.prototype.setSize=function(){S.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(N.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),N.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},p.prototype.pointerUp=function(h){var g=this.state;g==="creating"&&(this._suppressMarkerCreateEvent=!0),S.prototype.pointerUp.call(this,h),this.setSize(),(g==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},p.prototype.showTextEditor=function(){var h=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(g){g.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var g=Number.parseFloat(h.textEditor.style.fontSize);h.textEditor.clientWidth>=Number.parseInt(h.textEditor.style.maxWidth)&&g>.9;)g-=.1,h.textEditor.style.fontSize=Math.max(g,.9)+"em"}),this.textEditor.addEventListener("keyup",function(g){g.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(g){if(g.clipboardData){var y=g.clipboardData.getData("text"),d=window.getSelection();if(!d.rangeCount)return!1;d.deleteFromDocument(),d.getRangeAt(0).insertNode(document.createTextNode(y)),g.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){h.textEditDivClicked(h.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},p.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var h=this.getTextScale(),g=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),y=this.textElement.getBBox(),d={x:y.width*h,y:y.height*h};g.x-=d.x/2,g.y-=d.y/2,this.textEditor.style.top=g.y+"px",this.textEditor.style.left=g.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-g.x+"px",this.textEditor.style.fontSize=Math.max(16*h,12)+"px",this.textElement.style.display="none"}},p.prototype.textEditDivClicked=function(h){this.text=h.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},p.prototype.select=function(){S.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},p.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),S.prototype.deselect.call(this)},p.prototype.dblClick=function(h,g){S.prototype.dblClick.call(this,h,g),this.showTextEditor()},p.prototype.setColor=function(h){this.textElement&&N.setAttributes(this.textElement,[["fill",h]]),this.color=h,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(h)},p.prototype.setFont=function(h){this.textElement&&N.setAttributes(this.textElement,[["font-family",h]]),this.fontFamily=h,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},p.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},p.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var h=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},S.prototype.getState.call(this));return h.typeName=p.typeName,h},p.prototype.restoreState=function(h){var g=h;this.color=g.color,this.fontFamily=g.fontFamily,this.padding=g.padding,this.text=g.text,this.createVisual(),S.prototype.restoreState.call(this,h),this.setSize()},p.prototype.scale=function(h,g){S.prototype.scale.call(this,h,g),this.setSize(),this.sizeText(),this.positionTextEditor()},p.typeName="TextMarker",p.title="Text marker",p.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>',p}(pe),z=function(S){function p(h,g,y){var d=S.call(this,h,g,y)||this;return d.color="transparent",d.lineWidth=3,d.drawing=!1,d.pixelRatio=1,d.color=y.defaultColor,d.lineWidth=y.defaultStrokeWidth,d.pixelRatio=y.freehandPixelRatio,d.setColor=d.setColor.bind(d),d.addCanvas=d.addCanvas.bind(d),d.finishCreation=d.finishCreation.bind(d),d.setLineWidth=d.setLineWidth.bind(d),d.colorPanel=new de("Color",y.defaultColorSet,y.defaultColor),d.colorPanel.onColorChanged=d.setColor,d.lineWidthPanel=new _("Line width",y.defaultStrokeWidths,y.defaultStrokeWidth),d.lineWidthPanel.onWidthChanged=d.setLineWidth,d}return j(p,S),p.prototype.ownsTarget=function(h){return!(!S.prototype.ownsTarget.call(this,h)&&h!==this.visual&&h!==this.drawingImage)},p.prototype.createVisual=function(){this.visual=N.createGroup(),this.drawingImage=N.createImage(),this.visual.appendChild(this.drawingImage);var h=N.createTransform();this.visual.transform.baseVal.appendItem(h),this.addMarkerVisualToContainer(this.visual)},p.prototype.pointerDown=function(h,g){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(h.x,h.y),this.drawing=!0):S.prototype.pointerDown.call(this,h,g)},p.prototype.manipulate=function(h){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(h.x,h.y),this.canvasContext.stroke()):S.prototype.manipulate.call(this,h)},p.prototype.resize=function(h){S.prototype.resize.call(this,h),N.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),N.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},p.prototype.pointerUp=function(h){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):S.prototype.pointerUp.call(this,h)},p.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)},p.prototype.select=function(){this.state==="creating"&&this.finishCreation(),S.prototype.select.call(this)},p.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),S.prototype.deselect.call(this)},p.prototype.finishCreation=function(){for(var h=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),g=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],y=g[0],d=g[1],L=g[2],fe=g[3],O=!1,I=0;I<this.canvasElement.height;I++)for(var he=0;he<this.canvasElement.width;he++)h.data[I*this.canvasElement.width*4+4*he+3]>0&&(O=!0,I<d&&(d=I),he<y&&(y=he),I>fe&&(fe=I),he>L&&(L=he));if(O){this.left=y/this.pixelRatio,this.top=d/this.pixelRatio,this.width=(L-y)/this.pixelRatio,this.height=(fe-d)/this.pixelRatio;var Y=document.createElement("canvas");Y.width=L-y,Y.height=fe-d,Y.getContext("2d").putImageData(this.canvasContext.getImageData(y,d,L-y,fe-d),0,0),this.drawingImgUrl=Y.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},p.prototype.setDrawingImage=function(){N.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),N.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},p.prototype.setColor=function(h){this.color=h,this.colorChanged(h)},p.prototype.setLineWidth=function(h){this.lineWidth=h},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var h=Object.assign({drawingImgUrl:this.drawingImgUrl},S.prototype.getState.call(this));return h.typeName=p.typeName,h},p.prototype.restoreState=function(h){this.createVisual(),S.prototype.restoreState.call(this,h),this.drawingImgUrl=h.drawingImgUrl,this.setDrawingImage()},p.prototype.scale=function(h,g){S.prototype.scale.call(this,h,g),this.setDrawingImage()},p.typeName="FreehandMarker",p.title="Freehand marker",p.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>',p}(pe),we=function(S){function p(h,g,y){var d=S.call(this,h,y||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return d.typeBoxes=[],d.currentType=g,d.setCurrentType=d.setCurrentType.bind(d),d}return j(p,S),p.prototype.getUi=function(){var h=this,g=document.createElement("div");g.style.display="flex",g.style.overflow="hidden",g.style.flexGrow="2";for(var y=function(fe){var O="both";switch(fe){case 0:O="both";break;case 1:O="start";break;case 2:O="end";break;case 3:O="none"}var I=document.createElement("div");if(I.style.display="flex",I.style.flexGrow="2",I.style.alignItems="center",I.style.justifyContent="space-between",I.style.padding="5px",I.style.borderWidth="2px",I.style.borderStyle="solid",I.style.borderColor=O===d.currentType?d.uiStyleSettings.toolboxAccentColor:"transparent",I.addEventListener("click",function(){h.setCurrentType(O,I)}),g.appendChild(I),O==="both"||O==="start"){var he=document.createElement("div");he.style.display="flex",he.style.alignItems="center",he.style.minHeight="20px",he.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="`+(d.uiStyleSettings!==void 0?d.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,he.style.marginLeft="5px",I.appendChild(he)}var Y=document.createElement("div");Y.style.display="flex",Y.style.alignItems="center",Y.style.minHeight="20px",Y.style.flexGrow="2";var U=document.createElement("hr");if(U.style.minWidth="20px",U.style.border="0px",U.style.borderTop="3px solid "+(d.uiStyleSettings!==void 0?d.uiStyleSettings.toolboxColor:"#eeeeee"),U.style.flexGrow="2",Y.appendChild(U),I.appendChild(Y),O==="both"||O==="end"){var ye=document.createElement("div");ye.style.display="flex",ye.style.alignItems="center",ye.style.minHeight="20px",ye.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="`+(d.uiStyleSettings!==void 0?d.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,ye.style.marginRight="5px",I.appendChild(ye)}d.typeBoxes.push(I)},d=this,L=0;L<4;L++)y(L);return g},p.prototype.setCurrentType=function(h,g){var y=this;this.currentType=h,this.typeBoxes.forEach(function(d){d.style.borderColor=d===g?y.uiStyleSettings!==void 0?y.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},p}(ue),ge=function(S){function p(h,g,y){var d=S.call(this,h,g,y)||this;return d.arrowType="end",d.arrowBaseHeight=10,d.arrowBaseWidth=10,d.getArrowPoints=d.getArrowPoints.bind(d),d.setArrowType=d.setArrowType.bind(d),d.arrowTypePanel=new we("Arrow type","end"),d.arrowTypePanel.onArrowTypeChanged=d.setArrowType,d}return j(p,S),p.prototype.ownsTarget=function(h){return!(!S.prototype.ownsTarget.call(this,h)&&h!==this.arrow1&&h!==this.arrow2)},p.prototype.getArrowPoints=function(h,g){var y=this.arrowBaseWidth+2*this.strokeWidth,d=this.arrowBaseHeight+2*this.strokeWidth;return h-y/2+","+(g+d/2)+" "+h+","+(g-d/2)+" "+(h+y/2)+","+(g+d/2)},p.prototype.createTips=function(){this.arrow1=N.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(N.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=N.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(N.createTransform()),this.visual.appendChild(this.arrow2)},p.prototype.pointerDown=function(h,g){S.prototype.pointerDown.call(this,h,g),this.state==="creating"&&this.createTips()},p.prototype.adjustVisual=function(){if(S.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",N.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),N.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var h=0;Math.abs(this.x1-this.x2)>.1&&(h=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var g=this.arrow1.transform.baseVal.getItem(0);g.setRotate(h,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(g,0);var y=this.arrow2.transform.baseVal.getItem(0);y.setRotate(h+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(y,0)}},p.prototype.setArrowType=function(h){this.arrowType=h,this.adjustVisual(),this.stateChanged()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var h=Object.assign({arrowType:this.arrowType},S.prototype.getState.call(this));return h.typeName=p.typeName,h},p.prototype.restoreState=function(h){S.prototype.restoreState.call(this,h);var g=h;this.arrowType=g.arrowType,this.createTips(),this.adjustVisual()},p.typeName="ArrowMarker",p.title="Arrow marker",p.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',p}(be),Te=function(S){function p(h,g,y){var d=S.call(this,h,g,y)||this;return d.fillColor=y.defaultFillColor,d.strokeWidth=0,d.fillPanel=new de("Color",y.defaultColorSet,y.defaultFillColor),d.fillPanel.onColorChanged=d.setFillColor,d}return j(p,S),Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var h=S.prototype.getState.call(this);return h.typeName=p.typeName,h},p.typeName="CoverMarker",p.title="Cover marker",p.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',p}(q),Fe=function(S){function p(h,g,y,d){var L=S.call(this,h,d||'<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 L.opacities=[],L.opacityBoxes=[],L.opacities=g,L.currentOpacity=y,L.setCurrentOpacity=L.setCurrentOpacity.bind(L),L}return j(p,S),p.prototype.getUi=function(){var h=this,g=document.createElement("div");return g.style.display="flex",g.style.overflow="hidden",g.style.flexGrow="2",g.style.justifyContent="space-between",this.opacities.forEach(function(y){var d=document.createElement("div");d.style.display="flex",d.style.alignItems="center",d.style.justifyContent="center",d.style.padding="5px",d.style.borderWidth="2px",d.style.borderStyle="solid",d.style.borderColor=y===h.currentOpacity?h.uiStyleSettings.toolboxAccentColor:"transparent",d.addEventListener("click",function(){h.setCurrentOpacity(y,d)}),g.appendChild(d);var L=document.createElement("div");L.innerText=100*y+"%",d.appendChild(L),h.opacityBoxes.push(d)}),g},p.prototype.setCurrentOpacity=function(h,g){var y=this;this.currentOpacity=h,this.opacityBoxes.forEach(function(d){d.style.borderColor=d===g?y.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},p}(ue),Re=function(S){function p(h,g,y){var d=S.call(this,h,g,y)||this;return d.setOpacity=d.setOpacity.bind(d),d.fillColor=y.defaultHighlightColor,d.strokeWidth=0,d.opacity=y.defaultHighlightOpacity,d.fillPanel=new de("Color",y.defaultColorSet,d.fillColor),d.fillPanel.onColorChanged=d.setFillColor,d.opacityPanel=new Fe("Opacity",y.defaultOpacitySteps,d.opacity),d.opacityPanel.onOpacityChanged=d.setOpacity,d}return j(p,S),p.prototype.setOpacity=function(h){this.opacity=h,this.visual&&N.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var h=S.prototype.getState.call(this);return h.typeName=p.typeName,h},p.typeName="HighlightMarker",p.title="Highlight marker",p.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>',p}(Te),X='<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>',w='<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>',ve=function(S){function p(h,g,y){var d=S.call(this,h,g,y)||this;return d.bgColor="transparent",d.tipPosition={x:0,y:0},d.tipBase1Position={x:0,y:0},d.tipBase2Position={x:0,y:0},d.tipMoving=!1,d.color=y.defaultStrokeColor,d.bgColor=y.defaultFillColor,d.fontFamily=y.defaultFontFamily,d.defaultSize={x:100,y:30},d.setBgColor=d.setBgColor.bind(d),d.getTipPoints=d.getTipPoints.bind(d),d.positionTip=d.positionTip.bind(d),d.setTipPoints=d.setTipPoints.bind(d),d.colorPanel=new de("Text color",y.defaultColorSet,d.color,X),d.colorPanel.onColorChanged=d.setColor,d.bgColorPanel=new de("Fill color",y.defaultColorSet,d.bgColor,w),d.bgColorPanel.onColorChanged=d.setBgColor,d.fontFamilyPanel=new D("Font",y.defaultFontFamilies,y.defaultFontFamily),d.fontFamilyPanel.onFontChanged=d.setFont,d.tipGrip=new Ue,d.tipGrip.visual.transform.baseVal.appendItem(N.createTransform()),d.controlBox.appendChild(d.tipGrip.visual),d}return j(p,S),p.prototype.ownsTarget=function(h){return S.prototype.ownsTarget.call(this,h)||this.tipGrip.ownsTarget(h)||this.tip===h},p.prototype.createTip=function(){N.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=N.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},p.prototype.pointerDown=function(h,g){this.state==="new"&&S.prototype.pointerDown.call(this,h,g),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(g)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):S.prototype.pointerDown.call(this,h,g)},p.prototype.pointerUp=function(h){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,S.prototype.pointerUp.call(this,h);else{var g=this.state==="creating";S.prototype.pointerUp.call(this,h),this.setTipPoints(g),this.positionTip()}},p.prototype.manipulate=function(h){if(this.tipMoving){var g=this.unrotatePoint(h);this.tipPosition={x:g.x-this.manipulationStartLeft,y:g.y-this.manipulationStartTop},this.positionTip()}else S.prototype.manipulate.call(this,h)},p.prototype.setBgColor=function(h){this.bgRectangle&&this.tip&&(N.setAttributes(this.bgRectangle,[["fill",h]]),N.setAttributes(this.tip,[["fill",h]])),this.bgColor=h,this.fillColorChanged(h)},p.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},p.prototype.setTipPoints=function(h){h===void 0&&(h=!1);var g=Math.min(this.height/2,15),y=this.height/5;h&&(this.tipPosition={x:g+y/2,y:this.height+20});var d=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?d<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(y=this.width/5,g=Math.min(this.width/2,15),this.tipBase1Position={x:g,y:0},this.tipBase2Position={x:g+y,y:0}):(this.tipBase1Position={x:0,y:g},this.tipBase2Position={x:0,y:g+y}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?d<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(y=this.width/5,g=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-g-y,y:0},this.tipBase2Position={x:this.width-g,y:0}):(this.tipBase1Position={x:this.width,y:g},this.tipBase2Position={x:this.width,y:g+y}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?d<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(y=this.width/5,g=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-g-y,y:this.height},this.tipBase2Position={x:this.width-g,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-g-y},this.tipBase2Position={x:this.width,y:this.height-g}):d<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(y=this.width/5,g=Math.min(this.width/2,15),this.tipBase1Position={x:g,y:this.height},this.tipBase2Position={x:g+y,y:this.height}):(this.tipBase1Position={x:0,y:this.height-g},this.tipBase2Position={x:0,y:this.height-g-y})},p.prototype.resize=function(h){S.prototype.resize.call(this,h),this.positionTip()},p.prototype.positionTip=function(){N.setAttributes(this.tip,[["points",this.getTipPoints()]]);var h=this.tipGrip.visual.transform.baseVal.getItem(0);h.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(h,0)},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),p.prototype.select=function(){this.positionTip(),S.prototype.select.call(this)},p.prototype.getState=function(){var h=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},S.prototype.getState.call(this));return h.typeName=p.typeName,h},p.prototype.restoreState=function(h){var g=h;this.bgColor=g.bgColor,this.tipPosition=g.tipPosition,S.prototype.restoreState.call(this,h),this.createTip(),this.setTipPoints()},p.prototype.scale=function(h,g){S.prototype.scale.call(this,h,g),this.tipPosition={x:this.tipPosition.x*h,y:this.tipPosition.y*g},this.positionTip()},p.typeName="CalloutMarker",p.title="Callout marker",p.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>',p}(Le),Qe=function(S){function p(h,g,y){var d=S.call(this,h,g,y)||this;return d.fillColor="transparent",d.strokeColor="transparent",d.strokeWidth=0,d.strokeDasharray="",d.opacity=1,d.strokeColor=y.defaultColor,d.strokeWidth=y.defaultStrokeWidth,d.strokeDasharray=y.defaultStrokeDasharray,d.fillColor=y.defaultFillColor,d.setStrokeColor=d.setStrokeColor.bind(d),d.setFillColor=d.setFillColor.bind(d),d.setStrokeWidth=d.setStrokeWidth.bind(d),d.setStrokeDasharray=d.setStrokeDasharray.bind(d),d.setOpacity=d.setOpacity.bind(d),d.createVisual=d.createVisual.bind(d),d.strokePanel=new de("Line color",R(y.defaultColorSet,["transparent"]),y.defaultColor),d.strokePanel.onColorChanged=d.setStrokeColor,d.fillPanel=new de("Fill color",R(y.defaultColorSet,["transparent"]),d.fillColor,w),d.fillPanel.onColorChanged=d.setFillColor,d.strokeWidthPanel=new _("Line width",y.defaultStrokeWidths,y.defaultStrokeWidth),d.strokeWidthPanel.onWidthChanged=d.setStrokeWidth,d.strokeStylePanel=new ie("Line style",y.defaultStrokeDasharrays,y.defaultStrokeDasharray),d.strokeStylePanel.onStyleChanged=d.setStrokeDasharray,d.opacityPanel=new Fe("Opacity",y.defaultOpacitySteps,d.opacity),d.opacityPanel.onOpacityChanged=d.setOpacity,d}return j(p,S),p.prototype.ownsTarget=function(h){return!(!S.prototype.ownsTarget.call(this,h)&&h!==this.visual)},p.prototype.createVisual=function(){this.visual=N.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)},p.prototype.pointerDown=function(h,g){S.prototype.pointerDown.call(this,h,g),this.state==="new"&&(this.createVisual(),this.moveVisual(h),this._state="creating")},p.prototype.manipulate=function(h){S.prototype.manipulate.call(this,h)},p.prototype.resize=function(h){S.prototype.resize.call(this,h),this.setSize()},p.prototype.setSize=function(){S.prototype.setSize.call(this),N.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},p.prototype.pointerUp=function(h){S.prototype.pointerUp.call(this,h),this.setSize()},p.prototype.setStrokeColor=function(h){this.strokeColor=h,this.visual&&N.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(h),this.stateChanged()},p.prototype.setFillColor=function(h){this.fillColor=h,this.visual&&N.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(h),this.stateChanged()},p.prototype.setStrokeWidth=function(h){this.strokeWidth=h,this.visual&&N.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},p.prototype.setStrokeDasharray=function(h){this.strokeDasharray=h,this.visual&&N.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},p.prototype.setOpacity=function(h){this.opacity=h,this.visual&&N.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var h=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},S.prototype.getState.call(this));return h.typeName=p.typeName,h},p.prototype.restoreState=function(h){var g=h;this.fillColor=g.fillColor,this.strokeColor=g.strokeColor,this.strokeWidth=g.strokeWidth,this.strokeDasharray=g.strokeDasharray,this.opacity=g.opacity,this.createVisual(),S.prototype.restoreState.call(this,h),this.setSize()},p.prototype.scale=function(h,g){S.prototype.scale.call(this,h,g),this.setSize()},p.typeName="EllipseMarker",p.title="Ellipse marker",p.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>',p}(pe),je=function(S){function p(h,g,y){return S.call(this,h,g,y)||this}return j(p,S),Object.defineProperty(p.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),p.prototype.ownsTarget=function(h){return!(!S.prototype.ownsTarget.call(this,h)&&h!==this.tip1&&h!==this.tip2)},p.prototype.createTips=function(){this.tip1=N.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(N.createTransform()),this.visual.appendChild(this.tip1),this.tip2=N.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(N.createTransform()),this.visual.appendChild(this.tip2)},p.prototype.pointerDown=function(h,g){S.prototype.pointerDown.call(this,h,g),this.state==="creating"&&this.createTips()},p.prototype.adjustVisual=function(){if(S.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(N.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()]]),N.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 h=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),g=this.tip1.transform.baseVal.getItem(0);g.setRotate(h,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(g,0);var y=this.tip2.transform.baseVal.getItem(0);y.setRotate(h+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(y,0)}},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var h=S.prototype.getState.call(this);return h.typeName=p.typeName,h},p.prototype.restoreState=function(h){S.prototype.restoreState.call(this,h),this.createTips(),this.adjustVisual()},p.typeName="MeasurementMarker",p.title="Measurement marker",p.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>',p}(be),Be=function(S){function p(h,g,y){var d=S.call(this,h,g,y)||this;return d.strokePanel.colors=y.defaultColorSet,d.fillColor="transparent",d}return j(p,S),Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var h=S.prototype.getState.call(this);return h.typeName=p.typeName,h},p.typeName="EllipseFrameMarker",p.title="Ellipse frame marker",p.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>',p}(Qe),Oe=function(){function S(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(S.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),S.prototype.addUndoStep=function(p){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(p)||(this.undoStack.push(p),JSON.stringify(this.lastRedoStep)!==JSON.stringify(p)&&this.redoStack.splice(0,this.redoStack.length))},S.prototype.replaceLastUndoStep=function(p){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=p)},S.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},S.prototype.undo=function(){if(this.undoStack.length>1){var p=this.undoStack.pop();return p!==void 0&&this.redoStack.push(p),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},S.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},S}(),lt=function(S){function p(h,g,y){var d=S.call(this,h,g,y)||this;return d.strokeColor="transparent",d.strokeWidth=0,d.strokeDasharray="",d.curveX=0,d.curveY=0,d.manipulationStartCurveX=0,d.manipulationStartCurveY=0,d.setStrokeColor=d.setStrokeColor.bind(d),d.setStrokeWidth=d.setStrokeWidth.bind(d),d.setStrokeDasharray=d.setStrokeDasharray.bind(d),d.positionGrips=d.positionGrips.bind(d),d.addControlGrips=d.addControlGrips.bind(d),d.adjustVisual=d.adjustVisual.bind(d),d.setupControlBox=d.setupControlBox.bind(d),d.resize=d.resize.bind(d),d.strokeColor=y.defaultColor,d.strokeWidth=y.defaultStrokeWidth,d.strokeDasharray=y.defaultStrokeDasharray,d.strokePanel=new de("Line color",y.defaultColorSet,y.defaultColor),d.strokePanel.onColorChanged=d.setStrokeColor,d.strokeWidthPanel=new _("Line width",y.defaultStrokeWidths,y.defaultStrokeWidth),d.strokeWidthPanel.onWidthChanged=d.setStrokeWidth,d.strokeStylePanel=new ie("Line style",y.defaultStrokeDasharrays,y.defaultStrokeDasharray),d.strokeStylePanel.onStyleChanged=d.setStrokeDasharray,d}return j(p,S),p.prototype.ownsTarget=function(h){return!(!S.prototype.ownsTarget.call(this,h)&&h!==this.visual&&h!==this.selectorCurve&&h!==this.visibleCurve&&!this.curveGrip.ownsTarget(h))},p.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},p.prototype.createVisual=function(){this.visual=N.createGroup(),this.selectorCurve=N.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=N.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)},p.prototype.pointerDown=function(h,g){S.prototype.pointerDown.call(this,h,g),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=h.x,this.curveY=h.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(g)&&(this.activeGrip=this.curveGrip,this._state="resize")},p.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),N.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),N.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),N.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},p.prototype.setupControlBox=function(){S.prototype.setupControlBox.call(this),this.curveControlLine1=N.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=N.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)},p.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,S.prototype.addControlGrips.call(this)},p.prototype.positionGrips=function(){S.prototype.positionGrips.call(this);var h=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-h/2,this.curveY-h/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()))},p.prototype.manipulate=function(h){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+h.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+h.y-this.manipulationStartY),S.prototype.manipulate.call(this,h)},p.prototype.resize=function(h){this.activeGrip===this.curveGrip&&(this.curveX=h.x,this.curveY=h.y),S.prototype.resize.call(this,h),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},p.prototype.setStrokeColor=function(h){this.strokeColor=h,this.adjustVisual(),this.colorChanged(h)},p.prototype.setStrokeWidth=function(h){this.strokeWidth=h,this.adjustVisual()},p.prototype.setStrokeDasharray=function(h){this.strokeDasharray=h,this.adjustVisual()},p.prototype.scale=function(h,g){this.curveX=this.curveX*h,this.curveY=this.curveY*g,S.prototype.scale.call(this,h,g)},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var h=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},S.prototype.getState.call(this));return h.typeName=p.typeName,h},p.prototype.restoreState=function(h){S.prototype.restoreState.call(this,h);var g=h;this.strokeColor=g.strokeColor,this.strokeWidth=g.strokeWidth,this.strokeDasharray=g.strokeDasharray,this.curveX=g.curveX,this.curveY=g.curveY,this.createVisual(),this.adjustVisual()},p.typeName="CurveMarker",p.title="Curve marker",p.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>',p}(se),$t=function(S){function p(h,g,y){var d=S.call(this,h,g,y)||this;return d.fillColor="transparent",d.strokeColor="transparent",d.strokeWidth=0,d.strokeDasharray="",d.textColor="transparent",d.fontSize="1rem",d.isMoved=!1,d.captionText="Caption",d.PADDING=5,d.captionBoxWidth=0,d.captionBoxHeight=0,d.strokeColor=y.defaultColor,d.strokeWidth=y.defaultStrokeWidth,d.strokeDasharray=y.defaultStrokeDasharray,d.fillColor=y.defaultFillColor,d.textColor=y.defaultStrokeColor,d.fontFamily=y.defaultFontFamily,d.fontSize=y.defaultCaptionFontSize,d.captionText=y.defaultCaptionText,d.setStrokeColor=d.setStrokeColor.bind(d),d.setFillColor=d.setFillColor.bind(d),d.setStrokeWidth=d.setStrokeWidth.bind(d),d.setStrokeDasharray=d.setStrokeDasharray.bind(d),d.createVisual=d.createVisual.bind(d),d.sizeCaption=d.sizeCaption.bind(d),d.setCaptionText=d.setCaptionText.bind(d),d.showTextEditor=d.showTextEditor.bind(d),d.positionTextEditor=d.positionTextEditor.bind(d),d.finishTextEditing=d.finishTextEditing.bind(d),d.setFont=d.setFont.bind(d),d.setTextColor=d.setTextColor.bind(d),d.strokePanel=new de("Line color",R(y.defaultColorSet,["transparent"]),d.strokeColor),d.strokePanel.onColorChanged=d.setStrokeColor,d.fillPanel=new de("Fill color",R(y.defaultColorSet,["transparent"]),d.fillColor,w),d.fillPanel.onColorChanged=d.setFillColor,d.strokeWidthPanel=new _("Line width",y.defaultStrokeWidths,y.defaultStrokeWidth),d.strokeWidthPanel.onWidthChanged=d.setStrokeWidth,d.strokeStylePanel=new ie("Line style",y.defaultStrokeDasharrays,y.defaultStrokeDasharray),d.strokeStylePanel.onStyleChanged=d.setStrokeDasharray,d.fontFamilyPanel=new D("Font",y.defaultFontFamilies,y.defaultFontFamily),d.fontFamilyPanel.onFontChanged=d.setFont,d.textColorPanel=new de("Text color",y.defaultColorSet,d.textColor,X),d.textColorPanel.onColorChanged=d.setTextColor,d}return j(p,S),p.prototype.ownsTarget=function(h){return!(!S.prototype.ownsTarget.call(this,h)&&h!==this.visual&&h!==this.frame&&h!==this.captionBg&&h!==this.captionElement)},p.prototype.createVisual=function(){this.visual=N.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=N.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=N.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=N.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()},p.prototype.setCaptionText=function(h){this.captionText=h,this.captionElement.textContent=this.captionText,this.sizeCaption()},p.prototype.pointerDown=function(h,g){S.prototype.pointerDown.call(this,h,g),this.isMoved=!1,this.pointerDownPoint=h,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(h),this._state="creating")},p.prototype.manipulate=function(h){S.prototype.manipulate.call(this,h),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(h.x-this.pointerDownPoint.x)>5||Math.abs(h.y-this.pointerDownPoint.y)>5)},p.prototype.resize=function(h){S.prototype.resize.call(this,h),this.setSize()},p.prototype.sizeCaption=function(){var h=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=h.width+2*this.PADDING,this.captionBoxHeight=h.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),N.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')"]]),N.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')"]])},p.prototype.showTextEditor=function(){var h=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(g){g.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(g){g.key==="Enter"&&h.finishTextEditing(h.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(g){g.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){h.finishTextEditing(h.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){h.finishTextEditing(h.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},p.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"))},p.prototype.finishTextEditing=function(h){this.setCaptionText(h.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},p.prototype.setFont=function(h){this.captionElement&&N.setAttributes(this.captionElement,[["font-family",h]]),this.fontFamily=h,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},p.prototype.setTextColor=function(h){this.captionElement&&N.setAttributes(this.captionElement,[["fill",h]]),this.textColor=h,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},p.prototype.setSize=function(){S.prototype.setSize.call(this),N.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},p.prototype.pointerUp=function(h){S.prototype.pointerUp.call(this,h),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},p.prototype.dblClick=function(h,g){S.prototype.dblClick.call(this,h,g),this.showTextEditor()},p.prototype.setStrokeColor=function(h){this.strokeColor=h,this.frame&&N.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(h),this.stateChanged()},p.prototype.setFillColor=function(h){this.fillColor=h,this.captionBg&&N.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(h),this.stateChanged()},p.prototype.setStrokeWidth=function(h){this.strokeWidth=h,this.frame&&N.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},p.prototype.setStrokeDasharray=function(h){this.strokeDasharray=h,this.frame&&N.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(p.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),p.prototype.getState=function(){var h=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},S.prototype.getState.call(this));return h.typeName=this.typeName,h},p.prototype.restoreState=function(h){var g=h;this.fillColor=g.fillColor,this.strokeColor=g.strokeColor,this.strokeWidth=g.strokeWidth,this.strokeDasharray=g.strokeDasharray,this.textColor=g.textColor,this.fontFamily=g.fontFamily,this.captionText=g.captionText,this.fontSize=g.fontSize,this.createVisual(),S.prototype.restoreState.call(this,h),this.setSize()},p.prototype.scale=function(h,g){S.prototype.scale.call(this,h,g),this.setSize()},p.typeName="CaptionFrameMarker",p.title="Caption frame marker",p.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>',p}(pe),vt=function(){function S(p,h){h===void 0&&(h=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=p,this.cancelable=h}return Object.defineProperty(S.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),S.prototype.preventDefault=function(){this._defaultPrevented=!0},S}(),Tt=function(S){function p(h,g,y){var d=S.call(this,h,!1)||this;return d.dataUrl=g,d.state=y,d}return j(p,S),p}(vt),wt=function(S){function p(h,g,y){y===void 0&&(y=!1);var d=S.call(this,h,y)||this;return d.marker=g,d}return j(p,S),p}(vt),pt=function(){function S(){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 S.prototype.addEventListener=function(p,h){this[p].push(h)},S.prototype.removeEventListener=function(p,h){var g=this[p].indexOf(h);g>-1&&this[p].splice(g,1)},S}(),at=function(){function S(p){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Se,this._isOpen=!1,this.undoRedoManager=new Oe,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 pt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=S.instanceCounter++,this.styles=new V(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=p,this.targetRoot=document.body,this.width=p.clientWidth,this.height=p.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(S.prototype,"ALL_MARKER_TYPES",{get:function(){return[ae,z,ge,Le,Be,Qe,Re,ve,je,Te,be,lt,$t]},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ae,z,ge,Le,Qe,Re,ve]},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ae,z,ge,Le,Re]},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(p){var h=this;this._availableMarkerTypes.splice(0),p.forEach(function(g){if(typeof g=="string"){var y=h.ALL_MARKER_TYPES.find(function(d){return d.typeName===g});y!==void 0&&h._availableMarkerTypes.push(y)}else h._availableMarkerTypes.push(g)})},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(p){this._zoomLevel=p,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(S.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),S.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),x.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},S.prototype.show=function(){var p=this;this.styles.styleSheetRoot===void 0&&F.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=F.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(h){return h(new vt(p))})},S.prototype.render=function(){return A(this,void 0,void 0,function(){var p;return xe(this,function(h){switch(h.label){case 0:return this.setCurrentMarker(),(p=new E).naturalSize=this.renderAtNaturalSize,p.imageType=this.renderImageType,p.imageQuality=this.renderImageQuality,p.markersOnly=this.renderMarkersOnly,p.width=this.renderWidth,p.height=this.renderHeight,[4,p.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return h.sent(),[4,p.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,h.sent()]}})})},S.prototype.close=function(p){var h=this;if(p===void 0&&(p=!1),this.isOpen){var g=!1;p||this.eventListeners.beforeclose.forEach(function(y){var d=new vt(h,!0);y(d),d.defaultPrevented&&(g=!0)}),g||(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(y){return y(new vt(h))}),this.detachEvents(),this._isOpen=!1)}},S.prototype.addMarkersToToolbar=function(){for(var p,h=[],g=0;g<arguments.length;g++)h[g]=arguments[g];(p=this._availableMarkerTypes).push.apply(p,h)},S.prototype.addRenderEventListener=function(p){this.addEventListener("render",function(h){p(h.dataUrl,h.state)})},S.prototype.removeRenderEventListener=function(p){},S.prototype.addCloseEventListener=function(p){this.addEventListener("close",function(){p()})},S.prototype.removeCloseEventListener=function(p){},S.prototype.setupResizeObserver=function(){var p=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){p.resize(p.target.clientWidth,p.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return p.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},S.prototype.onPopupTargetResize=function(){var p=1*this.target.clientWidth/this.target.clientHeight,h=this.editorCanvas.clientWidth/p>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*p:this.editorCanvas.clientWidth,g=h<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/p;this.resize(h,g)},S.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},S.prototype.resize=function(p,h){this._isResizing=!0;var g=p/this.imageWidth,y=h/this.imageHeight;this.imageWidth=Math.round(p),this.imageHeight=Math.round(h),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(g,y),this._isResizing=!1},S.prototype.scaleMarkers=function(p,h){var g,y=this;this._currentMarker&&this._currentMarker instanceof Le?this._currentMarker.scale(p,h):(g=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(d){d!==y._currentMarker&&d.scale(p,h)}),g!==void 0&&this.setCurrentMarker(g)},S.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"},S.prototype.setTopLeft=function(){var p=this.editingTarget.getBoundingClientRect(),h=this.editorCanvas.getBoundingClientRect();this.left=p.left-h.left,this.top=p.top-h.top},S.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)},S.prototype.addDefs=function(){for(var p,h=[],g=0;g<arguments.length;g++)h[g]=arguments[g];this.defs=N.createDefs(),this.addDefsToImage(),(p=this.defs).append.apply(p,h)},S.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},S.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)},S.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},S.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},S.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)},S.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},S.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)},S.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 p=document.createElement("a");p.href="https://markerjs.com/",p.target="_blank",p.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>',p.title="Powered by marker.js",p.style.display="grid",p.style.alignItems="center",p.style.justifyItems="center",p.style.padding="3px",p.style.width="20px",p.style.height="20px",this.logoUI.appendChild(p),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},S.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")},S.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"},S.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},S.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 p=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=p+"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 le(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 ke(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},S.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},S.prototype.removeMarker=function(p){this.markerImage.removeChild(p.container),this.markers.indexOf(p)>-1&&this.markers.splice(this.markers.indexOf(p),1),p.dispose()},S.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())},S.prototype.toolbarButtonClicked=function(p,h){if(p==="marker"&&h!==void 0)this.createNewMarker(h);else if(p==="action")switch(h){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()}},S.prototype.deleteSelectedMarker=function(){var p=this;if(this._currentMarker!==void 0){var h=!1;if(this.eventListeners.markerbeforedelete.forEach(function(y){var d=new wt(p,p._currentMarker,!0);y(d),d.defaultPrevented&&(h=!0)}),!h){var g=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(y){return y(new wt(p,g))})}}},S.prototype.clear=function(){var p=this,h=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(L){var fe=new wt(p,void 0,!0);L(fe),fe.defaultPrevented&&(h=!0)}),!h)){this.setCurrentMarker();for(var g=function(L){var fe=y.markers[L];y.setCurrentMarker(y.markers[L]),y._currentMarker.dispose(),y.markerImage.removeChild(y._currentMarker.container),y.markers.splice(y.markers.indexOf(y._currentMarker),1),y.eventListeners.markerdelete.forEach(function(O){return O(new wt(p,fe))})},y=this,d=this.markers.length-1;d>=0;d--)g(d);this.addUndoStep()}},Object.defineProperty(S.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),S.prototype.showNotesEditor=function(){var p;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=(p=this._currentMarker.notes)!==null&&p!==void 0?p:"",this.overlayContainer.appendChild(this.notesArea))},S.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)},S.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},S.prototype.addUndoStep=function(){var p=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var h=this.getState(),g=this.undoRedoManager.getLastUndoStep();if(!g||g.width===h.width&&g.height===h.height){var y=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(h),y<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(d){return d(new vt(p))})}else this.undoRedoManager.replaceLastUndoStep(h),this.eventListeners.statechange.forEach(function(d){return d(new vt(p))})}},S.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},S.prototype.undoStep=function(){var p=this,h=this.undoRedoManager.undo();h!==void 0&&(this.restoreState(h),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(g){return g(new vt(p))}))},S.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},S.prototype.redoStep=function(){var p=this,h=this.undoRedoManager.redo();h!==void 0&&(this.restoreState(h),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(g){return g(new vt(p))}))},S.prototype.stepZoom=function(){var p=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=p<this.zoomSteps.length-1?this.zoomSteps[p+1]:this.zoomSteps[0]},S.prototype.panTo=function(p){this.contentDiv.scrollBy({left:this.prevPanPoint.x-p.x,top:this.prevPanPoint.y-p.y}),this.prevPanPoint=p},S.prototype.startRenderAndClose=function(){return A(this,void 0,void 0,function(){var p,h,g=this;return xe(this,function(y){switch(y.label){case 0:return[4,this.render()];case 1:return p=y.sent(),h=this.getState(),this.eventListeners.render.forEach(function(d){return d(new Tt(g,p,h))}),this.close(!0),[2]}})})},S.prototype.getState=function(p){p===!0&&this.setCurrentMarker();var h={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(g){return h.markers.push(g.getState())}),h},S.prototype.restoreState=function(p){var h=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);p.markers.forEach(function(g){var y=h._availableMarkerTypes.find(function(L){return L.typeName===g.typeName});if(y!==void 0){var d=h.addNewMarker(y);d.restoreState(g),h.markers.push(d)}}),p.width&&p.height&&(p.width!==this.imageWidth||p.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/p.width,this.imageHeight/p.height),this.eventListeners.restorestate.forEach(function(g){return g(new vt(h))})},S.prototype.addNewMarker=function(p){var h=N.createGroup();return this.markerImage.appendChild(h),new p(h,this.overlayContainer,this.settings)},S.prototype.createNewMarker=function(p){var h,g=this;(h=typeof p=="string"?this._availableMarkerTypes.find(function(y){return y.typeName===p}):p)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(h),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(h.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(y){return y(new wt(g,g._currentMarker))}))},S.prototype.markerCreated=function(p){var h=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(p),this.setCurrentMarker(p),p instanceof z&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(z):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(g){return g(new wt(h,h._currentMarker))})},S.prototype.colorChanged=function(p){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=p,this.settings.defaultStrokeColor=p)},S.prototype.fillColorChanged=function(p){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=p)},S.prototype.markerStateChanged=function(p){var h=this;this.eventListeners.markerchange.forEach(function(g){return g(new wt(h,p))})},S.prototype.setCurrentMarker=function(p){var h=this;this._currentMarker!==p&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(g){return g(new wt(h,h._currentMarker))})),this._currentMarker=p,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(g){return g(new wt(h,h._currentMarker))}))},S.prototype.onPointerDown=function(p){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||p.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var h=this.markers.find(function(g){return g.ownsTarget(p.target)});h!==void 0?(this.setCurrentMarker(h),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(p.clientX,p.clientY),p.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:p.clientX,y:p.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(p.clientX,p.clientY))},S.prototype.onDblClick=function(p){if(this._isFocused||this.focus(),this.mode==="select"){var h=this.markers.find(function(g){return g.ownsTarget(p.target)});h!==void 0&&h!==this._currentMarker&&this.setCurrentMarker(h),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(p.clientX,p.clientY),p.target):this.setCurrentMarker()}},S.prototype.onPointerMove=function(p){this.touchPoints!==1&&p.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||p.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(p.clientX,p.clientY)):this.zoomLevel>1&&this.panTo({x:p.clientX,y:p.clientY}))},S.prototype.onPointerUp=function(p){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(p.clientX,p.clientY)),this.isDragging=!1,this.addUndoStep()},S.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},S.prototype.onKeyUp=function(p){this._currentMarker===void 0||this.notesArea!==void 0||p.key!=="Delete"&&p.key!=="Backspace"||this.deleteSelectedMarker()},S.prototype.clientToLocalCoordinates=function(p,h){var g=this.markerImage.getBoundingClientRect();return{x:(p-g.left)/this.zoomLevel,y:(h-g.top)/this.zoomLevel}},S.prototype.onWindowResize=function(){this.positionUI()},S.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var p=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=p+"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()},S.prototype.addLicenseKey=function(p){x.addKey(p)},S.prototype.addEventListener=function(p,h){this.eventListeners.addEventListener(p,h)},S.prototype.removeEventListener=function(p,h){this.eventListeners.removeEventListener(p,h)},S.prototype.renderState=function(p){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(p),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(S.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),S.prototype.focus=function(){var p=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(h){return h(new vt(p))}))},S.prototype.blur=function(){var p=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(h){return h(new vt(p))}))},S.instanceCounter=0,S}()},5630:function(yn,dt,m){"use strict";var K=m(54476),j=m(33885),A=m(20068),xe=m(42978),R=m(75931),N=m(92310),x=m.n(N),E=m(18929),F=m(59301),V=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],Ie=(0,F.forwardRef)(function(G,le){var ke,ue=G.prefixCls,de=ue===void 0?"rc-checkbox":ue,_e=G.className,Pe=G.style,Ue=G.checked,Ce=G.disabled,pe=G.defaultChecked,q=pe===void 0?!1:pe,_=G.type,ie=_===void 0?"checkbox":_,ae=G.title,Se=G.onChange,se=(0,R.Z)(G,V),be=(0,F.useRef)(null),D=(0,E.Z)(q,{value:Ue}),Le=(0,xe.Z)(D,2),z=Le[0],we=Le[1];(0,F.useImperativeHandle)(le,function(){return{focus:function(){var Re;(Re=be.current)===null||Re===void 0||Re.focus()},blur:function(){var Re;(Re=be.current)===null||Re===void 0||Re.blur()},input:be.current}});var ge=x()(de,_e,(ke={},(0,A.Z)(ke,"".concat(de,"-checked"),z),(0,A.Z)(ke,"".concat(de,"-disabled"),Ce),ke)),Te=function(Re){Ce||("checked"in G||we(Re.target.checked),Se==null||Se({target:(0,j.Z)((0,j.Z)({},G),{},{type:ie,checked:Re.target.checked}),stopPropagation:function(){Re.stopPropagation()},preventDefault:function(){Re.preventDefault()},nativeEvent:Re.nativeEvent}))};return F.createElement("span",{className:ge,title:ae,style:Pe},F.createElement("input",(0,K.Z)({},se,{className:"".concat(de,"-input"),ref:be,onChange:Te,disabled:Ce,checked:!!z,type:ie})),F.createElement("span",{className:"".concat(de,"-inner")}))});dt.Z=Ie},31561:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return ie}});var K=m(54476),j=m(20068),A=m(42978),xe=m(75931),R=m(35593),N=m(92310),x=m.n(N),E=m(8654),F=m(59301),V=m(10228),Ie=m(16089),G=V.Z.ESC,le=V.Z.TAB;function ke(ae){var Se=ae.visible,se=ae.triggerRef,be=ae.onVisibleChange,D=ae.autoFocus,Le=ae.overlayRef,z=F.useRef(!1),we=function(){if(Se){var Re,X;(Re=se.current)===null||Re===void 0||(X=Re.focus)===null||X===void 0||X.call(Re),be==null||be(!1)}},ge=function(){var Re;return(Re=Le.current)!==null&&Re!==void 0&&Re.focus?(Le.current.focus(),z.current=!0,!0):!1},Te=function(Re){switch(Re.keyCode){case G:we();break;case le:{var X=!1;z.current||(X=ge()),X?Re.preventDefault():we();break}}};F.useEffect(function(){return Se?(window.addEventListener("keydown",Te),D&&(0,Ie.Z)(ge,3),function(){window.removeEventListener("keydown",Te),z.current=!1}):function(){z.current=!1}},[Se])}var ue=(0,F.forwardRef)(function(ae,Se){var se=ae.overlay,be=ae.arrow,D=ae.prefixCls,Le=(0,F.useMemo)(function(){var we;return typeof se=="function"?we=se():we=se,we},[se]),z=(0,E.sQ)(Se,Le==null?void 0:Le.ref);return F.createElement(F.Fragment,null,be&&F.createElement("div",{className:"".concat(D,"-arrow")}),F.cloneElement(Le,{ref:(0,E.Yr)(Le)?z:void 0}))}),de=ue,_e={adjustX:1,adjustY:1},Pe=[0,0],Ue={topLeft:{points:["bl","tl"],overflow:_e,offset:[0,-4],targetOffset:Pe},top:{points:["bc","tc"],overflow:_e,offset:[0,-4],targetOffset:Pe},topRight:{points:["br","tr"],overflow:_e,offset:[0,-4],targetOffset:Pe},bottomLeft:{points:["tl","bl"],overflow:_e,offset:[0,4],targetOffset:Pe},bottom:{points:["tc","bc"],overflow:_e,offset:[0,4],targetOffset:Pe},bottomRight:{points:["tr","br"],overflow:_e,offset:[0,4],targetOffset:Pe}},Ce=Ue,pe=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function q(ae,Se){var se,be=ae.arrow,D=be===void 0?!1:be,Le=ae.prefixCls,z=Le===void 0?"rc-dropdown":Le,we=ae.transitionName,ge=ae.animation,Te=ae.align,Fe=ae.placement,Re=Fe===void 0?"bottomLeft":Fe,X=ae.placements,w=X===void 0?Ce:X,ve=ae.getPopupContainer,Qe=ae.showAction,je=ae.hideAction,Be=ae.overlayClassName,Oe=ae.overlayStyle,lt=ae.visible,$t=ae.trigger,vt=$t===void 0?["hover"]:$t,Tt=ae.autoFocus,wt=ae.overlay,pt=ae.children,at=ae.onVisibleChange,S=(0,xe.Z)(ae,pe),p=F.useState(),h=(0,A.Z)(p,2),g=h[0],y=h[1],d="visible"in ae?lt:g,L=F.useRef(null),fe=F.useRef(null),O=F.useRef(null);F.useImperativeHandle(Se,function(){return L.current});var I=function(oe){y(oe),at==null||at(oe)};ke({visible:d,triggerRef:O,onVisibleChange:I,autoFocus:Tt,overlayRef:fe});var he=function(oe){var T=ae.onOverlayClick;y(!1),T&&T(oe)},Y=function(){return F.createElement(de,{ref:fe,overlay:wt,prefixCls:z,arrow:D})},U=function(){return typeof wt=="function"?Y:Y()},ye=function(){var oe=ae.minOverlayWidthMatchTrigger,T=ae.alignPoint;return"minOverlayWidthMatchTrigger"in ae?oe:!T},Ye=function(){var oe=ae.openClassName;return oe!==void 0?oe:"".concat(z,"-open")},ce=F.cloneElement(pt,{className:x()((se=pt.props)===null||se===void 0?void 0:se.className,d&&Ye()),ref:(0,E.Yr)(pt)?(0,E.sQ)(O,pt.ref):void 0}),Ae=je;return!Ae&&vt.indexOf("contextMenu")!==-1&&(Ae=["click"]),F.createElement(R.Z,(0,K.Z)({builtinPlacements:w},S,{prefixCls:z,ref:L,popupClassName:x()(Be,(0,j.Z)({},"".concat(z,"-show-arrow"),D)),popupStyle:Oe,action:vt,showAction:Qe,hideAction:Ae,popupPlacement:Re,popupAlign:Te,popupTransitionName:we,popupAnimation:ge,popupVisible:d,stretch:ye()?"minWidth":"",popup:U(),onPopupVisibleChange:I,onPopupClick:he,getPopupContainer:ve}),ce)}var _=F.forwardRef(q),ie=_},93681:function(yn,dt,m){"use strict";m.r(dt),m.d(dt,{BaseInput:function(){return V},default:function(){return Ue}});var K=m(54476),j=m(33885),A=m(20068),xe=m(76190),R=m(92310),N=m.n(R),x=m(59301),E=m(5643),F=function(pe){var q,_,ie=pe.inputElement,ae=pe.prefixCls,Se=pe.prefix,se=pe.suffix,be=pe.addonBefore,D=pe.addonAfter,Le=pe.className,z=pe.style,we=pe.disabled,ge=pe.readOnly,Te=pe.focused,Fe=pe.triggerFocus,Re=pe.allowClear,X=pe.value,w=pe.handleReset,ve=pe.hidden,Qe=pe.classes,je=pe.classNames,Be=pe.dataAttrs,Oe=pe.styles,lt=pe.components,$t=(lt==null?void 0:lt.affixWrapper)||"span",vt=(lt==null?void 0:lt.groupWrapper)||"span",Tt=(lt==null?void 0:lt.wrapper)||"span",wt=(lt==null?void 0:lt.groupAddon)||"span",pt=(0,x.useRef)(null),at=function(Y){var U;(U=pt.current)!==null&&U!==void 0&&U.contains(Y.target)&&(Fe==null||Fe())},S=function(){var Y;if(!Re)return null;var U=!we&&!ge&&X,ye="".concat(ae,"-clear-icon"),Ye=(0,xe.Z)(Re)==="object"&&Re!==null&&Re!==void 0&&Re.clearIcon?Re.clearIcon:"\u2716";return x.createElement("span",{onClick:w,onMouseDown:function(Ae){return Ae.preventDefault()},className:N()(ye,(Y={},(0,A.Z)(Y,"".concat(ye,"-hidden"),!U),(0,A.Z)(Y,"".concat(ye,"-has-suffix"),!!se),Y)),role:"button",tabIndex:-1},Ye)},p=(0,x.cloneElement)(ie,{value:X,hidden:ve,className:N()((q=ie.props)===null||q===void 0?void 0:q.className,!(0,E.X3)(pe)&&!(0,E.He)(pe)&&Le)||null,style:(0,j.Z)((0,j.Z)({},(_=ie.props)===null||_===void 0?void 0:_.style),!(0,E.X3)(pe)&&!(0,E.He)(pe)?z:{})});if((0,E.X3)(pe)){var h,g="".concat(ae,"-affix-wrapper"),y=N()(g,(h={},(0,A.Z)(h,"".concat(g,"-disabled"),we),(0,A.Z)(h,"".concat(g,"-focused"),Te),(0,A.Z)(h,"".concat(g,"-readonly"),ge),(0,A.Z)(h,"".concat(g,"-input-with-clear-btn"),se&&Re&&X),h),!(0,E.He)(pe)&&Le,Qe==null?void 0:Qe.affixWrapper,je==null?void 0:je.affixWrapper),d=(se||Re)&&x.createElement("span",{className:N()("".concat(ae,"-suffix"),je==null?void 0:je.suffix),style:Oe==null?void 0:Oe.suffix},S(),se);p=x.createElement($t,(0,K.Z)({className:y,style:(0,j.Z)((0,j.Z)({},(0,E.He)(pe)?void 0:z),Oe==null?void 0:Oe.affixWrapper),hidden:!(0,E.He)(pe)&&ve,onClick:at},Be==null?void 0:Be.affixWrapper,{ref:pt}),Se&&x.createElement("span",{className:N()("".concat(ae,"-prefix"),je==null?void 0:je.prefix),style:Oe==null?void 0:Oe.prefix},Se),(0,x.cloneElement)(ie,{value:X,hidden:null}),d)}if((0,E.He)(pe)){var L="".concat(ae,"-group"),fe="".concat(L,"-addon"),O=N()("".concat(ae,"-wrapper"),L,Qe==null?void 0:Qe.wrapper),I=N()("".concat(ae,"-group-wrapper"),Le,Qe==null?void 0:Qe.group);return x.createElement(vt,{className:I,style:z,hidden:ve},x.createElement(Tt,{className:O},be&&x.createElement(wt,{className:fe},be),(0,x.cloneElement)(p,{hidden:null}),D&&x.createElement(wt,{className:fe},D)))}return p},V=F,Ie=m(94480),G=m(42978),le=m(75931),ke=m(18929),ue=m(2738),de=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],_e=(0,x.forwardRef)(function(Ce,pe){var q=Ce.autoComplete,_=Ce.onChange,ie=Ce.onFocus,ae=Ce.onBlur,Se=Ce.onPressEnter,se=Ce.onKeyDown,be=Ce.prefixCls,D=be===void 0?"rc-input":be,Le=Ce.disabled,z=Ce.htmlSize,we=Ce.className,ge=Ce.maxLength,Te=Ce.suffix,Fe=Ce.showCount,Re=Ce.type,X=Re===void 0?"text":Re,w=Ce.classes,ve=Ce.classNames,Qe=Ce.styles,je=(0,le.Z)(Ce,de),Be=(0,ke.Z)(Ce.defaultValue,{value:Ce.value}),Oe=(0,G.Z)(Be,2),lt=Oe[0],$t=Oe[1],vt=(0,x.useState)(!1),Tt=(0,G.Z)(vt,2),wt=Tt[0],pt=Tt[1],at=(0,x.useRef)(null),S=function(I){at.current&&(0,E.nH)(at.current,I)};(0,x.useImperativeHandle)(pe,function(){return{focus:S,blur:function(){var I;(I=at.current)===null||I===void 0||I.blur()},setSelectionRange:function(I,he,Y){var U;(U=at.current)===null||U===void 0||U.setSelectionRange(I,he,Y)},select:function(){var I;(I=at.current)===null||I===void 0||I.select()},input:at.current}}),(0,x.useEffect)(function(){pt(function(O){return O&&Le?!1:O})},[Le]);var p=function(I){Ce.value===void 0&&$t(I.target.value),at.current&&(0,E.rJ)(at.current,I,_)},h=function(I){Se&&I.key==="Enter"&&Se(I),se==null||se(I)},g=function(I){pt(!0),ie==null||ie(I)},y=function(I){pt(!1),ae==null||ae(I)},d=function(I){$t(""),S(),at.current&&(0,E.rJ)(at.current,I,_)},L=function(){var I=(0,ue.Z)(Ce,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return x.createElement("input",(0,K.Z)({autoComplete:q},I,{onChange:p,onFocus:g,onBlur:y,onKeyDown:h,className:N()(D,(0,A.Z)({},"".concat(D,"-disabled"),Le),ve==null?void 0:ve.input),style:Qe==null?void 0:Qe.input,ref:at,size:z,type:X}))},fe=function(){var I=Number(ge)>0;if(Te||Fe){var he=(0,E.D7)(lt),Y=(0,Ie.Z)(he).length,U=(0,xe.Z)(Fe)==="object"?Fe.formatter({value:he,count:Y,maxLength:ge}):"".concat(Y).concat(I?" / ".concat(ge):"");return x.createElement(x.Fragment,null,!!Fe&&x.createElement("span",{className:N()("".concat(D,"-show-count-suffix"),(0,A.Z)({},"".concat(D,"-show-count-has-suffix"),!!Te),ve==null?void 0:ve.count),style:(0,j.Z)({},Qe==null?void 0:Qe.count)},U),Te)}return null};return x.createElement(V,(0,K.Z)({},je,{prefixCls:D,className:we,inputElement:L(),handleReset:d,value:(0,E.D7)(lt),focused:wt,triggerFocus:S,suffix:fe(),disabled:Le,classes:w,classNames:ve,styles:Qe}))}),Pe=_e,Ue=Pe},5643:function(yn,dt,m){"use strict";m.d(dt,{D7:function(){return R},He:function(){return K},X3:function(){return j},nH:function(){return xe},rJ:function(){return A}});function K(N){return!!(N.addonBefore||N.addonAfter)}function j(N){return!!(N.prefix||N.suffix||N.allowClear)}function A(N,x,E,F){if(E){var V=x;if(x.type==="click"){var Ie=N.cloneNode(!0);V=Object.create(x,{target:{value:Ie},currentTarget:{value:Ie}}),Ie.value="",E(V);return}if(F!==void 0){V=Object.create(x,{target:{value:N},currentTarget:{value:N}}),N.value=F,E(V);return}E(V)}}function xe(N,x){if(N){N.focus(x);var E=x||{},F=E.cursor;if(F){var V=N.value.length;switch(F){case"start":N.setSelectionRange(0,0);break;case"end":N.setSelectionRange(V,V);break;default:N.setSelectionRange(0,V)}}}}function R(N){return typeof N=="undefined"||N===null?"":String(N)}},15285:function(yn,dt,m){"use strict";m.d(dt,{iz:function(){return At},ck:function(){return Wt},BW:function(){return Pt},sN:function(){return Wt},Wd:function(){return Ze},ZP:function(){return mn},Xl:function(){return se}});var K=m(54476),j=m(20068),A=m(33885),xe=m(94480),R=m(42978),N=m(75931),x=m(92310),E=m.n(x),F=m(83836),V=m(18929),Ie=m(13697),G=m(48736),le=m(59301),ke=m(4676),ue=le.createContext(null);function de(ot,st){return ot===void 0?null:"".concat(ot,"-").concat(st)}function _e(ot){var st=le.useContext(ue);return de(st,ot)}var Pe=m(80547),Ue=["children","locked"],Ce=le.createContext(null);function pe(ot,st){var ht=(0,A.Z)({},ot);return Object.keys(st).forEach(function(Mt){var gt=st[Mt];gt!==void 0&&(ht[Mt]=gt)}),ht}function q(ot){var st=ot.children,ht=ot.locked,Mt=(0,N.Z)(ot,Ue),gt=le.useContext(Ce),bt=(0,Pe.Z)(function(){return pe(gt,Mt)},[gt,Mt],function(xt,Rt){return!ht&&(xt[0]!==Rt[0]||!(0,Ie.Z)(xt[1],Rt[1],!0))});return le.createElement(Ce.Provider,{value:bt},st)}var _=[],ie=le.createContext(null);function ae(){return le.useContext(ie)}var Se=le.createContext(_);function se(ot){var st=le.useContext(Se);return le.useMemo(function(){return ot!==void 0?[].concat((0,xe.Z)(st),[ot]):st},[st,ot])}var be=le.createContext(null),D=le.createContext({}),Le=D,z=m(29194);function we(ot){var st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,z.Z)(ot)){var ht=ot.nodeName.toLowerCase(),Mt=["input","select","textarea","button"].includes(ht)||ot.isContentEditable||ht==="a"&&!!ot.getAttribute("href"),gt=ot.getAttribute("tabindex"),bt=Number(gt),xt=null;return gt&&!Number.isNaN(bt)?xt=bt:Mt&&xt===null&&(xt=0),Mt&&ot.disabled&&(xt=null),xt!==null&&(xt>=0||st&&xt<0)}return!1}function ge(ot){var st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ht=(0,xe.Z)(ot.querySelectorAll("*")).filter(function(Mt){return we(Mt,st)});return we(ot,st)&&ht.unshift(ot),ht}var Te=null;function Fe(){Te=document.activeElement}function Re(){Te=null}function X(){if(Te)try{Te.focus()}catch(ot){}}function w(ot,st){if(st.keyCode===9){var ht=ge(ot),Mt=ht[st.shiftKey?0:ht.length-1],gt=Mt===document.activeElement||ot===document.activeElement;if(gt){var bt=ht[st.shiftKey?ht.length-1:0];bt.focus(),st.preventDefault()}}}var ve=m(10228),Qe=m(16089),je=ve.Z.LEFT,Be=ve.Z.RIGHT,Oe=ve.Z.UP,lt=ve.Z.DOWN,$t=ve.Z.ENTER,vt=ve.Z.ESC,Tt=ve.Z.HOME,wt=ve.Z.END,pt=[Oe,lt,je,Be];function at(ot,st,ht,Mt){var gt,bt,xt,Rt,Gt="prev",an="next",Pn="children",Kn="parent";if(ot==="inline"&&Mt===$t)return{inlineTrigger:!0};var Qn=(gt={},(0,j.Z)(gt,Oe,Gt),(0,j.Z)(gt,lt,an),gt),$n=(bt={},(0,j.Z)(bt,je,ht?an:Gt),(0,j.Z)(bt,Be,ht?Gt:an),(0,j.Z)(bt,lt,Pn),(0,j.Z)(bt,$t,Pn),bt),Cn=(xt={},(0,j.Z)(xt,Oe,Gt),(0,j.Z)(xt,lt,an),(0,j.Z)(xt,$t,Pn),(0,j.Z)(xt,vt,Kn),(0,j.Z)(xt,je,ht?Pn:Kn),(0,j.Z)(xt,Be,ht?Kn:Pn),xt),rr={inline:Qn,horizontal:$n,vertical:Cn,inlineSub:Qn,horizontalSub:Cn,verticalSub:Cn},jn=(Rt=rr["".concat(ot).concat(st?"":"Sub")])===null||Rt===void 0?void 0:Rt[Mt];switch(jn){case Gt:return{offset:-1,sibling:!0};case an:return{offset:1,sibling:!0};case Kn:return{offset:-1,sibling:!1};case Pn:return{offset:1,sibling:!1};default:return null}}function S(ot){for(var st=ot;st;){if(st.getAttribute("data-menu-list"))return st;st=st.parentElement}return null}function p(ot,st){for(var ht=ot||document.activeElement;ht;){if(st.has(ht))return ht;ht=ht.parentElement}return null}function h(ot,st){var ht=ge(ot,!0);return ht.filter(function(Mt){return st.has(Mt)})}function g(ot,st,ht){var Mt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!ot)return null;var gt=h(ot,st),bt=gt.length,xt=gt.findIndex(function(Rt){return ht===Rt});return Mt<0?xt===-1?xt=bt-1:xt-=1:Mt>0&&(xt+=1),xt=(xt+bt)%bt,gt[xt]}var y=function(st,ht){var Mt=new Set,gt=new Map,bt=new Map;return st.forEach(function(xt){var Rt=document.querySelector("[data-menu-id='".concat(de(ht,xt),"']"));Rt&&(Mt.add(Rt),bt.set(Rt,xt),gt.set(xt,Rt))}),{elements:Mt,key2element:gt,element2key:bt}};function d(ot,st,ht,Mt,gt,bt,xt,Rt,Gt,an){var Pn=le.useRef(),Kn=le.useRef();Kn.current=st;var Qn=function(){Qe.Z.cancel(Pn.current)};return le.useEffect(function(){return function(){Qn()}},[]),function($n){var Cn=$n.which;if([].concat(pt,[$t,vt,Tt,wt]).includes(Cn)){var rr=bt(),jn=y(rr,Mt),Vn=jn,wn=Vn.elements,On=Vn.key2element,Un=Vn.element2key,Nn=On.get(st),vr=p(Nn,wn),Zr=Un.get(vr),Gn=at(ot,xt(Zr,!0).length===1,ht,Cn);if(!Gn&&Cn!==Tt&&Cn!==wt)return;(pt.includes(Cn)||[Tt,wt].includes(Cn))&&$n.preventDefault();var nn=function(Pr){if(Pr){var hi=Pr,zn=Pr.querySelector("a");zn!=null&&zn.getAttribute("href")&&(hi=zn);var kn=Un.get(Pr);Rt(kn),Qn(),Pn.current=(0,Qe.Z)(function(){Kn.current===kn&&hi.focus()})}};if([Tt,wt].includes(Cn)||Gn.sibling||!vr){var Ht;!vr||ot==="inline"?Ht=gt.current:Ht=S(vr);var Zn,In=h(Ht,wn);Cn===Tt?Zn=In[0]:Cn===wt?Zn=In[In.length-1]:Zn=g(Ht,wn,vr,Gn.offset),nn(Zn)}else if(Gn.inlineTrigger)Gt(Zr);else if(Gn.offset>0)Gt(Zr,!0),Qn(),Pn.current=(0,Qe.Z)(function(){jn=y(rr,Mt);var Wr=vr.getAttribute("aria-controls"),Pr=document.getElementById(Wr),hi=g(Pr,jn.elements);nn(hi)},5);else if(Gn.offset<0){var ir=xt(Zr,!0),xr=ir[ir.length-2],ar=On.get(xr);Gt(xr,!1),nn(ar)}}an==null||an($n)}}function L(ot){Promise.resolve().then(ot)}var fe="__RC_UTIL_PATH_SPLIT__",O=function(st){return st.join(fe)},I=function(st){return st.split(fe)},he="rc-menu-more";function Y(){var ot=le.useState({}),st=(0,R.Z)(ot,2),ht=st[1],Mt=(0,le.useRef)(new Map),gt=(0,le.useRef)(new Map),bt=le.useState([]),xt=(0,R.Z)(bt,2),Rt=xt[0],Gt=xt[1],an=(0,le.useRef)(0),Pn=(0,le.useRef)(!1),Kn=function(){Pn.current||ht({})},Qn=(0,le.useCallback)(function(On,Un){var Nn=O(Un);gt.current.set(Nn,On),Mt.current.set(On,Nn),an.current+=1;var vr=an.current;L(function(){vr===an.current&&Kn()})},[]),$n=(0,le.useCallback)(function(On,Un){var Nn=O(Un);gt.current.delete(Nn),Mt.current.delete(On)},[]),Cn=(0,le.useCallback)(function(On){Gt(On)},[]),rr=(0,le.useCallback)(function(On,Un){var Nn=Mt.current.get(On)||"",vr=I(Nn);return Un&&Rt.includes(vr[0])&&vr.unshift(he),vr},[Rt]),jn=(0,le.useCallback)(function(On,Un){return On.some(function(Nn){var vr=rr(Nn,!0);return vr.includes(Un)})},[rr]),Vn=function(){var Un=(0,xe.Z)(Mt.current.keys());return Rt.length&&Un.push(he),Un},wn=(0,le.useCallback)(function(On){var Un="".concat(Mt.current.get(On)).concat(fe),Nn=new Set;return(0,xe.Z)(gt.current.keys()).forEach(function(vr){vr.startsWith(Un)&&Nn.add(gt.current.get(vr))}),Nn},[]);return le.useEffect(function(){return function(){Pn.current=!0}},[]),{registerPath:Qn,unregisterPath:$n,refreshOverflowKeys:Cn,isSubPathKey:jn,getKeyPath:rr,getKeys:Vn,getSubPathKeys:wn}}function U(ot){var st=le.useRef(ot);st.current=ot;var ht=le.useCallback(function(){for(var Mt,gt=arguments.length,bt=new Array(gt),xt=0;xt<gt;xt++)bt[xt]=arguments[xt];return(Mt=st.current)===null||Mt===void 0?void 0:Mt.call.apply(Mt,[st].concat(bt))},[]);return ot?ht:void 0}var ye=Math.random().toFixed(5).toString().slice(2),Ye=0;function ce(ot){var st=(0,V.Z)(ot,{value:ot}),ht=(0,R.Z)(st,2),Mt=ht[0],gt=ht[1];return le.useEffect(function(){Ye+=1;var bt="".concat(ye,"-").concat(Ye);gt("rc-menu-uuid-".concat(bt))},[]),Mt}var Ae=m(67732),qe=m(83652),oe=m(42403),T=m(158),re=m(2738),$e=m(8654);function Ne(ot,st,ht,Mt){var gt=le.useContext(Ce),bt=gt.activeKey,xt=gt.onActive,Rt=gt.onInactive,Gt={active:bt===ot};return st||(Gt.onMouseEnter=function(an){ht==null||ht({key:ot,domEvent:an}),xt(ot)},Gt.onMouseLeave=function(an){Mt==null||Mt({key:ot,domEvent:an}),Rt(ot)}),Gt}function Xe(ot){var st=le.useContext(Ce),ht=st.mode,Mt=st.rtl,gt=st.inlineIndent;if(ht!=="inline")return null;var bt=ot;return Mt?{paddingRight:bt*gt}:{paddingLeft:bt*gt}}function ct(ot){var st=ot.icon,ht=ot.props,Mt=ot.children,gt;return st===null||st===!1?null:(typeof st=="function"?gt=le.createElement(st,(0,A.Z)({},ht)):typeof st!="boolean"&&(gt=st),gt||Mt||null)}var mt=["item"];function yt(ot){var st=ot.item,ht=(0,N.Z)(ot,mt);return Object.defineProperty(ht,"item",{get:function(){return(0,G.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),st}}),ht}var Bt=["title","attribute","elementRef"],Ft=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],_t=["active"],Yt=function(ot){(0,oe.Z)(ht,ot);var st=(0,T.Z)(ht);function ht(){return(0,Ae.Z)(this,ht),st.apply(this,arguments)}return(0,qe.Z)(ht,[{key:"render",value:function(){var gt=this.props,bt=gt.title,xt=gt.attribute,Rt=gt.elementRef,Gt=(0,N.Z)(gt,Bt),an=(0,re.Z)(Gt,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,G.ZP)(!xt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),le.createElement(F.Z.Item,(0,K.Z)({},xt,{title:typeof bt=="string"?bt:void 0},an,{ref:Rt}))}}]),ht}(le.Component),rn=le.forwardRef(function(ot,st){var ht,Mt=ot.style,gt=ot.className,bt=ot.eventKey,xt=ot.warnKey,Rt=ot.disabled,Gt=ot.itemIcon,an=ot.children,Pn=ot.role,Kn=ot.onMouseEnter,Qn=ot.onMouseLeave,$n=ot.onClick,Cn=ot.onKeyDown,rr=ot.onFocus,jn=(0,N.Z)(ot,Ft),Vn=_e(bt),wn=le.useContext(Ce),On=wn.prefixCls,Un=wn.onItemClick,Nn=wn.disabled,vr=wn.overflowDisabled,Zr=wn.itemIcon,Gn=wn.selectedKeys,nn=wn.onActive,Ht=le.useContext(Le),Zn=Ht._internalRenderMenuItem,In="".concat(On,"-item"),ir=le.useRef(),xr=le.useRef(),ar=Nn||Rt,Wr=(0,$e.x1)(st,xr),Pr=se(bt),hi=function(mi){return{key:bt,keyPath:(0,xe.Z)(Pr).reverse(),item:ir.current,domEvent:mi}},zn=Gt||Zr,kn=Ne(bt,ar,Kn,Qn),dr=kn.active,mr=(0,N.Z)(kn,_t),Jr=Gn.includes(bt),sa=Xe(Pr.length),Ii=function(mi){if(!ar){var Bi=hi(mi);$n==null||$n(yt(Bi)),Un(Bi)}},zr=function(mi){if(Cn==null||Cn(mi),mi.which===ve.Z.ENTER){var Bi=hi(mi);$n==null||$n(yt(Bi)),Un(Bi)}},yi=function(mi){nn(bt),rr==null||rr(mi)},pi={};ot.role==="option"&&(pi["aria-selected"]=Jr);var ii=le.createElement(Yt,(0,K.Z)({ref:ir,elementRef:Wr,role:Pn===null?"none":Pn||"menuitem",tabIndex:Rt?null:-1,"data-menu-id":vr&&Vn?null:Vn},jn,mr,pi,{component:"li","aria-disabled":Rt,style:(0,A.Z)((0,A.Z)({},sa),Mt),className:E()(In,(ht={},(0,j.Z)(ht,"".concat(In,"-active"),dr),(0,j.Z)(ht,"".concat(In,"-selected"),Jr),(0,j.Z)(ht,"".concat(In,"-disabled"),ar),ht),gt),onClick:Ii,onKeyDown:zr,onFocus:yi}),an,le.createElement(ct,{props:(0,A.Z)((0,A.Z)({},ot),{},{isSelected:Jr}),icon:zn}));return Zn&&(ii=Zn(ii,ot,{selected:Jr})),ii});function hn(ot,st){var ht=ot.eventKey,Mt=ae(),gt=se(ht);return le.useEffect(function(){if(Mt)return Mt.registerPath(ht,gt),function(){Mt.unregisterPath(ht,gt)}},[gt]),Mt?null:le.createElement(rn,(0,K.Z)({},ot,{ref:st}))}var Wt=le.forwardRef(hn),on=["className","children"],xn=function(st,ht){var Mt=st.className,gt=st.children,bt=(0,N.Z)(st,on),xt=le.useContext(Ce),Rt=xt.prefixCls,Gt=xt.mode,an=xt.rtl;return le.createElement("ul",(0,K.Z)({className:E()(Rt,an&&"".concat(Rt,"-rtl"),"".concat(Rt,"-sub"),"".concat(Rt,"-").concat(Gt==="inline"?"inline":"vertical"),Mt),role:"menu"},bt,{"data-menu-list":!0,ref:ht}),gt)},Vt=le.forwardRef(xn);Vt.displayName="SubMenuList";var Mn=Vt,qn=m(11592);function An(ot,st){return(0,qn.Z)(ot).map(function(ht,Mt){if(le.isValidElement(ht)){var gt,bt,xt=ht.key,Rt=(gt=(bt=ht.props)===null||bt===void 0?void 0:bt.eventKey)!==null&>!==void 0?gt:xt,Gt=Rt==null;Gt&&(Rt="tmp_key-".concat([].concat((0,xe.Z)(st),[Mt]).join("-")));var an={key:Rt,eventKey:Rt};return le.cloneElement(ht,an)}return ht})}var pr=m(35593),er={adjustX:1,adjustY:1},gr={topLeft:{points:["bl","tl"],overflow:er},topRight:{points:["br","tr"],overflow:er},bottomLeft:{points:["tl","bl"],overflow:er},bottomRight:{points:["tr","br"],overflow:er},leftTop:{points:["tr","tl"],overflow:er},leftBottom:{points:["br","bl"],overflow:er},rightTop:{points:["tl","tr"],overflow:er},rightBottom:{points:["bl","br"],overflow:er}},$r={topLeft:{points:["bl","tl"],overflow:er},topRight:{points:["br","tr"],overflow:er},bottomLeft:{points:["tl","bl"],overflow:er},bottomRight:{points:["tr","br"],overflow:er},rightTop:{points:["tr","tl"],overflow:er},rightBottom:{points:["br","bl"],overflow:er},leftTop:{points:["tl","tr"],overflow:er},leftBottom:{points:["bl","br"],overflow:er}},Rn=null;function pn(ot,st,ht){if(st)return st;if(ht)return ht[ot]||ht.other}var tr={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Ke(ot){var st=ot.prefixCls,ht=ot.visible,Mt=ot.children,gt=ot.popup,bt=ot.popupStyle,xt=ot.popupClassName,Rt=ot.popupOffset,Gt=ot.disabled,an=ot.mode,Pn=ot.onVisibleChange,Kn=le.useContext(Ce),Qn=Kn.getPopupContainer,$n=Kn.rtl,Cn=Kn.subMenuOpenDelay,rr=Kn.subMenuCloseDelay,jn=Kn.builtinPlacements,Vn=Kn.triggerSubMenuAction,wn=Kn.forceSubMenuRender,On=Kn.rootClassName,Un=Kn.motion,Nn=Kn.defaultMotions,vr=le.useState(!1),Zr=(0,R.Z)(vr,2),Gn=Zr[0],nn=Zr[1],Ht=$n?(0,A.Z)((0,A.Z)({},$r),jn):(0,A.Z)((0,A.Z)({},gr),jn),Zn=tr[an],In=pn(an,Un,Nn),ir=le.useRef(In);an!=="inline"&&(ir.current=In);var xr=(0,A.Z)((0,A.Z)({},ir.current),{},{leavedClassName:"".concat(st,"-hidden"),removeOnLeave:!1,motionAppear:!0}),ar=le.useRef();return le.useEffect(function(){return ar.current=(0,Qe.Z)(function(){nn(ht)}),function(){Qe.Z.cancel(ar.current)}},[ht]),le.createElement(pr.Z,{prefixCls:st,popupClassName:E()("".concat(st,"-popup"),(0,j.Z)({},"".concat(st,"-rtl"),$n),xt,On),stretch:an==="horizontal"?"minWidth":null,getPopupContainer:Qn,builtinPlacements:Ht,popupPlacement:Zn,popupVisible:Gn,popup:gt,popupStyle:bt,popupAlign:Rt&&{offset:Rt},action:Gt?[]:[Vn],mouseEnterDelay:Cn,mouseLeaveDelay:rr,onPopupVisibleChange:Pn,forceRender:wn,popupMotion:xr,fresh:!0},Mt)}var H=m(77900);function ee(ot){var st=ot.id,ht=ot.open,Mt=ot.keyPath,gt=ot.children,bt="inline",xt=le.useContext(Ce),Rt=xt.prefixCls,Gt=xt.forceSubMenuRender,an=xt.motion,Pn=xt.defaultMotions,Kn=xt.mode,Qn=le.useRef(!1);Qn.current=Kn===bt;var $n=le.useState(!Qn.current),Cn=(0,R.Z)($n,2),rr=Cn[0],jn=Cn[1],Vn=Qn.current?ht:!1;le.useEffect(function(){Qn.current&&jn(!1)},[Kn]);var wn=(0,A.Z)({},pn(bt,an,Pn));Mt.length>1&&(wn.motionAppear=!1);var On=wn.onVisibleChanged;return wn.onVisibleChanged=function(Un){return!Qn.current&&!Un&&jn(!0),On==null?void 0:On(Un)},rr?null:le.createElement(q,{mode:bt,locked:!Qn.current},le.createElement(H.default,(0,K.Z)({visible:Vn},wn,{forceRender:Gt,removeOnLeave:!1,leavedClassName:"".concat(Rt,"-hidden")}),function(Un){var Nn=Un.className,vr=Un.style;return le.createElement(Mn,{id:st,className:Nn,style:vr},gt)}))}var Q=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],J=["active"],Ee=function(st){var ht,Mt=st.style,gt=st.className,bt=st.title,xt=st.eventKey,Rt=st.warnKey,Gt=st.disabled,an=st.internalPopupClose,Pn=st.children,Kn=st.itemIcon,Qn=st.expandIcon,$n=st.popupClassName,Cn=st.popupOffset,rr=st.popupStyle,jn=st.onClick,Vn=st.onMouseEnter,wn=st.onMouseLeave,On=st.onTitleClick,Un=st.onTitleMouseEnter,Nn=st.onTitleMouseLeave,vr=(0,N.Z)(st,Q),Zr=_e(xt),Gn=le.useContext(Ce),nn=Gn.prefixCls,Ht=Gn.mode,Zn=Gn.openKeys,In=Gn.disabled,ir=Gn.overflowDisabled,xr=Gn.activeKey,ar=Gn.selectedKeys,Wr=Gn.itemIcon,Pr=Gn.expandIcon,hi=Gn.onItemClick,zn=Gn.onOpenChange,kn=Gn.onActive,dr=le.useContext(Le),mr=dr._internalRenderSubMenuItem,Jr=le.useContext(be),sa=Jr.isSubPathKey,Ii=se(),zr="".concat(nn,"-submenu"),yi=In||Gt,pi=le.useRef(),ii=le.useRef(),Gi=Kn!=null?Kn:Wr,mi=Qn!=null?Qn:Pr,Bi=Zn.includes(xt),ba=!ir&&Bi,da=sa(ar,xt),ea=Ne(xt,yi,Un,Nn),ma=ea.active,xa=(0,N.Z)(ea,J),Fa=le.useState(!1),Ka=(0,R.Z)(Fa,2),Do=Ka[0],Co=Ka[1],ao=function(Ki){yi||Co(Ki)},la=function(Ki){ao(!0),Vn==null||Vn({key:xt,domEvent:Ki})},Fo=function(Ki){ao(!1),wn==null||wn({key:xt,domEvent:Ki})},oo=le.useMemo(function(){return ma||(Ht!=="inline"?Do||sa([xr],xt):!1)},[Ht,ma,xr,Do,xt,sa]),Da=Xe(Ii.length),ta=function(Ki){yi||(On==null||On({key:xt,domEvent:Ki}),Ht==="inline"&&zn(xt,!Bi))},so=U(function(Xi){jn==null||jn(yt(Xi)),hi(Xi)}),cr=function(Ki){Ht!=="inline"&&zn(xt,Ki)},Br=function(){kn(xt)},_r=Zr&&"".concat(Zr,"-popup"),sr=le.createElement("div",(0,K.Z)({role:"menuitem",style:Da,className:"".concat(zr,"-title"),tabIndex:yi?null:-1,ref:pi,title:typeof bt=="string"?bt:null,"data-menu-id":ir&&Zr?null:Zr,"aria-expanded":ba,"aria-haspopup":!0,"aria-controls":_r,"aria-disabled":yi,onClick:ta,onFocus:Br},xa),bt,le.createElement(ct,{icon:Ht!=="horizontal"?mi:void 0,props:(0,A.Z)((0,A.Z)({},st),{},{isOpen:ba,isSubMenu:!0})},le.createElement("i",{className:"".concat(zr,"-arrow")}))),Gr=le.useRef(Ht);if(Ht!=="inline"&&Ii.length>1?Gr.current="vertical":Gr.current=Ht,!ir){var ai=Gr.current;sr=le.createElement(Ke,{mode:ai,prefixCls:zr,visible:!an&&ba&&Ht!=="inline",popupClassName:$n,popupOffset:Cn,popupStyle:rr,popup:le.createElement(q,{mode:ai==="horizontal"?"vertical":ai},le.createElement(Mn,{id:_r,ref:ii},Pn)),disabled:yi,onVisibleChange:cr},sr)}var Fi=le.createElement(F.Z.Item,(0,K.Z)({role:"none"},vr,{component:"li",style:Mt,className:E()(zr,"".concat(zr,"-").concat(Ht),gt,(ht={},(0,j.Z)(ht,"".concat(zr,"-open"),ba),(0,j.Z)(ht,"".concat(zr,"-active"),oo),(0,j.Z)(ht,"".concat(zr,"-selected"),da),(0,j.Z)(ht,"".concat(zr,"-disabled"),yi),ht)),onMouseEnter:la,onMouseLeave:Fo}),sr,!ir&&le.createElement(ee,{id:_r,open:ba,keyPath:Ii},Pn));return mr&&(Fi=mr(Fi,st,{selected:da,active:oo,open:ba,disabled:yi})),le.createElement(q,{onItemClick:so,mode:Ht==="horizontal"?"vertical":Ht,itemIcon:Gi,expandIcon:mi},Fi)};function Ze(ot){var st=ot.eventKey,ht=ot.children,Mt=se(st),gt=An(ht,Mt),bt=ae();le.useEffect(function(){if(bt)return bt.registerPath(st,Mt),function(){bt.unregisterPath(st,Mt)}},[Mt]);var xt;return bt?xt=gt:xt=le.createElement(Ee,ot,gt),le.createElement(Se.Provider,{value:Mt},xt)}var ft=m(76190),tt=["className","title","eventKey","children"],ut=["children"],It=function(st){var ht=st.className,Mt=st.title,gt=st.eventKey,bt=st.children,xt=(0,N.Z)(st,tt),Rt=le.useContext(Ce),Gt=Rt.prefixCls,an="".concat(Gt,"-item-group");return le.createElement("li",(0,K.Z)({role:"presentation"},xt,{onClick:function(Kn){return Kn.stopPropagation()},className:E()(an,ht)}),le.createElement("div",{role:"presentation",className:"".concat(an,"-title"),title:typeof Mt=="string"?Mt:void 0},Mt),le.createElement("ul",{role:"group",className:"".concat(an,"-list")},bt))};function Pt(ot){var st=ot.children,ht=(0,N.Z)(ot,ut),Mt=se(ht.eventKey),gt=An(st,Mt),bt=ae();return bt?gt:le.createElement(It,(0,re.Z)(ht,["warnKey"]),gt)}function At(ot){var st=ot.className,ht=ot.style,Mt=le.useContext(Ce),gt=Mt.prefixCls,bt=ae();return bt?null:le.createElement("li",{role:"separator",className:E()("".concat(gt,"-item-divider"),st),style:ht})}var Ge=["label","children","key","type"];function St(ot){return(ot||[]).map(function(st,ht){if(st&&(0,ft.Z)(st)==="object"){var Mt=st,gt=Mt.label,bt=Mt.children,xt=Mt.key,Rt=Mt.type,Gt=(0,N.Z)(Mt,Ge),an=xt!=null?xt:"tmp-".concat(ht);return bt||Rt==="group"?Rt==="group"?le.createElement(Pt,(0,K.Z)({key:an},Gt,{title:gt}),St(bt)):le.createElement(Ze,(0,K.Z)({key:an},Gt,{title:gt}),St(bt)):Rt==="divider"?le.createElement(At,(0,K.Z)({key:an},Gt)):le.createElement(Wt,(0,K.Z)({key:an},Gt),gt)}return null}).filter(function(st){return st})}function Qt(ot,st,ht){var Mt=ot;return st&&(Mt=St(st)),An(Mt,ht)}var Kt=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],tn=[],Ut=le.forwardRef(function(ot,st){var ht,Mt,gt=ot,bt=gt.prefixCls,xt=bt===void 0?"rc-menu":bt,Rt=gt.rootClassName,Gt=gt.style,an=gt.className,Pn=gt.tabIndex,Kn=Pn===void 0?0:Pn,Qn=gt.items,$n=gt.children,Cn=gt.direction,rr=gt.id,jn=gt.mode,Vn=jn===void 0?"vertical":jn,wn=gt.inlineCollapsed,On=gt.disabled,Un=gt.disabledOverflow,Nn=gt.subMenuOpenDelay,vr=Nn===void 0?.1:Nn,Zr=gt.subMenuCloseDelay,Gn=Zr===void 0?.1:Zr,nn=gt.forceSubMenuRender,Ht=gt.defaultOpenKeys,Zn=gt.openKeys,In=gt.activeKey,ir=gt.defaultActiveFirst,xr=gt.selectable,ar=xr===void 0?!0:xr,Wr=gt.multiple,Pr=Wr===void 0?!1:Wr,hi=gt.defaultSelectedKeys,zn=gt.selectedKeys,kn=gt.onSelect,dr=gt.onDeselect,mr=gt.inlineIndent,Jr=mr===void 0?24:mr,sa=gt.motion,Ii=gt.defaultMotions,zr=gt.triggerSubMenuAction,yi=zr===void 0?"hover":zr,pi=gt.builtinPlacements,ii=gt.itemIcon,Gi=gt.expandIcon,mi=gt.overflowedIndicator,Bi=mi===void 0?"...":mi,ba=gt.overflowedIndicatorPopupClassName,da=gt.getPopupContainer,ea=gt.onClick,ma=gt.onOpenChange,xa=gt.onKeyDown,Fa=gt.openAnimation,Ka=gt.openTransitionName,Do=gt._internalRenderMenuItem,Co=gt._internalRenderSubMenuItem,ao=(0,N.Z)(gt,Kt),la=le.useMemo(function(){return Qt($n,Qn,tn)},[$n,Qn]),Fo=le.useState(!1),oo=(0,R.Z)(Fo,2),Da=oo[0],ta=oo[1],so=le.useRef(),cr=ce(rr),Br=Cn==="rtl",_r=(0,V.Z)(Ht,{value:Zn,postState:function(Mi){return Mi||tn}}),sr=(0,R.Z)(_r,2),Gr=sr[0],ai=sr[1],Fi=function(Mi){var Di=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function go(){ai(Mi),ma==null||ma(Mi)}Di?(0,ke.flushSync)(go):go()},Xi=le.useState(Gr),Ki=(0,R.Z)(Xi,2),Yi=Ki[0],Qr=Ki[1],qr=le.useRef(!1),Hi=le.useMemo(function(){return(Vn==="inline"||Vn==="vertical")&&wn?["vertical",wn]:[Vn,!1]},[Vn,wn]),Zi=(0,R.Z)(Hi,2),fa=Zi[0],Wi=Zi[1],bs=fa==="inline",$o=le.useState(fa),Po=(0,R.Z)($o,2),lo=Po[0],Ps=Po[1],Oo=le.useState(Wi),$a=(0,R.Z)(Oo,2),ga=$a[0],Uo=$a[1];le.useEffect(function(){Ps(fa),Uo(Wi),qr.current&&(bs?ai(Yi):Fi(tn))},[fa,Wi]);var es=le.useState(0),ts=(0,R.Z)(es,2),Os=ts[0],ds=ts[1],co=Os>=la.length-1||lo!=="horizontal"||Un;le.useEffect(function(){bs&&Qr(Gr)},[Gr]),le.useEffect(function(){return qr.current=!0,function(){qr.current=!1}},[]);var qa=Y(),ki=qa.registerPath,ns=qa.unregisterPath,As=qa.refreshOverflowKeys,Go=qa.isSubPathKey,ni=qa.getKeyPath,Xr=qa.getKeys,Ti=qa.getSubPathKeys,na=le.useMemo(function(){return{registerPath:ki,unregisterPath:ns}},[ki,ns]),Ni=le.useMemo(function(){return{isSubPathKey:Go}},[Go]);le.useEffect(function(){As(co?tn:la.slice(Os+1).map(function(bi){return bi.key}))},[Os,co]);var Pa=(0,V.Z)(In||ir&&((ht=la[0])===null||ht===void 0?void 0:ht.key),{value:In}),Ha=(0,R.Z)(Pa,2),mo=Ha[0],Za=Ha[1],Ko=U(function(bi){Za(bi)}),Ao=U(function(){Za(void 0)});(0,le.useImperativeHandle)(st,function(){return{list:so.current,focus:function(Mi){var Di,go=Xr(),ja=y(go,cr),Xo=ja.elements,uo=ja.key2element,Oa=ja.element2key,rs=h(so.current,Xo),is=mo!=null?mo:rs[0]?Oa.get(rs[0]):(Di=la.find(function(rc){return!rc.props.disabled}))===null||Di===void 0?void 0:Di.key,as=uo.get(is);if(is&&as){var Ns;as==null||(Ns=as.focus)===null||Ns===void 0||Ns.call(as,Mi)}}}});var Wa=(0,V.Z)(hi||[],{value:zn,postState:function(Mi){return Array.isArray(Mi)?Mi:Mi==null?tn:[Mi]}}),Cl=(0,R.Z)(Wa,2),xs=Cl[0],Ss=Cl[1],ll=function(Mi){if(ar){var Di=Mi.key,go=xs.includes(Di),ja;Pr?go?ja=xs.filter(function(uo){return uo!==Di}):ja=[].concat((0,xe.Z)(xs),[Di]):ja=[Di],Ss(ja);var Xo=(0,A.Z)((0,A.Z)({},Mi),{},{selectedKeys:ja});go?dr==null||dr(Xo):kn==null||kn(Xo)}!Pr&&Gr.length&&lo!=="inline"&&Fi(tn)},Js=U(function(bi){ea==null||ea(yt(bi)),ll(bi)}),Bs=U(function(bi,Mi){var Di=Gr.filter(function(ja){return ja!==bi});if(Mi)Di.push(bi);else if(lo!=="inline"){var go=Ti(bi);Di=Di.filter(function(ja){return!go.has(ja)})}(0,Ie.Z)(Gr,Di,!0)||Fi(Di,!0)}),nc=function(Mi,Di){var go=Di!=null?Di:!Gr.includes(Mi);Bs(Mi,go)},fs=d(lo,mo,Br,cr,so,Xr,ni,Za,nc,xa);le.useEffect(function(){ta(!0)},[]);var cl=le.useMemo(function(){return{_internalRenderMenuItem:Do,_internalRenderSubMenuItem:Co}},[Do,Co]),hs=lo!=="horizontal"||Un?la:la.map(function(bi,Mi){return le.createElement(q,{key:bi.key,overflowDisabled:Mi>Os},bi)}),Cs=le.createElement(F.Z,(0,K.Z)({id:rr,ref:so,prefixCls:"".concat(xt,"-overflow"),component:"ul",itemComponent:Wt,className:E()(xt,"".concat(xt,"-root"),"".concat(xt,"-").concat(lo),an,(Mt={},(0,j.Z)(Mt,"".concat(xt,"-inline-collapsed"),ga),(0,j.Z)(Mt,"".concat(xt,"-rtl"),Br),Mt),Rt),dir:Cn,style:Gt,role:"menu",tabIndex:Kn,data:hs,renderRawItem:function(Mi){return Mi},renderRawRest:function(Mi){var Di=Mi.length,go=Di?la.slice(-Di):null;return le.createElement(Ze,{eventKey:he,title:Bi,disabled:co,internalPopupClose:Di===0,popupClassName:ba},go)},maxCount:lo!=="horizontal"||Un?F.Z.INVALIDATE:F.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Mi){ds(Mi)},onKeyDown:fs},ao));return le.createElement(Le.Provider,{value:cl},le.createElement(ue.Provider,{value:cr},le.createElement(q,{prefixCls:xt,rootClassName:Rt,mode:lo,openKeys:Gr,rtl:Br,disabled:On,motion:Da?sa:null,defaultMotions:Da?Ii:null,activeKey:mo,onActive:Ko,onInactive:Ao,selectedKeys:xs,inlineIndent:Jr,subMenuOpenDelay:vr,subMenuCloseDelay:Gn,forceSubMenuRender:nn,builtinPlacements:pi,triggerSubMenuAction:yi,getPopupContainer:da,itemIcon:ii,expandIcon:Gi,onItemClick:Js,onOpenChange:Bs},le.createElement(be.Provider,{value:Ni},Cs),le.createElement("div",{style:{display:"none"},"aria-hidden":!0},le.createElement(ie.Provider,{value:na},la)))))}),Sn=Ut,Nt=Sn;Nt.Item=Wt,Nt.SubMenu=Ze,Nt.ItemGroup=Pt,Nt.Divider=At;var mn=Nt},83836:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return Fe}});var K=m(54476),j=m(33885),A=m(42978),xe=m(75931),R=m(59301),N=m(92310),x=m.n(N),E=m(29301),F=m(34280),V=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Ie=void 0;function G(Re,X){var w=Re.prefixCls,ve=Re.invalidate,Qe=Re.item,je=Re.renderItem,Be=Re.responsive,Oe=Re.responsiveDisabled,lt=Re.registerSize,$t=Re.itemKey,vt=Re.className,Tt=Re.style,wt=Re.children,pt=Re.display,at=Re.order,S=Re.component,p=S===void 0?"div":S,h=(0,xe.Z)(Re,V),g=Be&&!pt;function y(I){lt($t,I)}R.useEffect(function(){return function(){y(null)}},[]);var d=je&&Qe!==Ie?je(Qe,{index:at}):wt,L;ve||(L={opacity:g?0:1,height:g?0:Ie,overflowY:g?"hidden":Ie,order:Be?at:Ie,pointerEvents:g?"none":Ie,position:g?"absolute":Ie});var fe={};g&&(fe["aria-hidden"]=!0);var O=R.createElement(p,(0,K.Z)({className:x()(!ve&&w,vt),style:(0,j.Z)((0,j.Z)({},L),Tt)},fe,h,{ref:X}),d);return Be&&(O=R.createElement(E.Z,{onResize:function(he){var Y=he.offsetWidth;y(Y)},disabled:Oe},O)),O}var le=R.forwardRef(G);le.displayName="Item";var ke=le,ue=m(6089),de=m(4676),_e=m(16089);function Pe(Re){if(typeof MessageChannel=="undefined")(0,_e.Z)(Re);else{var X=new MessageChannel;X.port1.onmessage=function(){return Re()},X.port2.postMessage(void 0)}}function Ue(){var Re=R.useRef(null),X=function(ve){Re.current||(Re.current=[],Pe(function(){(0,de.unstable_batchedUpdates)(function(){Re.current.forEach(function(Qe){Qe()}),Re.current=null})})),Re.current.push(ve)};return X}function Ce(Re,X){var w=R.useState(X),ve=(0,A.Z)(w,2),Qe=ve[0],je=ve[1],Be=(0,ue.Z)(function(Oe){Re(function(){je(Oe)})});return[Qe,Be]}var pe=R.createContext(null),q=["component"],_=["className"],ie=["className"],ae=function(X,w){var ve=R.useContext(pe);if(!ve){var Qe=X.component,je=Qe===void 0?"div":Qe,Be=(0,xe.Z)(X,q);return R.createElement(je,(0,K.Z)({},Be,{ref:w}))}var Oe=ve.className,lt=(0,xe.Z)(ve,_),$t=X.className,vt=(0,xe.Z)(X,ie);return R.createElement(pe.Provider,{value:null},R.createElement(ke,(0,K.Z)({ref:w,className:x()(Oe,$t)},lt,vt)))},Se=R.forwardRef(ae);Se.displayName="RawItem";var se=Se,be=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],D="responsive",Le="invalidate";function z(Re){return"+ ".concat(Re.length," ...")}function we(Re,X){var w=Re.prefixCls,ve=w===void 0?"rc-overflow":w,Qe=Re.data,je=Qe===void 0?[]:Qe,Be=Re.renderItem,Oe=Re.renderRawItem,lt=Re.itemKey,$t=Re.itemWidth,vt=$t===void 0?10:$t,Tt=Re.ssr,wt=Re.style,pt=Re.className,at=Re.maxCount,S=Re.renderRest,p=Re.renderRawRest,h=Re.prefix,g=Re.suffix,y=Re.component,d=y===void 0?"div":y,L=Re.itemComponent,fe=Re.onVisibleChange,O=(0,xe.Z)(Re,be),I=Tt==="full",he=Ue(),Y=Ce(he,null),U=(0,A.Z)(Y,2),ye=U[0],Ye=U[1],ce=ye||0,Ae=Ce(he,new Map),qe=(0,A.Z)(Ae,2),oe=qe[0],T=qe[1],re=Ce(he,0),$e=(0,A.Z)(re,2),Ne=$e[0],Xe=$e[1],ct=Ce(he,0),mt=(0,A.Z)(ct,2),yt=mt[0],Bt=mt[1],Ft=Ce(he,0),_t=(0,A.Z)(Ft,2),Yt=_t[0],rn=_t[1],hn=Ce(he,0),Wt=(0,A.Z)(hn,2),on=Wt[0],xn=Wt[1],Vt=(0,R.useState)(null),Mn=(0,A.Z)(Vt,2),qn=Mn[0],An=Mn[1],pr=(0,R.useState)(null),er=(0,A.Z)(pr,2),gr=er[0],$r=er[1],Rn=R.useMemo(function(){return gr===null&&I?Number.MAX_SAFE_INTEGER:gr||0},[gr,ye]),pn=(0,R.useState)(!1),tr=(0,A.Z)(pn,2),Ke=tr[0],H=tr[1],ee="".concat(ve,"-item"),Q=Math.max(Ne,yt),J=at===D,Ee=je.length&&J,Ze=at===Le,ft=Ee||typeof at=="number"&&je.length>at,tt=(0,R.useMemo)(function(){var bt=je;return Ee?ye===null&&I?bt=je:bt=je.slice(0,Math.min(je.length,ce/vt)):typeof at=="number"&&(bt=je.slice(0,at)),bt},[je,vt,ye,at,Ee]),ut=(0,R.useMemo)(function(){return Ee?je.slice(Rn+1):je.slice(tt.length)},[je,tt,Ee,Rn]),It=(0,R.useCallback)(function(bt,xt){var Rt;return typeof lt=="function"?lt(bt):(Rt=lt&&(bt==null?void 0:bt[lt]))!==null&&Rt!==void 0?Rt:xt},[lt]),Pt=(0,R.useCallback)(Be||function(bt){return bt},[Be]);function At(bt,xt,Rt){gr===bt&&(xt===void 0||xt===qn)||($r(bt),Rt||(H(bt<je.length-1),fe==null||fe(bt)),xt!==void 0&&An(xt))}function Ge(bt,xt){Ye(xt.clientWidth)}function St(bt,xt){T(function(Rt){var Gt=new Map(Rt);return xt===null?Gt.delete(bt):Gt.set(bt,xt),Gt})}function Qt(bt,xt){Bt(xt),Xe(yt)}function Kt(bt,xt){rn(xt)}function tn(bt,xt){xn(xt)}function Ut(bt){return oe.get(It(tt[bt],bt))}(0,F.Z)(function(){if(ce&&typeof Q=="number"&&tt){var bt=Yt+on,xt=tt.length,Rt=xt-1;if(!xt){At(0,null);return}for(var Gt=0;Gt<xt;Gt+=1){var an=Ut(Gt);if(I&&(an=an||0),an===void 0){At(Gt-1,void 0,!0);break}if(bt+=an,Rt===0&&bt<=ce||Gt===Rt-1&&bt+Ut(Rt)<=ce){At(Rt,null);break}else if(bt+Q>ce){At(Gt-1,bt-an-on+yt);break}}g&&Ut(0)+on>ce&&An(null)}},[ce,oe,yt,Yt,on,It,tt]);var Sn=Ke&&!!ut.length,Nt={};qn!==null&&Ee&&(Nt={position:"absolute",left:qn,top:0});var mn={prefixCls:ee,responsive:Ee,component:L,invalidate:Ze},ot=Oe?function(bt,xt){var Rt=It(bt,xt);return R.createElement(pe.Provider,{key:Rt,value:(0,j.Z)((0,j.Z)({},mn),{},{order:xt,item:bt,itemKey:Rt,registerSize:St,display:xt<=Rn})},Oe(bt,xt))}:function(bt,xt){var Rt=It(bt,xt);return R.createElement(ke,(0,K.Z)({},mn,{order:xt,key:Rt,item:bt,renderItem:Pt,itemKey:Rt,registerSize:St,display:xt<=Rn}))},st={order:Sn?Rn:Number.MAX_SAFE_INTEGER,className:"".concat(ee,"-rest"),registerSize:Qt,display:Sn},ht=S||z,Mt=p?R.createElement(pe.Provider,{value:(0,j.Z)((0,j.Z)({},mn),st)},p(ut)):R.createElement(ke,(0,K.Z)({},mn,st),typeof ht=="function"?ht(ut):ht),gt=R.createElement(d,(0,K.Z)({className:x()(!Ze&&ve,pt),style:wt,ref:X},O),h&&R.createElement(ke,(0,K.Z)({},mn,{responsive:J,responsiveDisabled:!Ee,order:-1,className:"".concat(ee,"-prefix"),registerSize:Kt,display:!0}),h),tt.map(ot),ft?Mt:null,g&&R.createElement(ke,(0,K.Z)({},mn,{responsive:J,responsiveDisabled:!Ee,order:Rn,className:"".concat(ee,"-suffix"),registerSize:tn,display:!0,style:Nt}),g));return J?R.createElement(E.Z,{onResize:Ge,disabled:!Ee},gt):gt}var ge=R.forwardRef(we);ge.displayName="Overflow",ge.Item=se,ge.RESPONSIVE=D,ge.INVALIDATE=Le;var Te=ge,Fe=Te},91735:function(yn,dt){"use strict";dt.Z={items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"}},17115:function(yn,dt,m){"use strict";m.d(dt,{ZP:function(){return x}});var K=m(42978),j=m(59301),A=m(47273),xe=0,R=(0,A.Z)();function N(){var E;return R?(E=xe,xe+=1):E="TEST_OR_SSR",E}function x(E){var F=j.useState(),V=(0,K.Z)(F,2),Ie=V[0],G=V[1];return j.useEffect(function(){G("rc_select_".concat(N()))},[]),E||Ie}},77861:function(yn,dt,m){"use strict";m.d(dt,{Ac:function(){return ye},Xo:function(){return yt},Wx:function(){return Ft},ZP:function(){return ee},lk:function(){return pe}});var K=m(54476),j=m(94480),A=m(20068),xe=m(33885),R=m(42978),N=m(75931),x=m(76190),E=m(18929),F=m(48736),V=m(59301),Ie=m(92310),G=m.n(Ie),le=m(34280),ke=m(49658),ue=m(10228),de=m(8654),_e=function(J){var Ee=J.className,Ze=J.customizeIcon,ft=J.customizeIconProps,tt=J.onMouseDown,ut=J.onClick,It=J.children,Pt;return typeof Ze=="function"?Pt=Ze(ft):Pt=Ze,V.createElement("span",{className:Ee,onMouseDown:function(Ge){Ge.preventDefault(),tt&&tt(Ge)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:ut,"aria-hidden":!0},Pt!==void 0?Pt:V.createElement("span",{className:G()(Ee.split(/\s+/).map(function(At){return"".concat(At,"-icon")}))},It))},Pe=_e;function Ue(Q,J,Ee,Ze,ft){var tt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,ut=arguments.length>6?arguments[6]:void 0,It=arguments.length>7?arguments[7]:void 0,Pt=V.useMemo(function(){if((0,x.Z)(Ze)==="object")return Ze.clearIcon;if(ft)return ft},[Ze,ft]),At=V.useMemo(function(){return!!(!tt&&Ze&&(Ee.length||ut)&&!(It==="combobox"&&ut===""))},[Ze,tt,Ee.length,ut,It]);return{allowClear:At,clearIcon:V.createElement(Pe,{className:"".concat(Q,"-clear"),onMouseDown:J,customizeIcon:Pt},"\xD7")}}var Ce=V.createContext(null);function pe(){return V.useContext(Ce)}function q(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,J=V.useState(!1),Ee=(0,R.Z)(J,2),Ze=Ee[0],ft=Ee[1],tt=V.useRef(null),ut=function(){window.clearTimeout(tt.current)};V.useEffect(function(){return ut},[]);var It=function(At,Ge){ut(),tt.current=window.setTimeout(function(){ft(At),Ge&&Ge()},Q)};return[Ze,It,ut]}function _(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,J=V.useRef(null),Ee=V.useRef(null);V.useEffect(function(){return function(){window.clearTimeout(Ee.current)}},[]);function Ze(ft){(ft||J.current===null)&&(J.current=ft),window.clearTimeout(Ee.current),Ee.current=window.setTimeout(function(){J.current=null},Q)}return[function(){return J.current},Ze]}function ie(Q,J,Ee,Ze){var ft=V.useRef(null);ft.current={open:J,triggerOpen:Ee,customizedTrigger:Ze},V.useEffect(function(){function tt(ut){var It;if(!((It=ft.current)!==null&&It!==void 0&&It.customizedTrigger)){var Pt=ut.target;Pt.shadowRoot&&ut.composed&&(Pt=ut.composedPath()[0]||Pt),ft.current.open&&Q().filter(function(At){return At}).every(function(At){return!At.contains(Pt)&&At!==Pt})&&ft.current.triggerOpen(!1)}}return window.addEventListener("mousedown",tt),function(){return window.removeEventListener("mousedown",tt)}},[])}var ae=m(26112),Se=m(83836),se=function(J,Ee){var Ze,ft,tt=J.prefixCls,ut=J.id,It=J.inputElement,Pt=J.disabled,At=J.tabIndex,Ge=J.autoFocus,St=J.autoComplete,Qt=J.editable,Kt=J.activeDescendantId,tn=J.value,Ut=J.maxLength,Sn=J.onKeyDown,Nt=J.onMouseDown,mn=J.onChange,ot=J.onPaste,st=J.onCompositionStart,ht=J.onCompositionEnd,Mt=J.open,gt=J.attrs,bt=It||V.createElement("input",null),xt=bt,Rt=xt.ref,Gt=xt.props,an=Gt.onKeyDown,Pn=Gt.onChange,Kn=Gt.onMouseDown,Qn=Gt.onCompositionStart,$n=Gt.onCompositionEnd,Cn=Gt.style;return(0,F.Kp)(!("maxLength"in bt.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),bt=V.cloneElement(bt,(0,xe.Z)((0,xe.Z)((0,xe.Z)({type:"search"},Gt),{},{id:ut,ref:(0,de.sQ)(Ee,Rt),disabled:Pt,tabIndex:At,autoComplete:St||"off",autoFocus:Ge,className:G()("".concat(tt,"-selection-search-input"),(Ze=bt)===null||Ze===void 0||(ft=Ze.props)===null||ft===void 0?void 0:ft.className),role:"combobox","aria-label":"Search","aria-expanded":Mt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(ut,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(ut,"_list"),"aria-activedescendant":Mt?Kt:void 0},gt),{},{value:Qt?tn:"",maxLength:Ut,readOnly:!Qt,unselectable:Qt?null:"on",style:(0,xe.Z)((0,xe.Z)({},Cn),{},{opacity:Qt?null:0}),onKeyDown:function(jn){Sn(jn),an&&an(jn)},onMouseDown:function(jn){Nt(jn),Kn&&Kn(jn)},onChange:function(jn){mn(jn),Pn&&Pn(jn)},onCompositionStart:function(jn){st(jn),Qn&&Qn(jn)},onCompositionEnd:function(jn){ht(jn),$n&&$n(jn)},onPaste:ot})),bt},be=V.forwardRef(se);be.displayName="Input";var D=be;function Le(Q){return Array.isArray(Q)?Q:Q!==void 0?[Q]:[]}var z=typeof window!="undefined"&&window.document&&window.document.documentElement,we=z;function ge(Q){return Q!=null}function Te(Q){return!Q&&Q!==0}function Fe(Q){return["string","number"].includes((0,x.Z)(Q))}function Re(Q){var J=void 0;return Q&&(Fe(Q.title)?J=Q.title.toString():Fe(Q.label)&&(J=Q.label.toString())),J}function X(Q,J){we?V.useLayoutEffect(Q,J):V.useEffect(Q,J)}function w(Q){var J;return(J=Q.key)!==null&&J!==void 0?J:Q.value}var ve=function(J){J.preventDefault(),J.stopPropagation()},Qe=function(J){var Ee=J.id,Ze=J.prefixCls,ft=J.values,tt=J.open,ut=J.searchValue,It=J.autoClearSearchValue,Pt=J.inputRef,At=J.placeholder,Ge=J.disabled,St=J.mode,Qt=J.showSearch,Kt=J.autoFocus,tn=J.autoComplete,Ut=J.activeDescendantId,Sn=J.tabIndex,Nt=J.removeIcon,mn=J.maxTagCount,ot=J.maxTagTextLength,st=J.maxTagPlaceholder,ht=st===void 0?function(xr){return"+ ".concat(xr.length," ...")}:st,Mt=J.tagRender,gt=J.onToggleOpen,bt=J.onRemove,xt=J.onInputChange,Rt=J.onInputPaste,Gt=J.onInputKeyDown,an=J.onInputMouseDown,Pn=J.onInputCompositionStart,Kn=J.onInputCompositionEnd,Qn=V.useRef(null),$n=(0,V.useState)(0),Cn=(0,R.Z)($n,2),rr=Cn[0],jn=Cn[1],Vn=(0,V.useState)(!1),wn=(0,R.Z)(Vn,2),On=wn[0],Un=wn[1],Nn="".concat(Ze,"-selection"),vr=tt||St==="multiple"&&It===!1||St==="tags"?ut:"",Zr=St==="tags"||St==="multiple"&&It===!1||Qt&&(tt||On);X(function(){jn(Qn.current.scrollWidth)},[vr]);function Gn(xr,ar,Wr,Pr,hi){return V.createElement("span",{className:G()("".concat(Nn,"-item"),(0,A.Z)({},"".concat(Nn,"-item-disabled"),Wr)),title:Re(xr)},V.createElement("span",{className:"".concat(Nn,"-item-content")},ar),Pr&&V.createElement(Pe,{className:"".concat(Nn,"-item-remove"),onMouseDown:ve,onClick:hi,customizeIcon:Nt},"\xD7"))}function nn(xr,ar,Wr,Pr,hi){var zn=function(dr){ve(dr),gt(!tt)};return V.createElement("span",{onMouseDown:zn},Mt({label:ar,value:xr,disabled:Wr,closable:Pr,onClose:hi}))}function Ht(xr){var ar=xr.disabled,Wr=xr.label,Pr=xr.value,hi=!Ge&&!ar,zn=Wr;if(typeof ot=="number"&&(typeof Wr=="string"||typeof Wr=="number")){var kn=String(zn);kn.length>ot&&(zn="".concat(kn.slice(0,ot),"..."))}var dr=function(Jr){Jr&&Jr.stopPropagation(),bt(xr)};return typeof Mt=="function"?nn(Pr,zn,ar,hi,dr):Gn(xr,zn,ar,hi,dr)}function Zn(xr){var ar=typeof ht=="function"?ht(xr):ht;return Gn({title:ar},ar,!1)}var In=V.createElement("div",{className:"".concat(Nn,"-search"),style:{width:rr},onFocus:function(){Un(!0)},onBlur:function(){Un(!1)}},V.createElement(D,{ref:Pt,open:tt,prefixCls:Ze,id:Ee,inputElement:null,disabled:Ge,autoFocus:Kt,autoComplete:tn,editable:Zr,activeDescendantId:Ut,value:vr,onKeyDown:Gt,onMouseDown:an,onChange:xt,onPaste:Rt,onCompositionStart:Pn,onCompositionEnd:Kn,tabIndex:Sn,attrs:(0,ae.Z)(J,!0)}),V.createElement("span",{ref:Qn,className:"".concat(Nn,"-search-mirror"),"aria-hidden":!0},vr,"\xA0")),ir=V.createElement(Se.Z,{prefixCls:"".concat(Nn,"-overflow"),data:ft,renderItem:Ht,renderRest:Zn,suffix:In,itemKey:w,maxCount:mn});return V.createElement(V.Fragment,null,ir,!ft.length&&!vr&&V.createElement("span",{className:"".concat(Nn,"-placeholder")},At))},je=Qe,Be=function(J){var Ee=J.inputElement,Ze=J.prefixCls,ft=J.id,tt=J.inputRef,ut=J.disabled,It=J.autoFocus,Pt=J.autoComplete,At=J.activeDescendantId,Ge=J.mode,St=J.open,Qt=J.values,Kt=J.placeholder,tn=J.tabIndex,Ut=J.showSearch,Sn=J.searchValue,Nt=J.activeValue,mn=J.maxLength,ot=J.onInputKeyDown,st=J.onInputMouseDown,ht=J.onInputChange,Mt=J.onInputPaste,gt=J.onInputCompositionStart,bt=J.onInputCompositionEnd,xt=J.title,Rt=V.useState(!1),Gt=(0,R.Z)(Rt,2),an=Gt[0],Pn=Gt[1],Kn=Ge==="combobox",Qn=Kn||Ut,$n=Qt[0],Cn=Sn||"";Kn&&Nt&&!an&&(Cn=Nt),V.useEffect(function(){Kn&&Pn(!1)},[Kn,Nt]);var rr=Ge!=="combobox"&&!St&&!Ut?!1:!!Cn,jn=xt===void 0?Re($n):xt,Vn=function(){if($n)return null;var On=rr?{visibility:"hidden"}:void 0;return V.createElement("span",{className:"".concat(Ze,"-selection-placeholder"),style:On},Kt)};return V.createElement(V.Fragment,null,V.createElement("span",{className:"".concat(Ze,"-selection-search")},V.createElement(D,{ref:tt,prefixCls:Ze,id:ft,open:St,inputElement:Ee,disabled:ut,autoFocus:It,autoComplete:Pt,editable:Qn,activeDescendantId:At,value:Cn,onKeyDown:ot,onMouseDown:st,onChange:function(On){Pn(!0),ht(On)},onPaste:Mt,onCompositionStart:gt,onCompositionEnd:bt,tabIndex:tn,attrs:(0,ae.Z)(J,!0),maxLength:Kn?mn:void 0})),!Kn&&$n?V.createElement("span",{className:"".concat(Ze,"-selection-item"),title:jn,style:rr?{visibility:"hidden"}:void 0},$n.label):null,Vn())},Oe=Be;function lt(Q){return![ue.Z.ESC,ue.Z.SHIFT,ue.Z.BACKSPACE,ue.Z.TAB,ue.Z.WIN_KEY,ue.Z.ALT,ue.Z.META,ue.Z.WIN_KEY_RIGHT,ue.Z.CTRL,ue.Z.SEMICOLON,ue.Z.EQUALS,ue.Z.CAPS_LOCK,ue.Z.CONTEXT_MENU,ue.Z.F1,ue.Z.F2,ue.Z.F3,ue.Z.F4,ue.Z.F5,ue.Z.F6,ue.Z.F7,ue.Z.F8,ue.Z.F9,ue.Z.F10,ue.Z.F11,ue.Z.F12].includes(Q)}var $t=function(J,Ee){var Ze=(0,V.useRef)(null),ft=(0,V.useRef)(!1),tt=J.prefixCls,ut=J.open,It=J.mode,Pt=J.showSearch,At=J.tokenWithEnter,Ge=J.autoClearSearchValue,St=J.onSearch,Qt=J.onSearchSubmit,Kt=J.onToggleOpen,tn=J.onInputKeyDown,Ut=J.domRef;V.useImperativeHandle(Ee,function(){return{focus:function(){Ze.current.focus()},blur:function(){Ze.current.blur()}}});var Sn=_(0),Nt=(0,R.Z)(Sn,2),mn=Nt[0],ot=Nt[1],st=function(Cn){var rr=Cn.which;(rr===ue.Z.UP||rr===ue.Z.DOWN)&&Cn.preventDefault(),tn&&tn(Cn),rr===ue.Z.ENTER&&It==="tags"&&!ft.current&&!ut&&(Qt==null||Qt(Cn.target.value)),lt(rr)&&Kt(!0)},ht=function(){ot(!0)},Mt=(0,V.useRef)(null),gt=function(Cn){St(Cn,!0,ft.current)!==!1&&Kt(!0)},bt=function(){ft.current=!0},xt=function(Cn){ft.current=!1,It!=="combobox"&>(Cn.target.value)},Rt=function(Cn){var rr=Cn.target.value;if(At&&Mt.current&&/[\r\n]/.test(Mt.current)){var jn=Mt.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");rr=rr.replace(jn,Mt.current)}Mt.current=null,gt(rr)},Gt=function(Cn){var rr=Cn.clipboardData,jn=rr.getData("text");Mt.current=jn},an=function(Cn){var rr=Cn.target;if(rr!==Ze.current){var jn=document.body.style.msTouchAction!==void 0;jn?setTimeout(function(){Ze.current.focus()}):Ze.current.focus()}},Pn=function(Cn){var rr=mn();Cn.target!==Ze.current&&!rr&&It!=="combobox"&&Cn.preventDefault(),(It!=="combobox"&&(!Pt||!rr)||!ut)&&(ut&&Ge!==!1&&St("",!0,!1),Kt())},Kn={inputRef:Ze,onInputKeyDown:st,onInputMouseDown:ht,onInputChange:Rt,onInputPaste:Gt,onInputCompositionStart:bt,onInputCompositionEnd:xt},Qn=It==="multiple"||It==="tags"?V.createElement(je,(0,K.Z)({},J,Kn)):V.createElement(Oe,(0,K.Z)({},J,Kn));return V.createElement("div",{ref:Ut,className:"".concat(tt,"-selector"),onClick:an,onMouseDown:Pn},Qn)},vt=V.forwardRef($t);vt.displayName="Selector";var Tt=vt,wt=m(35593),pt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],at=function(J){var Ee=J===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Ee,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Ee,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Ee,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Ee,adjustY:1},htmlRegion:"scroll"}}},S=function(J,Ee){var Ze=J.prefixCls,ft=J.disabled,tt=J.visible,ut=J.children,It=J.popupElement,Pt=J.animation,At=J.transitionName,Ge=J.dropdownStyle,St=J.dropdownClassName,Qt=J.direction,Kt=Qt===void 0?"ltr":Qt,tn=J.placement,Ut=J.builtinPlacements,Sn=J.dropdownMatchSelectWidth,Nt=J.dropdownRender,mn=J.dropdownAlign,ot=J.getPopupContainer,st=J.empty,ht=J.getTriggerDOMNode,Mt=J.onPopupVisibleChange,gt=J.onPopupMouseEnter,bt=(0,N.Z)(J,pt),xt="".concat(Ze,"-dropdown"),Rt=It;Nt&&(Rt=Nt(It));var Gt=V.useMemo(function(){return Ut||at(Sn)},[Ut,Sn]),an=Pt?"".concat(xt,"-").concat(Pt):At,Pn=typeof Sn=="number",Kn=V.useMemo(function(){return Pn?null:Sn===!1?"minWidth":"width"},[Sn,Pn]),Qn=Ge;Pn&&(Qn=(0,xe.Z)((0,xe.Z)({},Qn),{},{width:Sn}));var $n=V.useRef(null);return V.useImperativeHandle(Ee,function(){return{getPopupElement:function(){return $n.current}}}),V.createElement(wt.Z,(0,K.Z)({},bt,{showAction:Mt?["click"]:[],hideAction:Mt?["click"]:[],popupPlacement:tn||(Kt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Gt,prefixCls:xt,popupTransitionName:an,popup:V.createElement("div",{ref:$n,onMouseEnter:gt},Rt),stretch:Kn,popupAlign:mn,popupVisible:tt,getPopupContainer:ot,popupClassName:G()(St,(0,A.Z)({},"".concat(xt,"-empty"),st)),popupStyle:Qn,getTriggerDOMNode:ht,onPopupVisibleChange:Mt}),ut)},p=V.forwardRef(S);p.displayName="SelectTrigger";var h=p,g=m(66712);function y(Q,J){var Ee=Q.key,Ze;return"value"in Q&&(Ze=Q.value),Ee!=null?Ee:Ze!==void 0?Ze:"rc-index-key-".concat(J)}function d(Q,J){var Ee=Q||{},Ze=Ee.label,ft=Ee.value,tt=Ee.options,ut=Ee.groupLabel,It=Ze||(J?"children":"label");return{label:It,value:ft||"value",options:tt||"options",groupLabel:ut||It}}function L(Q){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ee=J.fieldNames,Ze=J.childrenAsData,ft=[],tt=d(Ee,!1),ut=tt.label,It=tt.value,Pt=tt.options,At=tt.groupLabel;function Ge(St,Qt){St.forEach(function(Kt){if(Qt||!(Pt in Kt)){var tn=Kt[It];ft.push({key:y(Kt,ft.length),groupOption:Qt,data:Kt,label:Kt[ut],value:tn})}else{var Ut=Kt[At];Ut===void 0&&Ze&&(Ut=Kt.label),ft.push({key:y(Kt,ft.length),group:!0,data:Kt,label:Ut}),Ge(Kt[Pt],!0)}})}return Ge(Q,!1),ft}function fe(Q){var J=(0,xe.Z)({},Q);return"props"in J||Object.defineProperty(J,"props",{get:function(){return(0,F.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),J}}),J}function O(Q,J){if(!J||!J.length)return null;var Ee=!1;function Ze(tt,ut){var It=(0,g.Z)(ut),Pt=It[0],At=It.slice(1);if(!Pt)return[tt];var Ge=tt.split(Pt);return Ee=Ee||Ge.length>1,Ge.reduce(function(St,Qt){return[].concat((0,j.Z)(St),(0,j.Z)(Ze(Qt,At)))},[]).filter(function(St){return St})}var ft=Ze(Q,J);return Ee?ft:null}var I=["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"],he=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function Y(Q){return Q==="tags"||Q==="multiple"}var U=V.forwardRef(function(Q,J){var Ee,Ze,ft=Q.id,tt=Q.prefixCls,ut=Q.className,It=Q.showSearch,Pt=Q.tagRender,At=Q.direction,Ge=Q.omitDomProps,St=Q.displayValues,Qt=Q.onDisplayValuesChange,Kt=Q.emptyOptions,tn=Q.notFoundContent,Ut=tn===void 0?"Not Found":tn,Sn=Q.onClear,Nt=Q.mode,mn=Q.disabled,ot=Q.loading,st=Q.getInputElement,ht=Q.getRawInputElement,Mt=Q.open,gt=Q.defaultOpen,bt=Q.onDropdownVisibleChange,xt=Q.activeValue,Rt=Q.onActiveValueChange,Gt=Q.activeDescendantId,an=Q.searchValue,Pn=Q.autoClearSearchValue,Kn=Q.onSearch,Qn=Q.onSearchSplit,$n=Q.tokenSeparators,Cn=Q.allowClear,rr=Q.suffixIcon,jn=Q.clearIcon,Vn=Q.OptionList,wn=Q.animation,On=Q.transitionName,Un=Q.dropdownStyle,Nn=Q.dropdownClassName,vr=Q.dropdownMatchSelectWidth,Zr=Q.dropdownRender,Gn=Q.dropdownAlign,nn=Q.placement,Ht=Q.builtinPlacements,Zn=Q.getPopupContainer,In=Q.showAction,ir=In===void 0?[]:In,xr=Q.onFocus,ar=Q.onBlur,Wr=Q.onKeyUp,Pr=Q.onKeyDown,hi=Q.onMouseDown,zn=(0,N.Z)(Q,I),kn=Y(Nt),dr=(It!==void 0?It:kn)||Nt==="combobox",mr=(0,xe.Z)({},zn);he.forEach(function(ni){delete mr[ni]}),Ge==null||Ge.forEach(function(ni){delete mr[ni]});var Jr=V.useState(!1),sa=(0,R.Z)(Jr,2),Ii=sa[0],zr=sa[1];V.useEffect(function(){zr((0,ke.Z)())},[]);var yi=V.useRef(null),pi=V.useRef(null),ii=V.useRef(null),Gi=V.useRef(null),mi=V.useRef(null),Bi=q(),ba=(0,R.Z)(Bi,3),da=ba[0],ea=ba[1],ma=ba[2];V.useImperativeHandle(J,function(){var ni,Xr;return{focus:(ni=Gi.current)===null||ni===void 0?void 0:ni.focus,blur:(Xr=Gi.current)===null||Xr===void 0?void 0:Xr.blur,scrollTo:function(na){var Ni;return(Ni=mi.current)===null||Ni===void 0?void 0:Ni.scrollTo(na)}}});var xa=V.useMemo(function(){var ni;if(Nt!=="combobox")return an;var Xr=(ni=St[0])===null||ni===void 0?void 0:ni.value;return typeof Xr=="string"||typeof Xr=="number"?String(Xr):""},[an,Nt,St]),Fa=Nt==="combobox"&&typeof st=="function"&&st()||null,Ka=typeof ht=="function"&&ht(),Do=(0,de.x1)(pi,Ka==null||(Ee=Ka.props)===null||Ee===void 0?void 0:Ee.ref),Co=V.useState(!1),ao=(0,R.Z)(Co,2),la=ao[0],Fo=ao[1];(0,le.Z)(function(){Fo(!0)},[]);var oo=(0,E.Z)(!1,{defaultValue:gt,value:Mt}),Da=(0,R.Z)(oo,2),ta=Da[0],so=Da[1],cr=la?ta:!1,Br=!Ut&&Kt;(mn||Br&&cr&&Nt==="combobox")&&(cr=!1);var _r=Br?!1:cr,sr=V.useCallback(function(ni){var Xr=ni!==void 0?ni:!cr;mn||(so(Xr),cr!==Xr&&(bt==null||bt(Xr)))},[mn,cr,so,bt]),Gr=V.useMemo(function(){return($n||[]).some(function(ni){return[`
|
|
|
`,`\r
|
|
|
`].includes(ni)})},[$n]),ai=function(Xr,Ti,na){var Ni=!0,Pa=Xr;Rt==null||Rt(null);var Ha=na?null:O(Xr,$n);return Nt!=="combobox"&&Ha&&(Pa="",Qn==null||Qn(Ha),sr(!1),Ni=!1),Kn&&xa!==Pa&&Kn(Pa,{source:Ti?"typing":"effect"}),Ni},Fi=function(Xr){!Xr||!Xr.trim()||Kn(Xr,{source:"submit"})};V.useEffect(function(){!cr&&!kn&&Nt!=="combobox"&&ai("",!1,!1)},[cr]),V.useEffect(function(){ta&&mn&&so(!1),mn&&ea(!1)},[mn]);var Xi=_(),Ki=(0,R.Z)(Xi,2),Yi=Ki[0],Qr=Ki[1],qr=function(Xr){var Ti=Yi(),na=Xr.which;if(na===ue.Z.ENTER&&(Nt!=="combobox"&&Xr.preventDefault(),cr||sr(!0)),Qr(!!xa),na===ue.Z.BACKSPACE&&!Ti&&kn&&!xa&&St.length){for(var Ni=(0,j.Z)(St),Pa=null,Ha=Ni.length-1;Ha>=0;Ha-=1){var mo=Ni[Ha];if(!mo.disabled){Ni.splice(Ha,1),Pa=mo;break}}Pa&&Qt(Ni,{type:"remove",values:[Pa]})}for(var Za=arguments.length,Ko=new Array(Za>1?Za-1:0),Ao=1;Ao<Za;Ao++)Ko[Ao-1]=arguments[Ao];if(cr&&mi.current){var Wa;(Wa=mi.current).onKeyDown.apply(Wa,[Xr].concat(Ko))}Pr==null||Pr.apply(void 0,[Xr].concat(Ko))},Hi=function(Xr){for(var Ti=arguments.length,na=new Array(Ti>1?Ti-1:0),Ni=1;Ni<Ti;Ni++)na[Ni-1]=arguments[Ni];if(cr&&mi.current){var Pa;(Pa=mi.current).onKeyUp.apply(Pa,[Xr].concat(na))}Wr==null||Wr.apply(void 0,[Xr].concat(na))},Zi=function(Xr){var Ti=St.filter(function(na){return na!==Xr});Qt(Ti,{type:"remove",values:[Xr]})},fa=V.useRef(!1),Wi=function(){ea(!0),mn||(xr&&!fa.current&&xr.apply(void 0,arguments),ir.includes("focus")&&sr(!0)),fa.current=!0},bs=function(){ea(!1,function(){fa.current=!1,sr(!1)}),!mn&&(xa&&(Nt==="tags"?Kn(xa,{source:"submit"}):Nt==="multiple"&&Kn("",{source:"blur"})),ar&&ar.apply(void 0,arguments))},$o=[];V.useEffect(function(){return function(){$o.forEach(function(ni){return clearTimeout(ni)}),$o.splice(0,$o.length)}},[]);var Po=function(Xr){var Ti,na=Xr.target,Ni=(Ti=ii.current)===null||Ti===void 0?void 0:Ti.getPopupElement();if(Ni&&Ni.contains(na)){var Pa=setTimeout(function(){var Ko=$o.indexOf(Pa);if(Ko!==-1&&$o.splice(Ko,1),ma(),!Ii&&!Ni.contains(document.activeElement)){var Ao;(Ao=Gi.current)===null||Ao===void 0||Ao.focus()}});$o.push(Pa)}for(var Ha=arguments.length,mo=new Array(Ha>1?Ha-1:0),Za=1;Za<Ha;Za++)mo[Za-1]=arguments[Za];hi==null||hi.apply(void 0,[Xr].concat(mo))},lo=V.useState({}),Ps=(0,R.Z)(lo,2),Oo=Ps[1];function $a(){Oo({})}var ga;Ka&&(ga=function(Xr){sr(Xr)}),ie(function(){var ni;return[yi.current,(ni=ii.current)===null||ni===void 0?void 0:ni.getPopupElement()]},_r,sr,!!Ka);var Uo=V.useMemo(function(){return(0,xe.Z)((0,xe.Z)({},Q),{},{notFoundContent:Ut,open:cr,triggerOpen:_r,id:ft,showSearch:dr,multiple:kn,toggleOpen:sr})},[Q,Ut,_r,cr,ft,dr,kn,sr]),es=!!rr||ot,ts;es&&(ts=V.createElement(Pe,{className:G()("".concat(tt,"-arrow"),(0,A.Z)({},"".concat(tt,"-arrow-loading"),ot)),customizeIcon:rr,customizeIconProps:{loading:ot,searchValue:xa,open:cr,focused:da,showSearch:dr}}));var Os=function(){var Xr;Sn==null||Sn(),(Xr=Gi.current)===null||Xr===void 0||Xr.focus(),Qt([],{type:"clear",values:St}),ai("",!1,!1)},ds=Ue(tt,Os,St,Cn,jn,mn,xa,Nt),co=ds.allowClear,qa=ds.clearIcon,ki=V.createElement(Vn,{ref:mi}),ns=G()(tt,ut,(Ze={},(0,A.Z)(Ze,"".concat(tt,"-focused"),da),(0,A.Z)(Ze,"".concat(tt,"-multiple"),kn),(0,A.Z)(Ze,"".concat(tt,"-single"),!kn),(0,A.Z)(Ze,"".concat(tt,"-allow-clear"),Cn),(0,A.Z)(Ze,"".concat(tt,"-show-arrow"),es),(0,A.Z)(Ze,"".concat(tt,"-disabled"),mn),(0,A.Z)(Ze,"".concat(tt,"-loading"),ot),(0,A.Z)(Ze,"".concat(tt,"-open"),cr),(0,A.Z)(Ze,"".concat(tt,"-customize-input"),Fa),(0,A.Z)(Ze,"".concat(tt,"-show-search"),dr),Ze)),As=V.createElement(h,{ref:ii,disabled:mn,prefixCls:tt,visible:_r,popupElement:ki,animation:wn,transitionName:On,dropdownStyle:Un,dropdownClassName:Nn,direction:At,dropdownMatchSelectWidth:vr,dropdownRender:Zr,dropdownAlign:Gn,placement:nn,builtinPlacements:Ht,getPopupContainer:Zn,empty:Kt,getTriggerDOMNode:function(){return pi.current},onPopupVisibleChange:ga,onPopupMouseEnter:$a},Ka?V.cloneElement(Ka,{ref:Do}):V.createElement(Tt,(0,K.Z)({},Q,{domRef:pi,prefixCls:tt,inputElement:Fa,ref:Gi,id:ft,showSearch:dr,autoClearSearchValue:Pn,mode:Nt,activeDescendantId:Gt,tagRender:Pt,values:St,open:cr,onToggleOpen:sr,activeValue:xt,searchValue:xa,onSearch:ai,onSearchSubmit:Fi,onRemove:Zi,tokenWithEnter:Gr}))),Go;return Ka?Go=As:Go=V.createElement("div",(0,K.Z)({className:ns},mr,{ref:yi,onMouseDown:Po,onKeyDown:qr,onKeyUp:Hi,onFocus:Wi,onBlur:bs}),da&&!cr&&V.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(St.map(function(ni){var Xr=ni.label,Ti=ni.value;return["number","string"].includes((0,x.Z)(Xr))?Xr:Ti}).join(", "))),As,ts,co&&qa),V.createElement(Ce.Provider,{value:Uo},Go)}),ye=U,Ye=function(Q,J){var Ee=V.useRef({values:new Map,options:new Map}),Ze=V.useMemo(function(){var tt=Ee.current,ut=tt.values,It=tt.options,Pt=Q.map(function(St){if(St.label===void 0){var Qt;return(0,xe.Z)((0,xe.Z)({},St),{},{label:(Qt=ut.get(St.value))===null||Qt===void 0?void 0:Qt.label})}return St}),At=new Map,Ge=new Map;return Pt.forEach(function(St){At.set(St.value,St),Ge.set(St.value,J.get(St.value)||It.get(St.value))}),Ee.current.values=At,Ee.current.options=Ge,Pt},[Q,J]),ft=V.useCallback(function(tt){return J.get(tt)||Ee.current.options.get(tt)},[J]);return[Ze,ft]};function ce(Q,J){return Le(Q).join("").toUpperCase().includes(J)}var Ae=function(Q,J,Ee,Ze,ft){return V.useMemo(function(){if(!Ee||Ze===!1)return Q;var tt=J.options,ut=J.label,It=J.value,Pt=[],At=typeof Ze=="function",Ge=Ee.toUpperCase(),St=At?Ze:function(Kt,tn){return ft?ce(tn[ft],Ge):tn[tt]?ce(tn[ut!=="children"?ut:"label"],Ge):ce(tn[It],Ge)},Qt=At?function(Kt){return fe(Kt)}:function(Kt){return Kt};return Q.forEach(function(Kt){if(Kt[tt]){var tn=St(Ee,Qt(Kt));if(tn)Pt.push(Kt);else{var Ut=Kt[tt].filter(function(Sn){return St(Ee,Qt(Sn))});Ut.length&&Pt.push((0,xe.Z)((0,xe.Z)({},Kt),{},(0,A.Z)({},tt,Ut)))}return}St(Ee,Qt(Kt))&&Pt.push(Kt)}),Pt},[Q,Ze,ft,Ee,J])},qe=m(17115),oe=m(11592),T=["children","value"],re=["children"];function $e(Q){var J=Q,Ee=J.key,Ze=J.props,ft=Ze.children,tt=Ze.value,ut=(0,N.Z)(Ze,T);return(0,xe.Z)({key:Ee,value:tt!==void 0?tt:Ee,children:ft},ut)}function Ne(Q){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,oe.Z)(Q).map(function(Ee,Ze){if(!V.isValidElement(Ee)||!Ee.type)return null;var ft=Ee,tt=ft.type.isSelectOptGroup,ut=ft.key,It=ft.props,Pt=It.children,At=(0,N.Z)(It,re);return J||!tt?$e(Ee):(0,xe.Z)((0,xe.Z)({key:"__RC_SELECT_GRP__".concat(ut===null?Ze:ut,"__"),label:ut},At),{},{options:Ne(Pt)})}).filter(function(Ee){return Ee})}function Xe(Q,J,Ee,Ze,ft){return V.useMemo(function(){var tt=Q,ut=!Q;ut&&(tt=Ne(J));var It=new Map,Pt=new Map,At=function(Qt,Kt,tn){tn&&typeof tn=="string"&&Qt.set(Kt[tn],Kt)};function Ge(St){for(var Qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Kt=0;Kt<St.length;Kt+=1){var tn=St[Kt];!tn[Ee.options]||Qt?(It.set(tn[Ee.value],tn),At(Pt,tn,Ee.label),At(Pt,tn,Ze),At(Pt,tn,ft)):Ge(tn[Ee.options],!0)}}return Ge(tt),{options:tt,valueOptions:It,labelOptions:Pt}},[Q,J,Ee,Ze,ft])}function ct(Q){var J=V.useRef();J.current=Q;var Ee=V.useCallback(function(){return J.current.apply(J,arguments)},[]);return Ee}var mt=function(){return null};mt.isSelectOptGroup=!0;var yt=mt,Bt=function(){return null};Bt.isSelectOption=!0;var Ft=Bt,_t=m(80547),Yt=m(2738),rn=m(48911),hn=V.createContext(null),Wt=hn;function on(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var xn=["disabled","title","children","style","className"];function Vt(Q){return typeof Q=="string"||typeof Q=="number"}var Mn=function(J,Ee){var Ze=pe(),ft=Ze.prefixCls,tt=Ze.id,ut=Ze.open,It=Ze.multiple,Pt=Ze.mode,At=Ze.searchValue,Ge=Ze.toggleOpen,St=Ze.notFoundContent,Qt=Ze.onPopupScroll,Kt=V.useContext(Wt),tn=Kt.flattenOptions,Ut=Kt.onActiveValue,Sn=Kt.defaultActiveFirstOption,Nt=Kt.onSelect,mn=Kt.menuItemSelectedIcon,ot=Kt.rawValues,st=Kt.fieldNames,ht=Kt.virtual,Mt=Kt.direction,gt=Kt.listHeight,bt=Kt.listItemHeight,xt="".concat(ft,"-item"),Rt=(0,_t.Z)(function(){return tn},[ut,tn],function(Gn,nn){return nn[0]&&Gn[1]!==nn[1]}),Gt=V.useRef(null),an=function(nn){nn.preventDefault()},Pn=function(nn){Gt.current&&Gt.current.scrollTo(typeof nn=="number"?{index:nn}:nn)},Kn=function(nn){for(var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Zn=Rt.length,In=0;In<Zn;In+=1){var ir=(nn+In*Ht+Zn)%Zn,xr=Rt[ir],ar=xr.group,Wr=xr.data;if(!ar&&!Wr.disabled)return ir}return-1},Qn=V.useState(function(){return Kn(0)}),$n=(0,R.Z)(Qn,2),Cn=$n[0],rr=$n[1],jn=function(nn){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;rr(nn);var Zn={source:Ht?"keyboard":"mouse"},In=Rt[nn];if(!In){Ut(null,-1,Zn);return}Ut(In.value,nn,Zn)};(0,V.useEffect)(function(){jn(Sn!==!1?Kn(0):-1)},[Rt.length,At]);var Vn=V.useCallback(function(Gn){return ot.has(Gn)&&Pt!=="combobox"},[Pt,(0,j.Z)(ot).toString(),ot.size]);(0,V.useEffect)(function(){var Gn=setTimeout(function(){if(!It&&ut&&ot.size===1){var Ht=Array.from(ot)[0],Zn=Rt.findIndex(function(In){var ir=In.data;return ir.value===Ht});Zn!==-1&&(jn(Zn),Pn(Zn))}});if(ut){var nn;(nn=Gt.current)===null||nn===void 0||nn.scrollTo(void 0)}return function(){return clearTimeout(Gn)}},[ut,At,tn.length]);var wn=function(nn){nn!==void 0&&Nt(nn,{selected:!ot.has(nn)}),It||Ge(!1)};if(V.useImperativeHandle(Ee,function(){return{onKeyDown:function(nn){var Ht=nn.which,Zn=nn.ctrlKey;switch(Ht){case ue.Z.N:case ue.Z.P:case ue.Z.UP:case ue.Z.DOWN:{var In=0;if(Ht===ue.Z.UP?In=-1:Ht===ue.Z.DOWN?In=1:on()&&Zn&&(Ht===ue.Z.N?In=1:Ht===ue.Z.P&&(In=-1)),In!==0){var ir=Kn(Cn+In,In);Pn(ir),jn(ir,!0)}break}case ue.Z.ENTER:{var xr=Rt[Cn];xr&&!xr.data.disabled?wn(xr.value):wn(void 0),ut&&nn.preventDefault();break}case ue.Z.ESC:Ge(!1),ut&&nn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(nn){Pn(nn)}}}),Rt.length===0)return V.createElement("div",{role:"listbox",id:"".concat(tt,"_list"),className:"".concat(xt,"-empty"),onMouseDown:an},St);var On=Object.keys(st).map(function(Gn){return st[Gn]}),Un=function(nn){return nn.label};function Nn(Gn,nn){var Ht=Gn.group;return{role:Ht?"presentation":"option",id:"".concat(tt,"_list_").concat(nn)}}var vr=function(nn){var Ht=Rt[nn];if(!Ht)return null;var Zn=Ht.data||{},In=Zn.value,ir=Ht.group,xr=(0,ae.Z)(Zn,!0),ar=Un(Ht);return Ht?V.createElement("div",(0,K.Z)({"aria-label":typeof ar=="string"&&!ir?ar:null},xr,{key:nn},Nn(Ht,nn),{"aria-selected":Vn(In)}),In):null},Zr={role:"listbox",id:"".concat(tt,"_list")};return V.createElement(V.Fragment,null,ht&&V.createElement("div",(0,K.Z)({},Zr,{style:{height:0,width:0,overflow:"hidden"}}),vr(Cn-1),vr(Cn),vr(Cn+1)),V.createElement(rn.Z,{itemKey:"key",ref:Gt,data:Rt,height:gt,itemHeight:bt,fullHeight:!1,onMouseDown:an,onScroll:Qt,virtual:ht,direction:Mt,innerProps:ht?null:Zr},function(Gn,nn){var Ht,Zn=Gn.group,In=Gn.groupOption,ir=Gn.data,xr=Gn.label,ar=Gn.value,Wr=ir.key;if(Zn){var Pr,hi=(Pr=ir.title)!==null&&Pr!==void 0?Pr:Vt(xr)?xr.toString():void 0;return V.createElement("div",{className:G()(xt,"".concat(xt,"-group")),title:hi},xr!==void 0?xr:Wr)}var zn=ir.disabled,kn=ir.title,dr=ir.children,mr=ir.style,Jr=ir.className,sa=(0,N.Z)(ir,xn),Ii=(0,Yt.Z)(sa,On),zr=Vn(ar),yi="".concat(xt,"-option"),pi=G()(xt,yi,Jr,(Ht={},(0,A.Z)(Ht,"".concat(yi,"-grouped"),In),(0,A.Z)(Ht,"".concat(yi,"-active"),Cn===nn&&!zn),(0,A.Z)(Ht,"".concat(yi,"-disabled"),zn),(0,A.Z)(Ht,"".concat(yi,"-selected"),zr),Ht)),ii=Un(Gn),Gi=!mn||typeof mn=="function"||zr,mi=typeof ii=="number"?ii:ii||ar,Bi=Vt(mi)?mi.toString():void 0;return kn!==void 0&&(Bi=kn),V.createElement("div",(0,K.Z)({},(0,ae.Z)(Ii),ht?{}:Nn(Gn,nn),{"aria-selected":zr,className:pi,title:Bi,onMouseMove:function(){Cn===nn||zn||jn(nn)},onClick:function(){zn||wn(ar)},style:mr}),V.createElement("div",{className:"".concat(yi,"-content")},mi),V.isValidElement(mn)||zr,Gi&&V.createElement(Pe,{className:"".concat(xt,"-option-state"),customizeIcon:mn,customizeIconProps:{isSelected:zr}},zr?"\u2713":null))}))},qn=V.forwardRef(Mn);qn.displayName="OptionList";var An=qn;function pr(Q){var J=Q.mode,Ee=Q.options,Ze=Q.children,ft=Q.backfill,tt=Q.allowClear,ut=Q.placeholder,It=Q.getInputElement,Pt=Q.showSearch,At=Q.onSearch,Ge=Q.defaultOpen,St=Q.autoFocus,Qt=Q.labelInValue,Kt=Q.value,tn=Q.inputValue,Ut=Q.optionLabelProp,Sn=isMultiple(J),Nt=Pt!==void 0?Pt:Sn||J==="combobox",mn=Ee||convertChildrenToData(Ze);if(warning(J!=="tags"||mn.every(function(Mt){return!Mt.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),J==="tags"||J==="combobox"){var ot=mn.some(function(Mt){return Mt.options?Mt.options.some(function(gt){return typeof("value"in gt?gt.value:gt.key)=="number"}):typeof("value"in Mt?Mt.value:Mt.key)=="number"});warning(!ot,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(J!=="combobox"||!Ut,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(J==="combobox"||!ft,"`backfill` only works with `combobox` mode."),warning(J==="combobox"||!It,"`getInputElement` only work with `combobox` mode."),noteOnce(J!=="combobox"||!It||!tt||!ut,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),At&&!Nt&&J!=="combobox"&&J!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Ge||St,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Kt!=null){var st=toArray(Kt);warning(!Qt||st.every(function(Mt){return _typeof(Mt)==="object"&&("key"in Mt||"value"in Mt)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Sn||Array.isArray(Kt),"`value` should be array when `mode` is `multiple` or `tags`")}if(Ze){var ht=null;toNodeArray(Ze).some(function(Mt){if(!React.isValidElement(Mt)||!Mt.type)return!1;var gt=Mt,bt=gt.type;if(bt.isSelectOption)return!1;if(bt.isSelectOptGroup){var xt=toNodeArray(Mt.props.children).every(function(Rt){return!React.isValidElement(Rt)||!Mt.type||Rt.type.isSelectOption?!0:(ht=Rt.type,!1)});return!xt}return ht=bt,!0}),ht&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ht.displayName||ht.name||ht,"`.")),warning(tn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function er(Q,J){if(Q){var Ee=function Ze(ft){for(var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ut=0;ut<ft.length;ut++){var It=ft[ut];if(It[J==null?void 0:J.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!tt&&Array.isArray(It[J==null?void 0:J.options])&&Ze(It[J==null?void 0:J.options],!0))break}};Ee(Q)}}var gr=null,$r=["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"],Rn=["inputValue"];function pn(Q){return!Q||(0,x.Z)(Q)!=="object"}var tr=V.forwardRef(function(Q,J){var Ee=Q.id,Ze=Q.mode,ft=Q.prefixCls,tt=ft===void 0?"rc-select":ft,ut=Q.backfill,It=Q.fieldNames,Pt=Q.inputValue,At=Q.searchValue,Ge=Q.onSearch,St=Q.autoClearSearchValue,Qt=St===void 0?!0:St,Kt=Q.onSelect,tn=Q.onDeselect,Ut=Q.dropdownMatchSelectWidth,Sn=Ut===void 0?!0:Ut,Nt=Q.filterOption,mn=Q.filterSort,ot=Q.optionFilterProp,st=Q.optionLabelProp,ht=Q.options,Mt=Q.children,gt=Q.defaultActiveFirstOption,bt=Q.menuItemSelectedIcon,xt=Q.virtual,Rt=Q.direction,Gt=Q.listHeight,an=Gt===void 0?200:Gt,Pn=Q.listItemHeight,Kn=Pn===void 0?20:Pn,Qn=Q.value,$n=Q.defaultValue,Cn=Q.labelInValue,rr=Q.onChange,jn=(0,N.Z)(Q,$r),Vn=(0,qe.ZP)(Ee),wn=Y(Ze),On=!!(!ht&&Mt),Un=V.useMemo(function(){return Nt===void 0&&Ze==="combobox"?!1:Nt},[Nt,Ze]),Nn=V.useMemo(function(){return d(It,On)},[JSON.stringify(It),On]),vr=(0,E.Z)("",{value:At!==void 0?At:Pt,postState:function(Br){return Br||""}}),Zr=(0,R.Z)(vr,2),Gn=Zr[0],nn=Zr[1],Ht=Xe(ht,Mt,Nn,ot,st),Zn=Ht.valueOptions,In=Ht.labelOptions,ir=Ht.options,xr=V.useCallback(function(cr){var Br=Le(cr);return Br.map(function(_r){var sr,Gr,ai,Fi,Xi;if(pn(_r))sr=_r;else{var Ki;ai=_r.key,Gr=_r.label,sr=(Ki=_r.value)!==null&&Ki!==void 0?Ki:ai}var Yi=Zn.get(sr);if(Yi){var Qr;if(Gr===void 0&&(Gr=Yi==null?void 0:Yi[st||Nn.label]),ai===void 0&&(ai=(Qr=Yi==null?void 0:Yi.key)!==null&&Qr!==void 0?Qr:sr),Fi=Yi==null?void 0:Yi.disabled,Xi=Yi==null?void 0:Yi.title,0)var qr}return{label:Gr,value:sr,key:ai,disabled:Fi,title:Xi}})},[Nn,st,Zn]),ar=(0,E.Z)($n,{value:Qn}),Wr=(0,R.Z)(ar,2),Pr=Wr[0],hi=Wr[1],zn=V.useMemo(function(){var cr,Br=xr(Pr);return Ze==="combobox"&&Te((cr=Br[0])===null||cr===void 0?void 0:cr.value)?[]:Br},[Pr,xr,Ze]),kn=Ye(zn,Zn),dr=(0,R.Z)(kn,2),mr=dr[0],Jr=dr[1],sa=V.useMemo(function(){if(!Ze&&mr.length===1){var cr=mr[0];if(cr.value===null&&(cr.label===null||cr.label===void 0))return[]}return mr.map(function(Br){var _r;return(0,xe.Z)((0,xe.Z)({},Br),{},{label:(_r=Br.label)!==null&&_r!==void 0?_r:Br.value})})},[Ze,mr]),Ii=V.useMemo(function(){return new Set(mr.map(function(cr){return cr.value}))},[mr]);V.useEffect(function(){if(Ze==="combobox"){var cr,Br=(cr=mr[0])===null||cr===void 0?void 0:cr.value;nn(ge(Br)?String(Br):"")}},[mr]);var zr=ct(function(cr,Br){var _r,sr=Br!=null?Br:cr;return _r={},(0,A.Z)(_r,Nn.value,cr),(0,A.Z)(_r,Nn.label,sr),_r}),yi=V.useMemo(function(){if(Ze!=="tags")return ir;var cr=(0,j.Z)(ir),Br=function(sr){return Zn.has(sr)};return(0,j.Z)(mr).sort(function(_r,sr){return _r.value<sr.value?-1:1}).forEach(function(_r){var sr=_r.value;Br(sr)||cr.push(zr(sr,_r.label))}),cr},[zr,ir,Zn,mr,Ze]),pi=Ae(yi,Nn,Gn,Un,ot),ii=V.useMemo(function(){return Ze!=="tags"||!Gn||pi.some(function(cr){return cr[ot||"value"]===Gn})||pi.some(function(cr){return cr[Nn.value]===Gn})?pi:[zr(Gn)].concat((0,j.Z)(pi))},[zr,ot,Ze,pi,Gn,Nn]),Gi=V.useMemo(function(){return mn?(0,j.Z)(ii).sort(function(cr,Br){return mn(cr,Br)}):ii},[ii,mn]),mi=V.useMemo(function(){return L(Gi,{fieldNames:Nn,childrenAsData:On})},[Gi,Nn,On]),Bi=function(Br){var _r=xr(Br);if(hi(_r),rr&&(_r.length!==mr.length||_r.some(function(ai,Fi){var Xi;return((Xi=mr[Fi])===null||Xi===void 0?void 0:Xi.value)!==(ai==null?void 0:ai.value)}))){var sr=Cn?_r:_r.map(function(ai){return ai.value}),Gr=_r.map(function(ai){return fe(Jr(ai.value))});rr(wn?sr:sr[0],wn?Gr:Gr[0])}},ba=V.useState(null),da=(0,R.Z)(ba,2),ea=da[0],ma=da[1],xa=V.useState(0),Fa=(0,R.Z)(xa,2),Ka=Fa[0],Do=Fa[1],Co=gt!==void 0?gt:Ze!=="combobox",ao=V.useCallback(function(cr,Br){var _r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},sr=_r.source,Gr=sr===void 0?"keyboard":sr;Do(Br),ut&&Ze==="combobox"&&cr!==null&&Gr==="keyboard"&&ma(String(cr))},[ut,Ze]),la=function(Br,_r,sr){var Gr=function(){var fa,Wi=Jr(Br);return[Cn?{label:Wi==null?void 0:Wi[Nn.label],value:Br,key:(fa=Wi==null?void 0:Wi.key)!==null&&fa!==void 0?fa:Br}:Br,fe(Wi)]};if(_r&&Kt){var ai=Gr(),Fi=(0,R.Z)(ai,2),Xi=Fi[0],Ki=Fi[1];Kt(Xi,Ki)}else if(!_r&&tn&&sr!=="clear"){var Yi=Gr(),Qr=(0,R.Z)(Yi,2),qr=Qr[0],Hi=Qr[1];tn(qr,Hi)}},Fo=ct(function(cr,Br){var _r,sr=wn?Br.selected:!0;sr?_r=wn?[].concat((0,j.Z)(mr),[cr]):[cr]:_r=mr.filter(function(Gr){return Gr.value!==cr}),Bi(_r),la(cr,sr),Ze==="combobox"?ma(""):(!Y||Qt)&&(nn(""),ma(""))}),oo=function(Br,_r){Bi(Br);var sr=_r.type,Gr=_r.values;(sr==="remove"||sr==="clear")&&Gr.forEach(function(ai){la(ai.value,!1,sr)})},Da=function(Br,_r){if(nn(Br),ma(null),_r.source==="submit"){var sr=(Br||"").trim();if(sr){var Gr=Array.from(new Set([].concat((0,j.Z)(Ii),[sr])));Bi(Gr),la(sr,!0),nn("")}return}_r.source!=="blur"&&(Ze==="combobox"&&Bi(Br),Ge==null||Ge(Br))},ta=function(Br){var _r=Br;Ze!=="tags"&&(_r=Br.map(function(Gr){var ai=In.get(Gr);return ai==null?void 0:ai.value}).filter(function(Gr){return Gr!==void 0}));var sr=Array.from(new Set([].concat((0,j.Z)(Ii),(0,j.Z)(_r))));Bi(sr),sr.forEach(function(Gr){la(Gr,!0)})},so=V.useMemo(function(){var cr=xt!==!1&&Sn!==!1;return(0,xe.Z)((0,xe.Z)({},Ht),{},{flattenOptions:mi,onActiveValue:ao,defaultActiveFirstOption:Co,onSelect:Fo,menuItemSelectedIcon:bt,rawValues:Ii,fieldNames:Nn,virtual:cr,direction:Rt,listHeight:an,listItemHeight:Kn,childrenAsData:On})},[Ht,mi,ao,Co,Fo,bt,Ii,Nn,xt,Sn,an,Kn,On]);return V.createElement(Wt.Provider,{value:so},V.createElement(ye,(0,K.Z)({},jn,{id:Vn,prefixCls:tt,ref:J,omitDomProps:Rn,mode:Ze,displayValues:sa,onDisplayValuesChange:oo,direction:Rt,searchValue:Gn,onSearch:Da,autoClearSearchValue:Qt,onSearchSplit:ta,dropdownMatchSelectWidth:Sn,OptionList:An,emptyOptions:!mi.length,activeValue:ea,activeDescendantId:"".concat(Vn,"_list_").concat(Ka)})))}),Ke=tr;Ke.Option=Ft,Ke.OptGroup=yt;var H=Ke,ee=H},9296:function(yn,dt,m){"use strict";m.r(dt),m.d(dt,{ResizableTextArea:function(){return be},default:function(){return Te}});var K=m(54476),j=m(33885),A=m(20068),xe=m(76190),R=m(42978),N=m(75931),x=m(94480),E=m(92310),F=m.n(E),V=m(93681),Ie=m(5643),G=m(18929),le=m(59301),ke=m(29301),ue=m(34280),de=m(16089),_e=`
|
|
|
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;
|
|
|
`,Pe=["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"],Ue={},Ce;function pe(Fe){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,X=Fe.getAttribute("id")||Fe.getAttribute("data-reactid")||Fe.getAttribute("name");if(Re&&Ue[X])return Ue[X];var w=window.getComputedStyle(Fe),ve=w.getPropertyValue("box-sizing")||w.getPropertyValue("-moz-box-sizing")||w.getPropertyValue("-webkit-box-sizing"),Qe=parseFloat(w.getPropertyValue("padding-bottom"))+parseFloat(w.getPropertyValue("padding-top")),je=parseFloat(w.getPropertyValue("border-bottom-width"))+parseFloat(w.getPropertyValue("border-top-width")),Be=Pe.map(function(lt){return"".concat(lt,":").concat(w.getPropertyValue(lt))}).join(";"),Oe={sizingStyle:Be,paddingSize:Qe,borderSize:je,boxSizing:ve};return Re&&X&&(Ue[X]=Oe),Oe}function q(Fe){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Ce||(Ce=document.createElement("textarea"),Ce.setAttribute("tab-index","-1"),Ce.setAttribute("aria-hidden","true"),document.body.appendChild(Ce)),Fe.getAttribute("wrap")?Ce.setAttribute("wrap",Fe.getAttribute("wrap")):Ce.removeAttribute("wrap");var ve=pe(Fe,Re),Qe=ve.paddingSize,je=ve.borderSize,Be=ve.boxSizing,Oe=ve.sizingStyle;Ce.setAttribute("style","".concat(Oe,";").concat(_e)),Ce.value=Fe.value||Fe.placeholder||"";var lt=void 0,$t=void 0,vt,Tt=Ce.scrollHeight;if(Be==="border-box"?Tt+=je:Be==="content-box"&&(Tt-=Qe),X!==null||w!==null){Ce.value=" ";var wt=Ce.scrollHeight-Qe;X!==null&&(lt=wt*X,Be==="border-box"&&(lt=lt+Qe+je),Tt=Math.max(lt,Tt)),w!==null&&($t=wt*w,Be==="border-box"&&($t=$t+Qe+je),vt=Tt>$t?"":"hidden",Tt=Math.min($t,Tt))}var pt={height:Tt,overflowY:vt,resize:"none"};return lt&&(pt.minHeight=lt),$t&&(pt.maxHeight=$t),pt}var _=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ie=0,ae=1,Se=2,se=le.forwardRef(function(Fe,Re){var X=Fe,w=X.prefixCls,ve=X.onPressEnter,Qe=X.defaultValue,je=X.value,Be=X.autoSize,Oe=X.onResize,lt=X.className,$t=X.style,vt=X.disabled,Tt=X.onChange,wt=X.onInternalAutoSize,pt=(0,N.Z)(X,_),at=(0,G.Z)(Qe,{value:je,postState:function(yt){return yt!=null?yt:""}}),S=(0,R.Z)(at,2),p=S[0],h=S[1],g=function(yt){h(yt.target.value),Tt==null||Tt(yt)},y=le.useRef();le.useImperativeHandle(Re,function(){return{textArea:y.current}});var d=le.useMemo(function(){return Be&&(0,xe.Z)(Be)==="object"?[Be.minRows,Be.maxRows]:[]},[Be]),L=(0,R.Z)(d,2),fe=L[0],O=L[1],I=!!Be,he=function(){try{if(document.activeElement===y.current){var yt=y.current,Bt=yt.selectionStart,Ft=yt.selectionEnd,_t=yt.scrollTop;y.current.setSelectionRange(Bt,Ft),y.current.scrollTop=_t}}catch(Yt){}},Y=le.useState(Se),U=(0,R.Z)(Y,2),ye=U[0],Ye=U[1],ce=le.useState(),Ae=(0,R.Z)(ce,2),qe=Ae[0],oe=Ae[1],T=function(){Ye(ie)};(0,ue.Z)(function(){I&&T()},[je,fe,O,I]),(0,ue.Z)(function(){if(ye===ie)Ye(ae);else if(ye===ae){var mt=q(y.current,!1,fe,O);Ye(Se),oe(mt)}else he()},[ye]);var re=le.useRef(),$e=function(){de.Z.cancel(re.current)},Ne=function(yt){ye===Se&&(Oe==null||Oe(yt),Be&&($e(),re.current=(0,de.Z)(function(){T()})))};le.useEffect(function(){return $e},[]);var Xe=I?qe:null,ct=(0,j.Z)((0,j.Z)({},$t),Xe);return(ye===ie||ye===ae)&&(ct.overflowY="hidden",ct.overflowX="hidden"),le.createElement(ke.Z,{onResize:Ne,disabled:!(Be||Oe)},le.createElement("textarea",(0,K.Z)({},pt,{ref:y,style:ct,className:F()(w,lt,(0,A.Z)({},"".concat(w,"-disabled"),vt)),disabled:vt,value:p,onChange:g})))}),be=se,D=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Le(Fe,Re){return(0,x.Z)(Fe||"").slice(0,Re).join("")}function z(Fe,Re,X,w){var ve=X;return Fe?ve=Le(X,w):(0,x.Z)(Re||"").length<X.length&&(0,x.Z)(X||"").length>w&&(ve=Re),ve}var we=le.forwardRef(function(Fe,Re){var X,w=Fe.defaultValue,ve=Fe.value,Qe=Fe.onFocus,je=Fe.onBlur,Be=Fe.onChange,Oe=Fe.allowClear,lt=Fe.maxLength,$t=Fe.onCompositionStart,vt=Fe.onCompositionEnd,Tt=Fe.suffix,wt=Fe.prefixCls,pt=wt===void 0?"rc-textarea":wt,at=Fe.classes,S=Fe.showCount,p=Fe.className,h=Fe.style,g=Fe.disabled,y=Fe.hidden,d=Fe.classNames,L=Fe.styles,fe=Fe.onResize,O=(0,N.Z)(Fe,D),I=(0,G.Z)(w,{value:ve,defaultValue:w}),he=(0,R.Z)(I,2),Y=he[0],U=he[1],ye=(0,le.useRef)(null),Ye=le.useState(!1),ce=(0,R.Z)(Ye,2),Ae=ce[0],qe=ce[1],oe=le.useState(!1),T=(0,R.Z)(oe,2),re=T[0],$e=T[1],Ne=le.useRef(),Xe=le.useRef(0),ct=le.useState(null),mt=(0,R.Z)(ct,2),yt=mt[0],Bt=mt[1],Ft=function(){var pn;(pn=ye.current)===null||pn===void 0||pn.textArea.focus()};(0,le.useImperativeHandle)(Re,function(){return{resizableTextArea:ye.current,focus:Ft,blur:function(){var pn;(pn=ye.current)===null||pn===void 0||pn.textArea.blur()}}}),(0,le.useEffect)(function(){qe(function(Rn){return!g&&Rn})},[g]);var _t=Number(lt)>0,Yt=function(pn){$e(!0),Ne.current=Y,Xe.current=pn.currentTarget.selectionStart,$t==null||$t(pn)},rn=function(pn){$e(!1);var tr=pn.currentTarget.value;if(_t){var Ke,H=Xe.current>=lt+1||Xe.current===((Ke=Ne.current)===null||Ke===void 0?void 0:Ke.length);tr=z(H,Ne.current,tr,lt)}tr!==Y&&(U(tr),(0,Ie.rJ)(pn.currentTarget,pn,Be,tr)),vt==null||vt(pn)},hn=function(pn){var tr=pn.target.value;if(!re&&_t){var Ke=pn.target.selectionStart>=lt+1||pn.target.selectionStart===tr.length||!pn.target.selectionStart;tr=z(Ke,Y,tr,lt)}U(tr),(0,Ie.rJ)(pn.currentTarget,pn,Be,tr)},Wt=function(pn){var tr=O.onPressEnter,Ke=O.onKeyDown;pn.key==="Enter"&&tr&&tr(pn),Ke==null||Ke(pn)},on=function(pn){qe(!0),Qe==null||Qe(pn)},xn=function(pn){qe(!1),je==null||je(pn)},Vt=function(pn){var tr;U(""),Ft(),(0,Ie.rJ)((tr=ye.current)===null||tr===void 0?void 0:tr.textArea,pn,Be)},Mn=(0,Ie.D7)(Y);!re&&_t&&ve==null&&(Mn=Le(Mn,lt));var qn=Tt,An;if(S){var pr=(0,x.Z)(Mn).length;(0,xe.Z)(S)==="object"?An=S.formatter({value:Mn,count:pr,maxLength:lt}):An="".concat(pr).concat(_t?" / ".concat(lt):""),qn=le.createElement(le.Fragment,null,qn,le.createElement("span",{className:F()("".concat(pt,"-data-count"),d==null?void 0:d.count),style:L==null?void 0:L.count},An))}var er=function(pn){var tr;fe==null||fe(pn),(tr=ye.current)!==null&&tr!==void 0&&tr.textArea.style.height&&Bt(!0)},gr=!O.autoSize&&!S&&!Oe,$r=le.createElement(V.BaseInput,{value:Mn,allowClear:Oe,handleReset:Vt,suffix:qn,prefixCls:pt,classes:{affixWrapper:F()(at==null?void 0:at.affixWrapper,(X={},(0,A.Z)(X,"".concat(pt,"-show-count"),S),(0,A.Z)(X,"".concat(pt,"-textarea-allow-clear"),Oe),X))},disabled:g,focused:Ae,className:p,style:(0,j.Z)((0,j.Z)({},h),yt&&!gr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof An=="string"?An:void 0}},hidden:y,inputElement:le.createElement(be,(0,K.Z)({},O,{onKeyDown:Wt,onChange:hn,onFocus:on,onBlur:xn,onCompositionStart:Yt,onCompositionEnd:rn,className:d==null?void 0:d.textarea,style:(0,j.Z)((0,j.Z)({},L==null?void 0:L.textarea),{},{resize:h==null?void 0:h.resize}),disabled:g,prefixCls:pt,onResize:er,ref:ye}))});return $r}),ge=we,Te=ge},39417:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return ae}});var K=m(54476),j=m(20068),A=m(75931),xe=m(33885),R=m(67732),N=m(83652),x=m(31226),E=m(42403),F=m(158),V=m(92310),Ie=m.n(V),G=m(26112),le=m(59301),ke=m(39378),ue=function(se){for(var be=se.prefixCls,D=se.level,Le=se.isStart,z=se.isEnd,we="".concat(be,"-indent-unit"),ge=[],Te=0;Te<D;Te+=1){var Fe;ge.push(le.createElement("span",{key:Te,className:Ie()(we,(Fe={},(0,j.Z)(Fe,"".concat(we,"-start"),Le[Te]),(0,j.Z)(Fe,"".concat(we,"-end"),z[Te]),Fe))}))}return le.createElement("span",{"aria-hidden":"true",className:"".concat(be,"-indent")},ge)},de=le.memo(ue),_e=m(67841),Pe=m(71430),Ue=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],Ce="open",pe="close",q="---",_=function(Se){(0,E.Z)(be,Se);var se=(0,F.Z)(be);function be(){var D;(0,R.Z)(this,be);for(var Le=arguments.length,z=new Array(Le),we=0;we<Le;we++)z[we]=arguments[we];return D=se.call.apply(se,[this].concat(z)),D.state={dragNodeHighlight:!1},D.selectHandle=void 0,D.cacheIndent=void 0,D.onSelectorClick=function(ge){var Te=D.props.context.onNodeClick;Te(ge,(0,Pe.F)(D.props)),D.isSelectable()?D.onSelect(ge):D.onCheck(ge)},D.onSelectorDoubleClick=function(ge){var Te=D.props.context.onNodeDoubleClick;Te(ge,(0,Pe.F)(D.props))},D.onSelect=function(ge){if(!D.isDisabled()){var Te=D.props.context.onNodeSelect;Te(ge,(0,Pe.F)(D.props))}},D.onCheck=function(ge){if(!D.isDisabled()){var Te=D.props,Fe=Te.disableCheckbox,Re=Te.checked,X=D.props.context.onNodeCheck;if(!(!D.isCheckable()||Fe)){var w=!Re;X(ge,(0,Pe.F)(D.props),w)}}},D.onMouseEnter=function(ge){var Te=D.props.context.onNodeMouseEnter;Te(ge,(0,Pe.F)(D.props))},D.onMouseLeave=function(ge){var Te=D.props.context.onNodeMouseLeave;Te(ge,(0,Pe.F)(D.props))},D.onContextMenu=function(ge){var Te=D.props.context.onNodeContextMenu;Te(ge,(0,Pe.F)(D.props))},D.onDragStart=function(ge){var Te=D.props.context.onNodeDragStart;ge.stopPropagation(),D.setState({dragNodeHighlight:!0}),Te(ge,(0,x.Z)(D));try{ge.dataTransfer.setData("text/plain","")}catch(Fe){}},D.onDragEnter=function(ge){var Te=D.props.context.onNodeDragEnter;ge.preventDefault(),ge.stopPropagation(),Te(ge,(0,x.Z)(D))},D.onDragOver=function(ge){var Te=D.props.context.onNodeDragOver;ge.preventDefault(),ge.stopPropagation(),Te(ge,(0,x.Z)(D))},D.onDragLeave=function(ge){var Te=D.props.context.onNodeDragLeave;ge.stopPropagation(),Te(ge,(0,x.Z)(D))},D.onDragEnd=function(ge){var Te=D.props.context.onNodeDragEnd;ge.stopPropagation(),D.setState({dragNodeHighlight:!1}),Te(ge,(0,x.Z)(D))},D.onDrop=function(ge){var Te=D.props.context.onNodeDrop;ge.preventDefault(),ge.stopPropagation(),D.setState({dragNodeHighlight:!1}),Te(ge,(0,x.Z)(D))},D.onExpand=function(ge){var Te=D.props,Fe=Te.loading,Re=Te.context.onNodeExpand;Fe||Re(ge,(0,Pe.F)(D.props))},D.setSelectHandle=function(ge){D.selectHandle=ge},D.getNodeState=function(){var ge=D.props.expanded;return D.isLeaf()?null:ge?Ce:pe},D.hasChildren=function(){var ge=D.props.eventKey,Te=D.props.context.keyEntities,Fe=(0,_e.Z)(Te,ge)||{},Re=Fe.children;return!!(Re||[]).length},D.isLeaf=function(){var ge=D.props,Te=ge.isLeaf,Fe=ge.loaded,Re=D.props.context.loadData,X=D.hasChildren();return Te===!1?!1:Te||!Re&&!X||Re&&Fe&&!X},D.isDisabled=function(){var ge=D.props.disabled,Te=D.props.context.disabled;return!!(Te||ge)},D.isCheckable=function(){var ge=D.props.checkable,Te=D.props.context.checkable;return!Te||ge===!1?!1:Te},D.syncLoadData=function(ge){var Te=ge.expanded,Fe=ge.loading,Re=ge.loaded,X=D.props.context,w=X.loadData,ve=X.onNodeLoad;Fe||w&&Te&&!D.isLeaf()&&!D.hasChildren()&&!Re&&ve((0,Pe.F)(D.props))},D.isDraggable=function(){var ge=D.props,Te=ge.data,Fe=ge.context.draggable;return!!(Fe&&(!Fe.nodeDraggable||Fe.nodeDraggable(Te)))},D.renderDragHandler=function(){var ge=D.props.context,Te=ge.draggable,Fe=ge.prefixCls;return Te!=null&&Te.icon?le.createElement("span",{className:"".concat(Fe,"-draggable-icon")},Te.icon):null},D.renderSwitcherIconDom=function(ge){var Te=D.props.switcherIcon,Fe=D.props.context.switcherIcon,Re=Te||Fe;return typeof Re=="function"?Re((0,xe.Z)((0,xe.Z)({},D.props),{},{isLeaf:ge})):Re},D.renderSwitcher=function(){var ge=D.props.expanded,Te=D.props.context.prefixCls;if(D.isLeaf()){var Fe=D.renderSwitcherIconDom(!0);return Fe!==!1?le.createElement("span",{className:Ie()("".concat(Te,"-switcher"),"".concat(Te,"-switcher-noop"))},Fe):null}var Re=Ie()("".concat(Te,"-switcher"),"".concat(Te,"-switcher_").concat(ge?Ce:pe)),X=D.renderSwitcherIconDom(!1);return X!==!1?le.createElement("span",{onClick:D.onExpand,className:Re},X):null},D.renderCheckbox=function(){var ge=D.props,Te=ge.checked,Fe=ge.halfChecked,Re=ge.disableCheckbox,X=D.props.context.prefixCls,w=D.isDisabled(),ve=D.isCheckable();if(!ve)return null;var Qe=typeof ve!="boolean"?ve:null;return le.createElement("span",{className:Ie()("".concat(X,"-checkbox"),Te&&"".concat(X,"-checkbox-checked"),!Te&&Fe&&"".concat(X,"-checkbox-indeterminate"),(w||Re)&&"".concat(X,"-checkbox-disabled")),onClick:D.onCheck},Qe)},D.renderIcon=function(){var ge=D.props.loading,Te=D.props.context.prefixCls;return le.createElement("span",{className:Ie()("".concat(Te,"-iconEle"),"".concat(Te,"-icon__").concat(D.getNodeState()||"docu"),ge&&"".concat(Te,"-icon_loading"))})},D.renderSelector=function(){var ge=D.state.dragNodeHighlight,Te=D.props,Fe=Te.title,Re=Fe===void 0?q:Fe,X=Te.selected,w=Te.icon,ve=Te.loading,Qe=Te.data,je=D.props.context,Be=je.prefixCls,Oe=je.showIcon,lt=je.icon,$t=je.loadData,vt=je.titleRender,Tt=D.isDisabled(),wt="".concat(Be,"-node-content-wrapper"),pt;if(Oe){var at=w||lt;pt=at?le.createElement("span",{className:Ie()("".concat(Be,"-iconEle"),"".concat(Be,"-icon__customize"))},typeof at=="function"?at(D.props):at):D.renderIcon()}else $t&&ve&&(pt=D.renderIcon());var S;typeof Re=="function"?S=Re(Qe):vt?S=vt(Qe):S=Re;var p=le.createElement("span",{className:"".concat(Be,"-title")},S);return le.createElement("span",{ref:D.setSelectHandle,title:typeof Re=="string"?Re:"",className:Ie()("".concat(wt),"".concat(wt,"-").concat(D.getNodeState()||"normal"),!Tt&&(X||ge)&&"".concat(Be,"-node-selected")),onMouseEnter:D.onMouseEnter,onMouseLeave:D.onMouseLeave,onContextMenu:D.onContextMenu,onClick:D.onSelectorClick,onDoubleClick:D.onSelectorDoubleClick},pt,p,D.renderDropIndicator())},D.renderDropIndicator=function(){var ge=D.props,Te=ge.disabled,Fe=ge.eventKey,Re=D.props.context,X=Re.draggable,w=Re.dropLevelOffset,ve=Re.dropPosition,Qe=Re.prefixCls,je=Re.indent,Be=Re.dropIndicatorRender,Oe=Re.dragOverNodeKey,lt=Re.direction,$t=!!X,vt=!Te&&$t&&Oe===Fe,Tt=je!=null?je:D.cacheIndent;return D.cacheIndent=je,vt?Be({dropPosition:ve,dropLevelOffset:w,indent:Tt,prefixCls:Qe,direction:lt}):null},D}return(0,N.Z)(be,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var Le=this.props.selectable,z=this.props.context.selectable;return typeof Le=="boolean"?Le:z}},{key:"render",value:function(){var Le,z=this.props,we=z.eventKey,ge=z.className,Te=z.style,Fe=z.dragOver,Re=z.dragOverGapTop,X=z.dragOverGapBottom,w=z.isLeaf,ve=z.isStart,Qe=z.isEnd,je=z.expanded,Be=z.selected,Oe=z.checked,lt=z.halfChecked,$t=z.loading,vt=z.domRef,Tt=z.active,wt=z.data,pt=z.onMouseMove,at=z.selectable,S=(0,A.Z)(z,Ue),p=this.props.context,h=p.prefixCls,g=p.filterTreeNode,y=p.keyEntities,d=p.dropContainerKey,L=p.dropTargetKey,fe=p.draggingNodeKey,O=this.isDisabled(),I=(0,G.Z)(S,{aria:!0,data:!0}),he=(0,_e.Z)(y,we)||{},Y=he.level,U=Qe[Qe.length-1],ye=this.isDraggable(),Ye=!O&&ye,ce=fe===we,Ae=at!==void 0?{"aria-selected":!!at}:void 0;return le.createElement("div",(0,K.Z)({ref:vt,className:Ie()(ge,"".concat(h,"-treenode"),(Le={},(0,j.Z)(Le,"".concat(h,"-treenode-disabled"),O),(0,j.Z)(Le,"".concat(h,"-treenode-switcher-").concat(je?"open":"close"),!w),(0,j.Z)(Le,"".concat(h,"-treenode-checkbox-checked"),Oe),(0,j.Z)(Le,"".concat(h,"-treenode-checkbox-indeterminate"),lt),(0,j.Z)(Le,"".concat(h,"-treenode-selected"),Be),(0,j.Z)(Le,"".concat(h,"-treenode-loading"),$t),(0,j.Z)(Le,"".concat(h,"-treenode-active"),Tt),(0,j.Z)(Le,"".concat(h,"-treenode-leaf-last"),U),(0,j.Z)(Le,"".concat(h,"-treenode-draggable"),ye),(0,j.Z)(Le,"dragging",ce),(0,j.Z)(Le,"drop-target",L===we),(0,j.Z)(Le,"drop-container",d===we),(0,j.Z)(Le,"drag-over",!O&&Fe),(0,j.Z)(Le,"drag-over-gap-top",!O&&Re),(0,j.Z)(Le,"drag-over-gap-bottom",!O&&X),(0,j.Z)(Le,"filter-node",g&&g((0,Pe.F)(this.props))),Le)),style:Te,draggable:Ye,"aria-grabbed":ce,onDragStart:Ye?this.onDragStart:void 0,onDragEnter:ye?this.onDragEnter:void 0,onDragOver:ye?this.onDragOver:void 0,onDragLeave:ye?this.onDragLeave:void 0,onDrop:ye?this.onDrop:void 0,onDragEnd:ye?this.onDragEnd:void 0,onMouseMove:pt},Ae,I),le.createElement(de,{prefixCls:h,level:Y,isStart:ve,isEnd:Qe}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),be}(le.Component),ie=function(se){return le.createElement(ke.k.Consumer,null,function(be){return le.createElement(_,(0,K.Z)({},se,{context:be}))})};ie.displayName="TreeNode",ie.isTreeNode=1;var ae=ie},39378:function(yn,dt,m){"use strict";m.d(dt,{k:function(){return j}});var K=m(59301),j=K.createContext(null)},60091:function(yn,dt,m){"use strict";m.d(dt,{O:function(){return ae.Z},Z:function(){return p}});var K=m(54476),j=m(20068),A=m(76190),xe=m(33885),R=m(94480),N=m(67732),x=m(83652),E=m(31226),F=m(42403),V=m(158),Ie=m(92310),G=m.n(Ie),le=m(10228),ke=m(26112),ue=m(48736),de=m(59301),_e=m(39378);function Pe(h){var g=h.dropPosition,y=h.dropLevelOffset,d=h.indent,L={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(g){case-1:L.top=0,L.left=-y*d;break;case 1:L.bottom=0,L.left=-y*d;break;case 0:L.bottom=0,L.left=d;break}return de.createElement("div",{style:L})}function Ue(h){if(h==null)throw new TypeError("Cannot destructure "+h)}var Ce=m(42978),pe=m(75931),q=m(34280),_=m(48911),ie=m(77900),ae=m(39417);function Se(h,g){var y=de.useState(!1),d=(0,Ce.Z)(y,2),L=d[0],fe=d[1];de.useLayoutEffect(function(){if(L)return h(),function(){g()}},[L]),de.useLayoutEffect(function(){return fe(!0),function(){fe(!1)}},[])}var se=m(71430),be=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],D=function(g,y){var d=g.className,L=g.style,fe=g.motion,O=g.motionNodes,I=g.motionType,he=g.onMotionStart,Y=g.onMotionEnd,U=g.active,ye=g.treeNodeRequiredProps,Ye=(0,pe.Z)(g,be),ce=de.useState(!0),Ae=(0,Ce.Z)(ce,2),qe=Ae[0],oe=Ae[1],T=de.useContext(_e.k),re=T.prefixCls,$e=O&&I!=="hide";(0,q.Z)(function(){O&&$e!==qe&&oe($e)},[O]);var Ne=function(){O&&he()},Xe=de.useRef(!1),ct=function(){O&&!Xe.current&&(Xe.current=!0,Y())};Se(Ne,ct);var mt=function(Bt){$e===Bt&&ct()};return O?de.createElement(ie.default,(0,K.Z)({ref:y,visible:qe},fe,{motionAppear:I==="show",onVisibleChanged:mt}),function(yt,Bt){var Ft=yt.className,_t=yt.style;return de.createElement("div",{ref:Bt,className:G()("".concat(re,"-treenode-motion"),Ft),style:_t},O.map(function(Yt){var rn=(0,K.Z)({},(Ue(Yt.data),Yt.data)),hn=Yt.title,Wt=Yt.key,on=Yt.isStart,xn=Yt.isEnd;delete rn.children;var Vt=(0,se.H8)(Wt,ye);return de.createElement(ae.Z,(0,K.Z)({},rn,Vt,{title:hn,active:U,data:Yt.data,key:Wt,isStart:on,isEnd:xn}))}))}):de.createElement(ae.Z,(0,K.Z)({domRef:y,className:d,style:L},Ye,{active:U}))};D.displayName="MotionTreeNode";var Le=de.forwardRef(D),z=Le;function we(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],y=h.length,d=g.length;if(Math.abs(y-d)!==1)return{add:!1,key:null};function L(fe,O){var I=new Map;fe.forEach(function(Y){I.set(Y,!0)});var he=O.filter(function(Y){return!I.has(Y)});return he.length===1?he[0]:null}return y<d?{add:!0,key:L(h,g)}:{add:!1,key:L(g,h)}}function ge(h,g,y){var d=h.findIndex(function(I){return I.key===y}),L=h[d+1],fe=g.findIndex(function(I){return I.key===y});if(L){var O=g.findIndex(function(I){return I.key===L.key});return g.slice(fe+1,O)}return g.slice(fe+1)}var Te=["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"],Fe={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Re=function(){},X="RC_TREE_MOTION_".concat(Math.random()),w={key:X},ve={key:X,level:0,index:0,pos:"0",node:w,nodes:[w]},Qe={parent:null,children:[],pos:ve.pos,data:w,title:null,key:X,isStart:[],isEnd:[]};function je(h,g,y,d){return g===!1||!y?h:h.slice(0,Math.ceil(y/d)+1)}function Be(h){var g=h.key,y=h.pos;return(0,se.km)(g,y)}function Oe(h){for(var g=String(h.data.key),y=h;y.parent;)y=y.parent,g="".concat(y.data.key," > ").concat(g);return g}var lt=de.forwardRef(function(h,g){var y=h.prefixCls,d=h.data,L=h.selectable,fe=h.checkable,O=h.expandedKeys,I=h.selectedKeys,he=h.checkedKeys,Y=h.loadedKeys,U=h.loadingKeys,ye=h.halfCheckedKeys,Ye=h.keyEntities,ce=h.disabled,Ae=h.dragging,qe=h.dragOverNodeKey,oe=h.dropPosition,T=h.motion,re=h.height,$e=h.itemHeight,Ne=h.virtual,Xe=h.focusable,ct=h.activeItem,mt=h.focused,yt=h.tabIndex,Bt=h.onKeyDown,Ft=h.onFocus,_t=h.onBlur,Yt=h.onActiveChange,rn=h.onListChangeStart,hn=h.onListChangeEnd,Wt=(0,pe.Z)(h,Te),on=de.useRef(null),xn=de.useRef(null);de.useImperativeHandle(g,function(){return{scrollTo:function(St){on.current.scrollTo(St)},getIndentWidth:function(){return xn.current.offsetWidth}}});var Vt=de.useState(O),Mn=(0,Ce.Z)(Vt,2),qn=Mn[0],An=Mn[1],pr=de.useState(d),er=(0,Ce.Z)(pr,2),gr=er[0],$r=er[1],Rn=de.useState(d),pn=(0,Ce.Z)(Rn,2),tr=pn[0],Ke=pn[1],H=de.useState([]),ee=(0,Ce.Z)(H,2),Q=ee[0],J=ee[1],Ee=de.useState(null),Ze=(0,Ce.Z)(Ee,2),ft=Ze[0],tt=Ze[1],ut=de.useRef(d);ut.current=d;function It(){var Ge=ut.current;$r(Ge),Ke(Ge),J([]),tt(null),hn()}(0,q.Z)(function(){An(O);var Ge=we(qn,O);if(Ge.key!==null)if(Ge.add){var St=gr.findIndex(function(Nt){var mn=Nt.key;return mn===Ge.key}),Qt=je(ge(gr,d,Ge.key),Ne,re,$e),Kt=gr.slice();Kt.splice(St+1,0,Qe),Ke(Kt),J(Qt),tt("show")}else{var tn=d.findIndex(function(Nt){var mn=Nt.key;return mn===Ge.key}),Ut=je(ge(d,gr,Ge.key),Ne,re,$e),Sn=d.slice();Sn.splice(tn+1,0,Qe),Ke(Sn),J(Ut),tt("hide")}else gr!==d&&($r(d),Ke(d))},[O,d]),de.useEffect(function(){Ae||It()},[Ae]);var Pt=T?tr:d,At={expandedKeys:O,selectedKeys:I,loadedKeys:Y,loadingKeys:U,checkedKeys:he,halfCheckedKeys:ye,dragOverNodeKey:qe,dropPosition:oe,keyEntities:Ye};return de.createElement(de.Fragment,null,mt&&ct&&de.createElement("span",{style:Fe,"aria-live":"assertive"},Oe(ct)),de.createElement("div",null,de.createElement("input",{style:Fe,disabled:Xe===!1||ce,tabIndex:Xe!==!1?yt:null,onKeyDown:Bt,onFocus:Ft,onBlur:_t,value:"",onChange:Re,"aria-label":"for screen reader"})),de.createElement("div",{className:"".concat(y,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},de.createElement("div",{className:"".concat(y,"-indent")},de.createElement("div",{ref:xn,className:"".concat(y,"-indent-unit")}))),de.createElement(_.Z,(0,K.Z)({},Wt,{data:Pt,itemKey:Be,height:re,fullHeight:!1,virtual:Ne,itemHeight:$e,prefixCls:"".concat(y,"-list"),ref:on,onVisibleChange:function(St,Qt){var Kt=new Set(St),tn=Qt.filter(function(Ut){return!Kt.has(Ut)});tn.some(function(Ut){return Be(Ut)===X})&&It()}}),function(Ge){var St=Ge.pos,Qt=(0,K.Z)({},(Ue(Ge.data),Ge.data)),Kt=Ge.title,tn=Ge.key,Ut=Ge.isStart,Sn=Ge.isEnd,Nt=(0,se.km)(tn,St);delete Qt.key,delete Qt.children;var mn=(0,se.H8)(Nt,At);return de.createElement(z,(0,K.Z)({},Qt,mn,{title:Kt,active:!!ct&&tn===ct.key,pos:St,data:Ge.data,isStart:Ut,isEnd:Sn,motion:T,motionNodes:tn===X?Q:null,motionType:ft,onMotionStart:rn,onMotionEnd:It,treeNodeRequiredProps:At,onMouseMove:function(){Yt(null)}}))}))});lt.displayName="NodeList";var $t=lt,vt=m(35654),Tt=m(90782),wt=m(67841),pt=10,at=function(h){(0,F.Z)(y,h);var g=(0,V.Z)(y);function y(){var d;(0,N.Z)(this,y);for(var L=arguments.length,fe=new Array(L),O=0;O<L;O++)fe[O]=arguments[O];return d=g.call.apply(g,[this].concat(fe)),d.destroyed=!1,d.delayedDragEnterLogic=void 0,d.loadingRetryTimes={},d.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,se.w$)()},d.dragStartMousePosition=null,d.dragNode=void 0,d.currentMouseOverDroppableNodeKey=null,d.listRef=de.createRef(),d.onNodeDragStart=function(I,he){var Y=d.state,U=Y.expandedKeys,ye=Y.keyEntities,Ye=d.props.onDragStart,ce=he.props.eventKey;d.dragNode=he,d.dragStartMousePosition={x:I.clientX,y:I.clientY};var Ae=(0,vt._5)(U,ce);d.setState({draggingNodeKey:ce,dragChildrenKeys:(0,vt.wA)(ce,ye),indent:d.listRef.current.getIndentWidth()}),d.setExpandedKeys(Ae),window.addEventListener("dragend",d.onWindowDragEnd),Ye==null||Ye({event:I,node:(0,se.F)(he.props)})},d.onNodeDragEnter=function(I,he){var Y=d.state,U=Y.expandedKeys,ye=Y.keyEntities,Ye=Y.dragChildrenKeys,ce=Y.flattenNodes,Ae=Y.indent,qe=d.props,oe=qe.onDragEnter,T=qe.onExpand,re=qe.allowDrop,$e=qe.direction,Ne=he.props,Xe=Ne.pos,ct=Ne.eventKey,mt=(0,E.Z)(d),yt=mt.dragNode;if(d.currentMouseOverDroppableNodeKey!==ct&&(d.currentMouseOverDroppableNodeKey=ct),!yt){d.resetDragState();return}var Bt=(0,vt.OM)(I,yt,he,Ae,d.dragStartMousePosition,re,ce,ye,U,$e),Ft=Bt.dropPosition,_t=Bt.dropLevelOffset,Yt=Bt.dropTargetKey,rn=Bt.dropContainerKey,hn=Bt.dropTargetPos,Wt=Bt.dropAllowed,on=Bt.dragOverNodeKey;if(Ye.indexOf(Yt)!==-1||!Wt){d.resetDragState();return}if(d.delayedDragEnterLogic||(d.delayedDragEnterLogic={}),Object.keys(d.delayedDragEnterLogic).forEach(function(xn){clearTimeout(d.delayedDragEnterLogic[xn])}),yt.props.eventKey!==he.props.eventKey&&(I.persist(),d.delayedDragEnterLogic[Xe]=window.setTimeout(function(){if(d.state.draggingNodeKey!==null){var xn=(0,R.Z)(U),Vt=(0,wt.Z)(ye,he.props.eventKey);Vt&&(Vt.children||[]).length&&(xn=(0,vt.L0)(U,he.props.eventKey)),"expandedKeys"in d.props||d.setExpandedKeys(xn),T==null||T(xn,{node:(0,se.F)(he.props),expanded:!0,nativeEvent:I.nativeEvent})}},800)),yt.props.eventKey===Yt&&_t===0){d.resetDragState();return}d.setState({dragOverNodeKey:on,dropPosition:Ft,dropLevelOffset:_t,dropTargetKey:Yt,dropContainerKey:rn,dropTargetPos:hn,dropAllowed:Wt}),oe==null||oe({event:I,node:(0,se.F)(he.props),expandedKeys:U})},d.onNodeDragOver=function(I,he){var Y=d.state,U=Y.dragChildrenKeys,ye=Y.flattenNodes,Ye=Y.keyEntities,ce=Y.expandedKeys,Ae=Y.indent,qe=d.props,oe=qe.onDragOver,T=qe.allowDrop,re=qe.direction,$e=(0,E.Z)(d),Ne=$e.dragNode;if(Ne){var Xe=(0,vt.OM)(I,Ne,he,Ae,d.dragStartMousePosition,T,ye,Ye,ce,re),ct=Xe.dropPosition,mt=Xe.dropLevelOffset,yt=Xe.dropTargetKey,Bt=Xe.dropContainerKey,Ft=Xe.dropAllowed,_t=Xe.dropTargetPos,Yt=Xe.dragOverNodeKey;U.indexOf(yt)!==-1||!Ft||(Ne.props.eventKey===yt&&mt===0?d.state.dropPosition===null&&d.state.dropLevelOffset===null&&d.state.dropTargetKey===null&&d.state.dropContainerKey===null&&d.state.dropTargetPos===null&&d.state.dropAllowed===!1&&d.state.dragOverNodeKey===null||d.resetDragState():ct===d.state.dropPosition&&mt===d.state.dropLevelOffset&&yt===d.state.dropTargetKey&&Bt===d.state.dropContainerKey&&_t===d.state.dropTargetPos&&Ft===d.state.dropAllowed&&Yt===d.state.dragOverNodeKey||d.setState({dropPosition:ct,dropLevelOffset:mt,dropTargetKey:yt,dropContainerKey:Bt,dropTargetPos:_t,dropAllowed:Ft,dragOverNodeKey:Yt}),oe==null||oe({event:I,node:(0,se.F)(he.props)}))}},d.onNodeDragLeave=function(I,he){d.currentMouseOverDroppableNodeKey===he.props.eventKey&&!I.currentTarget.contains(I.relatedTarget)&&(d.resetDragState(),d.currentMouseOverDroppableNodeKey=null);var Y=d.props.onDragLeave;Y==null||Y({event:I,node:(0,se.F)(he.props)})},d.onWindowDragEnd=function(I){d.onNodeDragEnd(I,null,!0),window.removeEventListener("dragend",d.onWindowDragEnd)},d.onNodeDragEnd=function(I,he){var Y=d.props.onDragEnd;d.setState({dragOverNodeKey:null}),d.cleanDragState(),Y==null||Y({event:I,node:(0,se.F)(he.props)}),d.dragNode=null,window.removeEventListener("dragend",d.onWindowDragEnd)},d.onNodeDrop=function(I,he){var Y,U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ye=d.state,Ye=ye.dragChildrenKeys,ce=ye.dropPosition,Ae=ye.dropTargetKey,qe=ye.dropTargetPos,oe=ye.dropAllowed;if(oe){var T=d.props.onDrop;if(d.setState({dragOverNodeKey:null}),d.cleanDragState(),Ae!==null){var re=(0,xe.Z)((0,xe.Z)({},(0,se.H8)(Ae,d.getTreeNodeRequiredProps())),{},{active:((Y=d.getActiveItem())===null||Y===void 0?void 0:Y.key)===Ae,data:(0,wt.Z)(d.state.keyEntities,Ae).node}),$e=Ye.indexOf(Ae)!==-1;(0,ue.ZP)(!$e,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Ne=(0,vt.yx)(qe),Xe={event:I,node:(0,se.F)(re),dragNode:d.dragNode?(0,se.F)(d.dragNode.props):null,dragNodesKeys:[d.dragNode.props.eventKey].concat(Ye),dropToGap:ce!==0,dropPosition:ce+Number(Ne[Ne.length-1])};U||T==null||T(Xe),d.dragNode=null}}},d.cleanDragState=function(){var I=d.state.draggingNodeKey;I!==null&&d.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),d.dragStartMousePosition=null,d.currentMouseOverDroppableNodeKey=null},d.triggerExpandActionExpand=function(I,he){var Y=d.state,U=Y.expandedKeys,ye=Y.flattenNodes,Ye=he.expanded,ce=he.key,Ae=he.isLeaf;if(!(Ae||I.shiftKey||I.metaKey||I.ctrlKey)){var qe=ye.filter(function(T){return T.key===ce})[0],oe=(0,se.F)((0,xe.Z)((0,xe.Z)({},(0,se.H8)(ce,d.getTreeNodeRequiredProps())),{},{data:qe.data}));d.setExpandedKeys(Ye?(0,vt._5)(U,ce):(0,vt.L0)(U,ce)),d.onNodeExpand(I,oe)}},d.onNodeClick=function(I,he){var Y=d.props,U=Y.onClick,ye=Y.expandAction;ye==="click"&&d.triggerExpandActionExpand(I,he),U==null||U(I,he)},d.onNodeDoubleClick=function(I,he){var Y=d.props,U=Y.onDoubleClick,ye=Y.expandAction;ye==="doubleClick"&&d.triggerExpandActionExpand(I,he),U==null||U(I,he)},d.onNodeSelect=function(I,he){var Y=d.state.selectedKeys,U=d.state,ye=U.keyEntities,Ye=U.fieldNames,ce=d.props,Ae=ce.onSelect,qe=ce.multiple,oe=he.selected,T=he[Ye.key],re=!oe;re?qe?Y=(0,vt.L0)(Y,T):Y=[T]:Y=(0,vt._5)(Y,T);var $e=Y.map(function(Ne){var Xe=(0,wt.Z)(ye,Ne);return Xe?Xe.node:null}).filter(function(Ne){return Ne});d.setUncontrolledState({selectedKeys:Y}),Ae==null||Ae(Y,{event:"select",selected:re,node:he,selectedNodes:$e,nativeEvent:I.nativeEvent})},d.onNodeCheck=function(I,he,Y){var U=d.state,ye=U.keyEntities,Ye=U.checkedKeys,ce=U.halfCheckedKeys,Ae=d.props,qe=Ae.checkStrictly,oe=Ae.onCheck,T=he.key,re,$e={event:"check",node:he,checked:Y,nativeEvent:I.nativeEvent};if(qe){var Ne=Y?(0,vt.L0)(Ye,T):(0,vt._5)(Ye,T),Xe=(0,vt._5)(ce,T);re={checked:Ne,halfChecked:Xe},$e.checkedNodes=Ne.map(function(_t){return(0,wt.Z)(ye,_t)}).filter(function(_t){return _t}).map(function(_t){return _t.node}),d.setUncontrolledState({checkedKeys:Ne})}else{var ct=(0,Tt.S)([].concat((0,R.Z)(Ye),[T]),!0,ye),mt=ct.checkedKeys,yt=ct.halfCheckedKeys;if(!Y){var Bt=new Set(mt);Bt.delete(T);var Ft=(0,Tt.S)(Array.from(Bt),{checked:!1,halfCheckedKeys:yt},ye);mt=Ft.checkedKeys,yt=Ft.halfCheckedKeys}re=mt,$e.checkedNodes=[],$e.checkedNodesPositions=[],$e.halfCheckedKeys=yt,mt.forEach(function(_t){var Yt=(0,wt.Z)(ye,_t);if(Yt){var rn=Yt.node,hn=Yt.pos;$e.checkedNodes.push(rn),$e.checkedNodesPositions.push({node:rn,pos:hn})}}),d.setUncontrolledState({checkedKeys:mt},!1,{halfCheckedKeys:yt})}oe==null||oe(re,$e)},d.onNodeLoad=function(I){var he=I.key,Y=new Promise(function(U,ye){d.setState(function(Ye){var ce=Ye.loadedKeys,Ae=ce===void 0?[]:ce,qe=Ye.loadingKeys,oe=qe===void 0?[]:qe,T=d.props,re=T.loadData,$e=T.onLoad;if(!re||Ae.indexOf(he)!==-1||oe.indexOf(he)!==-1)return null;var Ne=re(I);return Ne.then(function(){var Xe=d.state.loadedKeys,ct=(0,vt.L0)(Xe,he);$e==null||$e(ct,{event:"load",node:I}),d.setUncontrolledState({loadedKeys:ct}),d.setState(function(mt){return{loadingKeys:(0,vt._5)(mt.loadingKeys,he)}}),U()}).catch(function(Xe){if(d.setState(function(mt){return{loadingKeys:(0,vt._5)(mt.loadingKeys,he)}}),d.loadingRetryTimes[he]=(d.loadingRetryTimes[he]||0)+1,d.loadingRetryTimes[he]>=pt){var ct=d.state.loadedKeys;(0,ue.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),d.setUncontrolledState({loadedKeys:(0,vt.L0)(ct,he)}),U()}ye(Xe)}),{loadingKeys:(0,vt.L0)(oe,he)}})});return Y.catch(function(){}),Y},d.onNodeMouseEnter=function(I,he){var Y=d.props.onMouseEnter;Y==null||Y({event:I,node:he})},d.onNodeMouseLeave=function(I,he){var Y=d.props.onMouseLeave;Y==null||Y({event:I,node:he})},d.onNodeContextMenu=function(I,he){var Y=d.props.onRightClick;Y&&(I.preventDefault(),Y({event:I,node:he}))},d.onFocus=function(){var I=d.props.onFocus;d.setState({focused:!0});for(var he=arguments.length,Y=new Array(he),U=0;U<he;U++)Y[U]=arguments[U];I==null||I.apply(void 0,Y)},d.onBlur=function(){var I=d.props.onBlur;d.setState({focused:!1}),d.onActiveChange(null);for(var he=arguments.length,Y=new Array(he),U=0;U<he;U++)Y[U]=arguments[U];I==null||I.apply(void 0,Y)},d.getTreeNodeRequiredProps=function(){var I=d.state,he=I.expandedKeys,Y=I.selectedKeys,U=I.loadedKeys,ye=I.loadingKeys,Ye=I.checkedKeys,ce=I.halfCheckedKeys,Ae=I.dragOverNodeKey,qe=I.dropPosition,oe=I.keyEntities;return{expandedKeys:he||[],selectedKeys:Y||[],loadedKeys:U||[],loadingKeys:ye||[],checkedKeys:Ye||[],halfCheckedKeys:ce||[],dragOverNodeKey:Ae,dropPosition:qe,keyEntities:oe}},d.setExpandedKeys=function(I){var he=d.state,Y=he.treeData,U=he.fieldNames,ye=(0,se.oH)(Y,I,U);d.setUncontrolledState({expandedKeys:I,flattenNodes:ye},!0)},d.onNodeExpand=function(I,he){var Y=d.state.expandedKeys,U=d.state,ye=U.listChanging,Ye=U.fieldNames,ce=d.props,Ae=ce.onExpand,qe=ce.loadData,oe=he.expanded,T=he[Ye.key];if(!ye){var re=Y.indexOf(T),$e=!oe;if((0,ue.ZP)(oe&&re!==-1||!oe&&re===-1,"Expand state not sync with index check"),$e?Y=(0,vt.L0)(Y,T):Y=(0,vt._5)(Y,T),d.setExpandedKeys(Y),Ae==null||Ae(Y,{node:he,expanded:$e,nativeEvent:I.nativeEvent}),$e&&qe){var Ne=d.onNodeLoad(he);Ne&&Ne.then(function(){var Xe=(0,se.oH)(d.state.treeData,Y,Ye);d.setUncontrolledState({flattenNodes:Xe})}).catch(function(){var Xe=d.state.expandedKeys,ct=(0,vt._5)(Xe,T);d.setExpandedKeys(ct)})}}},d.onListChangeStart=function(){d.setUncontrolledState({listChanging:!0})},d.onListChangeEnd=function(){setTimeout(function(){d.setUncontrolledState({listChanging:!1})})},d.onActiveChange=function(I){var he=d.state.activeKey,Y=d.props.onActiveChange;he!==I&&(d.setState({activeKey:I}),I!==null&&d.scrollTo({key:I}),Y==null||Y(I))},d.getActiveItem=function(){var I=d.state,he=I.activeKey,Y=I.flattenNodes;return he===null?null:Y.find(function(U){var ye=U.key;return ye===he})||null},d.offsetActiveKey=function(I){var he=d.state,Y=he.flattenNodes,U=he.activeKey,ye=Y.findIndex(function(Ae){var qe=Ae.key;return qe===U});ye===-1&&I<0&&(ye=Y.length),ye=(ye+I+Y.length)%Y.length;var Ye=Y[ye];if(Ye){var ce=Ye.key;d.onActiveChange(ce)}else d.onActiveChange(null)},d.onKeyDown=function(I){var he=d.state,Y=he.activeKey,U=he.expandedKeys,ye=he.checkedKeys,Ye=he.fieldNames,ce=d.props,Ae=ce.onKeyDown,qe=ce.checkable,oe=ce.selectable;switch(I.which){case le.Z.UP:{d.offsetActiveKey(-1),I.preventDefault();break}case le.Z.DOWN:{d.offsetActiveKey(1),I.preventDefault();break}}var T=d.getActiveItem();if(T&&T.data){var re=d.getTreeNodeRequiredProps(),$e=T.data.isLeaf===!1||!!(T.data[Ye.children]||[]).length,Ne=(0,se.F)((0,xe.Z)((0,xe.Z)({},(0,se.H8)(Y,re)),{},{data:T.data,active:!0}));switch(I.which){case le.Z.LEFT:{$e&&U.includes(Y)?d.onNodeExpand({},Ne):T.parent&&d.onActiveChange(T.parent.key),I.preventDefault();break}case le.Z.RIGHT:{$e&&!U.includes(Y)?d.onNodeExpand({},Ne):T.children&&T.children.length&&d.onActiveChange(T.children[0].key),I.preventDefault();break}case le.Z.ENTER:case le.Z.SPACE:{qe&&!Ne.disabled&&Ne.checkable!==!1&&!Ne.disableCheckbox?d.onNodeCheck({},Ne,!ye.includes(Y)):!qe&&oe&&!Ne.disabled&&Ne.selectable!==!1&&d.onNodeSelect({},Ne);break}}}Ae==null||Ae(I)},d.setUncontrolledState=function(I){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!d.destroyed){var U=!1,ye=!0,Ye={};Object.keys(I).forEach(function(ce){if(ce in d.props){ye=!1;return}U=!0,Ye[ce]=I[ce]}),U&&(!he||ye)&&d.setState((0,xe.Z)((0,xe.Z)({},Ye),Y))}},d.scrollTo=function(I){d.listRef.current.scrollTo(I)},d}return(0,x.Z)(y,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var L=this.props.activeKey;L!==void 0&&L!==this.state.activeKey&&(this.setState({activeKey:L}),L!==null&&this.scrollTo({key:L}))}},{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 L,fe=this.state,O=fe.focused,I=fe.flattenNodes,he=fe.keyEntities,Y=fe.draggingNodeKey,U=fe.activeKey,ye=fe.dropLevelOffset,Ye=fe.dropContainerKey,ce=fe.dropTargetKey,Ae=fe.dropPosition,qe=fe.dragOverNodeKey,oe=fe.indent,T=this.props,re=T.prefixCls,$e=T.className,Ne=T.style,Xe=T.showLine,ct=T.focusable,mt=T.tabIndex,yt=mt===void 0?0:mt,Bt=T.selectable,Ft=T.showIcon,_t=T.icon,Yt=T.switcherIcon,rn=T.draggable,hn=T.checkable,Wt=T.checkStrictly,on=T.disabled,xn=T.motion,Vt=T.loadData,Mn=T.filterTreeNode,qn=T.height,An=T.itemHeight,pr=T.virtual,er=T.titleRender,gr=T.dropIndicatorRender,$r=T.onContextMenu,Rn=T.onScroll,pn=T.direction,tr=T.rootClassName,Ke=T.rootStyle,H=(0,ke.Z)(this.props,{aria:!0,data:!0}),ee;return rn&&((0,A.Z)(rn)==="object"?ee=rn:typeof rn=="function"?ee={nodeDraggable:rn}:ee={}),de.createElement(_e.k.Provider,{value:{prefixCls:re,selectable:Bt,showIcon:Ft,icon:_t,switcherIcon:Yt,draggable:ee,draggingNodeKey:Y,checkable:hn,checkStrictly:Wt,disabled:on,keyEntities:he,dropLevelOffset:ye,dropContainerKey:Ye,dropTargetKey:ce,dropPosition:Ae,dragOverNodeKey:qe,indent:oe,direction:pn,dropIndicatorRender:gr,loadData:Vt,filterTreeNode:Mn,titleRender:er,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}},de.createElement("div",{role:"tree",className:G()(re,$e,tr,(L={},(0,j.Z)(L,"".concat(re,"-show-line"),Xe),(0,j.Z)(L,"".concat(re,"-focused"),O),(0,j.Z)(L,"".concat(re,"-active-focused"),U!==null),L)),style:Ke},de.createElement($t,(0,K.Z)({ref:this.listRef,prefixCls:re,style:Ne,data:I,disabled:on,selectable:Bt,checkable:!!hn,motion:xn,dragging:Y!==null,height:qn,itemHeight:An,virtual:pr,focusable:ct,focused:O,tabIndex:yt,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:$r,onScroll:Rn},this.getTreeNodeRequiredProps(),H))))}}],[{key:"getDerivedStateFromProps",value:function(L,fe){var O=fe.prevProps,I={prevProps:L};function he(ct){return!O&&ct in L||O&&O[ct]!==L[ct]}var Y,U=fe.fieldNames;if(he("fieldNames")&&(U=(0,se.w$)(L.fieldNames),I.fieldNames=U),he("treeData")?Y=L.treeData:he("children")&&((0,ue.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Y=(0,se.zn)(L.children)),Y){I.treeData=Y;var ye=(0,se.I8)(Y,{fieldNames:U});I.keyEntities=(0,xe.Z)((0,j.Z)({},X,ve),ye.keyEntities)}var Ye=I.keyEntities||fe.keyEntities;if(he("expandedKeys")||O&&he("autoExpandParent"))I.expandedKeys=L.autoExpandParent||!O&&L.defaultExpandParent?(0,vt.r7)(L.expandedKeys,Ye):L.expandedKeys;else if(!O&&L.defaultExpandAll){var ce=(0,xe.Z)({},Ye);delete ce[X],I.expandedKeys=Object.keys(ce).map(function(ct){return ce[ct].key})}else!O&&L.defaultExpandedKeys&&(I.expandedKeys=L.autoExpandParent||L.defaultExpandParent?(0,vt.r7)(L.defaultExpandedKeys,Ye):L.defaultExpandedKeys);if(I.expandedKeys||delete I.expandedKeys,Y||I.expandedKeys){var Ae=(0,se.oH)(Y||fe.treeData,I.expandedKeys||fe.expandedKeys,U);I.flattenNodes=Ae}if(L.selectable&&(he("selectedKeys")?I.selectedKeys=(0,vt.BT)(L.selectedKeys,L):!O&&L.defaultSelectedKeys&&(I.selectedKeys=(0,vt.BT)(L.defaultSelectedKeys,L))),L.checkable){var qe;if(he("checkedKeys")?qe=(0,vt.E6)(L.checkedKeys)||{}:!O&&L.defaultCheckedKeys?qe=(0,vt.E6)(L.defaultCheckedKeys)||{}:Y&&(qe=(0,vt.E6)(L.checkedKeys)||{checkedKeys:fe.checkedKeys,halfCheckedKeys:fe.halfCheckedKeys}),qe){var oe=qe,T=oe.checkedKeys,re=T===void 0?[]:T,$e=oe.halfCheckedKeys,Ne=$e===void 0?[]:$e;if(!L.checkStrictly){var Xe=(0,Tt.S)(re,!0,Ye);re=Xe.checkedKeys,Ne=Xe.halfCheckedKeys}I.checkedKeys=re,I.halfCheckedKeys=Ne}}return he("loadedKeys")&&(I.loadedKeys=L.loadedKeys),I}}]),y}(de.Component);at.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:Pe,allowDrop:function(){return!0},expandAction:!1},at.TreeNode=ae.Z;var S=at,p=S},35654:function(yn,dt,m){"use strict";m.d(dt,{BT:function(){return de},E6:function(){return Ue},L0:function(){return V},OM:function(){return ue},_5:function(){return F},r7:function(){return Ce},wA:function(){return G},yx:function(){return Ie}});var K=m(94480),j=m(76190),A=m(48736),xe=m(59301),R=m(39417),N=m(67841),x=m(71430),E=null;function F(pe,q){if(!pe)return[];var _=pe.slice(),ie=_.indexOf(q);return ie>=0&&_.splice(ie,1),_}function V(pe,q){var _=(pe||[]).slice();return _.indexOf(q)===-1&&_.push(q),_}function Ie(pe){return pe.split("-")}function G(pe,q){var _=[],ie=(0,N.Z)(q,pe);function ae(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Se.forEach(function(se){var be=se.key,D=se.children;_.push(be),ae(D)})}return ae(ie.children),_}function le(pe){if(pe.parent){var q=Ie(pe.pos);return Number(q[q.length-1])===pe.parent.children.length-1}return!1}function ke(pe){var q=Ie(pe.pos);return Number(q[q.length-1])===0}function ue(pe,q,_,ie,ae,Se,se,be,D,Le){var z,we=pe.clientX,ge=pe.clientY,Te=pe.target.getBoundingClientRect(),Fe=Te.top,Re=Te.height,X=(Le==="rtl"?-1:1)*(((ae==null?void 0:ae.x)||0)-we),w=(X-12)/ie,ve=(0,N.Z)(be,_.props.eventKey);if(ge<Fe+Re/2){var Qe=se.findIndex(function(p){return p.key===ve.key}),je=Qe<=0?0:Qe-1,Be=se[je].key;ve=(0,N.Z)(be,Be)}var Oe=ve.key,lt=ve,$t=ve.key,vt=0,Tt=0;if(!D.includes(Oe))for(var wt=0;wt<w&&le(ve);wt+=1)ve=ve.parent,Tt+=1;var pt=q.props.data,at=ve.node,S=!0;return ke(ve)&&ve.level===0&&ge<Fe+Re/2&&Se({dragNode:pt,dropNode:at,dropPosition:-1})&&ve.key===_.props.eventKey?vt=-1:(lt.children||[]).length&&D.includes($t)?Se({dragNode:pt,dropNode:at,dropPosition:0})?vt=0:S=!1:Tt===0?w>-1.5?Se({dragNode:pt,dropNode:at,dropPosition:1})?vt=1:S=!1:Se({dragNode:pt,dropNode:at,dropPosition:0})?vt=0:Se({dragNode:pt,dropNode:at,dropPosition:1})?vt=1:S=!1:Se({dragNode:pt,dropNode:at,dropPosition:1})?vt=1:S=!1,{dropPosition:vt,dropLevelOffset:Tt,dropTargetKey:ve.key,dropTargetPos:ve.pos,dragOverNodeKey:$t,dropContainerKey:vt===0?null:((z=ve.parent)===null||z===void 0?void 0:z.key)||null,dropAllowed:S}}function de(pe,q){if(pe){var _=q.multiple;return _?pe.slice():pe.length?[pe[0]]:pe}}var _e=function(q){return q};function Pe(pe,q){if(!pe)return[];var _=q||{},ie=_.processProps,ae=ie===void 0?_e:ie,Se=Array.isArray(pe)?pe:[pe];return Se.map(function(se){var be=se.children,D=_objectWithoutProperties(se,E),Le=Pe(be,q);return React.createElement(TreeNode,_extends({key:D.key},ae(D)),Le)})}function Ue(pe){if(!pe)return null;var q;if(Array.isArray(pe))q={checkedKeys:pe,halfCheckedKeys:void 0};else if((0,j.Z)(pe)==="object")q={checkedKeys:pe.checked||void 0,halfCheckedKeys:pe.halfChecked||void 0};else return(0,A.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return q}function Ce(pe,q){var _=new Set;function ie(ae){if(!_.has(ae)){var Se=(0,N.Z)(q,ae);if(Se){_.add(ae);var se=Se.parent,be=Se.node;be.disabled||se&&ie(se.key)}}}return(pe||[]).forEach(function(ae){ie(ae)}),(0,K.Z)(_)}},90782:function(yn,dt,m){"use strict";m.d(dt,{S:function(){return x}});var K=m(48736),j=m(67841);function A(E,F){var V=new Set;return E.forEach(function(Ie){F.has(Ie)||V.add(Ie)}),V}function xe(E){var F=E||{},V=F.disabled,Ie=F.disableCheckbox,G=F.checkable;return!!(V||Ie)||G===!1}function R(E,F,V,Ie){for(var G=new Set(E),le=new Set,ke=0;ke<=V;ke+=1){var ue=F.get(ke)||new Set;ue.forEach(function(Ue){var Ce=Ue.key,pe=Ue.node,q=Ue.children,_=q===void 0?[]:q;G.has(Ce)&&!Ie(pe)&&_.filter(function(ie){return!Ie(ie.node)}).forEach(function(ie){G.add(ie.key)})})}for(var de=new Set,_e=V;_e>=0;_e-=1){var Pe=F.get(_e)||new Set;Pe.forEach(function(Ue){var Ce=Ue.parent,pe=Ue.node;if(!(Ie(pe)||!Ue.parent||de.has(Ue.parent.key))){if(Ie(Ue.parent.node)){de.add(Ce.key);return}var q=!0,_=!1;(Ce.children||[]).filter(function(ie){return!Ie(ie.node)}).forEach(function(ie){var ae=ie.key,Se=G.has(ae);q&&!Se&&(q=!1),!_&&(Se||le.has(ae))&&(_=!0)}),q&&G.add(Ce.key),_&&le.add(Ce.key),de.add(Ce.key)}})}return{checkedKeys:Array.from(G),halfCheckedKeys:Array.from(A(le,G))}}function N(E,F,V,Ie,G){for(var le=new Set(E),ke=new Set(F),ue=0;ue<=Ie;ue+=1){var de=V.get(ue)||new Set;de.forEach(function(Ce){var pe=Ce.key,q=Ce.node,_=Ce.children,ie=_===void 0?[]:_;!le.has(pe)&&!ke.has(pe)&&!G(q)&&ie.filter(function(ae){return!G(ae.node)}).forEach(function(ae){le.delete(ae.key)})})}ke=new Set;for(var _e=new Set,Pe=Ie;Pe>=0;Pe-=1){var Ue=V.get(Pe)||new Set;Ue.forEach(function(Ce){var pe=Ce.parent,q=Ce.node;if(!(G(q)||!Ce.parent||_e.has(Ce.parent.key))){if(G(Ce.parent.node)){_e.add(pe.key);return}var _=!0,ie=!1;(pe.children||[]).filter(function(ae){return!G(ae.node)}).forEach(function(ae){var Se=ae.key,se=le.has(Se);_&&!se&&(_=!1),!ie&&(se||ke.has(Se))&&(ie=!0)}),_||le.delete(pe.key),ie&&ke.add(pe.key),_e.add(pe.key)}})}return{checkedKeys:Array.from(le),halfCheckedKeys:Array.from(A(ke,le))}}function x(E,F,V,Ie){var G=[],le;Ie?le=Ie:le=xe;var ke=new Set(E.filter(function(Pe){var Ue=!!(0,j.Z)(V,Pe);return Ue||G.push(Pe),Ue})),ue=new Map,de=0;Object.keys(V).forEach(function(Pe){var Ue=V[Pe],Ce=Ue.level,pe=ue.get(Ce);pe||(pe=new Set,ue.set(Ce,pe)),pe.add(Ue),de=Math.max(de,Ce)}),(0,K.ZP)(!G.length,"Tree missing follow keys: ".concat(G.slice(0,100).map(function(Pe){return"'".concat(Pe,"'")}).join(", ")));var _e;return F===!0?_e=R(ke,ue,de,le):_e=N(ke,F.halfCheckedKeys,ue,de,le),_e}},67841:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return K}});function K(j,A){return j[A]}},71430:function(yn,dt,m){"use strict";m.d(dt,{F:function(){return Ce},H8:function(){return Ue},I8:function(){return Pe},km:function(){return G},oH:function(){return de},w$:function(){return le},zn:function(){return ue}});var K=m(76190),j=m(94480),A=m(33885),xe=m(75931),R=m(11592),N=m(2738),x=m(48736),E=m(67841),F=["children"];function V(pe,q){return"".concat(pe,"-").concat(q)}function Ie(pe){return pe&&pe.type&&pe.type.isTreeNode}function G(pe,q){return pe!=null?pe:q}function le(pe){var q=pe||{},_=q.title,ie=q._title,ae=q.key,Se=q.children,se=_||"title";return{title:se,_title:ie||[se],key:ae||"key",children:Se||"children"}}function ke(pe,q){var _=new Map;function ie(ae){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(ae||[]).forEach(function(se){var be=se[q.key],D=se[q.children];warning(be!=null,"Tree node must have a certain key: [".concat(Se).concat(be,"]"));var Le=String(be);warning(!_.has(Le)||be===null||be===void 0,"Same 'key' exist in the Tree: ".concat(Le)),_.set(Le,!0),ie(D,"".concat(Se).concat(Le," > "))})}ie(pe)}function ue(pe){function q(_){var ie=(0,R.Z)(_);return ie.map(function(ae){if(!Ie(ae))return(0,x.ZP)(!ae,"Tree/TreeNode can only accept TreeNode as children."),null;var Se=ae.key,se=ae.props,be=se.children,D=(0,xe.Z)(se,F),Le=(0,A.Z)({key:Se},D),z=q(be);return z.length&&(Le.children=z),Le}).filter(function(ae){return ae})}return q(pe)}function de(pe,q,_){var ie=le(_),ae=ie._title,Se=ie.key,se=ie.children,be=new Set(q===!0?[]:q),D=[];function Le(z){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return z.map(function(ge,Te){for(var Fe=V(we?we.pos:"0",Te),Re=G(ge[Se],Fe),X,w=0;w<ae.length;w+=1){var ve=ae[w];if(ge[ve]!==void 0){X=ge[ve];break}}var Qe=(0,A.Z)((0,A.Z)({},(0,N.Z)(ge,[].concat((0,j.Z)(ae),[Se,se]))),{},{title:X,key:Re,parent:we,pos:Fe,children:null,data:ge,isStart:[].concat((0,j.Z)(we?we.isStart:[]),[Te===0]),isEnd:[].concat((0,j.Z)(we?we.isEnd:[]),[Te===z.length-1])});return D.push(Qe),q===!0||be.has(Re)?Qe.children=Le(ge[se]||[],Qe):Qe.children=[],Qe})}return Le(pe),D}function _e(pe,q,_){var ie={};(0,K.Z)(_)==="object"?ie=_:ie={externalGetKey:_},ie=ie||{};var ae=ie,Se=ae.childrenPropName,se=ae.externalGetKey,be=ae.fieldNames,D=le(be),Le=D.key,z=D.children,we=Se||z,ge;se?typeof se=="string"?ge=function(Re){return Re[se]}:typeof se=="function"&&(ge=function(Re){return se(Re)}):ge=function(Re,X){return G(Re[Le],X)};function Te(Fe,Re,X,w){var ve=Fe?Fe[we]:pe,Qe=Fe?V(X.pos,Re):"0",je=Fe?[].concat((0,j.Z)(w),[Fe]):[];if(Fe){var Be=ge(Fe,Qe),Oe={node:Fe,index:Re,pos:Qe,key:Be,parentPos:X.node?X.pos:null,level:X.level+1,nodes:je};q(Oe)}ve&&ve.forEach(function(lt,$t){Te(lt,$t,{node:Fe,pos:Qe,level:X?X.level+1:-1},je)})}Te(null)}function Pe(pe){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=q.initWrapper,ie=q.processEntity,ae=q.onProcessFinished,Se=q.externalGetKey,se=q.childrenPropName,be=q.fieldNames,D=arguments.length>2?arguments[2]:void 0,Le=Se||D,z={},we={},ge={posEntities:z,keyEntities:we};return _&&(ge=_(ge)||ge),_e(pe,function(Te){var Fe=Te.node,Re=Te.index,X=Te.pos,w=Te.key,ve=Te.parentPos,Qe=Te.level,je=Te.nodes,Be={node:Fe,nodes:je,index:Re,key:w,pos:X,level:Qe},Oe=G(w,X);z[X]=Be,we[Oe]=Be,Be.parent=z[ve],Be.parent&&(Be.parent.children=Be.parent.children||[],Be.parent.children.push(Be)),ie&&ie(Be,ge)},{externalGetKey:Le,childrenPropName:se,fieldNames:be}),ae&&ae(ge),ge}function Ue(pe,q){var _=q.expandedKeys,ie=q.selectedKeys,ae=q.loadedKeys,Se=q.loadingKeys,se=q.checkedKeys,be=q.halfCheckedKeys,D=q.dragOverNodeKey,Le=q.dropPosition,z=q.keyEntities,we=(0,E.Z)(z,pe),ge={eventKey:pe,expanded:_.indexOf(pe)!==-1,selected:ie.indexOf(pe)!==-1,loaded:ae.indexOf(pe)!==-1,loading:Se.indexOf(pe)!==-1,checked:se.indexOf(pe)!==-1,halfChecked:be.indexOf(pe)!==-1,pos:String(we?we.pos:""),dragOver:D===pe&&Le===0,dragOverGapTop:D===pe&&Le===-1,dragOverGapBottom:D===pe&&Le===1};return ge}function Ce(pe){var q=pe.data,_=pe.expanded,ie=pe.selected,ae=pe.checked,Se=pe.loaded,se=pe.loading,be=pe.halfChecked,D=pe.dragOver,Le=pe.dragOverGapTop,z=pe.dragOverGapBottom,we=pe.pos,ge=pe.active,Te=pe.eventKey,Fe=(0,A.Z)((0,A.Z)({},q),{},{expanded:_,selected:ie,checked:ae,loaded:Se,loading:se,halfChecked:be,dragOver:D,dragOverGapTop:Le,dragOverGapBottom:z,pos:we,active:ge,key:Te});return"props"in Fe||Object.defineProperty(Fe,"props",{get:function(){return(0,x.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),pe}}),Fe}},8224:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return j}});var K=m(4676);function j(A,xe,R,N){var x=K.unstable_batchedUpdates?function(F){K.unstable_batchedUpdates(R,F)}:R;return A!=null&&A.addEventListener&&A.addEventListener(xe,x,N),{remove:function(){A!=null&&A.removeEventListener&&A.removeEventListener(xe,x,N)}}}},55468:function(yn,dt,m){"use strict";m.d(dt,{g1:function(){return Ie},os:function(){return le}});var K=/margin|padding|width|height|max|min|offset/,j={left:!0,top:!0},A={cssFloat:1,styleFloat:1,float:1};function xe(ke){return ke.nodeType===1?ke.ownerDocument.defaultView.getComputedStyle(ke,null):{}}function R(ke,ue,de){if(ue=ue.toLowerCase(),de==="auto"){if(ue==="height")return ke.offsetHeight;if(ue==="width")return ke.offsetWidth}return ue in j||(j[ue]=K.test(ue)),j[ue]?parseFloat(de)||0:de}function N(ke,ue){var de=arguments.length,_e=xe(ke);return ue=A[ue]?"cssFloat"in ke.style?"cssFloat":"styleFloat":ue,de===1?_e:R(ke,ue,_e[ue]||ke.style[ue])}function x(ke,ue,de){var _e=arguments.length;if(ue=A[ue]?"cssFloat"in ke.style?"cssFloat":"styleFloat":ue,_e===3)return typeof de=="number"&&K.test(ue)&&(de="".concat(de,"px")),ke.style[ue]=de,de;for(var Pe in ue)ue.hasOwnProperty(Pe)&&x(ke,Pe,ue[Pe]);return xe(ke)}function E(ke){return ke===document.body?document.documentElement.clientWidth:ke.offsetWidth}function F(ke){return ke===document.body?window.innerHeight||document.documentElement.clientHeight:ke.offsetHeight}function V(){var ke=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),ue=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:ke,height:ue}}function Ie(){var ke=document.documentElement.clientWidth,ue=window.innerHeight||document.documentElement.clientHeight;return{width:ke,height:ue}}function G(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function le(ke){var ue=ke.getBoundingClientRect(),de=document.documentElement;return{left:ue.left+(window.pageXOffset||de.scrollLeft)-(de.clientLeft||document.body.clientLeft||0),top:ue.top+(window.pageYOffset||de.scrollTop)-(de.clientTop||document.body.clientTop||0)}}},24514:function(yn,dt,m){"use strict";m.d(dt,{G:function(){return xe}});var K=m(47273),j=function(N){if((0,K.Z)()&&window.document.documentElement){var x=Array.isArray(N)?N:[N],E=window.document.documentElement;return x.some(function(F){return F in E.style})}return!1},A=function(N,x){if(!j(N))return!1;var E=document.createElement("div"),F=E.style[N];return E.style[N]=x,E.style[N]!==F};function xe(R,N){return!Array.isArray(R)&&N!==void 0?A(R,N):j(R)}},48911:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return at}});var K=m(54476),j=m(76190),A=m(33885),xe=m(20068),R=m(42978),N=m(75931),x=m(92310),E=m.n(x),F=m(29301),V=m(70425),Ie=m(34280),G=m(59301),le=m(4676),ke=G.forwardRef(function(S,p){var h=S.height,g=S.offsetY,y=S.offsetX,d=S.children,L=S.prefixCls,fe=S.onInnerResize,O=S.innerProps,I=S.rtl,he=S.extra,Y={},U={display:"flex",flexDirection:"column"};return g!==void 0&&(Y={height:h,position:"relative",overflow:"hidden"},U=(0,A.Z)((0,A.Z)({},U),{},(0,xe.Z)((0,xe.Z)((0,xe.Z)((0,xe.Z)((0,xe.Z)({transform:"translateY(".concat(g,"px)")},I?"marginRight":"marginLeft",-y),"position","absolute"),"left",0),"right",0),"top",0))),G.createElement("div",{style:Y},G.createElement(F.Z,{onResize:function(Ye){var ce=Ye.offsetHeight;ce&&fe&&fe()}},G.createElement("div",(0,K.Z)({style:U,className:E()((0,xe.Z)({},"".concat(L,"-holder-inner"),L)),ref:p},O),d,he)))});ke.displayName="Filler";var ue=ke;function de(S){var p=S.children,h=S.setRef,g=G.useCallback(function(y){h(y)},[]);return G.cloneElement(p,{ref:g})}function _e(S,p,h,g,y,d,L,fe){var O=fe.getKey;return S.slice(p,h+1).map(function(I,he){var Y=p+he,U=L(I,Y,{style:{width:g},offsetX:y}),ye=O(I);return G.createElement(de,{key:ye,setRef:function(ce){return d(I,ce)}},U)})}function Pe(S,p,h,g){var y=h-S,d=p-h,L=Math.min(y,d)*2;if(g<=L){var fe=Math.floor(g/2);return g%2?h+fe+1:h-fe}return y>d?h-(g-d):h+(g-y)}function Ue(S,p,h){var g=S.length,y=p.length,d,L;if(g===0&&y===0)return null;g<y?(d=S,L=p):(d=p,L=S);var fe={__EMPTY_ITEM__:!0};function O(Ye){return Ye!==void 0?h(Ye):fe}for(var I=null,he=Math.abs(g-y)!==1,Y=0;Y<L.length;Y+=1){var U=O(d[Y]),ye=O(L[Y]);if(U!==ye){I=Y,he=he||U!==O(L[Y+1]);break}}return I===null?null:{index:I,multiple:he}}function Ce(S,p,h){var g=G.useState(S),y=(0,R.Z)(g,2),d=y[0],L=y[1],fe=G.useState(null),O=(0,R.Z)(fe,2),I=O[0],he=O[1];return G.useEffect(function(){var Y=Ue(d||[],S||[],p);(Y==null?void 0:Y.index)!==void 0&&(h==null||h(Y.index),he(S[Y.index])),L(S)},[S]),[I]}var pe=m(16089),q=(typeof navigator=="undefined"?"undefined":(0,j.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),_=q,ie=function(S,p,h,g){var y=(0,G.useRef)(!1),d=(0,G.useRef)(null);function L(){clearTimeout(d.current),y.current=!0,d.current=setTimeout(function(){y.current=!1},50)}var fe=(0,G.useRef)({top:S,bottom:p,left:h,right:g});return fe.current.top=S,fe.current.bottom=p,fe.current.left=h,fe.current.right=g,function(O,I){var he=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Y=O?I<0&&fe.current.left||I>0&&fe.current.right:I<0&&fe.current.top||I>0&&fe.current.bottom;return he&&Y?(clearTimeout(d.current),y.current=!1):(!Y||y.current)&&L(),!y.current&&Y}};function ae(S,p,h,g,y,d,L){var fe=(0,G.useRef)(0),O=(0,G.useRef)(null),I=(0,G.useRef)(null),he=(0,G.useRef)(!1),Y=ie(p,h,g,y);function U(oe,T){if(pe.Z.cancel(O.current),!Y(!1,T)){var re=oe;if(!re._virtualHandled)re._virtualHandled=!0;else return;fe.current+=T,I.current=T,_||re.preventDefault(),O.current=(0,pe.Z)(function(){var $e=he.current?10:1;L(fe.current*$e,!1),fe.current=0})}}function ye(oe,T){L(T,!0),_||oe.preventDefault()}var Ye=(0,G.useRef)(null),ce=(0,G.useRef)(null);function Ae(oe){if(S){pe.Z.cancel(ce.current),ce.current=(0,pe.Z)(function(){Ye.current=null},2);var T=oe.deltaX,re=oe.deltaY,$e=oe.shiftKey,Ne=T,Xe=re;(Ye.current==="sx"||!Ye.current&&$e&&re&&!T)&&(Ne=re,Xe=0,Ye.current="sx");var ct=Math.abs(Ne),mt=Math.abs(Xe);Ye.current===null&&(Ye.current=d&&ct>mt?"x":"y"),Ye.current==="y"?U(oe,Xe):ye(oe,Ne)}}function qe(oe){S&&(he.current=oe.detail===I.current)}return[Ae,qe]}function Se(S,p,h,g){var y=G.useMemo(function(){return[new Map,[]]},[S,h.id,g]),d=(0,R.Z)(y,2),L=d[0],fe=d[1],O=function(he){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he,U=L.get(he),ye=L.get(Y);if(U===void 0||ye===void 0)for(var Ye=S.length,ce=fe.length;ce<Ye;ce+=1){var Ae,qe=S[ce],oe=p(qe);L.set(oe,ce);var T=(Ae=h.get(oe))!==null&&Ae!==void 0?Ae:g;if(fe[ce]=(fe[ce-1]||0)+T,oe===he&&(U=ce),oe===Y&&(ye=ce),U!==void 0&&ye!==void 0)break}return{top:fe[U-1]||0,bottom:fe[ye]}};return O}var se=m(67732),be=m(83652),D=function(){function S(){(0,se.Z)(this,S),(0,xe.Z)(this,"maps",void 0),(0,xe.Z)(this,"id",0),(0,xe.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,be.Z)(S,[{key:"set",value:function(h,g){this.diffRecords.set(h,this.maps[h]),this.maps[h]=g,this.id+=1}},{key:"get",value:function(h){return this.maps[h]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),S}(),Le=D;function z(S){var p=parseFloat(S);return isNaN(p)?0:p}function we(S,p,h){var g=G.useState(0),y=(0,R.Z)(g,2),d=y[0],L=y[1],fe=(0,G.useRef)(new Map),O=(0,G.useRef)(new Le),I=(0,G.useRef)(0);function he(){I.current+=1}function Y(){var ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;he();var Ye=function(){var qe=!1;fe.current.forEach(function(oe,T){if(oe&&oe.offsetParent){var re=oe.offsetHeight,$e=getComputedStyle(oe),Ne=$e.marginTop,Xe=$e.marginBottom,ct=z(Ne),mt=z(Xe),yt=re+ct+mt;O.current.get(T)!==yt&&(O.current.set(T,yt),qe=!0)}}),qe&&L(function(oe){return oe+1})};if(ye)Ye();else{I.current+=1;var ce=I.current;Promise.resolve().then(function(){ce===I.current&&Ye()})}}function U(ye,Ye){var ce=S(ye),Ae=fe.current.get(ce);Ye?(fe.current.set(ce,Ye),Y()):fe.current.delete(ce),!Ae!=!Ye&&(Ye?p==null||p(ye):h==null||h(ye))}return(0,G.useEffect)(function(){return he},[]),[U,Y,O.current,d]}var ge=14/15;function Te(S,p,h){var g=(0,G.useRef)(!1),y=(0,G.useRef)(0),d=(0,G.useRef)(0),L=(0,G.useRef)(null),fe=(0,G.useRef)(null),O,I=function(ye){if(g.current){var Ye=Math.ceil(ye.touches[0].pageX),ce=Math.ceil(ye.touches[0].pageY),Ae=y.current-Ye,qe=d.current-ce,oe=Math.abs(Ae)>Math.abs(qe);oe?y.current=Ye:d.current=ce;var T=h(oe,oe?Ae:qe,!1,ye);T&&ye.preventDefault(),clearInterval(fe.current),T&&(fe.current=setInterval(function(){oe?Ae*=ge:qe*=ge;var re=Math.floor(oe?Ae:qe);(!h(oe,re,!0)||Math.abs(re)<=.1)&&clearInterval(fe.current)},16))}},he=function(){g.current=!1,O()},Y=function(ye){O(),ye.touches.length===1&&!g.current&&(g.current=!0,y.current=Math.ceil(ye.touches[0].pageX),d.current=Math.ceil(ye.touches[0].pageY),L.current=ye.target,L.current.addEventListener("touchmove",I,{passive:!1}),L.current.addEventListener("touchend",he,{passive:!0}))};O=function(){L.current&&(L.current.removeEventListener("touchmove",I),L.current.removeEventListener("touchend",he))},(0,Ie.Z)(function(){return S&&p.current.addEventListener("touchstart",Y,{passive:!0}),function(){var U;(U=p.current)===null||U===void 0||U.removeEventListener("touchstart",Y),O(),clearInterval(fe.current)}},[S])}function Fe(S){return Math.floor(Math.pow(S,.5))}function Re(S,p){var h="touches"in S?S.touches[0]:S;return h[p?"pageX":"pageY"]-window[p?"scrollX":"scrollY"]}function X(S,p,h){G.useEffect(function(){var g=p.current;if(S&&g){var y=!1,d,L,fe=function(){pe.Z.cancel(d)},O=function U(){fe(),d=(0,pe.Z)(function(){h(L),U()})},I=function(){y=!1,fe()},he=function(ye){if(!(ye.target.draggable||ye.button!==0)){var Ye=ye;Ye._virtualHandled||(Ye._virtualHandled=!0,y=!0)}},Y=function(ye){if(y){var Ye=Re(ye,!1),ce=g.getBoundingClientRect(),Ae=ce.top,qe=ce.bottom;if(Ye<=Ae){var oe=Ae-Ye;L=-Fe(oe),O()}else if(Ye>=qe){var T=Ye-qe;L=Fe(T),O()}else fe()}};return g.addEventListener("mousedown",he),g.ownerDocument.addEventListener("mouseup",I),g.ownerDocument.addEventListener("mousemove",Y),g.ownerDocument.addEventListener("dragend",I),function(){g.removeEventListener("mousedown",he),g.ownerDocument.removeEventListener("mouseup",I),g.ownerDocument.removeEventListener("mousemove",Y),g.ownerDocument.removeEventListener("dragend",I),fe()}}},[S])}var w=10;function ve(S,p,h,g,y,d,L,fe){var O=G.useRef(),I=G.useState(null),he=(0,R.Z)(I,2),Y=he[0],U=he[1];return(0,Ie.Z)(function(){if(Y&&Y.times<w){if(!S.current){U(function(xn){return(0,A.Z)({},xn)});return}d();var ye=Y.targetAlign,Ye=Y.originAlign,ce=Y.index,Ae=Y.offset,qe=S.current.clientHeight,oe=!1,T=ye,re=null;if(qe){for(var $e=ye||Ye,Ne=0,Xe=0,ct=0,mt=Math.min(p.length-1,ce),yt=0;yt<=mt;yt+=1){var Bt=y(p[yt]);Xe=Ne;var Ft=h.get(Bt);ct=Xe+(Ft===void 0?g:Ft),Ne=ct}for(var _t=$e==="top"?Ae:qe-Ae,Yt=mt;Yt>=0;Yt-=1){var rn=y(p[Yt]),hn=h.get(rn);if(hn===void 0){oe=!0;break}if(_t-=hn,_t<=0)break}switch($e){case"top":re=Xe-Ae;break;case"bottom":re=ct-qe+Ae;break;default:{var Wt=S.current.scrollTop,on=Wt+qe;Xe<Wt?T="top":ct>on&&(T="bottom")}}re!==null&&L(re),re!==Y.lastTop&&(oe=!0)}oe&&U((0,A.Z)((0,A.Z)({},Y),{},{times:Y.times+1,targetAlign:T,lastTop:re}))}},[Y,S.current]),function(ye){if(ye==null){fe();return}if(pe.Z.cancel(O.current),typeof ye=="number")L(ye);else if(ye&&(0,j.Z)(ye)==="object"){var Ye,ce=ye.align;"index"in ye?Ye=ye.index:Ye=p.findIndex(function(oe){return y(oe)===ye.key});var Ae=ye.offset,qe=Ae===void 0?0:Ae;U({times:0,index:Ye,offset:qe,originAlign:ce})}}}var Qe=G.forwardRef(function(S,p){var h=S.prefixCls,g=S.rtl,y=S.scrollOffset,d=S.scrollRange,L=S.onStartMove,fe=S.onStopMove,O=S.onScroll,I=S.horizontal,he=S.spinSize,Y=S.containerSize,U=S.style,ye=S.thumbStyle,Ye=S.showScrollBar,ce=G.useState(!1),Ae=(0,R.Z)(ce,2),qe=Ae[0],oe=Ae[1],T=G.useState(null),re=(0,R.Z)(T,2),$e=re[0],Ne=re[1],Xe=G.useState(null),ct=(0,R.Z)(Xe,2),mt=ct[0],yt=ct[1],Bt=!g,Ft=G.useRef(),_t=G.useRef(),Yt=G.useState(Ye),rn=(0,R.Z)(Yt,2),hn=rn[0],Wt=rn[1],on=G.useRef(),xn=function(){Ye===!0||Ye===!1||(clearTimeout(on.current),Wt(!0),on.current=setTimeout(function(){Wt(!1)},3e3))},Vt=d-Y||0,Mn=Y-he||0,qn=G.useMemo(function(){if(y===0||Vt===0)return 0;var Ke=y/Vt;return Ke*Mn},[y,Vt,Mn]),An=function(H){H.stopPropagation(),H.preventDefault()},pr=G.useRef({top:qn,dragging:qe,pageY:$e,startTop:mt});pr.current={top:qn,dragging:qe,pageY:$e,startTop:mt};var er=function(H){oe(!0),Ne(Re(H,I)),yt(pr.current.top),L(),H.stopPropagation(),H.preventDefault()};G.useEffect(function(){var Ke=function(J){J.preventDefault()},H=Ft.current,ee=_t.current;return H.addEventListener("touchstart",Ke,{passive:!1}),ee.addEventListener("touchstart",er,{passive:!1}),function(){H.removeEventListener("touchstart",Ke),ee.removeEventListener("touchstart",er)}},[]);var gr=G.useRef();gr.current=Vt;var $r=G.useRef();$r.current=Mn,G.useEffect(function(){if(qe){var Ke,H=function(J){var Ee=pr.current,Ze=Ee.dragging,ft=Ee.pageY,tt=Ee.startTop;pe.Z.cancel(Ke);var ut=Ft.current.getBoundingClientRect(),It=Y/(I?ut.width:ut.height);if(Ze){var Pt=(Re(J,I)-ft)*It,At=tt;!Bt&&I?At-=Pt:At+=Pt;var Ge=gr.current,St=$r.current,Qt=St?At/St:0,Kt=Math.ceil(Qt*Ge);Kt=Math.max(Kt,0),Kt=Math.min(Kt,Ge),Ke=(0,pe.Z)(function(){O(Kt,I)})}},ee=function(){oe(!1),fe()};return window.addEventListener("mousemove",H,{passive:!0}),window.addEventListener("touchmove",H,{passive:!0}),window.addEventListener("mouseup",ee,{passive:!0}),window.addEventListener("touchend",ee,{passive:!0}),function(){window.removeEventListener("mousemove",H),window.removeEventListener("touchmove",H),window.removeEventListener("mouseup",ee),window.removeEventListener("touchend",ee),pe.Z.cancel(Ke)}}},[qe]),G.useEffect(function(){return xn(),function(){clearTimeout(on.current)}},[y]),G.useImperativeHandle(p,function(){return{delayHidden:xn}});var Rn="".concat(h,"-scrollbar"),pn={position:"absolute",visibility:hn?null:"hidden"},tr={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return I?(Object.assign(pn,{height:8,left:0,right:0,bottom:0}),Object.assign(tr,(0,xe.Z)({height:"100%",width:he},Bt?"left":"right",qn))):(Object.assign(pn,(0,xe.Z)({width:8,top:0,bottom:0},Bt?"right":"left",0)),Object.assign(tr,{width:"100%",height:he,top:qn})),G.createElement("div",{ref:Ft,className:E()(Rn,(0,xe.Z)((0,xe.Z)((0,xe.Z)({},"".concat(Rn,"-horizontal"),I),"".concat(Rn,"-vertical"),!I),"".concat(Rn,"-visible"),hn)),style:(0,A.Z)((0,A.Z)({},pn),U),onMouseDown:An,onMouseMove:xn},G.createElement("div",{ref:_t,className:E()("".concat(Rn,"-thumb"),(0,xe.Z)({},"".concat(Rn,"-thumb-moving"),qe)),style:(0,A.Z)((0,A.Z)({},tr),ye),onMouseDown:er}))}),je=Qe,Be=20;function Oe(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,h=S/p*S;return isNaN(h)&&(h=0),h=Math.max(h,Be),Math.floor(h)}var lt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],$t=[],vt={overflowY:"auto",overflowAnchor:"none"};function Tt(S,p){var h=S.prefixCls,g=h===void 0?"rc-virtual-list":h,y=S.className,d=S.height,L=S.itemHeight,fe=S.fullHeight,O=fe===void 0?!0:fe,I=S.style,he=S.data,Y=S.children,U=S.itemKey,ye=S.virtual,Ye=S.direction,ce=S.scrollWidth,Ae=S.component,qe=Ae===void 0?"div":Ae,oe=S.onScroll,T=S.onVirtualScroll,re=S.onVisibleChange,$e=S.innerProps,Ne=S.extraRender,Xe=S.styles,ct=S.showScrollBar,mt=ct===void 0?"optional":ct,yt=(0,N.Z)(S,lt),Bt=G.useCallback(function(zn){return typeof U=="function"?U(zn):zn==null?void 0:zn[U]},[U]),Ft=we(Bt,null,null),_t=(0,R.Z)(Ft,4),Yt=_t[0],rn=_t[1],hn=_t[2],Wt=_t[3],on=!!(ye!==!1&&d&&L),xn=G.useMemo(function(){return Object.values(hn.maps).reduce(function(zn,kn){return zn+kn},0)},[hn.id,hn.maps]),Vt=on&&he&&(Math.max(L*he.length,xn)>d||!!ce),Mn=Ye==="rtl",qn=E()(g,(0,xe.Z)({},"".concat(g,"-rtl"),Mn),y),An=he||$t,pr=(0,G.useRef)(),er=(0,G.useRef)(),gr=(0,G.useRef)(),$r=(0,G.useState)(0),Rn=(0,R.Z)($r,2),pn=Rn[0],tr=Rn[1],Ke=(0,G.useState)(0),H=(0,R.Z)(Ke,2),ee=H[0],Q=H[1],J=(0,G.useState)(!1),Ee=(0,R.Z)(J,2),Ze=Ee[0],ft=Ee[1],tt=function(){ft(!0)},ut=function(){ft(!1)},It={getKey:Bt};function Pt(zn){tr(function(kn){var dr;typeof zn=="function"?dr=zn(kn):dr=zn;var mr=Kn(dr);return pr.current.scrollTop=mr,mr})}var At=(0,G.useRef)({start:0,end:An.length}),Ge=(0,G.useRef)(),St=Ce(An,Bt),Qt=(0,R.Z)(St,1),Kt=Qt[0];Ge.current=Kt;var tn=G.useMemo(function(){if(!on)return{scrollHeight:void 0,start:0,end:An.length-1,offset:void 0};if(!Vt){var zn;return{scrollHeight:((zn=er.current)===null||zn===void 0?void 0:zn.offsetHeight)||0,start:0,end:An.length-1,offset:void 0}}for(var kn=0,dr,mr,Jr,sa=An.length,Ii=0;Ii<sa;Ii+=1){var zr=An[Ii],yi=Bt(zr),pi=hn.get(yi),ii=kn+(pi===void 0?L:pi);ii>=pn&&dr===void 0&&(dr=Ii,mr=kn),ii>pn+d&&Jr===void 0&&(Jr=Ii),kn=ii}return dr===void 0&&(dr=0,mr=0,Jr=Math.ceil(d/L)),Jr===void 0&&(Jr=An.length-1),Jr=Math.min(Jr+1,An.length-1),{scrollHeight:kn,start:dr,end:Jr,offset:mr}},[Vt,on,pn,An,Wt,d]),Ut=tn.scrollHeight,Sn=tn.start,Nt=tn.end,mn=tn.offset;At.current.start=Sn,At.current.end=Nt,G.useLayoutEffect(function(){var zn=hn.getRecord();if(zn.size===1){var kn=Array.from(zn.keys())[0],dr=zn.get(kn),mr=An[Sn];if(mr&&dr===void 0){var Jr=Bt(mr);if(Jr===kn){var sa=hn.get(kn),Ii=sa-L;Pt(function(zr){return zr+Ii})}}}hn.resetRecord()},[Ut]);var ot=G.useState({width:0,height:d}),st=(0,R.Z)(ot,2),ht=st[0],Mt=st[1],gt=function(kn){Mt({width:kn.offsetWidth,height:kn.offsetHeight})},bt=(0,G.useRef)(),xt=(0,G.useRef)(),Rt=G.useMemo(function(){return Oe(ht.width,ce)},[ht.width,ce]),Gt=G.useMemo(function(){return Oe(ht.height,Ut)},[ht.height,Ut]),an=Ut-d,Pn=(0,G.useRef)(an);Pn.current=an;function Kn(zn){var kn=zn;return Number.isNaN(Pn.current)||(kn=Math.min(kn,Pn.current)),kn=Math.max(kn,0),kn}var Qn=pn<=0,$n=pn>=an,Cn=ee<=0,rr=ee>=ce,jn=ie(Qn,$n,Cn,rr),Vn=function(){return{x:Mn?-ee:ee,y:pn}},wn=(0,G.useRef)(Vn()),On=(0,V.useEvent)(function(zn){if(T){var kn=(0,A.Z)((0,A.Z)({},Vn()),zn);(wn.current.x!==kn.x||wn.current.y!==kn.y)&&(T(kn),wn.current=kn)}});function Un(zn,kn){var dr=zn;kn?((0,le.flushSync)(function(){Q(dr)}),On()):Pt(dr)}function Nn(zn){var kn=zn.currentTarget.scrollTop;kn!==pn&&Pt(kn),oe==null||oe(zn),On()}var vr=function(kn){var dr=kn,mr=ce?ce-ht.width:0;return dr=Math.max(dr,0),dr=Math.min(dr,mr),dr},Zr=(0,V.useEvent)(function(zn,kn){kn?((0,le.flushSync)(function(){Q(function(dr){var mr=dr+(Mn?-zn:zn);return vr(mr)})}),On()):Pt(function(dr){var mr=dr+zn;return mr})}),Gn=ae(on,Qn,$n,Cn,rr,!!ce,Zr),nn=(0,R.Z)(Gn,2),Ht=nn[0],Zn=nn[1];Te(on,pr,function(zn,kn,dr,mr){var Jr=mr;return jn(zn,kn,dr)?!1:!Jr||!Jr._virtualHandled?(Jr&&(Jr._virtualHandled=!0),Ht({preventDefault:function(){},deltaX:zn?kn:0,deltaY:zn?0:kn}),!0):!1}),X(Vt,pr,function(zn){Pt(function(kn){return kn+zn})}),(0,Ie.Z)(function(){function zn(dr){var mr=Qn&&dr.detail<0,Jr=$n&&dr.detail>0;on&&!mr&&!Jr&&dr.preventDefault()}var kn=pr.current;return kn.addEventListener("wheel",Ht,{passive:!1}),kn.addEventListener("DOMMouseScroll",Zn,{passive:!0}),kn.addEventListener("MozMousePixelScroll",zn,{passive:!1}),function(){kn.removeEventListener("wheel",Ht),kn.removeEventListener("DOMMouseScroll",Zn),kn.removeEventListener("MozMousePixelScroll",zn)}},[on,Qn,$n]),(0,Ie.Z)(function(){if(ce){var zn=vr(ee);Q(zn),On({x:zn})}},[ht.width,ce]);var In=function(){var kn,dr;(kn=bt.current)===null||kn===void 0||kn.delayHidden(),(dr=xt.current)===null||dr===void 0||dr.delayHidden()},ir=ve(pr,An,hn,L,Bt,function(){return rn(!0)},Pt,In);G.useImperativeHandle(p,function(){return{nativeElement:gr.current,getScrollInfo:Vn,scrollTo:function(kn){function dr(mr){return mr&&(0,j.Z)(mr)==="object"&&("left"in mr||"top"in mr)}dr(kn)?(kn.left!==void 0&&Q(vr(kn.left)),ir(kn.top)):ir(kn)}}}),(0,Ie.Z)(function(){if(re){var zn=An.slice(Sn,Nt+1);re(zn,An)}},[Sn,Nt,An]);var xr=Se(An,Bt,hn,L),ar=Ne==null?void 0:Ne({start:Sn,end:Nt,virtual:Vt,offsetX:ee,offsetY:mn,rtl:Mn,getSize:xr}),Wr=_e(An,Sn,Nt,ce,ee,Yt,Y,It),Pr=null;d&&(Pr=(0,A.Z)((0,xe.Z)({},O?"height":"maxHeight",d),vt),on&&(Pr.overflowY="hidden",ce&&(Pr.overflowX="hidden"),Ze&&(Pr.pointerEvents="none")));var hi={};return Mn&&(hi.dir="rtl"),G.createElement("div",(0,K.Z)({ref:gr,style:(0,A.Z)((0,A.Z)({},I),{},{position:"relative"}),className:qn},hi,yt),G.createElement(F.Z,{onResize:gt},G.createElement(qe,{className:"".concat(g,"-holder"),style:Pr,ref:pr,onScroll:Nn,onMouseEnter:In},G.createElement(ue,{prefixCls:g,height:Ut,offsetX:ee,offsetY:mn,scrollWidth:ce,onInnerResize:rn,ref:er,innerProps:$e,rtl:Mn,extra:ar},Wr))),Vt&&Ut>d&&G.createElement(je,{ref:bt,prefixCls:g,scrollOffset:pn,scrollRange:Ut,rtl:Mn,onScroll:Un,onStartMove:tt,onStopMove:ut,spinSize:Gt,containerSize:ht.height,style:Xe==null?void 0:Xe.verticalScrollBar,thumbStyle:Xe==null?void 0:Xe.verticalScrollBarThumb,showScrollBar:mt}),Vt&&ce>ht.width&&G.createElement(je,{ref:xt,prefixCls:g,scrollOffset:ee,scrollRange:ce,rtl:Mn,onScroll:Un,onStartMove:tt,onStopMove:ut,spinSize:Rt,containerSize:ht.width,horizontal:!0,style:Xe==null?void 0:Xe.horizontalScrollBar,thumbStyle:Xe==null?void 0:Xe.horizontalScrollBarThumb,showScrollBar:mt}))}var wt=G.forwardRef(Tt);wt.displayName="List";var pt=wt,at=pt},48136:function(yn,dt,m){"use strict";var K=Object.defineProperty,j=Object.defineProperties,A=Object.getOwnPropertyDescriptors,xe=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,x=(e,t,n)=>t in e?K(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E=(e,t)=>{for(var n in t||(t={}))R.call(t,n)&&x(e,n,t[n]);if(xe)for(var n of xe(t))N.call(t,n)&&x(e,n,t[n]);return e},F=(e,t)=>j(e,A(t)),V=e=>typeof e=="symbol"?e:e+"",Ie=(e,t)=>{var n={};for(var i in e)R.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&xe)for(var i of xe(e))t.indexOf(i)<0&&N.call(e,i)&&(n[i]=e[i]);return n};function G(e){return Array.isArray(e)}var le={en:{"keyboard.tooltip.symbols":"\u7B26\u53F7","keyboard.tooltip.greek":"\u5E0C\u814A\u5B57\u6BCD","keyboard.tooltip.numeric":"\u6570\u5B57","keyboard.tooltip.alphabetic":"\u7F57\u9A6C\u5B57\u6BCD","tooltip.cut to clipboard":"\u526A\u5207\u5230\u526A\u8D34\u677F","tooltip.copy to clipboard":"\u590D\u5236\u5230\u526A\u8D34\u677F","tooltip.paste from clipboard":"\u7C98\u8D34","tooltip.redo":"\u91CD\u505A","tooltip.toggle virtual keyboard":"\u5207\u6362\u865A\u62DF\u952E\u76D8","tooltip.undo":"\u64A4\u6D88","menu.insert matrix":"\u63D2\u5165\u77E9\u9635","menu.borders":"\u77E9\u9635\u5206\u9694\u7B26","menu.array.add row above":"\u5728\u540E\u9762\u6DFB\u52A0\u884C","menu.array.add row below":"\u5728\u524D\u9762\u6DFB\u52A0\u884C","menu.array.add column after":"\u5728\u540E\u9762\u6DFB\u52A0\u5217r","menu.array.add column before":"\u5728\u524D\u9762\u6DFB\u52A0\u5217","menu.array.delete row":"\u5220\u9664\u884C","menu.array.delete rows":"\u5220\u9664\u9009\u5B9A\u884C","menu.array.delete column":"\u5220\u9664\u5217","menu.array.delete columns":"\u5220\u9664\u9009\u5B9A\u7684\u5217","menu.mode":"\u6A21\u5F0F","menu.mode-math":"\u6570\u5B66","menu.mode-text":"\u6587\u672C","menu.mode-latex":"LaTeX","tooltip.blackboard":"\u9ED1\u677F","tooltip.bold":"\u7C97\u4F53","tooltip.italic":"\u659C\u4F53","tooltip.fraktur":"Fraktur","tooltip.script":"\u811A\u672C","tooltip.caligraphic":"\u8349\u4E66","tooltip.typewriter":"\u6253\u5B57\u673A","tooltip.roman-upright":"\u7F57\u9A6C\u76F4\u7ACB","tooltip.row-by-col":"%@ \xD7 %@","menu.font-style":"\u5B57\u4F53\u6837\u5F0F","menu.accent":"\u91CD\u97F3","menu.decoration":"\u88C5\u9970","menu.color":"\u989C\u8272","menu.background-color":"\u80CC\u666F","menu.evaluate":"\u8BA1\u7B97","menu.simplify":"\u7B80\u5316","menu.solve":"\u6C42\u89E3","menu.solve-for":"\u6C42\u89E3 %@","menu.cut":"\u526A\u5207","menu.copy":"\u590D\u5236","menu.copy-as-latex":"\u590D\u5236\u4E3A LaTeX","menu.copy-as-ascii-math":"\u590D\u5236\u4E3A ASCII Math","menu.copy-as-mathml":"\u590D\u5236\u4E3A MathML","menu.paste":"\u7C98\u8D34","menu.select-all":"\u5168\u9009","color.red":"\u7EA2\u8272","color.orange":"\u6A59\u8272","color.yellow":"\u9EC4\u8272","color.lime":"\u7EFF\u9EC4\u8272","color.green":"\u7EFF\u8272","color.teal":"\u9752\u8272","color.cyan":"\u84DD\u7EFF\u8272","color.blue":"\u84DD\u8272","color.indigo":"\u975B\u84DD\u8272","color.purple":"\u7D2B\u8272","color.magenta":"\u6D0B\u7EA2\u8272","color.black":"\u9ED1\u8272","color.dark-grey":"\u6DF1\u7070\u8272","color.grey":"\u7070\u8272","color.light-grey":"\u6D45\u7070\u8272","color.white":"\u767D\u8272"}};function ke(){return"window"in globalThis&&"document"in globalThis}function ue(){return"matchMedia"in window?window.matchMedia("(pointer: coarse)").matches:"ontouchstart"in window||navigator.maxTouchPoints>0}function de(){return typeof navigator.vibrate=="function"}function _e(){var e,t;if(!ke())return"other";const n=(t=(e=navigator.userAgentData)==null?void 0:e.platform)!=null?t:navigator.platform;return/^mac/i.test(n)?navigator.maxTouchPoints===5?"ios":"macos":/^win/i.test(n)?"windows":/android/i.test(navigator.userAgent)?"android":/iphone|ipod|ipad/i.test(navigator.userAgent)?"ios":/\bcros\b/i.test(navigator.userAgent)?"chromeos":"other"}function Pe(){if(!ke())return!0;if(/firefox/i.test(navigator.userAgent)){const e=navigator.userAgent.match(/firefox\/(\d+)/i);return e?parseInt(e[1])>=78:!1}if(/trident/i.test(navigator.userAgent))return!1;if(/edge/i.test(navigator.userAgent)){const e=navigator.userAgent.match(/edg\/(\d+)/i);return e?parseInt(e[1])>=79:!1}return!0}function Ue(){return HTMLElement.prototype.hasOwnProperty("popover")}var Ce={strings:le,_locale:"",_dirty:!1,_subscribers:[],_numberFormatter:void 0,get locale(){return Ce._locale||(Ce._locale=ke()?navigator.language.slice(0,5):"en-US"),Ce._locale},set locale(e){Ce._locale=e,Ce._numberFormatter=void 0,Ce.dirty=!0},get numberFormatter(){return Ce._numberFormatter||(Ce._numberFormatter=new Intl.NumberFormat(Ce.locale)),Ce._numberFormatter},merge(e,t){if(typeof e=="string"&&t)Ce.strings[e]=E(E({},Ce.strings[e]),t),Ce.dirty=!0;else for(const n of Object.keys(e))Ce.merge(n,e[n])},get dirty(){return Ce._dirty},set dirty(e){Ce._dirty||Ce._dirty===e||(Ce._dirty=!0,setTimeout(()=>{Ce._dirty=!1,this._subscribers.forEach(t=>t==null?void 0:t())},0))},subscribe(e){return Ce._subscribers.push(e),Ce._subscribers.length-1},unsubscribe(e){e<0||e>=Ce._subscribers.length||(Ce._subscribers[e]=void 0)},update(e){let t=e.querySelectorAll("[data-l10n-tooltip]");for(const n of t){const i=n.getAttribute("data-l10n-tooltip");if(i){const o=pe(i);o&&n.setAttribute("data-tooltip",o)}}t=e.querySelectorAll("[data-l10n-arial-label]");for(const n of t){const i=n.getAttribute("data-l10n-arial-label");if(i){const o=pe(i);o&&n.setAttribute("aria-label",o)}}}};function pe(e,...t){if(e===void 0)return;let n="";const i=Ce.locale;Ce.strings[i]&&(n=Ce.strings[i][e]);const o=i.slice(0,2);if(!n&&Ce.strings[o]&&(n=Ce.strings[o][e]),n||(n=Ce.strings.en[e]),!n)return;const c=/(%@|%([0-9]+)\$@)/g;let f=c.exec(n),b=0;for(;f;){if(t[b++]){const k=f[2]?parseInt(f[2],10)-1:b-1;let $=t[k];typeof $=="number"&&($=Ce.numberFormatter.format($)),n=n.replace(f[1],$)}f=c.exec(n)}return n=n.replace(/%%/g,"%"),n}var q={m0:"#3F3D99",m1:"#993D71",m2:"#998B3D",m3:"#3D9956",m4:"#3D5A99",m5:"#993D90",m6:"#996D3D",m7:"#43993D",m8:"#3D7999",m9:"#843D99"},_={blue:"#0072BD",orange:"#D95319",yellow:"#EDB120",purple:"#7E2F8E",green:"#77AC30",cyan:"#4DBEEE",red:"#A2142F"},ie={red:"#fbbbb6",orange:"#ffe0c2",yellow:"#fff1c2",lime:"#d0e8b9",green:"#bceac4",teal:"#b9f1f1",cyan:"#b8e5c9",blue:"#b6d9fb",indigo:"#d1c2f0",purple:"#e3baf8",magenta:"#f9c8e0",black:"#353535","dark-grey":"#8C8C8C",grey:"#D0D0D0","light-grey":"#F0F0F0",white:"#ffffff"},ae={red:"#d7170b",orange:"#fe8a2b",yellow:"#ffc02b",lime:"#63b215",green:"#21ba3a",teal:"#17cfcf",cyan:"#13a7ec",blue:"#0d80f2",indigo:"#63c",purple:"#a219e6",magenta:"#eb4799",black:"#000","dark-grey":"#666",grey:"#A6A6A6","light-grey":"#d4d5d2",white:"#ffffff"},Se={Red:"red",Orange:"orange",Yellow:"yellow",LimeGreen:"lime",Green:"green",TealBlue:"teal",Blue:"blue",Violet:"indigo",Purple:"purple",Magenta:"magenta",Black:"black",Gray:"grey",White:"white"},se={Apricot:"#FBB982",Aquamarine:"#00B5BE",Bittersweet:"#C04F17",Black:"#221E1F",Blue:"#2D2F92",BlueGreen:"#00B3B8",BlueViolet:"#473992",BrickRed:"#B6321C",Brown:"#792500",BurntOrange:"#F7921D",CadetBlue:"#74729A",CarnationPink:"#F282B4",Cerulean:"#00A2E3",CornflowerBlue:"#41B0E4",Cyan:"#00AEEF",Dandelion:"#FDBC42",DarkOrchid:"#A4538A",Emerald:"#00A99D",ForestGreen:"#009B55",Fuchsia:"#8C368C",Goldenrod:"#FFDF42",Gray:"#949698",Green:"#00A64F",GreenYellow:"#DFE674",JungleGreen:"#00A99A",Lavender:"#F49EC4",Limegreen:"#8DC73E",Magenta:"#EC008C",Mahogany:"#A9341F",Maroon:"#AF3235",Melon:"#F89E7B",MidnightBlue:"#006795",Mulberry:"#A93C93",NavyBlue:"#006EB8",OliveGreen:"#3C8031",Orange:"#F58137",OrangeRed:"#ED135A",Orchid:"#AF72B0",Peach:"#F7965A",Periwinkle:"#7977B8",PineGreen:"#008B72",Plum:"#92268F",ProcessBlue:"#00B0F0",Purple:"#99479B",RawSienna:"#974006",Red:"#ED1B23",RedOrange:"#F26035",RedViolet:"#A1246B",Rhodamine:"#EF559F",RoyalBlue:"#0071BC",RoyalPurple:"#613F99",RubineRed:"#ED017D",Salmon:"#F69289",SeaGreen:"#3FBC9D",Sepia:"#671800",SkyBlue:"#46C5DD",SpringGreen:"#C6DC67",Tan:"#DA9D76",TealBlue:"#00AEB3",Thistle:"#D883B7",Turquoise:"#00B4CE",Violet:"#58429B",VioletRed:"#EF58A0",White:"#FFFFFF",WildStrawberry:"#EE2967",Yellow:"#FFF200",YellowGreen:"#98CC70",YellowOrange:"#FAA21A"};function be(e){var t,n,i,o,c,f;const b=e.split("!");let C,k,$,ne=255,Me=255,We=255,Je=-1;const Ot=b.length>0&&b[0].startsWith("-");Ot&&(b[0]=b[0].slice(1));for(let bn=0;bn<b.length;bn++){C=ne,k=Me,$=We;const Dt=(t=b[bn].trim().match(/^([A-Za-z\d-]+)/))==null?void 0:t[1],en=Dt==null?void 0:Dt.toLowerCase(),Ln=Dt&&(f=(c=(o=(i=(n=ae[en])!=null?n:ae[Se[Dt]])!=null?i:_[Dt])!=null?o:se[Dt])!=null?c:q[Dt])!=null?f:b[bn].trim();let sn=Ln.match(/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i);if(sn!=null&&sn[1]&&sn[2]&&sn[3])ne=Math.max(0,Math.min(255,Number.parseInt(sn[1],16))),Me=Math.max(0,Math.min(255,Number.parseInt(sn[2],16))),We=Math.max(0,Math.min(255,Number.parseInt(sn[3],16)));else if(sn=Ln.match(/^#([\da-f]{3})$/i),sn!=null&&sn[1]){const hr=Number.parseInt(sn[1][0],16),Lr=Number.parseInt(sn[1][1],16),Mr=Number.parseInt(sn[1][2],16);ne=Math.max(0,Math.min(255,hr*16+hr)),Me=Math.max(0,Math.min(255,Lr*16+Lr)),We=Math.max(0,Math.min(255,Mr*16+Mr))}else if(sn=Ln.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i),sn!=null&&sn[1]&&sn[2]&&sn[3])ne=Math.max(0,Math.min(255,Number.parseInt(sn[1]))),Me=Math.max(0,Math.min(255,Number.parseInt(sn[2]))),We=Math.max(0,Math.min(255,Number.parseInt(sn[3])));else return;Je>=0&&(ne=(1-Je)*ne+Je*C,Me=(1-Je)*Me+Je*k,We=(1-Je)*We+Je*$,Je=-1),bn+1<b.length&&(Je=Math.max(0,Math.min(100,Number.parseInt(b[++bn])))/100)}return Je>=0&&(ne=Je*ne+(1-Je)*C,Me=Je*Me+(1-Je)*k,We=Je*We+(1-Je)*$),Ot&&(ne=255-ne,Me=255-Me,We=255-We),"#"+("00"+Math.round(ne).toString(16)).slice(-2)+("00"+Math.round(Me).toString(16)).slice(-2)+("00"+Math.round(We).toString(16)).slice(-2)}function D(e){var t,n;return e=e.trim(),(n=(t=ie[e.toLowerCase()])!=null?t:ie[Se[e]])!=null?n:be(e)}function Le(e){if(!e||e[0]!=="#")return;e=e.slice(1);let t;return e.length<=4?(t={r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16)},e.length===4&&(t.a=parseInt(e[3]+e[3],16)/255)):(t={r:parseInt(e[0]+e[1],16),g:parseInt(e[2]+e[3],16),b:parseInt(e[4]+e[5],16)},e.length===8&&(t.a=parseInt(e[6]+e[7],16)/255)),t&&t.a===void 0&&(t.a=1),t}function z(e,t,n){return n<0&&(n+=6),n>=6&&(n-=6),n<1?(t-e)*n+e:n<3?t:n<4?(t-e)*(4-n)+e:e}function we(e){let[t,n,i]=[e.h,e.s,e.l];t=(t+360)%360/60,i=Math.max(0,Math.min(i,1)),n=Math.max(0,Math.min(n,1));const o=i<=.5?i*(n+1):i+n-i*n,c=i*2-o;return{r:Math.round(255*z(c,o,t+2)),g:Math.round(255*z(c,o,t)),b:Math.round(255*z(c,o,t-2))}}function ge(e){return e<0?0:e>255?255:Math.round(e)}function Te(e){const{r:t,g:n,b:i}=e;let o=((1<<24)+(ge(t)<<16)+(ge(n)<<8)+ge(i)).toString(16).slice(1);return o[0]===o[1]&&o[2]===o[3]&&o[4]===o[5]&&o[6]===o[7]&&(o=o[0]+o[2]+o[4]),"#"+o}function Fe(e){let{r:t,g:n,b:i}=e;t=t/255,n=n/255,i=i/255;const o=Math.min(t,n,i),c=Math.max(t,n,i),f=c-o;let b,C;c===o?b=0:t===c?b=(n-i)/f:n===c?b=2+(i-t)/f:i===c&&(b=4+(t-n)/f),b=Math.min(b*60,360),b<0&&(b+=360);const k=(o+c)/2;return c===o?C=0:k<=.5?C=f/(c+o):C=f/(2-c-o),{h:b,s:C,l:k}}function Re(e){let t=Le(e);if(!t)return e;let{h:n,s:i,l:o}=Fe(t);return i+=.1,o-=.1,Te(we({h:n,s:i,l:o}))}var X={60:"\\lt",62:"\\gt",111:"o",38:"\\&",123:"\\lbrace",125:"\\rbrace",91:"\\lbrack",93:"\\rbrack",58:"\\colon",160:"~",172:"\\neg",183:"\\cdot",188:"\\frac{1}{4}",189:"\\frac{1}{2}",190:"\\frac{3}{4}",8304:"^{0}",8305:"^{i}",185:"^{1}",178:"^{2}",179:"^{3}",8224:"\\dagger",8225:"\\ddagger",8230:"\\ldots",8308:"^{4}",8309:"^{5}",8310:"^{6}",8311:"^{7}",8312:"^{8}",8313:"^{9}",8314:"^{+}",8315:"^{-}",8316:"^{=}",8319:"^{n}",8320:"_{0}",8321:"_{1}",8322:"_{2}",8323:"_{3}",8324:"_{4}",8325:"_{5}",8326:"_{6}",8327:"_{7}",8328:"_{8}",8329:"_{9}",8330:"_{+}",8331:"_{-}",8332:"_{=}",8336:"_{a}",8337:"_{e}",8338:"_{o}",8339:"_{x}",8242:"\\prime",39:"\\prime",8592:"\\gets",8594:"\\to",9651:"\\triangle",9661:"\\triangledown",8715:"\\owns",8727:"\\ast",8739:"\\vert",8741:"\\Vert",8743:"\\land",8744:"\\lor",8901:"\\cdot",8904:"\\bowtie",8800:"\\ne",8804:"\\le",8805:"\\ge",8869:"\\bot",10231:"\\biconditional",10232:"\\impliedby",10233:"\\implies",10234:"\\iff",8450:"\\mathbb{C}",8469:"\\mathbb{N}",8473:"\\mathbb{P}",8474:"\\mathbb{Q}",8477:"\\mathbb{R}",8484:"\\mathbb{Z}",8461:"\\mathbb{H}",8476:"\\Re",8465:"\\Im",42:"\\ast",11036:"\\square",9633:"\\square",8720:"\\coprod",8716:"\\not\\ni",9671:"\\diamond",8846:"\\uplus",8851:"\\sqcap",8852:"\\sqcup",8768:"\\wr",8750:"\\oint",8226:"\\textbullet",8722:"-",978:"\\Upsilon"},w={119893:8462,119965:8492,119968:8496,119969:8497,119971:8459,119972:8464,119975:8466,119976:8499,119981:8475,119994:8495,119996:8458,120004:8500,120070:8493,120075:8460,120076:8465,120085:8476,120093:8488,120122:8450,120127:8461,120133:8469,120135:8473,120136:8474,120137:8477,120145:8484},ve=[{start:119808,len:26,offset:65,style:"bold"},{start:119834,len:26,offset:97,style:"bold"},{start:119860,len:26,offset:65,style:"italic"},{start:119886,len:26,offset:97,style:"italic"},{start:119912,len:26,offset:65,style:"bolditalic"},{start:119938,len:26,offset:97,style:"bolditalic"},{start:119964,len:26,offset:65,variant:"script"},{start:119990,len:26,offset:97,variant:"script"},{start:120016,len:26,offset:65,variant:"script",style:"bold"},{start:120042,len:26,offset:97,variant:"script",style:"bold"},{start:120068,len:26,offset:65,variant:"fraktur"},{start:120094,len:26,offset:97,variant:"fraktur"},{start:120172,len:26,offset:65,variant:"fraktur",style:"bold"},{start:120198,len:26,offset:97,variant:"fraktur",style:"bold"},{start:120120,len:26,offset:65,variant:"double-struck"},{start:120146,len:26,offset:97,variant:"double-struck"},{start:120224,len:26,offset:65,variant:"sans-serif"},{start:120250,len:26,offset:97,variant:"sans-serif"},{start:120276,len:26,offset:65,variant:"sans-serif",style:"bold"},{start:120302,len:26,offset:97,variant:"sans-serif",style:"bold"},{start:120328,len:26,offset:65,variant:"sans-serif",style:"italic"},{start:120354,len:26,offset:97,variant:"sans-serif",style:"italic"},{start:120380,len:26,offset:65,variant:"sans-serif",style:"bolditalic"},{start:120406,len:26,offset:97,variant:"sans-serif",style:"bolditalic"},{start:120432,len:26,offset:65,variant:"monospace"},{start:120458,len:26,offset:97,variant:"monospace"},{start:120488,len:25,offset:913,style:"bold"},{start:120514,len:25,offset:945,style:"bold"},{start:120546,len:25,offset:913,style:"italic"},{start:120572,len:25,offset:945,style:"italic"},{start:120604,len:25,offset:913,style:"bolditalic"},{start:120630,len:25,offset:945,style:"bolditalic"},{start:120662,len:25,offset:913,variant:"sans-serif",style:"bold"},{start:120688,len:25,offset:945,variant:"sans-serif",style:"bold"},{start:120720,len:25,offset:913,variant:"sans-serif",style:"bolditalic"},{start:120746,len:25,offset:945,variant:"sans-serif",style:"bolditalic"},{start:120782,len:10,offset:48,variant:"main",style:"bold"},{start:120792,len:10,offset:48,variant:"double-struck"},{start:120803,len:10,offset:48,variant:"sans-serif"},{start:120812,len:10,offset:48,variant:"sans-serif",style:"bold"},{start:120822,len:10,offset:48,variant:"monospace"}];function Qe(e,t,n){if(!/[A-Za-z\d]/.test(e)||(n==="up"&&(n=void 0),!t&&!n))return e;const i=e.codePointAt(0);if(i===void 0)return e;for(const o of ve)if((!t||o.variant===t)&&(!n||o.style===n)&&i>=o.offset&&i<o.offset+o.len){const c=o.start+i-o.offset;return String.fromCodePoint(w[c]||c)}return e}function je(e){var t;if((e<119808||e>120831)&&(e<8448||e>8527))return{char:String.fromCodePoint(e)};for(const n in w)if(w[n]===e){e=(t=n.codePointAt(0))!=null?t:0;break}for(const n of ve)if(e>=n.start&&e<n.start+n.len)return{char:String.fromCodePoint(e-n.start+n.offset),variant:n.variant,style:n.style};return{char:String.fromCodePoint(e)}}function Be(e){var t;let n="";for(const i of e){if("{}<>[]$&#^_%:'\u02DC".includes(i)){n+=i;continue}const o=(t=i.codePointAt(0))!=null?t:0;let c=X[o];if(c)c.startsWith("\\")?n+=c+" ":n+=c;else{const{char:f,variant:b,style:C}=je(o);switch(c=f,b){case"double-struck":c=`\\mathbb{${c}}`;break;case"fraktur":c=`\\mathfrak{${c}}`;break;case"script":c=`\\mathscr{${c}}`;break;case"sans-serif":c=`\\mathsf{${c}}`;break;case"monospace":c=`\\mathtt{${c}}`;break;case"calligraphic":c=`\\mathcal{${c}}`;break}switch(C){case"bold":c=`\\mathbf{${c}}`;break;case"italic":c=`\\mathit{${c}}`;break;case"bolditalic":c=`\\mathbfit{${c}}`;break}n+=c}}return n}function Oe(e){return e?Array.isArray(e)?e:typeof e=="object"&&"group"in e?e.group:[]:[]}var lt={},$t=E({},X),vt={},Tt={},wt={darr:"\\downarrow",dArr:"\\Downarrow",Darr:"\\Downarrow",lang:"\\langle",rang:"\\rangle",uarr:"\\uparrow",uArr:"\\Uparrow",Uarr:"\\Uparrow",N:"\\mathbb{N}",R:"\\mathbb{R}",Z:"\\mathbb{Z}",alef:"\\aleph",alefsym:"\\aleph",Alpha:"\\mathrm{A}",Beta:"\\mathrm{B}",bull:"\\bullet",Chi:"\\mathrm{X}",clubs:"\\clubsuit",cnums:"\\mathbb{C}",Complex:"\\mathbb{C}",Dagger:"\\ddagger",diamonds:"\\diamondsuit",empty:"\\emptyset",Epsilon:"\\mathrm{E}",Eta:"\\mathrm{H}",exist:"\\exists",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",Harr:"\\Leftrightarrow",hearts:"\\heartsuit",image:"\\Im",infin:"\\infty",Iota:"\\mathrm{I}",isin:"\\in",Kappa:"\\mathrm{K}",larr:"\\leftarrow",lArr:"\\Leftarrow",Larr:"\\Leftarrow",lrarr:"\\leftrightarrow",lrArr:"\\Leftrightarrow",Lrarr:"\\Leftrightarrow",Mu:"\\mathrm{M}",natnums:"\\mathbb{N}",Nu:"\\mathrm{N}",Omicron:"\\mathrm{O}",plusmn:"\\pm",rarr:"\\rightarrow",rArr:"\\Rightarrow",Rarr:"\\Rightarrow",real:"\\Re",reals:"\\mathbb{R}",Reals:"\\mathbb{R}",Rho:"\\mathrm{P}",sdot:"\\cdot",sect:"\\S",spades:"\\spadesuit",sub:"\\subset",sube:"\\subseteq",supe:"\\supseteq",Tau:"\\mathrm{T}",thetasym:"\\vartheta",weierp:"\\wp",Zeta:"\\mathrm{Z}"},pt={varGamma:"\\mathit{\\Gamma}",varDelta:"\\mathit{\\Delta}",varTheta:"\\mathit{\\Theta}",varLambda:"\\mathit{\\Lambda}",varXi:"\\mathit{\\Xi}",varPi:"\\mathit{\\Pi}",varSigma:"\\mathit{\\Sigma}",varUpsilon:"\\mathit{\\Upsilon}",varPhi:"\\mathit{\\Phi}",varPsi:"\\mathit{\\Psi}",varOmega:"\\mathit{\\Omega}",pmod:{def:"\\quad(\\operatorname{mod}\\ #1)",args:1,expand:!1,captureSelection:!1},mod:{def:"\\quad\\operatorname{mod}\\,\\,#1",args:1,expand:!1},bmod:{def:"\\;\\mathbin{\\operatorname{mod }}",expand:!1}},at={bra:{def:"\\mathinner{\\langle{#1}|}",args:1,captureSelection:!1},ket:{def:"\\mathinner{|{#1}\\rangle}",args:1,captureSelection:!1},braket:{def:"\\mathinner{\\langle{#1}\\rangle}",args:1,captureSelection:!1},set:{def:"\\mathinner{\\lbrace #1 \\rbrace}",args:1,captureSelection:!1},Bra:{def:"\\left\\langle #1\\right|",args:1,captureSelection:!1},Ket:{def:"\\left|#1\\right\\rangle",args:1,captureSelection:!1},Braket:{def:"\\left\\langle{#1}\\right\\rangle",args:1,captureSelection:!1},Set:{def:"\\left\\lbrace #1 \\right\\rbrace",args:1,captureSelection:!1}},S={iff:{primitive:!0,captureSelection:!0,def:"\\;\u27FA\\;"},nicefrac:"^{#1}\\!\\!/\\!_{#2}",phase:{def:"\\enclose{phasorangle}{#1}",args:1,captureSelection:!1},rd:"\\mathrm{d}",rD:"\\mathrm{D}",doubleStruckCapitalN:"\\mathbb{N}",doubleStruckCapitalR:"\\mathbb{R}",doubleStruckCapitalQ:"\\mathbb{Q}",doubleStruckCapitalZ:"\\mathbb{Z}",doubleStruckCapitalP:"\\mathbb{P}",scriptCapitalE:"\\mathscr{E}",scriptCapitalH:"\\mathscr{H}",scriptCapitalL:"\\mathscr{L}",gothicCapitalC:"\\mathfrak{C}",gothicCapitalH:"\\mathfrak{H}",gothicCapitalI:"\\mathfrak{I}",gothicCapitalR:"\\mathfrak{R}",imaginaryI:"\\mathrm{i}",imaginaryJ:"\\mathrm{j}",exponentialE:"\\mathrm{e}",differentialD:"\\mathrm{d}",capitalDifferentialD:"\\mathrm{D}",mathstrut:{def:"\\vphantom{(}",primitive:!0},angl:"\\enclose{actuarial}{#1}",angln:"\\enclose{actuarial}{n}",anglr:"\\enclose{actuarial}{r}",anglk:"\\enclose{actuarial}{k}",mathtools:{primitive:!0,package:{ordinarycolon:":",vcentcolon:"\\mathrel{\\mathop\\ordinarycolon}",dblcolon:'{\\mathop{\\char"2237}}',coloneqq:'{\\mathop{\\char"2254}}',Coloneqq:'{\\mathop{\\char"2237\\char"3D}}',coloneq:'{\\mathop{\\char"3A\\char"2212}}',Coloneq:'{\\mathop{\\char"2237\\char"2212}}',eqqcolon:'{\\mathop{\\char"2255}}',Eqqcolon:'{\\mathop{\\char"3D\\char"2237}}',eqcolon:'{\\mathop{\\char"2239}}',Eqcolon:'{\\mathop{\\char"2212\\char"2237}}',colonapprox:'{\\mathop{\\char"003A\\char"2248}}',Colonapprox:'{\\mathop{\\char"2237\\char"2248}}',colonsim:'{\\mathop{\\char"3A\\char"223C}}',Colonsim:'{\\mathop{\\char"2237\\char"223C}}',colondash:"\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}",Colondash:"\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}",dashcolon:"\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Dashcolon:"\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}"}},ratio:"\\vcentcolon",coloncolon:"\\dblcolon",colonequals:"\\coloneq",coloncolonequals:"\\Coloneq",equalscolon:"\\eqcolon",equalscoloncolon:"\\Eqcolon",colonminus:"\\colondash",coloncolonminus:"\\Colondash",minuscolon:"\\dashcolon",minuscoloncolon:"\\Dashcolon",coloncolonapprox:"\\Colonapprox",coloncolonsim:"\\Colonsim",simcolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Simcolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",simcoloncolon:"\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}",approxcolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}",Approxcolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",approxcoloncolon:"\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}",notni:"\\mathrel{\\char`\u220C}",limsup:"\\operatorname*{lim\\,sup}",liminf:"\\operatorname*{lim\\,inf}",injlim:"\\operatorname*{inj\\,lim}",projlim:"\\operatorname*{proj\\,lim}",varlimsup:"\\operatorname*{\\overline{lim}}",varliminf:"\\operatorname*{\\underline{lim}}",varinjlim:"\\operatorname*{\\underrightarrow{lim}}",varprojlim:"\\operatorname*{\\underleftarrow{lim}}",argmin:"\\operatorname*{arg\\,min}",argmax:"\\operatorname*{arg\\,max}",plim:"\\mathop{\\operatorname{plim}}\\limits",tripledash:{def:"\\vphantom{-}\\raise{4mu}{\\mkern1.5mu\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2.25mu}\\rule{2mu}{1.5mu}\\mkern{2mu}}",expand:!0},"braket.sty":{package:at},"amsmath.sty":{package:pt,primitive:!0},"texvc.sty":{package:wt,primitive:!1}},p={" ":32,"\\!":33,"\\#":35,"\\$":36,"\\%":37,"\\&":38,"-":45,"\\textunderscore":95,"\\euro":8364,"\\maltese":10016,"\\{":123,"\\}":125,"\\textbraceleft":123,"\\textbraceright":125,"\\lbrace":123,"\\rbrace":125,"\\lbrack":91,"\\rbrack":93,"\\nobreakspace":160,"\\ldots":8230,"\\textellipsis":8230,"\\backslash":92,"`":8216,"'":8217,"``":8220,"''":8221,"\\degree":176,"\\textasciicircum":94,"\\textasciitilde":126,"\\textasteriskcentered":42,"\\textbackslash":92,"\\textbullet":8226,"\\textdollar":36,"\\textsterling":163,"\\textdagger":8224,"\\textdaggerdbl":8225,"\u2013":8211,"\u2014":8212,"\u2018":8216,"\u2019":8217,"\u201C":8220,"\u201D":8221,'"':8221,"\\ss":223,"\\ae":230,"\\oe":339,"\\AE":198,"\\OE":338,"\\O":216,"\\i":305,"\\j":567,"\\aa":229,"\\AA":197},h=/[\w!@*()-=+{}\[\]\\';:?/.,~<>`|$%#&^" ]/,g,y;Pe()?(g=new RegExp("\\p{Letter}","u"),y=new RegExp("[0-9\\p{Letter}]","u")):(g=/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/,y=/[\da-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓóŚśŹźŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒößÖẞìíòúÌÍÒÚáñÁÑ]/);function d(e,t,n="mord",i){t!==void 0&&(lt[e]={definitionType:"symbol",type:n,variant:i,codepoint:t},$t[t]||($t[t]=e))}function L(e,t,n){if(typeof e=="string"){for(let i=0;i<e.length;i++){const o=e.charAt(i);d(o,o.codePointAt(0))}return}for(const[i,o,c,f]of e)d(i,o,c!=null?c:t,f!=null?f:n)}function fe(e,t){for(let n=e;n<=t;n++)d(String.fromCodePoint(n),n)}function O(e){var t;return(t=Tt[e])!=null?t:null}function I(e,t){var n,i;if(t.length===0||t==="\\"||!t.startsWith("\\"))return[];const o=[];for(const f in vt)f.startsWith(t)&&!vt[f].infix&&o.push({match:f,frequency:(n=vt[f].frequency)!=null?n:0});for(const f in lt)f.startsWith(t)&&o.push({match:f,frequency:(i=lt[f].frequency)!=null?i:0});const c=t.substring(1);for(const f of Object.keys(e.options.macros))f.startsWith(c)&&o.push({match:"\\"+f,frequency:0});return o.sort((f,b)=>{var C,k;return f.frequency===b.frequency?f.match.length===b.match.length?f.match<b.match?-1:1:f.match.length-b.match.length:((C=b.frequency)!=null?C:0)-((k=f.frequency)!=null?k:0)}),o.map(f=>f.match)}function he(e){let t="auto";const n=e.match(/:([^=]+)/);return n&&(t=n[1].trim()),t}function Y(e){if(!e)return[];const t=[];let n=e.split("]");if(n[0].startsWith("[")){t.push({isOptional:!0,type:he(n[0].slice(1))});for(let i=1;i<=n.length;i++)t.push(...Y(n[i]))}else if(n=e.split("}"),n[0].startsWith("{")){t.push({isOptional:!1,type:he(n[0].slice(1))});for(let i=1;i<=n.length;i++)t.push(...Y(n[i]))}return t}function U(e){if(!e)return"";let t="",n=!0;for(const i of e)typeof i.value=="string"?t+=i.value:n=!1;return n?t:""}function ye(e,t){typeof e=="string"&&(e=[e]);const n={tabular:!1,params:[],createAtom:t};for(const i of e)Tt[i]=n}function Ye(e,t,n){typeof e=="string"&&(e=[e]);const o={tabular:!0,params:Y(t),createAtom:n};for(const c of e)Tt[c]=o}function ce(e,t,n){var i,o;n||(n={});const c={definitionType:"function",params:Y(t),ifMode:n.ifMode,isFunction:(i=n.isFunction)!=null?i:!1,applyMode:n.applyMode,infix:(o=n.infix)!=null?o:!1,parse:n.parse,createAtom:n.createAtom,applyStyle:n.applyStyle,serialize:n.serialize,render:n.render};if(typeof e=="string")vt["\\"+e]=c;else for(const f of e)vt["\\"+f]=c}var Ae;function qe(e){return Ae||(Ae=T(S)),e?T(E(E({},Ae),e)):Ae}function oe(e,t){var n,i,o,c;if(typeof e=="string"){let f=0;const b=e;return/(^|[^\\])#1/.test(b)&&(f=1),/(^|[^\\])#2/.test(b)&&(f=2),/(^|[^\\])#3/.test(b)&&(f=3),/(^|[^\\])#4/.test(b)&&(f=4),/(^|[^\\])#5/.test(b)&&(f=5),/(^|[^\\])#6/.test(b)&&(f=6),/(^|[^\\])#7/.test(b)&&(f=7),/(^|[^\\])#8/.test(b)&&(f=8),/(^|[^\\])#9/.test(b)&&(f=9),{expand:(n=t==null?void 0:t.expand)!=null?n:!0,captureSelection:(i=t==null?void 0:t.captureSelection)!=null?i:!0,args:f,def:b}}return E({expand:(o=t==null?void 0:t.expand)!=null?o:!0,captureSelection:(c=t==null?void 0:t.captureSelection)!=null?c:!0,args:0},e)}function T(e){if(!e)return{};const t={};for(const n of Object.keys(e)){const i=e[n];if(i==null)delete t[n];else if(typeof i=="object"&&"package"in i)for(const o of Object.keys(i.package))t[o]=oe(i.package[o],{expand:!i.primitive,captureSelection:i.captureSelection});else t[n]=oe(i)}return t}function re(e,t="math"){if(!e||e.length===0)return null;let n=null;if(e.startsWith("\\")){if(n=vt[e],n)return!n.ifMode||n.ifMode===t?n:null;t==="math"?n=lt[e]:p[e]&&(n={definitionType:"symbol",type:"mord",codepoint:p[e]})}else if(t==="math"){if(n=lt[e],!n&&e.length===1){const i=Ne("math",e.codePointAt(0));return i.startsWith("\\")?F(E({},re(i,"math")),{command:i}):null}}else p[e]?n={definitionType:"symbol",type:"mord",codepoint:p[e]}:t==="text"&&(n={definitionType:"symbol",type:"mord",codepoint:e.codePointAt(0)});return n!=null?n:null}function $e(e,t){if(!e.startsWith("\\"))return null;const n=e.slice(1);return t[n]}function Ne(e,t){if(t===void 0)return"";if(e==="math"&&$t[t])return $t[t];if(e==="text"){const n=Object.keys(p).find(i=>p[i]===t);return n||String.fromCodePoint(t)}return String.fromCodePoint(t)}var Xe=[0,.68889,0,0,.72222],ct=[0,.68889,0,0,.66667],mt=[0,.68889,0,0,.77778],yt=[0,.68889,0,0,.61111],Bt=[.16667,.68889,0,0,.77778],Ft=[0,.68889,0,0,.55556],_t=[0,0,0,0,.25],Yt=[0,.825,0,0,2.33334],rn=[0,.9,0,0,2.33334],hn=[0,.68889,0,0,.54028],Wt=[-.03598,.46402,0,0,.5],on=[-.13313,.36687,0,0,1],xn=[.01354,.52239,0,0,1],Vt=[.01354,.52239,0,0,1.11111],Mn=[0,.54986,0,0,1],qn=[0,.69224,0,0,.5],An=[0,.43056,0,0,1],pr=[.08198,.58198,0,0,.77778],er=[.19444,.69224,0,0,.41667],gr=[.1808,.675,0,0,1],$r=[.19444,.69224,0,0,.83334],Rn=[.13667,.63667,0,0,1],pn=[-.064,.437,0,0,1.334],tr=[.08167,.58167,0,0,.77778],Ke=[0,.69224,0,0,.72222],H=[0,.69224,0,0,.66667],ee=[-.13313,.36687,0,0,.77778],Q=[.06062,.54986,0,0,.77778],J=[0,.69224,0,0,.77778],Ee=[.25583,.75583,0,0,.77778],Ze=[.25142,.75726,0,0,.77778],ft=[.20576,.70576,0,0,.77778],tt=[.30274,.79383,0,0,.77778],ut=[.22958,.72958,0,0,.77778],It=[.1808,.675,0,0,.77778],Pt=[.13667,.63667,0,0,.77778],At=[.13597,.63597,0,0,.77778],Ge=[.03517,.54986,0,0,.77778],St=[0,.675,0,0,.77778],Qt=[.19444,.69224,0,0,.61111],Kt=[0,.54986,0,0,.76042],tn=[0,.54986,0,0,.66667],Ut=[.0391,.5391,0,0,.77778],Sn=[.03517,.54986,0,0,1.33334],Nt=[.38569,.88569,0,0,.77778],mn=[.23222,.74111,0,0,.77778],ot=[.19444,.69224,0,0,.77778],st=[0,.37788,0,0,.5],ht=[0,.54986,0,0,.72222],Mt=[0,.69224,0,0,.83334],gt=[.11111,.69224,0,0,.66667],bt=[.26167,.75726,0,0,.77778],xt=[.48256,.98256,0,0,.77778],Rt=[.28481,.79383,0,0,.77778],Gt=[.08167,.58167,0,0,.22222],an=[.08167,.58167,0,0,.38889],Pn=[0,.43056,.04028,0,.66667],Kn=[.41951,.91951,0,0,.77778],Qn=[.24982,.74947,0,0,.38865],$n=[.08319,.58283,0,0,.75623],Cn=[0,.10803,0,0,.27764],rr=[0,.47534,0,0,.50181],jn=[.18906,.47534,0,0,.50181],Vn=[0,.69141,0,0,.50181],wn=[.24982,.74947,0,0,.27764],On=[0,.69141,0,0,.21471],Un=[.25,.75,0,0,.44722],Nn=[0,.64444,0,0,.575],vr=[.08556,.58556,0,0,.89444],Zr=[0,.69444,0,0,.89444],Gn=[0,.68611,0,0,.9],nn=[0,.68611,0,0,.86944],Ht=[.25,.75,0,0,.575],Zn=[.25,.75,0,0,.31944],In=[0,.69444,0,0,.63889],ir=[0,.69444,0,0,.31944],xr=[0,.44444,0,0,.63889],ar=[0,.44444,0,0,.51111],Wr=[0,.69444,0,0,.575],Pr=[.13333,.63333,0,0,.89444],hi=[0,.44444,0,0,.31944],zn=[0,.69444,0,0,.86944],kn=[0,.68611,0,0,.69166],dr=[0,.68611,0,0,.83055],mr=[0,.68611,0,0,.89444],Jr=[0,.69444,0,0,.60278],sa=[.19444,.69444,0,0,.51111],Ii=[0,.69444,0,0,.83055],zr=[-.10889,.39111,0,0,1.14999],yi=[.19444,.69444,0,0,.575],pi=[.19444,.69444,0,0,1.14999],ii=[.19444,.69444,0,0,.70277],Gi=[.05556,.75,0,0,.575],mi=[0,.68611,0,0,.95833],Bi=[.08556,.58556,0,0,.76666],ba=[-.02639,.47361,0,0,.575],da=[0,.44444,0,0,.89444],ea=[0,.55556,0,0,.76666],ma=[-.10889,.39111,0,0,.89444],xa=[.00222,.50222,0,0,.89444],Fa=[.19667,.69667,0,0,.89444],Ka=[.08556,.58556,0,0,1.14999],Do=[0,.69444,0,0,.70277],Co=[-.02778,.47222,0,0,.575],ao=[.25,.75,0,0,.51111],la=[-.13889,.36111,0,0,1.14999],Fo=[.19444,.69444,0,0,1.02222],oo=[.12963,.69444,0,0,.89444],Da=[.19444,.69444,0,0,.44722],ta=[0,.64444,.13167,0,.59111],so=[.19444,.64444,.13167,0,.59111],cr=[0,.68611,.17208,0,.8961],Br=[.19444,.44444,.105,0,.53222],_r=[0,.44444,.085,0,.82666],sr=[0,.69444,.06709,0,.59111],Gr=[0,.69444,.12945,0,.35555],ai=[0,.69444,0,0,.94888],Fi=[0,.69444,.11472,0,.59111],Xi=[0,.68611,.10778,0,.88555],Ki=[0,.69444,.07939,0,.62055],Yi=[0,.69444,.12417,0,.30667],Qr=[0,.64444,.13556,0,.51111],qr=[.19444,.64444,.13556,0,.51111],Hi=[0,.68333,.16389,0,.74333],Zi=[.19444,.43056,.08847,0,.46],fa=[0,.43056,.07514,0,.71555],Wi=[0,.69444,.06646,0,.51111],bs=[0,.69444,0,0,.83129],$o=[0,.69444,.1225,0,.51111],Po=[0,.68333,.09403,0,.76666],lo=[0,.68333,.11111,0,.76666],Ps=[0,.69444,.06961,0,.51444],Oo=[0,.69444,0,0,.27778],$a=[.25,.75,0,0,.38889],ga=[0,.64444,0,0,.5],Uo=[0,.69444,0,0,.77778],es=[0,.68333,0,0,.75],ts=[0,.68333,0,0,.77778],Os=[0,.68333,0,0,.68056],ds=[0,.68333,0,0,.72222],co=[.25,.75,0,0,.5],qa=[.25,.75,0,0,.27778],ki=[0,.69444,0,0,.5],ns=[0,.69444,0,0,.55556],As=[0,.43056,0,0,.44445],Go=[0,.43056,0,0,.5],ni=[.19444,.43056,0,0,.55556],Xr=[0,.43056,0,0,.55556],Ti=[.08333,.58333,0,0,.77778],na=[0,.43056,0,0,.27778],Ni=[0,.66786,0,0,.27778],Pa=[0,.69444,0,0,.75],Ha=[0,.66786,0,0,.5],mo=[0,.68333,0,0,.625],Za=[.19444,.69444,0,0,.44445],Ko=[0,.69444,0,0,.72222],Ao=[.19444,.69444,0,0,.5],Wa=[.19444,.69444,0,0,1],Cl=[.011,.511,0,0,1.126],xs=[.19444,.69444,0,0,.61111],Ss=[.05556,.75,0,0,.5],ll=[0,.68333,0,0,.83334],Js=[.0391,.5391,0,0,.66667],Bs=[-.05555,.44445,0,0,.5],nc=[0,.43056,0,0,.77778],fs=[0,.55556,0,0,.66667],cl=[-.03625,.46375,0,0,.77778],hs=[-.01688,.48312,0,0,.77778],Cs=[.0391,.5391,0,0,1],bi=[0,.69444,0,0,.61111],Mi=[-.03472,.46528,0,0,.5],Di=[.25,.75,0,0,.44445],go=[-.14236,.35764,0,0,1],ja=[.244,.744,0,0,.412],Xo=[.19444,.69444,0,0,.88889],uo=[.12963,.69444,0,0,.77778],Oa=[.19444,.69444,0,0,.38889],rs=[.011,.511,0,0,1.638],is=[.19444,.69444,0,0,0],as=[0,.44444,0,0,.575],Ns=[.19444,.44444,0,0,.575],rc=[0,.68611,0,0,.75555],wl=[0,.69444,0,0,.66759],qc=[0,.68611,0,0,.80555],kc=[0,.68611,.08229,0,.98229],jl=[0,.68611,0,0,.76666],Ou=[0,.44444,0,0,.58472],ic=[.19444,.44444,0,0,.6118],Vl=[.19444,.43056,0,0,.5],Ec=[0,.68333,.02778,.08334,.76278],_c=[0,.68333,.08125,.05556,.83125],ul=[0,.43056,0,.05556,.48472],ac=[.19444,.43056,0,.08334,.51702],Lc=[.25,.75,0,0,.42778],eo=[0,.69444,0,0,.55],Rs=[0,.69444,0,0,.73334],dl=[0,.69444,0,0,.79445],eu=[0,.69444,0,0,.51945],oc=[0,.69444,0,0,.70278],sc=[0,.69444,0,0,.76389],Ml=[.25,.75,0,0,.34306],fl=[0,.69444,0,0,.56111],Au=[0,.69444,0,0,.25556],Ul=[.19444,.45833,0,0,.56111],tu=[0,.45833,0,0,.56111],Qs=[0,.69444,0,0,.30556],nu=[0,.69444,0,0,.58056],zs=[0,.69444,0,0,.67223],kl=[0,.69444,0,0,.85556],Fs=[0,.69444,0,0,.55834],Ho=[0,.65556,.11156,0,.5],qs=[0,.69444,.08094,0,.70834],lc=[.17014,0,0,0,.44445],Ic=[0,.69444,.0799,0,.5],Tc=[0,.69444,0,0,.73752],ru=[0,.69444,.09205,0,.5],wo=[0,.69444,.09031,0,.77778],Ks=[0,.69444,.07816,0,.27778],iu=[0,.69444,.00316,0,.5],B=[.19444,.69444,0,0,.83334],W=[.05556,.75,0,0,.83334],me=[0,.75,0,0,.5],De=[.125,.08333,0,0,.27778],Ve=[0,.08333,0,0,.27778],ze=[0,.65556,0,0,.5],it=[0,.69444,0,0,.47222],rt=[0,.69444,0,0,.66667],nt=[0,.69444,0,0,.59722],kt=[0,.69444,0,0,.54167],zt=[0,.69444,0,0,.70834],Lt=[.25,.75,0,0,.28889],qt=[0,.69444,0,0,.51667],Xt=[0,.44444,0,0,.44445],Jt=[.19444,.44444,0,0,.51667],En=[0,.44444,0,0,.38333],fn=[0,.44444,0,0,.51667],_n=[0,.69444,0,0,.83334],gn=[.35001,.85,0,0,.45834],Fn=[.35001,.85,0,0,.57778],yr=[.35001,.85,0,0,.41667],Sr=[.35001,.85,0,0,.58334],nr=[0,.72222,0,0,.55556],Tr=[1e-5,.6,0,0,.66667],Kr=[1e-5,.6,0,0,.77778],Wn=[.25001,.75,0,0,.94445],lr=[.306,.805,.19445,0,.47222],Xn=[.30612,.805,.19445,0,.47222],un=[.25001,.75,0,0,.83334],Yn=[.35001,.85,0,0,.47222],Ir=[.25001,.75,0,0,1.11111],Vr=[.65002,1.15,0,0,.59722],kr=[.65002,1.15,0,0,.81111],Tn=[.65002,1.15,0,0,.47222],Nr=[.65002,1.15,0,0,.66667],Hr=[0,.75,0,0,1],fi=[.55001,1.05,0,0,1.27778],si=[.862,1.36,.44445,0,.55556],ji=[.86225,1.36,.44445,0,.55556],$i=[.55001,1.05,0,0,1.11111],Fr=[.65002,1.15,0,0,.52778],ca=[.65002,1.15,0,0,.61111],ei=[.55001,1.05,0,0,1.51112],Ri=[.95003,1.45,0,0,.73611],Pi=[.95003,1.45,0,0,1.04445],Sa=[.95003,1.45,0,0,.52778],Er=[.95003,1.45,0,0,.75],Cr=[0,.75,0,0,1.44445],wr=[.95003,1.45,0,0,.58334],fr=[1.25003,1.75,0,0,.79167],li=[1.25003,1.75,0,0,1.27778],br=[1.25003,1.75,0,0,.58334],Rr=[1.25003,1.75,0,0,.80556],ti=[0,.825,0,0,1.8889],Yr=[1.25003,1.75,0,0,.63889],Va=[.64502,1.155,0,0,.875],Ca=[1e-5,.6,0,0,.875],Zo=[-99e-5,.601,0,0,.66667],ua=[.64502,1.155,0,0,.66667],Yo=[1e-5,.9,0,0,.88889],ha=[.65002,1.15,0,0,.88889],Aa=[.90001,0,0,0,.88889],ws=[-.00499,.605,0,0,1.05556],oi=[0,.12,0,0,.45],cn=[0,.61111,0,0,.525],gi=[.08333,.69444,0,0,.525],va=[-.08056,.53055,0,0,.525],wa=[-.05556,.55556,0,0,.525],Or=[0,.43056,0,0,.525],wi=[.22222,.43056,0,0,.525],Ba=[0,0,0,0,.525],Bo={"AMS-Regular":{32:_t,65:Xe,66:ct,67:Xe,68:Xe,69:ct,70:yt,71:mt,72:mt,73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:mt,76:ct,77:[0,.68889,0,0,.94445],78:Xe,79:Bt,80:yt,81:Bt,82:Xe,83:Ft,84:ct,85:Xe,86:Xe,87:[0,.68889,0,0,1],88:Xe,89:Xe,90:ct,107:Ft,160:_t,165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:Ft,295:hn,710:Yt,732:rn,770:Yt,771:rn,989:tr,1008:Pn,8245:[0,.54986,0,0,.275],8463:hn,8487:Xe,8498:Ft,8502:ct,8503:[0,.68889,0,0,.44445],8504:ct,8513:[0,.68889,0,0,.63889],8592:Wt,8594:Wt,8602:on,8603:on,8606:xn,8608:xn,8610:Vt,8611:Vt,8619:Mn,8620:Mn,8621:[-.13313,.37788,0,0,1.38889],8622:on,8624:qn,8625:qn,8630:An,8631:An,8634:pr,8635:pr,8638:er,8639:er,8642:er,8643:er,8644:gr,8646:gr,8647:gr,8648:$r,8649:gr,8650:$r,8651:xn,8652:xn,8653:on,8654:on,8655:on,8666:Rn,8667:Rn,8669:[-.13313,.37788,0,0,1],8672:pn,8674:pn,8705:[0,.825,0,0,.5],8708:Ft,8709:tr,8717:[0,.43056,0,0,.42917],8722:Wt,8724:[.08198,.69224,0,0,.77778],8726:tr,8733:J,8736:Ke,8737:Ke,8738:[.03517,.52239,0,0,.72222],8739:Gt,8740:[.25142,.74111,0,0,.27778],8741:an,8742:[.25142,.74111,0,0,.5],8756:H,8757:H,8764:ee,8765:[-.13313,.37788,0,0,.77778],8769:ee,8770:cl,8774:tt,8776:hs,8778:tr,8782:Q,8783:Q,8785:pr,8786:pr,8787:pr,8790:J,8791:ut,8796:[.08198,.91667,0,0,.77778],8806:Ee,8807:Ee,8808:Ze,8809:Ze,8812:[.25583,.75583,0,0,.5],8814:ft,8815:ft,8816:tt,8817:tt,8818:ut,8819:ut,8822:It,8823:It,8828:Pt,8829:Pt,8830:ut,8831:ut,8832:ft,8833:ft,8840:tt,8841:tt,8842:At,8843:At,8847:Ge,8848:Ge,8858:pr,8859:pr,8861:pr,8862:St,8863:St,8864:St,8865:St,8872:[0,.69224,0,0,.61111],8873:Ke,8874:[0,.69224,0,0,.88889],8876:yt,8877:yt,8878:Xe,8879:Xe,8882:Ge,8883:Ge,8884:Pt,8885:Pt,8888:[0,.54986,0,0,1.11111],8890:ni,8891:Qt,8892:Qt,8901:[0,.54986,0,0,.27778],8903:tr,8905:tr,8906:tr,8907:J,8908:J,8909:[-.03598,.46402,0,0,.77778],8910:Kt,8911:Kt,8912:Ge,8913:Ge,8914:tn,8915:tn,8916:H,8918:Ut,8919:Ut,8920:Sn,8921:Sn,8922:Nt,8923:Nt,8926:Pt,8927:Pt,8928:tt,8929:tt,8934:mn,8935:mn,8936:mn,8937:mn,8938:ft,8939:ft,8940:tt,8941:tt,8994:ot,8995:ot,9416:[.15559,.69224,0,0,.90222],9484:qn,9488:qn,9492:st,9496:st,9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:St,9633:St,9650:ht,9651:ht,9654:Ge,9660:ht,9661:ht,9664:Ge,9674:gt,9733:[.19444,.69224,0,0,.94445],10003:Mt,10016:Mt,10731:gt,10846:[.19444,.75583,0,0,.61111],10877:Pt,10878:Pt,10885:Ee,10886:Ee,10887:At,10888:At,10889:bt,10890:bt,10891:xt,10892:xt,10901:Pt,10902:Pt,10933:Ze,10934:Ze,10935:bt,10936:bt,10937:bt,10938:bt,10949:Ee,10950:Ee,10955:Rt,10956:Rt,57350:Gt,57351:an,57352:tr,57353:Pn,57356:Ze,57357:Ze,57358:Kn,57359:tt,57360:tt,57361:Kn,57366:Ze,57367:Ze,57368:Ze,57369:Ze,57370:At,57371:At},"Caligraphic-Regular":{32:_t,65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:_t},"Fraktur-Regular":{32:_t,33:[0,.69141,0,0,.29574],34:On,38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:Qn,41:Qn,42:[0,.62119,0,0,.27764],43:$n,44:Cn,45:$n,46:Cn,47:[.24982,.74947,0,0,.50181],48:rr,49:rr,50:rr,51:jn,52:jn,53:jn,54:Vn,55:jn,56:Vn,57:jn,58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:wn,93:wn,94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:_t,8216:On,8217:On,58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:_t,33:[0,.69444,0,0,.35],34:Jr,35:[.19444,.69444,0,0,.95833],36:Gi,37:[.05556,.75,0,0,.95833],38:Zr,39:ir,40:Un,41:Un,42:[0,.75,0,0,.575],43:Pr,44:[.19444,.15556,0,0,.31944],45:En,46:[0,.15556,0,0,.31944],47:Ht,48:Nn,49:Nn,50:Nn,51:Nn,52:Nn,53:Nn,54:Nn,55:Nn,56:Nn,57:Nn,58:hi,59:[.19444,.44444,0,0,.31944],60:vr,61:ma,62:vr,63:[0,.69444,0,0,.54305],64:Zr,65:nn,66:[0,.68611,0,0,.81805],67:dr,68:[0,.68611,0,0,.88194],69:rc,70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:Gn,73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:kn,77:[0,.68611,0,0,1.09166],78:Gn,79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:nn,89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:Zn,92:Ht,93:Zn,94:Wr,95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:In,99:ar,100:In,101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:In,105:ir,106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:ir,109:[0,.44444,0,0,.95833],110:xr,111:as,112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:xr,118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:ar,123:Ht,124:Zn,125:Ht,126:[.35,.34444,0,0,.575],160:_t,163:[0,.69444,0,0,.86853],168:Wr,172:[0,.44444,0,0,.76666],176:zn,177:Pr,184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:Pr,216:[.04861,.73472,0,0,.89444],223:nt,230:[0,.44444,0,0,.83055],247:Pr,248:[.09722,.54167,0,0,.575],305:hi,338:[0,.68611,0,0,1.16944],339:da,567:[.19444,.44444,0,0,.35139],710:Wr,711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:Wr,715:Wr,728:Wr,729:ir,730:zn,732:Wr,733:Wr,915:kn,916:mi,920:mr,923:qc,926:jl,928:Gn,931:dr,933:mr,934:dr,936:mr,937:dr,8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:ir,8217:ir,8220:Jr,8221:Jr,8224:sa,8225:sa,8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:wl,8465:Ii,8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:Ii,8501:Do,8592:zr,8593:yi,8594:zr,8595:yi,8596:zr,8597:Ht,8598:pi,8599:pi,8600:pi,8601:pi,8636:zr,8637:zr,8640:zr,8641:zr,8656:zr,8657:ii,8658:zr,8659:ii,8660:zr,8661:[.25,.75,0,0,.70277],8704:In,8706:[0,.69444,.06389,0,.62847],8707:In,8709:Gi,8711:mi,8712:Bi,8715:Bi,8722:Pr,8723:Pr,8725:Ht,8726:Ht,8727:Co,8728:ba,8729:ba,8730:[.18,.82,0,0,.95833],8733:da,8734:[0,.44444,0,0,1.14999],8736:Ke,8739:Zn,8741:Ht,8743:ea,8744:ea,8745:ea,8746:ea,8747:[.19444,.69444,.12778,0,.56875],8764:ma,8768:[.19444,.69444,0,0,.31944],8771:xa,8776:[.02444,.52444,0,0,.89444],8781:xa,8801:xa,8804:Fa,8805:Fa,8810:Ka,8811:Ka,8826:vr,8827:vr,8834:vr,8835:vr,8838:Fa,8839:Fa,8846:ea,8849:Fa,8850:Fa,8851:ea,8852:ea,8853:Pr,8854:Pr,8855:Pr,8856:Pr,8857:Pr,8866:Do,8867:Do,8868:Zr,8869:Zr,8900:ba,8901:[-.02639,.47361,0,0,.31944],8902:Co,8968:ao,8969:ao,8970:ao,8971:ao,8994:la,8995:la,9651:Fo,9657:Co,9661:Fo,9667:Co,9711:pi,9824:oo,9825:oo,9826:oo,9827:oo,9837:[0,.75,0,0,.44722],9838:Da,9839:Da,10216:Un,10217:Un,10815:Gn,10927:Fa,10928:Fa,57376:is},"Main-BoldItalic":{32:_t,33:[0,.69444,.11417,0,.38611],34:Ki,35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:Gr,40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:ta,49:ta,50:ta,51:ta,52:so,53:ta,54:ta,55:so,56:ta,57:ta,58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:Fi,64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:cr,73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:cr,79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:sr,95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:Br,104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:Br,114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:_t,168:[0,.69444,.11473,0,.59111],176:ai,184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:_r,248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:_r,567:[.19444,.44444,.04611,0,.385],710:sr,711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:Gr,730:ai,732:Fi,733:Fi,915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:cr,931:[0,.68611,.11431,0,.82666],933:Xi,934:[0,.68611,.05632,0,.82666],936:Xi,937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:Gr,8217:Gr,8220:[0,.69444,.16772,0,.62055],8221:Ki},"Main-Italic":{32:_t,33:Yi,34:Ps,35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:Yi,40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:Qr,49:Qr,50:Qr,51:Qr,52:qr,53:Qr,54:Qr,55:qr,56:Qr,57:Qr,58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:$o,64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:Hi,73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:Hi,79:Po,80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:Hi,86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:Wi,95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:Zi,104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:Zi,114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:_t,168:[0,.66786,.10474,0,.51111],176:bs,184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:fa,248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:fa,710:Wi,711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:bs,732:[0,.66786,.11585,0,.51111],733:$o,915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:Po,923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:Hi,931:[0,.68333,.12028,0,.71555],933:lo,934:[0,.68333,.05986,0,.71555],936:lo,937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:Yi,8217:Yi,8220:[0,.69444,.1685,0,.51444],8221:Ps,8463:hn},"Main-Regular":{32:_t,33:Oo,34:ki,35:B,36:Ss,37:W,38:Uo,39:Oo,40:$a,41:$a,42:me,43:Ti,44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:co,48:ga,49:ga,50:ga,51:ga,52:ga,53:ga,54:ga,55:ga,56:ga,57:ga,58:na,59:[.19444,.43056,0,0,.27778],60:Ut,61:ee,62:Ut,63:it,64:Uo,65:es,66:[0,.68333,0,0,.70834],67:ds,68:[0,.68333,0,0,.76389],69:Os,70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:es,73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:ts,76:mo,77:[0,.68333,0,0,.91667],78:es,79:ts,80:Os,81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:ds,85:es,86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:es,89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:qa,92:co,93:qa,94:ki,95:[.31,.12056,.02778,0,.5],97:Go,98:ns,99:As,100:ns,101:As,102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:ns,105:Ni,106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:Oo,109:[0,.43056,0,0,.83334],110:Xr,111:Go,112:ni,113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:Xr,118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:As,123:co,124:qa,125:co,126:[.35,.31786,0,0,.5],160:_t,163:[0,.69444,0,0,.76909],167:Za,168:Ha,172:[0,.43056,0,0,.66667],176:Pa,177:Ti,182:xs,184:lc,198:[0,.68333,0,0,.90278],215:Ti,216:[.04861,.73194,0,0,.77778],223:ki,230:[0,.43056,0,0,.72222],247:Ti,248:[.09722,.52778,0,0,.5],305:na,338:[0,.68333,0,0,1.01389],339:nc,567:[.19444,.43056,0,0,.30556],710:ki,711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:ki,715:ki,728:ki,729:Ni,730:Pa,732:Ha,733:ki,915:mo,916:ll,920:ts,923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:es,931:ds,933:ts,934:ds,936:ts,937:ds,8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:Oo,8217:Oo,8220:ki,8221:ki,8224:Za,8225:Za,8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:hn,8465:Ko,8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:Ko,8501:bi,8592:on,8593:Ao,8594:on,8595:Ao,8596:on,8597:co,8598:Wa,8599:Wa,8600:Wa,8601:Wa,8614:[.011,.511,0,0,1],8617:Cl,8618:Cl,8636:on,8637:on,8640:on,8641:on,8652:[.011,.671,0,0,1],8656:on,8657:xs,8658:on,8659:xs,8660:on,8661:[.25,.75,0,0,.61111],8704:ns,8706:[0,.69444,.05556,.08334,.5309],8707:ns,8709:Ss,8711:ll,8712:Js,8715:Js,8722:Ti,8723:Ti,8725:co,8726:co,8727:Mi,8728:Bs,8729:Bs,8730:[.2,.8,0,0,.83334],8733:nc,8734:An,8736:Ke,8739:qa,8741:co,8743:fs,8744:fs,8745:fs,8746:fs,8747:[.19444,.69444,.11111,0,.41667],8764:ee,8768:[.19444,.69444,0,0,.27778],8771:cl,8773:[-.022,.589,0,0,1],8776:hs,8781:cl,8784:[-.133,.67,0,0,.778],8801:cl,8804:At,8805:At,8810:Cs,8811:Cs,8826:Ut,8827:Ut,8834:Ut,8835:Ut,8838:At,8839:At,8846:fs,8849:At,8850:At,8851:fs,8852:fs,8853:Ti,8854:Ti,8855:Ti,8856:Ti,8857:Ti,8866:bi,8867:bi,8868:Uo,8869:Uo,8872:[.249,.75,0,0,.867],8900:Bs,8901:[-.05555,.44445,0,0,.27778],8902:Mi,8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:Di,8969:Di,8970:Di,8971:Di,8994:go,8995:go,9136:ja,9137:ja,9651:Xo,9657:Mi,9661:Xo,9667:Mi,9711:Wa,9824:uo,9825:uo,9826:uo,9827:uo,9837:[0,.75,0,0,.38889],9838:Oa,9839:Oa,10216:$a,10217:$a,10222:ja,10223:ja,10229:[.011,.511,0,0,1.609],10230:rs,10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:rs,10815:es,10927:At,10928:At,57376:is},"Math-BoldItalic":{32:_t,48:as,49:as,50:as,51:Ns,52:Ns,53:Ns,54:Nn,55:Ns,56:Nn,57:Ns,65:nn,66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:kc,73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:rc,77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:wl,105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:Ou,112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:_t,915:[0,.68611,.15972,0,.65694],916:mi,920:[0,.68611,.03194,0,.86722],923:qc,926:[0,.68611,.07458,0,.84125],928:kc,931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:jl,936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:Ou,960:[0,.44444,.03704,0,.68241],961:ic,962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:ic,1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:_t,48:Go,49:Go,50:Go,51:Vl,52:Vl,53:Vl,54:ga,55:Vl,56:ga,57:Vl,65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:_c,73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:Ec,80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:ul,112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:_t,915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:Ec,923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:_c,931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:ul,960:[0,.43056,.03588,0,.57003],961:ac,962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:ac,1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:_t,33:[0,.69444,0,0,.36667],34:Fs,35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:Qs,40:Lc,41:Lc,42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:eo,49:eo,50:eo,51:eo,52:eo,53:eo,54:eo,55:eo,56:eo,57:eo,58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:eu,64:Rs,65:Rs,66:Rs,67:oc,68:dl,69:[0,.69444,0,0,.64167],70:bi,71:Rs,72:dl,73:[0,.69444,0,0,.33056],74:eu,75:sc,76:nu,77:[0,.69444,0,0,.97778],78:dl,79:dl,80:oc,81:[.10556,.69444,0,0,.79445],82:oc,83:bi,84:Rs,85:sc,86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:Rs,89:[0,.69444,.0275,0,.73334],90:zs,91:Ml,93:Ml,94:eo,95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:fl,99:[0,.45833,0,0,.48889],100:fl,101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:fl,105:Au,106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:Au,109:[0,.45833,0,0,.86667],110:tu,111:[0,.45833,0,0,.55],112:Ul,113:Ul,114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:tu,118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:_t,168:eo,176:Rs,180:eo,184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:eo,711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:eo,729:Qs,730:Rs,732:eo,733:eo,915:nu,916:[0,.69444,0,0,.91667],920:kl,923:zs,926:Rs,928:dl,931:dl,933:kl,934:dl,936:kl,937:dl,8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:Qs,8217:Qs,8220:Fs,8221:Fs},"SansSerif-Italic":{32:_t,33:[0,.69444,.05733,0,.31945],34:iu,35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:Ks,40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:De,45:[0,.44444,.01946,0,.33333],46:Ve,47:[.25,.75,.13164,0,.5],48:Ho,49:Ho,50:Ho,51:Ho,52:Ho,53:Ho,54:Ho,55:Ho,56:Ho,57:Ho,58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:rt,66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:qs,73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:kt,77:[0,.69444,.08094,0,.875],78:qs,79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:Ic,95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:_t,168:[0,.67937,.06385,0,.5],176:Tc,184:lc,305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:Ic,711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:ru,715:ki,728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:Tc,732:[0,.67659,.08826,0,.5],733:ru,915:[0,.69444,.13372,0,.54167],916:_n,920:[0,.69444,.07555,0,.77778],923:bi,926:[0,.69444,.12816,0,.66667],928:qs,931:[0,.69444,.11983,0,.72222],933:wo,934:[0,.69444,.04603,0,.72222],936:wo,937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:Ks,8217:Ks,8220:[0,.69444,.14205,0,.5],8221:iu},"SansSerif-Regular":{32:_t,33:[0,.69444,0,0,.31945],34:ki,35:B,36:Ss,37:W,38:[0,.69444,0,0,.75834],39:Oo,40:$a,41:$a,42:me,43:Ti,44:De,45:[0,.44444,0,0,.33333],46:Ve,47:co,48:ze,49:ze,50:ze,51:ze,52:ze,53:ze,54:ze,55:ze,56:ze,57:ze,58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:it,64:rt,65:rt,66:rt,67:In,68:[0,.69444,0,0,.72223],69:nt,70:[0,.69444,0,0,.56945],71:rt,72:zt,73:Oo,74:it,75:[0,.69444,0,0,.69445],76:kt,77:[0,.69444,0,0,.875],78:zt,79:[0,.69444,0,0,.73611],80:In,81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:ns,84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:rt,89:[0,.69444,.025,0,.66667],90:bi,91:Lt,93:Lt,94:ki,95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:qt,99:Xt,100:qt,101:Xt,102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:qt,105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:fn,111:[0,.44444,0,0,.5],112:Jt,113:Jt,114:[0,.44444,.01389,0,.34167],115:En,116:[0,.57143,0,0,.36111],117:fn,118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:_t,168:[0,.67937,0,0,.5],176:rt,184:lc,305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:ki,711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:ki,715:ki,728:ki,729:[0,.67937,0,0,.27778],730:rt,732:[0,.67659,0,0,.5],733:ki,915:kt,916:_n,920:Uo,923:bi,926:rt,928:zt,931:Ko,933:Uo,934:Ko,936:Uo,937:Ko,8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:Oo,8217:Oo,8220:ki,8221:ki},"Script-Regular":{32:_t,65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:_t},"Size1-Regular":{32:_t,40:gn,41:gn,47:Fn,91:yr,92:Fn,93:yr,123:Sr,125:Sr,160:_t,710:nr,732:nr,770:nr,771:nr,8214:[-99e-5,.601,0,0,.77778],8593:Tr,8595:Tr,8657:Kr,8659:Kr,8719:Wn,8720:Wn,8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:Xn,8748:lr,8749:lr,8750:Xn,8896:un,8897:un,8898:un,8899:un,8968:Yn,8969:Yn,8970:Yn,8971:Yn,9168:Zo,10216:Yn,10217:Yn,10752:Ir,10753:Ir,10754:Ir,10756:un,10758:un},"Size2-Regular":{32:_t,40:Vr,41:Vr,47:kr,91:Tn,92:kr,93:Tn,123:Nr,125:Nr,160:_t,710:Hr,732:Hr,770:Hr,771:Hr,8719:fi,8720:fi,8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:ji,8748:si,8749:si,8750:ji,8896:$i,8897:$i,8898:$i,8899:$i,8968:Fr,8969:Fr,8970:Fr,8971:Fr,10216:ca,10217:ca,10752:ei,10753:ei,10754:ei,10756:$i,10758:$i},"Size3-Regular":{32:_t,40:Ri,41:Ri,47:Pi,91:Sa,92:Pi,93:Sa,123:Er,125:Er,160:_t,710:Cr,732:Cr,770:Cr,771:Cr,8730:[.95003,1.45,0,0,1],8968:wr,8969:wr,8970:wr,8971:wr,10216:Er,10217:Er},"Size4-Regular":{32:_t,40:fr,41:fr,47:li,91:br,92:li,93:br,123:Rr,125:Rr,160:_t,710:ti,732:ti,770:ti,771:ti,8730:[1.25003,1.75,0,0,1],8968:Yr,8969:Yr,8970:Yr,8971:Yr,9115:Va,9116:Ca,9117:Va,9118:Va,9119:Ca,9120:Va,9121:ua,9122:Zo,9123:ua,9124:ua,9125:Zo,9126:ua,9127:Yo,9128:ha,9129:Aa,9130:[0,.3,0,0,.88889],9131:Yo,9132:ha,9133:Aa,9143:[.88502,.915,0,0,1.05556],10216:Rr,10217:Rr,57344:ws,57345:ws,57680:oi,57681:oi,57682:oi,57683:oi},"Typewriter-Regular":{32:Ba,33:cn,34:cn,35:cn,36:gi,37:gi,38:cn,39:cn,40:gi,41:gi,42:[0,.52083,0,0,.525],43:va,44:[.13889,.125,0,0,.525],45:va,46:[0,.125,0,0,.525],47:gi,48:cn,49:cn,50:cn,51:cn,52:cn,53:cn,54:cn,55:cn,56:cn,57:cn,58:Or,59:[.13889,.43056,0,0,.525],60:wa,61:[-.19549,.41562,0,0,.525],62:wa,63:cn,64:cn,65:cn,66:cn,67:cn,68:cn,69:cn,70:cn,71:cn,72:cn,73:cn,74:cn,75:cn,76:cn,77:cn,78:cn,79:cn,80:cn,81:[.13889,.61111,0,0,.525],82:cn,83:cn,84:cn,85:cn,86:cn,87:cn,88:cn,89:cn,90:cn,91:gi,92:gi,93:gi,94:cn,95:[.09514,0,0,0,.525],96:cn,97:Or,98:cn,99:Or,100:cn,101:Or,102:cn,103:wi,104:cn,105:cn,106:[.22222,.61111,0,0,.525],107:cn,108:cn,109:Or,110:Or,111:Or,112:wi,113:wi,114:Or,115:Or,116:[0,.55358,0,0,.525],117:Or,118:Or,119:Or,120:Or,121:wi,122:Or,123:gi,124:gi,125:gi,126:cn,127:cn,160:Ba,176:cn,184:[.19445,0,0,0,.525],305:Or,567:wi,711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:cn,715:cn,728:cn,730:cn,770:cn,771:cn,776:cn,915:cn,916:cn,920:cn,923:cn,926:cn,928:cn,931:cn,933:cn,934:cn,936:cn,937:cn,8216:cn,8217:cn,8242:cn,9251:[.11111,.21944,0,0,.525]}},ps=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,vo=10,Ua=.25,os=1.2,Ga=.431,yo={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[Ga,Ga,Ga],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.5,.732,.925],num2:[.394,.384,.5],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[Ua,Ua,Ua],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04]},to=[0,.5,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Vi=5,Ui={"\xA0":" ","\u200B":" ",\u00C5:"A",\u00C7:"C",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00E7:"c",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function fo(e,t){e===void 0&&(e=77);const n=Bo[t][e];if(n)return{defaultMetrics:!1,depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]};if(e===11034)return{defaultMetrics:!0,depth:.2,height:.8,italic:0,skew:0,width:.8};const i=String.fromCodePoint(e);if(i in Ui)e=Ui[i].codePointAt(0);else if(ps.test(i))return e=77,{defaultMetrics:!0,depth:.2,height:.9,italic:0,skew:0,width:1};return{defaultMetrics:!0,depth:.2,height:.7,italic:0,skew:0,width:.8}}var Ms={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],longrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],longleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],longleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],longrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],longleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],longleftrightarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],longRightleftharpoons:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716],longLeftrightharpoons:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Wo={widehat1:[1062,239,.24],widehat2:[2364,300,.3],widehat3:[2364,360,.36],widehat4:[2364,420,.42],widecheck1:[1062,239,.24],widecheck2:[2364,300,.3],widecheck3:[2364,360,.36],widecheck4:[2364,420,.42],widetilde1:[600,260,.26],widetilde2:[1033,286,.286],widetilde3:[2339,306,.306],widetilde4:[2340,312,.34],overarc:[1061,159,.3],underarc:[1061,159,.3]},ms={doubleleftarrow:`M262 157
|
|
|
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
|
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
|
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
|
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
|
|
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
|
|
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
|
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
|
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
|
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
|
|
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
|
|
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
|
|
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
|
|
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
|
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
|
|
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
|
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
|
|
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
|
|
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
|
|
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
|
|
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
|
|
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
|
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
|
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
|
|
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
|
|
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
|
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,overarc:"M529 0c179 0 524 115 524 115 5 1 9 5 9 10 0 1-1 2-1 3l-4 22c-1 5-5 9-11 9h-2s-338-93-512-92c-174 0-513 92-513 92h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13 0 0 342-115 520-115z",underarc:`m 529 160
|
|
|
c -179 0 -524 -115 -524 -115
|
|
|
c -5 -1 -9 -5 -9 -10
|
|
|
c 0 -1 1 -2 1 -3
|
|
|
l 4 -22
|
|
|
c 1 -5 5 -9 11 -9
|
|
|
h 2
|
|
|
s 338 93 512 92
|
|
|
c 174 0 513 -92 513 -92
|
|
|
h 2
|
|
|
c 5 0 9 4 11 9
|
|
|
l 5 22
|
|
|
c 1 6 -2 12 -8 13
|
|
|
c 0 0 -342 115 -520 115
|
|
|
z
|
|
|
`,leftgroup:`M400000 80
|
|
|
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
|
|
435 0h399565z`,leftgroupunder:`M400000 262
|
|
|
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
|
|
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
|
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
|
|
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
|
|
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
|
|
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
|
|
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
|
|
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
|
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
|
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
|
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
|
|
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
|
|
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
|
|
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
|
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
|
|
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
|
|
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
|
|
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
|
|
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
|
|
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
|
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
|
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
|
|
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
|
|
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
|
|
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
|
|
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
|
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
|
|
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
|
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
|
|
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
|
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
|
|
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
|
|
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
|
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
|
|
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
|
|
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
|
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
|
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
|
|
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
|
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
|
|
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
|
|
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
|
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
|
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
|
|
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
|
|
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
|
|
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
|
|
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
|
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
|
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
|
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
|
|
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
|
|
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
|
|
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
|
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
|
|
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
|
|
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
|
|
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
|
|
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
|
|
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
|
|
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
|
|
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
|
|
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
|
|
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
|
|
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
|
|
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
|
|
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
|
|
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
|
|
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
|
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
|
|
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
|
|
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
|
|
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
|
|
|
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
|
|
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
|
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
|
|
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
|
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
|
|
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
|
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
|
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
|
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
|
|
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
|
|
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
|
|
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
|
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
|
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,widetilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
|
|
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
|
|
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
|
|
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
|
-68.267.847-113-73.952-191-73.952z`,widetilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
|
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
|
|
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
|
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
|
|
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,widetilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
|
|
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
|
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
|
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
|
-338 0-409-156.573-744-156.573z`,widetilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
|
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
|
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
|
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
|
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
|
|
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
|
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
|
|
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
|
|
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
|
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
|
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
|
|
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
|
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
|
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
|
|
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
|
|
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
|
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
|
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
|
|
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
|
|
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
|
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
|
|
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
|
|
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
|
|
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
|
|
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
|
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
|
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
|
|
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
|
|
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
|
|
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
|
|
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
|
|
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
|
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
|
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
|
|
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
|
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
|
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
|
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
|
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
|
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
|
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
|
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
|
|
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
|
|
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
|
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
|
|
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
|
|
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
|
|
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
|
|
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`};function Hs(e){if(Wo[e]){const[k,$,ne]=Wo[e],Me=`<span class="stretchy" style="height:${ne}em"><svg width="100%" height="${ne}em" viewBox="0 0 ${k} ${$}" preserveAspectRatio="none" ><path fill="currentcolor" d="${ms[e]}"></path></svg></span>`;return`<span style="display:inline-block;height:${Math.floor(100*ne/2)/100}em;min-width:0">${Me}</span>`}const[t,n,i,o]=Ms[e];let c,f;const b=i/1e3;t.length===3?(c=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],f=["xMinYMin","xMidYMin","xMaxYMin"]):t.length===2?(c=["slice-1-of-2","slice-2-of-2"],f=["xMinYMin","xMaxYMin"]):(c=["slice-1-of-1"],f=[o]);const C=t.map((k,$)=>`<span class="${c[$]}" style=height:${b}em><svg width=400em height=${b}em viewBox="0 0 400000 ${i}" preserveAspectRatio="${f[$]} slice"><path fill="currentcolor" d="${ms[k]}"></path></svg></span>`).join("");return`<span style="display:inline-block;height:${b}em;min-width:${n}em;">${C}</span>`}function cc(e){return Ms[e]?Ms[e][2]/1e3:Wo[e][2]}function ci(e){const t=[];for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);if(i===13&&e.charCodeAt(n+1)===10&&(i=10,n++),(i===13||i===12)&&(i=10),i===0&&(i=65533),i>=55296&&i<=56319){const o=e.charCodeAt(n+1);if(o>=56320&&o<=57343){const c=i-55296,f=o-56320;i=Wl(2,16)+c*Wl(2,10)+f,n++}}t.push(i)}return t}var Ei=8205,_a=[[Ei,1],[65038,2],[127995,5],[129456,4],[917536,96]],_i,La=[127462,127487];function Xa(e){var t;if(_i===void 0){_i={};for(const n of _a)for(let i=n[0];i<=n[0]+n[1]-1;i++)_i[i]=!0}return(t=_i[e])!=null?t:!1}function Mo(e){return e>=La[0]&&e<=La[1]}function ks(e){if(/^[\u0020-\u00FF]*$/.test(e))return e;const t=[],n=ci(e);let i=0;for(;i<n.length;){const o=n[i++],c=n[i];if(c===Ei){const f=i-1;for(i+=2;n[i]===Ei;)i+=2;t.push(String.fromCodePoint(...n.slice(f,i-f+1)))}else if(Xa(c)){const f=i-1;for(;Xa(n[i]);)i+=n[i]===Ei?2:1;t.push(String.fromCodePoint(...n.slice(f,2*i-f-1)))}else Mo(o)?(i+=1,t.push(String.fromCodePoint(...n.slice(i-2,2)))):t.push(String.fromCodePoint(o))}return t}var Dc=class{constructor(e){this.obeyspaces=!1,this.pos=0,this.s=ks(e)}end(){return this.pos>=this.s.length}get(){return this.pos<this.s.length?this.s[this.pos++]:""}peek(){return this.s[this.pos]}match(e){const t=typeof this.s=="string"?e.exec(this.s.slice(this.pos)):e.exec(this.s.slice(this.pos).join(""));return t!=null&&t[0]?(this.pos+=t[0].length,t[0]):""}next(){if(this.end())return null;if(!this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]+/)||this.obeyspaces&&this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]/))return"<space>";const e=this.get();if(e==="\\"){if(!this.end()){let t=this.match(/^[a-zA-Z\*]+/);return t?this.match(/^[ \f\n\r\t\v\u00A0\u2028\u2029]*/):t=this.get(),"\\"+t}}else{if(e==="{")return"<{>";if(e==="}")return"<}>";if(e==="^"){if(this.peek()==="^"){this.get();const t=this.match(/^(\^(\^(\^(\^[\da-f])?[\da-f])?[\da-f])?[\da-f])?[\da-f]{2}/);if(t)return String.fromCodePoint(Number.parseInt(t.slice(t.lastIndexOf("^")+1),16))}return e}else if(e==="#"){if(!this.end()){let t=!1;if(/[\d?@]/.test(this.peek())&&(t=!0,this.pos+1<this.s.length)){const n=this.s[this.pos+1];t=/[^\dA-Za-z]/.test(n)}return t?"#"+this.get():"#"}}else if(e==="$")return this.peek()==="$"?(this.get(),"<$$>"):"<$>"}return e}};function el(e,t){var n,i,o,c;const f=[];let b=e.next();if(b&&b!=="\\relax"){if(b==="\\noexpand")b=e.next(),b&&f.push(b);else if(b==="\\obeyspaces")e.obeyspaces=!0;else if(b==="\\bgroup")f.push("<{>");else if(b==="\\egroup")f.push("<}>");else if(b==="\\string"){if(b=e.next(),b)if(b.startsWith("\\"))for(const C of b)f.push(C==="\\"?"\\backslash":C);else b==="<{>"?f.push("\\{"):b==="<space>"?f.push("~"):b==="<}>"&&f.push("\\}")}else if(b==="\\csname"){for(;e.peek()==="<space>";)e.next();let C="",k=!1,$=[];do{if($.length===0)if(/^#[\d?@]$/.test(e.peek())){const ne=e.get().slice(1);$=Es((i=(n=t==null?void 0:t(ne))!=null?n:t==null?void 0:t("?"))!=null?i:"\\placeholder{}",t),b=$[0]}else b=e.next(),$=b?[b]:[];k=$.length===0,!k&&b==="\\endcsname"&&(k=!0,$.shift()),k||(k=b==="<$>"||b==="<$$>"||b==="<{>"||b==="<}>"||typeof b=="string"&&b.length>1&&b.startsWith("\\")),k||(C+=$.shift())}while(!k);C&&f.push("\\"+C),f.push(...$)}else if(b!=="\\endcsname")if(b.length>1&&b.startsWith("#")){const C=b.slice(1);f.push(...Es((c=(o=t==null?void 0:t(C))!=null?o:t==null?void 0:t("?"))!=null?c:"\\placeholder{}",t))}else f.push(b)}return f}function Es(e,t=null){const n=[];let i="";for(const f of e.toString().split(/\r?\n/)){i&&n.push(i),i=" ";const b=f.match(/((?:\\%)|[^%])*/);b!==null&&n.push(b[0])}const o=new Dc(Be(n.join(""))),c=[];do c.push(...el(o,t));while(!o.end());return c}function ri(e){let t="";const n=[];for(const i of e)i&&(t&&/^[a-zA-Z\*]/.test(i)&&n.push(t),n.push(i),/^\\[a-zA-Z]+\*?[\"\'][^\ ]+$/.test(i)&&n.push(" "),t=/\\[a-zA-Z]+\*?$/.test(i)?" ":"");return n.join("")}function Ji(e,...t){return console.assert(e.startsWith("\\")),t.length===0?e:ri([e,...t.map(n=>`{${n}}`)])}function gs(e){return ri(e.map(t=>{var n;return(n={"<space>":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[t])!=null?n:t}))}var hl=class vd{constructor(t){vd._registry[t]=this}static createAtom(t,n,i){return vd._registry[t].createAtom(n,re(n,t),i)}static serialize(t,n){var i;if(!t||t.length===0)return"";if((i=n.skipStyles)!=null&&i){const o=[];for(const c of au(t)){const f=vd._registry[c[0].mode];o.push(...f.serialize(c,n))}return ri(o)}return ri(uc(t,n))}static getFont(t,n,i){return vd._registry[t].getFont(n,i)}};hl._registry={};var jo=hl;function au(e){const t=[];let n=[],i="NONE";for(const o of e)o.type!=="first"&&(o.mode!==i?(n.length>0&&t.push(n),n=[o],i=o.mode):n.push(o));return n.length>0&&t.push(n),t}function Ma(e,t){const n=[];let i=[],o;for(const c of e)if(c.type!=="first"&&c.style){let f;t==="variant"?(f=c.style.variant,c.style.variantStyle&&c.style.variantStyle!=="up"&&(f+="-"+c.style.variantStyle)):f=c.style[t],f===o?i.push(c):(i.length>0&&n.push(i),i=[c],o=f)}return i.length>0&&n.push(i),n}function $c(e,t){var n;const{parent:i}=e[0],o=i==null?void 0:i.computedStyle.color,c=[];for(const f of au(e)){const b=t.defaultMode;for(const C of Ma(f,"color")){const k=C[0].computedStyle,$=jo._registry[C[0].mode].serialize(C,F(E({},t),{defaultMode:b==="text"?"text":"math"}));!t.skipStyles&&k.color&&k.color!=="none"&&(!i||o!==k.color)?c.push(Ji("\\textcolor",(n=k.verbatimColor)!=null?n:k.color,ri($))):c.push(ri($))}}return c}function ou(e,t){const{parent:n}=e[0],i=n==null?void 0:n.computedStyle.backgroundColor;return Ma(e,"backgroundColor").map(o=>{var c;if(o.length>0||o[0].type!=="box"){const f=o[0].computedStyle;if(f.backgroundColor&&f.backgroundColor!=="none"&&(!n||i!==f.backgroundColor))return Ji("\\colorbox",(c=f.verbatimBackgroundColor)!=null?c:f.backgroundColor,ri($c(o,F(E({},t),{defaultMode:"text"}))))}return ri($c(o,t))})}function uc(e,t){if(e.length===0)return[];const{parent:n}=e[0],i=n==null?void 0:n.computedStyle.fontSize,o=[];for(const c of Ma(e,"fontSize")){const f=c[0].computedStyle.fontSize,b=ou(c,t);b&&(f&&f!=="auto"&&(!n||i!==f)?o.push(["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][f],...b):o.push(...b))}return o}function dc(e){return e?{mord:"ord",mbin:"bin",mop:"op",mrel:"rel",mopen:"open",mclose:"close",mpunct:"punct",minner:"inner",spacing:"ignore",latex:"latex",composition:"inner",error:"inner",placeholder:"ord",supsub:"ignore"}[e]:void 0}function El(e){if(e.length===0)return"ord";const t=dc(e[0].type),n=dc(e[e.length-1].type);return t&&t===n?t:"ord"}function pl(e,t){if(typeof e=="string")return e;if(typeof e=="number"){console.assert(Number.isFinite(e));const n=Math.ceil(100*e)/100;return n===0?"0":n.toString()+(t!=null?t:"")}return""}var vn=class T0{constructor(t,n){var i,o,c,f,b;if(typeof t=="number"?this.value=String.fromCodePoint(t):typeof t=="string"?this.value=t:G(t)?this.children=t.filter(k=>k!==null):t&&t instanceof T0&&(this.children=[t]),this.children)for(const k of this.children)k.parent=this;this.type=(i=n==null?void 0:n.type)!=null?i:"ignore",this.isSelected=(n==null?void 0:n.isSelected)===!0,n!=null&&n.caret&&(this.caret=n.caret),this.classes=(o=n==null?void 0:n.classes)!=null?o:"",this.isTight=(c=n==null?void 0:n.isTight)!=null?c:!1,n!=null&&n.attributes&&(this.attributes=n.attributes);let C=n==null?void 0:n.fontFamily;n!=null&&n.style&&this.value&&(C=(b=jo.getFont((f=n.mode)!=null?f:"math",this,F(E({variant:"normal"},n.style),{letterShapeStyle:n.letterShapeStyle})))!=null?b:void 0),C||(C="Main-Regular"),this._height=0,this._depth=0,this._width=0,this.hasExplicitWidth=!1,this.skew=0,this.italic=0,this.maxFontSize=0,this.scale=1,(n==null?void 0:n.maxFontSize)!==void 0&&(this.maxFontSize=n.maxFontSize),tl(this,C)}set atomID(t){t===void 0||t.length===0||(this.id=t)}selected(t){if(this.isSelected!==t&&(this.isSelected=t,this.children))for(const n of this.children)n.selected(t)}setStyle(t,n,i){if(n===void 0)return;const o=pl(n,i);o.length>0&&(this.cssProperties||(this.cssProperties={}),this.cssProperties[t]=o)}setTop(t){Number.isFinite(t)&&Math.abs(t)>.01&&(this.cssProperties||(this.cssProperties={}),this.cssProperties.top=pl(t,"em"),this.height-=t,this.depth+=t)}get left(){var t;return(t=this.cssProperties)!=null&&t["margin-left"]?Number.parseFloat(this.cssProperties["margin-left"]):0}set left(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-left"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-left"]=pl(t,"em")))}set right(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-right"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-right"]=pl(t,"em")))}set bottom(t){Number.isFinite(t)&&(t===0?this.cssProperties&&delete this.cssProperties["margin-bottom"]:(this.cssProperties||(this.cssProperties={}),this.cssProperties["margin-bottom"]=pl(t,"em")))}get width(){return this._width*this.scale}set width(t){this._width=t,this.hasExplicitWidth=!0}set softWidth(t){}get height(){return this._height*this.scale}set height(t){this._height=t}get depth(){return this._depth*this.scale}set depth(t){this._depth=t}wrap(t){const n=t.parent;if(!n)return this;t.isPhantom&&this.setStyle("opacity",0);const i=t.color;i&&i!==n.color&&this.setStyle("color",i);let o=t.backgroundColor;this.isSelected&&(o=Re(o)),o&&o!==n.backgroundColor&&(this.setStyle("background-color",o),this.setStyle("display","inline-block"));const c=t.scalingFactor;return this.scale=c,this.skew*=c,this.italic*=c,this}toMarkup(){var t,n,i,o;let c=(t=this.value)!=null?t:"";if(this.children)for(const We of this.children)c+=We.toMarkup();let f="";if(this.svgBody)f=Hs(this.svgBody);else if(this.svgOverlay){f='<span style="',f+="display: inline-block;",f+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`,f+=`vertical-align:${Math.floor(100*this.depth)/100}em;`,f+='">',f+=c,f+="</span>",f+='<svg style="position:absolute;overflow:visible;',f+=`height:${Math.floor(100*(this.height+this.depth))/100}em;`;const We=(n=this.cssProperties)==null?void 0:n.padding;We?(f+=`top:${We};`,f+=`left:${We};`,f+=`width:calc(100% - 2 * ${We} );`):f+="top:0;left:0;width:100%;",f+="z-index:2;",f+='"',this.svgStyle&&(f+=this.svgStyle),f+=` viewBox="0 0 ${Math.floor(100*this.width)/100} ${Math.floor(100*(this.height+this.depth))/100}"`,f+=`>${this.svgOverlay}</svg>`}let b="";const C=this.classes.split(" ");C.push((i={latex:"ML__raw-latex",placeholder:"ML__placeholder",error:"ML__error"}[this.type])!=null?i:""),this.caret==="latex"&&C.push("ML__latex-caret"),this.isSelected&&C.push("ML__selected");const k=C.length===1?C[0]:C.filter((We,Je,Ot)=>We.length>0&&Ot.indexOf(We)===Je).join(" ");if(k.length>0&&(b+=` class="${k}"`),this.id&&(b+=` data-atom-id=${this.id}`),this.cssId&&(b+=` id="${this.cssId.replace(/ /g,"-")}" `),this.attributes&&(b+=" "+Object.keys(this.attributes).map(We=>`${We}="${this.attributes[We]}"`).join(" ")),this.htmlData){const We=this.htmlData.split(",");for(const Je of We){const Ot=Je.match(/([^=]+)=(.+$)/);if(Ot){const bn=Ot[1].trim().replace(/ /g,"-");bn&&(b+=` data-${bn}="${Ot[2]}" `)}else{const bn=Je.trim().replace(/ /g,"-");bn&&(b+=` data-${bn} `)}}}const $=(o=this.cssProperties)!=null?o:{};this.hasExplicitWidth&&$.width===void 0&&($.width=`${Math.ceil(this._width*100)/100}em`);const ne=Object.keys($).map(We=>`${We}:${$[We]}`);if(this.scale!==void 0&&this.scale!==1&&(c.length>0||f.length>0)&&ne.push(`font-size: ${Math.ceil(this.scale*1e4)/100}%`),this.htmlStyle){const We=this.htmlStyle.split(";");let Je="";for(const Ot of We){const bn=Ot.match(/([^=]+):(.+$)/);if(bn){const Dt=bn[1].trim().replace(/ /g,"-");Dt&&(Je+=`${Dt}:${bn[2]};`)}}Je&&(b+=` style="${Je}"`)}ne.length>0&&(b+=` style="${ne.join(";")}"`);let Me="";return b.length>0||f.length>0?Me=`<span${b}>${c}${f}</span>`:Me=c,this.caret==="text"?Me+='<span class="ML__text-caret"></span>':this.caret==="math"&&(Me+='<span class="ML__caret"></span>'),Me}tryCoalesceWith(t){if(this.svgBody||!this.value||t.svgBody||!t.value)return!1;const n=this.children&&this.children.length>0,i=t.children&&t.children.length>0;if(n||i)return!1;if(t.cssProperties||this.cssProperties){for(const C of["border","border-left","border-right","border-right-width","left","margin","margin-left","margin-right","padding","position","width"])if(t.cssProperties&&C in t.cssProperties||this.cssProperties&&C in this.cssProperties)return!1}const o=this.cssProperties?Object.keys(this.cssProperties).length:0,c=t.cssProperties?Object.keys(t.cssProperties).length:0;if(o!==c)return!1;if(o>0){for(const C of Object.keys(this.cssProperties))if(this.cssProperties[C]!==t.cssProperties[C])return!1}const f=this.classes.trim().replace(/\s+/g," ").split(" "),b=t.classes.trim().replace(/\s+/g," ").split(" ");if(f.length!==b.length)return!1;f.sort(),b.sort();for(const[C,k]of f.entries())if(k==="vertical-separator"||k!==b[C])return!1;return this.value+=t.value,this.height=Math.max(this.height,t.height),this.depth=Math.max(this.depth,t.depth),this._width=this._width+t._width,this.maxFontSize=Math.max(this.maxFontSize,t.maxFontSize),this.italic=t.italic,!0}};function Pc(e){if(!e||e.length===0)return[];e[0].children=Pc(e[0].children);const t=[e[0]];for(let n=1;n<e.length;n++)t[t.length-1].tryCoalesceWith(e[n])||(e[n].children=Pc(e[n].children),t.push(e[n]));return t}function fc(e){return e.children&&(e.children=Pc(e.children)),e}function hc(e,t){if(!e)return new vn(null,t);const n=new vn(null,{classes:"ML__strut",type:"ignore"});n.setStyle("height",Math.max(0,e.height),"em");const i=[n];if(e.depth!==0){const o=new vn(null,{classes:"ML__strut--bottom",type:"ignore"});o.setStyle("height",e.height+e.depth,"em"),o.setStyle("vertical-align",-e.depth,"em"),i.push(o)}return i.push(e),new vn(i,F(E({},t),{type:"lift"}))}function ss(e){const t=cc(e)/2,n=new vn(null,{maxFontSize:0});return n.height=t+.166,n.depth=t-.166,n.svgBody=e,n}function tl(e,t){var n;if(e.type==="latex"){e.height=.9,e.depth=.2,e._width=1;return}if(e.value){e.height=-1/0,e.depth=-1/0,e._width=0,e.skew=-1/0,e.italic=-1/0;for(let i=0;i<e.value.length;i++){const o=fo(e.value.codePointAt(i),t);e.height=Math.max(e.height,o.height),e.depth=Math.max(e.depth,o.depth),e._width+=o.width,e.skew=o.skew,e.italic=o.italic}return}if(e.children&&e.children.length>0){let i=-1/0,o=-1/0,c=0;for(const f of e.children)f.height>i&&(i=f.height),f.depth>o&&(o=f.depth),c=Math.max(c,(n=f.maxFontSize)!=null?n:0);e.height=i,e.depth=o,e._width=e.children.reduce((f,b)=>f+b.width,0),e.maxFontSize=c}}function _l(e){if("individualShift"in e){const t=e.individualShift;let n=t[0];const i=[n],o=-n.shift-n.box.depth;let c=o;for(let f=1;f<t.length;f++){const b=t[f],C=-b.shift-c-b.box.depth,k=C-(n.box.height+n.box.depth);c=c+C,i.push(k),i.push(b),n=b}return[i,o]}if("top"in e){let t=e.top;for(const n of e.children)t-=typeof n=="number"?n:n.box.height+n.box.depth;return[e.children,t]}else{if("bottom"in e)return[e.children,-e.bottom];if("firstBaseline"in e){const t=e.firstBaseline[0];if(typeof t=="number")throw new Error("First child must be an element.");return[e.firstBaseline,-t.box.depth]}else if("shift"in e){const t=e.children[0];if(typeof t=="number")throw new Error("First child must be an element.");return[e.children,-t.box.depth-e.shift]}}return[null,0]}function ml(e){var t;const[n,i]=_l(e);if(!n)return[[],0,0];const o=new vn(null,{classes:"pstrut"});let c=0;for(const Je of n)if(typeof Je!="number"){const Ot=Je.box;c=Math.max(c,Ot.maxFontSize,Ot.height)}c+=2,o.height=c,o.setStyle("height",c,"em");const f=[];let b=i,C=i,k=i,$=0;for(const Je of n){if(typeof Je=="number")k+=Je;else{const Ot=Je.box,bn=(t=Je.classes)!=null?t:[],Dt=new vn([o,Ot],{classes:bn.join(" "),style:Je.style});Ot.setStyle("height",Ot.height+Ot.depth,"em"),Ot.setStyle("display","inline-block"),Dt.setStyle("top",-c-k-Ot.depth,"em"),Je.marginLeft&&Dt.setStyle("margin-left",Je.marginLeft,"em"),Je.marginRight&&Dt.setStyle("margin-right",Je.marginRight,"em"),f.push(Dt),k+=Ot.height+Ot.depth,$=Math.max($,Dt.width)}b=Math.min(b,k),C=Math.max(C,k)}f.forEach(Je=>{Je.softWidth=$});const ne=new vn(f,{classes:"vlist"});if(ne.softWidth=$,ne.height=C,ne.setStyle("height",C,"em"),b>=0)return[[new vn(ne,{classes:"vlist-r"})],C,-b];const Me=new vn(new vn(null),{classes:"vlist"});Me.height=-b,Me.setStyle("height",-b,"em");const We=new vn(8203,{classes:"vlist-s",maxFontSize:0});return We.softWidth=0,We.height=0,We.depth=0,[[new vn([ne,We],{classes:"vlist-r"}),new vn(Me,{classes:"vlist-r"})],C,-b]}var zi=class extends vn{constructor(e,t){var n;const[i,o,c]=ml(e);super(i.length===1?i[0]:i,{type:t==null?void 0:t.type,classes:((n=t==null?void 0:t.classes)!=null?n:"")+" vlist-t"+(i.length===2?" vlist-t2":"")}),this.height=o,this.depth=c,this.softWidth=i.reduce((f,b)=>Math.max(f,b.width),0)}};function su(e,t){var n,i,o,c,f;const b=e.metrics,C=new vn(t.base),k=(n=t.baseShift)!=null?n:0,$=(i=t.slant)!=null?i:0;let ne=0,Me=0;t.above&&(ne=(o=t.aboveShift)!=null?o:Math.max(b.bigOpSpacing1,b.bigOpSpacing3-t.above.depth)),t.below&&(Me=(c=t.belowShift)!=null?c:Math.max(b.bigOpSpacing2,b.bigOpSpacing4-t.below.height));let We=null;if(t.below&&t.above){const Je=b.bigOpSpacing5+t.below.height+t.below.depth+Me+C.depth+k;We=new zi({bottom:Je,children:[b.bigOpSpacing5,{box:t.below,marginLeft:-$,classes:["ML__center"]},Me,{box:C,classes:["ML__center"]},ne,{box:t.above,marginLeft:$,classes:["ML__center"]},b.bigOpSpacing5]}).wrap(e)}else if(t.below&&!t.above)We=new zi({top:C.height-k,children:[b.bigOpSpacing5,{box:t.below,marginLeft:-$,classes:["ML__center"]},Me,{box:C,classes:["ML__center"]}]}).wrap(e);else if(!t.below&&t.above){const Je=C.depth+k;We=new zi({bottom:Je,children:[{box:C,classes:["ML__center"]},ne,{box:t.above,marginLeft:$,classes:["ML__center"]},b.bigOpSpacing5]}).wrap(e)}else{const Je=C.depth+k;We=new zi({bottom:Je,children:[{box:C},b.bigOpSpacing5]}).wrap(e)}return new vn(We,{type:(f=t.type)!=null?f:"op"})}var pc=7,_s=6,Gl=5,Zs=4,Ws=3,bo=2,Vo=1,no=0,Ls=class{constructor(e,t,n){this.id=e,this.sizeDelta=t,this.cramped=n;const i={"-4":2,"-3":1,0:0}[t];this.metrics=Object.keys(yo).reduce((o,c)=>F(E({},o),{[c]:yo[c][i]}),{})}getFontSize(e){return Math.max(1,e+this.sizeDelta)}get sup(){return Si[[no,Vo,no,Vo,bo,Ws,bo,Ws][this.id]]}get sub(){return Si[[no,no,no,no,bo,bo,bo,bo][this.id]]}get fracNum(){return Si[[no,Vo,no,Vo,bo,Ws,Zs,Gl][this.id]]}get fracDen(){return Si[[no,no,no,no,bo,bo,Zs,Zs][this.id]]}get cramp(){return Si[[no,no,bo,bo,Zs,Zs,_s,_s][this.id]]}get isTight(){return this.sizeDelta<0}},ui={7:new Ls(pc,0,!1),6:new Ls(_s,0,!0),5:new Ls(Gl,0,!1),4:new Ls(Zs,0,!0),3:new Ls(Ws,-3,!1),2:new Ls(bo,-3,!0),1:new Ls(Vo,-4,!1),0:new Ls(no,-4,!0)},Si=F(E({},ui),{displaystyle:ui[pc],textstyle:ui[Gl],scriptstyle:ui[Ws],scriptscriptstyle:ui[Vo]});function xo(e,t){var n;if(!e)return 0;const i={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:vo,bp:803/800,dd:1238/1157,pc:12,in:72.27,mu:10/18}[(n=e.unit)!=null?n:"pt"];if(Number.isFinite(t)){const o=Wl(10,t);return Math.round(e.dimension/vo*i*o)/o}return e.dimension*i}function Is(e,t){if(e===null)return 0;const n=xo(e)/vo;if(Number.isFinite(t)){const i=Wl(10,t);return Math.round(n*i)/i}return n}function Ts(e){var t;return`${e.dimension}${(t=e.unit)!=null?t:"pt"}`}function Oc(e){let t=Ts(e.glue);return e.grow&&e.grow.dimension!==0&&(t+=` plus ${Ts(e.grow)}`),e.shrink&&e.shrink.dimension!==0&&(t+=` minus ${Ts(e.shrink)}`),t}function ka(e){var t,n;if(e==null)return null;let i="";if("dimension"in e&&(i=`${e.dimension}${(t=e.unit)!=null?t:"pt"}`),"glue"in e&&(i=Oc(e)),"number"in e)if(!("base"in e)||e.base==="decimal")i=Number(e.number).toString();else if(e.base==="alpha")i=`\`${String.fromCodePoint(e.number)}`;else{const o=Math.round(e.number)>>>0;e.base==="hexadecimal"?(i=Number(o).toString(16).toUpperCase(),o<=255?i=i.padStart(2,"0"):o<=65535?i=i.padStart(4,"0"):o<=16777215?i=i.padStart(6,"0"):i=i.padStart(8,"0"),i=`"${i}`):e.base==="octal"&&(i=Number(o).toString(8),o<=63?i=i.padStart(2,"0"):o<=30583?i=i.padStart(4,"0"):i=i.padStart(8,"0"),i=`'${i}`)}return"register"in e&&("factor"in e&&(e.factor===-1?i="-":e.factor!==1&&(i=Number(e.factor).toString())),"global"in e&&e.global&&(i+="\\global"),i+=`\\${e.register}`),"string"in e&&(i=e.string),(n=e.relax)!=null&&n&&(i+="\\relax"),i}function ls(e,t){return e==null?null:"number"in e?F(E({},e),{number:e.number*t}):"register"in e?"factor"in e&&e.factor?F(E({},e),{factor:e.factor*t}):F(E({},e),{factor:t}):"dimension"in e?F(E({},e),{dimension:e.dimension*t}):"glue"in e?e.shrink&&e.grow?{glue:ls(e.glue,t),shrink:ls(e.shrink,t),grow:ls(e.grow,t)}:e.shrink?{glue:ls(e.glue,t),shrink:ls(e.shrink,t)}:e.grow?{glue:ls(e.glue,t),grow:ls(e.grow,t)}:{glue:ls(e.glue,t)}:null}var Ac={"p@":{dimension:1},"z@":{dimension:0},maxdimen:{dimension:16383.99999},hfuzz:{dimension:.1},vfuzz:{dimension:.1},overfullrule:{dimension:5},hsize:{dimension:6.5,unit:"in"},vsize:{dimension:8.9,unit:"in"},parindent:{dimension:20},maxdepth:{dimension:4},splitmaxdepth:{register:"maxdimen"},boxmaxdepth:{register:"maxdimen"},delimitershortfall:{dimension:5},nulldelimiterspace:{dimension:1.2,unit:"pt"},scriptspace:{dimension:.5},topskip:{dimension:10},splittopskip:{dimension:10},normalbaselineskip:{dimension:12},normallineskip:{dimension:1},normallineskiplimit:{dimension:0},jot:{dimension:3},doublerulesep:{dimension:2},arrayrulewidth:{dimension:.4},arraycolsep:{dimension:5},fboxsep:{dimension:3},fboxrule:{dimension:.4},"z@skip":{glue:{dimension:0},shrink:{dimension:0},grow:{dimension:0}},hideskip:{glue:{dimension:-1e3},grow:{dimension:1,unit:"fill"}},"@flushglue":{glue:{dimension:0},grow:{dimension:1,unit:"fill"}},parskip:{glue:{dimension:0},grow:{dimension:1}},abovedisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},abovedisplayshortskip:{glue:{dimension:0},grow:{dimension:3}},belowdisplayskip:{glue:{dimension:12},grow:{dimension:3},shrink:{dimension:9}},belowdisplayshortskip:{glue:{dimension:7},grow:{dimension:3},shrink:{dimension:4}},parfillskip:{glue:{dimension:0},grow:{dimension:1,unit:"fil"}},thinmuskip:{glue:{dimension:3,unit:"mu"}},medmuskip:{glue:{dimension:4,unit:"mu"},grow:{dimension:2,unit:"mu"},shrink:{dimension:4,unit:"mu"}},thickmuskip:{glue:{dimension:5,unit:"mu"},grow:{dimension:5,unit:"mu"}},smallskipamount:{glue:{dimension:3},grow:{dimension:1},shrink:{dimension:1}},medskipamount:{glue:{dimension:6},grow:{dimension:2},shrink:{dimension:3}},bigskipamount:{glue:{dimension:12},grow:{dimension:2},shrink:{dimension:4}},pretolerance:100,tolerance:200,hbadness:1e3,vbadness:1e3,linepenalty:10,hyphenpenalty:50,exhyphenpenalty:50,binoppenalty:700,relpenalty:500,clubpenalty:150,widowpenalty:150,displaywidowpenalty:50,brokenpenalty:100,predisplaypenalty:1e4,doublehyphendemerits:1e4,finalhyphendemerits:5e3,adjdemerits:1e4,tracinglostchars:1,uchyph:1,delimiterfactor:901,defaulthyphenchar:"\\-",defaultskewchar:-1,newlinechar:-1,showboxbreadth:5,showboxdepth:3,errorcontextlines:5,interdisplaylinepenalty:100,interfootnotelinepenalty:100,baselineSkip:1.2,arraystretch:1,month:new Date().getMonth()+1,day:new Date().getDate(),year:new Date().getFullYear()};function nl(){return E({},Ac)}function lu(){return{registers:nl(),smartFence:!1,renderPlaceholder:void 0,placeholderSymbol:"\u25A2",letterShapeStyle:Ce.locale.startsWith("fr")?"french":"tex",minFontScale:0,colorMap:be,backgroundColorMap:D,getMacro:e=>$e(e,qe())}}var xi=class D0{constructor(t,n){var i,o,c,f,b,C,k,$,ne,Me,We,Je,Ot,bn,Dt;let en;t!=null&&t.parent?(this.parent=t.parent,en=t.parent,this.registers={}):(en=E(E({},lu()),(i=t==null?void 0:t.from)!=null?i:{}),this.registers=en.registers),en.atomIdsSettings&&(this.atomIdsSettings=E({},en.atomIdsSettings)),this.renderPlaceholder=en.renderPlaceholder,this.isPhantom=(f=(c=t==null?void 0:t.isPhantom)!=null?c:(o=this.parent)==null?void 0:o.isPhantom)!=null?f:!1,this.letterShapeStyle=en.letterShapeStyle,this.minFontScale=en.minFontScale,n!=null&&n.color&&n.color!=="none"?this.color=n.color:this.color=(C=(b=this.parent)==null?void 0:b.color)!=null?C:"",n!=null&&n.backgroundColor&&n.backgroundColor!=="none"?this.backgroundColor=n.backgroundColor:this.backgroundColor=($=(k=this.parent)==null?void 0:k.backgroundColor)!=null?$:"",n!=null&&n.fontSize&&n.fontSize!=="auto"&&n.fontSize!==((ne=this.parent)==null?void 0:ne.size)?this.size=n.fontSize:this.size=(We=(Me=this.parent)==null?void 0:Me.size)!=null?We:Vi;let Ln=(Ot=(Je=this.parent)==null?void 0:Je.mathstyle)!=null?Ot:Si.displaystyle;if(typeof(t==null?void 0:t.mathstyle)=="string"){if(en instanceof D0)switch(t.mathstyle){case"cramp":Ln=Ln.cramp;break;case"superscript":Ln=Ln.sup;break;case"subscript":Ln=Ln.sub;break;case"numerator":Ln=Ln.fracNum;break;case"denominator":Ln=Ln.fracDen;break}switch(t.mathstyle){case"textstyle":Ln=Si.textstyle;break;case"displaystyle":Ln=Si.displaystyle;break;case"scriptstyle":Ln=Si.scriptstyle;break;case"scriptscriptstyle":Ln=Si.scriptscriptstyle;break;case"":case"auto":break}}this.mathstyle=Ln,this.smartFence=en.smartFence,this.placeholderSymbol=en.placeholderSymbol,this.colorMap=(bn=en.colorMap)!=null?bn:sn=>sn,this.backgroundColorMap=(Dt=en.backgroundColorMap)!=null?Dt:sn=>sn,this.getMacro=en.getMacro,console.assert(this.parent!==void 0||this.registers!==void 0)}makeID(){if(!this.atomIdsSettings)return;if(this.atomIdsSettings.overrideID)return this.atomIdsSettings.overrideID;if(typeof this.atomIdsSettings.seed!="number")return`${Date.now().toString(36).slice(-2)}${Math.floor(Math.random()*1e5).toString(36)}`;const t=this.atomIdsSettings.seed.toString(36);return this.atomIdsSettings.seed+=1,t}scale(t){return t*this.effectiveFontSize}get scalingFactor(){return this.parent?this.effectiveFontSize/this.parent.effectiveFontSize:1}get isDisplayStyle(){return this.mathstyle.id===pc||this.mathstyle.id===_s}get isCramped(){return this.mathstyle.cramped}get isTight(){return this.mathstyle.isTight}get metrics(){return this.mathstyle.metrics}get effectiveFontSize(){return Math.max(to[Math.max(1,this.size+this.mathstyle.sizeDelta)],this.minFontScale)}getRegister(t){var n;if((n=this.registers)!=null&&n[t])return this.registers[t];if(this.parent)return this.parent.getRegister(t)}getRegisterAsNumber(t){const n=this.getRegister(t);if(typeof n=="number")return n;if(typeof n=="string")return Number(n)}getRegisterAsGlue(t){var n;if((n=this.registers)!=null&&n[t]){const i=this.registers[t];return typeof i=="object"&&"glue"in i?i:typeof i=="object"&&"dimension"in i?{glue:{dimension:i.dimension}}:typeof i=="number"?{glue:{dimension:i}}:void 0}if(this.parent)return this.parent.getRegisterAsGlue(t)}getRegisterAsEm(t,n){return Is(this.getRegisterAsDimension(t),n)}getRegisterAsDimension(t){var n;if((n=this.registers)!=null&&n[t]){const i=this.registers[t];return typeof i=="object"&&"glue"in i?i.glue:typeof i=="object"&&"dimension"in i?i:typeof i=="number"?{dimension:i}:void 0}if(this.parent)return this.parent.getRegisterAsDimension(t)}setRegister(t,n){if(n===void 0){delete this.registers[t];return}this.registers[t]=n}evaluate(t){if(!t||!("register"in t))return t;let n=this;if("global"in t&&t.global)for(;n.parent;)n=n.parent;let i=1;"factor"in t&&t.factor!==1&&t.factor!==void 0&&(i=t.factor);const o=n.getRegister(t.register);if(o===void 0)return;if(typeof o=="string")return{string:Number(o).toString()+o};if(typeof o=="number")return{number:i*o};const c=n.evaluate(o);if(c!==void 0)return"string"in c?{string:Number(o).toString()+c.string}:"number"in c?{number:i*c.number}:"dimension"in c?F(E({},c),{dimension:i*c.dimension}):"glue"in c?F(E({},c),{glue:F(E({},c.glue),{dimension:i*c.glue.dimension}),shrink:c.shrink?F(E({},c.shrink),{dimension:i*c.shrink.dimension}):void 0,grow:c.grow?F(E({},c.grow),{dimension:i*c.grow.dimension}):void 0}):t}toDimension(t){const n=this.evaluate(t);return n===void 0?null:"dimension"in n?n:"glue"in n?n.glue:"number"in n?{dimension:n.number}:null}toEm(t,n){if(t===null)return 0;const i=this.toDimension(t);return i===null?0:xo(i,n)/vo}toNumber(t){if(t===null)return null;const n=this.evaluate(t);return n===void 0?null:"number"in n?n.number:"dimension"in n?n.dimension:"glue"in n?n.glue.dimension:"string"in n?Number(n.string):null}toColor(t){var n,i;if(t===null)return null;const o=this.evaluate(t);return o===void 0?null:"string"in o?(i=(n=this.colorMap)==null?void 0:n.call(this,o.string))!=null?i:o.string:null}toBackgroundColor(t){var n,i;if(t===null)return null;const o=this.evaluate(t);return o===void 0?null:"string"in o?(i=(n=this.backgroundColorMap)==null?void 0:n.call(this,o.string))!=null?i:o.string:null}},mc=["body","above","below","superscript","subscript"];function gl(e){return typeof e=="string"&&mc.includes(e)}function Bc(e){return e!==void 0&&Array.isArray(e)&&e.length===2}var Zt=class ec{constructor(t){var n,i,o,c,f,b;this.type=t.type,typeof t.value=="string"&&(this.value=t.value),this.command=(i=(n=t.command)!=null?n:this.value)!=null?i:"",this.mode=(o=t.mode)!=null?o:"math",t.isFunction&&(this.isFunction=!0),t.limits&&(this.subsupPlacement=t.limits),this.style=E({},t.style),this.displayContainsHighlight=(c=t.displayContainsHighlight)!=null?c:!1,this.captureSelection=(f=t.captureSelection)!=null?f:!1,this.skipBoundary=(b=t.skipBoundary)!=null?b:!1,t.verbatimLatex!==void 0&&t.verbatimLatex!==null&&(this.verbatimLatex=t.verbatimLatex),t.args&&(this.args=t.args),t.body&&(this.body=t.body),this._changeCounter=0}static createBox(t,n,i){var o;if(!n)return null;const c=yd(n),f=[];for(const C of c){const k=C[0].style,$=bd(t,C,{style:{color:k.color,backgroundColor:k.backgroundColor,fontSize:k.fontSize}});$&&f.push($)}if(f.length===0)return null;const b=((o=i==null?void 0:i.classes)!=null?o:"").trim();return f.length===1&&!b&&!(i!=null&&i.type)?f[0].wrap(t):new vn(f,{classes:b,type:i==null?void 0:i.type}).wrap(t)}static serialize(t,n){return jo.serialize(t,n)}static commonAncestor(t,n){if(t===n||t.parent===n.parent)return t.parent;const i=new WeakSet;let{parent:o}=t;for(;o;)i.add(o),o=o.parent;for(o=n.parent;o;){if(i.has(o))return o;o=o.parent}console.assert(!!o)}static fromJson(t){return typeof t=="string"?new ec({type:"mord",value:t,mode:"math"}):new ec(t)}get latexMode(){return this.mode==="math"?"math":"text"}toJson(){const t={};if(this.type&&(t.type=this.type),this.mode!=="math"&&(t.mode=this.mode),this.command&&this.command!==this.value&&(t.command=this.command),this.value!==void 0&&(t.value=this.value),this.style&&Object.keys(this.style).length>0&&(t.style=E({},this.style)),this.verbatimLatex!==void 0&&(t.verbatimLatex=this.verbatimLatex),this.subsupPlacement&&(t.subsupPlacement=this.subsupPlacement),this.explicitSubsupPlacement&&(t.explicitSubsupPlacement=!0),this.isFunction&&(t.isFunction=!0),this.displayContainsHighlight&&(t.displayContainsHighlight=!0),this.isExtensibleSymbol&&(t.isExtensibleSymbol=!0),this.skipBoundary&&(t.skipBoundary=!0),this.captureSelection&&(t.captureSelection=!0),this.args&&(t.args=Nu(this.args)),this._branches)for(const n of Object.keys(this._branches))this._branches[n]&&(t[n]=this._branches[n].filter(i=>i.type!=="first").map(i=>i.toJson()));return t.type==="mord"&&Object.keys(t).length===2&&"value"in t?t.value:t}get changeCounter(){return this.parent?this.parent.changeCounter:this._changeCounter}set isDirty(t){if(t){this.parent||this._changeCounter++,"verbatimLatex"in this&&(this.verbatimLatex=void 0),this._children=void 0;let{parent:n}=this;for(;n;)n.parent||n._changeCounter++,"verbatimLatex"in n&&(n.verbatimLatex=void 0),n._children=void 0,n=n.parent}}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const n=re(this.command,this.mode);return n!=null&&n.serialize?n.serialize(this,t):this.body&&this.command?ri([Ji(this.command,this.bodyToLatex(t)),this.supsubToLatex(t)]):this.body?ri([this.bodyToLatex(t),this.supsubToLatex(t)]):!this.value||this.value==="\u200B"?"":this.command}bodyToLatex(t){var n;return jo.serialize(this.body,F(E({},t),{defaultMode:(n=t.defaultMode)!=null?n:this.latexMode}))}aboveToLatex(t){return jo.serialize(this.above,t)}belowToLatex(t){return jo.serialize(this.below,t)}supsubToLatex(t){let n="";if(t=F(E({},t),{defaultMode:"math"}),this.branch("subscript")!==void 0){const i=jo.serialize(this.subscript,t);i.length===0?n+="_{}":i.length===1?/^[0-9]$/.test(i)?n+=`_${i}`:n+=`_{${i}}`:n+=`_{${i}}`}if(this.branch("superscript")!==void 0){const i=jo.serialize(this.superscript,t);i.length===0?n+="^{}":i.length===1?i==="\u2032"?n+="^\\prime ":i==="\u2033"?n+="^\\doubleprime ":/^[0-9]$/.test(i)?n+=`^${i}`:n+=`^{${i}}`:n+=`^{${i}}`}return n}get treeDepth(){let t=1,n=this.parent;for(;n;)n=n.parent,t+=1;return t}get inCaptureSelection(){let t=this;for(;t;){if(t.captureSelection)return!0;t=t.parent}return!1}get parentPrompt(){let t=this.parent;for(;t;){if(t.type==="prompt"&&!t.captureSelection)return t;t=t.parent}return null}branch(t){if(gl(t)&&this._branches)return this._branches[t]}get branches(){if(!this._branches)return[];const t=[];for(const n of mc)this._branches[n]&&t.push(n);return t}createBranch(t){return console.assert(gl(t)),gl(t)?(this._branches?this._branches[t]||(this._branches[t]=[this.makeFirstAtom(t)]):this._branches={[t]:[this.makeFirstAtom(t)]},this.isDirty=!0,this._branches[t]):[]}get row(){return Bc(this.parentBranch)?this.parentBranch[0]:-1}get col(){return Bc(this.parentBranch)?this.parentBranch[1]:-1}get body(){var t;return(t=this._branches)==null?void 0:t.body}set body(t){this.setChildren(t,"body")}get superscript(){var t;return(t=this._branches)==null?void 0:t.superscript}set superscript(t){this.setChildren(t,"superscript")}get subscript(){var t;return(t=this._branches)==null?void 0:t.subscript}set subscript(t){this.setChildren(t,"subscript")}get above(){var t;return(t=this._branches)==null?void 0:t.above}set above(t){this.setChildren(t,"above")}get below(){var t;return(t=this._branches)==null?void 0:t.below}set below(t){this.setChildren(t,"below")}get computedStyle(){var t,n;const i=typeof this.style.verbatimColor=="string",o=typeof this.style.verbatimBackgroundColor=="string",c=E(E({},(n=(t=this.parent)==null?void 0:t.computedStyle)!=null?n:{}),this.style);return delete c.variant,delete c.variantStyle,o||delete c.verbatimBackgroundColor,i||delete c.verbatimColor,c}applyStyle(t){this.isDirty=!0,this.style=E(E({},this.style),t),this.style.fontFamily==="none"&&delete this.style.fontFamily,this.style.fontShape==="auto"&&delete this.style.fontShape,this.style.fontSeries==="auto"&&delete this.style.fontSeries,this.style.color==="none"&&(delete this.style.color,delete this.style.verbatimColor),this.style.backgroundColor==="none"&&(delete this.style.backgroundColor,delete this.style.verbatimBackgroundColor),this.style.fontSize==="auto"&&delete this.style.fontSize;for(const n of this.children)n.applyStyle(t)}getInitialBaseElement(){var t,n,i;return this.hasEmptyBranch("body")?this:(console.assert(((t=this.body)==null?void 0:t[0].type)==="first"),(i=(n=this.body[1])==null?void 0:n.getInitialBaseElement())!=null?i:this)}getFinalBaseElement(){return this.hasEmptyBranch("body")?this:this.body[this.body.length-1].getFinalBaseElement()}isCharacterBox(){return this.type==="leftright"||this.type==="genfrac"||this.type==="subsup"||this.type==="delim"||this.type==="array"||this.type==="surd"?!1:this.getFinalBaseElement().type==="mord"}hasEmptyBranch(t){const n=this.branch(t);return n?(console.assert(n.length>0),console.assert(n[0].type==="first"),n.length===1):!0}setChildren(t,n){var i;if(!t||(console.assert(gl(n)),!gl(n)))return;console.assert(((i=t[0])==null?void 0:i.type)!=="first");const o=[this.makeFirstAtom(n),...t];this._branches?this._branches[n]=o:this._branches={[n]:o};for(const c of t)c.parent=this,c.parentBranch=n;this.isDirty=!0}makeFirstAtom(t){const n=new ec({type:"first",mode:this.mode});return n.parent=this,n.parentBranch=t,n}addChild(t,n){console.assert(t.type!=="first"),this.createBranch(n).push(t),this.isDirty=!0,t.parent=this,t.parentBranch=n}addChildBefore(t,n){console.assert(n.parentBranch!==void 0);const i=this.createBranch(n.parentBranch);i.splice(i.indexOf(n),0,t),this.isDirty=!0,t.parent=this,t.parentBranch=n.parentBranch}addChildAfter(t,n){console.assert(n.parentBranch!==void 0);const i=this.createBranch(n.parentBranch);i.splice(i.indexOf(n)+1,0,t),this.isDirty=!0,t.parent=this,t.parentBranch=n.parentBranch}addChildren(t,n){const i=this.createBranch(n);for(const o of t)o.parent=this,o.parentBranch=n,i.push(o);this.isDirty=!0}addChildrenAfter(t,n){console.assert(t.length===0||t[0].type!=="first"),console.assert(n.parentBranch!==void 0);const i=this.createBranch(n.parentBranch);i.splice(i.indexOf(n)+1,0,...t),this.isDirty=!0;for(const o of t)o.parent=this,o.parentBranch=n.parentBranch;return t[t.length-1]}removeBranch(t){const n=this.branch(t);if(gl(t)&&(this._branches[t]=void 0),!n)return[];for(const i of n)i.parent=void 0,i.parentBranch=void 0;return console.assert(n[0].type==="first"),n.shift(),this.isDirty=!0,n}removeChild(t){if(console.assert(t.parent===this),t.type==="first")return;const n=this.branch(t.parentBranch),i=n.indexOf(t);console.assert(i>=0),n.splice(i,1),this.isDirty=!0,t.parent=void 0,t.parentBranch=void 0}get siblings(){return this.parent?this.parent.branch(this.parentBranch):[]}get firstSibling(){return this.siblings[0]}get lastSibling(){const{siblings:t}=this;return t[t.length-1]}get isFirstSibling(){return this===this.firstSibling}get isLastSibling(){return this===this.lastSibling}get hasNoSiblings(){return this.siblings.length===1}get leftSibling(){console.assert(this.parent!==void 0);const t=this.parent.branch(this.parentBranch);return t[t.indexOf(this)-1]}get rightSibling(){console.assert(this.parent!==void 0);const t=this.parent.branch(this.parentBranch);return t[t.indexOf(this)+1]}get hasChildren(){return!!(this._branches&&this.children.length>0)}get firstChild(){return console.assert(this.hasChildren),this.children[0]}get lastChild(){console.assert(this.hasChildren);const{children:t}=this;return t[t.length-1]}get children(){if(this._children)return this._children;if(!this._branches)return[];const t=[];for(const n of mc)if(this._branches[n])for(const i of this._branches[n])t.push(...i.children),t.push(i);return this._children=t,t}render(t){if(this.type==="first"&&!t.atomIdsSettings)return null;const n=re(this.command,this.mode);if(n!=null&&n.render)return n.render(this,t);const i=new xi({parent:t},this.style);let o=this.createBox(i,{classes:this.parent?"":"ML__base"});return o?(!this.subsupPlacement&&(this.superscript||this.subscript)&&(o=this.attachSupsub(i,{base:o})),o.wrap(i)):null}attachSupsub(t,n){var i;const o=n.base,c=this.superscript,f=this.subscript;if(!c&&!f)return o;let b=null,C=null;const k=(i=n.isCharacterBox)!=null?i:this.isCharacterBox();let $=0;if(c){const Ot=new xi({parent:t,mathstyle:"superscript"});b=ec.createBox(Ot,c),k||($=o.height-t.metrics.supDrop*Ot.scalingFactor)}let ne=0;if(f){const Ot=new xi({parent:t,mathstyle:"subscript"});C=ec.createBox(Ot,f),k||(ne=o.depth+t.metrics.subDrop*Ot.scalingFactor)}let Me;t.isDisplayStyle?Me=t.metrics.sup1:t.isCramped?Me=t.metrics.sup3:Me=t.metrics.sup2;const We=.5/vo/t.scalingFactor;let Je=null;if(C&&b){$=Math.max($,Me,b.depth+.25*t.metrics.xHeight),ne=Math.max(ne,t.metrics.sub2);const Ot=t.metrics.defaultRuleThickness;if($-b.depth-(C.height-ne)<4*Ot){ne=4*Ot-($-b.depth)+C.height;const Dt=.8*t.metrics.xHeight-($-b.depth);Dt>0&&($+=Dt,ne-=Dt)}const bn=this.isExtensibleSymbol&&o.italic?-o.italic:0;Je=new zi({individualShift:[{box:C,shift:ne,marginLeft:bn},{box:b,shift:-$}]}).wrap(t)}else C&&!b?(ne=Math.max(ne,t.metrics.sub1,C.height-.8*Ga),Je=new zi({shift:ne,children:[{box:C,marginRight:We,marginLeft:this.isCharacterBox()?-o.italic:0}]})):!C&&b&&($=Math.max($,Me,b.depth+.25*Ga),Je=new zi({shift:-$,children:[{box:b,marginRight:We}]}));return new vn([o,new vn(Je,{caret:this.caret,isSelected:this.isSelected,classes:"msubsup"})],{type:n.type})}attachLimits(t,n){const i=this.superscript?ec.createBox(new xi({parent:t,mathstyle:"superscript"},this.style),this.superscript):null,o=this.subscript?ec.createBox(new xi({parent:t,mathstyle:"subscript"},this.style),this.subscript):null;return!i&&!o?n.base.wrap(t):su(t,F(E({},n),{above:i,below:o}))}bind(t,n){if(!n||t.isPhantom||this.value==="\u200B")return n;let i=this.parent;for(;i&&!i.captureSelection;)i=i.parent;return i!=null&&i.captureSelection||(this.id||(this.id=t.makeID()),n.atomID=this.id),n}createBox(t,n){var i,o,c,f;const b=(i=this.value)!=null?i:this.body,C=(o=n==null?void 0:n.boxType)!=null?o:dc(this.type);let k=(c=n==null?void 0:n.classes)!=null?c:"";this.mode==="text"&&(k+=" ML__text");const $=typeof b=="string"||b===void 0?new vn(b!=null?b:null,{type:C,isSelected:this.isSelected,mode:this.mode,maxFontSize:t.scalingFactor,style:F(E({variant:"normal"},this.style),{fontSize:Math.max(1,t.size+t.mathstyle.sizeDelta)}),letterShapeStyle:t.letterShapeStyle,classes:k}):(f=ec.createBox(t,b,{type:C,classes:k}))!=null?f:new vn(null);return t.isTight&&($.isTight=!0),(this.mode!=="math"||this.style.variant==="main")&&($.italic=0),$.right=$.italic,this.bind(t,$),this.caret&&!this.superscript&&!this.subscript&&($.caret=this.caret),$}isDigit(){var t;return this.type==="mord"&&this.value?/^[\d,\.]$/.test(this.value):this.type==="group"&&((t=this.body)==null?void 0:t.length)===2?this.body[0].type==="first"&&this.body[1].value===",":!1}asDigit(){var t;return this.type==="mord"&&this.value&&/^[\d,\.]$/.test(this.value)?this.value:this.type==="group"&&((t=this.body)==null?void 0:t.length)===2&&this.body[0].type==="first"&&this.body[1].value===","?".":""}};function yd(e){let t;const n=[];let i=[];for(const o of e)if(!t&&!o.style)i.push(o);else{const c=o.computedStyle;t&&c.color===t.color&&c.backgroundColor===t.backgroundColor&&c.fontSize===t.fontSize?i.push(o):(i.length>0&&n.push(i),i=[o],t=c)}return i.length>0&&n.push(i),n}function bd(e,t,n){var i,o,c,f,b;if(!t||t.length===0)return null;const C=new xi({parent:e},n.style),k=!((i=C.atomIdsSettings)!=null&&i.groupNumbers);let $=[];if(t.length===1){const Me=t[0],We=Me.render(C);We&&(k&&Me.isSelected&&We.selected(!0),$=[We])}else{let Me="",We=!0;for(const Je of t){(o=C.atomIdsSettings)!=null&&o.groupNumbers&&Me&&(We&&Je.isDigit()||!We&&Bu(Je))&&(C.atomIdsSettings.overrideID=Me);const Ot=Je.render(C);C.atomIdsSettings&&(C.atomIdsSettings.overrideID=void 0),Ot&&((c=C.atomIdsSettings)!=null&&c.groupNumbers&&((Je.isDigit()||Bu(Je))&&(!Me||We!==Je.isDigit())&&(We=Je.isDigit(),Me=(f=Je.id)!=null?f:""),Me&&(!(Je.isDigit()||Bu(Je))||!Je.hasEmptyBranch("superscript")||!Je.hasEmptyBranch("subscript"))&&(Me="")),k&&Je.isSelected&&Ot.selected(!0),$.push(Ot))}}if($.length===0)return null;const ne=new vn($,F(E({isTight:C.isTight},n),{type:(b=n.type)!=null?b:"lift"}));return ne.isSelected=$.every(Me=>Me.isSelected),ne.wrap(C)}function Bu(e){return e.mode==="text"}function Nu(e){return e.map(t=>t===null?"<null>":Array.isArray(t)&&t[0]instanceof Zt?{atoms:t.map(n=>n.toJson())}:typeof t=="object"&&"group"in t?{group:t.group.map(n=>n.toJson())}:t)}var vl=class $0 extends Zt{constructor(t,n,i){super({type:"text",command:t,mode:"text",displayContainsHighlight:!0}),this.value=n,this.verbatimLatex=n,this.applyStyle(i)}static fromJson(t){return new $0(t.command,t.value,t.style)}render(t){const n=this.createBox(t);return this.caret&&(n.caret=this.caret),n}_serialize(t){var n;return(n=this.verbatimLatex)!=null?n:Ne("text",this.value.codePointAt(0))}};function Nc(e,t){if(e.direction===t.direction){const n=e.ranges.length;if(t.ranges.length===n){let i=0;for(;i<n&&uf(e.ranges[i],t.ranges[i])==="equal";)i++;return i===n?"equal":"different"}}return"different"}function uf(e,t){return e[0]===t[0]&&e[1]===t[1]?"equal":"different"}function ko(e){let t=1/0,n=-1/0;for(const i of e.ranges)t=Math.min(t,i[0],i[1]),n=Math.max(n,i[0],i[1]);return[t,n]}function Ll(e){return typeof e=="number"&&!Number.isNaN(e)}function cu(e){return Array.isArray(e)&&e.length===2}function uu(e){return e!=null&&typeof e=="object"&&"ranges"in e&&Array.isArray(e.ranges)}function df(e,t){const n=e.at(t);let i;if(n){i=n.mode;let o=n.parent;for(;!i&&o;)o&&(i=o.mode),o=o.parent}return i}function xd(e,t){if(!t)return"";if(typeof t=="string")return t;if(!e||t.after===void 0)return t.value;let n=!1,i=!1,o=!1,c=!1,f=!1,b=!1,C=!1,k=!1,$=!1,ne=!1,Me=!1,We=!1,Je=!1,Ot=!1,bn=!1,Dt=e[0],en=0;for(;Dt!=null&&Dt.type&&/^(subsup|placeholder)$/.test(Dt.type);)en+=1,Dt=e[en];return n=!Dt||Dt.type==="first",Dt&&(Ot=Dt.mode==="text",i=!Ot&&Dt.type==="mord"&&g.test(Dt.value),o=!Ot&&Dt.type==="mord"&&/\d+$/.test(Dt.value),c=!Ot&&Dt.isFunction,f=Dt.type==="genfrac",b=Dt.type==="surd",C=Dt.type==="mbin",k=Dt.type==="mrel",$=Dt.type==="mop"||Dt.type==="operator"||Dt.type==="extensible-symbol",ne=Dt.type==="mpunct"||Dt.type==="minner",Me=Dt.type==="array",We=Dt.type==="mopen",Je=Dt.type==="mclose"||Dt.type==="leftright",bn=Dt.type==="space"),t.after.includes("nothing")&&n||t.after.includes("letter")&&i||t.after.includes("digit")&&o||t.after.includes("function")&&c||t.after.includes("frac")&&f||t.after.includes("surd")&&b||t.after.includes("binop")&&C||t.after.includes("relop")&&k||t.after.includes("operator")&&$||t.after.includes("punct")&&ne||t.after.includes("array")&&Me||t.after.includes("openfence")&&We||t.after.includes("closefence")&&Je||t.after.includes("text")&&Ot||t.after.includes("space")&&bn?t.value:""}function Ru(e,t,n){return n?xd(e,n[t]):""}var Sd={"&":"\\&","%":"\\%",$:"\\$","''":"^{\\doubleprime}","'''":"^{\\prime\\prime\\prime}","''''":"^{\\prime\\prime\\prime\\prime}",alpha:"\\alpha",delta:"\\delta",Delta:"\\Delta",pi:"\\pi",Pi:"\\Pi",theta:"\\theta",Theta:"\\Theta",ii:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryI"},jj:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryJ"},ee:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\exponentialE"},nabla:"\\nabla",grad:"\\nabla",del:"\\partial",deg:{after:"digit+space",value:"\\degree"},infty:"\\infty","\u221E":"\\infty",oo:{after:"nothing+digit+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\infty"},"\u2211":"\\sum",sum:"\\sum_{#?}^{#?}",int:"\\int_{#?}^{#?}",prod:"\\prod_{#?}^{#?}",sqrt:"\\sqrt{#?}","\u2206":"\\differentialD","\u2202":"\\differentialD",arcsin:"\\arcsin",arccos:"\\arccos",arctan:"\\arctan",arcsec:"\\arcsec",arccsc:"\\arccsc",arsinh:"\\arsinh",arcosh:"\\arcosh",artanh:"\\artanh",arcsech:"\\arcsech",arccsch:"\\arccsch",arg:"\\arg",ch:"\\ch",cosec:"\\cosec",cosh:"\\cosh",cot:"\\cot",cotg:"\\cotg",coth:"\\coth",csc:"\\csc",ctg:"\\ctg",cth:"\\cth",sec:"\\sec",sinh:"\\sinh",sh:"\\sh",tanh:"\\tanh",tg:"\\tg",th:"\\th",sin:"\\sin",cos:"\\cos",tan:"\\tan",lg:"\\lg",lb:"\\lb",log:"\\log",ln:"\\ln",exp:"\\exp",lim:"\\lim_{#?}",dx:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD x"},dy:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD y"},dt:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD t"},AA:"\\forall",EE:"\\exists","!EE":"\\nexists","&&":"\\land",xin:{after:"nothing+text+relop+punct+openfence+space",value:"x \\in"},sint:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\sin t"},in:{after:"nothing+letter+closefence",value:"\\in"},"!in":"\\notin",NN:"\\mathbb{N}",ZZ:"\\Z",QQ:"\\Q",RR:"\\R",CC:"\\C",xx:"\\times","+-":"\\pm","\u2260":"\\ne","!=":"\\ne","\u2265":"\\ge",">=":"\\ge","\u2264":"\\le","<=":"\\le","<<":"\\ll",">>":"\\gg","~~":"\\approx","\u2248":"\\approx","?=":"\\questeq","\xF7":"\\div","\xAC":"\\neg",":=":"\\coloneq","::":"\\Colon","(:":"\\langle",":)":"\\rangle",beta:"\\beta",chi:"\\chi",epsilon:"\\epsilon",varepsilon:"\\varepsilon",eta:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta"},gamma:"\\gamma",Gamma:"\\Gamma",iota:"\\iota",kappa:"\\kappa",lambda:"\\lambda",Lambda:"\\Lambda",mu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu"},nu:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu"},\u00B5:"\\mu",phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\phi"},Phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Phi"},varphi:"\\varphi",psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\psi"},Psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Psi"},rho:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\rho"},sigma:"\\sigma",Sigma:"\\Sigma",tau:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\tau"},vartheta:"\\vartheta",upsilon:"\\upsilon",xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\xi"},Xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Xi"},zeta:"\\zeta",omega:"\\omega",Omega:"\\Omega",\u03A9:"\\omega",forall:"\\forall",exists:"\\exists","!exists":"\\nexists",":.":"\\therefore",liminf:"\\liminf_{#?}",limsup:"\\limsup_{#?}",argmin:"\\operatorname*{arg~min}_{#?}",argmax:"\\operatorname*{arg~max}_{#?}",det:"\\det",mod:"\\bmod{#?}","(mod":"\\pmod{#?}",max:"\\max",min:"\\min",erf:"\\operatorname{erf}",erfc:"\\operatorname{erfc}",bessel:"\\operatorname{bessel}",mean:"\\operatorname{mean}",median:"\\operatorname{median}",fft:"\\operatorname{fft}",lcm:"\\operatorname{lcm}",gcd:"\\operatorname{gcd}",randomReal:"\\operatorname{randomReal}",randomInteger:"\\operatorname{randomInteger}",Re:"\\operatorname{Re}",Im:"\\operatorname{Im}",mm:{after:"nothing+digit+operator",value:"\\operatorname{mm}"},cm:{after:"nothing+digit+operator",value:"\\operatorname{cm}"},km:{after:"nothing+digit+operator",value:"\\operatorname{km}"},kg:{after:"nothing+digit+operator",value:"\\operatorname{kg}"},"...":"\\ldots","+...":"+\\cdots","-...":"-\\cdots","->...":"\\to\\cdots","-->...":"\\longrightarrow\\cdots","->":"\\to","|->":"\\mapsto","-->":"\\longrightarrow","<--":"\\longleftarrow","=>":"\\Rightarrow","==>":"\\Longrightarrow","<=>":"\\Leftrightarrow","<->":"\\leftrightarrow","(.)":"\\odot","(+)":"\\oplus","(/)":"\\oslash","(*)":"\\otimes","(-)":"\\ominus","||":"\\Vert","*":"\\cdot","**":"\\star","***":"\\ast","//":"\\slash","\\\\":"\\backslash",setminus:"\\backslash","|><":"\\ltimes","><|":"\\rtimes","|><|":"\\bowtie","-:":"\\div",divide:"\\div","@":"\\circ","^^":"\\wedge","^^^":"\\bigwedge",vv:"\\vee",vvv:"\\bigvee",nn:"\\cap",nnn:"\\bigcap",uu:"\\cup",uuu:"\\bigcup","-=":"\\equiv","~=":"\\cong",lt:"<","lt=":"\\leq",gt:">","gt=":"\\geq","-<":"\\prec","-lt":"\\prec","-<=":"\\preceq",">-=":"\\succeq",prop:"\\propto",diamond:"\\diamond",square:"\\square",iff:"\\iff",sub:"\\subset",sup:"\\supset",sube:"\\subseteq",supe:"\\supseteq",uarr:"\\uparrow",darr:"\\downarrow",rarr:"\\rightarrow",rArr:"\\Rightarrow",larr:"\\leftarrow",lArr:"\\Leftarrow",harr:"\\leftrightarrow",hArr:"\\Leftrightarrow",aleph:"\\aleph",and:"\\land",or:"\\lor",not:"\\neg","_|_":"\\bot",TT:"\\top","|--":"\\vdash","|==":"\\models","|__":"\\lfloor","__|":"\\rfloor","|~":"\\lceil","~|":"\\rceil",">->":"\\rightarrowtail","->>":"\\twoheadrightarrow",">->>":"\\twoheadrightarrowtail",frac:"\\frac{#?}{#?}",cbrt:"\\sqrt[3]{#?}",nthroot:"\\sqrt[#?]{#?}"};function Rc(e,t){var n;let i=(n=t==null?void 0:t.format)!=null?n:"auto";return i==="auto"&&([i,e]=wd(e)),i==="ascii-math"?(e=e.replace(/\u2061/gu,""),e=e.replace(/\u3016/gu,"{"),e=e.replace(/\u3017/gu,"}"),e=e.replace(/([^\\])sinx/g,"$1\\sin x"),e=e.replace(/([^\\])cosx/g,"$1\\cos x "),e=e.replace(/\u2013/g,"-"),["ascii-math",No(e,{inlineShortcuts:t==null?void 0:t.inlineShortcuts})]):["latex",e]}function No(e,t){var n,i,o;if(!e)return"";let c=!1,f;const b=(n=t.inlineShortcuts)!=null?n:Sd;if(!c&&(e.startsWith("^")||e.startsWith("_"))&&(f=Il(e.slice(1),{inlineShortcuts:b,noWrap:!0}),e=e[0]+"{"+f.match+"}",e+=No(f.rest,t),c=!0),c||(f=e.match(/^(sqrt|\u221A)(.*)/),f&&(f=Il(f[2],{inlineShortcuts:b,noWrap:!0}),e="\\sqrt{"+((i=f.match)!=null?i:"\\placeholder{}")+"}",e+=No(f.rest,t),c=!0)),c||(f=e.match(/^(\\cbrt|\u221B)(.*)/),f&&(f=Il(f[2],{inlineShortcuts:b,noWrap:!0}),e="\\sqrt[3]{"+((o=f.match)!=null?o:"\\placeholder{}")+"}",e+=No(f.rest,t),c=!0)),c||(f=e.match(/^abs(.*)/),f&&(f=Il(f[1],{inlineShortcuts:b,noWrap:!0}),e="\\left|"+f.match+"\\right|",e+=No(f.rest,t),c=!0)),c||(f=e.match(/^["”“](.*?)["”“](.*)/),f&&(e="\\text{"+f[1]+"}",e+=No(f[2],t),c=!0)),c||(f=e.match(/^([^a-zA-Z\(\{\[\_\^\\\s"]+)(.*)/),f&&(e=Cd(f[1],b),e+=No(f[2],t),c=!0)),!c&&/^([fgh])[^a-zA-Z]/.test(e)&&(f=Il(e.slice(1),{inlineShortcuts:b,noWrap:!0}),e=e[1]==="("?e[0]+"\\left("+f.match+"\\right)":e[0]+f.match,e+=No(f.rest,t),c=!0),c||(f=e.match(/^([a-zA-Z]+)(.*)/),f&&(e=Cd(f[1],b),e+=No(f[2],t),c=!0)),!c)if(f=Il(e,{inlineShortcuts:b,noWrap:!0}),f.match&&f.rest[0]==="/"){const C=Il(f.rest.slice(1),{inlineShortcuts:b,noWrap:!0});C.match&&(e="\\frac{"+f.match+"}{"+C.match+"}"+No(C.rest,t)),c=!0}else f.match&&(e=e.startsWith("(")?"\\left("+f.match+"\\right)"+No(f.rest,t):f.match+No(f.rest,t),c=!0);return c||(f=e.match(/^(\s+)(.*)$/),f&&(e=" "+No(f[2],t),c=!0)),e}function Il(e,t){let n="";e=e.trim();let i=e,o=e.charAt(0),c={"(":")","{":"}","[":"]"}[o];if(c){let f=1,b=1;for(;b<e.length&&f>0;)e[b]===o&&f++,e[b]===c&&f--,b++;f===0?(t.noWrap&&o==="("?n=No(e.substring(1,b-1),t):(o==="{"&&c==="}"&&(o="\\{",c="\\}"),n="\\left"+o+No(e.substring(1,b-1),t)+"\\right"+c),i=e.slice(Math.max(0,b))):(n=e.substring(1,b),i="")}else{let f=e.match(/^([a-zA-Z]+)/);if(f){let b=Ru(null,e,t.inlineShortcuts);if(b)return b=b.replace("_{#?}",""),b=b.replace("^{#?}",""),{match:b,rest:e.slice(b.length)}}if(f=e.match(/^([a-zA-Z])/),f)return{match:f[1],rest:e.slice(1)};if(f=e.match(/^(-)?\d+(\.\d*)?/),f)return{match:f[0],rest:e.slice(f[0].length)};/^\\(left|right)/.test(e)||(f=e.match(/^(\\[a-zA-Z]+)/),f&&(i=e.slice(f[1].length),n=f[1]))}return{match:n,rest:i}}function Cd(e,t){let n=Ru(null,e,t);return n?(n=n.replace("_{#?}",""),n=n.replace("^{#?}",""),n+=" "):n=e,n}var zu=[["\\[","\\]"],["\\(","\\)"],["$$","$$"],["$","$"],["\\begin{math}","\\end{math}"],["\\begin{displaymath}","\\end{displaymath}"],["\\begin{equation}","\\end{equation}"],["\\begin{equation*}","\\end{equation*}"]];function Tl(e){const t=e.trim();for(const n of zu)if(t.startsWith(n[0])&&t.endsWith(n[1]))return[!0,t.substring(n[0].length,t.length-n[1].length)];return[!1,e]}function wd(e){if(e=e.trim(),e.length<=1)return["latex",e];let t;return[t,e]=Tl(e),t?["latex",e]:e.startsWith("`")&&e.endsWith("`")?(e=e.substring(1,e.length-1),["ascii-math",e]):e.includes("\\")?["latex",e]:/\$.+\$/.test(e)?["latex",`\\text{${e}}`]:[void 0,e]}var du="$$",ff="$$",hf=(e,t,n)=>(zu.some(i=>t.startsWith(i[0])&&t.endsWith(i[1]))||(t=`${du} ${t} ${ff}`),t),Md=class cf{constructor(t){cf._modes[t]=this}static onPaste(t,n,i){var o;if(!n.contentEditable&&n.userSelect==="none")return n.model.announce("plonk"),!1;if(typeof i=="string"){const f=new DataTransfer;f.setData("text/plain",i),i=f}const c=new ClipboardEvent("paste",{clipboardData:i,cancelable:!0});return(o=n.host)!=null&&o.dispatchEvent(c)?cf._modes[t].onPaste(n,i):!1}static copyToClipboard(t,n){if(!t.contentEditable&&t.userSelect==="none"){t.model.announce("plonk");return}const i=t.model,o=i.selectionIsCollapsed?[0,i.lastOffset]:ko(i.selection),c=i.getValue(o,n);navigator.clipboard.writeText(c).then(()=>{},()=>t.model.announce("plonk"))}static onCopy(t,n){var i;if(!n.clipboardData)return;if(!t.contentEditable&&t.userSelect==="none"){t.model.announce("plonk");return}const o=t.model,c=o.selectionIsCollapsed?[0,o.lastOffset]:ko(o.selection);let f=o.getAtoms(c);if(f.every(b=>b.mode==="text"||!b.mode))n.clipboardData.setData("text/plain",f.filter(b=>b instanceof vl).map(b=>b.value).join(""));else if(f.every(b=>b.mode==="latex"))n.clipboardData.setData("text/plain",o.getAtoms(c,{includeChildren:!0}).map(b=>{var C;return(C=b.value)!=null?C:""}).join(""));else{let b;f.length===1&&f[0].verbatimLatex!==void 0?b=f[0].verbatimLatex:b=o.getValue(c,"latex-expanded"),n.clipboardData.setData("application/x-latex",b);try{n.clipboardData.setData("text/plain",t.options.onExport(t,b,c))}catch(C){}if(f.length===1){const C=f[0];(C.type==="root"||C.type==="group")&&(f=C.body.filter(k=>k.type!=="first"))}try{n.clipboardData.setData("application/json+mathlive",JSON.stringify(f.map(C=>C.toJson())))}catch(C){}if((i=window[Symbol.for("io.cortexjs.compute-engine")])!=null&&i.ComputeEngine){const C=window.MathfieldElement.computeEngine;if(C)try{const k=C.jsonSerializationOptions;C.jsonSerializationOptions={metadata:["latex"]};const $=C.parse(o.getValue(c,"latex-unstyled"));C.jsonSerializationOptions=k;const ne=JSON.stringify($.json);ne&&n.clipboardData.setData("application/json",ne)}catch(k){}}}n.preventDefault()}static insert(t,n,i={}){var o;const c=i.mode==="auto"?t.mode:(o=i.mode)!=null?o:t.mode;return cf._modes[c].insert(t,n,i)}onPaste(t,n){return!1}insert(t,n,i){return!1}};Md._modes={};var jr=Md,pf=[{key:"left",command:"moveToPreviousChar"},{key:"right",command:"moveToNextChar"},{key:"up",command:"moveUp"},{key:"down",command:"moveDown"},{key:"shift+[ArrowLeft]",command:"extendSelectionBackward"},{key:"shift+[ArrowRight]",command:"extendSelectionForward"},{key:"shift+[ArrowUp]",command:"extendSelectionUpward"},{key:"shift+[ArrowDown]",command:"extendSelectionDownward"},{key:"[Backspace]",command:"deleteBackward"},{key:"alt+[Delete]",command:"deleteBackward"},{key:"[Delete]",command:"deleteForward"},{key:"alt+[Backspace]",command:"deleteForward"},{key:"alt+[ArrowLeft]",command:"moveToPreviousWord"},{key:"alt+[ArrowRight]",command:"moveToNextWord"},{key:"shift+alt+[ArrowLeft]",command:"extendToPreviousWord"},{key:"shift+alt+[ArrowRight]",command:"extendToNextWord"},{key:"ctrl+[ArrowLeft]",command:"moveToGroupStart"},{key:"ctrl+[ArrowRight]",command:"moveToGroupEnd"},{key:"shift+ctrl+[ArrowLeft]",command:"extendToGroupStart"},{key:"shift+ctrl+[ArrowRight]",command:"extendToGroupEnd"},{key:"[Home]",command:"moveToMathfieldStart"},{key:"cmd+[ArrowLeft]",command:"moveToMathfieldStart"},{key:"shift+[Home]",command:"extendToMathFieldStart"},{key:"shift+cmd+[ArrowLeft]",command:"extendToMathFieldStart"},{key:"[End]",command:"moveToMathfieldEnd"},{key:"cmd+[ArrowRight]",command:"moveToMathfieldEnd"},{key:"shift+[End]",command:"extendToMathFieldEnd"},{key:"shift+cmd+[ArrowRight]",command:"extendToMathFieldEnd"},{key:"[Pageup]",command:"moveToGroupStart"},{key:"[Pagedown]",command:"moveToGroupEnd"},{key:"[Tab]",command:"moveToNextGroup"},{key:"shift+[Tab]",command:"moveToPreviousGroup"},{key:"[Escape]",ifMode:"math",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"text",command:["switchMode","latex"]},{key:"[Escape]",ifMode:"latex",command:["complete","complete",{selectItem:"true"}]},{key:"\\",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[IntlBackslash]",ifMode:"math",command:["switchMode","latex","\\"]},{key:"[Tab]",ifMode:"latex",command:["complete","accept-suggestion"]},{key:"[Return]",ifMode:"latex",command:"complete"},{key:"[Enter]",ifMode:"latex",command:"complete"},{key:"shift+[Escape]",ifMode:"latex",command:["complete","reject"]},{key:"[ArrowDown]",ifMode:"latex",command:"nextSuggestion"},{key:"[ArrowUp]",ifMode:"latex",command:"previousSuggestion"},{key:"ctrl+a",ifPlatform:"!macos",command:"selectAll"},{key:"cmd+a",command:"selectAll"},{key:"[Cut]",command:"cutToClipboard"},{key:"[Copy]",command:"copyToClipboard"},{key:"[Paste]",command:"pasteFromClipboard"},{key:"[Clear]",command:"deleteBackward"},{key:"[Undo]",command:"undo"},{key:"[Redo]",command:"redo"},{key:"[EraseEof]",command:"deleteToGroupEnd"},{key:"ctrl+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"cmd+x",ifPlatform:"ios",command:"cutToClipboard"},{key:"ctrl+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"cmd+c",ifPlatform:"ios",command:"copyToClipboard"},{key:"ctrl+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"cmd+v",ifPlatform:"ios",command:"pasteFromClipboard"},{key:"ctrl+z",ifPlatform:"!macos",command:"undo"},{key:"cmd+z",command:"undo"},{key:"ctrl+y",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+y",command:"redo"},{key:"shift+ctrl+z",ifPlatform:"!macos",command:"redo"},{key:"shift+cmd+z",command:"redo"},{key:"ctrl+b",ifPlatform:"macos",command:"moveToPreviousChar"},{key:"ctrl+f",ifPlatform:"macos",command:"moveToNextChar"},{key:"ctrl+p",ifPlatform:"macos",command:"moveUp"},{key:"ctrl+n",ifPlatform:"macos",command:"moveDown"},{key:"ctrl+a",ifPlatform:"macos",command:"moveToMathfieldStart"},{key:"ctrl+e",ifPlatform:"macos",command:"moveToMathfieldEnd"},{key:"shift+ctrl+b",ifPlatform:"macos",command:"extendSelectionBackward"},{key:"shift+ctrl+f",ifPlatform:"macos",command:"extendSelectionForward"},{key:"shift+ctrl+p",ifPlatform:"macos",command:"extendSelectionUpward"},{key:"shift+ctrl+n",ifPlatform:"macos",command:"extendSelectionDownward"},{key:"shift+ctrl+a",ifPlatform:"macos",command:"extendToMathFieldStart"},{key:"shift+ctrl+e",ifPlatform:"macos",command:"extendToMathFieldEnd"},{key:"alt+ctrl+b",ifPlatform:"macos",command:"moveToPreviousWord"},{key:"alt+ctrl+f",ifPlatform:"macos",command:"moveToNextWord"},{key:"shift+alt+ctrl+b",ifPlatform:"macos",command:"extendToPreviousWord"},{key:"shift+alt+ctrl+f",ifPlatform:"macos",command:"extendToNextWord"},{key:"ctrl+h",ifPlatform:"macos",command:"deleteBackward"},{key:"ctrl+d",ifPlatform:"macos",command:"deleteForward"},{key:"ctrl+l",ifPlatform:"macos",command:"scrollIntoView"},{key:"ctrl+[Digit2]",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"ctrl+[Digit5]",ifMode:"math",command:"moveToOpposite"},{key:"ctrl+[Digit6]",ifMode:"math",command:"moveToSuperscript"},{key:"ctrl+[Return]",ifMode:"math",command:"addRowAfter"},{key:"ctrl+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Return]",ifMode:"math",command:"addRowAfter"},{key:"cmd+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"alt+p",ifMode:"math",command:["insert","\\pi"]},{key:"alt+v",ifMode:"math",command:["insert","\\sqrt{#0}"]},{key:"alt+o",ifMode:"math",command:["insert","\\emptyset"]},{key:"alt+d",ifMode:"math",command:["insert","\\differentialD"]},{key:"shift+alt+o",ifMode:"math",command:["insert","\\varnothing"]},{key:"shift+alt+d",ifMode:"math",command:["insert","\\partial"]},{key:"alt+[Backslash]",ifMode:"math",command:["insert","\\backslash"]},{key:"[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#?}{#@}"]},{key:"shift+alt+k",command:"toggleKeystrokeCaption"},{key:"alt+[Space]",command:"toggleContextMenu"},{key:"alt+shift+[Space]",command:"toggleVirtualKeyboard"},{key:"alt+ctrl+[ArrowUp]",command:["speak","all",{withHighlighting:!1}]},{key:"alt+ctrl+[ArrowDown]",command:["speak","selection",{withHighlighting:!1}]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["switchMode","text","",""]},{key:"shift+alt+[KeyT]",ifMode:"math",command:["switchMode","text","",""]},{key:"shift+[Quote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"text",command:["switchMode","math","",""]},{key:"shift+alt+[KeyT]",ifMode:"text",command:["switchMode","math","",""]},{key:"/",ifMode:"math",command:["insert","\\frac{#@}{#?}"]},{key:"alt+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+shift+/",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","/"]},{key:"alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrack #0 \\right\\rbrack"]},{key:"ctrl+[Minus]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"moveToSubscript"},{key:"shift+alt+[BracketLeft]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\left\\lbrace #0 \\right\\rbrace"]},{key:"ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowAfter"},{key:"shift+ctrl+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"shift+cmd+;",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:"addRowBefore"},{key:"ctrl+[Backspace]",ifMode:"math",command:"removeRow"},{key:"cmd+[Backspace]",ifMode:"math",command:"removeRow"},{key:"alt+[Tab]",ifMode:"math",command:"addColumnAfter"},{key:"shift+alt+[Tab]",ifMode:"math",command:"addColumnBefore"},{key:"alt+[Enter]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Enter]",ifMode:"math",command:"addRowBefore"},{key:"alt+[Return]",ifMode:"math",command:"addRowAfter"},{key:"shift+alt+[Return]",ifMode:"math",command:"addRowBefore"},{key:"shift+[Backspace]",ifMode:"math",command:"removeColumn"},{key:"alt+[Digit5]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","$\\infty"]},{key:"alt+[Digit9]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","("]},{key:"alt+[Digit0]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert",")"]},{key:"alt+|",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","|"]},{key:"shift+[Backquote]",ifLayout:["apple.en-intl","windows.en-intl","linux.en"],ifMode:"math",command:["insert","\\~"]},{key:"[Backquote]",ifLayout:["windows.french","linux.french"],ifMode:"math",command:["insert","^2"]},{key:"[Backquote]",ifLayout:["windows.german","linux.german"],ifMode:"math",command:["insert","^"]},{key:"[IntlBackslash]",ifLayout:["apple.german"],ifMode:"math",command:["insert","^"]}],Fu={"\\sqrt":["alt+v","ctrl+[Digit2]"],"\\pi":"alt+p","\\infty":"alt+[Digit5]","\\differentialD":"alt+d","\\partial":"shift+alt+d","\\frac":"Slash","\\emptyset":"alt+o","\\varnothing":"shift+alt+o","\\~":"~"};function js(e){var t;return((t=e.element)==null?void 0:t.mathfield)===e}function Vs(e){var t,n;return(n=(t=e.querySelector(".ML__caret"))!=null?t:e.querySelector(".ML__text-caret"))!=null?n:e.querySelector(".ML__latex-caret")}function Dl(e){const t=Vs(e);if(!t)return null;const n=t.getBoundingClientRect();return{x:n.right,y:n.bottom,height:n.height}}function Ku(e){var t;if(!e.parent)return"root";let n=(t=e.parent.id)!=null?t:"";return n+=typeof e.parentBranch=="string"?"-"+e.parentBranch:`-${e.parentBranch[0]}/${e.parentBranch[0]}`,n}function Hu(e,t,n){if(!t)return null;const i=e.field.getBoundingClientRect(),o=t.right-t.left,c=t.bottom-t.top,f=Math.ceil(t.left-i.left+e.field.scrollLeft*n),b=Math.ceil(t.top-i.top);return{left:f,right:f+o,top:b,bottom:b+c}}function Zu(e){const t=e.getBoundingClientRect(),n=parseInt(getComputedStyle(e).marginRight),i={top:t.top-1,bottom:t.bottom,left:t.left,right:t.right-1+n};if(e.children.length===0||e.tagName.toUpperCase()==="SVG")return i;for(const o of e.children)if(o.nodeType===1&&"atomId"in o.dataset&&!o.classList.contains("pstrut")){const c=Zu(o);i.left=Math.min(i.left,c.left),i.right=Math.max(i.right,c.right),i.top=Math.min(i.top,c.top),i.bottom=Math.max(i.bottom,c.bottom)}return i}function gc(e,t){var n,i;if(!t.id)return null;let o=(i=(n=e.atomBoundsCache)==null?void 0:n.get(t.id))!=null?i:null;if(o!==null)return o;const c=e.field.querySelector(`[data-atom-id="${t.id}"]`);return o=c?Zu(c):null,e.atomBoundsCache&&(o?e.atomBoundsCache.set(t.id,o):e.atomBoundsCache.delete(t.id)),o!=null?o:null}function kd(e,t,n){const i=new Map;for(const o of e.model.getAtoms(t,{includeChildren:!0})){if(n!=null&&n.excludeAtomsWithBackground&&o.style.backgroundColor)continue;const c=e.field,f=c.offsetWidth;let C=Math.floor(c.getBoundingClientRect().width)/f;C=isNaN(C)?1:C;const k=Hu(e,gc(e,o),C);if(k){const $=Ku(o);if(i.has($)){const ne=i.get($);i.set($,{left:Math.min(ne.left,k.left),right:Math.max(ne.right,k.right),top:Math.min(ne.top,k.top),bottom:Math.max(ne.bottom,k.bottom)})}else i.set($,k)}}return[...i.values()]}function Wu(e,t){return e.model.selection.ranges.reduce((n,i)=>n.concat(...kd(e,i,t)),[])}function ju(e,t){return e==="*"||t==="none"?!0:t==="same-origin"?!window.origin||e===window.origin:typeof t=="function"?t(e):!1}function fu(e){let t=0,n=0;const i=e.offsetWidth,o=e.offsetHeight;for(;e instanceof HTMLElement;)t+=e.offsetTop,n+=e.offsetLeft,e=e.offsetParent;return new DOMRect(n,t,i,o)}var Ed=`@keyframes ML__caret-blink {
|
|
|
0%,
|
|
|
100% {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
50% {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
}
|
|
|
.ML__container {
|
|
|
display: inline-flex;
|
|
|
flex-flow: row;
|
|
|
justify-content: space-between;
|
|
|
align-items: flex-end;
|
|
|
min-height: 39px;
|
|
|
/* Need some room for the virtual keyboard toggle */
|
|
|
width: 100%;
|
|
|
/* Encourage browsers to consider allocating a hardware accelerated
|
|
|
layer for this element. */
|
|
|
isolation: isolate;
|
|
|
/* Prevent the browser from trying to interpret touch gestures in the field */
|
|
|
/* "Disabling double-tap to zoom removes the need for browsers to
|
|
|
delay the generation of click events when the user taps the screen." */
|
|
|
touch-action: none;
|
|
|
--_caret-color: var(--caret-color, hsl(var(--_hue), 40%, 49%));
|
|
|
--_selection-color: var(--selection-color, #000);
|
|
|
--_selection-background-color: var(--selection-background-color, hsl(var(--_hue), 70%, 85%));
|
|
|
--_text-highlight-background-color: var(--highlight-text, hsla(var(--_hue), 40%, 50%, 0.1));
|
|
|
--_contains-highlight-background-color: var(--contains-highlight-background-color, hsl(var(--_hue), 40%, 95%));
|
|
|
--_smart-fence-color: var(--smart-fence-color, currentColor);
|
|
|
--_smart-fence-opacity: var(--smart-fence-opacity, 0.5);
|
|
|
--_latex-color: var(--latex-color, hsl(var(--_hue), 80%, 40%));
|
|
|
--_correct-color: var(--correct-color, #10a000);
|
|
|
--_incorrect-color: var(--incorrect-color, #a01b00);
|
|
|
--_composition-background-color: var(--composition-background-color, #fff1c2);
|
|
|
--_composition-text-color: var(--composition-text-color, black);
|
|
|
--_composition-underline-color: var(--composition-underline-color, transparent);
|
|
|
}
|
|
|
/* This is the actual field content (formula) */
|
|
|
.ML__content {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
align-self: center;
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
padding: 2px 3px 2px 1px;
|
|
|
width: 100%;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle,
|
|
|
.ML__menu-toggle {
|
|
|
box-sizing: border-box;
|
|
|
display: flex;
|
|
|
align-self: center;
|
|
|
align-items: center;
|
|
|
flex-shrink: 0;
|
|
|
flex-direction: column;
|
|
|
justify-content: center;
|
|
|
width: 34px;
|
|
|
height: 34px;
|
|
|
padding: 0;
|
|
|
margin-right: 4px;
|
|
|
cursor: pointer;
|
|
|
/* Avoid some weird blinking with :hover */
|
|
|
border-radius: 8px;
|
|
|
border: 1px solid transparent;
|
|
|
transition: background 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
|
|
|
color: hsl(var(--_hue), 40%, 50%);
|
|
|
fill: currentColor;
|
|
|
background: transparent;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle:hover,
|
|
|
.ML__menu-toggle:hover {
|
|
|
background: hsla(0, 0%, 70%, 0.3);
|
|
|
color: #333;
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle > span,
|
|
|
.ML__menu-toggle > span {
|
|
|
display: flex;
|
|
|
align-self: center;
|
|
|
align-items: center;
|
|
|
}
|
|
|
/* The invisible element used to capture keyboard events. We're just trying
|
|
|
really hard to make sure it doesn't show. */
|
|
|
.ML__keyboard-sink {
|
|
|
display: inline-block;
|
|
|
resize: none;
|
|
|
outline: none;
|
|
|
border: none;
|
|
|
/* Need these for Microsoft Edge */
|
|
|
position: fixed;
|
|
|
clip: rect(0 0 0 0);
|
|
|
/* Need this to prevent iOS Safari from auto-zooming */
|
|
|
font-size: 1em;
|
|
|
font-family: KaTeX_Main;
|
|
|
line-height: 0.5;
|
|
|
/* On Chromium, if this is 0, no keyboard events are received */
|
|
|
}
|
|
|
[part="placeholder"] {
|
|
|
color: var(--neutral-400);
|
|
|
}
|
|
|
.ML__composition {
|
|
|
background: var(--_composition-background-color);
|
|
|
color: var(--_composition-text-color);
|
|
|
text-decoration: underline var(--_composition-underline-color);
|
|
|
}
|
|
|
.ML__caret::after {
|
|
|
content: '';
|
|
|
visibility: hidden;
|
|
|
width: 0;
|
|
|
display: inline-block;
|
|
|
height: 0.76em;
|
|
|
--_caret-width: clamp(2px, 0.08em, 10px);
|
|
|
border: none;
|
|
|
border-radius: calc(var(--_caret-width) / 2);
|
|
|
border-right: var(--_caret-width) solid var(--_caret-color);
|
|
|
margin-right: calc(-1 * var(--_caret-width));
|
|
|
position: relative;
|
|
|
left: -0.045em;
|
|
|
bottom: -0.05em;
|
|
|
animation: ML__caret-blink 1.05s step-end forwards infinite;
|
|
|
}
|
|
|
.ML__text-caret::after {
|
|
|
content: '';
|
|
|
visibility: hidden;
|
|
|
width: 0;
|
|
|
display: inline-block;
|
|
|
height: 0.76em;
|
|
|
--_caret-width: clamp(2px, 0.08em, 10px);
|
|
|
border: none;
|
|
|
border-radius: calc(var(--_caret-width) / 2);
|
|
|
border-right: var(--_caret-width) solid var(--_caret-color);
|
|
|
margin-right: calc(-1 * var(--_caret-width));
|
|
|
position: relative;
|
|
|
left: -0.045em;
|
|
|
bottom: -0.05em;
|
|
|
animation: ML__caret-blink 1.05s step-end forwards infinite;
|
|
|
}
|
|
|
.ML__latex-caret::after {
|
|
|
content: '';
|
|
|
visibility: hidden;
|
|
|
--_caret-width: clamp(2px, 0.08em, 10px);
|
|
|
border: none;
|
|
|
border-radius: calc(var(--_caret-width) / 2);
|
|
|
border-right: var(--_caret-width) solid var(--_latex-color);
|
|
|
margin-right: calc(-1 * var(--_caret-width));
|
|
|
position: relative;
|
|
|
left: -0.019em;
|
|
|
animation: ML__caret-blink 1.05s step-end forwards infinite;
|
|
|
}
|
|
|
.ML__focused .ML__latex-caret::after,
|
|
|
.ML__focused .ML__text-caret::after,
|
|
|
.ML__focused .ML__caret::after {
|
|
|
visibility: visible;
|
|
|
}
|
|
|
.ML__focused .ML__text {
|
|
|
background: var(--_text-highlight-background-color);
|
|
|
}
|
|
|
/* When using smartFence, the anticipated closing fence is displayed
|
|
|
with this style */
|
|
|
.ML__smart-fence__close {
|
|
|
opacity: var(--_smart-fence-opacity);
|
|
|
color: var(--_smart-fence-color);
|
|
|
}
|
|
|
.ML__selected,
|
|
|
.ML__focused .ML__selected .ML__contains-caret,
|
|
|
.ML__focused .ML__selected .ML__smart-fence__close,
|
|
|
.ML__focused .ML__selected .ML__placeholder {
|
|
|
color: var(--_selection-color);
|
|
|
opacity: 1;
|
|
|
}
|
|
|
.ML__selection {
|
|
|
box-sizing: border-box;
|
|
|
background: var(--_selection-background-color) !important;
|
|
|
}
|
|
|
.ML__contains-caret.ML__close,
|
|
|
.ML__contains-caret.ML__open,
|
|
|
.ML__contains-caret > .ML__close,
|
|
|
.ML__contains-caret > .ML__open,
|
|
|
.ML__contains-caret .ML__sqrt-sign,
|
|
|
.ML__contains-caret .ML__sqrt-line {
|
|
|
color: var(--_caret-color);
|
|
|
}
|
|
|
.ML__contains-highlight {
|
|
|
box-sizing: border-box;
|
|
|
background: transparent;
|
|
|
}
|
|
|
.ML__focused .ML__contains-highlight {
|
|
|
background: var(--_contains-highlight-background-color);
|
|
|
}
|
|
|
.ML__raw-latex {
|
|
|
font-family: 'Berkeley Mono', 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
|
|
|
font-weight: 400;
|
|
|
font-size: 0.8em;
|
|
|
letter-spacing: -0.05em;
|
|
|
color: var(--_latex-color);
|
|
|
}
|
|
|
.ML__suggestion {
|
|
|
color: var(--neutral-500);
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle.is-visible.is-pressed:hover {
|
|
|
background: hsl(var(--_hue), 25%, 35%);
|
|
|
color: #fafafa;
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle:focus {
|
|
|
outline: none;
|
|
|
border-radius: 8px;
|
|
|
border: 2px solid hsl(var(--_hue), 40%, 50%);
|
|
|
}
|
|
|
.ML__virtual-keyboard-toggle.is-pressed,
|
|
|
.ML__virtual-keyboard-toggle.is-active:hover,
|
|
|
.ML__virtual-keyboard-toggle.is-active {
|
|
|
background: hsl(var(--_hue), 25%, 35%);
|
|
|
color: #fafafa;
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
/* Add an attribute 'data-tooltip' to automatically show a
|
|
|
tooltip over a element on hover.
|
|
|
*/
|
|
|
[data-tooltip] {
|
|
|
position: relative;
|
|
|
}
|
|
|
[data-tooltip]::after {
|
|
|
content: attr(data-tooltip);
|
|
|
position: absolute;
|
|
|
display: block;
|
|
|
z-index: 2;
|
|
|
pointer-events: none;
|
|
|
right: auto;
|
|
|
top: calc(-100% - 4px);
|
|
|
width: max-content;
|
|
|
max-width: 200px;
|
|
|
padding: 8px 8px;
|
|
|
border-radius: 4px;
|
|
|
background: #616161;
|
|
|
color: #fff;
|
|
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
|
text-align: center;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-style: normal;
|
|
|
font-weight: 400;
|
|
|
font-size: 13px;
|
|
|
/* Phone */
|
|
|
opacity: 0;
|
|
|
transform: scale(0.5);
|
|
|
}
|
|
|
@media only screen and (max-width: 767px) {
|
|
|
[data-tooltip]::after {
|
|
|
padding: 8px 16px;
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
}
|
|
|
menu [data-tooltip]::after {
|
|
|
left: 100%;
|
|
|
top: 0%;
|
|
|
}
|
|
|
menu .ML__base {
|
|
|
cursor: default;
|
|
|
}
|
|
|
/** Don't display if we're tracking, i.e. have the pointer down */
|
|
|
.tracking [data-tooltip]:hover::after {
|
|
|
/* Use visibility, not display. Display will remove the after from the DOM, and the override below will not work */
|
|
|
visibility: hidden;
|
|
|
}
|
|
|
/** But do display if tracking and inside a menu */
|
|
|
.tracking menu li[data-tooltip]:hover::after,
|
|
|
[data-tooltip]:hover::after {
|
|
|
visibility: visible;
|
|
|
opacity: 1;
|
|
|
transform: scale(1);
|
|
|
transition-property: opacity, scale;
|
|
|
transition-duration: 0.15s;
|
|
|
transition-delay: 1s;
|
|
|
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
|
|
}
|
|
|
.ML__prompt {
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
.ML__editablePromptBox {
|
|
|
outline: 1px solid #acacac;
|
|
|
border-radius: 2px;
|
|
|
z-index: -1;
|
|
|
}
|
|
|
.ML__focusedPromptBox {
|
|
|
outline: highlight auto 1px;
|
|
|
}
|
|
|
.ML__lockedPromptBox {
|
|
|
background-color: rgba(142, 142, 141, 0.4);
|
|
|
z-index: -1;
|
|
|
}
|
|
|
.ML__correctPromptBox {
|
|
|
outline: 1px solid var(--_correct-color);
|
|
|
box-shadow: 0 0 5px var(--_correct-color);
|
|
|
}
|
|
|
.ML__incorrectPromptBox {
|
|
|
outline: 1px solid var(--_incorrect-color);
|
|
|
box-shadow: 0 0 5px var(--_incorrect-color);
|
|
|
}
|
|
|
.variant-submenu {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
padding: 8px;
|
|
|
}
|
|
|
.variant-submenu [part=menu-item] {
|
|
|
font-size: 2rem;
|
|
|
text-align: center;
|
|
|
margin: 0;
|
|
|
}
|
|
|
.insert-matrix-submenu {
|
|
|
display: grid;
|
|
|
padding: 8px;
|
|
|
align-content: center;
|
|
|
justify-content: center;
|
|
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
|
|
}
|
|
|
.insert-matrix-submenu [part=menu-item] {
|
|
|
font-size: 21px;
|
|
|
border: none;
|
|
|
border-radius: 0;
|
|
|
line-height: 21px;
|
|
|
text-align: center;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
}
|
|
|
.border-submenu [part=menu-item] {
|
|
|
font-size: 2rem;
|
|
|
line-height: 1.2;
|
|
|
text-align: center;
|
|
|
}
|
|
|
.swatches-submenu {
|
|
|
--_swatch-size: 2rem;
|
|
|
--_columns: 4;
|
|
|
display: flex;
|
|
|
flex-flow: wrap;
|
|
|
padding: 8px;
|
|
|
max-width: calc(var(--_columns) * (var(--_swatch-size) + 18px) + 16px);
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.menu-swatch {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
box-sizing: border-box;
|
|
|
width: fit-content;
|
|
|
height: fit-content;
|
|
|
margin: 2px;
|
|
|
padding: 0;
|
|
|
background: var(--neutral-200);
|
|
|
}
|
|
|
.menu-swatch > .label {
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
line-height: 0;
|
|
|
}
|
|
|
.menu-swatch > .label > span {
|
|
|
display: inline-block;
|
|
|
margin: 6px;
|
|
|
min-width: var(--_swatch-size);
|
|
|
min-height: var(--_swatch-size);
|
|
|
border-radius: 50%;
|
|
|
}
|
|
|
.menu-swatch.active {
|
|
|
background: var(--neutral-100);
|
|
|
scale: 1.4;
|
|
|
}
|
|
|
.menu-swatch.active > .label > span {
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
.menu-swatch .ui-checkmark,
|
|
|
.menu-swatch .ui-mixedmark {
|
|
|
position: absolute;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
color: white;
|
|
|
}
|
|
|
.menu-swatch.dark-contrast .ui-checkmark,
|
|
|
.menu-swatch.dark-contrast .ui-mixedmark {
|
|
|
color: #000;
|
|
|
}
|
|
|
`,Qi=`.ML__container {
|
|
|
min-height: auto !important;
|
|
|
--_hue: var(--hue, 212);
|
|
|
--_placeholder-color: var(--placeholder-color, hsl(var(--_hue), 40%, 49%));
|
|
|
--_placeholder-opacity: var(--placeholder-opacity, 0.4);
|
|
|
--_text-font-family: var(--text-font-family, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif);
|
|
|
}
|
|
|
.ML__sr-only {
|
|
|
position: absolute;
|
|
|
width: 1px;
|
|
|
height: 1px;
|
|
|
margin: -1px;
|
|
|
padding: 0;
|
|
|
overflow: hidden;
|
|
|
clip: rect(0, 0, 0, 0);
|
|
|
clip-path: inset(50%);
|
|
|
white-space: nowrap;
|
|
|
border: 0;
|
|
|
}
|
|
|
.ML__is-inline {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__base {
|
|
|
visibility: inherit;
|
|
|
display: inline-block;
|
|
|
position: relative;
|
|
|
cursor: text;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
box-sizing: content-box;
|
|
|
border: 0;
|
|
|
outline: 0;
|
|
|
vertical-align: baseline;
|
|
|
font-weight: inherit;
|
|
|
font-family: inherit;
|
|
|
font-style: inherit;
|
|
|
text-decoration: none;
|
|
|
width: min-content;
|
|
|
}
|
|
|
.ML__strut,
|
|
|
.ML__strut--bottom {
|
|
|
display: inline-block;
|
|
|
min-height: 0.5em;
|
|
|
}
|
|
|
.ML__small-delim {
|
|
|
font-family: KaTeX_Main;
|
|
|
}
|
|
|
/* Text mode */
|
|
|
.ML__text {
|
|
|
font-family: var(--_text-font-family);
|
|
|
white-space: pre;
|
|
|
}
|
|
|
/* Use cmr for 'math upright' */
|
|
|
.ML__cmr {
|
|
|
font-family: KaTeX_Main;
|
|
|
font-style: normal;
|
|
|
}
|
|
|
.ML__mathit {
|
|
|
font-family: KaTeX_Math;
|
|
|
/* The KaTeX_Math font is italic by default, so the font-style below is only
|
|
|
useful when a fallback font is used
|
|
|
*/
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.ML__mathbf {
|
|
|
font-family: KaTeX_Main;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
/* Lowercase greek symbols should stick to math font when \\mathbf is applied
|
|
|
to match TeX idiosyncratic behavior */
|
|
|
.lcGreek.ML__mathbf {
|
|
|
font-family: KaTeX_Math;
|
|
|
font-weight: normal;
|
|
|
}
|
|
|
.ML__mathbfit {
|
|
|
font-family: KaTeX_Math;
|
|
|
font-weight: bold;
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.ML__ams {
|
|
|
font-family: KaTeX_AMS;
|
|
|
}
|
|
|
/* Blackboard */
|
|
|
.ML__bb {
|
|
|
font-family: KaTeX_AMS;
|
|
|
}
|
|
|
.ML__cal {
|
|
|
font-family: KaTeX_Caligraphic;
|
|
|
}
|
|
|
.ML__frak {
|
|
|
font-family: KaTeX_Fraktur;
|
|
|
}
|
|
|
.ML__tt {
|
|
|
font-family: KaTeX_Typewriter;
|
|
|
}
|
|
|
.ML__script {
|
|
|
font-family: KaTeX_Script;
|
|
|
}
|
|
|
.ML__sans {
|
|
|
font-family: KaTeX_SansSerif;
|
|
|
}
|
|
|
.ML__series_ul {
|
|
|
font-weight: 100;
|
|
|
}
|
|
|
.ML__series_el {
|
|
|
font-weight: 100;
|
|
|
}
|
|
|
.ML__series_l {
|
|
|
font-weight: 200;
|
|
|
}
|
|
|
.ML__series_sl {
|
|
|
font-weight: 300;
|
|
|
}
|
|
|
.ML__series_sb {
|
|
|
font-weight: 500;
|
|
|
}
|
|
|
.ML__bold,
|
|
|
.ML__boldsymbol {
|
|
|
font-weight: 700;
|
|
|
}
|
|
|
.ML__series_eb {
|
|
|
font-weight: 800;
|
|
|
}
|
|
|
.ML__series_ub {
|
|
|
font-weight: 900;
|
|
|
}
|
|
|
.ML__series_uc {
|
|
|
font-stretch: ultra-condensed;
|
|
|
}
|
|
|
.ML__series_ec {
|
|
|
font-stretch: extra-condensed;
|
|
|
}
|
|
|
.ML__series_c {
|
|
|
font-stretch: condensed;
|
|
|
}
|
|
|
.ML__series_sc {
|
|
|
font-stretch: semi-condensed;
|
|
|
}
|
|
|
.ML__series_sx {
|
|
|
font-stretch: semi-expanded;
|
|
|
}
|
|
|
.ML__series_x {
|
|
|
font-stretch: expanded;
|
|
|
}
|
|
|
.ML__series_ex {
|
|
|
font-stretch: extra-expanded;
|
|
|
}
|
|
|
.ML__series_ux {
|
|
|
font-stretch: ultra-expanded;
|
|
|
}
|
|
|
.ML__it {
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.ML__shape_ol {
|
|
|
-webkit-text-stroke: 1px black;
|
|
|
text-stroke: 1px black;
|
|
|
color: transparent;
|
|
|
}
|
|
|
.ML__shape_sc {
|
|
|
font-variant: small-caps;
|
|
|
}
|
|
|
.ML__shape_sl {
|
|
|
font-style: oblique;
|
|
|
}
|
|
|
/* First level emphasis */
|
|
|
.ML__emph {
|
|
|
color: #bc2612;
|
|
|
}
|
|
|
/* Second level emphasis */
|
|
|
.ML__emph .ML__emph {
|
|
|
color: #0c7f99;
|
|
|
}
|
|
|
.ML__highlight {
|
|
|
color: #007cb2;
|
|
|
background: #edd1b0;
|
|
|
}
|
|
|
.ML__center {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.ML__label_padding {
|
|
|
padding: 0 0.5em;
|
|
|
}
|
|
|
.ML__frac-line {
|
|
|
width: 100%;
|
|
|
min-height: 1px;
|
|
|
}
|
|
|
.ML__frac-line:after {
|
|
|
content: '';
|
|
|
display: block;
|
|
|
margin-top: max(-1px, -0.04em);
|
|
|
min-height: max(1px, 0.04em);
|
|
|
/* Ensure the line is visible when printing even if "turn off background images" is on*/
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
/* There's a bug since Chrome 62 where
|
|
|
sub-pixel border lines don't draw at some zoom
|
|
|
levels (110%, 90%).
|
|
|
Setting the min-height used to work around it, but that workaround
|
|
|
broke in Chrome 84 or so.
|
|
|
Setting the background (and the min-height) seems to work for now.
|
|
|
*/
|
|
|
background: currentColor;
|
|
|
box-sizing: content-box;
|
|
|
/* Vuetify sets the box-sizing to inherit
|
|
|
causes the fraction line to not draw at all sizes (see #26) */
|
|
|
/* On some versions of Firefox on Windows, the line fails to
|
|
|
draw at some zoom levels, but setting the transform triggers
|
|
|
the hardware accelerated path, which works */
|
|
|
transform: translate(0, 0);
|
|
|
}
|
|
|
.ML__sqrt {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__sqrt-sign {
|
|
|
display: inline-block;
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__sqrt-line {
|
|
|
display: inline-block;
|
|
|
height: max(1px, 0.04em);
|
|
|
width: 100%;
|
|
|
}
|
|
|
.ML__sqrt-line:before {
|
|
|
content: '';
|
|
|
display: block;
|
|
|
margin-top: min(-1px, -0.04em);
|
|
|
min-height: max(1px, 0.04em);
|
|
|
/* Ensure the line is visible when printing even if "turn off background images" is on*/
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
background: currentColor;
|
|
|
/* On some versions of Firefox on Windows, the line fails to
|
|
|
draw at some zoom levels, but setting the transform triggers
|
|
|
the hardware accelerated path, which works */
|
|
|
transform: translate(0, 0);
|
|
|
}
|
|
|
.ML__sqrt-line:after {
|
|
|
border-bottom-width: 1px;
|
|
|
content: ' ';
|
|
|
display: block;
|
|
|
margin-top: -0.1em;
|
|
|
}
|
|
|
.ML__sqrt-index {
|
|
|
margin-left: 0.27777778em;
|
|
|
margin-right: -0.55555556em;
|
|
|
}
|
|
|
.ML__delim-size1 {
|
|
|
font-family: KaTeX_Size1;
|
|
|
}
|
|
|
.ML__delim-size2 {
|
|
|
font-family: KaTeX_Size2;
|
|
|
}
|
|
|
.ML__delim-size3 {
|
|
|
font-family: KaTeX_Size3;
|
|
|
}
|
|
|
.ML__delim-size4 {
|
|
|
font-family: KaTeX_Size4;
|
|
|
}
|
|
|
.ML__delim-mult .delim-size1 > span {
|
|
|
font-family: KaTeX_Size1;
|
|
|
}
|
|
|
.ML__delim-mult .delim-size4 > span {
|
|
|
font-family: KaTeX_Size4;
|
|
|
}
|
|
|
.ML__accent-body > span {
|
|
|
font-family: KaTeX_Main;
|
|
|
width: 0;
|
|
|
}
|
|
|
.ML__accent-vec {
|
|
|
position: relative;
|
|
|
left: 0.24em;
|
|
|
}
|
|
|
/** The markup for a LaTeX formula, either in an editable mathfield or
|
|
|
in a static display.
|
|
|
*/
|
|
|
.ML__latex {
|
|
|
display: inline-block;
|
|
|
direction: ltr;
|
|
|
text-align: left;
|
|
|
text-indent: 0;
|
|
|
text-rendering: auto;
|
|
|
font-family: KaTeX_Main, 'Times New Roman', serif;
|
|
|
font-style: normal;
|
|
|
font-size-adjust: none;
|
|
|
font-stretch: normal;
|
|
|
font-variant-caps: normal;
|
|
|
letter-spacing: normal;
|
|
|
line-height: 1.2;
|
|
|
word-wrap: normal;
|
|
|
word-spacing: normal;
|
|
|
white-space: nowrap;
|
|
|
text-shadow: none;
|
|
|
-webkit-user-select: none;
|
|
|
user-select: none;
|
|
|
width: min-content;
|
|
|
}
|
|
|
.ML__latex .style-wrap {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .mfrac {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .left-right {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .vlist-t {
|
|
|
display: inline-table;
|
|
|
table-layout: fixed;
|
|
|
border-collapse: collapse;
|
|
|
}
|
|
|
.ML__latex .vlist-r {
|
|
|
display: table-row;
|
|
|
}
|
|
|
.ML__latex .vlist {
|
|
|
display: table-cell;
|
|
|
vertical-align: bottom;
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .vlist > span {
|
|
|
display: block;
|
|
|
height: 0;
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .vlist > span > span {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .vlist > span > .pstrut {
|
|
|
overflow: hidden;
|
|
|
width: 0;
|
|
|
}
|
|
|
.ML__latex .vlist-t2 {
|
|
|
margin-right: -2px;
|
|
|
}
|
|
|
.ML__latex .vlist-s {
|
|
|
display: table-cell;
|
|
|
vertical-align: bottom;
|
|
|
font-size: 1px;
|
|
|
width: 2px;
|
|
|
min-width: 2px;
|
|
|
}
|
|
|
.ML__latex .msubsup {
|
|
|
text-align: left;
|
|
|
}
|
|
|
.ML__latex .negativethinspace {
|
|
|
display: inline-block;
|
|
|
margin-left: -0.16667em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .thinspace {
|
|
|
display: inline-block;
|
|
|
width: 0.16667em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .mediumspace {
|
|
|
display: inline-block;
|
|
|
width: 0.22222em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .thickspace {
|
|
|
display: inline-block;
|
|
|
width: 0.27778em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .enspace {
|
|
|
display: inline-block;
|
|
|
width: 0.5em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .quad {
|
|
|
display: inline-block;
|
|
|
width: 1em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .qquad {
|
|
|
display: inline-block;
|
|
|
width: 2em;
|
|
|
height: 0.71em;
|
|
|
}
|
|
|
.ML__latex .llap,
|
|
|
.ML__latex .rlap {
|
|
|
width: 0;
|
|
|
position: relative;
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .llap > .inner,
|
|
|
.ML__latex .rlap > .inner {
|
|
|
position: absolute;
|
|
|
}
|
|
|
.ML__latex .llap > .fix,
|
|
|
.ML__latex .rlap > .fix {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .llap > .inner {
|
|
|
right: 0;
|
|
|
}
|
|
|
.ML__latex .rlap > .inner {
|
|
|
left: 0;
|
|
|
}
|
|
|
.ML__latex .rule {
|
|
|
display: inline-block;
|
|
|
border: solid 0;
|
|
|
position: relative;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.ML__latex .overline .overline-line,
|
|
|
.ML__latex .underline .underline-line {
|
|
|
width: 100%;
|
|
|
}
|
|
|
.ML__latex .overline .overline-line:before,
|
|
|
.ML__latex .underline .underline-line:before {
|
|
|
content: '';
|
|
|
border-bottom-style: solid;
|
|
|
border-bottom-width: max(1px, 0.04em);
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
display: block;
|
|
|
}
|
|
|
.ML__latex .overline .overline-line:after,
|
|
|
.ML__latex .underline .underline-line:after {
|
|
|
border-bottom-style: solid;
|
|
|
border-bottom-width: max(1px, 0.04em);
|
|
|
-webkit-print-color-adjust: exact;
|
|
|
print-color-adjust: exact;
|
|
|
content: '';
|
|
|
display: block;
|
|
|
margin-top: -1px;
|
|
|
}
|
|
|
.ML__latex .stretchy {
|
|
|
display: block;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
left: 0;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .stretchy:before,
|
|
|
.ML__latex .stretchy:after {
|
|
|
content: '';
|
|
|
}
|
|
|
.ML__latex .stretchy svg {
|
|
|
display: block;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
height: inherit;
|
|
|
fill: currentColor;
|
|
|
stroke: currentColor;
|
|
|
fill-rule: nonzero;
|
|
|
fill-opacity: 1;
|
|
|
stroke-width: 1;
|
|
|
stroke-linecap: butt;
|
|
|
stroke-linejoin: miter;
|
|
|
stroke-miterlimit: 4;
|
|
|
stroke-dasharray: none;
|
|
|
stroke-dashoffset: 0;
|
|
|
stroke-opacity: 1;
|
|
|
}
|
|
|
.ML__latex .slice-1-of-2 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
width: 50.2%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-2-of-2 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
width: 50.2%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-1-of-3 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
width: 25.1%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-2-of-3 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
left: 25%;
|
|
|
width: 50%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-3-of-3 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
width: 25.1%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .slice-1-of-1 {
|
|
|
display: inline-flex;
|
|
|
position: absolute;
|
|
|
width: 100%;
|
|
|
left: 0;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
.ML__latex .nulldelimiter {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .op-group {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .op-symbol {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__latex .op-symbol.small-op {
|
|
|
font-family: KaTeX_Size1;
|
|
|
}
|
|
|
.ML__latex .op-symbol.large-op {
|
|
|
font-family: KaTeX_Size2;
|
|
|
}
|
|
|
.ML__latex .mtable .vertical-separator {
|
|
|
display: inline-block;
|
|
|
min-width: 1px;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.ML__latex .mtable .arraycolsep {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-m > .vlist-t {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-c > .vlist-t {
|
|
|
text-align: center;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-l > .vlist-t {
|
|
|
text-align: left;
|
|
|
}
|
|
|
.ML__latex .mtable .col-align-r > .vlist-t {
|
|
|
text-align: right;
|
|
|
}
|
|
|
.ML__error {
|
|
|
display: inline-block;
|
|
|
background-image: radial-gradient(ellipse at center, hsl(341, 100%, 40%), rgba(0, 0, 0, 0) 70%);
|
|
|
background-color: hsla(341, 100%, 40%, 0.1);
|
|
|
background-repeat: repeat-x;
|
|
|
background-size: 3px 3px;
|
|
|
padding-bottom: 3px;
|
|
|
background-position: 0 100%;
|
|
|
}
|
|
|
.ML__error > .ML__error {
|
|
|
background: transparent;
|
|
|
padding: 0;
|
|
|
}
|
|
|
.ML__placeholder {
|
|
|
color: var(--_placeholder-color);
|
|
|
opacity: var(--_placeholder-opacity);
|
|
|
padding-left: 0.4ex;
|
|
|
padding-right: 0.4ex;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
}
|
|
|
.ML__notation {
|
|
|
position: absolute;
|
|
|
box-sizing: border-box;
|
|
|
line-height: 0;
|
|
|
}
|
|
|
/* This class is used to implement the \`\\mathtip\` and \`\\texttip\` commands
|
|
|
For UI elements, see \`[data-ML__tooltip]\`
|
|
|
*/
|
|
|
.ML__tooltip-container {
|
|
|
position: relative;
|
|
|
transform: scale(0);
|
|
|
}
|
|
|
.ML__tooltip-container .ML__tooltip-content {
|
|
|
position: fixed;
|
|
|
display: inline-table;
|
|
|
visibility: hidden;
|
|
|
z-index: 2;
|
|
|
width: max-content;
|
|
|
max-width: 400px;
|
|
|
padding: 12px 12px;
|
|
|
border-radius: 8px;
|
|
|
background: #616161;
|
|
|
--_selection-color: #fff;
|
|
|
color: #fff;
|
|
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
|
opacity: 0;
|
|
|
transition: opacity 0.15s cubic-bezier(0.4, 0, 1, 1);
|
|
|
}
|
|
|
.ML__tooltip-container .ML__tooltip-content .ML__text {
|
|
|
white-space: normal;
|
|
|
}
|
|
|
.ML__tooltip-container .ML__tooltip-content .ML__base {
|
|
|
display: contents;
|
|
|
}
|
|
|
.ML__tooltip-container:hover .ML__tooltip-content {
|
|
|
visibility: visible;
|
|
|
opacity: 1;
|
|
|
font-size: 0.75em;
|
|
|
transform: scale(1) translate(0, 3em);
|
|
|
}
|
|
|
`,_d=`#mathlive-environment-popover.is-visible {
|
|
|
visibility: visible;
|
|
|
}
|
|
|
#mathlive-environment-popover {
|
|
|
--_environment-panel-height: var(--environment-panel-height, 70px);
|
|
|
--_accent-color: var(--accent-color, #aaa);
|
|
|
--_background: var(--environment-panel-background, #fff);
|
|
|
--_button-background: var(--environment-panel-button-background, white);
|
|
|
--_button-background-hover: var(--environment-panel-button-background-hover, #f5f5f7);
|
|
|
--_button-background-active: var(--environment-panel-button-background-active, #f5f5f7);
|
|
|
--_button-text: var(--environment-panel-button-text, #e3e4e8);
|
|
|
position: absolute;
|
|
|
width: calc(var(--_environment-panel-height) * 2);
|
|
|
height: var(--_environment-panel-height);
|
|
|
border-radius: 4px;
|
|
|
border: 1.5px solid var(--_accent-color);
|
|
|
background-color: var(--_background);
|
|
|
box-shadow: 0 0 30px 0 var(--environment-shadow, rgba(0, 0, 0, 0.4));
|
|
|
pointer-events: all;
|
|
|
visibility: hidden;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons {
|
|
|
height: calc(var(--_environment-panel-height) * 5/4);
|
|
|
width: calc(var(--_environment-panel-height) * 5/4);
|
|
|
margin-left: calc(0px - var(--_environment-panel-height) * 0.16);
|
|
|
margin-top: calc(0px - var(--_environment-panel-height) * 0.19);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons .font {
|
|
|
fill: white;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons circle {
|
|
|
fill: #7f7f7f;
|
|
|
transition: fill 300ms;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons .MLEP__array-insert-background {
|
|
|
fill-opacity: 1;
|
|
|
fill: var(--_background);
|
|
|
stroke: var(--_accent-color);
|
|
|
stroke-width: 3px;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons line {
|
|
|
stroke: var(--_accent-color);
|
|
|
stroke-opacity: 0;
|
|
|
stroke-width: 40;
|
|
|
pointer-events: none;
|
|
|
transition: stroke-opacity 300ms;
|
|
|
stroke-linecap: round;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover circle {
|
|
|
fill: var(--_accent-color);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__array-buttons g[data-command]:hover line {
|
|
|
stroke-opacity: 1;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls {
|
|
|
height: 100%;
|
|
|
width: 50%;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options {
|
|
|
width: var(--_environment-panel-height);
|
|
|
height: var(--_environment-panel-height);
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-around;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg {
|
|
|
pointer-events: all;
|
|
|
margin-top: 2px;
|
|
|
width: calc(var(--_environment-panel-height) / 3 * 28 / 24);
|
|
|
height: calc(var(--_environment-panel-height) / 3 - 2px);
|
|
|
border-radius: calc(var(--_environment-panel-height) / 25);
|
|
|
background-color: var(--_button-background);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg:hover {
|
|
|
background-color: var(--_button-background-hover);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path,
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg line {
|
|
|
stroke: var(--_button-text);
|
|
|
stroke-width: 2;
|
|
|
stroke-linecap: round;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg rect,
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg path {
|
|
|
fill-opacity: 0;
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active {
|
|
|
pointer-events: none;
|
|
|
background-color: var(--_button-background-active);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active path,
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active line {
|
|
|
stroke: var(--_accent-color);
|
|
|
}
|
|
|
#mathlive-environment-popover .MLEP__environment-delimiter-controls .MLEP__array-delimiter-options svg.active circle {
|
|
|
fill: var(--_accent-color);
|
|
|
}
|
|
|
`,mf=`/* The element that display info while in latex mode */
|
|
|
#mathlive-suggestion-popover {
|
|
|
background-color: rgba(97, 97, 97);
|
|
|
color: #fff;
|
|
|
text-align: center;
|
|
|
border-radius: 8px;
|
|
|
position: fixed;
|
|
|
z-index: 1;
|
|
|
display: none;
|
|
|
flex-direction: column;
|
|
|
justify-content: center;
|
|
|
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
|
|
|
}
|
|
|
#mathlive-suggestion-popover.top-tip::after {
|
|
|
content: '';
|
|
|
position: absolute;
|
|
|
top: -15px;
|
|
|
left: calc(50% - 15px);
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border-left: 15px solid transparent;
|
|
|
border-right: 15px solid transparent;
|
|
|
border-bottom: 15px solid rgba(97, 97, 97);
|
|
|
font-size: 1rem;
|
|
|
}
|
|
|
#mathlive-suggestion-popover.bottom-tip::after {
|
|
|
content: '';
|
|
|
position: absolute;
|
|
|
bottom: -15px;
|
|
|
left: calc(50% - 15px);
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border-left: 15px solid transparent;
|
|
|
border-right: 15px solid transparent;
|
|
|
border-top: 15px solid rgba(97, 97, 97);
|
|
|
font-size: 1rem;
|
|
|
}
|
|
|
#mathlive-suggestion-popover.is-animated {
|
|
|
transition: all 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
|
|
|
animation: ML__fade-in cubic-bezier(0, 0, 0.2, 1) 0.15s;
|
|
|
}
|
|
|
#mathlive-suggestion-popover.is-visible {
|
|
|
display: flex;
|
|
|
}
|
|
|
@keyframes ML__fade-in {
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
}
|
|
|
/* The wrapper class for the entire content of the popover panel */
|
|
|
#mathlive-suggestion-popover ul {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
list-style: none;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
align-items: flex-start;
|
|
|
max-height: 400px;
|
|
|
overflow-y: auto;
|
|
|
}
|
|
|
#mathlive-suggestion-popover li {
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
margin: 8px;
|
|
|
padding: 8px;
|
|
|
width: calc(100% - 16px - 16px);
|
|
|
column-gap: 1em;
|
|
|
border-radius: 8px;
|
|
|
cursor: pointer;
|
|
|
/* Since the content can be clicked on, provide feedback on hover */
|
|
|
}
|
|
|
#mathlive-suggestion-popover li a {
|
|
|
color: #5ea6fd;
|
|
|
padding-top: 0.3em;
|
|
|
margin-top: 0.4em;
|
|
|
display: block;
|
|
|
}
|
|
|
#mathlive-suggestion-popover li a:hover {
|
|
|
color: #5ea6fd;
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
#mathlive-suggestion-popover li:hover,
|
|
|
#mathlive-suggestion-popover li.is-pressed,
|
|
|
#mathlive-suggestion-popover li.is-active {
|
|
|
background: rgba(255, 255, 255, 0.1);
|
|
|
}
|
|
|
/* The command inside a popover (inside a #mathlive-suggestion-popover) */
|
|
|
.ML__popover__command {
|
|
|
font-size: 1.6rem;
|
|
|
font-family: KaTeX_Main;
|
|
|
}
|
|
|
.ML__popover__current {
|
|
|
background: #5ea6fd;
|
|
|
color: #fff;
|
|
|
}
|
|
|
.ML__popover__latex {
|
|
|
font-family: 'IBM Plex Mono', 'Source Code Pro', Consolas, 'Roboto Mono', Menlo, 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', Monaco, Courier, monospace;
|
|
|
align-self: center;
|
|
|
}
|
|
|
/* The keyboard shortcuts for a symbol as displayed in the popover */
|
|
|
.ML__popover__keybinding {
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 0.8em;
|
|
|
opacity: 0.7;
|
|
|
}
|
|
|
/* Style for the character that joins the modifiers of a keyboard shortcut
|
|
|
(usually a "+" sign)*/
|
|
|
.ML__shortcut-join {
|
|
|
opacity: 0.5;
|
|
|
}
|
|
|
`,vc=`/* The element that displays the keys as the user type them */
|
|
|
#mathlive-keystroke-caption-panel {
|
|
|
visibility: hidden;
|
|
|
/*min-width: 160px;*/
|
|
|
/*background-color: rgba(97, 97, 200, .95);*/
|
|
|
background: var(--secondary, hsl(var(--_hue), 19%, 26%));
|
|
|
border-color: var(--secondary-border, hsl(0, 0%, 91%));
|
|
|
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
|
|
|
text-align: center;
|
|
|
border-radius: 6px;
|
|
|
padding: 16px;
|
|
|
position: absolute;
|
|
|
z-index: 1;
|
|
|
display: flex;
|
|
|
flex-direction: row-reverse;
|
|
|
justify-content: center;
|
|
|
--keystroke: white;
|
|
|
--on-keystroke: #555;
|
|
|
--keystroke-border: #f7f7f7;
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
body:not([theme='light']) #mathlive-keystroke-caption-panel {
|
|
|
--keystroke: hsl(var(--_hue), 50%, 30%);
|
|
|
--on-keystroke: hsl(0, 0%, 98%);
|
|
|
--keystroke-border: hsl(var(--_hue), 50%, 25%);
|
|
|
}
|
|
|
}
|
|
|
body[theme='dark'] #mathlive-keystroke-caption-panel {
|
|
|
--keystroke: hsl(var(--_hue), 50%, 30%);
|
|
|
--on-keystroke: hsl(0, 0%, 98%);
|
|
|
--keystroke-border: hsl(var(--_hue), 50%, 25%);
|
|
|
}
|
|
|
#mathlive-keystroke-caption-panel > span {
|
|
|
min-width: 14px;
|
|
|
/*height: 8px;*/
|
|
|
margin: 0 8px 0 0;
|
|
|
padding: 4px;
|
|
|
background-color: var(--keystroke);
|
|
|
color: var(--on-keystroke);
|
|
|
fill: currentColor;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 1em;
|
|
|
border-radius: 6px;
|
|
|
border: 2px solid var(--keystroke-border);
|
|
|
/*box-shadow: 0 7px 14px rgba(0,0,0,0.25), 0 5px 5px rgba(0,0,0,0.22);*/
|
|
|
}
|
|
|
`,gf=`.ML__keyboard {
|
|
|
--_keyboard-height: 0;
|
|
|
--_keyboard-zindex: var(--keyboard-zindex, 105);
|
|
|
--_accent-color: var(--keyboard-accent-color, #0c75d8);
|
|
|
--_background: var(--keyboard-background, #cacfd7);
|
|
|
--_border: var(--keyboard-border, #ddd);
|
|
|
--_padding-horizontal: var(--keyboard-padding-horizontal, 0px);
|
|
|
--_padding-top: var(--keyboard-padding-top, 5px);
|
|
|
--_padding-bottom: var(--keyboard-padding-bottom, 0px);
|
|
|
--_row-padding-left: var(--keyboard-row-padding-left, 0px);
|
|
|
--_row-padding-right: var(--keyboard-row-padding-right, 0px);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);
|
|
|
--_toolbar-text-active: var(--keyboard-toolbar-text-active, var(--_accent-color));
|
|
|
--_toolbar-background: var(--keyboard-toolbar-background, transparent);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);
|
|
|
--_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);
|
|
|
--_toolbar-font-size: var(--keyboard-toolbar-font-size, '135%');
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);
|
|
|
--_keycap-background: var(--keycap-background, white);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);
|
|
|
--_keycap-background-active: var(--keycap-background-active, var(--_accent-color));
|
|
|
--_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));
|
|
|
--_keycap-border: var(--keycap-border, #e5e6e9);
|
|
|
--_keycap-border-bottom: var(--keycap-border-bottom, #8d8f92);
|
|
|
--_keycap-text: var(--keycap-text, #000);
|
|
|
--_keycap-text-active: var(--keycap-text-active, #fff);
|
|
|
--_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));
|
|
|
--_keycap-text-pressed: var(--keycap-text-pressed, #fff);
|
|
|
--_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));
|
|
|
--_keycap-primary-background: var(--keycap-primary-background, var(--_accent-color));
|
|
|
--_keycap-primary-text: var(--keycap-primary-text, #ddd);
|
|
|
--_keycap-primary-background-hover: var(--keycap-primary-background-hover, #0d80f2);
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #060707);
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);
|
|
|
--_keycap-height: var(--keycap-height, 60px);
|
|
|
/* Keycap width (incl. margin) */
|
|
|
--_keycap-max-width: var(--keycap-max-width, 100px);
|
|
|
--_keycap-gap: var(--keycap-gap, 8px);
|
|
|
--_keycap-font-size: var(--keycap-font-size, clamp(16px, 4cqw, 24px));
|
|
|
--_keycap-small-font-size: var(--keycap-small-font-size, calc(var(--keycap-font-size) * 0.8));
|
|
|
--_keycap-extra-small-font-size: var(--keycap-extra-small-font-size, calc(var(--keycap-font-size) / 1.42));
|
|
|
--_variant-panel-background: var(--variant-panel-background, #fff);
|
|
|
--_variant-keycap-text: var(--variant-keycap-text, var(--_keycap-text));
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));
|
|
|
--_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 70px);
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 30px);
|
|
|
--_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 12px);
|
|
|
--_keycap-shift-font-size: var(--keycap-shift-font-size, 16px);
|
|
|
--_keycap-shift-color: var(--keycap-shift-color, var(--_accent-color));
|
|
|
--_box-placeholder-color: var(--box-placeholder-color, var(--_accent-color));
|
|
|
--_box-placeholder-pressed-color: var(--box-placeholder-pressed-color, var(--keycap-text-pressed));
|
|
|
}
|
|
|
.is-math-mode .MLK__rows .if-text-mode,
|
|
|
.is-text-mode .MLK__rows .if-math-mode {
|
|
|
display: none;
|
|
|
}
|
|
|
.if-can-undo,
|
|
|
.if-can-redo,
|
|
|
.if-can-copy,
|
|
|
.if-can-cut,
|
|
|
.if-can-paste {
|
|
|
opacity: 0.4;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.can-undo .if-can-undo,
|
|
|
.can-redo .if-can-redo,
|
|
|
.can-copy .if-can-copy,
|
|
|
.can-cut .if-can-cut,
|
|
|
.can-paste .if-can-paste {
|
|
|
opacity: 1;
|
|
|
pointer-events: all;
|
|
|
}
|
|
|
body > .ML__keyboard {
|
|
|
position: fixed;
|
|
|
--_padding-bottom: calc(var(--keyboard-padding-bottom, 0px) + env(safe-area-inset-bottom, 0));
|
|
|
}
|
|
|
body > .ML__keyboard.is-visible > .MLK__backdrop {
|
|
|
box-shadow: 0 -5px 6px rgba(0, 0, 0, 0.08);
|
|
|
border-top: 1px solid var(--_border);
|
|
|
}
|
|
|
body > .ML__keyboard.backdrop-is-transparent.is-visible > .MLK__backdrop {
|
|
|
box-shadow: none;
|
|
|
border: none;
|
|
|
}
|
|
|
body > .ML__keyboard.is-visible.animate > .MLK__backdrop {
|
|
|
transition: 0.28s cubic-bezier(0, 0, 0.2, 1);
|
|
|
transition-property: transform, opacity;
|
|
|
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
|
|
}
|
|
|
.ML__keyboard {
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
height: 100%;
|
|
|
width: 100%;
|
|
|
z-index: var(--_keyboard-zindex);
|
|
|
box-sizing: border-box;
|
|
|
outline: none;
|
|
|
border: none;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
line-height: 1;
|
|
|
overflow-wrap: unset;
|
|
|
text-align: left;
|
|
|
vertical-align: baseline;
|
|
|
cursor: auto;
|
|
|
white-space: pre;
|
|
|
box-shadow: none;
|
|
|
opacity: 1;
|
|
|
transform: none;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.ML__keyboard :where(div) {
|
|
|
box-sizing: border-box;
|
|
|
outline: none;
|
|
|
border: none;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
line-height: 1;
|
|
|
overflow-wrap: unset;
|
|
|
text-align: left;
|
|
|
vertical-align: baseline;
|
|
|
cursor: auto;
|
|
|
white-space: pre;
|
|
|
box-shadow: none;
|
|
|
transform: none;
|
|
|
}
|
|
|
.MLK__backdrop {
|
|
|
position: absolute;
|
|
|
bottom: calc(-1 * var(--_keyboard-height));
|
|
|
width: 100%;
|
|
|
height: var(--_keyboard-height);
|
|
|
box-sizing: border-box;
|
|
|
padding-top: var(--_padding-top);
|
|
|
padding-bottom: var(--_padding-bottom);
|
|
|
padding-left: var(--_padding-horizontal);
|
|
|
padding-right: var(--_padding-horizontal);
|
|
|
opacity: 0;
|
|
|
visibility: hidden;
|
|
|
transform: translate(0, 0);
|
|
|
background: var(--_background);
|
|
|
}
|
|
|
.backdrop-is-transparent .MLK__backdrop {
|
|
|
background: transparent;
|
|
|
}
|
|
|
/* If a custom layout has a custom container/backdrop
|
|
|
(backdrop-is-transparent), make sure to let pointer event go through. */
|
|
|
.backdrop-is-transparent .MLK__plate {
|
|
|
background: transparent;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
/* If a custom layout has a custom container/backdrop, make sure to
|
|
|
allow pointer events on it. */
|
|
|
.backdrop-is-transparent .MLK__layer > div > div {
|
|
|
pointer-events: all;
|
|
|
}
|
|
|
.ML__keyboard.is-visible > .MLK__backdrop {
|
|
|
transform: translate(0, calc(-1 * var(--_keyboard-height)));
|
|
|
opacity: 1;
|
|
|
visibility: visible;
|
|
|
}
|
|
|
.caps-lock-indicator {
|
|
|
display: none;
|
|
|
width: 8px;
|
|
|
height: 8px;
|
|
|
background: #0cbc0c;
|
|
|
box-shadow: inset 0 0 4px 0 #13ca13, 0 0 4px 0 #a9ef48;
|
|
|
border-radius: 8px;
|
|
|
right: 8px;
|
|
|
top: 8px;
|
|
|
position: absolute;
|
|
|
}
|
|
|
.ML__keyboard.is-caps-lock .caps-lock-indicator {
|
|
|
display: block;
|
|
|
}
|
|
|
.ML__keyboard.is-caps-lock .shift {
|
|
|
background: var(--_keycap-background-active);
|
|
|
color: var(--_keycap-text-active);
|
|
|
}
|
|
|
.MLK__plate {
|
|
|
position: absolute;
|
|
|
top: var(--_padding-top);
|
|
|
left: var(--_padding-horizontal);
|
|
|
width: calc(100% - 2 * var(--_padding-horizontal));
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
box-sizing: border-box;
|
|
|
container-type: inline-size;
|
|
|
touch-action: none;
|
|
|
-webkit-user-select: none;
|
|
|
user-select: none;
|
|
|
pointer-events: all;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 16px;
|
|
|
/* Size of toolbar labels */
|
|
|
font-weight: 400;
|
|
|
text-shadow: none;
|
|
|
}
|
|
|
.ML__box-placeholder {
|
|
|
color: var(--_box-placeholder-color);
|
|
|
}
|
|
|
.MLK__tex {
|
|
|
font-family: KaTeX_Main, KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
}
|
|
|
.MLK__tex-math {
|
|
|
font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
font-style: italic;
|
|
|
}
|
|
|
.MLK__layer {
|
|
|
display: none;
|
|
|
outline: none;
|
|
|
}
|
|
|
.MLK__layer.is-visible {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
}
|
|
|
/* Keyboard layouts are made or rows of keys... */
|
|
|
.MLK__rows {
|
|
|
--_keycap-width: min(var(--_keycap-max-width), 10cqw);
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
align-items: center;
|
|
|
border-collapse: separate;
|
|
|
clear: both;
|
|
|
border: 0;
|
|
|
margin: 0;
|
|
|
margin-bottom: var(--_keycap-gap);
|
|
|
gap: var(--_keycap-gap);
|
|
|
/* If the styling include, e.g., some shadows, they will be
|
|
|
cut off by the overflow. In that case, set the padding to
|
|
|
compensate. */
|
|
|
padding-left: var(--_row-padding-left);
|
|
|
padding-right: var(--_row-padding-right);
|
|
|
overflow: visible;
|
|
|
touch-action: none;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row {
|
|
|
display: flex;
|
|
|
flex-flow: row;
|
|
|
justify-content: center;
|
|
|
width: 100%;
|
|
|
gap: var(--_keycap-gap);
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
/* For the alignment of the text on some modifiers (e.g. shift) */
|
|
|
/* Extra spacing between two adjacent keys */
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .tex {
|
|
|
font-family: KaTeX_Math, KaTeX_Main, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .tex-math {
|
|
|
font-family: KaTeX_Math, 'Cambria Math', 'Asana Math', OpenSymbol, Symbola, STIX, Times, serif !important;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .big-op {
|
|
|
font-size: calc(1.25 * var(--_keycap-font-size));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .small {
|
|
|
font-size: var(--_keycap-small-font-size);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .bottom {
|
|
|
justify-content: flex-end;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .left {
|
|
|
align-items: flex-start;
|
|
|
padding-left: 12px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .right {
|
|
|
align-items: flex-end;
|
|
|
padding-right: 12px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w0 {
|
|
|
width: 0;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w5 {
|
|
|
width: calc(0.5 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w15 {
|
|
|
width: calc(1.5 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w20 {
|
|
|
width: calc(2 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w40 {
|
|
|
width: calc(4 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .w50 {
|
|
|
width: calc(5 * var(--_keycap-width) - var(--_keycap-gap));
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .MLK__keycap.w50 {
|
|
|
font-size: 80%;
|
|
|
padding-top: 10px;
|
|
|
font-weight: 100;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .separator {
|
|
|
background: transparent;
|
|
|
border: none;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .horizontal-rule {
|
|
|
height: 6px;
|
|
|
margin-top: 3px;
|
|
|
margin-bottom: 0;
|
|
|
width: 100%;
|
|
|
border-radius: 0;
|
|
|
border-top: var(--_horizontal-rule);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .ghost {
|
|
|
background: var(--_toolbar-background);
|
|
|
border: none;
|
|
|
color: var(--_toolbar-text);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .ghost:hover {
|
|
|
background: var(--_toolbar-background-hover);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .bigfnbutton {
|
|
|
font-size: var(--_keycap-extra-small-font-size);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift,
|
|
|
.MLK__rows > .MLK__row .action {
|
|
|
color: var(--_keycap-secondary-text);
|
|
|
background: var(--_keycap-secondary-background);
|
|
|
border-color: var(--_keycap-secondary-border);
|
|
|
border-bottom-color: var(--_keycap-secondary-border-bottom);
|
|
|
line-height: 0.8;
|
|
|
font-size: min(1rem, var(--_keycap-small-font-size));
|
|
|
font-weight: 600;
|
|
|
padding: 8px 12px 8px 12px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift:hover,
|
|
|
.MLK__rows > .MLK__row .action:hover {
|
|
|
background: var(--_keycap-secondary-background-hover);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .action.primary {
|
|
|
background: var(--_keycap-primary-background);
|
|
|
color: var(--_keycap-primary-text);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .action.primary:hover {
|
|
|
background: var(--_keycap-primary-background-hover);
|
|
|
color: var(--_keycap-primary-text);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift.selected,
|
|
|
.MLK__rows > .MLK__row .action.selected {
|
|
|
color: var(--_toolbar-text-active);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .shift.selected.is-pressed,
|
|
|
.MLK__rows > .MLK__row .action.selected.is-pressed,
|
|
|
.MLK__rows > .MLK__row .shift.selected.is-active,
|
|
|
.MLK__rows > .MLK__row .action.selected.is-active {
|
|
|
color: white;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .warning {
|
|
|
background: #cd0030;
|
|
|
color: white;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row .warning svg.svg-glyph {
|
|
|
width: 24px;
|
|
|
height: 24px;
|
|
|
min-height: 24px;
|
|
|
}
|
|
|
/** A regular keycap
|
|
|
* Use the :where() pseudo-class to give it a very low specifity,
|
|
|
* so that it can be overriden by custom style.
|
|
|
*/
|
|
|
:where(.MLK__rows > .MLK__row div) {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
align-items: center;
|
|
|
justify-content: space-evenly;
|
|
|
width: calc(var(--_keycap-width) - var(--_keycap-gap));
|
|
|
height: var(--_keycap-height);
|
|
|
box-sizing: border-box;
|
|
|
padding: 0;
|
|
|
vertical-align: top;
|
|
|
text-align: center;
|
|
|
float: left;
|
|
|
color: var(--_keycap-text);
|
|
|
fill: currentColor;
|
|
|
font-size: var(--_keycap-font-size);
|
|
|
background: var(--_keycap-background);
|
|
|
border: 1px solid var(--_keycap-border);
|
|
|
border-bottom-color: var(--_keycap-border-bottom);
|
|
|
border-radius: 6px;
|
|
|
cursor: pointer;
|
|
|
touch-action: none;
|
|
|
/* Keys with a variants panel */
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
-webkit-user-select: none;
|
|
|
user-select: none;
|
|
|
-webkit-tap-highlight-color: transparent;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div):hover {
|
|
|
overflow: visible;
|
|
|
background: var(--_keycap-background-hover);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) .ML__latex {
|
|
|
pointer-events: none;
|
|
|
touch-action: none;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) svg.svg-glyph {
|
|
|
margin: 8px 0;
|
|
|
width: 20px;
|
|
|
height: 20px;
|
|
|
min-height: 20px;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) svg.svg-glyph-lg {
|
|
|
margin: 8px 0;
|
|
|
width: 24px;
|
|
|
height: 24px;
|
|
|
min-height: 24px;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__tex-math {
|
|
|
font-size: 25px;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).is-pressed {
|
|
|
background: var(--_keycap-background-pressed);
|
|
|
color: var(--_keycap-text-pressed);
|
|
|
--_box-placeholder-color: var(--_box-placeholder-pressed-color);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed {
|
|
|
z-index: calc(var(--_keyboard-zindex) - 5);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active aside,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active aside,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed aside,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed aside {
|
|
|
display: none;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active .MLK__shift,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active .MLK__shift,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed .MLK__shift,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed .MLK__shift {
|
|
|
display: none;
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).shift.is-pressed,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-pressed,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-pressed {
|
|
|
background: var(--_keycap-background-pressed);
|
|
|
color: var(--_keycap-text-pressed);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div).shift.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).MLK__keycap.is-active,
|
|
|
:where(.MLK__rows > .MLK__row div).action.is-active {
|
|
|
background: var(--_keycap-background-active);
|
|
|
color: var(--_keycap-text-active);
|
|
|
--_box-placeholder-color: var(--_box-placeholder-pressed-color);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) small {
|
|
|
color: var(--_keycap-secondary-text);
|
|
|
}
|
|
|
:where(.MLK__rows > .MLK__row div) aside {
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-size: 10px;
|
|
|
line-height: 10px;
|
|
|
color: var(--_keycap-secondary-text);
|
|
|
}
|
|
|
/* Add an attribute 'data-tooltip' to display a tooltip on hover.
|
|
|
Note there are a different set of tooltip rules for the keyboard toggle
|
|
|
(it's in a different CSS tree) */
|
|
|
.ML__keyboard [data-tooltip] {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__keyboard [data-tooltip]::after {
|
|
|
position: absolute;
|
|
|
display: inline-table;
|
|
|
content: attr(data-tooltip);
|
|
|
top: inherit;
|
|
|
bottom: 100%;
|
|
|
width: max-content;
|
|
|
max-width: 200px;
|
|
|
padding: 8px 8px;
|
|
|
background: #616161;
|
|
|
color: #fff;
|
|
|
text-align: center;
|
|
|
z-index: 2;
|
|
|
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
|
border-radius: 2px;
|
|
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
|
font-weight: 400;
|
|
|
font-size: 12px;
|
|
|
transition: all 0.15s cubic-bezier(0.4, 0, 1, 1) 1s;
|
|
|
opacity: 0;
|
|
|
transform: scale(0.5);
|
|
|
}
|
|
|
.ML__keyboard [data-tooltip]:hover {
|
|
|
position: relative;
|
|
|
}
|
|
|
.ML__keyboard [data-tooltip]:hover::after {
|
|
|
opacity: 1;
|
|
|
transform: scale(1);
|
|
|
}
|
|
|
.MLK__toolbar {
|
|
|
align-self: center;
|
|
|
display: flex;
|
|
|
flex-flow: row;
|
|
|
justify-content: space-between;
|
|
|
width: 100%;
|
|
|
max-width: 996px;
|
|
|
min-height: 32px;
|
|
|
/* Icons for undo/redo, etc. */
|
|
|
}
|
|
|
.MLK__toolbar svg {
|
|
|
height: 20px;
|
|
|
width: 20px;
|
|
|
}
|
|
|
.MLK__toolbar > .left {
|
|
|
position: relative;
|
|
|
display: flex;
|
|
|
justify-content: flex-start;
|
|
|
flex-flow: row;
|
|
|
}
|
|
|
.MLK__toolbar > .right {
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
flex-flow: row;
|
|
|
}
|
|
|
.MLK__toolbar > div > div {
|
|
|
/* "button" in the toolbar */
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
color: var(--_toolbar-text);
|
|
|
fill: currentColor;
|
|
|
background: var(--_toolbar-background);
|
|
|
font-size: var(--_toolbar-font-size);
|
|
|
padding: 4px 15px;
|
|
|
cursor: pointer;
|
|
|
width: max-content;
|
|
|
min-width: 42px;
|
|
|
min-height: 34px;
|
|
|
border: none;
|
|
|
padding-left: 10px;
|
|
|
padding-right: 10px;
|
|
|
padding-bottom: 8px;
|
|
|
padding-top: 8px;
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 4px;
|
|
|
margin-left: 4px;
|
|
|
margin-right: 4px;
|
|
|
border-radius: 8px;
|
|
|
box-shadow: none;
|
|
|
border-bottom: 2px solid transparent;
|
|
|
}
|
|
|
.MLK__toolbar > div > div:not(.disabled):not(.selected):hover {
|
|
|
background: var(--_toolbar-background-hover);
|
|
|
}
|
|
|
.MLK__toolbar > div > div.disabled svg,
|
|
|
.MLK__toolbar > div > div.disabled:hover svg,
|
|
|
.MLK__toolbar > div > div.disabled.is-pressed svg {
|
|
|
color: var(--_toolbar-text);
|
|
|
opacity: 0.2;
|
|
|
}
|
|
|
.MLK__toolbar > div > div:hover,
|
|
|
.MLK__toolbar > div > div:active,
|
|
|
.MLK__toolbar > div > div.is-pressed,
|
|
|
.MLK__toolbar > div > div.is-active {
|
|
|
color: var(--_toolbar-text-active);
|
|
|
}
|
|
|
.MLK__toolbar > div > div.selected {
|
|
|
color: var(--_toolbar-text-active);
|
|
|
background: var(--_toolbar-background-selected);
|
|
|
border-radius: 0;
|
|
|
border-bottom-color: var(--_toolbar-text-active);
|
|
|
padding-bottom: 4px;
|
|
|
margin-bottom: 8px;
|
|
|
}
|
|
|
/* This is the element that displays variants on press+hold */
|
|
|
.MLK__variant-panel {
|
|
|
visibility: hidden;
|
|
|
position: fixed;
|
|
|
display: flex;
|
|
|
flex-flow: row wrap-reverse;
|
|
|
justify-content: center;
|
|
|
align-content: center;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
bottom: auto;
|
|
|
top: 0;
|
|
|
box-sizing: content-box;
|
|
|
transform: none;
|
|
|
z-index: calc(var(--_keyboard-zindex) + 1);
|
|
|
touch-action: none;
|
|
|
max-width: 350px;
|
|
|
background: var(--_variant-panel-background);
|
|
|
text-align: center;
|
|
|
border-radius: 6px;
|
|
|
padding: 6px;
|
|
|
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
|
|
|
transition: none;
|
|
|
}
|
|
|
.MLK__variant-panel.is-visible {
|
|
|
visibility: visible;
|
|
|
}
|
|
|
.MLK__variant-panel.compact {
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 50px);
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
|
|
|
--_variant-keycap-aside-font-size: var(--variant-keycap-aside-font-size, 10px);
|
|
|
}
|
|
|
.MLK__variant-panel .item {
|
|
|
display: flex;
|
|
|
flex-flow: column;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
font-size: var(--_variant-keycap-font-size);
|
|
|
height: var(--_variant-keycap-length);
|
|
|
width: var(--_variant-keycap-length);
|
|
|
margin: 0;
|
|
|
box-sizing: border-box;
|
|
|
border-radius: 5px;
|
|
|
border: 1px solid transparent;
|
|
|
background: transparent;
|
|
|
pointer-events: all;
|
|
|
cursor: pointer;
|
|
|
color: var(--_variant-keycap-text);
|
|
|
fill: currentColor;
|
|
|
}
|
|
|
@media (max-height: 412px) {
|
|
|
.MLK__variant-panel .item {
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 50px);
|
|
|
}
|
|
|
}
|
|
|
.MLK__variant-panel .item .ML__latex {
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.MLK__variant-panel .item.is-active {
|
|
|
background: var(--_variant-keycap-background-active);
|
|
|
color: var(--_variant-keycap-text-active);
|
|
|
}
|
|
|
.MLK__variant-panel .item.is-pressed {
|
|
|
background: var(--_variant-keycap-background-pressed);
|
|
|
color: var(--_variant-keycap-text-pressed);
|
|
|
}
|
|
|
.MLK__variant-panel .item.small {
|
|
|
font-size: var(--_keycap-small-font-size);
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button {
|
|
|
box-sizing: border-box;
|
|
|
background: #fbfbfb;
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button > span {
|
|
|
display: inline-block;
|
|
|
margin: 6px;
|
|
|
width: calc(100% - 12px);
|
|
|
height: calc(100% - 12px);
|
|
|
border-radius: 50%;
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button:hover {
|
|
|
background: #f0f0f0;
|
|
|
}
|
|
|
.MLK__variant-panel .item.swatch-button:hover > span {
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
.MLK__variant-panel .item.box > div,
|
|
|
.MLK__variant-panel .item.box > span {
|
|
|
border: 1px dashed rgba(0, 0, 0, 0.24);
|
|
|
}
|
|
|
.MLK__variant-panel .item .warning {
|
|
|
min-height: 60px;
|
|
|
min-width: 60px;
|
|
|
background: #cd0030;
|
|
|
color: white;
|
|
|
padding: 5px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
border-radius: 5px;
|
|
|
}
|
|
|
.MLK__variant-panel .item .warning.is-pressed,
|
|
|
.MLK__variant-panel .item .warning.is-active {
|
|
|
background: red;
|
|
|
}
|
|
|
.MLK__variant-panel .item .warning svg.svg-glyph {
|
|
|
width: 50px;
|
|
|
height: 50px;
|
|
|
}
|
|
|
.MLK__variant-panel .item aside {
|
|
|
font-size: var(--_variant-keycap-aside-font-size);
|
|
|
line-height: 12px;
|
|
|
opacity: 0.78;
|
|
|
padding-top: 2px;
|
|
|
}
|
|
|
.MLK__keycap {
|
|
|
position: relative;
|
|
|
}
|
|
|
.MLK__shift {
|
|
|
display: block;
|
|
|
position: absolute;
|
|
|
right: 4px;
|
|
|
top: 4px;
|
|
|
font-size: var(--_keycap-shift-font-size);
|
|
|
color: var(--_keycap-shift-color);
|
|
|
}
|
|
|
.hide-shift .MLK__shift {
|
|
|
display: none;
|
|
|
}
|
|
|
@media (max-width: 414px) {
|
|
|
.MLK__variant-panel {
|
|
|
max-width: 350px;
|
|
|
--_variant-keycap-font-size: var(--variant-keycap-font-size, 24px);
|
|
|
--_variant-keycap-length: var(--variant-keycap-length, 50px);
|
|
|
}
|
|
|
}
|
|
|
/* @xs breakpoint: iPhone 5 */
|
|
|
@container (max-width: 414px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-gap: max(var(--_keycap-gap, 2px), 2px);
|
|
|
--_keycap-height: max(var(--_keycap-height), 42px);
|
|
|
--_keycap-width: min(min(var(--_keycap-max-width), 10cqw), 62px);
|
|
|
}
|
|
|
.MLK__toolbar > div > div {
|
|
|
font-size: 100%;
|
|
|
margin-left: 2px;
|
|
|
margin-right: 2px;
|
|
|
}
|
|
|
.MLK__rows .shift,
|
|
|
.MLK__rows .action {
|
|
|
font-size: 65%;
|
|
|
}
|
|
|
.MLK__rows .warning svg.svg-glyph {
|
|
|
width: 14px;
|
|
|
height: 14px;
|
|
|
min-height: 14px;
|
|
|
}
|
|
|
}
|
|
|
@container (max-width: 744px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-gap: max(var(--keycap-gap, 2px), 2px);
|
|
|
--_keycap-height: max(var(--keycap-height, 52px), 52px);
|
|
|
--_keycap-width: min(min(var(--_keycap-max-width), 10cqw), 62px);
|
|
|
}
|
|
|
.MLK__toolbar > div > div {
|
|
|
padding-left: 0;
|
|
|
padding-right: 0;
|
|
|
}
|
|
|
.MLK__tooltip::after {
|
|
|
padding: 8px 16px;
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div.fnbutton {
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div.bigfnbutton {
|
|
|
font-size: calc(var(--_keycap-extra-small-font-size) / 1.55);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div.small {
|
|
|
font-size: 13px;
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div > aside {
|
|
|
display: none;
|
|
|
}
|
|
|
.MLK__shift {
|
|
|
display: none;
|
|
|
}
|
|
|
}
|
|
|
/* Medium breakpoint: larger phones */
|
|
|
@container (max-width: 768px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-height: max(var(--keycap-height, 42px), 42px);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div > small {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
}
|
|
|
@media (max-height: 768px) {
|
|
|
.MLK__rows {
|
|
|
--_keycap-height: max(var(--keycap-height, 42px), 42px);
|
|
|
}
|
|
|
.MLK__rows > .MLK__row > div > small {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
}
|
|
|
@container (max-width: 1444px) {
|
|
|
.MLK__rows .if-wide {
|
|
|
display: none;
|
|
|
}
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
.ML__keyboard {
|
|
|
--_accent-color: var(--keyboard-accent-color, #0b5c9c);
|
|
|
--_background: var(--keyboard-background, #151515);
|
|
|
--_border: var(--keyboard-border, transparent);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);
|
|
|
--keyboard-toolbar-background-hover: #303030;
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);
|
|
|
--_keycap-background: var(--keycap-background, #1f2022);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #2f3032);
|
|
|
--_keycap-border: var(--_keycap-border, transparent);
|
|
|
--_keycap-border-bottom: var(--_keycap-border-bottom, transparent);
|
|
|
--_keycap-text: var(--keycap-text, #e3e4e8);
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);
|
|
|
--keycap-secondary-border: transparent;
|
|
|
--keycap-secondary-border-bottom: transparent;
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, transparent);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);
|
|
|
--_variant-panel-background: var(--variant-panel-background, #303030);
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);
|
|
|
}
|
|
|
}
|
|
|
/* Same as the media query, but with a class */
|
|
|
[theme='dark'] .ML__keyboard {
|
|
|
--_accent-color: var(--keyboard-accent-color, #0b5c9c);
|
|
|
--_background: var(--keyboard-background, #151515);
|
|
|
--_border: var(--keyboard-border, transparent);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #e3e4e8);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #303030);
|
|
|
--keyboard-toolbar-background-hover: #303030;
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #303030);
|
|
|
--_keycap-background: var(--keycap-background, #1f2022);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #2f3032);
|
|
|
--_keycap-border: var(--_keycap-border, transparent);
|
|
|
--_keycap-border-bottom: var(--_keycap-border-bottom, transparent);
|
|
|
--_keycap-text: var(--keycap-text, #e3e4e8);
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #3d4144);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #4d5154);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #e7ebee);
|
|
|
--keycap-secondary-border: transparent;
|
|
|
--keycap-secondary-border-bottom: transparent;
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, transparent);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, transparent);
|
|
|
--_variant-panel-background: var(--variant-panel-background, #303030);
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, #fff);
|
|
|
}
|
|
|
[theme='light'] .ML__keyboard {
|
|
|
--_accent-color: var(--keyboard-accent-color, #0c75d8);
|
|
|
--_background: var(--keyboard-background, #cacfd7);
|
|
|
--_border: var(--keyboard-border, #ddd);
|
|
|
--_toolbar-text: var(--keyboard-toolbar-text, #2c2e2f);
|
|
|
--_toolbar-background: var(--keyboard-toolbar-background, transparent);
|
|
|
--_toolbar-background-hover: var(--keyboard-toolbar-background-hover, #eee);
|
|
|
--_toolbar-background-selected: var(--keyboard-toolbar-background-selected, transparent);
|
|
|
--_horizontal-rule: var(--keyboard-horizontal-rule, 1px solid #fff);
|
|
|
--_keycap-background: var(--keycap-background, white);
|
|
|
--_keycap-background-hover: var(--keycap-background-hover, #f5f5f7);
|
|
|
--_keycap-background-active: var(--keycap-background-active, var(--_accent-color));
|
|
|
--_keycap-background-pressed: var(--keycap-background-pressed, var(--_accent-color));
|
|
|
--_keycap-border: var(--_keycap-border, #e5e6e9);
|
|
|
--_keycap-border-bottom: var(--_keycap-border-bottom, #8d8f92);
|
|
|
--_keycap-text: var(--keycap-text, #000);
|
|
|
--_keycap-text-active: var(--keycap-text-active, #fff);
|
|
|
--_keycap-text-hover: var(--keycap-text-hover, var(--_keycap-text));
|
|
|
--_keycap-text-pressed: var(--keycap-text-pressed, #fff);
|
|
|
--_keycap-shift-text: var(--keycap-shift-text, var(--_accent-color));
|
|
|
--_keycap-secondary-background: var(--keycap-secondary-background, #a0a9b8);
|
|
|
--_keycap-secondary-background-hover: var(--keycap-secondary-background-hover, #7d8795);
|
|
|
--_keycap-secondary-text: var(--keycap-secondary-text, #060707);
|
|
|
--_keycap-secondary-border: var(--keycap-secondary-border, #c5c9d0);
|
|
|
--_keycap-secondary-border-bottom: var(--keycap-secondary-border-bottom, #989da6);
|
|
|
--_variant-panel-background: var(--variant-panel-background, #fff);
|
|
|
--_variant-keycap-text: var(--variant-keycap-textvar, var(--_keycap-text));
|
|
|
--_variant-keycap-text-active: var(--variant-keycap-text-active, var(--_keycap-text-active));
|
|
|
--_variant-keycap-background-active: var(--variant-keycap-background-active, var(--_accent-color));
|
|
|
}
|
|
|
`,hu=`:host {
|
|
|
--primary-color: #5898ff;
|
|
|
--primary-color-dimmed: #c0c0f0;
|
|
|
--primary-color-dark: var(--blue-500);
|
|
|
--primary-color-light: var(--blue-100);
|
|
|
--primary-color-reverse: #ffffff;
|
|
|
--secondary-color: #ff8a65;
|
|
|
--secondary-color-dimmed: #f0d5c5;
|
|
|
--secondary-color-dark: var(--orange-500);
|
|
|
--secondary-color-light: var(--orange-100);
|
|
|
--secondary-color-reverse: #ffffff;
|
|
|
--link-color: #5898ff;
|
|
|
--link-color-dimmed: #c5c5c5;
|
|
|
--link-color-dark: #121212;
|
|
|
--link-color-light: #e2e2e2;
|
|
|
--link-color-reverse: #ffffff;
|
|
|
--semantic-blue: var(--blue-700);
|
|
|
--semantic-red: var(--red-400);
|
|
|
--semantic-orange: var(--orange-400);
|
|
|
--semantic-green: var(--green-700);
|
|
|
--neutral-100: #f5f5f5;
|
|
|
--neutral-200: #eeeeee;
|
|
|
--neutral-300: #e0e0e0;
|
|
|
--neutral-400: #bdbdbd;
|
|
|
--neutral-500: #9e9e9e;
|
|
|
--neutral-600: #757575;
|
|
|
--neutral-700: #616161;
|
|
|
--neutral-800: #424242;
|
|
|
--neutral-900: #212121;
|
|
|
--red-25: #fff8f7;
|
|
|
--red-50: #fff1ef;
|
|
|
--red-100: #ffeae6;
|
|
|
--red-200: #ffcac1;
|
|
|
--red-300: #ffa495;
|
|
|
--red-400: #ff7865;
|
|
|
--red-500: #f21c0d;
|
|
|
--red-600: #e50018;
|
|
|
--red-700: #d30024;
|
|
|
--red-800: #bd002c;
|
|
|
--red-900: #a1002f;
|
|
|
--orange-25: #fffbf8;
|
|
|
--orange-50: #fff7f1;
|
|
|
--orange-100: #fff3ea;
|
|
|
--orange-200: #ffe1c9;
|
|
|
--orange-300: #ffcca2;
|
|
|
--orange-400: #ffb677;
|
|
|
--orange-500: #fe9310;
|
|
|
--orange-600: #f58700;
|
|
|
--orange-700: #ea7c00;
|
|
|
--orange-800: #dc6d00;
|
|
|
--orange-900: #ca5b00;
|
|
|
--brown-25: #fff8ef;
|
|
|
--brown-50: #fff1df;
|
|
|
--brown-100: #ffe9ce;
|
|
|
--brown-200: #ebcca6;
|
|
|
--brown-300: #cdaf8a;
|
|
|
--brown-400: #af936f;
|
|
|
--brown-500: #856a47;
|
|
|
--brown-600: #7f5e34;
|
|
|
--brown-700: #78511f;
|
|
|
--brown-800: #6e4200;
|
|
|
--brown-900: #593200;
|
|
|
--yellow-25: #fffdf9;
|
|
|
--yellow-50: #fffcf2;
|
|
|
--yellow-100: #fffaec;
|
|
|
--yellow-200: #fff2ce;
|
|
|
--yellow-300: #ffe8ab;
|
|
|
--yellow-400: #ffdf85;
|
|
|
--yellow-500: #ffcf33;
|
|
|
--yellow-600: #f1c000;
|
|
|
--yellow-700: #dfb200;
|
|
|
--yellow-800: #c9a000;
|
|
|
--yellow-900: #ad8a00;
|
|
|
--lime-25: #f4ffee;
|
|
|
--lime-50: #e9ffdd;
|
|
|
--lime-100: #ddffca;
|
|
|
--lime-200: #a8fb6f;
|
|
|
--lime-300: #94e659;
|
|
|
--lime-400: #80d142;
|
|
|
--lime-500: #63b215;
|
|
|
--lime-600: #45a000;
|
|
|
--lime-700: #268e00;
|
|
|
--lime-800: #007417;
|
|
|
--lime-900: #005321;
|
|
|
--green-25: #f5fff5;
|
|
|
--green-50: #ebffea;
|
|
|
--green-100: #e0ffdf;
|
|
|
--green-200: #a7ffa7;
|
|
|
--green-300: #5afa65;
|
|
|
--green-400: #45e953;
|
|
|
--green-500: #17cf36;
|
|
|
--green-600: #00b944;
|
|
|
--green-700: #00a34a;
|
|
|
--green-800: #008749;
|
|
|
--green-900: #00653e;
|
|
|
--teal-25: #f3ffff;
|
|
|
--teal-50: #e6fffe;
|
|
|
--teal-100: #d9fffe;
|
|
|
--teal-200: #8dfffe;
|
|
|
--teal-300: #57f4f4;
|
|
|
--teal-400: #43e5e5;
|
|
|
--teal-500: #17cfcf;
|
|
|
--teal-600: #00c2c0;
|
|
|
--teal-700: #00b5b1;
|
|
|
--teal-800: #00a49e;
|
|
|
--teal-900: #009087;
|
|
|
--cyan-25: #f7fcff;
|
|
|
--cyan-50: #eff8ff;
|
|
|
--cyan-100: #e7f5ff;
|
|
|
--cyan-200: #c2e6ff;
|
|
|
--cyan-300: #95d5ff;
|
|
|
--cyan-400: #61c4ff;
|
|
|
--cyan-500: #13a7ec;
|
|
|
--cyan-600: #069eda;
|
|
|
--cyan-700: #0095c9;
|
|
|
--cyan-800: #0088b2;
|
|
|
--cyan-900: #0a7897;
|
|
|
--blue-25: #f7faff;
|
|
|
--blue-50: #eef5ff;
|
|
|
--blue-100: #e5f1ff;
|
|
|
--blue-200: #bfdbff;
|
|
|
--blue-300: #92c2ff;
|
|
|
--blue-400: #63a8ff;
|
|
|
--blue-500: #0d80f2;
|
|
|
--blue-600: #0077db;
|
|
|
--blue-700: #006dc4;
|
|
|
--blue-800: #0060a7;
|
|
|
--blue-900: #005086;
|
|
|
--indigo-25: #f8f7ff;
|
|
|
--indigo-50: #f1efff;
|
|
|
--indigo-100: #eae7ff;
|
|
|
--indigo-200: #ccc3ff;
|
|
|
--indigo-300: #ac99ff;
|
|
|
--indigo-400: #916aff;
|
|
|
--indigo-500: #63c;
|
|
|
--indigo-600: #5a21b2;
|
|
|
--indigo-700: #4e0b99;
|
|
|
--indigo-800: #3b0071;
|
|
|
--indigo-900: #220040;
|
|
|
--purple-25: #fbf7ff;
|
|
|
--purple-50: #f8f0ff;
|
|
|
--purple-100: #f4e8ff;
|
|
|
--purple-200: #e4c4ff;
|
|
|
--purple-300: #d49aff;
|
|
|
--purple-400: #c36aff;
|
|
|
--purple-500: #a219e6;
|
|
|
--purple-600: #9000c4;
|
|
|
--purple-700: #7c009f;
|
|
|
--purple-800: #600073;
|
|
|
--purple-900: #3d0043;
|
|
|
--magenta-25: #fff8fb;
|
|
|
--magenta-50: #fff2f6;
|
|
|
--magenta-100: #ffebf2;
|
|
|
--magenta-200: #ffcddf;
|
|
|
--magenta-300: #ffa8cb;
|
|
|
--magenta-400: #ff7fb7;
|
|
|
--magenta-500: #eb4799;
|
|
|
--magenta-600: #da3689;
|
|
|
--magenta-700: #c82179;
|
|
|
--magenta-800: #b00065;
|
|
|
--magenta-900: #8a004c;
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
:host {
|
|
|
--semantic-blue: var(--blue-700);
|
|
|
--semantic-red: var(--red-400);
|
|
|
--semantic-orange: var(--orange-400);
|
|
|
--semantic-green: var(--green-700);
|
|
|
--semantic-bg-blue: var(--blue-25);
|
|
|
--semantic-bg-red: var(--red-25);
|
|
|
--semantic-bg-orange: var(--orange-25);
|
|
|
--semantic-bg-green: var(--green-25);
|
|
|
--neutral-100: #121212;
|
|
|
--neutral-200: #424242;
|
|
|
--neutral-300: #616161;
|
|
|
--neutral-400: #757575;
|
|
|
--neutral-500: #9e9e9e;
|
|
|
--neutral-600: #bdbdbd;
|
|
|
--neutral-700: #e0e0e0;
|
|
|
--neutral-800: #eeeeee;
|
|
|
--neutral-900: #f5f5f5;
|
|
|
}
|
|
|
}
|
|
|
:host([theme='dark']) {
|
|
|
--semantic-blue: var(--blue-700);
|
|
|
--semantic-red: var(--red-400);
|
|
|
--semantic-orange: var(--orange-400);
|
|
|
--semantic-green: var(--green-700);
|
|
|
--semantic-bg-blue: var(--blue-25);
|
|
|
--semantic-bg-red: var(--red-25);
|
|
|
--semantic-bg-orange: var(--orange-25);
|
|
|
--semantic-bg-green: var(--green-25);
|
|
|
--neutral-100: #121212;
|
|
|
--neutral-200: #424242;
|
|
|
--neutral-300: #616161;
|
|
|
--neutral-400: #757575;
|
|
|
--neutral-500: #9e9e9e;
|
|
|
--neutral-600: #bdbdbd;
|
|
|
--neutral-700: #e0e0e0;
|
|
|
--neutral-800: #eeeeee;
|
|
|
--neutral-900: #f5f5f5;
|
|
|
}
|
|
|
/* @media (prefers-color-scheme: dark) {
|
|
|
:host {
|
|
|
--label-color: #fff;
|
|
|
--active-label-color: #000;
|
|
|
--menu-bg: #525252;
|
|
|
--active-bg: #5898ff;
|
|
|
--active-bg-dimmed: #5c5c5c;
|
|
|
}
|
|
|
} */
|
|
|
:host {
|
|
|
--ui-font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
|
|
|
'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
|
|
|
'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
|
--ui-font-size: 14px;
|
|
|
--ui-line-height: 1.5;
|
|
|
--ui-letter-spacing: 0.007em;
|
|
|
--mono-font-family: 'Berkeley Mono', 'JetBrains Mono', 'IBM Plex Mono',
|
|
|
'Source Code Pro', Menlo, Monaco, 'Courier New', monospace;
|
|
|
--ui-layer-1: var(--neutral-100);
|
|
|
--ui-layer-2: var(--neutral-200);
|
|
|
--ui-layer-3: var(--neutral-300);
|
|
|
--ui-layer-4: var(--neutral-400);
|
|
|
--ui-layer-5: var(--neutral-500);
|
|
|
--ui-layer-6: var(--neutral-600);
|
|
|
--ui-border-color: var(--primary-color);
|
|
|
--ui-border-radius: 4px;
|
|
|
--ui-text: var(--neutral-900);
|
|
|
--ui-text-secondary: var(--neutral-700);
|
|
|
--ui-text-placeholder: var(--neutral-500);
|
|
|
--ui-text-muted: var(--neutral-300);
|
|
|
/** A field is a UI element in which a user can type data, for
|
|
|
* example an input or textarea element.
|
|
|
*/
|
|
|
--ui-field-bg: var(--neutral-100);
|
|
|
--ui-field-bg-hover: var(--neutral-100);
|
|
|
--ui-field-bg-disabled: var(--neutral-300);
|
|
|
--ui-field-bg-invalid: var(--red-100);
|
|
|
--ui-field-bg-focus: var(--neutral-100);
|
|
|
--ui-field-border: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-hover: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-disabled: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-invalid: 0.5px solid var(--border-color);
|
|
|
--ui-field-border-focus: 0.5px solid var(--border-color);
|
|
|
--ui-menu-bg: var(--neutral-100);
|
|
|
--ui-menu-text: var(--neutral-900);
|
|
|
--ui-menu-bg-hover: var(--neutral-200);
|
|
|
--ui-menu-text-hover: var(--neutral-900);
|
|
|
/** The \`active\` state is used for the state of menu items
|
|
|
* when they are selected.
|
|
|
*/
|
|
|
--ui-menu-bg-active: var(--primary-color);
|
|
|
--ui-menu-text-active: var(--primary-color-reverse);
|
|
|
/** The \`active-muted\` set is used for the state of
|
|
|
* submenus when they are open.
|
|
|
*/
|
|
|
--ui-menu-bg-active-muted: var(--neutral-300);
|
|
|
--ui-menu-text-active-muted: var(--neutral-900);
|
|
|
/* --ui-menu-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.302),
|
|
|
0 2px 6px 2px rgba(60, 64, 67, 0.149); */
|
|
|
--ui-menu-shadow: 0 0 2px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.2);
|
|
|
--ui-menu-divider: 0.5px solid #c7c7c7;
|
|
|
/* var(--neutral-300); */
|
|
|
--ui-menu-z-index: 10000;
|
|
|
--page-bg: var(--neutral-100);
|
|
|
--content-bg: var(--neutral-200);
|
|
|
}
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
:host {
|
|
|
--ui-menu-bg: var(--neutral-200);
|
|
|
}
|
|
|
}
|
|
|
:host([theme='dark']) {
|
|
|
--ui-menu-bg: var(--neutral-200);
|
|
|
}
|
|
|
/* PingFang SC is a macOS font. Microsoft Yahei is a Windows font.
|
|
|
Noto is a Linux/Android font.
|
|
|
*/
|
|
|
:lang(zh-cn),
|
|
|
:lang(zh-sg),
|
|
|
:lang(zh-my),
|
|
|
:lang(zh) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'PingFang SC', 'Hiragino Sans GB',
|
|
|
'Noto Sans CJK SC', 'Noto Sans SC', 'Noto Sans', 'Microsoft Yahei UI',
|
|
|
'Microsoft YaHei New', 'Microsoft Yahei', '\u5FAE\u8F6F\u96C5\u9ED1', SimSun, '\u5B8B\u4F53',
|
|
|
STXihei, '\u534E\u6587\u7EC6\u9ED1', sans-serif;
|
|
|
}
|
|
|
:lang(zh-tw),
|
|
|
:lang(zh-hk),
|
|
|
:lang(zh-mo) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Noto Sans',
|
|
|
'Microsoft JhengHei UI', 'Microsoft JhengHei', '\u5FAE\u8EDF\u6B63\u9ED1\u9AD4', '\u65B0\u7D30\u660E\u9AD4',
|
|
|
'PMingLiU', '\u7D30\u660E\u9AD4', 'MingLiU', sans-serif;
|
|
|
}
|
|
|
:lang(ja),
|
|
|
:lang(ja-jp),
|
|
|
:lang(ja-jp-mac) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Hiragino Sans',
|
|
|
'Hiragino Kaku Gothic ProN', 'Noto Sans CJK JP', 'Noto Sans JP', 'Noto Sans',
|
|
|
'\u6E38\u30B4\u30B7\u30C3\u30AF', '\u6E38\u30B4\u30B7\u30C3\u30AF\u4F53', YuGothic, 'Yu Gothic', '\u30E1\u30A4\u30EA\u30AA', Meiryo,
|
|
|
'\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF', 'MS PGothic', sans-serif;
|
|
|
}
|
|
|
:lang(ko),
|
|
|
:lang(ko-kr),
|
|
|
:lang(ko-kr-std) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR',
|
|
|
'Noto Sans', 'Malgun Gothic', '\uB9D1\uC740 \uACE0\uB515', 'Apple SD Gothic Neo',
|
|
|
'\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo', 'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;
|
|
|
}
|
|
|
:lang(ko-kr-apple) {
|
|
|
--ui-font-family: -apple-system, system-ui, 'Noto Sans CJK KR', 'Noto Sans KR',
|
|
|
'Noto Sans', 'Apple SD Gothic Neo', '\uC560\uD50C SD \uC0B0\uB3CC\uACE0\uB515 Neo',
|
|
|
'Apple SD \uC0B0\uB3CC\uACE0\uB515 Neo', '\uB3CB\uC6C0', Dotum, sans-serif;
|
|
|
}
|
|
|
:lang(zh-cn),
|
|
|
:lang(zh-sg),
|
|
|
:lang(zh-my),
|
|
|
:lang(zh),
|
|
|
:lang(zh-tw),
|
|
|
:lang(zh-hk),
|
|
|
:lang(zh-mo),
|
|
|
:lang(ja),
|
|
|
:lang(ja-jp),
|
|
|
:lang(ja-jp-mac),
|
|
|
:lang(ko),
|
|
|
:lang(ko-kr),
|
|
|
:lang(ko-kr-std),
|
|
|
:lang(ko-kr-apple) {
|
|
|
--ui-font-size: 1rem;
|
|
|
--ui-line-height: 1.7;
|
|
|
--ui-letter-spacing: 0;
|
|
|
}
|
|
|
:dir(rtl) {
|
|
|
--ui-line-height: auto;
|
|
|
--ui-letter-spacing: 0;
|
|
|
}
|
|
|
`,vf=`.ui-menu *,
|
|
|
.ui-menu ::before,
|
|
|
.ui-menu ::after {
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.ui-menu {
|
|
|
display: none;
|
|
|
color-scheme: light dark;
|
|
|
-webkit-user-select: none;
|
|
|
/* Important: Safari iOS doesn't respect user-select */
|
|
|
user-select: none;
|
|
|
cursor: default;
|
|
|
-webkit-touch-callout: none;
|
|
|
-webkit-tap-highlight-color: rgba(0 0 0 0);
|
|
|
--active-label-color: #fff;
|
|
|
/* ui-menu-text-active */
|
|
|
--label-color: #121212;
|
|
|
/* ui-menu-text */
|
|
|
--menu-bg: #e2e2e2;
|
|
|
/* ui-menu-background */
|
|
|
--active-bg: #5898ff;
|
|
|
/* ui-menu-background-active */
|
|
|
--active-bg-dimmed: #c5c5c5;
|
|
|
/* ui-menu-background-active-muted */
|
|
|
}
|
|
|
/** Use the :where pseudo selector to make the specificity of the
|
|
|
* selector 0, so that it can be overridden by the user.
|
|
|
*/
|
|
|
:where(.ui-menu-container) {
|
|
|
position: absolute;
|
|
|
overflow: visible;
|
|
|
width: auto;
|
|
|
height: auto;
|
|
|
z-index: 10000;
|
|
|
border-radius: 8px;
|
|
|
background: var(--ui-menu-bg);
|
|
|
box-shadow: var(--ui-menu-shadow);
|
|
|
list-style: none;
|
|
|
padding: 6px 0 6px 0;
|
|
|
margin: 0;
|
|
|
user-select: none;
|
|
|
cursor: default;
|
|
|
color: var(--ui-menu-text);
|
|
|
font-weight: normal;
|
|
|
font-style: normal;
|
|
|
text-shadow: none;
|
|
|
text-transform: none;
|
|
|
letter-spacing: 0;
|
|
|
outline: none;
|
|
|
opacity: 1;
|
|
|
/* The [popover] elements have a 1px solid black border. Ugh. */
|
|
|
border: none;
|
|
|
width: fit-content;
|
|
|
height: fit-content;
|
|
|
}
|
|
|
:where(.ui-menu-container > li) {
|
|
|
display: flex;
|
|
|
flex-flow: row;
|
|
|
align-items: center;
|
|
|
padding: 1px 7px 1px 7px;
|
|
|
margin-top: 0;
|
|
|
margin-left: 6px;
|
|
|
margin-right: 6px;
|
|
|
border-radius: 4px;
|
|
|
white-space: nowrap;
|
|
|
position: relative;
|
|
|
outline: none;
|
|
|
fill: currentColor;
|
|
|
user-select: none;
|
|
|
cursor: default;
|
|
|
text-align: left;
|
|
|
color: inherit;
|
|
|
font-family: var(--ui-font-family);
|
|
|
font-size: var(--ui-font-size);
|
|
|
line-height: var(--ui-line-height);
|
|
|
letter-spacing: var(--ui-letter-spacing);
|
|
|
}
|
|
|
:where(.ui-menu-container > li > .label) {
|
|
|
appearance: none;
|
|
|
background: none;
|
|
|
outline: none;
|
|
|
width: 100%;
|
|
|
margin: 0;
|
|
|
padding: 1px 2px 1px 1px;
|
|
|
overflow: visible;
|
|
|
border: 1px solid transparent;
|
|
|
white-space: nowrap;
|
|
|
text-align: start;
|
|
|
}
|
|
|
:where(.ui-menu-container > li:has(.heading)) {
|
|
|
margin-top: 0.5em;
|
|
|
}
|
|
|
:where(.ui-menu-container > li > .label.heading) {
|
|
|
font-weight: bold;
|
|
|
opacity: 0.4;
|
|
|
}
|
|
|
:where(.ui-menu-container > li.indent > .label) {
|
|
|
margin-inline-start: 12px;
|
|
|
}
|
|
|
:where(.ui-menu-container > li > .label.indent) {
|
|
|
margin-inline-start: 12px;
|
|
|
}
|
|
|
:where(.ui-menu-container > li[role='divider']) {
|
|
|
border-bottom: 1px solid var(--ui-menu-divider);
|
|
|
border-radius: 0;
|
|
|
padding: 0;
|
|
|
margin-left: 15px;
|
|
|
margin-right: 15px;
|
|
|
padding-top: 5px;
|
|
|
margin-bottom: 5px;
|
|
|
width: calc(100% - 30px);
|
|
|
/** 100% - (margin-left + margin-right) */
|
|
|
}
|
|
|
:where(.ui-menu-container > li[aria-disabled='true']) {
|
|
|
opacity: 0.5;
|
|
|
}
|
|
|
:where(.ui-menu-container > li.active) {
|
|
|
background: var(--ui-menu-bg-active);
|
|
|
background: -apple-system-control-accent;
|
|
|
color: var(--ui-menu-text-active);
|
|
|
}
|
|
|
:where(.ui-menu-container > li.active.is-submenu-open) {
|
|
|
background: var(--ui-menu-bg-active-muted);
|
|
|
color: inherit;
|
|
|
}
|
|
|
:where(.ui-menu-container > li[aria-haspopup='true'] > .label) {
|
|
|
padding-inline-end: 0;
|
|
|
}
|
|
|
:where(.ui-menu-container > li[aria-haspopup='true'].active::after) {
|
|
|
color: var(--ui-menu-text-active);
|
|
|
}
|
|
|
/** Keyboard shortcut */
|
|
|
:where(.ui-menu-container > li > kbd) {
|
|
|
font-family: var(--ui-font-family);
|
|
|
margin-inline-start: 12px;
|
|
|
opacity: 0.4;
|
|
|
}
|
|
|
:where(.ui-menu-container > li.active > kbd) {
|
|
|
opacity: 0.85;
|
|
|
}
|
|
|
.ui-trailing-chevron {
|
|
|
display: flex;
|
|
|
margin-inline-start: 24px;
|
|
|
width: 10px;
|
|
|
height: 10px;
|
|
|
margin-bottom: 4px;
|
|
|
}
|
|
|
.ui-trailing-chevron:dir(rtl) {
|
|
|
transform: scaleX(-1);
|
|
|
}
|
|
|
.ui-checkmark {
|
|
|
display: flex;
|
|
|
margin-inline-end: -11px;
|
|
|
margin-inline-start: -4px;
|
|
|
margin-top: 2px;
|
|
|
width: 16px;
|
|
|
height: 16px;
|
|
|
}
|
|
|
.ui-mixedmark {
|
|
|
display: flex;
|
|
|
margin-inline-end: -11px;
|
|
|
margin-inline-start: -4px;
|
|
|
margin-top: 2px;
|
|
|
width: 16px;
|
|
|
height: 16px;
|
|
|
}
|
|
|
`,ra;function Xl(e){let t="";switch(e){case"mathfield-element":t=`
|
|
|
:host { display: inline-block; background-color: field; color: fieldtext; border-width: 1px; border-style: solid; border-color: #acacac; border-radius: 2px; padding:4px;}
|
|
|
:host([hidden]) { display: none; }
|
|
|
:host([disabled]), :host([disabled]:focus), :host([disabled]:focus-within) { outline: none; opacity: .5; }
|
|
|
:host(:focus), :host(:focus-within) {
|
|
|
outline: Highlight auto 1px; /* For Firefox */
|
|
|
outline: -webkit-focus-ring-color auto 1px;
|
|
|
}
|
|
|
:host([readonly]:focus), :host([readonly]:focus-within),
|
|
|
:host([read-only]:focus), :host([read-only]:focus-within) {
|
|
|
outline: none;
|
|
|
}
|
|
|
@media (hover: none) and (pointer: coarse) {
|
|
|
:host(:not(:focus)) :first-child { pointer-events: none !important; }
|
|
|
}`;break;case"core":t=Qi;break;case"mathfield":t=Ed;break;case"environment-popover":t=_d;break;case"suggestion-popover":t=mf;break;case"keystroke-caption":t=vc;break;case"virtual-keyboard":t=gf;break;case"ui":t=hu;break;case"menu":t=vf;break;default:debugger}return t}function yc(e){return ra||(ra={}),ra[e]||(ra[e]=new CSSStyleSheet,ra[e].replaceSync(Xl(e))),ra[e]}var yl;function Ds(e){var t;if(!("adoptedStyleSheets"in document)){if(window.document.getElementById(`mathlive-style-${e}`))return;const n=window.document.createElement("style");n.id=`mathlive-style-${e}`,n.append(window.document.createTextNode(Xl(e))),window.document.head.appendChild(n);return}if(yl||(yl={}),((t=yl[e])!=null?t:0)!==0)yl[e]+=1;else{const n=yc(e);document.adoptedStyleSheets=[...document.adoptedStyleSheets,n],yl[e]=1}}function r(e){if("adoptedStyleSheets"in document&&yl!=null&&yl[e]&&(yl[e]-=1,yl[e]<=0)){const t=ra[e];document.adoptedStyleSheets=document.adoptedStyleSheets.filter(n=>n!==t)}}var a=class P0 extends Zt{constructor(t){var n;super(F(E({},t),{type:"accent",body:(n=t.body)!=null?n:void 0})),t.accentChar?this.accent=t.accentChar:this.svgAccent=t==null?void 0:t.svgAccent,this.skipBoundary=!0,this.captureSelection=!0}static fromJson(t){return new P0(t)}toJson(){return F(E({},super.toJson()),{accentChar:this.accent,svgAccent:this.svgAccent})}render(t){var n;const i=new xi({parent:t,mathstyle:"cramp"},this.style),o=(n=Zt.createBox(i,this.body))!=null?n:new vn("\u25A2",{style:this.style});let c=0;!this.hasEmptyBranch("body")&&this.body.length===2&&this.body[1].isCharacterBox()&&(c=o.skew);let f=Math.min(o.height,Ga),b;if(this.svgAccent)b=ss(this.svgAccent),f=i.metrics.bigOpSpacing1-f;else if(this.accent){const k=new vn(this.accent,{fontFamily:"Main-Regular"});k.italic=0;const $=this.accent===8407?" ML__accent-vec":"";b=new vn(new vn(k),{classes:"ML__accent-body"+$})}b=new zi({shift:0,children:[{box:new vn(o)},-f,{box:b,marginLeft:o.left+2*c,classes:["ML__center"]}]});const C=new vn(b,{type:"lift"});return this.caret&&(C.caret=this.caret),this.bind(i,C.wrap(i)),this.attachSupsub(i,{base:C})}},l={"(":")","{":"}","[":"]","|":"|","\\lbrace":"\\rbrace","\\lparen":"\\rparen","\\{":"\\}","\\langle":"\\rangle","\\lfloor":"\\rfloor","\\lceil":"\\rceil","\\vert":"\\vert","\\lvert":"\\rvert","\\Vert":"\\Vert","\\lVert":"\\rVert","\\lbrack":"\\rbrack","\\ulcorner":"\\urcorner","\\llcorner":"\\lrcorner","\\lgroup":"\\rgroup","\\lmoustache":"\\rmoustache"},s=Object.fromEntries(Object.entries(l).map(([e,t])=>[t,e]));function u(e){var t;return(t={"[":91,"]":93,"(":40,")":41,"\\mid":8739,"|":8739,"\u2223":8739,"\u2225":8741,"\\|":8739,"\\{":123,"\\}":125,"\\lbrace":123,"\\rbrace":125,"\\lparen":40,"\\rparen":41,"\\lbrack":91,"\\rbrack":93,"\\vert":8739,"\\lvert":8739,"\\mvert":8739,"\\rvert":8739,"\\Vert":8741,"\\lVert":8741,"\\mVert":8741,"\\rVert":8741,"\\parallel":8741,"\\shortparallel":8741,"\\langle":10216,"\\rangle":10217,"\\lfloor":8970,"\\rfloor":8971,"\\lceil":8968,"\\rceil":8969,"\\ulcorner":9484,"\\urcorner":9488,"\\llcorner":9492,"\\lrcorner":9496,"\\lgroup":10222,"\\rgroup":10223,"\\lmoustache":9136,"\\rmoustache":9137,"\\surd":8730}[e])!=null?t:e.codePointAt(0)}function v(e,t,n,i){var o;const f=new vn(u(e),{fontFamily:"Main-Regular",isSelected:i.isSelected,classes:"ML__small-delim "+((o=i.classes)!=null?o:"")}).wrap(t);return n&&f.setTop((1-t.scalingFactor)*Ua),f}function M(e,t,n,i,o){var c,f;const b=new xi({parent:i,mathstyle:"textstyle"},o==null?void 0:o.style),C=new vn(u(e),{fontFamily:`Size${t}-Regular`,isSelected:o.isSelected,classes:((c=o.classes)!=null?c:"")+` ML__delim-size${t}`,type:(f=o.type)!=null?f:"ignore"}).wrap(b);return n&&C.setTop((1-b.scalingFactor)*Ua),C}function P(e,t,n,i,o){var c;let f,b,C,k;f=C=k=u(e),b=null;let $="Size1-Regular";e==="\\vert"||e==="\\lvert"||e==="\\rvert"||e==="\\mvert"||e==="\\mid"?C=f=k=8739:e==="\\Vert"||e==="\\lVert"||e==="\\rVert"||e==="\\mVert"||e==="\\|"?C=f=k=8741:e==="\\uparrow"?C=k=9168:e==="\\Uparrow"?C=k=8214:e==="\\downarrow"?f=C=9168:e==="\\Downarrow"?f=C=8214:e==="\\updownarrow"?(f=8593,C=9168,k=8595):e==="\\Updownarrow"?(f=8657,C=8214,k=8659):e==="["||e==="\\lbrack"?(f=9121,C=9122,k=9123,$="Size4-Regular"):e==="]"||e==="\\rbrack"?(f=9124,C=9125,k=9126,$="Size4-Regular"):e==="\\lfloor"||e==="\u230A"?(C=f=9122,k=9123,$="Size4-Regular"):e==="\\lceil"||e==="\u2308"?(f=9121,C=k=9122,$="Size4-Regular"):e==="\\rfloor"||e==="\u230B"?(C=f=9125,k=9126,$="Size4-Regular"):e==="\\rceil"||e==="\u2309"?(f=9124,C=k=9125,$="Size4-Regular"):e==="("||e==="\\lparen"?(f=9115,C=9116,k=9117,$="Size4-Regular"):e===")"||e==="\\rparen"?(f=9118,C=9119,k=9120,$="Size4-Regular"):e==="\\{"||e==="\\lbrace"?(f=9127,b=9128,k=9129,C=9130,$="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(f=9131,b=9132,k=9133,C=9130,$="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(f=9127,k=9129,C=9130,$="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(f=9131,k=9133,C=9130,$="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(f=9127,k=9133,C=9130,$="Size4-Regular"):e==="\\rmoustache"||e==="\u23B1"?(f=9131,k=9129,C=9130,$="Size4-Regular"):e==="\\surd"?(f=57345,k=9143,C=57344,$="Size4-Regular"):e==="\\ulcorner"?(f=9484,C=k=32):e==="\\urcorner"?(f=9488,C=k=32):e==="\\llcorner"?(k=9492,C=f=32):e==="\\lrcorner"&&(f=9496,C=f=32);const ne=fo(f,$),Me=ne.height+ne.depth,We=fo(C,$),Je=We.height+We.depth,Ot=fo(k,$),bn=Ot.height+Ot.depth;let Dt=0,en=1;if(b!==null){const Io=fo(b,$);Dt=Io.height+Io.depth,en=2}const Ln=Me+bn+Dt,sn=Math.max(0,Math.ceil((t-Ln)/(en*Je))),hr=Ln+sn*en*Je;let Lr=Ua;n&&(Lr=Lr*i.scalingFactor);const Mr=hr/2-Lr,Ci=.008,qi=[];qi.push({box:new vn(k,{fontFamily:$})}),qi.push(-Ci);const Bn=new vn(C,{fontFamily:$});if(b===null)for(let Io=0;Io<sn;Io++)qi.push({box:Bn});else{for(let Io=0;Io<sn;Io++)qi.push({box:Bn});qi.push(-Ci),qi.push({box:new vn(b,{fontFamily:$})}),qi.push(-Ci);for(let Io=0;Io<sn;Io++)qi.push({box:Bn})}qi.push(-Ci),qi.push({box:new vn(f,{fontFamily:$})});let Xs="";$==="Size1-Regular"?Xs=" delim-size1":$==="Size4-Regular"&&(Xs=" delim-size4");const zl=new zi({bottom:Mr,children:qi},{classes:Xs});return new vn(zl,F(E({},o!=null?o:{}),{classes:((c=o==null?void 0:o.classes)!=null?c:"")+" ML__delim-mult"}))}var Z=new Set(["(",")","\\lparen","\\rparen","[","]","\\lbrack","\\rbrack","\\{","\\}","\\lbrace","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd","\u230A","\u230B","\u2308","\u2309"]),te=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache","\u27EE","\u27EF","\u23B0","\u23B1"]),He=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),et=[0,1.2,1.8,2.4,3];function Et(e,t,n,i){return e===void 0||e==="."?ur(n,i.classes):(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),Z.has(e)||He.has(e)?M(e,t,!1,n,i):te.has(e)?P(e,et[t],!1,n,i):(console.assert(!1,"Unknown delimiter '"+e+"'"),null))}var Ct=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],jt=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"stack"}],ln=[{type:"small",mathstyle:"scriptscriptstyle"},{type:"small",mathstyle:"scriptstyle"},{type:"small",mathstyle:"textstyle"},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];function Dn(e){return e.type==="small"?"Main-Regular":e.type==="large"?"Size"+e.size+"-Regular":(console.assert(e.type==="stack"),"Size4-Regular")}function Jn(e,t,n,i){const o={"-4":0,"-3":1,0:2}[i.mathstyle.sizeDelta];for(let c=o;c<n.length&&n[c].type!=="stack";c++){const f=fo(e,Dn(n[c]));if(f.defaultMetrics)return{type:"small",mathstyle:"scriptstyle"};let b=f.height+f.depth;if(n[c].type==="small"&&(n[c].mathstyle==="scriptscriptstyle"?b*=Math.max(to[Math.max(1,i.size-2)],i.minFontScale):n[c].mathstyle==="scriptstyle"&&(b*=Math.max(to[Math.max(1,i.size-1)],i.minFontScale))),b>t)return n[c]}return n[n.length-1]}function or(e,t,n,i,o,c){if(!t||t.length===0||t===".")return ur(o);t==="<"||t==="\\lt"?t="\\langle":(t===">"||t==="\\gt")&&(t="\\rangle");let f;He.has(t)?f=Ct:Z.has(t)?f=ln:f=jt;const b=Jn(u(t),n,f,o),C=new xi({parent:o,mathstyle:b.mathstyle},c==null?void 0:c.style);return b.type==="small"?v(t,C,i,F(E({},c),{type:e})):b.type==="large"?M(t,b.size,i,C,F(E({},c),{type:e})):(console.assert(b.type==="stack"),P(t,n,i,C,F(E({},c),{type:e})))}function Hn(e,t,n,i,o,c){if(t===".")return ur(o,c==null?void 0:c.classes);const f=Ua*o.scalingFactor,b=901,C=5/vo,k=Math.max(n-f,i+f),$=Math.max(k/500*b,2*k-C);return or(e,t,$,!0,o,c)}function ur(e,t){const n=new vn(null,{classes:" nulldelimiter "+(t!=null?t:""),type:"ignore"});return n.width=e.getRegisterAsEm("nulldelimiterspace"),n.wrap(new xi({parent:e,mathstyle:"textstyle"}))}var Dr=class O0 extends Zt{constructor(t){var n;super({type:"placeholder",command:"\\placeholder",mode:(n=t==null?void 0:t.mode)!=null?n:"math",style:t==null?void 0:t.style}),this.captureSelection=!0}static fromJson(t){return new O0(t)}toJson(){return super.toJson()}render(t){let n;return this.value=t.placeholderSymbol,typeof t.renderPlaceholder=="function"?n=t.renderPlaceholder(t):n=this.createBox(t),this.caret&&(n.classes+=" ML__placeholder-selected"),n}_serialize(t){return t.skipPlaceholders?"":"\\placeholder{}"}},Ar=["matrix","matrix*","pmatrix","pmatrix*","bmatrix","bmatrix*","Bmatrix","Bmatrix*","vmatrix","vmatrix*","Vmatrix","Vmatrix*"],di=["cases","dcases","rcases"],ia=["align","align*","aligned","gather","gathered","split"],So=["array","subequations","eqnarray"];function Ia(e){return So.concat(ia).concat(di).concat(Ar).includes(e)}function Jo(e){return Ar.includes(e)}function Qo(e){return di.includes(e)}function ro(e){return ia.includes(e)}function qo(e,t,n){let i=0;for(const k of n)"align"in k&&(i+=1);let o=0;const c=[];for(const k of t){let $=0;for(o=Math.max(o,Math.min(k.length,i));$<k.length;){const ne=[],Me=Math.min(k.length,$+i);for(;$<Me;){const We=k[$];We.length===0?ne.push([new Zt({type:"first",mode:e.mode})]):We[0].type!=="first"?ne.push([new Zt({type:"first",mode:e.mode}),...We]):(console.assert(!We.slice(1).some(Je=>Je.type==="first")),ne.push(We)),$+=1}c.push(ne)}}c.length>0&&c[c.length-1].length===1&&c[c.length-1][0].length===1&&c[c.length-1][0][0].type==="first"&&c.pop();const f=[];for(const k of c){if(k.length!==o)for(let $=k.length;$<o;$++)k.push([new Zt({type:"first",mode:e.mode}),new Dr]);f.push(k)}let b=0,C=0;for(const k of f){C=0;for(const $ of k){for(const ne of $)ne.parent=e,ne.parentBranch=[b,C];C+=1}b+=1}return e.isDirty=!0,f}var Ur=class A0 extends Zt{constructor(t,n,i,o={}){var c;super({type:"array"}),this.environmentName=t,this.rowGaps=i,o.mathstyleName&&(this.mathstyleName=o.mathstyleName),o.columns&&(o.columns.length===0?this.colFormat=[{align:"l"}]:this.colFormat=o.columns),this.colFormat||(this.colFormat=[{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"}]),this.array=qo(this,n,this.colFormat),o.leftDelim&&(this.leftDelim=o.leftDelim),o.rightDelim&&(this.rightDelim=o.rightDelim),o.arraycolsep!==void 0&&(this.arraycolsep=o.arraycolsep),this.colSeparationType=o.colSeparationType,o.arraystretch!==void 0&&(this.arraystretch=o.arraystretch),this.minColumns=(c=o.minColumns)!=null?c:1}static fromJson(t){return new A0(t.environmentName,t.array,t.rowGaps,t)}toJson(){const t=F(E({},super.toJson()),{environmentName:this.environmentName,array:this.array.map(n=>n.map(i=>i.map(o=>o.toJson()))),rowGaps:this.rowGaps,columns:this.colFormat,colSeparationType:this.colSeparationType});return this.arraystretch!==void 0&&(t.arraystretch=this.arraystretch),this.arraycolsep!==void 0&&(t.arraycolsep=this.arraycolsep),this.leftDelim&&(t.leftDelim=this.leftDelim),this.rightDelim&&(t.rightDelim=this.rightDelim),t}branch(t){var n;if(Bc(t))return(n=this.array[t[0]][t[1]])!=null?n:void 0}createBranch(t){var n;return Bc(t)?(this.isDirty=!0,(n=this.branch(t))!=null?n:[]):[]}get rowCount(){return this.array.length}get colCount(){return this.array[0].length}get maxColumns(){return this.colFormat.filter(t=>!!t.align).length}removeBranch(t){if(gl(t))return super.removeBranch(t);const n=this.branch(t);return this.array[t[0]][t[1]]=void 0,n.forEach(i=>{i.parent=void 0,i.parentBranch=void 0}),console.assert(n[0].type==="first"),n.shift(),this.isDirty=!0,n}get hasChildren(){return this.children.length>0}get children(){const t=[];for(const n of this.array)for(const i of n)if(i)for(const o of i)t.push(...o.children),t.push(o);return[...t,...super.children]}render(t){var n,i,o,c,f,b;const C=new xi({parent:t,mathstyle:this.mathstyleName},this.style),k=C.getRegisterAsEm("arrayrulewidth"),$=C.getRegisterAsEm("arraycolsep"),ne=C.getRegisterAsEm("doublerulesep"),Me=(i=(n=this.arraystretch)!=null?n:C.getRegisterAsNumber("arraystretch"))!=null?i:1;let We=typeof this.arraycolsep=="number"?this.arraycolsep:$;this.colSeparationType==="small"&&(We=.2778*(new xi({parent:t,mathstyle:"scriptstyle"}).scalingFactor/t.scalingFactor));const Je=Me*os,Ot=.7*Je,bn=.3*Je;let Dt=0;const en=[];let Ln=0;const sn=this.array.length;for(let oa=0;oa<sn;++oa){const Qa=this.array[oa];Ln=Math.max(Ln,Qa.length);const To=new xi({parent:C,mathstyle:this.mathstyleName},this.style);let Fl=Ot/To.scalingFactor,Kl=bn/To.scalingFactor;const Hl={cells:[],height:0,depth:0,pos:0};for(const Sl of Qa){const oh=(o=Zt.createBox(To,Sl,{type:"ignore"}))!=null?o:new vn(null,{type:"ignore"});Kl=Math.max(Kl,oh.depth),Fl=Math.max(Fl,oh.height),Hl.cells.push(oh)}let Zl=(c=Is(this.rowGaps[oa]))!=null?c:0;Zl>0&&(Zl+=bn,Kl=Math.max(Kl,Zl),Zl=0),oa<sn-1&&!Jo(this.environmentName)&&this.environmentName!=="cases"&&this.environmentName!=="array"&&(Kl+=C.getRegisterAsEm("jot")),Hl.height=Fl,Hl.depth=Kl,Dt+=Fl,Hl.pos=Dt,Dt+=Kl+Zl,en.push(Hl)}const hr=Dt/2+Ua,Lr=[];for(let oa=0;oa<Ln;oa++){const Qa=[];for(const To of en){const Fl=To.cells[oa];Fl.depth=To.depth,Fl.height=To.height,Qa.push({box:Fl,shift:To.pos-hr})}Qa.length>0&&Lr.push(new zi({individualShift:Qa}))}const Mr=[];let Ci=!1,qi=!1,Bn=0,Xs=!this.leftDelim;const{colFormat:zl}=this;for(const oa of zl){if("align"in oa&&Bn>=Lr.length)break;if("align"in oa)Ci?Mr.push(Ta(2*We)):(qi||Xs)&&Mr.push(Ta(We)),Mr.push(new vn(Lr[Bn],{classes:"col-align-"+oa.align})),Bn++,Ci=!0,qi=!1,Xs=!1;else if("gap"in oa){if(typeof oa.gap=="number")Mr.push(Ta(oa.gap));else{const Qa=Ra(t,en,hr,oa.gap);Qa&&Mr.push(Qa)}Ci=!1,qi=!1,Xs=!1}else if("separator"in oa){const Qa=new vn(null,{classes:"vertical-separator"});Qa.height=Dt,Qa.setStyle("height",Dt,"em"),Qa.setStyle("border-right",`${k}em ${oa.separator} currentColor`),Qa.setStyle("vertical-align",-(Dt-hr),"em");let To=0;qi?To=ne-k:Ci&&(To=We-k),Qa.left=To,Mr.push(Qa),Ci=!1,qi=!0,Xs=!1}}Ci&&!this.rightDelim&&Mr.push(Ta(We));const ol=new vn(Mr,{classes:"mtable"});if((!this.leftDelim||this.leftDelim===".")&&(!this.rightDelim||this.rightDelim==="."))return this.caret&&(ol.caret=this.caret),this.bind(t,ol);const Io=ol.height,Ys=ol.depth,ys=this.bind(t,new vn([this.bind(t,Hn("open",(f=this.leftDelim)!=null?f:".",Io,Ys,C,{isSelected:this.isSelected})),ol,this.bind(t,Hn("close",(b=this.rightDelim)!=null?b:".",Io,Ys,C,{isSelected:this.isSelected}))],{type:"ord"}));return ys?(ys.setStyle("display","inline-block"),this.caret&&(ys.caret=this.caret),this.bind(t,this.attachSupsub(t,{base:ys}))):null}_serialize(t){var n;const i=[];if(this.environmentName==="lines"?i.push("{\\displaylines"):i.push(`\\begin{${this.environmentName}}`),this.environmentName==="array"){if(i.push("{"),this.colFormat!==void 0)for(const o of this.colFormat)"align"in o&&typeof o.align=="string"?i.push(o.align):"separator"in o&&o.separator==="solid"?i.push("|"):"separator"in o&&o.separator==="dashed"&&i.push(":");i.push("}")}for(let o=0;o<this.array.length;o++){for(let c=0;c<this.array[o].length;c++)c>0&&i.push(" & "),i.push(Zt.serialize(this.array[o][c],t));if(o<this.array.length-1){const c=this.rowGaps[o];c!=null&&c.dimension?i.push(`\\\\[${c.dimension} ${(n=c.unit)!=null?n:"pt"}] `):i.push("\\\\ ")}}return this.environmentName==="lines"?i.push("}"):i.push(`\\end{${this.environmentName}}`),ri(i)}getCell(t,n){return this.array[t][n]}setCell(t,n,i){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.array[t][n]!==void 0);for(const c of this.array[t][n])c.parent=void 0,c.parentBranch=void 0;let o=i;(i.length===0||i[0].type!=="first")&&(o=[new Zt({type:"first",mode:this.mode}),...i]),this.array[t][n]=o;for(const c of o)c.parent=this,c.parentBranch=[t,n];this.isDirty=!0}addRowBefore(t){console.assert(this.type==="array"&&Array.isArray(this.array));const n=[];for(let i=0;i<this.colCount;i++)n.push(Na(this));this.array.splice(t,0,n);for(let i=t;i<this.rowCount;i++)for(let o=0;o<this.colCount;o++){const c=this.array[i][o];if(c)for(const f of c)f.parentBranch=[i,o]}this.isDirty=!0}addRowAfter(t){console.assert(this.type==="array"&&Array.isArray(this.array));const n=[];for(let i=0;i<this.colCount;i++)n.push(Na(this));this.array.splice(t+1,0,n);for(let i=t+1;i<this.rowCount;i++)for(let o=0;o<this.colCount;o++){const c=this.array[i][o];if(c)for(const f of c)f.parentBranch=[i,o]}this.isDirty=!0}removeRow(t){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.rowCount>t);const n=this.array.splice(t,1);for(const i of n)for(const o of i)if(o)for(const c of o)c.parent=void 0,c.parentBranch=void 0;for(let i=t;i<this.rowCount;i++)for(let o=0;o<this.colCount;o++){const c=this.array[i][o];if(c)for(const f of c)f.parentBranch=[i,o]}this.isDirty=!0}addColumnBefore(t){console.assert(this.type==="array"&&Array.isArray(this.array));for(const n of this.array)n.splice(t,0,Na(this));for(let n=0;n<this.rowCount;n++)for(let i=t;i<this.colCount;i++){const o=this.array[n][i];if(o)for(const c of o)c.parentBranch=[n,i]}this.isDirty=!0}addColumnAfter(t){console.assert(this.type==="array"&&Array.isArray(this.array));for(const n of this.array)n.splice(t+1,0,Na(this));for(let n=0;n<this.rowCount;n++)for(let i=t+1;i<this.colCount;i++){const o=this.array[n][i];if(o)for(const c of o)c.parentBranch=[n,i]}this.isDirty=!0}addColumn(){this.addColumnAfter(this.colCount-1)}removeColumn(t){console.assert(this.type==="array"&&Array.isArray(this.array)&&this.colCount>t);for(const n of this.array){const i=n.splice(t,1);for(const o of i)if(o)for(const c of o)c.parent=void 0,c.parentBranch=void 0}for(let n=0;n<this.rowCount;n++)for(let i=t;i<this.colCount;i++){const o=this.array[n][i];if(o)for(const c of o)c.parentBranch=[n,i]}this.isDirty=!0}get cells(){const t=[];for(const n of this.array)for(const i of n)i&&t.push(i.filter(o=>o.type!=="first"));return t}};function Na(e){const t=new Zt({type:"first",mode:e.mode});t.parent=e;const n=new Dr;return n.parent=e,[t,n]}function Ta(e){const t=new vn(null,{classes:"arraycolsep"});return t.width=e,t}function Ra(e,t,n,i){if(!i)return null;const o=[];for(const c of t){const f=Zt.createBox(e,i,{type:"ignore"});f&&(f.depth=c.depth,f.height=c.height,o.push({box:f,shift:c.pos-n}))}return new zi({individualShift:o}).wrap(e)}var Ya=class B0 extends Zt{constructor(t){super({mode:t.mode,command:t.command,style:t.style,body:t.body,type:"box"}),this.framecolor=t.framecolor,this.backgroundcolor=t.backgroundcolor,this.padding=t.padding,this.offset=t.offset,this.border=t.border}static fromJson(t){return new B0(t)}toJson(){return F(E({},super.toJson()),{framecolor:this.framecolor,backgroundcolor:this.backgroundcolor,padding:this.padding,offset:this.offset,border:this.border})}render(t){var n,i,o,c;const f=Zt.createBox(t,this.body,{type:"lift"});if(!f)return null;const b=t.toEm((n=this.offset)!=null?n:{dimension:0});f.depth+=b,f.setStyle("display","inline-block"),f.setStyle("position","relative"),f.setStyle("height",Math.floor(100*f.height+f.depth)/100,"em"),f.setStyle("vertical-align",-Math.floor(100*f.height)/100,"em");const C=new xi({parent:t},this.style),k=C.toEm((i=this.padding)!=null?i:{register:"fboxsep"}),$=new vn(null,{classes:"ML__box"});$.height=f.height+k,$.depth=f.depth+k,$.setStyle("box-sizing","border-box"),$.setStyle("position","absolute"),$.setStyle("top",-k+.3,"em"),$.setStyle("left",0),$.setStyle("height",$.height+$.depth,"em"),$.setStyle("width","100%"),this.backgroundcolor&&$.setStyle("background-color",(o=C.toColor(this.backgroundcolor))!=null?o:"transparent"),this.framecolor&&$.setStyle("border",`${C.getRegisterAsEm("fboxrule",2)}em solid ${(c=C.toColor(this.framecolor))!=null?c:"black"}`),this.border&&$.setStyle("border",this.border);const ne=new vn([$,f],{type:"lift"});return ne.setStyle("display","inline-block"),ne.setStyle("position","relative"),ne.setStyle("line-height",0),ne.height=f.height+k+(b>0?b:0),ne.depth=f.depth+k+(b<0?-b:0),ne.setStyle("padding-left",k,"em"),ne.setStyle("padding-right",k,"em"),ne.setStyle("height",Math.floor(100*(f.height+f.depth+2*k+Math.abs(b)))/100,"em"),ne.setStyle("margin-top",-k,"em"),ne.setStyle("top",Math.floor(100*(f.depth-f.height+2*k-b))/100,"em"),ne.setStyle("vertical-align",Math.floor(100*(f.depth+2*k))/100,"em"),this.caret&&(ne.caret=this.caret),this.attachSupsub(t,{base:ne})}_serialize(t){return t.skipStyles?ri([this.bodyToLatex(t),this.supsubToLatex(t)]):super._serialize(t)}},Yl=class N0 extends Zt{constructor(t,n){var i;super({type:"composition",mode:(i=n==null?void 0:n.mode)!=null?i:"math",value:t})}static fromJson(t){return new N0(t.value,t)}toJson(){return super.toJson()}get computedStyle(){return{}}render(t){const n=new vn(this.value,{classes:"ML__composition",type:"composition"});return this.bind(t,n),this.caret&&(n.caret=this.caret),n}_serialize(t){return""}},cs=class R0 extends Zt{constructor(t){super({type:"error",value:t,command:t,mode:"math"}),this.verbatimLatex=t}static fromJson(t){return new R0(t.command)}toJson(){return super.toJson()}render(t){const n=this.createBox(t,{classes:"ML__error"});return this.caret&&(n.caret=this.caret),n}},Eo=class z0 extends Zt{constructor(t,n,i){super({type:"group",mode:n,style:i}),this.body=t,this.boxType=t.length>1?"ord":"ignore",this.skipBoundary=!0,this.displayContainsHighlight=!1,t&&t.length===1&&t[0].command===","&&(this.captureSelection=!0)}static fromJson(t){return new z0(t.body,t.mode,t.style)}render(t){const n=Zt.createBox(t,this.body,{type:this.boxType});return n?(this.caret&&(n.caret=this.caret),this.bind(t,n)):null}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const n=re(this.command,this.mode);return n!=null&&n.serialize?n.serialize(this,t):`{${this.bodyToLatex(t)}}`}},Oi=class F0 extends Zt{constructor(t,n,i){super({type:"leftright",style:i.style,displayContainsHighlight:!0}),this.variant=t,this.body=n,this.leftDelim=i.leftDelim,this.rightDelim=i.rightDelim}static fromJson(t){var n;return new F0((n=t.variant)!=null?n:"",t.body,t)}toJson(){const t=super.toJson();return this.variant&&(t.variant=this.variant),this.leftDelim&&(t.leftDelim=this.leftDelim),this.rightDelim&&(t.rightDelim=this.rightDelim),t}_serialize(t){var n,i;const o=this.matchingRightDelim();return this.variant==="left...right"?ri(["\\left",(n=this.leftDelim)!=null?n:".",this.bodyToLatex(t),"\\right",o]):this.variant==="mleft...mright"?ri(["\\mleft",(i=this.leftDelim)!=null?i:".",this.bodyToLatex(t),"\\mright",o]):ri([!this.leftDelim||this.leftDelim==="."?"":this.leftDelim,this.bodyToLatex(t),o])}matchingRightDelim(){var t,n;if(this.rightDelim&&this.rightDelim!=="?")return this.rightDelim;const i=(t=this.leftDelim)!=null?t:".";return(n=l[i])!=null?n:i}render(t){var n,i;const o=new xi({parent:t},this.style);console.assert(this.body!==void 0);const c=new xi({parent:t,mathstyle:"textstyle"},this.style),f=(n=Zt.createBox(o,this.body,{type:"inner"}))!=null?n:new vn(null,{type:"inner"}),b=f.height/c.scalingFactor,C=f.depth/c.scalingFactor,k=[];if(this.leftDelim&&k.push(this.bind(c,Hn("open",this.leftDelim,b,C,c,{isSelected:this.isSelected,classes:"ML__open"+(this.containsCaret?" ML__contains-caret":""),mode:this.mode,style:this.style}))),f&&(ho(f.children,this,o,b,C),k.push(f)),this.rightDelim){let We=this.containsCaret?" ML__contains-caret":"",Je=this.rightDelim;Je==="?"&&(o.smartFence?(Je=this.matchingRightDelim(),We+=" ML__smart-fence__close"):Je="."),k.push(this.bind(c,Hn("close",Je,b,C,c,{isSelected:this.isSelected,classes:We+" ML__close",mode:this.mode,style:this.style})))}let $=this.variant==="mleft...mright";const ne=this.leftSibling;ne&&(!$&&ne.isFunction&&($=!0),!$&&ne.type==="subsup"&&((i=ne.leftSibling)!=null&&i.isFunction)&&($=!0));const Me=new vn(k,{type:$?"close":"inner",classes:"left-right"});return Me.setStyle("margin-top",`${-f.depth}em`),Me.setStyle("height",`${f.height+f.depth}em`),this.caret&&(Me.caret=this.caret),this.bind(o,Me.wrap(o))}};function ho(e,t,n,i,o){if(e)for(let c=0;c<e.length;c++){const f=e[c];f.type==="middle"?(e[c]=t.bind(n,Hn("inner",f.value,i,o,n,{isSelected:t.isSelected})),e[c].caret=f.caret,e[c].isSelected=f.isSelected,e[c].cssId=f.cssId,e[c].htmlData=f.htmlData,e[c].htmlStyle=f.htmlStyle,e[c].attributes=f.attributes,e[c].cssProperties=f.cssProperties):f.children&&ho(f.children,t,n,i,o)}}var pu=class K0 extends Zt{constructor(t,n){var i;super({type:"macro",command:t,style:n.style}),this.body=n.body,n.captureSelection===void 0?n.args?this.captureSelection=!1:this.captureSelection=!0:this.captureSelection=n.captureSelection,this.macroArgs=n.args,this.expand=(i=n.expand)!=null?i:!1}static fromJson(t){return new K0(t.command,t)}toJson(){const t=super.toJson();return this.expand&&(t.expand=!0),this.captureSelection!==void 0&&(t.captureSelection=this.captureSelection),this.macroArgs&&(t.args=this.macroArgs),t}_serialize(t){var n;return t.expandMacro&&this.expand?this.bodyToLatex(t):this.command+((n=this.macroArgs)!=null?n:"")}render(t){const n=Zt.createBox(t,this.body);return n?(this.caret&&(n.caret=this.caret),this.bind(t,n)):null}},bl=class H0 extends Zt{constructor(){super({type:"macro-argument"})}static fromJson(t){return new H0}toJson(){return super.toJson()}_serialize(t){return""}render(t){return null}},$l=class Z0 extends Zt{constructor(t,n,i=!1,o,c){var f;super({type:"prompt",mode:(f=c==null?void 0:c.mode)!=null?f:"math",style:c==null?void 0:c.style,command:"\\placeholder"}),this.body=o,this.correctness=n,this.placeholderId=t,this.locked=i,this.captureSelection=this.locked}static fromJson(t){return new Z0(t.placeholderId,t.correctness,t.locked,t.body,t)}toJson(){const t=super.toJson();return this.placeholderId&&(t.placeholderId=this.placeholderId),this.body||delete t.body,this.body&&(t.body=this.body.filter(n=>n.type!=="first").map(n=>n.toJson())),this.correctness&&(t.correctness=this.correctness),t.locked=this.locked,t}render(t){const n=new xi({parent:t}),i=n.getRegisterAsEm("fboxsep"),o=i,c=i,f=Zt.createBox(t,this.body);if(!f)return null;f.height||(f.height=n.metrics.xHeight),f.setStyle("vertical-align",-f.height,"em"),this.correctness==="correct"?f.setStyle("color","var(--correct-color, var(--ML__correct-color))"):this.correctness==="incorrect"&&f.setStyle("color","var(--incorrect-color, var(--ML__incorrect-color))");const b=new vn(f,{type:"ord"});b.setStyle("display","inline-block"),b.setStyle("height",f.height+f.depth,"em"),b.setStyle("vertical-align",-c,"em");let C="ML__prompt ";this.locked?C+=" ML__lockedPromptBox ":C+=" ML__editablePromptBox ",this.correctness==="correct"?C+=" ML__correctPromptBox ":this.correctness==="incorrect"&&(C+=" ML__incorrectPromptBox "),this.containsCaret&&(C+=" ML__focusedPromptBox ");const k=new vn(null,{classes:C,attributes:{part:"prompt"}});k.height=b.height+c,k.depth=b.depth+c,k.width=b.width+2*o,k.setStyle("box-sizing","border-box"),k.setStyle("position","absolute"),k.setStyle("height",b.height+b.depth+2*c,"em"),o===0&&k.setStyle("width","100%"),o!==0&&(k.setStyle("width",`calc(100% + ${2*o}em)`),k.setStyle("top",i,"em"),k.setStyle("left",-o,"em")),(!this.body||this.body.length===1)&&(k.width=3*o,k.setStyle("width",`calc(100% + ${3*o}em)`),k.setStyle("left",-1.5*o,"em"));let $="";this.correctness==="incorrect"&&($+='<line x1="3%" y1="97%" x2="97%" y2="3%" stroke-width="0.5" stroke="var(--incorrect-color, var(--ML__incorrect-color))" stroke-linecap="round" />'),$&&(k.svgOverlay=$);const ne=new vn([k,b],{classes:"ML__prompt-atom"});return ne.setStyle("position","relative"),ne.setStyle("display","inline-block"),ne.setStyle("line-height",0),ne.height=b.height+c+.2,ne.depth=b.depth+c,ne.left=o,ne.right=o,ne.setStyle("height",b.height+c,"em"),ne.setStyle("top",b.depth-b.height,"em"),ne.setStyle("vertical-align",b.depth+c,"em"),ne.setStyle("margin-left",.5,"em"),ne.setStyle("margin-right",.5,"em"),this.caret&&(ne.caret=this.caret),this.bind(n,this.attachSupsub(t,{base:ne}))}_serialize(t){var n;const i=(n=this.bodyToLatex(t))!=null?n:"";if(t.skipPlaceholders)return i;let o="\\placeholder";return this.placeholderId&&(o+=`[${this.placeholderId}]`),this.correctness==="correct"?o+="[correct]":this.correctness==="incorrect"&&(o+="[incorrect]"),this.locked&&(o+="[locked]"),Ji(o,i)}},rl=class W0 extends Zt{constructor(t){super({type:"subsup",style:t==null?void 0:t.style}),this.subsupPlacement="auto"}static fromJson(t){const n=new W0(t);for(const i of mc)t[i]&&n.setChildren(t[i],i);return n}render(t){var n;const i=new xi({parent:t,isPhantom:!0}),o=this.leftSibling,c=(n=o.render(i))!=null?n:new vn(null),f=new vn(null);return f.height=c.height,f.depth=c.depth,this.attachSupsub(t,{base:f,isCharacterBox:o.isCharacterBox(),type:"ignore"})}_serialize(t){return this.supsubToLatex(t)}};function io(e){return e?!/^(<$$>|<$>|<space>|<{>|<}>|#[0-9\?]|\\.+)$/.test(e):!1}var Jl=class{constructor(e,t,n){this.errors=[],this.index=0,this.endCount=0;var i,o,c,f;n!=null||(n={}),this.tokens=e,this.context=t instanceof xi&&!(n!=null&&n.parseMode)&&!n.mathstyle?t:new xi({from:t,mathstyle:n.mathstyle},n.style),this.args=(i=n.args)!=null?i:void 0,this.smartFence=this.context.smartFence,this.parsingContext={parent:void 0,mathlist:[],style:(o=n.style)!=null?o:{},parseMode:(c=n.parseMode)!=null?c:"math",mathstyle:(f=n.mathstyle)!=null?f:"displaystyle",tabular:!1}}beginContext(e){var t,n,i;const o=this.parsingContext,c={parent:o,mathlist:[],style:E({},o.style),parseMode:(t=e==null?void 0:e.mode)!=null?t:o.parseMode,mathstyle:(n=e==null?void 0:e.mathstyle)!=null?n:o.mathstyle,tabular:(i=e==null?void 0:e.tabular)!=null?i:!1};this.parsingContext=c}endContext(){this.parsingContext=this.parsingContext.parent}onError(e){this.errors.push(E({before:gs(this.tokens.slice(this.index,this.index+10)),after:gs(this.tokens.slice(Math.max(0,this.index-10),this.index))},e))}get mathlist(){return this.parsingContext.mathlist}set mathlist(e){this.parsingContext.mathlist=e}get parseMode(){return this.parsingContext.parseMode}set parseMode(e){this.parsingContext.parseMode=e}get tabularMode(){return this.parsingContext.tabular}get style(){let e=this.parsingContext;for(;e;){if(e.style)return E({},e.style);e=e.parent}return{}}set style(e){this.parsingContext.style=e}end(){return this.endCount++,this.index>=this.tokens.length||this.endCount>1e3}next(){this.index+=1}get(){return this.endCount=0,this.index<this.tokens.length?this.tokens[this.index++]:""}peek(){return this.tokens[this.index]}match(e){return this.tokens[this.index]===e?(this.index++,!0):!1}lastSubsupAtom(){let e;return this.mathlist.length>0&&(e=this.mathlist[this.mathlist.length-1],e.type==="subsup"||e.subsupPlacement!==void 0)||(e=new rl({style:this.style}),this.mathlist.push(e)),e}hasPattern(e){return e.test(this.tokens[this.index])}hasInfixCommand(){var e;const{index:t}=this;if(t<this.tokens.length&&this.tokens[t].startsWith("\\")){const n=re(this.tokens[t],this.parseMode);return!n||n.definitionType==="symbol"||n.ifMode&&!n.ifMode.includes(this.parseMode)?!1:(e=n.infix)!=null?e:!1}return!1}matchColumnSeparator(){return!this.tabularMode||this.peek()!=="&"?!1:(this.index++,!0)}matchRowSeparator(){if(!this.tabularMode)return!1;const e=this.peek();return e!=="\\\\"&&e!=="\\cr"&&e!=="\\tabularnewline"?!1:(this.index++,!0)}placeholder(){var e;const t=(e=this.args)==null?void 0:e.call(this,"?");return t?_o(t,{parseMode:this.parseMode,mathstyle:"textstyle"}):[new Dr({mode:this.parseMode,style:this.style})]}skipWhitespace(){for(;this.match("<space>"););}skipUntilToken(e){let t=this.tokens[this.index];for(;t&&t!==e;)t=this.tokens[++this.index];t===e&&this.index++}skipFiller(){for(;this.match("\\relax")||this.match("<space>"););}matchKeyword(e){const t=this.index;let n=this.end(),i="";for(;!n;){const c=this.get();io(c)?(i+=c,n=this.end()||i.length>=e.length):n=!0}const o=e.toUpperCase()===i.toUpperCase();return o||(this.index=t),o}scanString(){let e="";for(;!this.end();){const t=this.peek();if(t==="]")return e;if(t==="<space>")e+=" ";else if(t.startsWith("\\"))this.onError({code:"unexpected-command-in-string"}),e+=t.substring(1);else if(io(t))e+=t;else return e;this.next()}return e}scanBalancedString(){let e="",t=this.end(),n=1;for(;!t;){const i=this.get();i==="<space>"?e+=" ":i==="<{>"?(e+="{",n+=1):i==="<}>"?(n-=1,n>0?e+="}":this.index-=1):i==="<$>"?e+="$":i==="<$$>"?e+="$$":e+=i,t=n===0||this.end()}return e}scanLiteralGroup(){var e;if(!this.match("<{>"))return"";let t="",n=1;for(;n>0&&!this.end();){const i=this.get();i==="<}>"?(n-=1,n>0&&(t+="}")):i==="<{>"?(n+=1,t+="{"):(/\\[a-zA-Z]+$/.test(t)&&/^[a-zA-Z]/.test(i)&&(t+=" "),t+=(e={"<space>":" ","<$$>":"$$","<$>":"$"}[i])!=null?e:i)}return t}scanNumber(e=!0){var t,n;let i=!1,o=this.peek();for(;o==="<space>"||o==="+"||o==="-";)this.get(),o==="-"&&(i=!i),o=this.peek();e=!!e;let c=10,f=/\d/;if(this.match("'"))c=8,f=/[0-7]/,e=!0;else if(this.match('"'))c=16,f=/[\dA-F]/,e=!0;else if(this.match("x"))c=16,f=/[\dA-Fa-f]/,e=!0;else if(this.match("`"))return o=this.get(),o?o.length===2&&o.startsWith("\\")?{number:(i?-1:1)*((t=o.codePointAt(1))!=null?t:0),base:"alpha"}:{number:(i?-1:1)*((n=o.codePointAt(0))!=null?n:0),base:"alpha"}:null;let b="";for(;this.hasPattern(f);)b+=this.get();if(!e&&(this.match(".")||this.match(",")))for(b+=".";this.hasPattern(f);)b+=this.get();const C=e?Number.parseInt(b,c):Number.parseFloat(b);return Number.isNaN(C)?null:{number:i?-C:C,base:c===16?"hexadecimal":c===8?"octal":"decimal"}}scanRegister(){var e;const t=this.index,n=this.scanNumber(!1);if(this.skipWhitespace(),this.match("\\relax"))return n;let i=!1;if(n===null)for(;;){const c=this.peek();if(c==="-")i=!i;else if(c!=="+")break;this.next(),this.skipWhitespace()}if(this.match("\\global")){this.skipWhitespace();const c=this.get();return c.startsWith("\\")?n?{register:c,global:!0,factor:(i?-1:1)*n.number}:i?{register:c,global:!0,factor:-1}:{register:c,global:!0}:(this.index=t,null)}let o=this.get();return o!=null&&o.startsWith("\\")?(o=o.substring(1),this.context.registers[o]?!i||n!==null?{register:o,factor:(i?-1:1)*((e=n==null?void 0:n.number)!=null?e:1)}:{register:o}:(this.index=t,null)):(this.index=t,null)}scanValue(){const e=this.scanRegister();if(e)return e;const t=this.index,n=this.scanGlueOrDimen();if(n&&("unit"in n||"glue"in n&&"unit"in n.glue))return n;this.index=t;const i=this.scanNumber();if(i)return i;if(this.end()||!io(this.peek()))return null;const o=this.scanString();return o.length>0?{string:o}:null}scanDimen(){const e=this.scanNumber(!1);if(e===null)return null;const t=e.number;this.skipWhitespace(),this.matchKeyword("true"),this.skipWhitespace();let n;return this.matchKeyword("pt")?n="pt":this.matchKeyword("mm")?n="mm":this.matchKeyword("cm")?n="cm":this.matchKeyword("ex")?n="ex":this.matchKeyword("px")?n="px":this.matchKeyword("em")?n="em":this.matchKeyword("bp")?n="bp":this.matchKeyword("dd")?n="dd":this.matchKeyword("pc")?n="pc":this.matchKeyword("in")?n="in":this.matchKeyword("mu")&&(n="mu"),n?{dimension:t,unit:n}:{dimension:t}}scanGlueOrDimen(){const e=this.scanDimen();if(e===null)return null;if(this.skipWhitespace(),this.match("\\relax"))return e;const t={glue:e};if(this.matchKeyword("plus")){const n=this.scanDimen();if(n)t.grow=n;else return t}if(this.skipWhitespace(),this.match("\\relax"))return t;if(this.skipWhitespace(),this.matchKeyword("minus")){const n=this.scanDimen();if(n)t.shrink=n;else return t}return!t.grow&&!t.shrink?e:t}scanColspec(){this.skipWhitespace();const e=[];for(;!this.end()&&!(this.peek()==="<}>"||this.peek()==="]");){const t=this.get();t==="c"||t==="r"||t==="l"?e.push({align:t}):t==="|"?e.push({separator:"solid"}):t===":"?e.push({separator:"dashed"}):t==="@"&&(this.match("<{>")&&(this.beginContext({mode:"math"}),e.push({gap:this.scan(n=>n==="<}>")}),this.endContext()),this.match("<}>")||this.onError({code:"unbalanced-braces"}))}return e}scanModeSet(){let e;if(this.match("\\(")&&(e="textstyle"),!e&&this.match("\\[")&&(e="displaystyle"),!e)return null;this.beginContext({mode:"math",mathstyle:e});const t=this.scan(n=>n===(e==="displaystyle"?"\\]":"\\)"));return this.match(e==="displaystyle"?"\\]":"\\)")||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),t}scanModeShift(){let e="";if(this.match("<$>")&&(e="<$>"),!e&&this.match("<$$>")&&(e="<$$>"),!e)return null;this.beginContext({mode:"math",mathstyle:"textstyle"});const t=this.scan(n=>n===e);return this.match(e)||this.onError({code:"unbalanced-mode-shift"}),this.endContext(),t}scanEnvironment(){if(!this.match("\\begin"))return null;const e=this.scanArgument("string");if(!e)return null;const t=O(e);if(!t)return this.onError({code:"unknown-environment",arg:e}),null;const n=[];if(t.params)for(const b of t.params)if(b.isOptional)n.push(this.scanOptionalArgument(b.type));else{const C=this.scanArgument(b.type);C||this.onError({code:"missing-argument",arg:e}),n.push(C)}this.beginContext({tabular:t.tabular});const i=[],o=[];let c=[],f=!1;do if(this.end()&&(this.onError({code:"unbalanced-environment",arg:e}),f=!0),!f&&this.match("\\end")&&(this.scanArgument("string")!==e&&this.onError({code:"unbalanced-environment",arg:e}),f=!0),!f)if(this.matchColumnSeparator())c.push(this.mathlist),this.mathlist=[];else if(this.matchRowSeparator()){c.push(this.mathlist),this.mathlist=[];let b=null;this.skipWhitespace(),this.match("[")&&(b=this.scanDimen(),this.skipWhitespace(),this.match("]")),o.push(b!=null?b:{dimension:0}),i.push(c),c=[]}else this.mathlist.push(...this.scan(b=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline"].includes(b)));while(!f);return c.push(this.mathlist),c.length>0&&i.push(c),this.endContext(),t.createAtom(e,i,o,n)}scanExpression(){const e=this.mathlist;if(this.mathlist=[],this.parseExpression()){const t=this.mathlist;return this.mathlist=e,t}return this.mathlist=e,null}scan(e){this.beginContext(),e||(e=f=>f==="<}>");let t="",n=null,i=[],o=null;for(;!this.end()&&!e(this.peek());)this.hasInfixCommand()&&!t?(t=this.get(),n=re(t,"math"),n&&(i=this.scanArguments(n)[1]),o=this.mathlist,this.mathlist=[]):this.parseExpression();let c;return t?(console.assert(!!n),i.unshift(this.mathlist),o&&i.unshift(o),c=[n.createAtom({command:t,args:i,style:this.style,mode:this.parseMode})]):c=this.mathlist,this.endContext(),c}scanGroup(){const e=this.index;if(!this.match("<{>"))return null;const t=this.scan(i=>i==="<}>");this.match("<}>")||this.onError({code:"unbalanced-braces"});const n=new Eo(t,this.parseMode,this.style);return n.verbatimLatex=gs(this.tokens.slice(e,this.index)),n}scanSmartFence(){if(this.skipWhitespace(),!this.match("("))return null;this.beginContext();let e=1;for(;!this.end()&&e!==0;)this.match("(")&&(e+=1),this.match(")")&&(e-=1),e!==0&&this.parseExpression();const t=new Oi("",this.mathlist,{leftDelim:"(",rightDelim:e===0?")":"?"});return this.endContext(),t}scanDelim(){this.skipWhitespace();const e=this.peek();if(!e)return this.onError({code:"unexpected-end-of-string"}),null;if(!io(e)&&!e.startsWith("\\"))return null;this.next();const t=re(e,"math");return t?t.definitionType==="function"&&t.ifMode&&!t.ifMode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:e}),null):t.definitionType==="symbol"&&(t.type==="mopen"||t.type==="mclose")||/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(e)?e:(this.onError({code:"unexpected-delimiter",arg:e}),null):(this.onError({code:"unknown-command",arg:e}),null)}scanLeftRight(){var e;if(this.match("\\right"))return this.onError({code:"unbalanced-braces"}),new cs("\\right");if(this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),new cs("\\mright");let t="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;t="\\mright"}const n=this.scanDelim();if(!n)return this.onError({code:"unexpected-delimiter"}),new cs(t==="\\right"?"\\left":"\\mleft");for(this.beginContext();!this.end()&&!this.match(t);)this.parseExpression();const i=this.mathlist;this.endContext();const o=(e=this.scanDelim())!=null?e:".";return new Oi(t==="\\right"?"left...right":"mleft...mright",i,{leftDelim:n,rightDelim:o,style:this.style})}parseSupSub(){if(this.parseMode!=="math")return!1;let e=this.peek();if(e!=="^"&&e!=="_"&&e!=="'")return!1;const t=this.lastSubsupAtom();for(;e==="^"||e==="_"||e==="'";)this.match("'")?this.match("'")?t.addChild(new Zt({type:"mord",command:"\\doubleprime",mode:"math",value:"\u2032\u2032"}),"superscript"):t.addChild(new Zt({type:"mord",command:"\\prime",mode:"math",value:"\u2032"}),"superscript"):(this.match("^")||this.match("_"))&&t.addChildren(Oe(this.scanArgument("expression")),e==="_"?"subscript":"superscript"),e=this.peek();return!0}parseLimits(){if(this.parseMode!=="math")return!1;const e=this.match("\\limits"),t=!e&&this.match("\\nolimits"),n=!t&&!e&&this.match("\\displaylimits");if(!e&&!t&&!n)return!1;const i=this.mathlist.length>0?this.mathlist[this.mathlist.length-1]:null;return i===null?!1:(i.explicitSubsupPlacement=!0,e&&(i.subsupPlacement="over-under"),t&&(i.subsupPlacement="adjacent"),n&&(i.subsupPlacement="auto"),!0)}scanArguments(e){if(!(e!=null&&e.params))return[void 0,[]];let t;const n=[];let i=e.infix?2:0;for(;i<e.params.length;){const o=e.params[i];o.type==="rest"?n.push(this.scan(c=>["<}>","&","\\end","\\cr","\\\\","\\tabularnewline","\\right"].includes(c))):o.isOptional?n.push(this.scanOptionalArgument(o.type)):o.type.endsWith("*")?t=o.type.slice(0,-1):n.push(this.scanArgument(o.type)),i+=1}return[t,n]}scanSymbolOrLiteral(){const e=this.peek();if(!e)return null;this.next();let t;if(io(e)){const n=jo.createAtom(this.parseMode,e,E({},this.style));return n?[n]:null}if(t=this.scanMacro(e),t)return[t];if(e.startsWith("\\")){const n=re(e,this.parseMode);if(!n)return this.onError({code:"unknown-command",arg:e}),[new cs(e)];if(n.definitionType==="symbol"){const i=E({},this.style);n.variant&&(i.variant=n.variant),t=new Zt({type:n.type,command:e,style:i,value:String.fromCodePoint(n.codepoint),mode:this.parseMode,verbatimLatex:e})}else{if(n.applyMode||n.applyStyle||n.infix)return this.onError({code:"invalid-command",arg:e}),[new cs(e)];n.createAtom&&(t=n.createAtom({command:e,args:[],style:this.style,mode:this.parseMode}))}}return t?[t]:null}scanArgument(e){var t;this.skipFiller();const n=this.parseMode;if(e==="auto"&&(e=n),!this.match("<{>")){if(e==="string")return this.scanString();if(e==="value")return this.scanValue();if(e==="delim")return(t=this.scanDelim())!=null?t:".";if(e==="expression")return this.scanExpression();if(e==="math"){e!==n&&this.beginContext({mode:"math"});const o=this.scanSymbolOrLiteral();return e!==n&&this.endContext(),o}if(e==="text"){e!==n&&this.beginContext({mode:"text"});const o=this.scanSymbolOrLiteral();return e!==n&&this.endContext(),o}return e==="balanced-string"||console.assert(!1),null}if(e==="text"){this.beginContext({mode:"text"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const o=this.mathlist;return this.endContext(),{group:o}}if(e==="math"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const o=this.mathlist;return this.endContext(),{group:o}}let i=null;if(e==="expression"){this.beginContext({mode:"math"});do this.mathlist.push(...this.scan());while(!this.match("<}>")&&!this.end());const o=this.mathlist;return this.endContext(),{group:o}}return e==="string"?i=this.scanString():e==="balanced-string"?i=this.scanBalancedString():e==="colspec"?i=this.scanColspec():e==="value"&&(i=this.scanValue()),this.skipUntilToken("<}>"),i}scanOptionalArgument(e){if(e=e==="auto"?this.parseMode:e,this.skipFiller(),!this.match("["))return null;let t=null;for(;!this.end()&&!this.match("]");)if(e==="string")t=this.scanString();else if(e==="value")t=this.scanValue();else if(e==="colspec")t=this.scanColspec();else if(e==="bbox"){const n={},i=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const o of i){const c=o.match(/^\s*([\d.]+)\s*([a-z]{2})/);if(c)n.padding={dimension:parseInt(c[1]),unit:c[2]};else{const f=o.match(/^\s*border\s*:\s*(.*)/);f?n.border=f[1]:n.backgroundcolor={string:o}}}t=n}else e==="math"&&(this.beginContext({mode:"math"}),t=this.mathlist.concat(this.scan(n=>n==="]")),this.endContext());return t}scanSymbolOrCommand(e){var t,n,i;if(e==="\\placeholder"){const b=this.scanOptionalArgument("string"),C=this.scanOptionalArgument("math"),k=Zt.serialize(C,{defaultMode:"math"});let $=[],ne;!ne&&k==="correct"?ne="correct":!ne&&k==="incorrect"?ne="incorrect":k!==""&&($=C);const Me=this.scanOptionalArgument("string")==="locked",We=this.scanArgument("auto");let Je;return We&&Array.isArray(We)&&We.length>0?Je=We:We&&typeof We=="object"&&"group"in We?Je=We.group:Je=$,b?[new $l(b,ne,Me,Je!=null?Je:$,{mode:this.parseMode,style:this.style})]:[new Dr({mode:this.parseMode,style:this.style})]}if(e==="\\renewcommand"||e==="\\newcommand"||e==="\\providecommand"||e==="\\def"){const b=this.index,C=this.scanLiteralGroup()||this.next();if(!C)return null;if(this.context.registers[C.substring(1)]){const k=this.scanArgument("string");k!==null&&(this.context.registers[C.substring(1)]=k);const $=ri([e,gs(this.tokens.slice(b,this.index))]);return[new Zt({type:"text",value:"",verbatimLatex:$})]}}let o=this.scanMacro(e);if(o)return[o];const c=re(e,this.parseMode);if(!c)return this.parseMode==="text"?(/[a-zA-Z]/.test((t=this.peek())!=null?t:"")&&(e+=" "),[...e].map(b=>new Zt({type:"text",value:b,mode:"text",style:this.style}))):(this.onError({code:"unknown-command",arg:e}),[new cs(e)]);const f=this.index;if(c.definitionType==="symbol"){const b=E({},this.style);c.variant&&(b.variant=c.variant),o=new Zt({type:c.type,command:e,style:b,value:String.fromCodePoint(c.codepoint),mode:this.parseMode})}else{if(c.ifMode&&!c.ifMode.includes(this.parseMode))return[];const b=this.parseMode;c.applyMode&&(this.parseMode=c.applyMode);let C,k=[];if(c.parse?k=c.parse(this):[C,k]=this.scanArguments(c),this.parseMode=b,c.applyMode&&!c.applyStyle&&!c.createAtom)return Oe(k[0]);if(c.infix)return this.onError({code:"too-many-infix-commands",arg:e}),null;if(typeof c.createAtom=="function")o=c.createAtom({command:e,args:k,style:this.style,mode:this.parseMode}),C&&(o.body=Oe(this.scanArgument(C)));else if(typeof c.applyStyle=="function"){const $=E(E({},this.style),c.applyStyle(e,k,this.context)),ne=this.parseMode;if(c.applyMode&&(this.parseMode=c.applyMode),C){const Me=this.style;this.style=$;const We=this.scanArgument(C);return this.style=Me,this.parseMode=ne,Oe(We)}this.style=$}else o=new Zt({type:"mord",command:(n=c.command)!=null?n:e,style:E({},this.style),value:e,mode:(i=c.applyMode)!=null?i:this.parseMode})}if(!o)return null;if(o instanceof Zt&&o.verbatimLatex===void 0&&!/^\\(llap|rlap|class|cssId|htmlData)$/.test(e)){const b=ri([e,gs(this.tokens.slice(f,this.index))]);b&&(o.verbatimLatex=b)}if(o.verbatimLatex===null&&(o.verbatimLatex=void 0),o.isFunction&&this.smartFence){const b=this.scanSmartFence();if(b)return[o,b]}return[o]}scanSymbolCommandOrLiteral(){const e=this.get();if(!e)return null;if(io(e)){const t=jo.createAtom(this.parseMode,e,E({},this.style));if(!t)return null;if(t.isFunction&&this.smartFence){const n=this.scanSmartFence();if(n)return[t,n]}return[t]}return e.startsWith("\\")?this.scanSymbolOrCommand(e):e==="<space>"?this.parseMode==="text"?[new vl(" "," ",this.style)]:null:(e==="<}>"?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:e}),null)}scanMacro(e){var t;const n=this.context.getMacro(e);if(!n)return null;const i=this.index,o=n.args,c={"?":(t=this.args)==null?void 0:t.call(this,"?")};for(let f=1;f<=o;f++){let b=this.scanLiteralGroup();if(!b){const C=this.index;this.scanExpression(),b=gs(this.tokens.slice(C,this.index))}c[f]=b}return new pu(e,{expand:n.expand,captureSelection:n.captureSelection,args:i===this.index?null:gs(this.tokens.slice(i,this.index)),style:this.parsingContext.style,body:_o(n.def,{context:this.context,parseMode:this.parseMode,args:f=>c[f],mathstyle:this.parsingContext.mathstyle,style:this.parsingContext.style})})}parseExpression(){var e,t,n,i;let o=(i=(n=(t=(e=this.scanEnvironment())!=null?e:this.scanModeShift())!=null?t:this.scanModeSet())!=null?n:this.scanGroup())!=null?i:this.scanLeftRight();if(o===null){if(this.parseSupSub()||this.parseLimits())return!0;o=this.scanSymbolCommandOrLiteral()}return o?(Array.isArray(o)?this.mathlist.push(...o):this.mathlist.push(o),!0):!1}};function _o(e,t){var n,i,o,c;const f=(n=t==null?void 0:t.args)!=null?n:void 0,b=new Jl(Es(e,f),t==null?void 0:t.context,{args:f,mathstyle:(i=t==null?void 0:t.mathstyle)!=null?i:"displaystyle",parseMode:(o=t==null?void 0:t.parseMode)!=null?o:"math",style:(c=t==null?void 0:t.style)!=null?c:{}}),C=[];for(;!b.end();)C.push(...b.scan(()=>!1));return C}function sh(e,t){var n;const i=new Jl(Es(e,null),t==null?void 0:t.context,{mathstyle:"displaystyle",parseMode:(n=t==null?void 0:t.parseMode)!=null?n:"math"});for(;!i.end();)i.scan();return i.errors}var lh=class j0 extends Zt{constructor(t,n){super({type:"chem"},{command:t,mode:"math"});const i=Ea.go(dn.go(n,t==="\\pu"?"pu":"ce"),!1);this.body=_o(i),this._verbatimLatex=t+"{"+n+"}",this.arg=n,this.captureSelection=!0}static fromJson(t){return new j0(t.command,t.arg)}set verbatimLatex(t){}get verbatimLatex(){return this._verbatimLatex}toJson(){return F(E({},super.toJson()),{arg:this.arg})}render(t){const n=Zt.createBox(t,this.body,{type:"inner"});return this.caret&&(n.caret=this.caret),this.bind(t,n)}_serialize(t){return console.assert(this.verbatimLatex!==void 0),this.verbatimLatex}};ce(["ce","pu"],"{chemformula:balanced-string}",{createAtom:e=>{var t;return new lh(e.command,(t=e.args[0])!=null?t:"")}});var dn={go:function(e,t){if(!e)return[];t===void 0&&(t="ce");var n="0",i={};i.parenthesisLevel=0,e=e.replace(/\n/g," "),e=e.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),e=e.replace(/[\u2026]/g,"...");for(var o,c=10,f=[];;){o!==e?(c=10,o=e):c--;var b=dn.stateMachines[t],C=b.transitions[n]||b.transitions["*"];e:for(var k=0;k<C.length;k++){var $=dn.patterns.match_(C[k].pattern,e);if($){for(var ne=C[k].task,Me=0;Me<ne.action_.length;Me++){var We;if(b.actions[ne.action_[Me].type_])We=b.actions[ne.action_[Me].type_](i,$.match_,ne.action_[Me].option);else if(dn.actions[ne.action_[Me].type_])We=dn.actions[ne.action_[Me].type_](i,$.match_,ne.action_[Me].option);else throw["MhchemBugA","mhchem bug A. Please report. ("+ne.action_[Me].type_+")"];dn.concatArray(f,We)}if(n=ne.nextState||n,e.length>0){if(ne.revisit||(e=$.remainder),!ne.toContinue)break e}else return f}}if(c<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(e,t){if(t)if(Object.prototype.toString.call(t)==="[object Array]")for(var n=0;n<t.length;n++)e.push(t[n]);else e.push(t)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:(?:([eE])|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return t&&t[0]?{match_:t.slice(1),remainder:e.substr(t[0].length)}:null},"(-)(9)^(-9)":function(e){var t=e.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return t&&t[0]?{match_:t.slice(1),remainder:e.substr(t[0].length)}:null},"state of aggregation $":function(e){var t=dn.patterns.findObserveGroups(e,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(t&&t.remainder.match(/^($|[\s,;\)\]\}])/))return t;var n=e.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return n?{match_:n[0],remainder:e.substr(n[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(e){return dn.patterns.findObserveGroups(e,"^{","","","}")},"^($...$)":function(e){return dn.patterns.findObserveGroups(e,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(e){return dn.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(e){return dn.patterns.findObserveGroups(e,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(e){return dn.patterns.findObserveGroups(e,"_{","","","}")},"_($...$)":function(e){return dn.patterns.findObserveGroups(e,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(e){return dn.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(e){return dn.patterns.findObserveGroups(e,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(e){return dn.patterns.findObserveGroups(e,"","{","}","")},"{(...)}":function(e){return dn.patterns.findObserveGroups(e,"{","","","}")},"$...$":function(e){return dn.patterns.findObserveGroups(e,"","$","$","")},"${(...)}$":function(e){return dn.patterns.findObserveGroups(e,"${","","","}$")},"$(...)$":function(e){return dn.patterns.findObserveGroups(e,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(e){return dn.patterns.findObserveGroups(e,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return dn.patterns.findObserveGroups(e,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return dn.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(e){return dn.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(e){return dn.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(e){return dn.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(e){return dn.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(e){return dn.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(e){return dn.patterns.findObserveGroups(e,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(e){return dn.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(e){return dn.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(e){return dn.patterns.findObserveGroups(e,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(e){var t;if(t=e.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/),t)return{match_:t[0],remainder:e.substr(t[0].length)};var n=dn.patterns.findObserveGroups(e,"","$","$","");return n&&(t=n.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),t)?{match_:t[0],remainder:e.substr(t[0].length)}:null},amount2:function(e){return this.amount(e)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(e){if(e.match(/^\([a-z]+\)$/))return null;var t=e.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return t?{match_:t[0],remainder:e.substr(t[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(e,t,n,i,o,c,f,b,C,k){var $=function(Dt,en){if(typeof en=="string")return Dt.indexOf(en)!==0?null:en;var Ln=Dt.match(en);return Ln?Ln[0]:null},ne=function(Dt,en,Ln){for(var sn=0;en<Dt.length;){var hr=Dt.charAt(en),Lr=$(Dt.substr(en),Ln);if(Lr!==null&&sn===0)return{endMatchBegin:en,endMatchEnd:en+Lr.length};if(hr==="{")sn++;else if(hr==="}"){if(sn===0)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];sn--}en++}return sn>0,null},Me=$(e,t);if(Me===null||(e=e.substr(Me.length),Me=$(e,n),Me===null))return null;var We=ne(e,Me.length,i||o);if(We===null)return null;var Je=e.substring(0,i?We.endMatchEnd:We.endMatchBegin);if(c||f){var Ot=this.findObserveGroups(e.substr(We.endMatchEnd),c,f,b,C);if(Ot===null)return null;var bn=[Je,Ot.match_];return{match_:k?bn.join(""):bn,remainder:Ot.remainder}}else return{match_:Je,remainder:e.substr(We.endMatchEnd)}},match_:function(e,t){var n=dn.patterns.patterns[e];if(n===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+e+")"];if(typeof n=="function")return dn.patterns.patterns[e](t);var i=t.match(n);if(i){var o;return i[2]?o=[i[1],i[2]]:i[1]?o=i[1]:o=i[0],{match_:o,remainder:t.substr(i[0].length)}}return null}},actions:{"a=":function(e,t){e.a=(e.a||"")+t},"b=":function(e,t){e.b=(e.b||"")+t},"p=":function(e,t){e.p=(e.p||"")+t},"o=":function(e,t){e.o=(e.o||"")+t},"q=":function(e,t){e.q=(e.q||"")+t},"d=":function(e,t){e.d=(e.d||"")+t},"rm=":function(e,t){e.rm=(e.rm||"")+t},"text=":function(e,t){e.text_=(e.text_||"")+t},insert:function(e,t,n){return{type_:n}},"insert+p1":function(e,t,n){return{type_:n,p1:t}},"insert+p1+p2":function(e,t,n){return{type_:n,p1:t[0],p2:t[1]}},copy:function(e,t){return t},rm:function(e,t){return{type_:"rm",p1:t||""}},text:function(e,t){return dn.go(t,"text")},"{text}":function(e,t){var n=["{"];return dn.concatArray(n,dn.go(t,"text")),n.push("}"),n},"tex-math":function(e,t){return dn.go(t,"tex-math")},"tex-math tight":function(e,t){return dn.go(t,"tex-math tight")},bond:function(e,t,n){return{type_:"bond",kind_:n||t}},"color0-output":function(e,t){return{type_:"color0",color:t[0]}},ce:function(e,t){return dn.go(t)},"1/2":function(e,t){var n=[];t.match(/^[+\-]/)&&(n.push(t.substr(0,1)),t=t.substr(1));var i=t.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return i[1]=i[1].replace(/\$/g,""),n.push({type_:"frac",p1:i[1],p2:i[2]}),i[3]&&(i[3]=i[3].replace(/\$/g,""),n.push({type_:"tex-math",p1:i[3]})),n},"9,9":function(e,t){return dn.go(t,"9,9")}},createTransitions:function(e){var t,n,i,o,c={};for(t in e)for(n in e[t])for(i=n.split("|"),e[t][n].stateArray=i,o=0;o<i.length;o++)c[i[o]]=[];for(t in e)for(n in e[t])for(i=e[t][n].stateArray||[],o=0;o<i.length;o++){var f=e[t][n];if(f.action_){f.action_=[].concat(f.action_);for(var b=0;b<f.action_.length;b++)typeof f.action_[b]=="string"&&(f.action_[b]={type_:f.action_[b]})}else f.action_=[];for(var C=t.split("|"),k=0;k<C.length;k++)if(i[o]==="*")for(var $ in c)c[$].push({pattern:C[k],task:f});else c[i[o]].push({pattern:C[k],task:f})}return c},stateMachines:{}};dn.stateMachines={ce:{transitions:dn.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(e,t){var n;if((e.d||"").match(/^[0-9]+$/)){var i=e.d;e.d=void 0,n=this.output(e),e.b=i}else n=this.output(e);return dn.actions["o="](e,t),n},"d= kv":function(e,t){e.d=t,e.dType="kv"},"charge or bond":function(e,t){if(e.beginsWithBond){var n=[];return dn.concatArray(n,this.output(e)),dn.concatArray(n,dn.actions.bond(e,t,"-")),n}else e.d=t},"- after o/d":function(e,t,n){var i=dn.patterns.match_("orbital",e.o||""),o=dn.patterns.match_("one lowercase greek letter $",e.o||""),c=dn.patterns.match_("one lowercase latin letter $",e.o||""),f=dn.patterns.match_("$one lowercase latin letter$ $",e.o||""),b=t==="-"&&(i&&i.remainder===""||o||c||f);b&&!e.a&&!e.b&&!e.p&&!e.d&&!e.q&&!i&&c&&(e.o="$"+e.o+"$");var C=[];return b?(dn.concatArray(C,this.output(e)),C.push({type_:"hyphen"})):(i=dn.patterns.match_("digits",e.d||""),n&&i&&i.remainder===""?(dn.concatArray(C,dn.actions["d="](e,t)),dn.concatArray(C,this.output(e))):(dn.concatArray(C,this.output(e)),dn.concatArray(C,dn.actions.bond(e,t,"-")))),C},"a to o":function(e){e.o=e.a,e.a=void 0},"sb=true":function(e){e.sb=!0},"sb=false":function(e){e.sb=!1},"beginsWithBond=true":function(e){e.beginsWithBond=!0},"beginsWithBond=false":function(e){e.beginsWithBond=!1},"parenthesisLevel++":function(e){e.parenthesisLevel++},"parenthesisLevel--":function(e){e.parenthesisLevel--},"state of aggregation":function(e,t){return{type_:"state of aggregation",p1:dn.go(t,"o")}},comma:function(e,t){var n=t.replace(/\s*$/,""),i=n!==t;return i&&e.parenthesisLevel===0?{type_:"comma enumeration L",p1:n}:{type_:"comma enumeration M",p1:n}},output:function(e,t,n){var i;if(!e.r)i=[],!e.a&&!e.b&&!e.p&&!e.o&&!e.q&&!e.d&&!n||(e.sb&&i.push({type_:"entitySkip"}),!e.o&&!e.q&&!e.d&&!e.b&&!e.p&&n!==2?(e.o=e.a,e.a=void 0):!e.o&&!e.q&&!e.d&&(e.b||e.p)?(e.o=e.a,e.d=e.b,e.q=e.p,e.a=e.b=e.p=void 0):e.o&&e.dType==="kv"&&dn.patterns.match_("d-oxidation$",e.d||"")?e.dType="oxidation":e.o&&e.dType==="kv"&&!e.q&&(e.dType=void 0),i.push({type_:"chemfive",a:dn.go(e.a,"a"),b:dn.go(e.b,"bd"),p:dn.go(e.p,"pq"),o:dn.go(e.o,"o"),q:dn.go(e.q,"pq"),d:dn.go(e.d,e.dType==="oxidation"?"oxidation":"bd"),dType:e.dType}));else{var o;e.rdt==="M"?o=dn.go(e.rd,"tex-math"):e.rdt==="T"?o=[{type_:"text",p1:e.rd||""}]:o=dn.go(e.rd);var c;e.rqt==="M"?c=dn.go(e.rq,"tex-math"):e.rqt==="T"?c=[{type_:"text",p1:e.rq||""}]:c=dn.go(e.rq),i={type_:"arrow",r:e.r,rd:o,rq:c}}for(var f in e)f!=="parenthesisLevel"&&f!=="beginsWithBond"&&delete e[f];return i},"oxidation-output":function(e,t){var n=["{"];return dn.concatArray(n,dn.go(t,"oxidation")),n.push("}"),n},"frac-output":function(e,t){return{type_:"frac-ce",p1:dn.go(t[0]),p2:dn.go(t[1])}},"overset-output":function(e,t){return{type_:"overset",p1:dn.go(t[0]),p2:dn.go(t[1])}},"underset-output":function(e,t){return{type_:"underset",p1:dn.go(t[0]),p2:dn.go(t[1])}},"underbrace-output":function(e,t){return{type_:"underbrace",p1:dn.go(t[0]),p2:dn.go(t[1])}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:dn.go(t[1])}},"r=":function(e,t){e.r=t},"rdt=":function(e,t){e.rdt=t},"rd=":function(e,t){e.rd=t},"rqt=":function(e,t){e.rqt=t},"rq=":function(e,t){e.rq=t},operator:function(e,t,n){return{type_:"operator",kind_:n||t}}}},a:{transitions:dn.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:dn.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:dn.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(e){if(e.text_){var t={type_:"text",p1:e.text_};for(var n in e)delete e[n];return t}}}},pq:{transitions:dn.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(e,t){return{type_:"state of aggregation subscript",p1:dn.go(t,"o")}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:dn.go(t[1],"pq")}}}},bd:{transitions:dn.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(e,t){return{type_:"color",color1:t[0],color2:dn.go(t[1],"bd")}}}},oxidation:{transitions:dn.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(e,t){return{type_:"roman numeral",p1:t||""}}}},"tex-math":{transitions:dn.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var n in e)delete e[n];return t}}}},"tex-math tight":{transitions:dn.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(e,t){e.o=(e.o||"")+"{"+t+"}"},output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var n in e)delete e[n];return t}}}},"9,9":{transitions:dn.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:dn.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(e,t){var n=[];return t[0]==="+-"||t[0]==="+/-"?n.push("\\pm "):t[0]&&n.push(t[0]),t[1]&&(dn.concatArray(n,dn.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?dn.concatArray(n,dn.go(t[2],"pu-9,9")):n.push(t[2])),(t[3]||t[4])&&(t[3]==="e"||t[4]==="*"?n.push({type_:"cdot"}):n.push({type_:"times"}))),t[5]&&n.push("10^{"+t[5]+"}"),n},"number^":function(e,t){var n=[];return t[0]==="+-"||t[0]==="+/-"?n.push("\\pm "):t[0]&&n.push(t[0]),dn.concatArray(n,dn.go(t[1],"pu-9,9")),n.push("^{"+t[2]+"}"),n},operator:function(e,t,n){return{type_:"operator",kind_:n||t}},space:function(){return{type_:"pu-space-1"}},output:function(e){var t,n=dn.patterns.match_("{(...)}",e.d||"");n&&n.remainder===""&&(e.d=n.match_);var i=dn.patterns.match_("{(...)}",e.q||"");if(i&&i.remainder===""&&(e.q=i.match_),e.d&&(e.d=e.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.d=e.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),e.q){e.q=e.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.q=e.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var o={d:dn.go(e.d,"pu"),q:dn.go(e.q,"pu")};e.o==="//"?t={type_:"pu-frac",p1:o.d,p2:o.q}:(t=o.d,o.d.length>1||o.q.length>1?t.push({type_:" / "}):t.push({type_:"/"}),dn.concatArray(t,o.q))}else t=dn.go(e.d,"pu-2");for(var c in e)delete e[c];return t}}},"pu-2":{transitions:dn.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(e,t){e.rm+="^{"+t+"}"},space:function(){return{type_:"pu-space-2"}},output:function(e){var t=[];if(e.rm){var n=dn.patterns.match_("{(...)}",e.rm||"");n&&n.remainder===""?t=dn.go(n.match_,"pu"):t={type_:"rm",p1:e.rm}}for(var i in e)delete e[i];return t}}},"pu-9,9":{transitions:dn.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){var n=e.text_.length%3;n===0&&(n=3);for(var i=e.text_.length-3;i>0;i-=3)t.push(e.text_.substr(i,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(0,n)),t.reverse()}else t.push(e.text_);for(var o in e)delete e[o];return t},"output-o":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){for(var n=e.text_.length-3,i=0;i<n;i+=3)t.push(e.text_.substr(i,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(i))}else t.push(e.text_);for(var o in e)delete e[o];return t}}}};var Ea={go:function(e,t){if(!e)return"";for(var n="",i=!1,o=0;o<e.length;o++){var c=e[o];typeof c=="string"?n+=c:(n+=Ea._go2(c),c.type_==="1st-level escape"&&(i=!0))}return!t&&!i&&n&&(n="{"+n+"}"),n},_goInner:function(e){return e&&Ea.go(e,!0)},_go2:function(e){var t;switch(e.type_){case"chemfive":t="";var n={a:Ea._goInner(e.a),b:Ea._goInner(e.b),p:Ea._goInner(e.p),o:Ea._goInner(e.o),q:Ea._goInner(e.q),d:Ea._goInner(e.d)};n.a&&(n.a.match(/^[+\-]/)&&(n.a="{"+n.a+"}"),t+=n.a+"\\,"),(n.b||n.p)&&(t+="{\\vphantom{X}}",t+="^{\\hphantom{"+(n.b||"")+"}}_{\\hphantom{"+(n.p||"")+"}}",t+="{\\vphantom{X}}",t+="^{\\smash[t]{\\vphantom{2}}\\llap{"+(n.b||"")+"}}",t+="_{\\vphantom{2}\\llap{\\smash[t]{"+(n.p||"")+"}}}"),n.o&&(n.o.match(/^[+\-]/)&&(n.o="{"+n.o+"}"),t+=n.o),e.dType==="kv"?((n.d||n.q)&&(t+="{\\vphantom{X}}"),n.d&&(t+="^{"+n.d+"}"),n.q&&(t+="_{\\smash[t]{"+n.q+"}}")):e.dType==="oxidation"?(n.d&&(t+="{\\vphantom{X}}",t+="^{"+n.d+"}"),n.q&&(t+="{\\vphantom{X}}",t+="_{\\smash[t]{"+n.q+"}}")):(n.q&&(t+="{\\vphantom{X}}",t+="_{\\smash[t]{"+n.q+"}}"),n.d&&(t+="{\\vphantom{X}}",t+="^{"+n.d+"}"));break;case"rm":t="\\mathrm{"+e.p1+"}";break;case"text":e.p1.match(/[\^_]/)?(e.p1=e.p1.replace(" ","~").replace("-","\\text{-}"),t="\\mathrm{"+e.p1+"}"):t="\\text{"+e.p1+"}";break;case"roman numeral":t="\\mathrm{"+e.p1+"}";break;case"state of aggregation":t="\\mskip2mu "+Ea._goInner(e.p1);break;case"state of aggregation subscript":t="\\mskip1mu "+Ea._goInner(e.p1);break;case"bond":if(t=Ea._getBond(e.kind_),!t)throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+e.kind_+")"];break;case"frac":var i="\\frac{"+e.p1+"}{"+e.p2+"}";t="\\mathchoice{\\textstyle"+i+"}{"+i+"}{"+i+"}{"+i+"}";break;case"pu-frac":var o="\\frac{"+Ea._goInner(e.p1)+"}{"+Ea._goInner(e.p2)+"}";t="\\mathchoice{\\textstyle"+o+"}{"+o+"}{"+o+"}{"+o+"}";break;case"tex-math":t=e.p1+" ";break;case"frac-ce":t="\\frac{"+Ea._goInner(e.p1)+"}{"+Ea._goInner(e.p2)+"}";break;case"overset":t="\\overset{"+Ea._goInner(e.p1)+"}{"+Ea._goInner(e.p2)+"}";break;case"underset":t="\\underset{"+Ea._goInner(e.p1)+"}{"+Ea._goInner(e.p2)+"}";break;case"underbrace":t="\\underbrace{"+Ea._goInner(e.p1)+"}_{"+Ea._goInner(e.p2)+"}";break;case"color":t="{\\color{"+e.color1+"}{"+Ea._goInner(e.color2)+"}}";break;case"color0":t="\\color{"+e.color+"}";break;case"arrow":var c={rd:Ea._goInner(e.rd),rq:Ea._goInner(e.rq)},f=Ea._getArrow(e.r);c.rd||c.rq?e.r==="<=>"||e.r==="<=>>"||e.r==="<<=>"||e.r==="<-->"?(f="\\long"+f,c.rd&&(f="\\overset{"+c.rd+"}{"+f+"}"),c.rq&&(e.r==="<-->"?f="\\underset{\\lower2mu{"+c.rq+"}}{"+f+"}":f="\\underset{\\lower6mu{"+c.rq+"}}{"+f+"}"),f=" {}\\mathrel{"+f+"}{} "):(c.rq&&(f+="[{"+c.rq+"}]"),f+="{"+c.rd+"}",f=" {}\\mathrel{\\x"+f+"}{} "):f=" {}\\mathrel{\\long"+f+"}{} ",t=f;break;case"operator":t=Ea._getOperator(e.kind_);break;case"1st-level escape":t=e.p1+" ";break;case"space":t=" ";break;case"entitySkip":t="~";break;case"pu-space-1":t="~";break;case"pu-space-2":t="\\mkern3mu ";break;case"1000 separator":t="\\mkern2mu ";break;case"commaDecimal":t="{,}";break;case"comma enumeration L":t="{"+e.p1+"}\\mkern6mu ";break;case"comma enumeration M":t="{"+e.p1+"}\\mkern3mu ";break;case"comma enumeration S":t="{"+e.p1+"}\\mkern1mu ";break;case"hyphen":t="\\text{-}";break;case"addition compound":t="\\,{\\cdot}\\,";break;case"electron dot":t="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":t="{\\times}";break;case"prime":t="\\prime ";break;case"cdot":t="\\cdot ";break;case"tight cdot":t="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":t="\\times ";break;case"circa":t="{\\sim}";break;case"^":t="uparrow";break;case"v":t="downarrow";break;case"ellipsis":t="\\ldots ";break;case"/":t="/";break;case" / ":t="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return t},_getArrow:function(e){switch(e){case"->":return"rightarrow";case"\u2192":return"rightarrow";case"\u27F6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"leftrightarrows";case"<=>":return"rightleftharpoons";case"\u21CC":return"rightleftharpoons";case"<=>>":return"Rightleftharpoons";case"<<=>":return"Leftrightharpoons";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(e){switch(e){case"-":return"{-}";case"1":return"{-}";case"=":return"{=}";case"2":return"{=}";case"#":return"{\\equiv}";case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\rlap{\\lower.1em{-}}\\raise.1em{\\tripledash}}";case"~=":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"~--":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{\\tripledash}}-}";case"-~-":return"{\\rlap{\\lower.2em{-}}\\rlap{\\raise.2em{-}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(e){switch(e){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":return" {}\\approx{} ";case"$\\approx$":return" {}\\approx{} ";case"v":return" \\downarrow{} ";case"(v)":return" \\downarrow{} ";case"^":return" \\uparrow{} ";case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};function Dv(e){}function $v(e){}var ch=class V0 extends Zt{constructor(t){super(F(E({},t),{type:"delim"})),this.value=t.delim,this.size=t.size}static fromJson(t){return new V0(t)}toJson(){return F(E({},super.toJson()),{delim:this.value,size:this.size})}render(t){return new vn(this.value,{type:"middle"})}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const n=re(this.command,this.mode);return n!=null&&n.serialize?n.serialize(this,t):Ji(this.command,this.value)}},uh=class U0 extends Zt{constructor(t){super(F(E({},t),{type:"sizeddelim",value:t.delim})),this.delimType=t.delimType,this.size=t.size}static fromJson(t){return new U0(t)}toJson(){return F(E({},super.toJson()),{delim:this.value,size:this.size,delimType:this.delimType})}render(t){let n=Et(this.value,this.size,t,{classes:{open:"mopen",close:"mclose"}[this.delimType],type:this.delimType,isSelected:this.isSelected});return n?(n=this.bind(t,n),this.caret&&(n.caret=this.caret),n):null}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const n=re(this.command,this.mode);return n!=null&&n.serialize?n.serialize(this,t):Ji(this.command,this.value)}},Vu=class G0 extends Zt{constructor(t,n,i,o){var c,f;super({type:"enclose",command:t,style:o.style}),this.body=n,this.backgroundcolor=o.backgroundcolor,i.updiagonalarrow&&(i.updiagonalstrike=!1),i.box&&(i.left=!1,i.right=!1,i.bottom=!1,i.top=!1),this.notation=i,this.shadow=(c=o.shadow)!=null?c:"none",this.strokeWidth=(f=o.strokeWidth)!=null?f:"0.06em",this.strokeWidth||(this.strokeWidth="0.06em"),this.strokeStyle=o.strokeStyle,this.svgStrokeStyle=o.svgStrokeStyle,this.strokeColor=o.strokeColor,this.borderStyle=o.borderStyle,this.padding=o.padding,this.captureSelection=!1}static fromJson(t){return new G0(t.command,t.body,t.notation,t)}toJson(){return F(E({},super.toJson()),{notation:this.notation,shadow:this.shadow,strokeWidth:this.strokeWidth,strokeStyle:this.strokeStyle,svgStrokeStyle:this.svgStrokeStyle,strokeColor:this.strokeColor,borderStyle:this.borderStyle,padding:this.padding})}_serialize(t){var n;if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const i=re(this.command,this.mode);if(i!=null&&i.serialize)return i.serialize(this,t);let o=(n=this.command)!=null?n:"";if(this.command==="\\enclose"){o+="{"+Object.keys(this.notation).join(" ")+"}";let c="",f="";this.backgroundcolor&&this.backgroundcolor!=="transparent"&&(c+=f+'mathbackground="'+this.backgroundcolor+'"',f=","),this.shadow&&this.shadow!=="auto"&&(c+=f+'shadow="'+this.shadow+'"',f=","),this.strokeWidth||this.strokeStyle!=="solid"?(c+=f+this.borderStyle,f=","):this.strokeColor&&this.strokeColor!=="currentColor"&&(c+=f+'mathcolor="'+this.strokeColor+'"',f=","),c&&(o+=`[${c}]`)}return Ji(o,this.bodyToLatex(t))}render(t){const n=new xi({parent:t},this.style),i=Zt.createBox(n,this.body);if(!i)return null;const o=up(this.borderStyle),c=n.toEm(!this.padding||this.padding==="auto"?{register:"fboxsep"}:{string:this.padding});i.setStyle("position","relative"),i.setStyle("display","inline-block"),i.setStyle("top",c,"em"),i.setStyle("height",i.height+i.depth,"em"),i.setStyle("width",i.width,"em");const f=new vn(null,{classes:"ML__notation"});let b=i.height+i.depth+2*c;const C=i.width+2*c;let k="";if(this.notation.horizontalstrike&&(k+=this.line(3,50,97,50)),this.notation.verticalstrike&&(k+=this.line(50,3,50,97)),this.notation.updiagonalstrike&&(k+=this.line(3,97,97,3)),this.notation.downdiagonalstrike&&(k+=this.line(3,3,97,97)),this.notation.updiagonalarrow){k+=this.line(c.toString(),(c+i.depth+i.height).toString(),(c+i.width).toString(),c.toString());const Je=.03*Math.sqrt(C*C+b*b)*1,Ot=i.width*Je,bn=(i.depth+i.height)*Je,Dt=c+i.width;let en=c;en+bn-.4*Ot<0&&(en=.4*Ot-bn),k+='<polygon points="',k+=`${Dt},${en} ${Dt-Ot-.4*bn},${en+bn-.4*Ot} `,k+=`${Dt-.7*Ot},${en+.7*bn} ${Dt-Ot+.4*bn},${en+bn+.4*Ot} `,k+=`${Dt},${en}`,k+=`" stroke='none' fill="${this.strokeColor}"`,k+="/>"}let $=0;if(this.notation.phasorangle){const Me=dh(n),We=(i.height+i.depth+2*Me+c).toString(),Je=(i.height+i.depth)/2;k+=this.line(c.toString(),We,(c+Je+i.width).toString(),We),k+=this.line(c.toString(),We,(c+Je).toString(),(c-Me).toString()),b+=Me,$=Je,i.left+=b/2-c}if(this.notation.longdiv){const Me=dh(n);b+=Me,k+=this.line(c.toString(),c.toString(),(c+i.width).toString(),c.toString());const We=.3;$=We+Me,i.left+=We+Me,i.setTop(c+Me),k+='<path d="',k+=`M ${c} ${c} a${We} ${(i.depth+i.height+2*Me)/2}, 0, 1, 1, 0 ${i.depth+i.height+2*Me} "`,k+=` stroke-width="${dp(n)}" stroke="${this.strokeColor}" fill="none"`,k+="/>"}if(f.width=i.width+2*c+$,f.height=i.height+c,f.depth=i.depth+c,f.setStyle("box-sizing","border-box"),f.setStyle("left",`calc(-${o} / 2 )`),f.setStyle("height",`${Math.floor(100*b)/100}em`),f.setStyle("top",`calc(${o} / 2 )`),this.backgroundcolor&&f.setStyle("background-color",this.backgroundcolor),this.notation.box&&f.setStyle("border","1px solid red"),this.notation.actuarial&&(f.setStyle("border-top",this.borderStyle),f.setStyle("border-right",this.borderStyle)),this.notation.madruwb&&(f.setStyle("border-bottom",this.borderStyle),f.setStyle("border-right",this.borderStyle)),this.notation.roundedbox&&(f.setStyle("border-radius","8px"),f.setStyle("border",this.borderStyle)),this.notation.circle&&(f.setStyle("border-radius","50%"),f.setStyle("border",this.borderStyle)),this.notation.top&&f.setStyle("border-top",this.borderStyle),this.notation.left&&f.setStyle("border-left",this.borderStyle),this.notation.right&&f.setStyle("border-right",this.borderStyle),this.notation.bottom&&f.setStyle("border-bottom",this.borderStyle),k){let Me="";this.shadow==="auto"&&(Me+="filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)"),this.shadow!=="none"&&(Me+=`filter: drop-shadow(${this.shadow})`),Me+=` stroke-width="${this.strokeWidth}" stroke="${this.strokeColor}"`,Me+=' stroke-linecap="round"',this.svgStrokeStyle&&(Me+=` stroke-dasharray="${this.svgStrokeStyle}"`),f.svgStyle=Me,f.svgOverlay=k}const ne=new vn([f,i]);return ne.setStyle("position","relative"),ne.setStyle("vertical-align",c,"em"),ne.setStyle("height",`${Math.floor(100*(i.height+i.depth+2*c))/100}em`),ne.setStyle("display","inline-block"),ne.height=f.height,ne.depth=f.depth,ne.width=f.width-2*c,ne.left=c,ne.right=c,this.caret&&(ne.caret=this.caret),ne.wrap(n)}line(t,n,i,o){return`<line x1="${Ld(t)}" y1="${Ld(n)}" x2="${Ld(i)}" y2="${Ld(o)}" vector-effect="non-scaling-stroke"></line>`}};function Ld(e){return typeof e=="number"?`${Math.floor(100*e)/100}%`:e}function up(e){if(!e)return"1px";const t=e.match(/([0-9][a-zA-Z\%]+)/);return t===null?"1px":t[1]}function dp(e){return(Math.floor(100*e.metrics.sqrtRuleThickness/e.scalingFactor)/100/10).toString()+"em"}function dh(e){const t=e.isDisplayStyle?Ga:e.metrics.defaultRuleThickness;return e.metrics.defaultRuleThickness+e.scalingFactor*t/4}var mu=class X0 extends Zt{constructor(t,n,i){var o,c;super(F(E({},i),{type:"genfrac",displayContainsHighlight:!0})),this.above=t,this.below=n,this.hasBarLine=(o=i==null?void 0:i.hasBarLine)!=null?o:!0,this.continuousFraction=(c=i==null?void 0:i.continuousFraction)!=null?c:!1,this.numerPrefix=i==null?void 0:i.numerPrefix,this.denomPrefix=i==null?void 0:i.denomPrefix,this.mathstyleName=i==null?void 0:i.mathstyleName,this.leftDelim=i==null?void 0:i.leftDelim,this.rightDelim=i==null?void 0:i.rightDelim,this.fractionNavigationOrder=i==null?void 0:i.fractionNavigationOrder}static fromJson(t){return new X0(t.above,t.below,t)}toJson(){const t={};return this.continuousFraction&&(t.continuousFraction=!0),this.numerPrefix&&(t.numerPrefix=this.numerPrefix),this.denomPrefix&&(t.denomPrefix=this.denomPrefix),this.leftDelim&&(t.leftDelim=this.leftDelim),this.rightDelim&&(t.rightDelim=this.rightDelim),this.hasBarLine||(t.hasBarLine=!1),this.mathstyleName&&(t.mathstyleName=this.mathstyleName),this.fractionNavigationOrder&&(t.fractionNavigationOrder=this.fractionNavigationOrder),E(E({},super.toJson()),t)}get children(){if(this._children)return this._children;const t=[];if(this.fractionNavigationOrder==="denominator-numerator"){for(const n of this.below)t.push(...n.children),t.push(n);for(const n of this.above)t.push(...n.children),t.push(n)}else{for(const n of this.above)t.push(...n.children),t.push(n);for(const n of this.below)t.push(...n.children),t.push(n)}return this._children=t,t}render(t){var n,i;const o=new xi({parent:t,mathstyle:this.mathstyleName},this.style),c=o.metrics,f=new xi({parent:o,mathstyle:this.continuousFraction?"":"numerator"},this.style),b=this.numerPrefix?new vn([new vn(this.numerPrefix),Zt.createBox(f,this.above)],{isTight:f.isTight,type:"ignore"}):(n=Zt.createBox(f,this.above,{type:"ignore"}))!=null?n:new vn(null,{type:"ignore"}),C=new xi({parent:o,mathstyle:this.continuousFraction?"":"denominator"},this.style),k=this.denomPrefix?new vn([new vn(this.denomPrefix),Zt.createBox(C,this.below,{type:"ignore"})]):(i=Zt.createBox(C,this.below,{type:"ignore"}))!=null?i:new vn(null,{type:"ignore"}),$=this.hasBarLine?c.defaultRuleThickness:0;let ne,Me=0,We;o.isDisplayStyle?(ne=f.metrics.num1,Me=$>0?3*$:7*$,We=C.metrics.denom1):($>0?(ne=f.metrics.num2,Me=$):(ne=f.metrics.num3,Me=3*c.defaultRuleThickness),We=C.metrics.denom2);const Je=[];this.isSelected&&Je.push("ML__selected");const Ot=b.depth,bn=k.height;let Dt;if($<=0){const Mr=ne-Ot-(bn-We);Mr<Me&&(ne+=(Me-Mr)/2,We+=(Me-Mr)/2),Dt=new zi({individualShift:[{box:b,shift:-ne,classes:[...Je,"ML__center"]},{box:k,shift:We,classes:[...Je,"ML__center"]}]}).wrap(o)}else{const Mr=new vn(null,{classes:"ML__frac-line",mode:this.mode,style:this.style});Mr.softWidth=Math.max(b.width,k.width),Mr.height=$/2,Mr.depth=$/2;const Ci=Ua+$/2;ne<Me+Ot+Ci&&(ne=Me+Ot+Ci);const qi=Ua-$/2;We<Me+bn-qi&&(We=Me+bn-qi),Dt=new zi({individualShift:[{box:k,shift:We,classes:[...Je,"ML__center"]},{box:Mr,shift:-qi,classes:Je},{box:b,shift:-ne,classes:[...Je,"ML__center"]}]}).wrap(o)}const en=o.isDisplayStyle?c.delim1:c.delim2,Ln=this.leftDelim?this.bind(t,or("open",this.leftDelim,en,!0,t,{style:this.style,mode:this.mode,isSelected:this.isSelected})):ur(o,"open");let sn=null;this.continuousFraction?sn=new vn(null,{type:"close"}):this.rightDelim?sn=this.bind(t,or("close",this.rightDelim,en,!0,t,{style:this.style,mode:this.mode,isSelected:this.isSelected})):sn=ur(o,"close");const hr=new vn([Ln,Dt,sn],{isTight:o.isTight,type:"inner",classes:"mfrac"}),Lr=this.bind(t,hr);return this.caret&&(Lr.caret=this.caret),this.attachSupsub(t,{base:Lr})}},Ro=class Y0 extends Zt{constructor(t,n){var i;super({type:"latex",value:t,mode:"latex"}),this.isSuggestion=(i=n==null?void 0:n.isSuggestion)!=null?i:!1,this.isError=!1}static fromJson(t){const n=new Y0(t.value);return t.isSuggestion&&(n.isSuggestion=!0),t.isError&&(n.isError=!0),n}toJson(){const t={};return this.isSuggestion&&(t.isSuggestion=!0),this.isError&&(t.isError=!0),E({type:"latex",value:this.value},t)}get computedStyle(){return{}}render(t){const n=new vn(this.value,{classes:this.isSuggestion?"ML__suggestion":this.isError?"ML__error":"",type:"latex",maxFontSize:1});return n?(this.caret&&(n.caret=this.caret),this.bind(t,n)):null}},Uu=class J0 extends Zt{constructor(t){super({type:"latexgroup",mode:"latex"}),this.body=[...t].map(n=>new Ro(n)),this.skipBoundary=!1}static fromJson(t){return new J0("")}toJson(){return super.toJson()}render(t){const n=Zt.createBox(t,this.body);return n?(this.caret&&(n.caret=this.caret),this.bind(t,n)):null}_serialize(t){var n,i;return(i=(n=this.body)==null?void 0:n.map(o=>o.value).join(""))!=null?i:""}},yf=class Q0 extends Zt{constructor(t,n){super(F(E({},n),{type:"extensible-symbol",isFunction:n==null?void 0:n.isFunction})),this.value=t,this.variant=n==null?void 0:n.variant,this.subsupPlacement=n==null?void 0:n.limits}static fromJson(t){return new Q0(t.symbol,t)}toJson(){const t=super.toJson();return this.variant&&(t.variant=this.variant),this.subsupPlacement&&(t.limits=this.subsupPlacement),this.isExtensibleSymbol&&(t.isExtensibleSymbol=!0),this.value&&(t.symbol=this.value),t}render(t){var n;const i=t.isDisplayStyle&&this.value!=="\\smallint",o=new vn(this.value,{fontFamily:i?"Size2-Regular":"Size1-Regular",classes:"op-symbol "+(i?"large-op":"small-op"),type:"op",maxFontSize:t.scalingFactor,isSelected:this.isSelected});if(!o)return null;o.right=o.italic;const c=(o.height-o.depth)/2-Ua*t.scalingFactor,f=o.italic;o.setTop(c);let b=o;if(this.superscript||this.subscript){const C=(n=this.subsupPlacement)!=null?n:"auto";b=C==="over-under"||C==="auto"&&t.isDisplayStyle?this.attachLimits(t,{base:o,baseShift:c,slant:f}):this.attachSupsub(t,{base:o})}return new vn(this.bind(t,b),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(t)}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const n=re(this.command,this.mode);if(n!=null&&n.serialize)return n.serialize(this,t);const i=[];return i.push(this.command),this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&i.push("\\limits"),this.subsupPlacement==="adjacent"&&i.push("\\nolimits"),this.subsupPlacement==="auto"&&i.push("\\displaylimits")),i.push(this.supsubToLatex(t)),ri(i)}},zc=class q0 extends Zt{constructor(t){const n=t.body;super(F(E({},t),{type:"overlap",body:typeof n=="string"?[new Zt({value:n})]:n,style:t==null?void 0:t.style})),this.skipBoundary=!0,this.align=t==null?void 0:t.align,this.boxType=t==null?void 0:t.boxType}static fromJson(t){return new q0(t)}toJson(){const t={};return this.align&&(t.align=this.align),this.boxType&&(t.boxType=this.boxType),E(E({},super.toJson()),t)}render(t){const n=Zt.createBox(t,this.body,{classes:"inner"});return n?(this.caret&&(n.caret=this.caret),this.bind(t,new vn([n,new vn(null,{classes:"fix"})],{classes:this.align==="right"?"rlap":"llap",type:this.boxType}))):null}},il=class ep extends Zt{constructor(t){var n,i,o,c;super({type:"overunder",command:t.command,style:t.style,mode:t.mode,body:t.body,skipBoundary:(n=t.skipBoundary)!=null?n:!0}),this.subsupPlacement=t.supsubPlacement,this.svgAbove=t.svgAbove,this.svgBelow=t.svgBelow,this.svgBody=t.svgBody,this.above=t.above,this.below=t.below,this.boxType=(i=t.boxType)!=null?i:"ord",this.paddedBody=(o=t.paddedBody)!=null?o:!1,this.paddedLabels=(c=t.paddedLabels)!=null?c:!1}static fromJson(t){return new ep(t)}toJson(){const t=super.toJson();return this.skipBoundary||(t.skipBoundary=!1),this.subsupPlacement&&(t.subsupPlacement=this.subsupPlacement),this.svgAbove&&(t.svgAbove=this.svgAbove),this.svgBelow&&(t.svgBelow=this.svgBelow),this.svgBody&&(t.svgBody=this.svgBody),this.boxType!=="ord"&&(t.boxType=this.boxType),this.paddedBody&&(t.paddedBody=!0),this.paddedLabels&&(t.paddedLabels=!0),t}render(t){let n=this.svgBody?ss(this.svgBody):Zt.createBox(t,this.body,{type:"ignore"});const i=new xi({parent:t,mathstyle:"scriptstyle"},this.style);let o=null;this.svgAbove?o=ss(this.svgAbove):this.above&&(o=Zt.createBox(i,this.above,{type:"ignore"}));let c=null;this.svgBelow?c=ss(this.svgBelow):this.below&&(c=Zt.createBox(i,this.below,{type:"ignore"})),this.paddedBody&&(n=new vn([ur(t,"open"),n,ur(t,"close")],{type:"ignore"}));let f=fp(t,{base:n,above:o,below:c,type:this.boxType==="bin"||this.boxType==="rel"?this.boxType:"ord",paddedAboveBelow:this.paddedLabels});return f?(this.subsupPlacement==="over-under"?f=this.attachLimits(t,{base:f,type:f.type}):f=this.attachSupsub(t,{base:f}),this.caret&&(f.caret=this.caret),this.bind(t,f)):null}};function fp(e,t){if(!t.base)return null;if(!t.above&&!t.below){const b=new vn(t.base,{type:t.type});return b.setStyle("position","relative"),b}let n=0;t.above&&(n=e.metrics.bigOpSpacing5);let i=null;const o=t.base,c=0,f=["ML__center"];if(t.paddedAboveBelow&&f.push("ML__label_padding"),t.below&&t.above){const b=e.metrics.bigOpSpacing5+t.below.height+t.below.depth+o.depth+c;i=new zi({bottom:b,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:f},{box:o,classes:["ML__center"]},n,{box:t.above,classes:f},e.metrics.bigOpSpacing5]})}else t.below?i=new zi({top:o.height-c,children:[e.metrics.bigOpSpacing5,{box:t.below,classes:f},{box:o,classes:["ML__center"]}]}):t.above&&(i=new zi({bottom:o.depth+c,children:[{box:o,classes:["ML__center"]},n,{box:t.above,classes:f},e.metrics.bigOpSpacing5]}));return new vn(i,{type:t.type})}var Gu=class tp extends Zt{constructor(t){var n,i,o,c;super(F(E({},t),{type:"phantom"})),this.captureSelection=!0,this.isInvisible=(n=t.isInvisible)!=null?n:!1,this.smashDepth=(i=t.smashDepth)!=null?i:!1,this.smashHeight=(o=t.smashHeight)!=null?o:!1,this.smashWidth=(c=t.smashWidth)!=null?c:!1}static fromJson(t){return new tp(t)}toJson(){const t={};return this.isInvisible&&(t.isInvisible=!0),this.smashDepth&&(t.smashDepth=!0),this.smashHeight&&(t.smashHeight=!0),this.smashWidth&&(t.smashWidth=!0),E(E({},super.toJson()),t)}render(t){const n=new xi({parent:t,isPhantom:!0});if(!this.smashDepth&&!this.smashHeight&&!this.smashWidth)return console.assert(this.isInvisible),Zt.createBox(n,this.body,{classes:"inner"});const i=Zt.createBox(this.isInvisible?n:t,this.body);if(!i)return null;if(this.smashWidth){const o=new vn(null,{classes:"fix"});return new vn([i,o],{classes:"rlap"}).wrap(t)}if(!this.smashHeight&&!this.smashDepth)return i;if(this.smashHeight&&(i.height=0),this.smashDepth&&(i.depth=0),i.children)for(const o of i.children)this.smashHeight&&(o.height=0),this.smashDepth&&(o.depth=0);return new zi({firstBaseline:[{box:i}]},{type:i.type}).wrap(t)}},Xu=class np extends Zt{constructor(t){var n;super(E({type:"spacing"},t)),this.width=t==null?void 0:t.width,this._braced=(n=t==null?void 0:t.braced)!=null?n:!1}static fromJson(t){return new np(t)}toJson(){const t=super.toJson();return this.width!==void 0&&(t.width=this.width),this._braced&&(t.braced=!0),t}render(t){var n;if(this.command==="space")return new vn(this.mode==="math"?null:" ");let i;if(this.width!==void 0)i=new vn(null,{classes:"mspace"}),i.left=t.toEm(this.width);else{const o=(n={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\>":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.command])!=null?n:"mediumspace";i=new vn(null,{classes:o})}return i=this.bind(t,i),this.caret&&(i.caret=this.caret),i}_serialize(t){var n;if(!t.expandMacro&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const i=re(this.command,this.mode);if(i!=null&&i.serialize)return i.serialize(this,t);const o=(n=this.command)!=null?n:"";return this.width===void 0?o:this._braced&&!("register"in this.width)?`${o}{${ka(this.width)}}`:`${o}${ka(this.width)}`}},fh=class rp extends Zt{constructor(t){var n;super(F(E({},t),{type:"surd",mode:(n=t.mode)!=null?n:"math",style:t.style,displayContainsHighlight:!0,body:t.body})),this.above=t.index}static fromJson(t){return new rp(F(E({},t),{index:t.above}))}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const n=re(this.command,this.mode);if(n!=null&&n.serialize)return n.serialize(this,t);const i=this.command,o=this.bodyToLatex(t);return this.above&&!this.hasEmptyBranch("above")?Ji(`${i}[${this.aboveToLatex(t)}]`,o):/^[0-9]$/.test(o)?`${i}${o}`:Ji(i,o)}get children(){if(this._children)return this._children;const t=[];if(this.above)for(const n of this.above)t.push(...n.children),t.push(n);if(this.body)for(const n of this.body)t.push(...n.children),t.push(n);return this._children=t,t}render(t){var n;const i=new xi({parent:t,mathstyle:"cramp"},this.style),o=(n=Zt.createBox(i,this.body,{type:"inner"}))!=null?n:new vn(null),c=i.scalingFactor,f=i.metrics.defaultRuleThickness/c,b=t.isDisplayStyle?Ga:f,C=new vn(null,{classes:"ML__sqrt-line",style:this.style});C.height=f,C.softWidth=o.width;let k=c*(f+b/4);const ne=Math.max(c*2*b,o.height+o.depth)+k+f,Me=new xi({parent:t},this.style),We=this.bind(Me,new vn(or("inner","\\surd",ne,!1,Me,{isSelected:this.isSelected}),{isSelected:this.isSelected,classes:"ML__sqrt-sign",style:this.style}));if(!We)return null;const Je=We.height+We.depth-f;Je>o.height+o.depth+k&&(k=(k+Je-(o.height+o.depth))/2),We.setTop(We.height-o.height-k);const Ot=this.bind(t,new zi({firstBaseline:[{box:new vn(o)},k-2*f,{box:C},f]})),bn=Zt.createBox(new xi({parent:t,mathstyle:"scriptscriptstyle"}),this.above,{type:"ignore"});if(!bn){const Ln=new vn([We,Ot],{classes:this.containsCaret?"ML__contains-caret":"",type:"inner"});return Ln.setStyle("display","inline-block"),Ln.setStyle("height",Ln.height+Ln.depth,"em"),this.caret&&(Ln.caret=this.caret),this.bind(t,Ln)}const Dt=new zi({shift:-.6*(Math.max(We.height,Ot.height)-Math.max(We.depth,Ot.depth)),children:[{box:bn}]}),en=new vn([new vn(Dt,{classes:"ML__sqrt-index",type:"ignore"}),We,Ot],{type:"inner",classes:this.containsCaret?"ML__contains-caret":""});return en.height=We.height,en.depth=We.depth,this.caret&&(en.caret=this.caret),this.bind(t,en)}},hp=class extends vn{constructor(e){super(null,{type:"skip"}),this._width=e}toMarkup(){return`<span style="display:inline-block;width:${Math.ceil(this.width*100)/100}em"></span>`}};function Id(e,t){if(!e.parent)return;const n=e.parent.children,i=n.indexOf(e);let o=i-1;for(;o>=0&&n[o].type==="ignore";)o-=1;if(o<0&&e.parent.parent&&e.parent.type==="lift"){Id(e.parent,t);return}i>0&&n[i-1].type==="skip"?n[i-1].width+=t:n.splice(i,0,new hp(t))}var pp={ord:{op:3,bin:4,rel:5,inner:3},op:{ord:3,op:3,rel:5,inner:3},bin:{ord:4,op:4,open:4,inner:4},rel:{ord:5,op:5,open:5,inner:5},close:{op:3,bin:4,rel:5,inner:3},punct:{ord:3,op:3,rel:3,open:3,punct:3,inner:3},inner:{ord:3,op:3,bin:4,rel:5,open:3,punct:3,inner:3}},mp={ord:{op:3},op:{ord:3,op:3},close:{op:3},inner:{op:3}};function gp(e){Ju(e,(t,n)=>{n.type==="bin"&&(!t||/^(middle|bin|op|rel|open|punct)$/.test(t.type))&&(n.type="ord"),(t==null?void 0:t.type)==="bin"&&/^(rel|close|punct)$/.test(n.type)&&(t.type="ord"),n.type!=="ignore"&&(t=n)})}function Yu(e,t){if(!e.children)return e;const n=e.children;gp(n);const i=t.getRegisterAsEm("thinmuskip"),o=t.getRegisterAsEm("medmuskip"),c=t.getRegisterAsEm("thickmuskip");return Ju(n,(f,b)=>{var C,k,$;if(!f)return;const ne=f.type,Me=b.isTight?(C=mp[ne])!=null?C:null:(k=pp[ne])!=null?k:null,We=($=Me==null?void 0:Me[b.type])!=null?$:null;We===3&&Id(b,i),We===4&&Id(b,o),We===5&&Id(b,c)}),e}function Ju(e,t,n=void 0){if(!e)return n;e=[...e];for(const i of e)i.type==="lift"?n=Ju(i.children,t,n):i.type==="ignore"?Ju(i.children,t):(t(n,i),Ju(i.children,t),n=i);return n}var bf=class ip extends Zt{constructor(t){super({type:"tooltip",command:t.command,mode:t.mode,style:t.style,body:t.body,displayContainsHighlight:!0}),this.tooltip=new Zt({type:"root",mode:t.content,body:t.tooltip,style:{}}),this.skipBoundary=!0,this.captureSelection=!1}static fromJson(t){return new ip(F(E({},t),{tooltip:bc(t.tooltip)}))}toJson(){var t;const n=(t=this.tooltip.body)==null?void 0:t.filter(i=>i.type!=="first").map(i=>i.toJson());return F(E({},super.toJson()),{tooltip:n})}render(t){const n=Zt.createBox(new xi,this.body);if(!n)return null;const i=new xi({parent:t,mathstyle:"displaystyle"},{fontSize:Vi}),o=fc(Yu(new vn(this.tooltip.render(i),{classes:"ML__tooltip-content"}),i)),c=new vn([o,n],{classes:"ML__tooltip-container"});return this.caret&&(c.caret=this.caret),this.bind(t,c)}},Fc=class ap extends Zt{constructor(t,n){super(F(E({},n),{type:"operator",isFunction:n==null?void 0:n.isFunction})),this.value=t,this.variant=n==null?void 0:n.variant,this.variantStyle=n==null?void 0:n.variantStyle,this.subsupPlacement=n==null?void 0:n.limits}static fromJson(t){return new ap(t.symbol,t)}toJson(){const t=super.toJson();return this.variant&&(t.variant=this.variant),this.variantStyle&&(t.variantStyle=this.variantStyle),this.subsupPlacement&&(t.limits=this.subsupPlacement),this.value&&(t.symbol=this.value),t}render(t){var n;const i=new vn(this.value,{type:"op",mode:"math",maxFontSize:t.scalingFactor,style:{variant:this.variant,variantStyle:this.variantStyle},isSelected:this.isSelected,letterShapeStyle:t.letterShapeStyle});let o=i;if(this.superscript||this.subscript){const c=(n=this.subsupPlacement)!=null?n:"auto";o=c==="over-under"||c==="auto"&&t.isDisplayStyle?this.attachLimits(t,{base:i}):this.attachSupsub(t,{base:i})}return new vn(this.bind(t,o),{type:"op",caret:this.caret,isSelected:this.isSelected,classes:"op-group"}).wrap(t)}_serialize(t){if(!(t.expandMacro||t.skipStyles||t.skipPlaceholders)&&typeof this.verbatimLatex=="string")return this.verbatimLatex;const n=re(this.command,this.mode);if(n!=null&&n.serialize)return n.serialize(this,t);const i=[this.command];return this.explicitSubsupPlacement&&(this.subsupPlacement==="over-under"&&i.push("\\limits"),this.subsupPlacement==="adjacent"&&i.push("\\nolimits"),this.subsupPlacement==="auto"&&i.push("\\displaylimits")),i.push(this.supsubToLatex(t)),ri(i)}};function bc(e){if(G(e))return e.map(i=>bc(i));if(typeof e=="string")return Zt.fromJson(e);e=E({},e);for(const i of mc)e[i]&&(e[i]=bc(e[i]));e.args&&(e.args=vp(e.args)),e.array&&(e.array=bc(e.array));const t=e.type;let n;t==="accent"&&(n=a.fromJson(e)),t==="array"&&(n=Ur.fromJson(e)),t==="box"&&(n=Ya.fromJson(e)),t==="chem"&&(n=lh.fromJson(e)),t==="composition"&&(n=Yl.fromJson(e)),t==="delim"&&(n=ch.fromJson(e)),t==="enclose"&&(n=Vu.fromJson(e)),t==="error"&&(n=cs.fromJson(e)),t==="extensible-symbol"&&(n=yf.fromJson(e)),t==="genfrac"&&(n=mu.fromJson(e)),t==="group"&&(n=Eo.fromJson(e)),t==="latex"&&(n=Ro.fromJson(e)),t==="latexgroup"&&(n=Uu.fromJson(e)),t==="leftright"&&(n=Oi.fromJson(e)),t==="macro"&&(n=pu.fromJson(e)),t==="macro-argument"&&(n=bl.fromJson(e)),t==="operator"&&(n=Fc.fromJson(e)),t==="overlap"&&(n=zc.fromJson(e)),t==="overunder"&&(n=il.fromJson(e)),t==="placeholder"&&(n=Dr.fromJson(e)),t==="prompt"&&(n=$l.fromJson(e)),t==="phantom"&&(n=Gu.fromJson(e)),t==="sizeddelim"&&(n=uh.fromJson(e)),t==="spacing"&&(n=Xu.fromJson(e)),t==="subsup"&&(n=rl.fromJson(e)),t==="surd"&&(n=fh.fromJson(e)),t==="text"&&(n=vl.fromJson(e)),t==="tooltip"&&(n=bf.fromJson(e)),n||(console.assert(!t||["first","mbin","mrel","mclose","minner","mop","mopen","mord","mpunct","root","space"].includes(t),`MathLive 0.98.5: an unexpected atom type "${t}" was encountered. Add new atom constructors to \`fromJson()\` in "atom.ts"`),n=Zt.fromJson(e));for(const i of mc)e[i]&&n.setChildren(e[i],i);return e.verbatimLatex!==void 0&&(n.verbatimLatex=e.verbatimLatex),e.subsupPlacement&&(n.subsupPlacement=e.subsupPlacement),e.explicitSubsupPlacement&&(n.explicitSubsupPlacement=!0),e.isFunction&&(n.isFunction=!0),e.isExtensibleSymbol&&(n.isExtensibleSymbol=!0),e.skipBoundary&&(n.skipBoundary=!0),e.captureSelection&&(n.captureSelection=!0),n}function vp(e){if(e&&Array.isArray(e))return e.map(t=>t==="<null>"?null:typeof t=="object"&&"group"in t?{group:t.group.map(n=>bc(n))}:typeof t=="object"&&"atoms"in t?t.atoms.map(n=>bc(n)):t)}var hh={main:["Main-Regular","ML__cmr"],"main-italic":["Main-Italic","ML__cmr ML__it"],"main-bold":["Main-Bold","ML__cmr ML__bold"],"main-bolditalic":["Main-BoldItalic","ML__cmr ML__bold ML__it"],normal:["Main-Regular","ML__cmr"],"normal-bold":["Main-Bold","ML__mathbf"],"normal-italic":["Math-Italic","ML__mathit"],"normal-bolditalic":["Math-BoldItalic","ML__mathbfit"],ams:["AMS-Regular","ML__ams"],"ams-bold":["AMS-Regular","ML__ams"],"ams-italic":["AMS-Regular","ML__ams"],"ams-bolditalic":["AMS-Regular","ML__ams"],"sans-serif":["SansSerif-Regular","ML__sans"],"sans-serif-bold":["SansSerif-Regular","ML__sans ML__bold"],"sans-serif-italic":["SansSerif-Regular","ML__sans"],"sans-serif-bolditalic":["SansSerif-Regular","ML__sans"],calligraphic:["Caligraphic-Regular","ML__cal"],"calligraphic-bold":["Caligraphic-Regular","ML__cal ML__bold"],"calligraphic-italic":["Caligraphic-Regular","ML__cal ML__it"],"calligraphic-bolditalic":["Caligraphic-Regular","ML__cal ML__bold ML__it"],script:["Script-Regular","ML__script"],"script-bold":["Script-Regular","ML__script ML__bold"],"script-italic":["Script-Regular","ML__script ML__it"],"script-bolditalic":["Script-Regular","ML__script ML__bold ML__it"],fraktur:["Fraktur-Regular","ML__frak"],"fraktur-bold":["Fraktur-Regular","ML__frak"],"fraktur-italic":["Fraktur-Regular","ML__frak"],"fraktur-bolditalic":["Fraktur-Regular","ML__frak"],monospace:["Typewriter-Regular","ML__tt"],"monospace-bold":["Typewriter-Regular","ML__tt ML__bold"],"monospace-italic":["Typewriter-Regular","ML__tt ML__it"],"monospace-bolditalic":["Typewriter-Regular","ML__tt ML__bold ML__it"],"double-struck":["AMS-Regular","ML__bb"],"double-struck-bold":["AMS-Regular","ML__bb"],"double-struck-italic":["AMS-Regular","ML__bb"],"double-struck-bolditalic":["AMS-Regular","ML__bb"]},xf={"double-struck":/^[A-Z ]$/,script:/^[A-Z ]$/,calligraphic:/^[\dA-Z ]$/,fraktur:/^[\dA-Za-z ]$|^[!"#$%&'()*+,\-./:;=?[]^’‘]$/,monospace:/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/,"sans-serif":/^[\dA-Za-z ]$|^[!"&'()*+,\-./:;=?@[\]^_~\u0131\u0237\u0393\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A8\u03A9]$/},ph=/^[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5]$/,yp=/^[\u0393|\u0394\u0398\u039B\u039E\u03A0\u03A3\u03A5\u03A6\u03A8\u03A9]$/,bp=[/^[a-z]$/,/^[A-Z]$/,ph,yp],xp={iso:["it","it","it","it"],tex:["it","it","it","up"],french:["it","up","up","up"],upright:["up","up","up","up"]},Sp=class extends jo{constructor(){super("math")}createAtom(e,t,n){var i,o,c,f;if(t===null)return new Zt({type:"mord",mode:"math",command:e,value:e,style:n});const b=window.MathfieldElement.isFunction((i=t.command)!=null?i:e);if(t.definitionType==="symbol"){const k=new Zt({type:(o=t.type)!=null?o:"mord",mode:"math",command:(c=t.command)!=null?c:e,value:String.fromCodePoint(t.codepoint),style:n});return b&&(k.isFunction=!0),e.startsWith("\\")&&(k.verbatimLatex=e),k}const C=new Zt({type:"mord",mode:"math",command:(f=t.command)!=null?f:e,value:e,style:n});return b&&(C.isFunction=!0),e.startsWith("\\")&&(C.verbatimLatex=e),C}serialize(e,t){const n=Cp(e,F(E({},t),{defaultMode:"math"}));return n.length===0||t.defaultMode!=="text"?n:["$ ",...n," $"]}getFont(e,t){console.assert(t.variant!==void 0);let{variant:n}=t,{variantStyle:i}=t;n==="normal"&&!i&&/[\u00A3\u0131\u0237]/.test(e.value)&&(n="main",i="italic"),n==="normal"&&!i&&e.value.length===1&&bp.forEach((b,C)=>{var k;b.test(e.value)&&xp[(k=t.letterShapeStyle)!=null?k:"tex"][C]==="it"&&(i="italic")}),i==="up"&&(i=void 0);const o=i?n+"-"+i:n;console.assert(hh[o]!==void 0);const[c,f]=hh[o];return xf[n]&&!xf[n].test(e.value)?(e.value=Qe(e.value,n,i),null):(ph.test(e.value)&&(e.classes+=" lcGreek"),f&&(e.classes+=" "+f),c)}};function Cp(e,t){const{parent:n}=e[0],i=mh(n);return Ma(e,"variant").map(o=>{const c=mh(o[0]);let f="";c&&c!==i&&(f={calligraphic:"\\mathcal",fraktur:"\\mathfrak","double-struck":"\\mathbb",script:"\\mathscr",monospace:"\\mathtt","sans-serif":"\\mathsf",normal:"\\mathrm","normal-italic":"\\mathnormal","normal-bold":"\\mathbf","normal-bolditalic":"\\mathbfit",ams:"","ams-italic":"\\mathit","ams-bold":"\\mathbf","ams-bolditalic":"\\mathbfit",main:"","main-italic":"\\mathit","main-bold":"\\mathbf","main-bolditalic":"\\mathbfit"}[c],console.assert(f!==void 0));const b=ri(o.map(C=>C._serialize(t)));return f?Ji(f,b):b})}function mh(e){if(!e)return"";const{style:t}=e;if(t.variant===void 0)return"";let n=t.variant;return!["calligraphic","fraktur","double-struck","script","monospace","sans-serif"].includes(t.variant)&&t.variantStyle&&t.variantStyle!=="up"&&(n+="-"+t.variantStyle),n}new Sp;function wp(e,t){return e.map(n=>n._serialize(t))}function Mp(e,t){return Ma(e,"fontShape").map(n=>{const i=wp(n,t),{fontShape:o}=n[0].style;let c="";return o==="it"&&(c="\\textit"),o==="sl"&&(c="\\textsl"),o==="sc"&&(c="\\textsc"),o==="n"&&(c="\\textup"),!c&&o?`{${Ji("\\fontshape",o)}${ri(i)}}`:c?Ji(c,ri(i)):ri(i)})}function kp(e,t){return Ma(e,"fontSeries").map(n=>{const i=Mp(n,t),{fontSeries:o}=n[0].style;let c="";return o==="b"&&(c="\\textbf"),o==="l"&&(c="\\textlf"),o==="m"&&(c="\\textmd"),o&&!c?`{${Ji("\\fontseries",o)}${ri(i)}}`:c?Ji(c,ri(i)):ri(i)})}function Ep(e,t){return Ma(e,"fontSize").map(n=>{var i,o;const c=kp(n,t),f=(o=["","\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"][(i=n[0].style.fontSize)!=null?i:""])!=null?o:"";return f?`${f} ${ri(c)}`:ri(c)})}function _p(e,t,n){return Ma(e,"fontFamily").map(i=>{var o,c;const f=Ep(i,t),b=(c={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[(o=i[0].style.fontFamily)!=null?o:""])!=null?c:"";return b?`\\${b}{${ri(f)}}`:i[0].style.fontFamily?`{\\fontfamily{${i[0].style.fontFamily}} ${ri(f)}}`:n?`\\text{${ri(f)}}`:ri(f)})}var gh={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"},Lp=class extends jo{constructor(){super("text")}createAtom(e,t,n){return t&&t.definitionType==="symbol"?new vl(e,String.fromCodePoint(t.codepoint),n!=null?n:{}):null}serialize(e,t){return _p(e,F(E({},t),{defaultMode:"text"}),t.defaultMode!=="text")}getFont(e,t){var n,i,o,c,f;const{fontFamily:b}=t;if(gh[b]?e.classes+=" "+gh[b]:b&&e.setStyle("font-family",b),t.fontShape&&(e.classes+=" ",e.classes+=(n={it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[t.fontShape])!=null?n:""),t.fontSeries){const C=t.fontSeries.match(/(.?[lbm])?(.?[cx])?/);C&&(e.classes+=" ",e.classes+=(o={ul:"ML__series_ul",el:"ML__series_el",l:"ML__series_l",sl:"ML__series_sl",m:"",sb:"ML__series_sb",b:"ML__bold",eb:"ML__series_eb",ub:"ML__series_ub"}[(i=C[1])!=null?i:""])!=null?o:"",e.classes+=" ",e.classes+=(f={uc:"ML__series_uc",ec:"ML__series_ec",c:"ML__series_c",sc:"ML__series_sc",n:"",sx:"ML__series_sx",x:"ML__series_x",ex:"ML__series_ex",ux:"ML__series_ux"}[(c=C[2])!=null?c:""])!=null?f:"")}return"Main-Regular"}};new Lp;var Ip=class extends jo{constructor(){super("latex")}createAtom(e){return new Ro(e)}serialize(e,t){return e.filter(n=>n instanceof Ro&&!n.isSuggestion).map(n=>n.value)}getFont(){return null}};new Ip;var Tp={id:"dvorak",locale:"en",displayName:"Dvorak",virtualLayout:"dvorak",platform:"",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["x","X","\u2248","\u02DB"],KeyC:["j","J","\u2206","\xD4"],KeyD:["e","E","\xB4","\xB4"],KeyE:[".",">","\u2265","\u02D8"],KeyF:["u","U","\xA8","\xA8"],KeyG:["i","I","\u02C6","\u02C6"],KeyH:["d","D","\u2202","\xCE"],KeyI:["c","C","\xE7","\xC7"],KeyJ:["h","H","\u02D9","\xD3"],KeyK:["t","T","\u2020","\u02C7"],KeyL:["n","N","\u02DC","\u02DC"],KeyM:["m","M","\xB5","\xC2"],KeyN:["b","B","\u222B","\u0131"],KeyO:["r","R","\xAE","\u2030"],KeyP:["l","L","\xAC","\xD2"],KeyQ:["'",'"',"\xE6","\xC6"],KeyR:["p","P","\u03C0","\u220F"],KeyS:["o","O","\xF8","\xD8"],KeyT:["y","Y","\xA5","\xC1"],KeyU:["g","G","\xA9","\u02DD"],KeyV:["k","K","\u02DA","\uF8FF"],KeyW:[",","<","\u2264","\xAF"],KeyX:["q","Q","\u0153","\u0152"],KeyY:["f","F","\u0192","\xCF"],KeyZ:[";",":","\u2026","\xDA"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["[","{","\u201C","\u201D"],Equal:["]","}","\u2018","\u2019"],BracketLeft:["/","?","\xF7","\xBF"],BracketRight:["=","+","\u2260","\xB1"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:["s","S","\xDF","\xCD"],Quote:["-","_","\u2013","\u2014"],Backquote:["`","~","`","`"],Comma:["w","W","\u2211","\u201E"],Period:["v","V","\u221A","\u25CA"],Slash:["z","Z","\u03A9","\xB8"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},Sf={id:"apple.en-intl",displayName:"English (international)",virtualLayout:"qwerty",platform:"apple",locale:"en",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u0131"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\xCE"],KeyE:["e","E","\xB4","\xB4"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\u02DD"],KeyH:["h","H","\u02D9","\xD3"],KeyI:["i","I","\u02C6","\u02C6"],KeyJ:["j","J","\u2206","\xD4"],KeyK:["k","K","\u02DA","\uF8FF"],KeyL:["l","L","\xAC","\xD2"],KeyM:["m","M","\xB5","\xC2"],KeyN:["n","N","\u02DC","\u02DC"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE","\u2030"],KeyS:["s","S","\xDF","\xCD"],KeyT:["t","T","\u2020","\u02C7"],KeyU:["u","U","\xA8","\xA8"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\u02DB"],KeyY:["y","Y","\xA5","\xC1"],KeyZ:["z","Z","\u03A9","\xB8"],Digit1:["1","!","\xA1","\u2044"],Digit2:["2","@","\u2122","\u20AC"],Digit3:["3","#","\xA3","\u2039"],Digit4:["4","$","\xA2","\u203A"],Digit5:["5","%","\u221E","\uFB01"],Digit6:["6","^","\xA7","\uFB02"],Digit7:["7","&","\xB6","\u2021"],Digit8:["8","*","\u2022","\xB0"],Digit9:["9","(","\xAA","\xB7"],Digit0:["0",")","\xBA","\u201A"],Space:[" "," "," "," "],Minus:["-","_","\u2013","\u2014"],Equal:["=","+","\u2260","\xB1"],BracketLeft:["[","{","\u201C","\u201D"],BracketRight:["]","}","\u2018","\u2019"],Backslash:["\\","|","\xAB","\xBB"],Semicolon:[";",":","\u2026","\xDA"],Quote:["'",'"',"\xE6","\xC6"],Backquote:["`","\u02DC","`","`"],Comma:[",","<","\u2264","\xAF"],Period:[".",">","\u2265","\u02D8"],Slash:["/","?","\xF7","\xBF"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["\xA7","\xB1","\xA7","\xB1"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}},vh={id:"windows.en-intl",displayName:"English (international)",platform:"windows",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","\xE1","\xC1"],KeyB:["b","B","",""],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\xE9","\xC9"],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","\xED","\xCD"],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","\xF8","\xD8"],KeyM:["m","M","\xB5",""],KeyN:["n","N","\xF1","\xD1"],KeyO:["o","O","\xF3","\xD3"],KeyP:["p","P","\xF6","\xD6"],KeyQ:["q","Q","\xE4","\xC4"],KeyR:["r","R","\xAE",""],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\xFE","\xDE"],KeyU:["u","U","\xFA","\xDA"],KeyV:["v","V","",""],KeyW:["w","W","\xE5","\xC5"],KeyX:["x","X","",""],KeyY:["y","Y","\xFC","\xDC"],KeyZ:["z","Z","\xE6","\xC6"],Digit1:["1","!","\xA1","\xB9"],Digit2:["2","@","\xB2",""],Digit3:["3","#","\xB3",""],Digit4:["4","$","\xA4","\xA3"],Digit5:["5","%","\u20AC",""],Digit6:["6","^","\xBC",""],Digit7:["7","&","\xBD",""],Digit8:["8","*","\xBE",""],Digit9:["9","(","\u2018",""],Digit0:["0",")","\u2019",""],Space:[" "," ","",""],Minus:["-","_","\xA5",""],Equal:["=","+","\xD7","\xF7"],BracketLeft:["[","{","\xAB",""],BracketRight:["]","}","\xBB",""],Backslash:["\\","|","\xAC","\xA6"],Semicolon:[";",":","\xB6","\xB0"],Quote:["'",'"',"\xB4","\xA8"],Backquote:["`","~","",""],Comma:[",","<","\xE7","\xC7"],Period:[".",">","",""],Slash:["/","?","\xBF",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["\\","|","",""]}},yh={id:"linux.en",displayName:"English",platform:"linux",virtualLayout:"qwerty",locale:"en",score:0,mapping:{KeyA:["a","A","a","A"],KeyB:["b","B","b","B"],KeyC:["c","C","c","C"],KeyD:["d","D","d","D"],KeyE:["e","E","e","E"],KeyF:["f","F","f","F"],KeyG:["g","G","g","G"],KeyH:["h","H","h","H"],KeyI:["i","I","i","I"],KeyJ:["j","J","j","J"],KeyK:["k","K","k","K"],KeyL:["l","L","l","L"],KeyM:["m","M","m","M"],KeyN:["n","N","n","N"],KeyO:["o","O","o","O"],KeyP:["p","P","p","P"],KeyQ:["q","Q","q","Q"],KeyR:["r","R","r","R"],KeyS:["s","S","s","S"],KeyT:["t","T","t","T"],KeyU:["u","U","u","U"],KeyV:["v","V","v","V"],KeyW:["w","W","w","W"],KeyX:["x","X","x","X"],KeyY:["y","Y","y","Y"],KeyZ:["z","Z","z","Z"],Digit1:["1","!","1","!"],Digit2:["2","@","2","@"],Digit3:["3","#","3","#"],Digit4:["4","$","4","$"],Digit5:["5","%","5","%"],Digit6:["6","^","6","^"],Digit7:["7","&","7","&"],Digit8:["8","*","8","*"],Digit9:["9","(","9","("],Digit0:["0",")","0",")"],Space:[" "," "," "," "],Minus:["-","_","-","_"],Equal:["=","+","=","+"],BracketLeft:["[","{","[","{"],BracketRight:["]","}","]","}"],Backslash:["\\","|","\\","|"],Semicolon:[";",":",";",":"],Quote:["'",'"',"'",'"'],Backquote:["`","~","`","~"],Comma:[",","<",",","<"],Period:[".",">",".",">"],Slash:["/","?","/","?"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}},Dp={id:"apple.french",locale:"fr",displayName:"French",platform:"apple",virtualLayout:"azerty",score:0,mapping:{KeyA:["q","Q","\u2021","\u03A9"],KeyB:["b","B","\xDF","\u222B"],KeyC:["c","C","\xA9","\xA2"],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\xEA","\xCA"],KeyF:["f","F","\u0192","\xB7"],KeyG:["g","G","\uFB01","\uFB02"],KeyH:["h","H","\xCC","\xCE"],KeyI:["i","I","\xEE","\xEF"],KeyJ:["j","J","\xCF","\xCD"],KeyK:["k","K","\xC8","\xCB"],KeyL:["l","L","\xAC","|"],KeyM:[",","?","\u221E","\xBF"],KeyN:["n","N","~","\u0131"],KeyO:["o","O","\u0153","\u0152"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xAE","\u201A"],KeyS:["s","S","\xD2","\u2211"],KeyT:["t","T","\u2020","\u2122"],KeyU:["u","U","\xBA","\xAA"],KeyV:["v","V","\u25CA","\u221A"],KeyW:["z","Z","\xC2","\xC5"],KeyX:["x","X","\u2248","\u2044"],KeyY:["y","Y","\xDA","\u0178"],KeyZ:["w","W","\u2039","\u203A"],Digit1:["&","1","\uF8FF","\xB4"],Digit2:["\xE9","2","\xEB","\u201E"],Digit3:['"',"3","\u201C","\u201D"],Digit4:["'","4","\u2018","\u2019"],Digit5:["(","5","{","["],Digit6:["\xA7","6","\xB6","\xE5"],Digit7:["\xE8","7","\xAB","\xBB"],Digit8:["!","8","\xA1","\xDB"],Digit9:["\xE7","9","\xC7","\xC1"],Digit0:["\xE0","0","\xF8","\xD8"],Space:[" "," "," "," "],Minus:[")","\xB0","}","]"],Equal:["-","_","\u2014","\u2013"],BracketLeft:["^","\xA8","\xF4","\xD4"],BracketRight:["$","*","\u20AC","\xA5"],Backslash:["`","\xA3","@","#"],Semicolon:["m","M","\xB5","\xD3"],Quote:["\xF9","%","\xD9","\u2030"],Backquote:["<",">","\u2264","\u2265"],Comma:[";",".","\u2026","\u2022"],Period:[":","/","\xF7","\\"],Slash:["=","+","\u2260","\xB1"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",".",",","."],IntlBackslash:["@","#","\u2022","\u0178"],NumpadEqual:["=","=","=","="]}},$p={id:"windows.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"windows",score:0,mapping:{KeyA:["q","Q","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:[",","?","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["a","A","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["z","Z","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["w","W","",""],Digit1:["&","1","",""],Digit2:["\xE9","2","~",""],Digit3:['"',"3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["\xE8","7","`",""],Digit8:["_","8","\\",""],Digit9:["\xE7","9","^",""],Digit0:["\xE0","0","@",""],Space:[" "," ","",""],Minus:[")","\xB0","]",""],Equal:["=","+","}",""],BracketLeft:["^","\xA8","",""],BracketRight:["$","\xA3","\xA4",""],Backslash:["*","\xB5","",""],Semicolon:["m","M","",""],Quote:["\xF9","%","",""],Backquote:["\xB2","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","\xA7","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},Pp={id:"linux.french",locale:"fr",displayName:"French",virtualLayout:"azerty",platform:"linux",score:0,mapping:{KeyA:["q","Q","@","\u03A9"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:[",","?","\u0301","\u030B"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["a","A","\xE6","\xC6"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["z","Z","\xAB","<"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["w","W","\u0142","\u0141"],Digit1:["&","1","\xB9","\xA1"],Digit2:["\xE9","2","~","\u215B"],Digit3:['"',"3","#","\xA3"],Digit4:["'","4","{","$"],Digit5:["(","5","[","\u215C"],Digit6:["-","6","|","\u215D"],Digit7:["\xE8","7","`","\u215E"],Digit8:["_","8","\\","\u2122"],Digit9:["\xE7","9","^","\xB1"],Digit0:["\xE0","0","@","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:[")","\xB0","]","\xBF"],Equal:["=","+","}","\u0328"],BracketLeft:["\u0302","\u0308","\u0308","\u030A"],BracketRight:["$","\xA3","\xA4","\u0304"],Backslash:["*","\xB5","\u0300","\u0306"],Semicolon:["m","M","\xB5","\xBA"],Quote:["\xF9","%","\u0302","\u030C"],Backquote:["\xB2","~","\xAC","\xAC"],Comma:[";",".","\u2500","\xD7"],Period:[":","/","\xB7","\xF7"],Slash:["!","\xA7","\u0323","\u0307"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"]}},Op={id:"apple.german",locale:"de",displayName:"German",virtualLayout:"qwertz",platform:"apple",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\u222B","\u2039"],KeyC:["c","C","\xE7","\xC7"],KeyD:["d","D","\u2202","\u2122"],KeyE:["e","E","\u20AC","\u2030"],KeyF:["f","F","\u0192","\xCF"],KeyG:["g","G","\xA9","\xCC"],KeyH:["h","H","\xAA","\xD3"],KeyI:["i","I","\u2044","\xDB"],KeyJ:["j","J","\xBA","\u0131"],KeyK:["k","K","\u2206","\u02C6"],KeyL:["l","L","@","\uFB02"],KeyM:["m","M","\xB5","\u02D8"],KeyN:["n","N","~","\u203A"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\xAB","\xBB"],KeyR:["r","R","\xAE","\xB8"],KeyS:["s","S","\u201A","\xCD"],KeyT:["t","T","\u2020","\u02DD"],KeyU:["u","U","\xA8","\xC1"],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\u2211","\u201E"],KeyX:["x","X","\u2248","\xD9"],KeyY:["z","Z","\u03A9","\u02C7"],KeyZ:["y","Y","\xA5","\u2021"],Digit1:["1","!","\xA1","\xAC"],Digit2:["2",'"',"\u201C","\u201D"],Digit3:["3","\xA7","\xB6","#"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","[","\uFB01"],Digit6:["6","&","]","^"],Digit7:["7","/","|","\\"],Digit8:["8","(","{","\u02DC"],Digit9:["9",")","}","\xB7"],Digit0:["0","=","\u2260","\xAF"],Space:[" "," "," "," "],Minus:["\xDF","?","\xBF","\u02D9"],Equal:["\xB4","`","'","\u02DA"],BracketLeft:["\xFC","\xDC","\u2022","\xB0"],BracketRight:["+","*","\xB1","\uF8FF"],Backslash:["#","'","\u2018","\u2019"],Semicolon:["\xF6","\xD6","\u0153","\u0152"],Quote:["\xE4","\xC4","\xE6","\xC6"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u221E","\u02DB"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",",",".","."],IntlBackslash:["^","\xB0","\u201E","\u201C"],NumpadEqual:["=","=","=","="]}},Ap={id:"windows.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","\xB5",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","@",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["z","Z","",""],KeyZ:["y","Y","",""],Digit1:["1","!","",""],Digit2:["2",'"',"\xB2",""],Digit3:["3","\xA7","\xB3",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["\xDF","?","\\","\u1E9E"],Equal:["\xB4","`","",""],BracketLeft:["\xFC","\xDC","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["\xF6","\xD6","",""],Quote:["\xE4","\xC4","",""],Backquote:["^","\xB0","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}},Bp={id:"linux.german",locale:"de",displayName:"German",platform:"windows",virtualLayout:"qwertz",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201C","\u2018"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0323","\u0307"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","\u201D","\u2019"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\u017F","\u1E9E"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201E","\u201A"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xAB","\u2039"],KeyY:["z","Z","\u2190","\xA5"],KeyZ:["y","Y","\xBB","\u203A"],Digit1:["1","!","\xB9","\xA1"],Digit2:["2",'"',"\xB2","\u215B"],Digit3:["3","\xA7","\xB3","\xA3"],Digit4:["4","$","\xBC","\xA4"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["\xDF","?","\\","\xBF"],Equal:["\u0301","\u0300","\u0327","\u0328"],BracketLeft:["\xFC","\xDC","\u0308","\u030A"],BracketRight:["+","*","~","\xAF"],Backslash:["#","'","\u2019","\u0306"],Semicolon:["\xF6","\xD6","\u030B","\u0323"],Quote:["\xE4","\xC4","\u0302","\u030C"],Backquote:["\u0302","\xB0","\u2032","\u2033"],Comma:[",",";","\xB7","\xD7"],Period:[".",":","\u2026","\xF7"],Slash:["-","_","\u2013","\u2014"],PrintScreen:["","","",""],PageUp:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",",","",","],IntlBackslash:["<",">","|","\u0331"],AltRight:["\r","\r","\r","\r"],MetaRight:[".",".",".","."]}},Np={id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE5","\xC5"],KeyB:["b","B","\xDF",""],KeyC:["c","C","\xA9"," "],KeyD:["d","D","\u2202","\u2206"],KeyE:["e","E","\u20AC","\u20AC"],KeyF:["f","F","\u0192","\uFB01"],KeyG:["g","G","\uF8FF","\uFB02"],KeyH:["h","H","\u2122"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","\xB6","\xAF"],KeyK:["k","K","\xA7","\u02C7"],KeyL:["l","L"," ","\u02D8"],KeyM:["m","M","\xB5","\u02DA"],KeyN:["n","N"," ","\u02D9"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\u03C0","\u220F"],KeyQ:["q","Q","\u0153","\u0152"],KeyR:["r","R","\xAE"," "],KeyS:["s","S","\u222B"," "],KeyT:["t","T","\u2020","\u2021"],KeyU:["u","U"," "," "],KeyV:["v","V","\u221A","\u25CA"],KeyW:["w","W","\xE6","\xC6"],KeyX:["x","X","\u2211","\u203A"],KeyY:["y","Y","\xA5"," "],KeyZ:["z","Z","\u03A9","\u2039"],Digit1:["1","!","|","\u0131"],Digit2:["2",'"',"@","\u02DD"],Digit3:["3","\xB7","#","\u2022"],Digit4:["4","$","\xA2","\xA3"],Digit5:["5","%","\u221E","\u2030"],Digit6:["6","&","\xAC"," "],Digit7:["7","/","\xF7","\u2044"],Digit8:["8","(","\u201C","\u2018"],Digit9:["9",")","\u201D","\u2019"],Digit0:["0","=","\u2260","\u2248"],Space:[" "," "," "," "],Minus:["'","?","\xB4","\xB8"],Equal:["\xA1","\xBF","\u201A","\u02DB"],BracketLeft:["`","^","[","\u02C6"],BracketRight:["+","*","]","\xB1"],Backslash:["\xE7","\xC7","}","\xBB"],Semicolon:["\xF1","\xD1","~","\u02DC"],Quote:["\xB4","\xA8","{","\xAB"],Backquote:["<",">","\u2264","\u2265"],Comma:[",",";","\u201E",""],Period:[".",":","\u2026","\u2026"],Slash:["-","_","\u2013","\u2014"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[",",",",",",","],IntlBackslash:["\xBA","\xAA","\\","\xB0"]}},Rp={id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","\u20AC",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","\xB7","#",""],Digit4:["4","$","~",""],Digit5:["5","%","\u20AC",""],Digit6:["6","&","\xAC",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["\xA1","\xBF","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["\xE7","\xC7","}",""],Semicolon:["\xF1","\xD1","",""],Quote:["\xB4","\xA8","{",""],Backquote:["\xBA","\xAA","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}},zp={id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",virtualLayout:"qwerty",score:0,mapping:{KeyA:["a","A","\xE6","\xC6"],KeyB:["b","B","\u201D","\u2019"],KeyC:["c","C","\xA2","\xA9"],KeyD:["d","D","\xF0","\xD0"],KeyE:["e","E","\u20AC","\xA2"],KeyF:["f","F","\u0111","\xAA"],KeyG:["g","G","\u014B","\u014A"],KeyH:["h","H","\u0127","\u0126"],KeyI:["i","I","\u2192","\u0131"],KeyJ:["j","J","\u0309","\u031B"],KeyK:["k","K","\u0138","&"],KeyL:["l","L","\u0142","\u0141"],KeyM:["m","M","\xB5","\xBA"],KeyN:["n","N","n","N"],KeyO:["o","O","\xF8","\xD8"],KeyP:["p","P","\xFE","\xDE"],KeyQ:["q","Q","@","\u03A9"],KeyR:["r","R","\xB6","\xAE"],KeyS:["s","S","\xDF","\xA7"],KeyT:["t","T","\u0167","\u0166"],KeyU:["u","U","\u2193","\u2191"],KeyV:["v","V","\u201C","\u2018"],KeyW:["w","W","\u0142","\u0141"],KeyX:["x","X","\xBB",">"],KeyY:["y","Y","\u2190","\xA5"],KeyZ:["z","Z","\xAB","<"],Digit1:["1","!","|","\xA1"],Digit2:["2",'"',"@","\u215B"],Digit3:["3","\xB7","#","\xA3"],Digit4:["4","$","~","$"],Digit5:["5","%","\xBD","\u215C"],Digit6:["6","&","\xAC","\u215D"],Digit7:["7","/","{","\u215E"],Digit8:["8","(","[","\u2122"],Digit9:["9",")","]","\xB1"],Digit0:["0","=","}","\xB0"],Enter:["\r","\r","\r","\r"],Escape:["\x1B","\x1B","\x1B","\x1B"],Backspace:["\b","\b","\b","\b"],Tab:[" ",""," ",""],Space:[" "," "," "," "],Minus:["'","?","\\","\xBF"],Equal:["\xA1","\xBF","\u0303","~"],BracketLeft:["\u0300","\u0302","[","\u030A"],BracketRight:["+","*","]","\u0304"],Backslash:["\xE7","\xC7","}","\u0306"],Semicolon:["\xF1","\xD1","~","\u030B"],Quote:["\u0301","\u0308","{","{"],Backquote:["\xBA","\xAA","\\","\\"],Comma:[",",";","\u2500","\xD7"],Period:[".",":","\xB7","\xF7"],Slash:["-","_","\u0323","\u0307"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadEnter:["\r","\r","\r","\r"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","\xA6"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}};function bh(e){const t=e.split("+"),n={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:t.pop()};return t.includes("shift")&&(n.shift=!0),t.includes("alt")&&(n.alt=!0),t.includes("ctrl")&&(n.ctrl=!0),t.includes("cmd")&&(n.cmd=!0),t.includes("win")&&(n.win=!0),t.includes("meta")&&(n.meta=!0),n}function gu(e){let t="";return e.shift&&(t+="shift+"),e.alt&&(t+="alt+"),e.ctrl&&(t+="ctrl+"),e.cmd&&(t+="cmd+"),e.win&&(t+="win+"),e.meta&&(t+="meta+"),t+e.key}var Fp={enter:"[Enter]",escape:"[Escape]",backspace:"[Backspace]",tab:"[Tab]",space:"[Space]",pausebreak:"[Pause]",insert:"[Insert]",home:"[Home]",pageup:"[PageUp]",delete:"[Delete]",end:"[End]",pagedown:"[PageDown]",right:"[ArrowRight]",left:"[ArrowLeft]",down:"[ArrowDown]",up:"[ArrowUp]",numpad0:"[Numpad0]",numpad1:"[Numpad1]",numpad2:"[Numpad2]",numpad3:"[Numpad3]",numpad4:"[Numpad4]",numpad5:"[Numpad5]",numpad6:"[Numpad6]",numpad7:"[Numpad7]",numpad8:"[Numpad8]",numpad9:"[Numpad9]",numpad_divide:"[NumpadDivide]",numpad_multiply:"[NumpadMultiply]",numpad_subtract:"[NumpadSubtract]",numpad_add:"[NumpadAdd]",numpad_decimal:"[NumpadDecimal]",numpad_separator:"[NumpadComma]",capslock:"[Capslock]",f1:"[F1]",f2:"[F2]",f3:"[F3]",f4:"[F4]",f5:"[F5]",f6:"[F6]",f7:"[F7]",f8:"[F8]",f9:"[F9]",f10:"[F10]",f11:"[F11]",f12:"[F12]",f13:"[F13]",f14:"[F14]",f15:"[F15]",f16:"[F16]",f17:"[F17]",f18:"[F18]",f19:"[F19]"},Qu=[],qu;function Cf(){switch(_e()){case"macos":case"ios":return"apple";case"windows":return"windows"}return"linux"}function Us(e){(!e.platform||e.platform===Cf())&&Qu.push(e)}function Kp(e,t){var n;const i={shift:!1,alt:!1,cmd:!1,win:!1,meta:!1,ctrl:!1,key:""};if(!e)return i;for(const[o,c]of Object.entries(t.mapping)){if(c[0]===e)return i.key=`[${o}]`,i;if(c[1]===e)return i.shift=!0,i.key=`[${o}]`,i;if(c[2]===e)return i.alt=!0,i.key=`[${o}]`,i;if(c[3]===e)return i.shift=!0,i.alt=!0,i.key=`[${o}]`,i}return i.key=(n=Fp[e])!=null?n:"",i}function Hp(e){if(e.code)return e;const t=Object.entries(ed().mapping);let n=!1,i=!1,o="";for(let c=0;c<4;c++){for(const[f,b]of t)if(b[c]===e.key){o=f,c===3?(n=!0,i=!0):c===2?n=!0:c===1&&(i=!0);break}if(o)break}return new KeyboardEvent(e.type,F(E({},e),{altKey:n,shiftKey:i,code:o}))}function Zp(e){var t,n;if(!e||e.key==="Unidentified"||e.key==="Dead")return;const i=e.shiftKey&&e.altKey?3:e.altKey?2:e.shiftKey?1:0;for(const o of Qu)((t=o.mapping[e.code])==null?void 0:t[i])===e.key?o.score+=1:(n=o.mapping[e.code])!=null&&n[i]&&(o.score=0);Qu.sort((o,c)=>c.score-o.score)}function Wp(e){qu=Qu.find(t=>e.startsWith(t.locale))}function ed(){return qu!=null?qu:Qu[0]}function jp(){switch(Cf()){case"apple":return Sf;case"windows":return vh;case"linux":return yh}return Sf}switch(Cf()){case"apple":Us(Sf),Us(Dp),Us(Np),Us(Op);break;case"windows":Us(vh),Us($p),Us(Rp),Us(Ap);break;case"linux":Us(yh),Us(Pp),Us(zp),Us(Bp);break}Us(Tp);function wf(e){var t;const n=/macos|ios/.test(_e()),i=e.split("+");let o="";for(const c of i)o&&(o+=n?"\u2009":'<span class="ML__shortcut-join">+</span>'),c.startsWith("[Key")?o+=c.slice(4,5):c.startsWith("Key")?o+=c.slice(3,4):c.startsWith("[Digit")?o+=c.slice(6,7):c.startsWith("Digit")?o+=c.slice(5,6):o+=(t={cmd:"\u2318",meta:n?"\u2318":"Ctrl",shift:n?"\u21E7":"Shift",alt:n?"\u2325":"Alt",ctrl:n?"\u2303":"Ctrl","\n":n?"\u23CE":"Return","[return]":n?"\u23CE":"Return","[enter]":n?"\u2324":"Enter","[tab]":n?"\u21E5":"Tab","[escape]":"Esc","[backspace]":n?"\u232B":"Backspace","[delete]":n?"\u2326":"Del","[pageup]":n?"\u21DE":"Page Up","[pagedown]":n?"\u21DF":"Page Down","[home]":n?"\u2912":"Home","[end]":n?"\u2913":"End","[space]":"Space","[equal]":"=","[minus]":"-","[comma]":",","[slash]":"/","[backslash]":"\\","[bracketleft]":"[","[bracketright]":"]",semicolon:";",period:".",comma:",",minus:"-",equal:"=",quote:"'",backslash:"\\",intlbackslash:"\\",backquote:"`",slash:"/",numpadmultiply:"* 🔢",numpaddivide:"/ 🔢",numpadsubtract:"- 🔢",numpadadd:"+ 🔢",numpaddecimal:". 🔢",numpadcomma:", 🔢",help:"help",left:"\u21E0",up:"\u21E1",right:"\u21E2",down:"\u21E3","[arrowleft]":"\u21E0","[arrowup]":"\u21E1","[arrowright]":"\u21E2","[arrowdown]":"\u21E3"}[c.toLowerCase()])!=null?t:c.toUpperCase();return o}function Td(e){if(e instanceof MouseEvent||e instanceof PointerEvent)return{x:e.clientX,y:e.clientY};if(e instanceof TouchEvent){const t=[...e.touches].reduce((i,o)=>({x:i.x+o.clientX,y:i.y+o.clientY}),{x:0,y:0}),n=e.touches.length;return{x:t.x/n,y:t.y/n}}}function Kc(e){const t={alt:!1,control:!1,shift:!1,meta:!1};return(e instanceof MouseEvent||e instanceof PointerEvent||e instanceof TouchEvent||e instanceof KeyboardEvent)&&(e.altKey&&(t.alt=!0),e.ctrlKey&&(t.control=!0),e.metaKey&&(t.meta=!0),e.shiftKey&&(t.shift=!0)),t}function Vp(e,t){return!e&&t||e&&!t?!1:!e||!t?!0:e.alt===t.alt&&e.control===t.control&&e.shift===t.shift&&e.meta===t.meta}var Up=new Set(["Backquote","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","Minus","Equal","IntlYen","KeyQ","KeyW","KeyE","KeyR","KeyT","KeyY","KeyU","KeyI","KeyO","KeyP","BracketLeft","BracketRight","Backslash","KeyA","KeyS","KeyD","KeyF","KeyG","KeyH","KeyJ","KeyK","KeyL","Semicolon","Quote","IntlBackslash","KeyZ","KeyX","KeyC","KeyV","KeyB","KeyN","KeyM","Comma","Period","Slash","IntlRo","Space","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadAdd","NumpadComma","NumpadDecimal","NumpadDivide","NumpadEqual","NumpadHash","NumpadMultiply","NumpadParenLeft","NumpadParenRight","NumpadStar","NumpadSubstract"]);function Dd(e){return e.ctrlKey||e.metaKey||["Dead","Process"].includes(e.key)?!1:e.code===""?!0:Up.has(e.code)}function $d(){var e;let t=document.activeElement;for(;(e=t==null?void 0:t.shadowRoot)!=null&&e.activeElement;)t=t.shadowRoot.activeElement;return t}var Pl=class tc{static get scrim(){return tc._scrim||(tc._scrim=new tc),tc._scrim}static open(t){tc.scrim.open(t)}static close(){tc.scrim.close()}static get state(){return tc.scrim.state}static get element(){return tc.scrim.element}constructor(t){var n,i;this.lightDismiss=(n=t==null?void 0:t.lightDismiss)!=null?n:!0,this.translucent=(i=t==null?void 0:t.translucent)!=null?i:!1,this.state="closed"}get element(){if(this._element)return this._element;const t=document.createElement("div");return t.setAttribute("role","presentation"),t.style.position="fixed",t.style.contain="content",t.style.top="0",t.style.left="0",t.style.right="0",t.style.bottom="0",t.style.zIndex="var(--scrim-zindex, 10099)",t.style.outline="none",this.translucent?(t.style.background="rgba(255, 255, 255, .2)",t.style.backdropFilter="contrast(40%)"):t.style.background="transparent",this._element=t,t}open(t){var n;if(this.state!=="closed")return;this.state="opening",this.onDismiss=t==null?void 0:t.onDismiss,this.savedActiveElement=$d();const{element:i}=this;((n=t==null?void 0:t.root)!=null?n:document.body).appendChild(i),i.addEventListener("click",this),document.addEventListener("touchmove",this,!1),document.addEventListener("scroll",this,!1);const o=window.innerWidth-document.documentElement.clientWidth;this.savedMarginRight=document.body.style.marginRight,this.savedOverflow=document.body.style.overflow,document.body.style.overflow="hidden";const c=Number.parseFloat(getComputedStyle(document.body).marginRight);document.body.style.marginRight=`${c+o}px`,t!=null&&t.child&&i.append(t.child),this.state="open"}close(){var t,n,i,o;if(this.state!=="open"){console.assert(this.element.parentElement!==null);return}this.state="closing",typeof this.onDismiss=="function"&&this.onDismiss(),this.onDismiss=void 0;const{element:c}=this;c.removeEventListener("click",this),document.removeEventListener("touchmove",this,!1),document.removeEventListener("scroll",this,!1),c.remove(),document.body.style.overflow=(t=this.savedOverflow)!=null?t:"",document.body.style.marginRight=(n=this.savedMarginRight)!=null?n:"",$d()!==this.savedActiveElement&&((o=(i=this.savedActiveElement)==null?void 0:i.focus)==null||o.call(i)),c.innerHTML="",this.state="closed"}handleEvent(t){this.lightDismiss&&(t.target===this._element&&t.type==="click"?(this.close(),t.preventDefault(),t.stopPropagation()):t.target===document&&(t.type==="touchmove"||t.type==="scroll")&&(this.close(),t.preventDefault(),t.stopPropagation()))}};function Gp(e,t,n){let i=null,o=null,c=!1,f=!1,b=!1;const C=new AbortController,k=C.signal;return e.addEventListener("keydown",$=>{if(c||$.key==="Process"||$.code==="CapsLock"||/(Control|Meta|Alt|Shift)(Left|Right)/.test($.code)){i=null;return}i=$,o=null,n.onKeystroke($)?e.textContent="":i=null},{capture:!0,signal:k}),e.addEventListener("keypress",$=>{c||(i&&o&&n.onKeystroke(i),o=$)},{capture:!0,signal:k}),e.addEventListener("compositionstart",$=>{e.textContent="",c=!0,n.onCompositionStart($.data)},{capture:!0,signal:k}),e.addEventListener("compositionupdate",$=>{c&&n.onCompositionUpdate($.data)},{capture:!0,signal:k}),e.addEventListener("compositionend",$=>{e.textContent="",c&&(c=!1,n.onCompositionEnd($.data))},{capture:!0,signal:k}),e.addEventListener("beforeinput",$=>$.stopImmediatePropagation(),{signal:k}),e.addEventListener("input",$=>{var ne;if(!c&&(e.textContent="",$.inputType!=="insertCompositionText")){if($.inputType==="insertFromPaste"){$.preventDefault(),$.stopPropagation();return}n.onInput((ne=$.data)!=null?ne:""),$.preventDefault(),$.stopPropagation()}},{signal:k}),e.addEventListener("paste",$=>{e.focus({preventScroll:!0}),e.textContent="",n.onPaste($)||$.preventDefault(),$.stopImmediatePropagation()},{signal:k}),e.addEventListener("cut",$=>n.onCut($),{capture:!0,signal:k}),e.addEventListener("copy",$=>n.onCopy($),{capture:!0,signal:k}),e.addEventListener("blur",$=>{var ne,Me;if(((Me=(ne=$.relatedTarget)==null?void 0:ne._mathfield)==null?void 0:Me.element)===t){e.focus({preventScroll:!0}),$.preventDefault(),$.stopPropagation();return}const We=Pl.state;if(We==="open"||We==="opening"){$.preventDefault(),$.stopPropagation();return}if($.relatedTarget===$.target.getRootNode().host){$.preventDefault(),$.stopPropagation();return}b||f||(b=!0,i=null,o=null,n.onBlur(),b=!1)},{capture:!0,signal:k}),e.addEventListener("focus",$=>{b||f||(f=!0,n.onFocus(),f=!1)},{capture:!0,signal:k}),{dispose:()=>C.abort(),cancelComposition:()=>{c&&(e.blur(),requestAnimationFrame(()=>e.focus({preventScroll:!0})))},blur:()=>{typeof e.blur=="function"&&e.blur()},focus:()=>{!f&&typeof e.focus=="function"&&e.focus({preventScroll:!0})},hasFocus:()=>$d()===e,setAriaLabel:$=>e.setAttribute("aria-label",$),setValue:$=>{var ne;e.textContent=$,e.style.left="-1000px",(ne=window.getSelection())==null||ne.selectAllChildren(e)},moveTo:($,ne)=>{e.style.top=`${ne}px`,e.style.left=`${$}px`}}}function vu(e){var t;if(!e||!Dd(e))return"";let n;return e.key==="Unidentified"&&e.target&&(n=e.target.value),n=(t=n!=null?n:e.key)!=null?t:e.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(n)&&(n=""),n}function xh(e){e=Hp(e);const t=[];return e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),t.length===0?`[${e.code}]`:(t.push(`[${e.code}]`),t.join("+"))}function Xp(e){if(ke()){const t=_e(),n=e.startsWith("!"),i=e.endsWith(t);if(n&&!i||!n&&i)return!0}return e==="!other"?!1:e==="other"}function Yp(e,t,n){if(e.length===0)return"";const i=gu(bh(xh(n))),o=gu({key:n.key,shift:n.shiftKey,alt:n.altKey,ctrl:n.ctrlKey,meta:n.metaKey||n.ctrlKey&&/macos|ios/.test(_e()),cmd:!1,win:!1});for(let c=e.length-1;c>=0;c--)if((e[c].key===i||e[c].key===o)&&(!e[c].ifMode||e[c].ifMode===t))return e[c].command;return""}function Sh(e){let t=e;return G(t)&&(t=t.length>0?t[0]+"("+t.slice(1).join("")+")":""),t}function Jp(e,t){let n=[];if(typeof t=="string"){const c=Fu[t];G(c)?n=c.slice():c&&n.push(c)}const i=Sh(t),o=new RegExp("^"+i.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");for(const c of e)o.test(Sh(c.command))&&n.push(c.key);return n.map(wf)}function Qp(e,t){if(e.ifPlatform&&!/^!?(macos|windows|android|ios|chromeos|other)$/.test(e.ifPlatform))throw new Error(`Unexpected platform "${e.ifPlatform}" for keybinding ${e.key}`);if(e.ifLayout!==void 0&&(t.score===0||!e.ifLayout.includes(t.id)))return;const n=bh(e.key);let i=e.ifPlatform;if(n.cmd){if(i&&i!=="macos"&&i!=="ios")throw new Error('Unexpected "cmd" modifier with platform "'+i+`"
|
|
|
"cmd" modifier can only be used with macOS or iOS platform.`);i||(i=_e()==="ios"?"ios":"macos"),n.win=!1,n.cmd=!1,n.meta=!0}if(n.win){if(i&&i!=="windows")throw new Error('Unexpected "win" modifier with platform "'+i+`"
|
|
|
"win" modifier can only be used with Windows platform.`);i="windows",n.win=!1,n.cmd=!1,n.meta=!0}if(i&&!Xp(i))return;if(/^\[.+\]$/.test(n.key))return F(E({},e),{key:gu(n)});const o=Kp(n.key,t);if(!o)return F(E({},e),{key:gu(n)});if(o.shift&&n.shift||o.alt&&n.alt)throw new Error(`The keybinding ${e.key} (${Mf(e.command)}) is conflicting with the key combination ${gu(o)} using the ${t.displayName} keyboard layout`);return o.shift=o.shift||n.shift,o.alt=o.alt||n.alt,o.meta=n.meta,o.ctrl=n.ctrl,F(E({},e),{key:gu(o)})}function Mf(e){if(Array.isArray(e)){const t=[...e];return t.shift()+"("+t.map(n=>typeof n=="string"?`"${n}"`:n.toString()).join(", ")+")"}return e}function qp(e,t){const n=[],i=[];for(const o of e)try{const c=Qp(o,t);if(!c)continue;const f=i.find(b=>b.key===c.key&&b.ifMode===c.ifMode);if(f)throw new Error(`Ambiguous key binding ${o.key} (${Mf(o.command)}) matches ${f.key} (${Mf(f.command)}) with the ${t.displayName} keyboard layout`);i.push(c)}catch(c){c instanceof Error&&n.push(c.message)}return[i,n]}var em=class extends jr{constructor(){super("latex")}createAtom(e){return new Ro(e)}onPaste(e,t){if(!t)return!1;const n=typeof t=="string"?t:t.getData("application/x-latex")||t.getData("text/plain");return n&&e.model.contentWillChange({inputType:"insertFromPaste",data:n})?(e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,n)&&(e.startRecording(),e.snapshot("paste"),e.model.contentDidChange({inputType:"insertFromPaste"}),za(e)),e.startRecording(),!0):!1}insert(e,t,n){if(!e.contentWillChange({data:t,inputType:"insertText"}))return!1;n||(n={}),n.insertionMode||(n.insertionMode="replaceSelection"),n.selectionMode||(n.selectionMode="placeholder");const{silenceNotifications:i}=e;n.silenceNotifications&&(e.silenceNotifications=!0);const o=e.silenceNotifications;e.silenceNotifications=!0,n.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(ko(e.selection)):n.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):n.insertionMode==="insertBefore"?e.collapseSelection("backward"):n.insertionMode==="insertAfter"&&e.collapseSelection("forward");const c=[];for(const C of t)h.test(C)&&c.push(new Ro(C));let f=e.at(e.position);if(f instanceof Uu&&(f=f.lastChild),!(f.parent instanceof Uu)){const C=new Uu("");f.parent.addChildAfter(C,f),f=C.firstChild}const b=f.parent.addChildrenAfter(c,f);return e.silenceNotifications=o,n.selectionMode==="before"||(n.selectionMode==="item"?e.setSelection(e.anchor,e.offsetOf(b)):b&&(e.position=e.offsetOf(b))),e.contentDidChange({data:t,inputType:"insertText"}),e.silenceNotifications=i,!0}};function tm(e){return e.atoms.find(t=>t.type==="latexgroup")}function td(e){var t,n;const i=e.atoms.find(o=>o.type==="latexgroup");return i?(n=(t=i.body)==null?void 0:t.filter(o=>o.type==="latex"))!=null?n:[]:[]}function Ch(e,t){var n;let i=0,o=!1;const c=Number.isFinite(t==null?void 0:t.before)?(n=t==null?void 0:t.before)!=null?n:0:e.lastOffset;for(;i<=c&&!o;){const C=e.at(i);o=C instanceof Ro&&C.isSuggestion,o||i++}if(!o)return[void 0,void 0];let f=i,b=!1;for(;f<=c&&!b;){const C=e.at(f);b=!(C instanceof Ro&&C.isSuggestion),b||f++}return[i-1,f-1]}new em;function Pd(e){const t=td(e.model).filter(n=>n.isSuggestion);if(t.length!==0){e.model.position=e.model.offsetOf(t[0].leftSibling);for(const n of t)n.parent.removeChild(n)}}function nd(e,t){var n;const{model:i}=e;Pd(e);for(const $ of td(i))$.isError=!1;if(!i.selectionIsCollapsed||e.options.popoverPolicy==="off"){bu(e);return}const o=[];let c=i.at(i.position);for(;c&&c instanceof Ro&&/^[a-zA-Z\*]$/.test(c.value);)c=c.leftSibling;if(c&&c instanceof Ro&&c.value==="\\")for(o.push(c),c=c.rightSibling;c&&c instanceof Ro&&/^[a-zA-Z\*]$/.test(c.value);)o.push(c),c=c.rightSibling;const f=o.map($=>$.value).join(""),b=I(e,f);if(b.length===0){if(/^\\[a-zA-Z\*]+$/.test(f))for(const $ of o)$.isError=!0;bu(e);return}const C=(n=t==null?void 0:t.atIndex)!=null?n:0;e.suggestionIndex=C<0?b.length-1:C%b.length;const k=b[e.suggestionIndex];if(k!==f){const $=o[o.length-1];$.parent.addChildrenAfter([...k.slice(f.length-k.length)].map(ne=>new Ro(ne,{isSuggestion:!0})),$),Hc(e,{interactive:!0})}rm(e,b)}function wh(e){const[t,n]=Ch(e,{before:e.position});if(t===void 0||n===void 0)return!1;let i=!1;return e.getAtoms([t,n]).forEach(o=>{o.isSuggestion&&(o.isSuggestion=!1,i=!0)}),i}function yu(e,t="accept",n){var i,o;bu(e);const c=tm(e.model);if(!c)return!1;if(t==="accept-suggestion"||t==="accept-all"){const k=td(e.model).filter($=>$.isSuggestion);if(k.length!==0){for(const $ of k)$.isSuggestion=!1;e.model.position=e.model.offsetOf(k[k.length-1])}if(t==="accept-suggestion")return k.length!==0}const b=td(e.model).filter(k=>!k.isSuggestion).map(k=>k.value).join(""),C=c.leftSibling;return c.parent.removeChild(c),e.model.position=e.model.offsetOf(C),e.switchMode((i=n==null?void 0:n.mode)!=null?i:"math"),t==="reject"||(jr.insert(e.model,b,{selectionMode:(o=n==null?void 0:n.selectItem)!=null&&o?"item":"placeholder",format:"latex",mode:"math"}),e.snapshot(),e.model.announce("replacement"),e.switchMode("math")),!0}function Od(e){var t;let n=document.getElementById(e);return n?n.dataset.refcount=Number(Number.parseInt((t=n.dataset.refcount)!=null?t:"0")+1).toString():(n=document.createElement("div"),n.setAttribute("aria-hidden","true"),n.dataset.refcount="1",n.id=e,document.body.append(n)),n}function kf(e){var t;const n=document.getElementById(e);if(!n)return;const i=Number.parseInt((t=n.getAttribute("data-refcount"))!=null?t:"0");i<=1?n.remove():n.dataset.refcount=Number(i-1).toString()}function nm(e,t){const n=new xi({from:e.context}),i=new Zt({mode:"math",type:"root",body:_o(t,{context:n})}),o=fc(Yu(new vn(i.render(n),{classes:"ML__base"}),n));return hc(o,{classes:"ML__latex"}).toMarkup()}function rm(e,t){var n;if(t.length===0){bu(e);return}let i="";for(const[c,f]of t.entries()){const b=f,C=nm(e,f),k=Jp(e.keybindings,b).join("<br>");i+=`<li role="button" data-command="${b}" ${c===e.suggestionIndex?"class=ML__popover__current":""}><span class="ML__popover__latex">${b}</span><span class="ML__popover__command">${C}</span>`,k&&(i+=`<span class="ML__popover__keybinding">${k}</span>`),i+="</li>"}const o=im(e,`<ul>${i}</ul>`);Ef()&&((n=o.querySelector(".ML__popover__current"))==null||n.scrollIntoView({block:"nearest",inline:"nearest"})),setTimeout(()=>{var c;o&&!Ef()&&(o.classList.add("is-visible"),Ad(e),(c=o.querySelector(".ML__popover__current"))==null||c.scrollIntoView({block:"nearest",inline:"nearest"}))},32)}function Ef(){const e=document.getElementById("mathlive-suggestion-popover");return e?e.classList.contains("is-visible"):!1}function Ad(e,t){var n;if(!e.element||e.element.mathfield!==e||!Ef())return;if(((n=e.model.at(e.model.position))==null?void 0:n.type)!=="latex"){bu(e);return}if(t!=null&&t.deferred){setTimeout(()=>Ad(e),32);return}const i=Dl(e.field);if(!i)return;const o=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=window.innerWidth-document.documentElement.clientWidth,b=window.innerHeight-document.documentElement.clientHeight,C=window.mathVirtualKeyboard.boundingRect.height,k=document.getElementById("mathlive-suggestion-popover");i.x+k.offsetWidth/2>c-f?k.style.left=`${c-k.offsetWidth-f}px`:i.x-k.offsetWidth/2<0?k.style.left="0":k.style.left=`${i.x-k.offsetWidth/2}px`;const $=i.y-i.height;o-b-C-i.y<$?(k.classList.add("ML__popover--reverse-direction"),k.classList.remove("top-tip"),k.classList.add("bottom-tip"),k.style.top=`${i.y-i.height-k.offsetHeight-15}px`):(k.classList.remove("ML__popover--reverse-direction"),k.classList.add("top-tip"),k.classList.remove("bottom-tip"),k.style.top=`${i.y+15}px`)}function bu(e){e.suggestionIndex=0;const t=document.getElementById("mathlive-suggestion-popover");t&&(t.classList.remove("is-visible"),t.innerHTML="")}function im(e,t){let n=document.getElementById("mathlive-suggestion-popover");return n||(n=Od("mathlive-suggestion-popover"),Ds("suggestion-popover"),Ds("core"),n.addEventListener("pointerdown",i=>i.preventDefault()),n.addEventListener("click",i=>{let o=i.target;for(;o&&!o.dataset.command;)o=o.parentElement;o&&(yu(e,"reject"),jr.insert(e.model,o.dataset.command,{selectionMode:"placeholder",format:"latex",mode:"math"}),e.dirty=!0,e.focus())})),n.innerHTML=window.MathfieldElement.createHTML(t),n}function am(){document.getElementById("mathlive-suggestion-popover")&&(kf("mathlive-suggestion-popover"),r("suggestion-popover"),r("core"))}function om(){const e=String(new Error().stack).replace(/^Error.*\n/,"").split(`
|
|
|
`);if(e.length===0)return console.error(`Can't use relative paths to specify assets location because the sourcefile location could not be determined (unexpected stack trace format "${new Error().stack}").`),"";let t=e[1],n=t.match(/http.*\.ts[\?:]/);return n&&(t=e[2]),n=t.match(/(https?:.*):[0-9]+:[0-9]+/),n||(n=t.match(/at (.*(\.ts))[\?:]/),n||(n=t.match(/at (.*(\.mjs|\.js))[\?:]/))),n?n[1]:(console.error(e),console.error(`Can't use relative paths to specify assets location because the source file location could not be determined (unexpected location "${t}").`),"")}var Bd=null,Mh,kh,_f=((kh=(Mh=globalThis==null?void 0:globalThis.document)==null?void 0:Mh.currentScript)==null?void 0:kh.src)||om();function Eh(e){return Mc(this,null,function*(){if(/^(?:[a-z+]+:)?\/\//i.test(e))return new URL(e).href;if(Bd===null)try{const t=yield fetch(_f,{method:"HEAD"});t.status===200&&(Bd=t.url)}catch(t){console.error(`Invalid URL "${e}" (relative to "${_f}")`)}return new URL(e,Bd!=null?Bd:_f).href})}function sm(e,t,n={}){return new FontFace(e,`url(${t}.woff2) format('woff2')`,n)}var Gs="not-loaded";function lm(){return Mc(this,null,function*(){return Gs="not-loaded",Nd()})}function Nd(){return Mc(this,null,function*(){var e;if(Gs!=="not-loaded")return;if(Gs="loading",(e=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))!=null?e:!1){Gs="ready";return}if(document.body.classList.remove("ML__fonts-did-not-load"),"fonts"in document){const n=["KaTeX_Main","KaTeX_Math","KaTeX_AMS","KaTeX_Caligraphic","KaTeX_Fraktur","KaTeX_SansSerif","KaTeX_Script","KaTeX_Typewriter","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4"],i=Array.from(document.fonts).map(f=>f.family);if(n.every(f=>i.includes(f))){Gs="ready";return}if(!window.MathfieldElement.fontsDirectory){Gs="not-loaded";return}const o=yield Eh(window.MathfieldElement.fontsDirectory);if(!o){document.body.classList.add("ML__fonts-did-not-load"),Gs="error";return}const c=[["KaTeX_Main-Regular"],["KaTeX_Main-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_Main-Bold",{weight:"bold"}],["KaTeX_Main-Italic",{style:"italic"}],["KaTeX_Math-Italic",{style:"italic"}],["KaTeX_Math-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_AMS-Regular"],["KaTeX_Caligraphic-Regular"],["KaTeX_Caligraphic-Bold",{weight:"bold"}],["KaTeX_Fraktur-Regular"],["KaTeX_Fraktur-Bold",{weight:"bold"}],["KaTeX_SansSerif-Regular"],["KaTeX_SansSerif-Bold",{weight:"bold"}],["KaTeX_SansSerif-Italic",{style:"italic"}],["KaTeX_Script-Regular"],["KaTeX_Typewriter-Regular"],["KaTeX_Size1-Regular"],["KaTeX_Size2-Regular"],["KaTeX_Size3-Regular"],["KaTeX_Size4-Regular"]].map(f=>sm(f[0].replace(/-[a-zA-Z]+$/,""),`${o}/${f[0]}`,f[1]));try{(yield Promise.all(c.map(b=>{try{return b.load()}catch(C){}}))).forEach(b=>document.fonts.add(b)),Gs="ready";return}catch(f){console.error(`MathLive 0.98.5: The math fonts could not be loaded from "${o}"`,{cause:f}),document.body.classList.add("ML__fonts-did-not-load")}Gs="error"}})}function cm(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n),t=t|0;return Math.abs(t)}function za(e,t){e&&(e.dirty||(e.dirty=!0,requestAnimationFrame(()=>{js(e)&&e.dirty&&(e.atomBoundsCache=new Map,Hc(e,t),e.atomBoundsCache=void 0)})))}function um(e,t){var n;t=t!=null?t:{};const i=new xi({from:F(E({},e.context),{atomIdsSettings:{seed:t.forHighlighting?cm(Zt.serialize([e.model.root],{expandMacro:!1,defaultMode:e.options.defaultMode})):"random",groupNumbers:(n=t.forHighlighting)!=null?n:!1},letterShapeStyle:e.options.letterShapeStyle}),mathstyle:e.options.defaultMode==="inline-math"?"textstyle":"displaystyle"}),o=e.model.root.render(i);return hc(Yu(o,i),{classes:e.hasEditablePrompts?"ML__latex ML__prompting":"ML__latex",attributes:{translate:"no","aria-hidden":"true"}})}function _h(e,t){const{model:n}=e;n.root.caret=void 0,n.root.isSelected=!1,n.root.containsCaret=!0;for(const o of n.atoms)o.caret=void 0,o.isSelected=!1,o.containsCaret=!1;if(n.selectionIsCollapsed){const o=n.at(n.position);o.caret=e.model.mode;let c=o.parent;for(;c;)c.containsCaret=!0,c=c.parent}else{const o=n.getAtoms(n.selection,{includeChildren:!0});for(const c of o)c.isSelected=!0}return um(e,t).toMarkup()}function Hc(e,t){if(!js(e))return;t!=null||(t={});const n=e.element.querySelector("[part=virtual-keyboard-toggle]");n&&(n.style.display=e.hasEditableContent?"":"none");const i=e.field;if(!i)return;const o=e.isSelectionEditable&&e.hasFocus(),c=i.classList.contains("ML__focused");c&&!o?i.classList.remove("ML__focused"):!c&&o&&i.classList.add("ML__focused");let f=_h(e,t);const b=e.element.querySelector("[part=menu-toggle]");if(b&&(e.model.atoms.length<=1||e.disabled||e.readOnly&&!e.hasEditableContent||e.userSelect==="none"?b.style.display="none":b.style.display=""),e.model.atoms.length<=1){const C=e.options.contentPlaceholder;C&&(f+=`<span part=placeholder class="ML__content-placeholder">${Lo(C)}</span>`)}i.innerHTML=window.MathfieldElement.createHTML(f),Rd(e,t.interactive),e.dirty=!1}function Rd(e,t){const n=e.field;if(!n)return;for(const b of n.querySelectorAll(".ML__selection, .ML__contains-highlight"))b.remove();!(t!=null&&t)&&Gs!=="error"&&Gs!=="ready"&&setTimeout(()=>{Gs==="ready"?Rd(e):setTimeout(()=>Rd(e),128)},32);const i=e.model,o=n.offsetWidth,c=n.getBoundingClientRect().width;let f=Math.floor(c)/o;if(f=isNaN(f)?1:f,i.selectionIsCollapsed){Ad(e,{deferred:!0});let b=i.at(i.position);for(;b&&b.type!=="prompt"&&!(b.containsCaret&&b.displayContainsHighlight);)b=b.parent;if(b!=null&&b.containsCaret&&b.displayContainsHighlight){const C=Hu(e,gc(e,b),f);if(C){C.left/=f,C.right/=f,C.top/=f,C.bottom/=f;const k=document.createElement("div");k.classList.add("ML__contains-highlight"),k.style.position="absolute",k.style.left=`${C.left+1}px`,k.style.top=`${Math.ceil(C.top)}px`,k.style.width=`${Math.ceil(C.right-C.left)}px`,k.style.height=`${Math.ceil(C.bottom-C.top)}px`,n.insertBefore(k,n.childNodes[0])}}return}for(const b of dm(Wu(e,{excludeAtomsWithBackground:!0}))){b.left/=f,b.right/=f,b.top/=f,b.bottom/=f;const C=document.createElement("div");C.classList.add("ML__selection"),C.style.position="absolute",C.style.left=`${b.left}px`,C.style.top=`${b.top}px`,C.style.width=`${Math.ceil(b.right-b.left)}px`,C.style.height=`${Math.ceil(b.bottom-b.top-1)}px`,n.insertBefore(C,n.childNodes[0])}}function dm(e){let t=[];for(const n of e){let i=!1;for(const o of t)if(n.left===o.left&&n.right===o.right&&n.top===o.top&&n.bottom===o.bottom){i=!0;break}i||t.push(n)}e=t,t=[];for(const n of e){let i=0;for(const o of e)if(n.left>=o.left&&n.right<=o.right&&n.top>=o.top&&n.bottom<=o.bottom&&(i+=1,i>1))break;i===1&&t.push(n)}return t}var Lh=3,Ol;function $s(e,t){t=E({target:"mathfield",canUndo:!1,audioFeedback:void 0,changeContent:!1,changeSelection:!1},t!=null?t:{}),Ol||(Ol={});for(const n of Object.keys(e))console.assert(!Ol[n],"Selector already defined: ",n),Ol[n]=F(E({},t),{fn:e[n]})}function Lf(e){let t;if(Array.isArray(e)){if(e[0]==="performWithFeedback")return Lf(e[1]);t=e[0]}else t=e;return t=t.replace(/-\w/g,n=>n[1].toUpperCase()),Ol[t]}function xu(e){var t;return(t=Lf(e))==null?void 0:t.target}function fm(e,t){var n;if(!t)return!1;let i,o=[],c=!1,f=!1;G(t)?(i=t[0],o=t.slice(1)):i=t,i=i.replace(/-\w/g,k=>k[1].toUpperCase());const b=Ol[i],C=b==null?void 0:b.target;if(C==="model"){if(!e.isSelectionEditable&&(b!=null&&b.changeContent))return e.model.announce("plonk"),!1;/^(delete|add)/.test(i)&&(i!=="deleteBackward"&&e.flushInlineShortcutBuffer(),e.snapshot(i)),/^complete/.test(i)||Pd(e),Ol[i].fn(e.model,...o),nd(e),f=!0,c=!0}else if(C==="virtual-keyboard")f=(n=window.mathVirtualKeyboard.executeCommand(t))!=null?n:!1,c=!0;else if(Ol[i]){if(!e.isSelectionEditable&&(b!=null&&b.changeContent))return e.model.announce("plonk"),!1;/^(undo|redo)/.test(i)&&e.flushInlineShortcutBuffer(),f=Ol[i].fn(e,...o),c=!0}else throw new Error(`Unknown command "${i}"`);return C!=="virtual-keyboard"&&(!e.model.selectionIsCollapsed||b!=null&&b.changeSelection&&t!=="deleteBackward")&&(e.flushInlineShortcutBuffer(),b!=null&&b.changeContent||e.stopCoalescingUndo(),e.defaultStyle={}),f&&za(e),c}function hm(e,t){var n;if(!e)return!1;e.focus(),w0.keypressVibration&&de()&&navigator.vibrate(Lh);const i=Lf(t);window.MathfieldElement.playSound((n=i==null?void 0:i.audioFeedback)!=null?n:"keypress");const o=e.executeCommand(t);return e.scrollIntoView(),o}$s({performWithFeedback:(e,t)=>hm(e,t)});function pm(e){return nd(e,{atIndex:e.suggestionIndex+1}),!1}function mm(e){return nd(e,{atIndex:e.suggestionIndex-1}),!1}$s({complete:yu},{target:"mathfield",audioFeedback:"return",canUndo:!0,changeContent:!0,changeSelection:!0}),$s({nextSuggestion:pm,previousSuggestion:mm},{target:"mathfield",audioFeedback:"keypress",changeSelection:!0});var zd="mathlive#virtual-keyboard-message";function If(e){var t;return e.type!=="message"?!1:((t=e.data)==null?void 0:t.type)===zd}var gm=class op{constructor(){this.targetOrigin=window.origin,this.originValidator="none",this._boundingRect=new DOMRect(0,0,0,0),this._isShifted=!1,window.addEventListener("message",this),this.sendMessage("proxy-created"),this.listeners={}}static get singleton(){return this._singleton||(this._singleton=new op),this._singleton}set alphabeticLayout(t){this.sendMessage("update-setting",{alphabeticLayout:t})}set layouts(t){this.sendMessage("update-setting",{layouts:t})}get normalizedLayouts(){return[]}set editToolbar(t){this.sendMessage("update-setting",{editToolbar:t})}set actionKeycap(t){this.sendMessage("update-setting",{actionKeycap:t})}set shiftKeycap(t){this.sendMessage("update-setting",{shiftKeycap:t})}set backspaceKeycap(t){this.sendMessage("update-setting",{backspaceKeycap:t})}set tabKeycap(t){this.sendMessage("update-setting",{tabKeycap:t})}set container(t){throw new Error("Container inside an iframe cannot be changed")}show(t){this.sendMessage("show",t)}hide(t){this.sendMessage("hide",t)}get isShifted(){return this._isShifted}get visible(){return this._boundingRect.height>0}set visible(t){t?this.show():this.hide()}get boundingRect(){return this._boundingRect}executeCommand(t){return this.sendMessage("execute-command",{command:t}),!0}updateToolbar(t){this.sendMessage("update-toolbar",t)}update(t){this.sendMessage("update-setting",t)}connect(){this.sendMessage("connect")}disconnect(){this.sendMessage("disconnect")}addEventListener(t,n,i){this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].has(n)||this.listeners[t].add(n)}dispatchEvent(t){return!this.listeners[t.type]||this.listeners[t.type].size===0?!0:(this.listeners[t.type].forEach(n=>{typeof n=="function"?n(t):n==null||n.handleEvent(t)}),!t.defaultPrevented)}removeEventListener(t,n,i){this.listeners[t]&&this.listeners[t].delete(n)}handleEvent(t){if(If(t)){if(!ju(t.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${t.origin}) cannot be handled`,"SecurityError");this.handleMessage(t.data)}}handleMessage(t){const{action:n}=t;if(n==="execute-command"){const{command:i}=t;xu(i)==="virtual-keyboard"&&this.executeCommand(i);return}if(n==="synchronize-proxy"){this._boundingRect=t.boundingRect,this._isShifted=t.isShifted;return}if(n==="geometry-changed"){this._boundingRect=t.boundingRect,this.dispatchEvent(new Event("geometrychange"));return}}sendMessage(t,n={}){if(!window.top)throw new DOMException("A frame does not have access to the top window and can\u2018t communicate with the keyboard. Review virtualKeyboardTargetOrigin and originValidator on mathfields embedded in an iframe","SecurityError");window.top.postMessage(E({type:zd,action:t},n),this.targetOrigin)}},Ih={numeric:{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",rows:[[{latex:"x",shift:"y",variants:["y","z","t","r","x^2","x^n","x^{#?}","x_n","x_i","x_{#?}",{latex:"f(#?)",class:"small"},{latex:"g(#?)",class:"small"}]},{latex:"n",shift:"a",variants:["i","j","p","k","a","u"]},"[separator-5]","[7]","[8]","[9]","[/]","[separator-5]",{latex:"\\exponentialE",shift:"\\ln",variants:["\\exp","\\times 10^{#?}","\\ln","\\log_{10}","\\log"]},{latex:"\\imaginaryI",variants:["\\Re","\\Im","\\imaginaryJ","\\Vert #0 \\Vert"]},{latex:"\\pi",shift:"\\sin",variants:["\\prod",{latex:"\\theta",aside:"theta"},{latex:"\\rho",aside:"rho"},{latex:"\\tau",aside:"tau"},"\\sin","\\cos","\\tan"]}],[{label:"<",latex:"<",class:"hide-shift",shift:{latex:"\\le",label:"\u2264"}},{label:">",latex:">",class:"hide-shift",shift:{latex:"\\ge",label:"\u2265"}},"[separator-5]","[4]","[5]","[6]","[*]","[separator-5]",{class:"hide-shift",latex:"#@^2}",shift:"#@^{\\prime}}"},{latex:"#@^{#0}}",class:"hide-shift",shift:"#@_{#?}"},{class:"hide-shift",latex:"\\sqrt{#0}",shift:{latex:"\\sqrt[#0]{#?}}"}}],["[(]","[)]","[separator-5]","[1]","[2]","[3]","[-]","[separator-5]",{latex:"\\int^{\\infty}_{0}\\!#?\\,\\mathrm{d}x",class:"small hide-shift",shift:"\\int",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{class:"hide-shift",latex:"\\forall",shift:"\\exists"},{label:"[backspace]",width:1}],[{label:"[shift]",width:2},"[separator-5]","[0]","[.]","[=]","[+]","[separator-5]","[left]","[right]",{label:"[action]",width:1}]]},greek:{label:"αβγ",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.greek",rows:[[{label:"<i>φ</i>",class:"MLK__tex hide-shift",insert:"\\varphi",aside:"phi var.",shift:"\\Phi"},{label:"<i>ς</i>",class:"MLK__tex hide-shift",insert:"\\varsigma",aside:"sigma var.",shift:"\\Sigma"},{label:"<i>ϵ</i>",class:"MLK__tex hide-shift",insert:"\\epsilon",aside:"espilon",shift:'\\char"0190'},{label:"<i>ρ</i>",class:"MLK__tex hide-shift",insert:"\\rho",aside:"rho",shift:'\\char"3A1'},{label:"<i>τ</i>",class:"MLK__tex hide-shift",insert:"\\tau",aside:"tau",shift:'\\char"3A4'},{label:"<i>υ</i>",class:"MLK__tex hide-shift",insert:"\\upsilon",aside:"upsilon",shift:"\\Upsilon"},{label:"<i>θ</i>",class:"MLK__tex hide-shift",insert:"\\theta",aside:"theta",shift:"\\Theta"},{label:"<i>ι</i>",class:"MLK__tex hide-shift",insert:"\\iota",aside:"iota",shift:'\\char"399'},{label:"<i>ο</i>",class:"MLK__tex hide-shift",insert:"\\omicron",aside:"omicron",shift:'\\char"39F'},{label:"<i>π</i>",class:"MLK__tex hide-shift",insert:"\\pi",aside:"pi",shift:"\\Pi"}],["[separator-5]",{label:"<i>α</i>",class:"MLK__tex hide-shift",insert:"\\alpha",aside:"alpha",shift:'\\char"391'},{label:"<i>σ</i>",class:"MLK__tex hide-shift",insert:"\\sigma",aside:"sigma",shift:"\\Sigma"},{label:"<i>δ</i>",class:"MLK__tex hide-shift",insert:"\\delta",aside:"delta",shift:"\\Delta"},{latex:"\\phi",class:"MLK__tex hide-shift",insert:"\\phi",aside:"phi",shift:"\\Phi"},{label:"<i>γ</i>",class:"MLK__tex hide-shift",insert:"\\gamma",aside:"gamma",shift:"\\Gamma"},{label:"<i>η</i>",class:"MLK__tex hide-shift",insert:"\\eta",aside:"eta",shift:'\\char"397'},{label:"<i>ξ</i>",class:"MLK__tex hide-shift",insert:"\\xi",aside:"xi",shift:"\\Xi"},{label:"<i>κ</i>",class:"MLK__tex hide-shift",insert:"\\kappa",aside:"kappa",shift:"\\Kappa"},{label:"<i>λ</i>",class:"MLK__tex hide-shift",insert:"\\lambda",aside:"lambda",shift:"\\Lambda"},"[separator-5]"],["[shift]",{label:"<i>ζ</i>",class:"MLK__tex hide-shift",insert:"\\zeta",aside:"zeta",shift:'\\char"396'},{label:"<i>χ</i>",class:"MLK__tex hide-shift",insert:"\\chi",aside:"chi",shift:'\\char"3A7'},{label:"<i>ψ</i>",class:"MLK__tex hide-shift",insert:"\\psi",aside:"zeta",shift:"\\Psi"},{label:"<i>ω</i>",class:"MLK__tex hide-shift",insert:"\\omega",aside:"omega",shift:"\\Omega"},{label:"<i>β</i>",class:"MLK__tex hide-shift",insert:"\\beta",aside:"beta",shift:'\\char"392'},{label:"<i>ν</i>",class:"MLK__tex hide-shift",insert:"\\nu",aside:"nu",shift:'\\char"39D'},{label:"<i>μ</i>",class:"MLK__tex hide-shift",insert:"\\mu",aside:"mu",shift:'\\char"39C'},"[backspace]"],["[separator]",{label:"<i>ε</i>",class:"MLK__tex",insert:"\\varepsilon",aside:"espilon var."},{label:"<i>ϑ</i>",class:"MLK__tex",insert:"\\vartheta",aside:"theta var."},{label:"<i>ϰ</i>",class:"MLK__tex",insert:"\\varkappa",aside:"kappa var."},{label:"<i>ϖ</i>",class:"MLK__tex",insert:"\\varpi",aside:"pi var."},{label:"<i>ϱ</i>",class:"MLK__tex",insert:"\\varrho",aside:"rho var."},"[left]","[right]","[action]"]]},symbols:{label:"∞\u2260\u2208",labelClass:"MLK__tex",tooltip:"keyboard.tooltip.symbols",rows:[[{latex:"\\sin",shift:"\\sin^{-1}",variants:[{class:"small",latex:"\\sinh"},{class:"small",latex:"\\sin^{-1}"},{class:"small",latex:"\\arsinh"}]},"\\ln",{latex:"\\mathrm{abs}",insert:"\\mathrm{abs}\\left(#0\\right)"},{latex:"\\rarr",shift:"\\rArr",variants:[{latex:"\\implies",aside:"implies"},{latex:"\\to",aside:"to"},"\\dashv",{latex:"\\roundimplies",aside:"round implies"}]},{latex:"\\exists",variants:["\\nexists"],shift:"\\nexists"},{latex:"\\in",shift:"\\notin",variants:["\\notin","\\owns"]},"\\cup",{latex:"\\overrightarrow{#@}",shift:"\\overleftarrow{#@}",variants:["\\overleftarrow{#@}","\\bar{#@}","\\vec{#@}","\\hat{#@}","\\check{#@}","\\dot{#@}","\\ddot{#@}","\\mathring{#@}","\\breve{#@}","\\acute{#@}","\\tilde{#@}","\\grave{#@}"]},{class:"small",latex:"\\lim_{#?}",shift:"\\lim_{x\\to\\infty}",variants:[{class:"small",latex:"\\liminf_{#?}"},{class:"small",latex:"\\limsup_{#?}"}]},"\\exponentialE"],[{latex:"\\cos",shift:"\\cos^{-1}",variants:[{class:"small",latex:"\\cosh"},{class:"small",latex:"\\cos^{-1}"},{class:"small",latex:"\\arcosh"}]},{latex:"\\log",shift:"\\log_{10}",variants:["\\log_{#0}","\\log_{10}"]},"\\left\\vert#0\\right\\vert",{latex:"\\larr",shift:"\\lArr",variants:[{latex:"\\impliedby",aside:"implied by"},{latex:"\\gets",aside:"gets"},"\\lArr","\\vdash",{latex:"\\models",aside:"models"}]},{latex:"\\forall",shift:"\\lnot",variants:[{latex:"\\land",aside:"and"},{latex:"\\lor",aside:"or"},{latex:"\\oplus",aside:"xor"},{latex:"\\lnot",aside:"not"},{latex:"\\downarrow",aside:"nor"},{latex:"\\uparrow",aside:"nand"},{latex:"\\curlywedge",aside:"nor"},{latex:"\\bar\\curlywedge",aside:"nand"}]},{latex:"\\ni",shift:"\\not\\owns"},"\\cap",{latex:"\\overline{#@}",shift:"\\underline{#@}",variants:["\\overbrace{#@}","\\overlinesegment{#@}","\\overleftrightarrow{#@}","\\overrightarrow{#@}","\\overleftarrow{#@}","\\overgroup{#@}","\\underbrace{#@}","\\underlinesegment{#@}","\\underleftrightarrow{#@}","\\underrightarrow{#@}","\\underleftarrow{#@}","\\undergroup{#@}"]},{class:"hide-shift",latex:"\\int",shift:"\\iint",variants:[{latex:"\\int_{#?}^{#?}",class:"small"},{latex:"\\int",class:"small"},{latex:"\\smallint",class:"small"},{latex:"\\iint",class:"small"},{latex:"\\iiint",class:"small"},{latex:"\\oint",class:"small"},"\\intop","\\iiint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\ointctrclockwise","\\intctrclockwise"]},{latex:"\\pi",shift:"\\tau",variants:["\\tau"]}],[{latex:"\\tan",shift:"\\tan^{-1}",variants:[{class:"small",latex:"\\tanh"},{class:"small",latex:"\\tan^{-1}"},{class:"small",latex:"\\artanh"},{class:"small",latex:"\\arctan"},{class:"small",latex:"\\arctg"},{class:"small",latex:"\\tg"}]},{latex:"\\exp",insert:"\\exp\\left(#0\\right)",variants:["\\exponentialE^{#0}"]},"\\left\\Vert#0\\right\\Vert",{latex:"\\lrArr",shift:"\\leftrightarrow",variants:[{latex:"\\iff",aside:"if and only if"},"\\leftrightarrow","\\leftrightarrows","\\Leftrightarrow",{latex:"^\\biconditional",aside:"biconditional"}]},{latex:"\\vert",shift:"!"},{latex:"#@^{\\complement}",aside:"complement",variants:[{latex:"\\setminus",aside:"set minus"},{latex:"\\smallsetminus",aside:"small set minus"}]},{latex:"\\subset",shift:"\\subseteq",variants:["\\subset","\\subseteq","\\subsetneq","\\varsubsetneq","\\subsetneqq","\\nsubset","\\nsubseteq","\\supset","\\supseteq","\\supsetneq","\\supsetneqq","\\nsupset","\\nsupseteq"]},{latex:"#@^{\\prime}",shift:"#@^{\\doubleprime}",variants:["#@^{\\doubleprime}","#@\\degree"]},{latex:"\\mathrm{d}",shift:"\\partial",variants:["\\mathrm{d}x",{latex:"\\dfrac{\\mathrm{d}}{\\mathrm{d} x}",class:"small"},{latex:"\\frac{\\partial}{\\partial x}",class:"small"},"\\partial"]},{latex:"\\infty",variants:["\\aleph_0","\\aleph_1","\\omega","\\mathfrak{m}"]}],[{label:"[shift]",width:2},{class:"box",latex:",",shift:";",variants:[";","?"]},{class:"box",latex:"\\colon",shift:"\\Colon",variants:[{latex:"\\Colon",aside:"such that",class:"box"},{latex:":",aside:"ratio",class:"box"},{latex:"\\vdots",aside:"",class:"box"},{latex:"\\ddots",aside:"",class:"box"},{latex:"\\ldotp",aside:"low dot",class:"box"},{latex:"\\cdotp",aside:"center dot",class:"box"},{latex:"\\ldots",aside:"low ellipsis",class:"box"},{latex:"\\cdots",aside:"center ellipsis",class:"box"},{latex:"\\therefore",aside:"therefore",class:"box"},{latex:"\\because",aside:"because",class:"box"}]},{class:"box",latex:"\\cdot",aside:"centered dot",shift:"\\ast",variants:["\\circ","\\bigcirc","\\bullet","\\odot","\\oslash","\\circledcirc","\\ast","\\star","\\times","\\doteq","\\doteqdot"]},"[separator]","[left]","[right]",{label:"[backspace]",width:1,class:"action hide-shift"},{label:"[action]",width:1}]]},compact:{label:"compact",rows:[["[+]","[-]","[*]","[/]","[=]","[.]","[(]","[)]","\\sqrt{#0}","#@^{#?}"],["[1]","[2]","[3]","[4]","[5]","[6]","[7]","[8]","[9]","[0]"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]},minimalist:{label:"minimalist",layers:[{style:`
|
|
|
.minimalist-backdrop {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
}
|
|
|
.minimalist-container {
|
|
|
--keycap-height: 40px;
|
|
|
--keycap-max-width: 53px;
|
|
|
--keycap-small-font-size: 12px;
|
|
|
background: var(--keyboard-background);
|
|
|
padding: 20px;
|
|
|
border-top-left-radius: 8px;
|
|
|
border-top-right-radius: 8px;
|
|
|
border: 1px solid var(--keyboard-border);
|
|
|
box-shadow: 0 0 32px rgb(0 0 0 / 30%);
|
|
|
}
|
|
|
`,backdrop:"minimalist-backdrop",container:"minimalist-container",rows:[["+","-","\\times",{latex:"\\frac{#@}{#0}",class:"small"},"=","[.]","(",")",{latex:"\\sqrt{#0}",class:"small"},{latex:"#@^{#?}",class:"small"}],["1","2","3","4","5","6","7","8","9","0"],["[hr]"],["[undo]","[redo]","[separator]","[separator]","[separator]","[left]","[right]",{label:"[backspace]",class:"action hide-shift"},"[hide-keyboard]"]]}]},"numeric-only":{label:"123",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.numeric",id:"numeric-only",rows:[["7","8","9","[separator]",{label:"[backspace]",width:2}],["4","5","6","[separator]","[separator]","[separator]"],["1","2","3","[separator]","[separator]","[separator]"],["0",{label:"[.]",variants:[]},"-","[separator]","[left]","[right]"]]}},Fd={0:["\\varnothing","\\infty"],1:["\\frac{1}{#@}","#@^{-1}","\\times 10^{#?}","\\phi","\\imaginaryI"],2:["\\frac{1}{2}","#@^2","\\sqrt2","\\exponentialE"],3:["\\frac{1}{3}","#@^3","\\sqrt3","\\pi"],4:["\\frac{1}{4}","#@^4"],5:["\\frac{1}{5}","#@^5","\\sqrt5"],6:["\\frac{1}{6}","#@^6"],7:["\\frac{1}{7}","#@^7"],8:["\\frac{1}{8}","#@^8"],9:["\\frac{1}{9}","#@^9"],".":[".",",",";","\\colon"],",":["{,}",".",";","\\colon"],a:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"},"\xE0","\xE1","\xE2","\xE4","\xE6"],b:[{latex:"\\beth",aside:"beth"}],c:[{latex:"\\C",aside:"set of complex numbers"},"\xE7"],d:[{latex:"\\daleth",aside:"daleth"}],e:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn\u2019t"},"\xE8","\xE9","\xEA","\xEB"],g:[{latex:"\\gimel",aside:"gimel"}],h:[{latex:"\\hbar",aside:"h bar"},{latex:"\\hslash",aside:"h slash"}],i:[{latex:"\\imaginaryI",aside:"imaginary i"},"\xEC","\xED","\xEE","\xEF"],j:[{latex:"\\imaginaryJ",aside:"imaginary j"}],l:[{latex:"\\ell",aside:"ell"}],n:[{latex:"\\mathbb{N}",aside:"set of natural numbers"},"\xF1"],o:["\xF8","\u0153","\xF2","\xF3","\xF4","\xF6","\u0153"],p:[{latex:"\\mathbb{P}",aside:"set of primes"}],q:[{latex:"\\mathbb{Q}",aside:"set of rational numbers"}],r:[{latex:"\\mathbb{R}",aside:"set of real numbers"}],u:["\xF9","\xFA","\xFB","\xFC"],z:[{latex:"\\mathbb{Z}",aside:"set of integers"}],y:["\xFD","\xFF"],space:[{latex:'\\char"203A\\!\\char"2039',insert:"\\!",aside:"negative thin space<br>\u207B\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\,\\char"2039',insert:"\\,",aside:"thin space<br>\xB3\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\:\\char"2039',insert:"\\:",aside:"medium space<br>\u2074\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\;\\char"2039',insert:"\\;",aside:"thick space<br>\u2075\u29F8\u2081\u2088 em"},{latex:'\\char"203A\\ \\char"2039',insert:"\\ ",aside:"\u2153 em"},{latex:'\\char"203A\\enspace\\char"2039',insert:"\\enspace",aside:"\xBD em"},{latex:'\\char"203A\\quad\\char"2039',insert:"\\quad",aside:"1 em"},{latex:'\\char"203A\\qquad\\char"2039',insert:"\\qquad",aside:"2 em"}]},rd;function Th(e,t){var n,i,o;const c=xc.singleton;if(!c)return;const f=Su(e),b=(i=(n=c.getKeycap(f==null?void 0:f.id))==null?void 0:n.variants)!=null?i:"";if(typeof b=="string"&&!Dh(b)||Array.isArray(b)&&b.length===0){t==null||t();return}const C={};let k="";for(const Ot of ym(b)){const bn=Ph(Ot),Dt=Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);C[Dt]=bn;const[en,Ln]=Kd(bn);k+=`<div id=${Dt} class="item ${Ln}">${en}</div>`}const $=document.createElement("div");$.setAttribute("aria-hidden","true"),$.className="MLK__variant-panel",$.style.height="auto";const ne=Object.keys(C).length;let Me=5;ne===1?Me=1:ne===2||ne===4?Me=2:ne===3||ne===5||ne===6?Me=3:ne>=7&&ne<14&&(Me=4),$.style.width=`calc(var(--variant-keycap-length) * ${Me} + 12px)`,$.innerHTML=w0.createHTML(k),Pl.open({root:(o=c==null?void 0:c.container)==null?void 0:o.querySelector(".ML__keyboard"),child:$}),rd=new AbortController;const{signal:We}=rd,Je=e==null?void 0:e.getBoundingClientRect();if(Je){Je.top-$.clientHeight<0&&($.style.width="auto",ne<=6?$.style.height="56px":ne<=12?$.style.height="108px":ne<=18?$.style.height="205px":$.classList.add("compact"));const Ot=Math.max(0,Math.min(window.innerWidth-$.offsetWidth,(Je.left+Je.right-$.offsetWidth)/2)),bn=Je.top-$.clientHeight+5;$.style.transform=`translate(${Ot}px, ${bn}px)`,$.classList.add("is-visible"),requestAnimationFrame(()=>{$.addEventListener("pointerup",Dt=>{const en=Su(Dt.target);!(en!=null&&en.id)||!C[en.id]||(Tf(C[en.id]),id(),t==null||t(),Dt.preventDefault())},{capture:!0,passive:!1,signal:We}),$.addEventListener("pointerenter",Dt=>{const en=Su(Dt.target);!(en!=null&&en.id)||!C[en.id]||en.classList.add("is-active")},{capture:!0,signal:We}),$.addEventListener("pointerleave",Dt=>{const en=Su(Dt.target);!(en!=null&&en.id)||!C[en.id]||en.classList.remove("is-active")},{capture:!0,signal:We}),window.addEventListener("pointercancel",()=>{id(),t==null||t()},{signal:We}),window.addEventListener("pointerup",()=>{id(),t==null||t()},{signal:We})})}}function id(){rd==null||rd.abort(),rd=null,Pl.state==="open"&&Pl.close()}function vm(e){if(e==="foreground-color"){const t=[];for(const n of Object.keys(ae))t.push({class:"swatch-button",label:'<span style="border: 3px solid '+ae[n]+'"></span>',command:["applyStyle",{color:n}]});return t}if(e==="background-color"){const t=[];for(const n of Object.keys(ie))t.push({class:"swatch-button",label:'<span style="background:'+ie[n]+'"></span>',command:["applyStyle",{backgroundColor:n}]});return t}}function Dh(e){return Fd[e]!==void 0}function ym(e){var t;return typeof e!="string"?e:(Fd[e]||(Fd[e]=(t=vm(e))!=null?t:[]),Fd[e])}function bm(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n} !important`).join(";")}function xm(e){return Object.keys(e).map(t=>`${t} {${bm(e[t])}}`).join("")}function ad(e){if(!e)return"";const t=new xi,n=new Zt({mode:"math",type:"root",body:_o(e,{context:t,args:o=>o==="@"?"{\\class{ML__box-placeholder}{\\blacksquare}}":"\\placeholder{}"})}),i=fc(Yu(new vn(n.render(t),{classes:"ML__base"}),t));return hc(i,{classes:"ML__latex"}).toMarkup()}function od(e){var t;if(Array.isArray(e))return e.map(i=>od(i)).flat();const n=typeof e=="string"?{markup:e}:e;return"rows"in n&&Array.isArray(n.rows)&&(n.rows=n.rows.map(i=>i.map(o=>Ph(o)))),(t=n.id)!=null||(n.id="ML__layer_"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36)),[n]}function Sm(){var e,t;let i=window.mathVirtualKeyboard.alphabeticLayout;if(i==="auto"){const b=ed();b&&(i=b.virtualLayout),(!i||i==="auto")&&(i=(e={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[Ce.locale.slice(0,2)])!=null?e:"qwerty")}const o={qwerty:["qwertyuiop"," asdfghjkl ","^zxcvbnm~"],azerty:["azertyuiop","qsdfghjklm","^ wxcvbn ~"],qwertz:["qwertzuiop"," asdfghjkl ","^yxcvbnm~"],dvorak:["^ pyfgcrl ","aoeuidhtns","qjkxbmwvz~"],colemak:[" qwfpgjluy ","arstdhneio","^zxcvbkm~"]},c=(t=o[i])!=null?t:o.qwerty,f=i==="azerty"?[[{label:"1",variants:"1"},{label:"2",shift:{latex:"\xE9"},variants:"2"},{label:"3",shift:{latex:"\xF9"},variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{label:"(",latex:"("},variants:"5"},{label:"6",shift:{label:")",latex:")"},variants:"6"},{label:"7",shift:{latex:"\xE8"},variants:"7"},{label:"8",shift:{latex:"\xEA"},variants:"8"},{label:"9",shift:{latex:"\xE7"},variants:"9"},{label:"0",shift:{latex:"\xE0"},variants:"0"}]]:[[{label:"1",variants:"1"},{label:"2",variants:"2"},{label:"3",variants:"3"},{label:"4",variants:"4"},{label:"5",shift:{latex:"\\frac{#@}{#?}"},variants:"5"},{label:"6",shift:{latex:"#@^#?"},variants:"6"},{label:"7",variants:"7"},{label:"8",shift:{latex:"\\times"},variants:"8"},{label:"9",shift:{label:"(",latex:"("},variants:"9"},{label:"0",shift:{label:")",latex:")"},variants:"0"}]];for(const b of c){const C=[];for(const k of b)/[a-z]/.test(k)?C.push({label:k,class:"hide-shift",shift:{label:k.toUpperCase()},variants:Dh(k)?k:void 0}):k==="~"?i!=="dvorak"?C.push("[backspace]"):C.push({label:"[backspace]",width:1}):k==="^"?C.push("[shift]"):k===" "&&C.push("[separator-5]");f.push(C)}return f.push(["[-]","[+]","[=]",{label:" ",width:1.5},{label:",",shift:";",variants:".",class:"hide-shift"},"[.]","[left]","[right]",{label:"[action]",width:1.5}]),{label:"abc",labelClass:"MLK__tex-math",tooltip:"keyboard.tooltip.alphabetic",layers:od({rows:f})}}function $h(e){if(e==="alphabetic")return Sm();if(typeof e=="string")return console.assert(Ih[e]!==void 0,`MathLive 0.98.5: unknown keyboard layout "${e}"`),$h(Ih[e]);let t;if("rows"in e&&Array.isArray(e.rows)){console.assert(!("layers"in e||"markup"in e),'MathLive 0.98.5: when providing a "rows" property, "layers" and "markup" are ignored');const o=e,{rows:c}=o,f=Ie(o,["rows"]);t=F(E({},f),{layers:od({rows:e.rows})})}else if("markup"in e&&typeof e.markup=="string"){const o=e,{markup:c}=o,f=Ie(o,["markup"]);t=F(E({},f),{layers:od(e.markup)})}else t=E({},e),"layers"in e?t.layers=od(e.layers):console.error('MathLive 0.98.5: provide either a "rows", "markup" or "layers" property');let n=!1,i=!1;for(const o of t.layers)if(o.rows)for(const c of o.rows.flat()){Cu(c)&&(n=!0);const f=c.command;typeof f=="string"&&["undo","redo","cut","copy","paste"].includes(f)&&(i=!0)}return(!("displayShiftedKeycaps"in e)||e.displayShiftedKeycaps===void 0)&&(t.displayShiftedKeycaps=n),(!("displayEditToolbar"in e)||e.displayEditToolbar===void 0)&&(t.displayEditToolbar=!i),t}function Cm(e,t){var n,i;let o='<div class="left">';if(e.normalizedLayouts.length>1)for(const[c,f]of e.normalizedLayouts.entries()){const b=f,C=[c===t?"selected":"layer-switch"];b.tooltip&&C.push("MLK__tooltip"),b.labelClass&&C.push(...b.labelClass.split(" ")),o+=`<div class="${C.join(" ")}"`,b.tooltip&&(o+=" data-tooltip='"+((n=pe(b.tooltip))!=null?n:b.tooltip)+"' "),c!==t&&(o+=`data-layer="${b.layers[0].id}"`),o+=`>${(i=b.label)!=null?i:"untitled"}</div>`}return o+="</div>",o}function wm(e,t){let n="";if(e.editToolbar==="none")return"";const o=[];t.selectionIsCollapsed?o.push("undo","redo","pasteFromClipboard"):o.push("cutToClipboard","copyToClipboard","pasteFromClipboard");const c={undo:`<div class='action ${t.canUndo===!1?"disabled":""}'
|
|
|
data-command='"undo"'
|
|
|
data-tooltip='${pe("tooltip.undo")}'>
|
|
|
<svg><use xlink:href='#svg-undo' /></svg>
|
|
|
</div>`,redo:`<div class='action ${t.canRedo===!1?"disabled":""}'
|
|
|
data-command='"redo"'
|
|
|
data-tooltip='${pe("tooltip.redo")}'>
|
|
|
<svg><use xlink:href='#svg-redo' /></svg>
|
|
|
</div>`,cutToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"cutToClipboard"'
|
|
|
data-tooltip='${pe("tooltip.cut to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-cut' /></svg>
|
|
|
</div>
|
|
|
`,copyToClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"copyToClipboard"'
|
|
|
data-tooltip='${pe("tooltip.copy to clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-copy' /></svg>
|
|
|
</div>
|
|
|
`,pasteFromClipboard:`
|
|
|
<div class='action'
|
|
|
data-command='"pasteFromClipboard"'
|
|
|
data-tooltip='${pe("tooltip.paste from clipboard")}'>
|
|
|
<svg><use xlink:href='#svg-paste' /></svg>
|
|
|
</div>
|
|
|
`};return n+=o.map(f=>c[f]).join(""),n}function Mm(e){for(const t of e)km(t)}function km(e){const t=xc.singleton;if(!t)return;const n={};if(!e.id){if(e.hasAttribute("data-label")&&(n.label=e.dataset.label),e.hasAttribute("data-latex")&&(n.latex=e.dataset.latex),e.hasAttribute("data-key")&&(n.key=e.dataset.key),e.hasAttribute("data-insert")&&(n.insert=e.dataset.insert),e.hasAttribute("data-variants")&&(n.variants=e.dataset.variants),e.hasAttribute("data-aside")&&(n.aside=e.dataset.aside),e.className&&(n.class=e.className),!n.label&&!n.latex&&!n.key&&!n.insert&&(n.latex=e.innerText,n.label=e.innerHTML),e.hasAttribute("data-command"))try{n.command=JSON.parse(e.dataset.command)}catch(i){}e.id=t.registerKeycap(n)}if(!e.innerHTML){const[i,o]=Kd(n);e.innerHTML=window.MathfieldElement.createHTML(i)}}function Em(){Ds("virtual-keyboard"),Ds("core"),Nd()}function _m(){r("core"),r("virtual-keyboard")}var Lm=`<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
|
|
|
|
|
<symbol id="svg-delete-backward" viewBox="0 0 576 512">
|
|
|
<path d="M432.1 208.1L385.9 256L432.1 303C442.3 312.4 442.3 327.6 432.1 336.1C423.6 346.3 408.4 346.3 399 336.1L352 289.9L304.1 336.1C295.6 346.3 280.4 346.3 271 336.1C261.7 327.6 261.7 312.4 271 303L318.1 256L271 208.1C261.7 199.6 261.7 184.4 271 175C280.4 165.7 295.6 165.7 304.1 175L352 222.1L399 175C408.4 165.7 423.6 165.7 432.1 175C442.3 184.4 442.3 199.6 432.1 208.1V208.1zM512 64C547.3 64 576 92.65 576 128V384C576 419.3 547.3 448 512 448H205.3C188.3 448 172 441.3 160 429.3L9.372 278.6C3.371 272.6 0 264.5 0 256C0 247.5 3.372 239.4 9.372 233.4L160 82.75C172 70.74 188.3 64 205.3 64L512 64zM528 128C528 119.2 520.8 112 512 112H205.3C201 112 196.9 113.7 193.9 116.7L54.63 256L193.9 395.3C196.9 398.3 201 400 205.3 400H512C520.8 400 528 392.8 528 384V128z"/>
|
|
|
</symbol>
|
|
|
|
|
|
<symbol id="svg-shift" viewBox="0 0 384 512">
|
|
|
<path d="M2.438 252.3C7.391 264.2 19.06 272 32 272h80v160c0 26.51 21.49 48 48 48h64C250.5 480 272 458.5 272 432v-160H352c12.94 0 24.61-7.797 29.56-19.75c4.953-11.97 2.219-25.72-6.938-34.88l-160-176C208.4 35.13 200.2 32 192 32S175.6 35.13 169.4 41.38l-160 176C.2188 226.5-2.516 240.3 2.438 252.3zM192 86.63L313.4 224H224v208H160V224H70.63L192 86.63z"/>
|
|
|
</symbol>
|
|
|
|
|
|
<symbol id="svg-commit" viewBox="0 0 512 512">
|
|
|
<path d="M135 432.1l-128-128C2.344 300.3 0 294.2 0 288s2.344-12.28 7.031-16.97l128-128c9.375-9.375 24.56-9.375 33.94 0s9.375 24.56 0 33.94L81.94 264H464v-208C464 42.75 474.8 32 488 32S512 42.75 512 56V288c0 13.25-10.75 24-24 24H81.94l87.03 87.03c9.375 9.375 9.375 24.56 0 33.94S144.4 442.3 135 432.1z"/>
|
|
|
</symbol>
|
|
|
|
|
|
|
|
|
<symbol id="circle-plus" viewBox="0 0 512 512"><path d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344c0 13.3 10.7 24 24 24s24-10.7 24-24V280h64c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V168c0-13.3-10.7-24-24-24s-24 10.7-24 24v64H168c-13.3 0-24 10.7-24 24s10.7 24 24 24h64v64z"/></symbol>
|
|
|
|
|
|
<symbol id="svg-command" viewBox="0 0 640 512">
|
|
|
<path d="M34.495 36.465l211.051 211.05c4.686 4.686 4.686 12.284 0 16.971L34.495 475.535c-4.686 4.686-12.284 4.686-16.97 0l-7.071-7.07c-4.686-4.686-4.686-12.284 0-16.971L205.947 256 10.454 60.506c-4.686-4.686-4.686-12.284 0-16.971l7.071-7.07c4.686-4.687 12.284-4.687 16.97 0zM640 468v-10c0-6.627-5.373-12-12-12H300c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h328c6.627 0 12-5.373 12-12z"/>
|
|
|
</symbol>
|
|
|
|
|
|
<symbol id="svg-undo" viewBox="0 0 512 512">
|
|
|
<path d="M20 8h10c6.627 0 12 5.373 12 12v110.625C85.196 57.047 165.239 7.715 256.793 8.001 393.18 8.428 504.213 120.009 504 256.396 503.786 393.181 392.834 504 256 504c-63.926 0-122.202-24.187-166.178-63.908-5.113-4.618-5.354-12.561-.482-17.433l7.069-7.069c4.503-4.503 11.749-4.714 16.482-.454C150.782 449.238 200.935 470 256 470c117.744 0 214-95.331 214-214 0-117.744-95.331-214-214-214-82.862 0-154.737 47.077-190.289 116H180c6.627 0 12 5.373 12 12v10c0 6.627-5.373 12-12 12H20c-6.627 0-12-5.373-12-12V20c0-6.627 5.373-12 12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-redo" viewBox="0 0 512 512">
|
|
|
<path d="M492 8h-10c-6.627 0-12 5.373-12 12v110.625C426.804 57.047 346.761 7.715 255.207 8.001 118.82 8.428 7.787 120.009 8 256.396 8.214 393.181 119.166 504 256 504c63.926 0 122.202-24.187 166.178-63.908 5.113-4.618 5.354-12.561.482-17.433l-7.069-7.069c-4.503-4.503-11.749-4.714-16.482-.454C361.218 449.238 311.065 470 256 470c-117.744 0-214-95.331-214-214 0-117.744 95.331-214 214-214 82.862 0 154.737 47.077 190.289 116H332c-6.627 0-12 5.373-12 12v10c0 6.627 5.373 12 12 12h160c6.627 0 12-5.373 12-12V20c0-6.627-5.373-12-12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-arrow-left" viewBox="0 0 320 512">
|
|
|
<path d="M206.7 464.6l-183.1-191.1C18.22 267.1 16 261.1 16 256s2.219-11.97 6.688-16.59l183.1-191.1c9.152-9.594 24.34-9.906 33.9-.7187c9.625 9.125 9.938 24.37 .7187 33.91L73.24 256l168 175.4c9.219 9.5 8.906 24.78-.7187 33.91C231 474.5 215.8 474.2 206.7 464.6z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-arrow-right" viewBox="0 0 320 512">
|
|
|
<path d="M113.3 47.41l183.1 191.1c4.469 4.625 6.688 10.62 6.688 16.59s-2.219 11.97-6.688 16.59l-183.1 191.1c-9.152 9.594-24.34 9.906-33.9 .7187c-9.625-9.125-9.938-24.38-.7187-33.91l168-175.4L78.71 80.6c-9.219-9.5-8.906-24.78 .7187-33.91C88.99 37.5 104.2 37.82 113.3 47.41z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-tab" viewBox="0 0 448 512">
|
|
|
<path d="M32 217.1c0-8.8 7.2-16 16-16h144v-93.9c0-7.1 8.6-10.7 13.6-5.7l143.5 143.1c6.3 6.3 6.3 16.4 0 22.7L205.6 410.4c-5 5-13.6 1.5-13.6-5.7v-93.9H48c-8.8 0-16-7.2-16-16v-77.7m-32 0v77.7c0 26.5 21.5 48 48 48h112v61.9c0 35.5 43 53.5 68.2 28.3l143.6-143c18.8-18.8 18.8-49.2 0-68L228.2 78.9c-25.1-25.1-68.2-7.3-68.2 28.3v61.9H48c-26.5 0-48 21.6-48 48zM436 64h-8c-6.6 0-12 5.4-12 12v360c0 6.6 5.4 12 12 12h8c6.6 0 12-5.4 12-12V76c0-6.6-5.4-12-12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-paste" viewBox="0 0 512 512"><path d="M160 32c11.6 0 21.3 8.2 23.5 19.2C185 58.6 191.6 64 199.2 64H208c8.8 0 16 7.2 16 16V96H96V80c0-8.8 7.2-16 16-16h8.8c7.6 0 14.2-5.4 15.7-12.8C138.7 40.2 148.4 32 160 32zM64 64h2.7C65 69 64 74.4 64 80V96c0 17.7 14.3 32 32 32H224c17.7 0 32-14.3 32-32V80c0-5.6-1-11-2.7-16H256c17.7 0 32 14.3 32 32h32c0-35.3-28.7-64-64-64H210.6c-9-18.9-28.3-32-50.6-32s-41.6 13.1-50.6 32H64C28.7 32 0 60.7 0 96V384c0 35.3 28.7 64 64 64H192V416H64c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32zM288 480c-17.7 0-32-14.3-32-32V192c0-17.7 14.3-32 32-32h96v56c0 22.1 17.9 40 40 40h56V448c0 17.7-14.3 32-32 32H288zM416 165.3L474.7 224H424c-4.4 0-8-3.6-8-8V165.3zM448 512c35.3 0 64-28.7 64-64V235.9c0-12.7-5.1-24.9-14.1-33.9l-59.9-59.9c-9-9-21.2-14.1-33.9-14.1H288c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H448z"/></symbol>
|
|
|
<symbol id="svg-cut" viewBox="0 0 512 512"><path d="M485.6 444.2L333.6 314.9C326.9 309.2 326.1 299.1 331.8 292.4C337.5 285.6 347.6 284.8 354.4 290.5L506.4 419.8C513.1 425.5 513.9 435.6 508.2 442.4C502.5 449.1 492.4 449.9 485.6 444.2zM485.7 67.76C492.5 62.07 502.5 62.94 508.2 69.69C513.9 76.45 513.1 86.55 506.3 92.24L208.5 343.1C218.3 359.7 224 379.2 224 400C224 461.9 173.9 512 112 512C50.14 512 0 461.9 0 400C0 338.1 50.14 288 112 288C141.5 288 168.4 299.4 188.4 318.1L262.2 256L188.4 193.9C168.4 212.6 141.5 224 112 224C50.14 224 0 173.9 0 112C0 50.14 50.14 0 112 0C173.9 0 224 50.14 224 112C224 132.8 218.3 152.3 208.5 168.9L287 235.1L485.7 67.76zM32 112C32 156.2 67.82 192 112 192C156.2 192 192 156.2 192 112C192 67.82 156.2 32 112 32C67.82 32 32 67.82 32 112zM112 480C156.2 480 192 444.2 192 400C192 355.8 156.2 320 112 320C67.82 320 32 355.8 32 400C32 444.2 67.82 480 112 480z"/></symbol>
|
|
|
<symbol id="svg-copy" viewBox="0 0 512 512"><path d="M272 416C263.2 416 256 423.2 256 432V448c0 17.67-14.33 32-32 32H64c-17.67 0-32-14.33-32-32V192c0-17.67 14.33-32 32-32h112C184.8 160 192 152.8 192 144C192 135.2 184.8 128 176 128H63.99c-35.35 0-64 28.65-64 64l.0098 256C0 483.3 28.65 512 64 512h160c35.35 0 64-28.65 64-64v-16C288 423.2 280.8 416 272 416zM502.6 86.63l-77.25-77.25C419.4 3.371 411.2 0 402.7 0H288C252.7 0 224 28.65 224 64v256c0 35.35 28.65 64 64 64h160c35.35 0 64-28.65 64-64V109.3C512 100.8 508.6 92.63 502.6 86.63zM416 45.25L466.7 96H416V45.25zM480 320c0 17.67-14.33 32-32 32h-160c-17.67 0-32-14.33-32-32V64c0-17.67 14.33-32 32-32h96l.0026 64c0 17.67 14.33 32 32 32H480V320z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-angle-double-right" viewBox="0 0 512 512"><path d="M470.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 256 265.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160zm-352 160l160-160c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-angle-double-left" viewBox="0 0 512 512"><path d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L301.3 256 438.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-trash" viewBox="0 0 448 512">
|
|
|
<path d="M336 64l-33.6-44.8C293.3 7.1 279.1 0 264 0h-80c-15.1 0-29.3 7.1-38.4 19.2L112 64H24C10.7 64 0 74.7 0 88v2c0 3.3 2.7 6 6 6h26v368c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V96h26c3.3 0 6-2.7 6-6v-2c0-13.3-10.7-24-24-24h-88zM184 32h80c5 0 9.8 2.4 12.8 6.4L296 64H152l19.2-25.6c3-4 7.8-6.4 12.8-6.4zm200 432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V96h320v368zm-176-44V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm-80 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12zm160 0V156c0-6.6 5.4-12 12-12h8c6.6 0 12 5.4 12 12v264c0 6.6-5.4 12-12 12h-8c-6.6 0-12-5.4-12-12z"/>
|
|
|
</symbol>
|
|
|
<symbol id="svg-keyboard-down" viewBox="0 0 576 512"><path d="M64 48c-8.8 0-16 7.2-16 16V240c0 8.8 7.2 16 16 16H512c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H64zM0 64C0 28.7 28.7 0 64 0H512c35.3 0 64 28.7 64 64V240c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM159 359c9.4-9.4 24.6-9.4 33.9 0l95 95 95-95c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L305 505c-4.5 4.5-10.6 7-17 7s-12.5-2.5-17-7L159 393c-9.4-9.4-9.4-24.6 0-33.9zm1-167c0-8.8 7.2-16 16-16H400c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V192zM120 88h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H120c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H200c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H280c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16zm64 16c0-8.8 7.2-16 16-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H360c-8.8 0-16-7.2-16-16V104zm96-16h16c8.8 0 16 7.2 16 16v16c0 8.8-7.2 16-16 16H440c-8.8 0-16-7.2-16-16V104c0-8.8 7.2-16 16-16z"/></symbol>
|
|
|
</svg>`;function Im(e){e.resetKeycapRegistry(),Em();const t=document.createElement("div");t.className="ML__keyboard";const n=document.createElement("div");n.className="MLK__plate",n.innerHTML=window.MathfieldElement.createHTML(Lm+e.normalizedLayouts.map((f,b)=>Tm(e,f,b)).join(""));const i=document.createElement("div");i.className="MLK__backdrop",i.appendChild(n),t.appendChild(i),t.addEventListener("pointerdown",$m,{passive:!1});const o=t.querySelectorAll(".ML__edit-toolbar");if(o)for(const f of o)f.addEventListener("click",b=>{var C,k;let $=b.target,ne="";for(;$&&!ne;)ne=(C=$==null?void 0:$.getAttribute("data-command"))!=null?C:"",$=(k=$==null?void 0:$.parentElement)!=null?k:null;ne&&e.executeCommand(JSON.parse(ne))});Mm(t.querySelectorAll(".MLK__keycap, .action, .fnbutton, .bigfnbutton"));const c=t.querySelectorAll(".MLK__layer");console.assert(c.length>0,"No virtual keyboards available");for(const f of c)f.addEventListener("pointerdown",b=>b.preventDefault());return e.currentLayer=e.latentLayer,t}function Tm(e,t,n){const i=[];if(!("layers"in t))return"";for(const o of t.layers)i.push(`<div tabindex="-1" class="MLK__layer" id="${o.id}">`),(e.normalizedLayouts.length>1||t.displayEditToolbar)&&(i.push("<div class='MLK__toolbar' role='toolbar'>"),i.push(Cm(e,n)),t.displayEditToolbar&&i.push('<div class="ML__edit-toolbar right"></div>'),i.push("</div>")),i.push(Dm(e,o)),i.push("</div>");return i.join("")}function Dm(e,t){if(typeof t=="string")return t;let n="";if(typeof t.style=="string"?n+=`<style>${t.style}</style>`:typeof t.style=="object"&&(n+=`<style>${xm(t.style)}</style>`),t.backdrop&&(n+=`<div class='${t.backdrop}'>`),t.container&&(n+=`<div class='${t.container}'>`),t.rows){n+="<div class=MLK__rows>";for(const i of t.rows){n+="<div dir='ltr' class=MLK__row>";for(const o of i)if(o){const c=e.registerKeycap(o),[f,b]=Kd(o);/(^|\s)separator/.test(b)?n+=`<div class="${b}"`:n+=`<div tabindex="-1" id="${c}" class="${b}"`,o.tooltip&&(n+=` data-tooltip="${o.tooltip}"`),n+=`>${f}</div>`}n+="</div>"}n+="</div>"}else t.markup&&(n+=t.markup);return t.container&&(n+="</div>"),t.backdrop&&(n+="</div>"),n}function Kd(e,t={shifted:!1}){var n,i,o,c,f,b,C;let k="",$=(n=e.class)!=null?n:"";if(t.shifted&&Cu(e)&&($+=" is-active"),t.shifted&&"shift"in e)typeof e.shift=="string"?k=ad(e.shift):typeof e.shift=="object"&&(k=e.shift.label?e.shift.label:(i=ad(e.shift.latex||e.shift.insert||"")||e.shift.key)!=null?i:""),typeof e.shift=="object"&&($=(c=(o=e.shift.class)!=null?o:e.class)!=null?c:"");else{if(k=e.label?e.label:(f=ad(e.latex||e.insert||"")||e.key)!=null?f:"",e.shift){let ne;typeof e.shift=="string"?ne=ad(e.shift):e.shift.label?ne=e.shift.label:ne=(b=ad(e.shift.latex||e.shift.insert||"")||e.shift.key)!=null?b:"",k+=`<span class="MLK__shift">${ne}</span>`}e.aside&&(k+=`<aside>${e.aside}</aside>`)}return e.layer&&!/layer-switch/.test($)&&($+=" layer-switch"),/(^|\s)(separator|action|shift|fnbutton|bigfnbutton)($|\s)/.test($)||($+=" MLK__keycap"),!/\bw[0-9]+\b/.test($)&&e.width&&($+=(C={0:" w0",.5:" w5",1.5:" w15",2:" w20",5:" w50"}[e.width])!=null?C:""),[k,$||"MLK__keycap"]}var Zc={"[left]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-left /></svg>",command:["performWithFeedback","moveToPreviousChar"],shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-left /></svg>",command:["performWithFeedback","extendSelectionBackward"]}},"[right]":{class:"action hide-shift",label:"<svg class=svg-glyph><use xlink:href=#svg-arrow-right /></svg>",command:["performWithFeedback","moveToNextChar"],shift:{label:"<svg class=svg-glyph><use xlink:href=#svg-angle-double-right /></svg>",command:["performWithFeedback","extendSelectionForward"]}},"[up]":{class:"action hide-shift",label:"\u2191",command:["performWithFeedback","moveUp"],shift:{label:"\u219F",command:["performWithFeedback","extendSelectionUpward"]}},"[down]":{class:"action hide-shift",label:"\u2193",command:["performWithFeedback","moveDown"],shift:{label:"\u21A1",command:["performWithFeedback","extendSelectionDownward"]}},"[return]":{class:"action hide-shift",command:["performWithFeedback","commit"],shift:{command:["performWithFeedback","addRowAfter"]},width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[action]":{class:"action hide-shift",command:["performWithFeedback","commit"],shift:{label:"<svg class=svg-glyph><use xlink:href=#circle-plus /></svg>",command:["performWithFeedback","addRowAfter"]},width:1.5,label:"<svg class=svg-glyph><use xlink:href=#svg-commit /></svg>"},"[hr]":{class:"separator horizontal-rule"},"[hide-keyboard]":{class:"action",command:["hideVirtualKeyboard"],width:1.5,label:"<svg class=svg-glyph-lg><use xlink:href=#svg-keyboard-down /></svg>"},"[.]":{variants:".",command:["performWithFeedback","insertDecimalSeparator"],shift:",",class:"big-op hide-shift",label:"."},"[,]":{variants:",",command:["performWithFeedback","insertDecimalSeparator"],shift:".",class:"big-op hide-shift",label:","},"[+]":{variants:[{latex:"\\sum_{#0}^{#0}",class:"small"},"\\oplus"],latex:"+",label:"+",class:"big-op hide-shift",shift:{latex:"\\sum",insert:"\\sum",class:"small"}},"[-]":{variants:["\\pm","\\ominus"],latex:"-",label:"−",shift:"\\pm",class:"big-op hide-shift"},"[/]":{class:"big-op hide-shift",shift:{class:"",latex:"\\frac{1}{#@}"},variants:["/","\\div","\\%","\\oslash"],latex:"\\frac{#@}{#?}",label:"÷"},"[*]":{variants:[{latex:"\\prod_{#0}^{#0}",class:"small"},"\\otimes","\\cdot"],latex:"\\cdot",label:"×",shift:{latex:"\\times"},class:"big-op hide-shift"},"[=]":{variants:["\\neq","\\equiv","\\varpropto","\\thickapprox","\\lt","\\gt","\\le","\\ge"],latex:"=",label:"=",shift:{label:"\u2260",latex:"\\ne"},class:"big-op hide-shift"},"[backspace]":{class:"action bottom right hide-shift",width:1.5,command:["performWithFeedback","deleteBackward"],label:"<svg class=svg-glyph><use xlink:href=#svg-delete-backward /></svg>",shift:{class:"action warning",label:"<svg class=svg-glyph><use xlink:href=#svg-trash /></svg>",command:"deleteAll"}},"[undo]":{class:"ghost if-can-undo",command:"undo",label:"<svg class=svg-glyph><use xlink:href=#svg-undo /></svg>",tooltip:"tooltip.undo"},"[redo]":{class:"ghost if-can-redo",command:"redo",label:"<svg class=svg-glyph><use xlink:href=#svg-redo /></svg>",tooltip:"tooltip.redo"},"[(]":{variants:[{latex:"\\lbrack",key:"["},"\\langle","\\lfloor","\\lceil",{latex:"\\lbrace",key:"{"}],key:"(",label:"(",shift:{label:"[",key:"["},class:"hide-shift"},"[)]":{variants:[{latex:"\\rbrack",key:"]"},"\\rangle","\\rfloor","\\rceil",{latex:"\\rbrace",key:"]"}],key:")",label:")",shift:{label:"]",latex:"\\rbrack"},class:"hide-shift"},"[0]":{variants:"0",latex:"0",label:"0",shift:"\\infty",class:"hide-shift"},"[1]":{variants:"1",latex:"1",label:"1",shift:"#@^{-1}",class:"hide-shift"},"[2]":{variants:"2",latex:"2",label:"2",shift:"#@^2",class:"hide-shift"},"[3]":{variants:"3",latex:"3",label:"3",shift:"#@^3",class:"hide-shift"},"[4]":{variants:"4",latex:"4",label:"4",shift:"#@^4",class:"hide-shift"},"[5]":{variants:"5",latex:"5",label:"5",shift:"#@^5",class:"hide-shift"},"[6]":{variants:"6",latex:"6",label:"6",shift:"#@^6",class:"hide-shift"},"[7]":{variants:"7",latex:"7",label:"7",shift:"#@^7",class:"hide-shift"},"[8]":{variants:"8",latex:"8",label:"8",shift:"#@^8",class:"hide-shift"},"[9]":{variants:"9",latex:"9",label:"9",shift:"#@^9",class:"hide-shift"},"[separator-5]":{class:"separator",width:.5},"[separator]":{class:"separator"},"[separator-10]":{class:"separator"},"[separator-15]":{class:"separator",width:1.5},"[separator-20]":{class:"separator",width:2},"[separator-50]":{class:"separator",width:5},"[shift]":{class:"shift bottom left",width:1.5,label:"<span class=caps-lock-indicator></span><svg class=svg-glyph><use xlink:href=#svg-shift /></svg>"},"[foreground-color]":{variants:"foreground-color",command:["applyStyle",{color:"red"}],label:"<span style='border-radius: 50%;width:22px;height:22px; border: 3px solid #cc2428; box-sizing: border-box'>"},"[background-color]":{variants:"background-color",command:["applyStyle",{backgroundColor:"yellow"}],label:"<span style='border-radius: 50%;width:22px;height:22px; background:#fff590; box-sizing: border-box'></span>"}};function Ph(e){var t;if(typeof e=="string"){if(e==="[.]"&&window.MathfieldElement.decimalSeparator===","&&(e="[,]"),!Zc[e])return{latex:e};e={label:e}}let n;return"label"in e&&e.label&&Zc[e.label]&&(n=F(E(E({},Zc[e.label]),e),{label:Zc[e.label].label})),"key"in e&&e.key&&Zc[e.key]&&(n=F(E(E({},Zc[e.key]),e),{key:Zc[e.key].key})),n?(n.command==="insertDecimalSeparator"&&(n.label=(t=window.MathfieldElement.decimalSeparator)!=null?t:"."),e.label==="[action]"&&(n=E(E({},n),window.mathVirtualKeyboard.actionKeycap)),e.label==="[shift]"&&(n=E(E({},n),window.mathVirtualKeyboard.shiftKeycap)),e.label==="[backspace]"&&(n=E(E({},n),window.mathVirtualKeyboard.backspaceKeycap)),e.label==="[tab]"&&(n=E(E({},n),window.mathVirtualKeyboard.tabKeycap)),n):e}var sd;function $m(e){var t;if(e.button!==0)return;const n=xc.singleton;if(!n)return;let i=e.target;for(;i&&!i.getAttribute("data-layer");)i=i.parentElement;if(i){n.currentLayer=(t=i.getAttribute("data-layer"))!=null?t:"",e.preventDefault();return}const o=Su(e.target);if(!(o!=null&&o.id))return;const c=n.getKeycap(o.id);if(!c)return;console.assert(e.type==="pointerdown");const f=new AbortController,b=f.signal;o.classList.add("is-pressed"),o.addEventListener("pointerenter",Hd(f),{capture:!0,signal:b}),o.addEventListener("pointerleave",Hd(f),{capture:!0,signal:b}),o.addEventListener("pointercancel",Hd(f),{signal:b}),o.addEventListener("pointerup",Hd(f),{signal:b}),Cu(c)&&(o.classList.add("is-active"),n.shiftPressCount++),c.variants&&(sd&&clearTimeout(sd),sd=setTimeout(()=>{o.classList.contains("is-pressed")&&(o.classList.remove("is-pressed"),o.classList.add("is-active"),e.target&&"releasePointerCapture"in e.target&&e.target.releasePointerCapture(e.pointerId),Th(o,()=>{f.abort(),o==null||o.classList.remove("is-active")}))},300)),e.preventDefault()}function Hd(e){return t=>{const n=Su(t.target);if(!(n!=null&&n.id))return;const i=xc.singleton;if(!i)return;const o=i.getKeycap(n.id);if(o){if(t.type==="pointerenter"&&t.target===n&&t.isPrimary&&n.classList.add("is-pressed"),t.type==="pointercancel"){n.classList.remove("is-pressed"),Cu(o)&&(i.shiftPressCount--,n.classList.toggle("is-active",i.isShifted)),e.abort();return}if(t.type==="pointerleave"&&t.target===n){n.classList.remove("is-pressed"),Cu(o)&&(i.shiftPressCount--,n.classList.toggle("is-active",i.isShifted));return}if(t.type==="pointerup"){sd&&clearTimeout(sd),Cu(o)?n.classList.toggle("is-active",i.isShifted):n.classList.contains("is-pressed")&&(n.classList.remove("is-pressed"),i.isShifted&&o.shift?typeof o.shift=="string"?i.executeCommand(["insert",o.shift,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]):Tf(o.shift):Tf(o),i.shiftPressCount===1&&!t.shiftKey&&(i.shiftPressCount=0)),e.abort(),t.preventDefault();return}}}}function Tf(e){var t;let n=e.command;!n&&e.insert&&(n=["insert",e.insert,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),!n&&e.key&&(n=["typedText",e.key,{focus:!0,feedback:!0,simulateKeystroke:!0}]),!n&&e.latex&&(n=["insert",e.latex,{focus:!0,feedback:!0,scrollIntoView:!0,mode:"math",format:"latex"}]),n||(n=["typedText",e.label,{focus:!0,feedback:!0,simulateKeystroke:!0}]),(t=xc.singleton)==null||t.executeCommand(n)}function Pm(e){if(e.nodeType!==1)return!1;const t=e.classList;return t.contains("MLK__keycap")||t.contains("shift")||t.contains("action")||t.contains("fnbutton")||t.contains("bigfnbutton")}function Su(e){if(!e)return;let t=e;for(;t&&!Pm(t);)t=t.parentElement;return t!=null?t:void 0}function Cu(e){return!!e.class&&/(^|\s)shift($|\s)/.test(e.class)}var xc=class sp{constructor(){this.originalContainerBottomPadding=null,this.keycapRegistry={},this._shiftPressCount=0;var t,n,i;this.targetOrigin=window.origin,this.originValidator="none",this._alphabeticLayout="auto",this._layouts=Object.freeze(["default"]),this._editToolbar="default",this._container=(n=(t=window.document)==null?void 0:t.body)!=null?n:null,this._visible=!1,this._rebuilding=!1,this.observer=new ResizeObserver(o=>{this.adjustBoundingRect(),this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect})}),this.listeners={};try{(i=window.top)==null||i.addEventListener("message",this)}catch(o){window.addEventListener("message",this)}document.body.addEventListener("focusin",o=>{const c=o.target;c!=null&&c.isConnected&&setTimeout(()=>{const f=Oh();f&&!f.readOnly&&f.mathVirtualKeyboardPolicy==="auto"&&ue()&&this.show({animate:!0})},300)}),document.addEventListener("focusout",o=>{o.target.mathVirtualKeyboardPolicy!=="manual"&&setTimeout(()=>{Oh()||this.hide()},300)})}get currentLayer(){var t,n,i;return(i=(n=(t=this._element)==null?void 0:t.querySelector(".MLK__layer.is-visible"))==null?void 0:n.id)!=null?i:""}set currentLayer(t){var n;if(!this._element){this.latentLayer=t;return}let i=t?this._element.querySelector(`#${t}.MLK__layer`):null;i||(i=this._element.querySelector(".MLK__layer")),i&&((n=this._element.querySelector(".MLK__layer.is-visible"))==null||n.classList.remove("is-visible"),i.classList.add("is-visible")),this.render()}get shiftPressCount(){return this._shiftPressCount}set shiftPressCount(t){var n;this._shiftPressCount=t>2||t<0?0:t,(n=this._element)==null||n.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.render()}get isShifted(){return this._shiftPressCount>0}resetKeycapRegistry(){this.keycapRegistry={}}registerKeycap(t){const n="ML__k"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36);return this.keycapRegistry[n]=t,n}getKeycap(t){return t?this.keycapRegistry[t]:void 0}getLayer(t){const n=this.normalizedLayouts;for(const i of n)for(const o of i.layers)if(o.id===t)return o}get alphabeticLayout(){return this._alphabeticLayout}set alphabeticLayout(t){this._alphabeticLayout=t,this.rebuild()}get actionKeycap(){return this._actionKeycap}set actionKeycap(t){this._actionKeycap=typeof t=="string"?{label:t}:t}get shiftKeycap(){return this._shiftKeycap}set shiftKeycap(t){this._shiftKeycap=typeof t=="string"?{label:t}:t}get backspaceKeycap(){return this._backspaceKeycap}set backspaceKeycap(t){this._backspaceKeycap=typeof t=="string"?{label:t}:t}get tabKeycap(){return this._tabKeycap}set tabKeycap(t){this._tabKeycap=typeof t=="string"?{label:t}:t}get layouts(){return this._layouts}set layouts(t){this.updateNormalizedLayouts(t),this.rebuild()}updateNormalizedLayouts(t){const n=Array.isArray(t)?[...t]:[t],i=n.findIndex(o=>o==="default");i>=0&&n.splice(i,1,"numeric","symbols","alphabetic","greek"),this._layouts=Object.freeze(n),this._normalizedLayouts=n.map(o=>$h(o))}get normalizedLayouts(){return this._normalizedLayouts||this.updateNormalizedLayouts(this._layouts),this._normalizedLayouts}get editToolbar(){return this._editToolbar}set editToolbar(t){this._editToolbar=t,this.rebuild()}get container(){return this._container}set container(t){this._container=t,this.rebuild()}static get singleton(){if(this._singleton===void 0)try{this._singleton=new sp}catch(t){this._singleton=null}return this._singleton}get style(){return this._style}addEventListener(t,n,i){this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].has(n)||this.listeners[t].add(n)}dispatchEvent(t){return!this.listeners[t.type]||this.listeners[t.type].size===0?!0:(this.listeners[t.type].forEach(n=>{typeof n=="function"?n(t):n==null||n.handleEvent(t)}),!t.defaultPrevented)}removeEventListener(t,n,i){this.listeners[t]&&this.listeners[t].delete(n)}get element(){return this._element}set element(t){var n;this._element!==t&&((n=this._element)==null||n.remove(),this._element=t)}get visible(){return this._visible}set visible(t){t?this.show():this.hide()}get boundingRect(){var t;if(!this._visible)return new DOMRect;const n=(t=this._element)==null?void 0:t.getElementsByClassName("MLK__plate")[0];return n?n.getBoundingClientRect():new DOMRect}adjustBoundingRect(){var t,n;const i=this.boundingRect.height;if(this.container===document.body){(t=this._element)==null||t.style.setProperty("--_keyboard-height",`calc(${i}px + var(--_padding-top) + var(--_padding-bottom) + env(safe-area-inset-bottom, 0))`);const o=i-1;this.container.style.paddingBottom=this.originalContainerBottomPadding?`calc(${this.originalContainerBottomPadding} + ${o}px)`:`${o}px`}else(n=this._element)==null||n.style.setProperty("--_keyboard-height",`${i}px`)}rebuild(){if(this._rebuilding||!this._element)return;this._rebuilding=!0;const t=this.currentLayer;requestAnimationFrame(()=>{this._rebuilding=!1,this._element&&(this._element.remove(),this._element=void 0),this.visible&&(this.buildAndAttachElement(),this.currentLayer=t,this.render(),this.adjustBoundingRect(),this._element.classList.add("is-visible"))})}render(){if(!this._element)return;const t=this.getLayer(this.currentLayer);this._element.classList.toggle("backdrop-is-transparent",!!(t&&(t.backdrop||t.container)));const n=this._element.querySelectorAll(".MLK__layer.is-visible .MLK__keycap, .MLK__layer.is-visible .action, .fnbutton, .MLK__layer.is-visible .bigfnbutton, .MLK__layer.is-visible .shift");if(n)for(const i of n){const o=this.getKeycap(i.id);if(o){const[c,f]=Kd(o,{shifted:this.isShifted});i.innerHTML=window.MathfieldElement.createHTML(c),i.className=f}}}show(t){var n;if(this._visible)return;const i=this.container;if(i&&window.mathVirtualKeyboard&&this.stateWillChange(!0)){if(this._element||(this.buildAndAttachElement(),this.adjustBoundingRect()),!this._visible){const o=this._element.getElementsByClassName("MLK__plate")[0];if(o&&this.observer.observe(o),i===window.document.body){const c=i.style.paddingBottom;this.originalContainerBottomPadding=c;const f=o.offsetHeight-1;i.style.paddingBottom=c?`calc(${c} + ${f}px)`:`${f}px`}window.addEventListener("mouseup",this),window.addEventListener("blur",this),window.addEventListener("keydown",this,{capture:!0}),window.addEventListener("keyup",this,{capture:!0}),(n=this._element)==null||n.classList.toggle("is-caps-lock",this.shiftPressCount===2),this.currentLayer=this.latentLayer}this._visible=!0,t!=null&&t.animate?requestAnimationFrame(()=>{this._element&&(this._element.classList.add("animate"),this._element.addEventListener("transitionend",()=>{var o;return(o=this._element)==null?void 0:o.classList.remove("animate")},{once:!0}),this._element.classList.add("is-visible"),this.stateChanged())}):(this._element.classList.add("is-visible"),this.stateChanged())}}hide(t){var n;const i=this.container;if(i&&this._visible&&this.stateWillChange(!1)){if(this._visible=!1,this._element){this.latentLayer=this.currentLayer;const o=this._element.getElementsByClassName("MLK__plate")[0];o&&this.observer.unobserve(o),window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("keydown",this,{capture:!0}),window.removeEventListener("keyup",this,{capture:!0}),window.removeEventListener("contextmenu",this,{capture:!0}),id(),_m(),(n=this._element)==null||n.remove(),this._element=void 0,this.originalContainerBottomPadding!==null&&(i.style.paddingBottom=this.originalContainerBottomPadding)}this.stateChanged()}}get height(){var t,n;return(n=(t=this.element)==null?void 0:t.offsetHeight)!=null?n:0}buildAndAttachElement(){var t;console.assert(!this.element),this.element=Im(this),window.addEventListener("contextmenu",this,{capture:!0}),this.element.addEventListener("contextmenu",n=>{n.shiftKey||((n.ctrlKey||n.button===2)&&Th(n.target),n.preventDefault(),n.stopPropagation())},{capture:!0}),(t=this.container)==null||t.appendChild(this.element)}handleEvent(t){if(If(t)){if(!ju(t.origin,this.originValidator))throw new DOMException(`Message from unknown origin (${t.origin}) cannot be handled`,"SecurityError");t.data.action==="disconnect"?this.connectedMathfieldWindow=void 0:t.data.action!=="update-setting"&&t.data.action!=="proxy-created"&&t.data.action!=="execute-command"&&(console.assert(t.source!==void 0),this.connectedMathfieldWindow=t.source),this.handleMessage(t.data,t.source)}if(this._element)switch(t.type){case"mouseup":case"blur":document.body.style.userSelect="",this.shiftPressCount=0;break;case"contextmenu":t.button!==2&&t.preventDefault();break;case"keydown":{t.key==="Shift"&&!t.repeat&&(this.shiftPressCount=1);break}case"keyup":{(t.key==="Shift"||!t.getModifierState("Shift")&&this.shiftPressCount!==2)&&(this.shiftPressCount=0);break}}}handleMessage(t,n){const{action:i}=t;if(i==="execute-command"){const{command:o}=t,c=xu(o);if(window.top!==void 0&&c!=="virtual-keyboard")return;this.executeCommand(o);return}if((i==="connect"||i==="show")&&this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},n),i!=="disconnect"&&window===window.top){if(i==="show"){typeof t.animate!="undefined"?this.show({animate:t.animate}):this.show();return}if(i==="hide"){typeof t.animate!="undefined"?this.hide({animate:t.animate}):this.hide();return}if(i==="update-setting"){t.alphabeticLayout&&(this.alphabeticLayout=t.alphabeticLayout),t.layouts&&(this.layouts=t.layouts),t.editToolbar&&(this.editToolbar=t.editToolbar);return}if(i==="proxy-created"){this.sendMessage("synchronize-proxy",{boundingRect:this.boundingRect,alphabeticLayout:this._alphabeticLayout,layouts:this._layouts,editToolbar:this._editToolbar},n);return}}}sendMessage(t,n,i){if(i||(i=this.connectedMathfieldWindow),this.targetOrigin===null||this.targetOrigin==="null"||i===window){window.dispatchEvent(new MessageEvent("message",{source:window,data:E({type:zd,action:t},n)}));return}if(i)i.postMessage(E({type:zd,action:t},n),{targetOrigin:this.targetOrigin});else if(n.command&&this.dispatchEvent(new CustomEvent("math-virtual-keyboard-command",{detail:n.command})),t==="execute-command"&&Array.isArray(n.command)&&n.command[0]==="insert"){const o=n.command[1].split("");for(const c of o)this.dispatchEvent(new KeyboardEvent("keydown",{key:c,bubbles:!0})),this.dispatchEvent(new KeyboardEvent("keyup",{key:c,bubbles:!0}))}}stateWillChange(t){return this.dispatchEvent(new CustomEvent("before-virtual-keyboard-toggle",{detail:{visible:t},bubbles:!0,cancelable:!0,composed:!0}))}stateChanged(){this.dispatchEvent(new Event("virtual-keyboard-toggle")),this._visible||(this.dispatchEvent(new Event("geometrychange")),this.sendMessage("geometry-changed",{boundingRect:this.boundingRect}))}focus(){this.sendMessage("focus",{})}blur(){this.sendMessage("blur",{})}updateToolbar(t){const n=this._element;if(!n)return;n.classList.toggle("is-math-mode",t.mode==="math"),n.classList.toggle("is-text-mode",t.mode==="text"),n.classList.toggle("can-undo",t.canUndo),n.classList.toggle("can-redo",t.canRedo),n.classList.toggle("can-copy",!t.selectionIsCollapsed),n.classList.toggle("can-copy",!t.selectionIsCollapsed),n.classList.toggle("can-paste",!0);const i=n.querySelectorAll(".ML__edit-toolbar");if(i)for(const o of i)o.innerHTML=wm(this,t)}update(t){this._style=t.style,this.updateToolbar(t)}connect(){this.connectedMathfieldWindow=window}disconnect(){this.connectedMathfieldWindow=void 0}executeCommand(t){let n,i=[],o=xu(t);return G(t)?(n=t[0],n==="performWithFeedback"&&(t=t.slice(1),o=xu(t)),i=t.slice(1)):n=t,n=n.replace(/-\w/g,c=>c[1].toUpperCase()),o==="virtual-keyboard"?Ol[n].fn(void 0,...i):(this.sendMessage("execute-command",{command:t}),!1)}dispose(){window.removeEventListener("mouseup",this),window.removeEventListener("blur",this),window.removeEventListener("message",this)}};function Oh(){var e,t;let n=$d(),i=null;for(;n;){if("host"in n&&((t=(e=n.host)==null?void 0:e.tagName)==null?void 0:t.toLowerCase())==="math-field"){i=n.host;break}n=n.parentNode}return i}if(ke()&&!("mathVirtualKeyboard"in window))if(window===window.top){const e=xc.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>e})}else Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>gm.singleton,configurable:!0});function Zd(e){const t={};for(const n of Object.keys(e))switch(n){case"scriptDepth":const i=e.scriptDepth;if(G(i))t.scriptDepth=[i[0],i[1]];else if(typeof i=="number")t.scriptDepth=[i,i];else if(typeof i=="string"){const[c,f]=i.split(",").map(b=>parseInt(b.trim()));t.scriptDepth=[c,f]}else throw new TypeError("Unexpected value for scriptDepth");break;case"mathVirtualKeyboardPolicy":let o=e.mathVirtualKeyboardPolicy.toLowerCase();if(o==="sandboxed"){if(window!==window.top){const c=xc.singleton;Object.defineProperty(window,"mathVirtualKeyboard",{get:()=>c})}o="manual"}t.mathVirtualKeyboardPolicy=o;break;case"letterShapeStyle":e.letterShapeStyle==="auto"?Ce.locale.startsWith("fr")?t.letterShapeStyle="french":t.letterShapeStyle="tex":t.letterShapeStyle=e.letterShapeStyle;break;case"defaultMode":["text","math","inline-math"].includes(e.defaultMode)?t.defaultMode=e.defaultMode:(console.error('MathLive 0.98.5: valid values for defaultMode are "text", "math" or "inline-math"'),t.defaultMode="math");break;case"macros":t.macros=T(e.macros);break;default:G(e[n])?t[n]=[...e[n]]:typeof e[n]=="object"&&!(e[n]instanceof Element)&&n!=="computeEngine"?t[n]=E({},e[n]):t[n]=e[n]}return t}function Wc(e,t){let n;typeof t=="string"?n=[t]:t===void 0?n=Object.keys(e):n=t;const i={};for(const o of n)e[o]===null?i[o]=null:G(e[o])?i[o]=[...e[o]]:typeof e[o]=="object"&&!(e[o]instanceof Element)&&o!=="computeEngine"?i[o]=E({},e[o]):i[o]=e[o];return typeof t=="string"?i[t]:i}function Wd(){return{readOnly:!1,defaultMode:"math",macros:{},registers:{},colorMap:be,backgroundColorMap:D,letterShapeStyle:Ce.locale.startsWith("fr")?"french":"tex",minFontScale:0,smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,isImplicitFunction:e=>["\\sin","\\cos","\\tan","\\arcsin","\\arccos","\\arctan","\\arcsec","\\arccsc","\\arsinh","\\arcosh","\\artanh","\\arcsech","\\arccsch","\\arg","\\ch","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\sec","\\sinh","\\sh","\\tanh","\\tg","\\th","\\lg","\\lb","\\log","\\ln"].includes(e),mathModeSpace:"",placeholderSymbol:"\u25A2",contentPlaceholder:"",popoverPolicy:"auto",environmentPopoverPolicy:"off",keybindings:pf,inlineShortcuts:Sd,inlineShortcutTimeout:0,mathVirtualKeyboardPolicy:"auto",virtualKeyboardTargetOrigin:window==null?void 0:window.origin,originValidator:"none",onInlineShortcut:()=>"",onScrollIntoView:null,onExport:hf,value:""}}function Ah(e){return e.defaultMode==="inline-math"?"math":e.defaultMode}function Sc(e,t){!e||!t||(G(e)?e.forEach(n=>Sc(n,t)):typeof e=="object"&&!e.style.color&&!e.style.backgroundColor&&!e.style.fontFamily&&!e.style.fontShape&&!e.style.fontSeries&&!e.style.fontSize&&!e.style.variant&&!e.style.variantStyle&&(e.applyStyle(t),Sc(e.body,t),Sc(e.above,t),Sc(e.below,t),Sc(e.subscript,t),Sc(e.superscript,t)))}function Df(e,t,n,i){function o(f,b){for(const C of c)if(C.style[f]!==b)return!1;return!0}if(t=e.normalizeRange(t),t[0]===t[1])return!1;const c=e.getAtoms(t,{includeChildren:!0});i.operation==="toggle"&&(n.color&&o("color",n.color)&&(n.color="none",delete n.verbatimColor),n.backgroundColor&&o("backgroundColor",n.backgroundColor)&&(n.backgroundColor="none",delete n.verbatimBackgroundColor),n.fontFamily&&o("fontFamily",n.fontFamily)&&(n.fontFamily="none"),n.fontSeries&&o("fontSeries",n.fontSeries)&&(n.fontSeries="auto"),n.fontShape&&o("fontShape",n.fontShape)&&(n.fontShape="auto"),n.fontSize&&o("fontSize",n.fontSize)&&(n.fontSize=Vi),n.variant&&o("variant",n.variant)&&(n.variant="normal"),n.variantStyle&&o("variantStyle",n.variantStyle)&&(n.variantStyle=""));for(const f of c)f.applyStyle(n);return!0}function Om(e,t){const n=e.at(e.position);if(n.type==="composition")n.value=t;else{const{caret:i}=n;n.caret=void 0;const o=new Yl(t,{mode:n.mode});o.caret=i,n.parent.addChildAfter(o,n),e.position+=1}}function Am(e){const t=e.at(e.position);t.type==="composition"&&(t.parent.removeChild(t),e.position-=1)}ye(["math","displaymath"],al),ye("center",al),ce("displaylines","",{parse:e=>{const t=[];let n=[];e.beginContext({tabular:!0});do{if(e.end()||e.match("<}>"))break;e.matchColumnSeparator()||e.matchRowSeparator()?(t.push([n]),n=[]):n.push(...e.scan(i=>["<}>","&","\\cr","\\\\","\\tabularnewline"].includes(i)))}while(!0);return e.endContext(),t.push([n]),t},createAtom:e=>new Ur("lines",e.args,[],{leftDelim:".",rightDelim:".",columns:[{align:"l"}]})}),Ye("array","{columns:colspec}",(e,t,n,i)=>new Ur(e,$f(t),n,{columns:i[0],mathstyleName:"textstyle"})),Ye(["equation","equation*","subequations"],"",(e,t,n)=>new Ur(e,$f(t),n,{columns:[{align:"c"}]})),Ye(["multline","multline*"],"",al),Ye(["align","align*","aligned","eqnarray"],"",al),Ye("split","",al),Ye(["gather","gathered"],"",al),Ye(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],"[columns:colspec]",al),Ye(["smallmatrix","smallmatrix*"],"[columns:colspec]",al),Ye(["cases","dcases","rcases"],"",al);function Bm(e){for(const t of e)for(const n of t)if(n.length>0)return!1;return!0}function $f(e,t=1){return Bm(e)?Array(t).fill([[new Zt({type:"first"}),new Dr]]):e.map(n=>n.length===0?[[new Zt({type:"first"})]]:n.map(i=>i.length===0?[new Zt({type:"first"})]:(i[0].type!=="first"&&i.unshift(new Zt({type:"first"})),i)))}function al(e,t=[[[]]],n=[],i=[]){switch(t=$f(t,["split","align","align*","aligned","eqnarray"].includes(e)?2:1),e){case"math":return new Ur(e,t,n,{mathstyleName:"textstyle"});case"displaymath":return new Ur(e,t,n,{mathstyleName:"textstyle"});case"center":return new Ur(e,t,n,{columns:[{align:"c"}]});case"multline":case"multline*":return new Ur(e,t,n,{columns:[{align:"m"}],leftDelim:".",rightDelim:"."});case"split":return new Ur(e,t,n,{columns:[{align:"r"},{align:"l"}],minColumns:2});case"gather":case"gathered":return new Ur(e,t,n,{columns:[{gap:.25},{align:"c"},{gap:0}]});case"pmatrix":case"pmatrix*":return new Ur(e,t,n,{mathstyleName:"textstyle",leftDelim:"(",rightDelim:")",columns:jc(i[0])});case"bmatrix":case"bmatrix*":return new Ur(e,t,n,{mathstyleName:"textstyle",leftDelim:"[",rightDelim:"]",columns:jc(i[0])});case"Bmatrix":case"Bmatrix*":return new Ur(e,t,n,{mathstyleName:"textstyle",leftDelim:"\\lbrace",rightDelim:"\\rbrace",columns:jc(i[0])});case"vmatrix":case"vmatrix*":return new Ur(e,t,n,{mathstyleName:"textstyle",leftDelim:"\\vert",rightDelim:"\\vert",columns:jc(i[0])});case"Vmatrix":case"Vmatrix*":return new Ur(e,t,n,{mathstyleName:"textstyle",leftDelim:"\\Vert",rightDelim:"\\Vert",columns:jc(i[0])});case"matrix":case"matrix*":return new Ur(e,t,n,{mathstyleName:"textstyle",leftDelim:".",rightDelim:".",columns:jc(i==null?void 0:i[0])});case"smallmatrix":case"smallmatrix*":return new Ur(e,t,n,{mathstyleName:"scriptstyle",columns:jc(i==null?void 0:i[0]),colSeparationType:"small",arraystretch:.5});case"cases":case"dcases":return new Ur(e,t,n,{mathstyleName:e==="dcases"?"displaystyle":"textstyle",arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",columns:[{align:"l"},{gap:1},{align:"l"}]});case"rcases":return new Ur(e,t,n,{arraystretch:1.2,leftDelim:".",rightDelim:"\\rbrace",columns:[{align:"l"},{gap:1},{align:"l"}]});case"lines":return new Ur(e,t,n,{leftDelim:".",rightDelim:".",columns:[{align:"l"}]});case"align":case"align*":case"aligned":case"eqnarray":{let o=0;for(const b of t)o=Math.max(o,b.length);const c=[{gap:0},{align:"r"},{gap:.25},{align:"l"}];let f=2;for(;f<o;)c.push({gap:1},{align:"r"},{gap:.25},{align:"l"}),f+=2;return c.push({gap:0}),new Ur(e,t,n,{arraycolsep:0,columns:c,minColumns:2})}}return new Ur(e,t,n,{mathstyleName:"textstyle"})}function jc(e){return e!=null?e:[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}]}function Nm(e,t){let n=e.at(e.position);for(;n&&!(n.parent instanceof Ur);)n=n.parent;if(n&&n.type==="array"&&n.environmentName,!n||!(n.parent instanceof Ur)){const i=e.at(e.position);if(n=i,!n.parent.parent){let o=e.extractAtoms([e.position,e.lastOffset]),c=e.extractAtoms([0,e.position]);c.length===0&&(c=Ud()),o.length===0&&(o=Ud());let f;return t.endsWith("column")?(f=al("split",[[c,o]]),e.root=f,Vc(f,0,0)?Uc(e,f,0,0):Vc(f,0,1)?Uc(e,f,0,1):e.position=e.offsetOf(i)):(f=al("lines",[[c],[o]]),e.root=f,Vc(f,0,0)?Uc(e,f,0,0):Vc(f,1,0)?Uc(e,f,1,0):e.position=e.offsetOf(i)),[void 0,[0,0]]}if(n.parent instanceof Oi){const o=n.parent;let c=e.extractAtoms([e.position,e.offsetOf(o.lastChild)]),f=e.extractAtoms([e.offsetOf(o.firstChild),e.position]);f.length===0&&(f=Ud()),c.length===0&&(c=Ud());let b="pmatrix";const C=o.leftDelim,k=o.rightDelim;C==="("&&(k===")"||k==="?")?b="pmatrix":(C==="["||C==="\\lbrack")&&(k==="]"||k==="\\rbrack"||k==="?")?b="bmatrix":C==="\\vert"&&k==="\\vert"?b="vmatrix":C==="\\Vert"&&k==="\\Vert"?b="Vmatrix":(C==="{"||C==="\\lbrace")&&(k==="."||k==="?")&&(b="cases");const $=al(b,t.endsWith("column")?[[f,c]]:[[f],[c]]);return o.parent.addChildBefore($,o),o.parent.removeChild(o),Vc($,0,0)?Uc(e,$,0,0):t.endsWith("column")?Vc($,0,1)?Uc(e,$,0,1):e.position=e.offsetOf(n):Vc($,1,0)?Uc(e,$,1,0):e.position=e.offsetOf(n),[void 0,[0,0]]}}return n&&n.parent instanceof Ur?[n.parent,n.parentBranch]:[void 0,[0,0]]}function Vc(e,t,n){const i=e.getCell(t,n);return!i||i.length!==2?!1:i[1].type==="placeholder"}function Rm(e,t,n,i){const o=t.getCell(n,i);return o?[e.offsetOf(o[0]),e.offsetOf(o[o.length-1])]:-1}function Uc(e,t,n,i){const o=Rm(e,t,n,i);typeof o!="number"&&e.setSelection(o)}function jd(e,t,n,i,o){const c=t.getCell(n,i);c&&e.setPositionHandlingPlaceholder(e.offsetOf(c[o==="start"?0:c.length-1]))}function Vd(e,t){const[n,[i,o]]=Nm(e,t);if(n)switch(t){case"after row":n.addRowAfter(i),jd(e,n,i+1,0,"end");break;case"after column":if(n.maxColumns<=n.colCount){e.announce("plonk");return}n.addColumnAfter(o),jd(e,n,i,o+1,"end");break;case"before row":n.addRowBefore(i),jd(e,n,i,0,"start");break;case"before column":if(n.maxColumns<=n.colCount){e.announce("plonk");return}n.addColumnBefore(o),jd(e,n,i,o,"start");break}}function Bh(e){return e.contentWillChange({inputType:"insertText"})?(Vd(e,"after row"),e.contentDidChange({inputType:"insertText"}),!0):!1}function zm(e){return e.contentWillChange({inputType:"insertText"})?(Vd(e,"before row"),e.contentDidChange({inputType:"insertText"}),!0):!1}function Nh(e){return e.contentWillChange({inputType:"insertText"})?(Vd(e,"after column"),e.contentDidChange({inputType:"insertText"}),!0):!1}function Fm(e){return e.contentWillChange({inputType:"insertText"})?(Vd(e,"before column"),e.contentDidChange({inputType:"insertText"}),!0):!1}function Rh(e,t){if(!e.contentWillChange({}))return!1;e.mathfield.snapshot();let n=".",i=".";switch(t){case"pmatrix":case"pmatrix*":n="(",i=")";break;case"bmatrix":case"bmatrix*":n="[",i="]";break;case"Bmatrix":case"Bmatrix*":n="\\lbrace",i="\\rbrace";break;case"vmatrix":case"vmatrix*":n="\\vert",i="\\vert";break;case"Vmatrix":case"Vmatrix*":n="\\Vert",i="\\Vert";break;case"matrix":case"matrix*":n=".",i=".";break;case"cases":case"dcases":n="\\lbrace";break;case"rcases":i="\\rbrace";break}const o=e.at(e.position),c=o.type==="array"?o:e.parentEnvironment;return c.environmentName=t,c.leftDelim=n,c.rightDelim=i,e.contentDidChange({}),!0}function zh(e,t){let n=e.at(e.position);for(;n&&!(Array.isArray(n.parentBranch)&&n.parent instanceof Ur);)n=n.parent;if(Array.isArray(n==null?void 0:n.parentBranch)&&(n==null?void 0:n.parent)instanceof Ur){const i=n.parent,o=n.parentBranch;let c;switch(t){case"row":if(i.rowCount>1){i.removeRow(o[0]);const f=i.getCell(Math.max(0,o[0]-1),o[1]);c=e.offsetOf(f[f.length-1])}break;case"column":if(i.colCount>i.minColumns){i.removeColumn(o[1]);const f=i.getCell(o[0],Math.max(0,o[1]-1));c=e.offsetOf(f[f.length-1])}break}c&&e.setPositionHandlingPlaceholder(c)}}function Km(e){return e.contentWillChange({inputType:"deleteContent"})?(zh(e,"row"),e.contentDidChange({inputType:"deleteContent"}),!0):!1}function Hm(e){return e.contentWillChange({inputType:"deleteContent"})?(zh(e,"column"),e.contentDidChange({inputType:"deleteContent"}),!0):!1}$s({addRowAfter:Bh,addColumnAfter:Nh,addRowBefore:zm,addColumnBefore:Fm,removeRow:Km,removeColumn:Hm,setEnvironment:Rh},{target:"model",canUndo:!0,changeContent:!0,changeSelection:!0});function Ud(){return[new Dr]}var Fh=class lp{constructor(t){this.recording=!1,this.model=t,this.reset()}reset(){this.stack=[],this.index=-1,this.lastOp=""}startRecording(){this.recording=!0}stopRecording(){this.recording=!1}canUndo(){return this.index-1>=0}canRedo(){return this.stack.length-1>this.index}stopCoalescing(t){t&&this.index>=0&&(this.stack[this.index].selection=t),this.lastOp=""}undo(){return this.canUndo()?(this.model.setState(this.stack[this.index-1],{silenceNotifications:!1,type:"undo"}),this.index-=1,this.lastOp="",!0):!1}redo(){return this.canRedo()?(this.index+=1,this.model.setState(this.stack[this.index],{silenceNotifications:!1,type:"redo"}),this.lastOp="",!0):!1}pop(){this.canUndo()&&(this.stack.splice(this.index,this.stack.length-this.index),this.index-=1)}snapshot(t){return this.recording?(t&&t===this.lastOp&&this.pop(),this.stack.splice(this.index+1,this.stack.length-this.index-1),this.stack.push(this.model.getState()),this.index+=1,this.stack.length>lp.maximumDepth&&(this.stack.shift(),this.index-=1),this.lastOp=t!=null?t:"",!0):!1}};Fh.maximumDepth=1e3;var Zm=Fh;function Pf(e,t,n){if(e.at(t).mode!=="text")return t;const i=n==="backward"?-1:1;let o;if(y.test(e.at(t).value)){let c=t,f;do f=e.at(c).mode==="text"&&y.test(e.at(c).value),c+=i;while(e.at(c)&&f);o=e.at(c)?c-2*i:c-i}else if(/\s/.test(e.at(t).value)){let c=t;for(;e.at(c)&&e.at(c).mode==="text"&&/\s/.test(e.at(c).value);)c+=i;if(!e.at(c))o=c-i;else{let f=!0;do f=e.at(c).mode==="text"&&!/\s/.test(e.at(c).value),c+=i;while(e.at(c)&&f);o=e.at(c)?c-2*i:c-i}}else{let c=t;for(;e.at(c)&&e.at(c).mode==="text"&&!/\s/.test(e.at(c).value);)c+=i;o=e.at(c)?c:c-i;let f=!0;for(;e.at(c)&&f;)f=e.at(c).mode==="text"&&/\s/.test(e.at(c).value),f&&(o=c),c+=i;o=e.at(c)?c-2*i:c-i}return o-(i>0?0:1)}function wu(e,t,n){var i,o,c,f,b,C,k;const $=e.position;(i=n==null?void 0:n.extend)!=null&&i||e.collapseSelection(t);let ne=e.at(e.position);if(t==="forward"&&(ne.type==="subsup"?(ne=ne.rightSibling,ne||(ne=e.at(e.position+1))):ne=e.at(e.position+1)),!ne)return e.announce("plonk"),!1;let Me=e.offsetOf(ne);if(ne instanceof vl)Me=Pf(e,Me,t);else if(ne instanceof Ro)if(ne.isSuggestion)for(console.assert(t==="forward");ne&&ne instanceof Ro;)ne.isSuggestion=!1,Me=e.offsetOf(ne),ne=ne.rightSibling;else if(t==="forward"){if(ne=ne.rightSibling,!ne||!(ne instanceof Ro))return e.announce("plonk"),!1;for(;ne&&ne instanceof Ro&&/[a-zA-Z\*]/.test(ne.value);)Me=e.offsetOf(ne),ne=ne.rightSibling}else{if(ne=ne.leftSibling,!ne||!(ne instanceof Ro))return e.announce("plonk"),!1;for(;ne&&ne instanceof Ro&&/[a-zA-Z\*]/.test(ne.value);)Me=e.offsetOf(ne),ne=ne.leftSibling}else if(t==="forward"&&ne.type==="mopen"){let We=0;do ne.type==="mopen"?We+=1:ne.type==="mclose"&&(We-=1),ne=ne.rightSibling;while(!ne.isLastSibling&&We!==0);Me=e.offsetOf(ne.leftSibling)}else if(t==="backward"&&ne.type==="mclose"){let We=0;do ne.type==="mopen"?We+=1:ne.type==="mclose"&&(We-=1),ne=ne.leftSibling;while(!ne.isFirstSibling&&We!==0);Me=e.offsetOf(ne)}else if(t==="backward")if(ne.type==="first")for(;Me>0&&ne.type==="first";)Me-=1,ne=e.at(Me);else{const We=ne.type;ne.type==="subsup"&&(Me=e.offsetOf(e.at(Me).leftSibling)),Me-=1;let Je=(o=e.at(Me))==null?void 0:o.type;for(;Me>=0&&Je===We;)((c=e.at(Me))==null?void 0:c.type)==="subsup"?Me=e.offsetOf(e.at(Me).leftSibling):Me-=1,Je=e.at(Me).type}else{const{type:We}=ne;let Je=(f=e.at(Me))==null?void 0:f.type;const{lastOffset:Ot}=e;for(;Me<=Ot&&(Je===We||Je==="subsup");){for(;((b=e.at(Me).rightSibling)==null?void 0:b.type)==="subsup";)Me=e.offsetOf(e.at(Me).rightSibling);Me+=1,Je=(C=e.at(Me))==null?void 0:C.type}Me-=1}if((k=n==null?void 0:n.extend)!=null&&k){if(!e.setSelection(e.anchor,Me))return e.announce("plonk"),!1}else{if(Me===e.position)return e.announce("plonk"),!1;e.position=Me}return e.announce("move",$),e.mathfield.stopCoalescingUndo(),!0}function Al(e,t,n){var i,o;if(n=n!=null?n:{extend:!1},e.mathfield.adoptStyle=t==="backward"?"right":"left",t!=="forward"){const[b,C]=Ch(e);b!==void 0&&C!==void 0&&e.deleteAtoms([b,C])}if(t==="upward")return jm(e,n);if(t==="downward")return Vm(e,n);if(n.extend){let b=Gd(e,e.position,t);b<0&&(b=0),b>e.lastOffset&&(b=e.lastOffset);const C=e.setSelection(e.anchor,b);return e.mathfield.stopCoalescingUndo(),C}if(e.selectionIsPlaceholder){e.collapseSelection(t);const b=Al(e,t);return e.mathfield.stopCoalescingUndo(),b}let c=e.position;const f=c;if(e.collapseSelection(t)?(c=e.position,Kh(e,c)||(c=Gd(e,c,t))):c=Gd(e,c,t),c<0||c>e.lastOffset){let b=!0;return e.silenceNotifications||(b=(o=(i=e.mathfield.host)==null?void 0:i.dispatchEvent(new CustomEvent("move-out",{detail:{direction:t},cancelable:!0,bubbles:!0,composed:!0})))!=null?o:!0),b&&e.announce("plonk"),b}return e.setPositionHandlingPlaceholder(c),e.mathfield.stopCoalescingUndo(),e.announce("move",f),!0}function Gd(e,t,n){return t=t+(n==="forward"?1:-1),t<0||t>e.lastOffset||Kh(e,t)?t:Gd(e,t,n)}function Kh(e,t){var n;const i=e.at(t);let o=i.parent;for(;o&&!o.inCaptureSelection;)o=o.parent;return!(o!=null&&o.inCaptureSelection||(n=i.parent)!=null&&n.skipBoundary&&(!i.isFirstSibling&&i.isLastSibling||i.type==="first")||e.mathfield.hasEditablePrompts&&!i.parentPrompt)}function Wm(e,t,n){let i=1/0,o=0;for(;o<t.length;o++){const c=fu(e.getHTMLElement(t[o])).right,f=Math.abs(n-c);if(f<=i)i=f;else break}return t[o-1]}function Xd(e,t,n,i,o){const c=e.mathfield.hasEditablePrompts,f=c?n.filter(k=>k.type==="prompt"&&!k.captureSelection):n,b=fu(e.mathfield.getHTMLElement(t)).right,C=e.offsetOf(Wm(e.mathfield,f,b))-(c?1:0);if(i){const[k,$]=e.selection.ranges[0];let ne;C<(o==="up"?k:$)?ne={ranges:[[C,$]],direction:"backward"}:ne={ranges:[[k,C]],direction:"forward"},e.setSelection(ne)}else e.setPositionHandlingPlaceholder(C);e.announce(`move ${o}`)}function jm(e,t){var n,i;const o=(n=t==null?void 0:t.extend)!=null?n:!1;o||e.collapseSelection("backward");const c=()=>{var C,k;let $=!0;return e.silenceNotifications||($=(k=(C=e.mathfield.host)==null?void 0:C.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"upward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?k:!0),e.announce($?"plonk":"line"),$},f=e.at(e.position);let b=f;for(;b&&b.parentBranch!=="below"&&!(Array.isArray(b.parentBranch)&&b.parent instanceof Ur);)b=b.parent;if(Array.isArray(b==null?void 0:b.parentBranch)&&b.parent instanceof Ur){const C=b.parent;if(b.parentBranch[0]<1)return c();const k=b.parentBranch[0]-1,$=C.array[k][b.parentBranch[1]];if(!$.some(Me=>Me.type==="prompt"&&!Me.captureSelection)&&e.mathfield.hasEditablePrompts)return c();Xd(e,f,$,o,"up")}else if(b){const C=(i=b.parent.branch("above"))!=null?i:b.parent.createBranch("above");if(!C.some($=>$.type==="prompt"&&$.placeholderId)&&e.mathfield.hasEditablePrompts)return c();Xd(e,f,C,o,"up")}else return c();return e.mathfield.stopCoalescingUndo(),!0}function Vm(e,t){var n,i;const o=(n=t==null?void 0:t.extend)!=null?n:!1;o||e.collapseSelection("forward");const c=()=>{var C,k;let $=!0;return e.silenceNotifications||($=(k=(C=e.mathfield.host)==null?void 0:C.dispatchEvent(new CustomEvent("move-out",{detail:{direction:"downward"},cancelable:!0,bubbles:!0,composed:!0})))!=null?k:!0),e.announce($?"plonk":"line"),$},f=e.at(e.position);let b=f;for(;b&&b.parentBranch!=="above"&&!(Array.isArray(b.parentBranch)&&b.parent instanceof Ur);)b=b.parent;if(Array.isArray(b==null?void 0:b.parentBranch)&&b.parent instanceof Ur){const C=b.parent;if(b.parentBranch[0]+1>C.array.length-1)return c();const k=b.parentBranch[0]+1,$=C.array[k][b.parentBranch[1]];if(!$.some(Me=>Me.type==="prompt"&&!Me.captureSelection)&&e.mathfield.hasEditablePrompts)return c();Xd(e,f,$,o,"down")}else if(b){const C=(i=b.parent.branch("below"))!=null?i:b.parent.createBranch("below");if(!C.some($=>$.type==="prompt")&&e.mathfield.hasEditablePrompts)return c();Xd(e,f,C,o,"down")}else return c();return!0}function Hh(e){const t=e.position,n=e.at(t).parent;return n!=null&&n.parent?(e.position=e.offsetOf(n),e.mathfield.stopCoalescingUndo(),e.announce("move",t),!0):(e.announce("plonk"),!1)}function Um(e){let t=0,n=e.at(e.position),i=!1;for(;n;)(!n.hasEmptyBranch("superscript")||!n.hasEmptyBranch("subscript"))&&(t+=1),n.hasEmptyBranch("superscript")?n.hasEmptyBranch("subscript")||(i=!1):i=!0,n=n.parent;return i?t:0}function Gm(e){let t=0,n=e.at(e.position),i=!1;for(;n;)(!n.hasEmptyBranch("superscript")||!n.hasEmptyBranch("subscript"))&&(t+=1),n.hasEmptyBranch("superscript")?n.hasEmptyBranch("subscript")||(i=!0):i=!1,n=n.parent;return i?t:0}function Zh(e){var t;if(e.collapseSelection(),Um(e)>=e.mathfield.options.scriptDepth[1])return e.announce("plonk"),!1;let n=e.at(e.position);return n.subsupPlacement===void 0&&(((t=n.rightSibling)==null?void 0:t.type)!=="subsup"&&n.parent.addChildAfter(new rl({style:n.computedStyle}),n),n=n.rightSibling),n.createBranch("superscript"),e.setSelection(e.getSiblingsRange(e.offsetOf(n.superscript[0]))),!0}function Wh(e){var t;if(e.collapseSelection(),Gm(e)>=e.mathfield.options.scriptDepth[0])return e.announce("plonk"),!1;let n=e.at(e.position);return n.subsupPlacement===void 0&&(((t=e.at(e.position+1))==null?void 0:t.type)!=="subsup"&&n.parent.addChildAfter(new rl({style:e.at(e.position).computedStyle}),n),n=e.at(e.position+1)),n.createBranch("subscript"),e.setSelection(e.getSiblingsRange(e.offsetOf(n.subscript[0]))),!0}function Xm(){function e(C){const k=[],$=[];return[...C.querySelectorAll(`input, select, textarea, a[href], button,
|
|
|
[tabindex], audio[controls], video[controls],
|
|
|
[contenteditable]:not([contenteditable="false"]), details>summary`)].filter(t).forEach((Me,We)=>{const Je=i(Me);Je===0?k.push(Me):$.push({documentOrder:We,tabIndex:Je,node:Me})}),$.sort((Me,We)=>Me.tabIndex===We.tabIndex?Me.documentOrder-We.documentOrder:Me.tabIndex-We.tabIndex).map(Me=>Me.node).concat(k)}function t(C){return!(!n(C)||o(C)||i(C)<0)}function n(C){return!(C.disabled||C.type==="hidden"&&C.tagName.toUpperCase()==="INPUT"||b(C))}function i(C){var k;const $=Number.parseInt((k=C.getAttribute("tabindex"))!=null?k:"NaN",10);return Number.isNaN($)?C.contentEditable==="true"||(C.nodeName==="AUDIO"||C.nodeName==="VIDEO")&&C.getAttribute("tabindex")===null?0:C.tabIndex:$}function o(C){return C.tagName.toUpperCase()==="INPUT"&&C.type==="radio"&&!f(C)}function c(C,k){for(const $ of C)if($.checked&&$.form===k)return $;return null}function f(C){var k;if(!C.name)return!0;const ne=((k=C.form)!=null?k:C.ownerDocument).querySelectorAll('input[type="radio"][name="'+C.name+'"]'),Me=c(ne,C.form);return!Me||Me===C}function b(C){if(!ke()||C===document.activeElement||C.contains(document.activeElement))return!1;if(getComputedStyle(C).visibility==="hidden")return!0;const k=C.getBoundingClientRect();if(k.width===0||k.height===0)return!0;for(;C;){if(getComputedStyle(C).display==="none")return!0;C=C.parentElement}return!1}return ke()?e(document.body):[]}function us(e,t,n="forward"){const i=e.position;if(Array.isArray(t)){const o=e.offsetOf(t[0]),c=e.offsetOf(t[t.length-1]);return n==="forward"?e.setSelection(o,c):e.setSelection(c,o),e.announce("move",i),e.mathfield.stopCoalescingUndo(),!0}return n==="forward"?us(e,[t.leftSibling,t]):us(e,[t,t.leftSibling])}function xl(e,t){const n=e.position;if(typeof t=="number"&&(t=e.at(t)),t.type==="prompt")e.setSelection(e.offsetOf(t.firstChild),e.offsetOf(t.lastChild));else{const i=e.offsetOf(t);t.type==="placeholder"?e.setSelection(i-1,i):e.position=i}return e.announce("move",n),e.mathfield.stopCoalescingUndo(),!0}function Yd(e,t,n=!0){var i,o;const c=t==="forward"?1:-1;e.at(e.anchor).type==="placeholder"&&Al(e,t);let f;const b=e.at(e.anchor).parentPrompt;b?t==="forward"?f=e.offsetOf(b)+1:f=e.offsetOf(b.leftSibling):f=Math.max(e.position+c,0);const C=Of(e,f,t);if(!C||t==="forward"&&e.offsetOf(C)<f||t==="backward"&&e.offsetOf(C)>f){if(!n||!((o=(i=e.mathfield.host)==null?void 0:i.dispatchEvent(new CustomEvent("move-out",{detail:{direction:t},cancelable:!0,bubbles:!0,composed:!0})))==null||o))return e.announce("plonk"),!1;const $=Xm();if(!document.activeElement||$.length<=1)return e.announce("plonk"),!1;let ne=$.indexOf(document.activeElement)+c;return ne<0&&(ne=$.length-1),ne>=$.length&&(ne=0),$[ne].focus(),e.mathfield.stopCoalescingUndo(),!0}return xl(e,C),!0}function Of(e,t=0,n="forward"){return e.findAtom(i=>i.type==="placeholder"||i.type==="prompt"||!e.mathfield.readOnly&&i.treeDepth>2&&i.isFirstSibling&&i.isLastSibling,t,n)}$s({moveToOpposite:e=>{const t={superscript:"subscript",subscript:"superscript",above:"below",below:"above"},n=e.at(e.position),{parent:i}=n;if(!i)return e.announce("plonk"),!1;const o=n.parentBranch;let c;if(typeof o=="string"&&(c=t[o]),!c){const b=n.subsupPlacement?Wh(e):Zh(e);return e.mathfield.stopCoalescingUndo(),b}i.branch(c)||i.createBranch(c);const f=e.setSelection(e.getBranchRange(e.offsetOf(i),c));return e.mathfield.stopCoalescingUndo(),f},moveBeforeParent:e=>{const{parent:t}=e.at(e.position);return t?(e.position=e.offsetOf(t),e.mathfield.stopCoalescingUndo(),!0):(e.announce("plonk"),!1)},moveAfterParent:e=>Hh(e),moveToNextChar:e=>Al(e,"forward"),moveToPreviousChar:e=>Al(e,"backward"),moveUp:e=>Al(e,"upward"),moveDown:e=>Al(e,"downward"),moveToNextWord:e=>wu(e,"forward"),moveToPreviousWord:e=>wu(e,"backward"),moveToGroupStart:e=>{const t=e.offsetOf(e.at(e.position).firstSibling);return t===e.position?(e.announce("plonk"),!1):(e.position=t,e.mathfield.stopCoalescingUndo(),!0)},moveToGroupEnd:e=>{const t=e.offsetOf(e.at(e.position).lastSibling);return t===e.position?(e.announce("plonk"),!1):(e.position=t,e.mathfield.stopCoalescingUndo(),!0)},moveToNextGroup:e=>{var t,n,i,o;if(e.position===e.lastOffset&&e.anchor===e.lastOffset)return Yd(e,"forward");const c=e.at(e.position);if(c.mode==="text"){if(e.selectionIsCollapsed){let Me=c;for(;Me&&Me.mode==="text";)Me=Me.leftSibling;let We=c;for(;((t=We.rightSibling)==null?void 0:t.mode)==="text";)We=We.rightSibling;if(Me&&We)return us(e,[Me,We])}if(c.rightSibling.mode==="text"){let Me=c;for(;Me&&Me.mode==="text";)Me=Me.rightSibling;return Me?(xl(e,(n=Me.leftSibling)!=null?n:Me),e.mathfield.switchMode("math"),!0):xl(e,e.lastOffset)}}const b=e.at(e.anchor).parentPrompt,C=b?e.offsetOf(b)+1:Math.max(e.position+1,0),k=Of(e,C,"forward");if(k)return xl(e,k);const $=jh(e,c,Me=>Me.type==="leftright"||Me.type==="text","forward");if($){if($.mode==="text"){let Me=$;for(;Me&&Me.mode==="text";)Me=Me.rightSibling;return us(e,[(i=$.leftSibling)!=null?i:$,(o=Me.leftSibling)!=null?o:Me])}return us(e,$)}const ne=c.parent;if(ne){if(ne.type==="leftright"||ne.type==="surd")return us(e,ne);if(c.parentBranch==="superscript"&&ne.subscript)return us(e,ne.subscript);if(c.parentBranch==="above"&&ne.below)return us(e,ne.below);if(c.parentBranch==="superscript"||c.parentBranch==="subscript")return xl(e,ne);if(c.parentBranch==="above"||c.parentBranch==="below")return us(e,ne)}return xl(e,e.lastOffset)},moveToPreviousGroup:e=>{var t;if(e.position===0&&e.anchor===0)return Yd(e,"backward");let n=e.at(e.position);const i=n.mode;if(i==="text"){if(e.selectionIsCollapsed){let b=n;for(;b&&b.mode==="text";)b=b.leftSibling;let C=n;for(;((t=C.rightSibling)==null?void 0:t.mode)==="text";)C=C.rightSibling;if(b&&C)return us(e,[b,C])}for(;n&&n.mode==="text";)n=n.leftSibling;return n?xl(e,n):xl(e,0)}const o=e.at(e.anchor).parentPrompt,c=o?e.offsetOf(o.leftSibling):Math.max(e.position-1,0),f=Of(e,c,"backward");if(f)return xl(e,f);if(i==="math"){const b=jh(e,n,k=>k.type==="leftright"||k.type==="text","backward");if(b){if(b.mode==="text"){let k=b;for(;k&&k.mode==="text";)k=k.leftSibling;return us(e,[b,k])}return us(e,b)}const C=n.parent;if(C){if(C.type==="leftright"||C.type==="surd")return us(e,C);if(n.parentBranch==="subscript"&&C.superscript)return us(e,C.superscript);if(n.parentBranch==="below"&&C.above)return us(e,C.above);if(n.parentBranch==="superscript"||n.parentBranch==="subscript")return xl(e,C);if(n.parentBranch==="above"||n.parentBranch==="below")return us(e,C)}return xl(e,0)}return!1},moveToMathfieldStart:e=>e.selectionIsCollapsed&&e.position===0?(e.announce("plonk"),!1):(e.position=0,e.mathfield.stopCoalescingUndo(),!0),moveToMathfieldEnd:e=>e.selectionIsCollapsed&&e.position===e.lastOffset?(e.announce("plonk"),!1):(e.position=e.lastOffset,e.mathfield.stopCoalescingUndo(),!0),moveToSuperscript:Zh,moveToSubscript:Wh},{target:"model",changeSelection:!0}),$s({moveToNextPlaceholder:e=>Yd(e,"forward"),moveToPreviousPlaceholder:e=>Yd(e,"backward")},{target:"model",changeSelection:!0,audioFeedback:"return"});function jh(e,t,n,i){if(i==="forward"){let c=t.rightSibling;for(;c&&!n(c);)c=c.rightSibling;return c}let o=t.leftSibling;for(;o&&!n(o);)o=o.leftSibling;return o}function Jd(e,t,n){typeof t=="function"&&(n=t,t=1/0),t===void 0&&(t=1/0);let i=e.position,o=!1,c="";for(;!o;){const f=e.at(i);o=t===0||f===void 0||f.type==="first"||f.mode!=="math"||!(f.type&&/mord|mpunct|operator/.test(f.type)||f.type==="mop"&&/[a-zA-Z ]+/.test(f.value))||!f.hasEmptyBranch("superscript")||!f.hasEmptyBranch("subscript")||typeof n=="function"&&!n(f),o||(f.mode="text",f.command=f.value,f.verbatimLatex=void 0,c+=f.value),i-=1,t-=1}e.contentDidChange({data:c,inputType:"insertText"})}function Gc(e,t,n){typeof t=="function"&&(n=t,t=1/0),t===void 0&&(t=1/0);let i=e.position,o=!1;const c=[];for(;!o;){const f=e.at(i);o=t===0||!f||f.type==="first"||f.isFirstSibling||f.mode!=="text"||f.value===" "||typeof n=="function"&&!n(f),o||(c.push(Zt.serialize([f],{defaultMode:"math"})),f.mode="math"),i-=1,t-=1}Af(e),e.contentDidChange({data:ri(c),inputType:"insertText"})}function Af(e){var t;let n=e.position-1;for(;n>=0&&((t=e.at(n))==null?void 0:t.mode)==="math";)n-=1;if(!(n<0)&&e.at(n).mode==="text"&&e.at(n).value===" "&&e.at(n-1).mode==="math"){e.at(n-1).parent.removeChild(e.at(n-1));const i=e.silenceNotifications;e.silenceNotifications=!0,e.position-=1,e.silenceNotifications=i,e.contentDidChange({inputType:"deleteContent"})}}function Ym(e){let t="",n=e.position,i=!1;for(;!i;){const o=e.at(n);i=!(o&&(o.mode==="text"||o.mode==="math"&&o.type&&/mord|mpunct/.test(o.type))),i||(t=o.value+t),n-=1}return t}function Jm(e,t,n){const{model:i}=e;if(i.mode==="latex"||!i.at(i.position).isLastSibling||!n||!Dd(n))return!1;const o=vu(n);if(!i.selectionIsCollapsed)return!!(e.model.mode==="text"&&/[/_^]/.test(o));const c=Ym(i)+o;if(e.model.mode==="text"){if(t==="Esc"||/[/\\]/.test(o))return!0;if(/[\^_]/.test(o))return/(^|\s)[a-zA-Z][^_]$/.test(c)&&Gc(i,1),!0;const f={")":"(","}":"{","]":"["}[o],{parent:b}=i.at(i.position);if(f&&b instanceof Oi&&b.leftDelim===f)return!0;if(/(^|[^a-zA-Z])(a|I) $/.test(c))return!1;if(/[$€£₤₺¥¤฿¢₡₧₨₹₩₱]/u.test(o))return!0;if(/(^|[^a-zA-Z'’])[a-zA-Z] $/.test(c))return Gc(i,1),!1;if(/\D\.[^\d\s]$/.test(c)){Gc(i,1);const C=i.at(i.position);return C.value="\u22C5",C.style.variant="normal",C.command="\\cdot",C.verbatimLatex=void 0,i.contentDidChange({data:"\\cdot",inputType:"insertText"}),!0}if(/(^|\s)[a-zA-Z][^a-zA-Z]$/.test(c)||/\.\d$/.test(c)||/\([\d+\-.]$/.test(c))return Gc(i,1),!0;if(/\([a-z][,;]$/.test(c))return Gc(i,2),!0;if(/[\d+\-=><*|]$/.test(o))return Af(i),!0}else{if(t==="[Space]")return Jd(i,void 0,f=>/[a-z][:,;.]$/.test(f.value)),!0;if(/[a-zA-Z]{3,}$/.test(c)&&!/(dxd|abc|xyz|uvw)$/.test(c))return Jd(i,void 0,f=>/[a-zA-Z]/.test(f.value)),!0;if(/(^|\W)(if)$/i.test(c))return Jd(i,1),!0;if(/(\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5){3,}$/u.test(c)&&!/(αβγ)$/.test(c))return Jd(i,void 0,f=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039B|\u039E|\u03A0|\u03A3|\u03A5|\u03A6|\u03A8|\u03A9|[\u03B1-\u03C9]|\u03D1|\u03D5|\u03D6|\u03F1|\u03F5)/u.test(f.value)),!0;if(o==="?"||o==="."&&!/[\d-+]\.$/.test(c))return!0}return!1}function Qm(e,t){if(!e.isSelectionEditable||!e.keystrokeCaptionVisible)return;const n=Vh(),i=e.element.getBoundingClientRect();n.style.left=`${i.left}px`,n.style.top=`${i.top-64}px`,n.innerHTML=window.MathfieldElement.createHTML("<span>"+(wf(t)||t)+"</span>"+n.innerHTML),n.style.visibility="visible",setTimeout(()=>{n.childNodes.length>0&&n.childNodes[n.childNodes.length-1].remove(),n.childNodes.length===0&&(n.style.visibility="hidden")},3e3)}function qm(e){if(e.keystrokeCaptionVisible=!e.keystrokeCaptionVisible,e.keystrokeCaptionVisible){const t=Vh();t.innerHTML=""}else{const t=Od("mathlive-keystroke-caption-panel");t.style.visibility="hidden"}return!1}function Vh(){const e=document.getElementById("mathlive-keystroke-caption-panel");return e||(Ds("keystroke-caption"),Ds("core"),Od("mathlive-keystroke-caption-panel"))}function eg(){document.getElementById("mathlive-keystroke-caption-panel")&&(kf("mathlive-keystroke-caption-panel"),r("core"),r("keystroke-caption"))}function Uh(e,t){var n,i,o;const{model:c}=e,f=xh(t);if(t.isTrusted){Zp(t);const We=ed();e.keyboardLayout!==We.id&&(e.keyboardLayout=We.id,e._keybindings=void 0)}if(clearTimeout(e.inlineShortcutBufferFlushTimer),e.inlineShortcutBufferFlushTimer=0,Qm(e,f),t.isTrusted&&t.defaultPrevented)return e.flushInlineShortcutBuffer(),!1;let b,C="",k;const $=e.inlineShortcutBuffer;if(e.isSelectionEditable){if(c.mode==="math")if(f==="[Backspace]")$.pop();else if(!Dd(t))e.flushInlineShortcutBuffer();else{const We=vu(t),Je=[...(i=(n=$[$.length-1])==null?void 0:n.keystrokes)!=null?i:[],We];$.push({state:c.getState(),keystrokes:Je,leftSiblings:tg(e)});let Ot=0,bn="";for(;!b&&Ot<Je.length;)k=$.length-(Je.length-Ot),bn=Je.slice(Ot).join(""),b=Ru($[k].leftSiblings,bn,e.options.inlineShortcuts),!b&&/^[a-zA-Z][a-zA-Z0-9]+?([_\^][a-zA-Z0-9\*\+\-]+?)?$/.test(bn)&&(b=e.options.onInlineShortcut(e,bn)),Ot+=1;e.flushInlineShortcutBuffer({defer:!0})}e.options.smartMode&&(b?e.switchMode("math"):Jm(e,f,t)&&(e.switchMode({math:"text",text:"math"}[c.mode]),C=""))}if(!b){if(C||(C=Yp(e.keybindings,c.mode,t)),!C&&(f==="[Enter]"||f==="[Return]")){let We=!1;return c.contentWillChange({inputType:"insertLineBreak"})&&(e.host&&(We=!e.host.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),We||t.preventDefault&&(t.preventDefault(),t.stopPropagation()),c.contentDidChange({inputType:"insertLineBreak"})),We}if((!C||f==="[Space]")&&c.mode==="math"){if(f==="[Space]"){if(e.adoptStyle="none",e.flushInlineShortcutBuffer(),e.options.mathModeSpace)return jr.insert(c,e.options.mathModeSpace,{format:"latex",mode:"math"}),e.snapshot("insert-space"),C="",e.dirty=!0,e.scrollIntoView(),t.preventDefault&&(t.preventDefault(),t.stopPropagation()),!1;const We=c.at(c.position+1),Je=c.at(c.position-1);if((We==null?void 0:We.mode)==="text"||(Je==null?void 0:Je.mode)==="text")return jr.insert(c," ",{mode:"text"}),e.snapshot("insert-space"),e.dirty=!0,e.scrollIntoView(),!1}(o=c.at(c.position))!=null&&o.isDigit()&&window.MathfieldElement.decimalSeparator===","&&vu(t)===","&&(C="insertDecimalSeparator")}}if(!b&&!C){if(c.mathfield.smartFence){if(Nf(c,vu(t),e.effectiveStyle))return e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}else{const{parent:We}=c.at(c.position);if(We instanceof Oi&&We.rightDelim==="?"&&c.at(c.position).isLastSibling&&/^[)}\]|]$/.test(f))return e.snapshot(),We.isDirty=!0,We.rightDelim=f,c.position+=1,c.selectionDidChange(),c.contentDidChange({data:vu(t),inputType:"insertText"}),e.snapshot("insert-fence"),e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1;if(!c.selectionIsCollapsed){const Je=vu(t);if(Je==="("||Je==="{"||Je==="["){const Ot={"(":"(","{":"\\lbrace","[":"\\lbrack"}[Je],bn={"(":")","{":"\\rbrace","[":"\\rbrack"}[Je],[Dt,en]=ko(c.selection);return e.snapshot(),c.position=en,jr.insert(c,bn,{format:"latex"}),c.position=Dt,jr.insert(c,Ot,{format:"latex"}),c.setSelection(Dt+1,en+1),c.contentDidChange({data:Je,inputType:"insertText"}),e.snapshot("insert-fence"),e.dirty=!0,e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}}}return!0}const ne=c.at(Math.max(c.position,c.anchor)),{parent:Me}=ne;if(C==="moveAfterParent"&&(Me==null?void 0:Me.type)==="leftright"&&ne.isLastSibling&&e.options.smartFence&&Nf(c,".",e.defaultStyle)&&(C="",za(e)),e.keyboardDelegate.cancelComposition(),C)e.executeCommand(C);else if(b){const We=e.effectiveStyle;c.setState($[k].state);const Je=$[$.length-1].keystrokes;for(const Ot of Je)jr.insert(c,Ot,{silenceNotifications:!0,style:We});e.snapshot("insert-shortcut"),c.setState($[k].state),c.deferNotifications({content:!0,selection:!0,data:b,type:"insertText"},()=>(jr.insert(c,b,{format:"latex",style:We}),Af(e.model),b.endsWith(" ")&&(e.switchMode("text"),jr.insert(c," ",{style:We,mode:"text"})),e.snapshot(),c.selectionIsCollapsed||e.flushInlineShortcutBuffer(),!0)),e.dirty=!0,c.announce("replacement")}return e.scrollIntoView(),t.preventDefault&&t.preventDefault(),!1}function Bf(e,t,n){const{model:i}=e;if(!e.isSelectionEditable){i.announce("plonk");return}n!=null||(n={}),n.focus&&e.focus(),n.feedback&&window.MathfieldElement.playSound("keypress"),typeof n.mode=="string"&&(e.switchMode(n.mode),e.snapshot());let o=ks(t);const c=window.mathVirtualKeyboard;if(c!=null&&c.isShifted&&(o=typeof o=="string"?o.toUpperCase():o.map(C=>C.toUpperCase())),n.simulateKeystroke){let C=!0;for(const k of o)Uh(e,new KeyboardEvent("keypress",{key:k}))&&(C=!1);if(C)return}const f=i.at(i.position),b=E(E({},f.computedStyle),e.defaultStyle);if(i.selectionIsCollapsed||(i.deleteAtoms(ko(i.selection)),e.snapshot("delete")),i.mode==="latex")i.deferNotifications({content:!0,selection:!0,data:t,type:"insertText"},()=>{Pd(e);for(const C of o)jr.insert(i,C);e.snapshot("insert-latex"),nd(e)});else if(i.mode==="text"){for(const C of o)jr.insert(i,C,{style:b});e.snapshot("insert-text")}else if(i.mode==="math")for(const C of o)ng(e,C,b,f);e.dirty=!0,e.scrollIntoView()}function tg(e){const t=e.model,n=[];let i=t.at(Math.min(t.position,t.anchor));for(;i.type!=="first";)n.push(i),i=i.leftSibling;return n}function ng(e,t,n,i){const o=e.model;let c={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[t];if(t===" "&&e.options.mathModeSpace&&(c=["insert",e.options.mathModeSpace]),c){e.executeCommand(c);return}if(/\d/.test(t)&&e.options.smartSuperscript&&i.parentBranch==="superscript"&&i.parent.type!=="mop"&&i.parent.type!=="operator"&&i.parent.type!=="extensible-symbol"&&i.hasNoSiblings){rg(o),jr.insert(o,t,{style:n}),e.snapshot(),Hh(o),e.snapshot();return}if(/[a-zA-Z0-9]/.test(t)&&e.adoptStyle!=="none"){const f=e.adoptStyle==="left"?i:i.parent?i.rightSibling:null;(f==null?void 0:f.type)==="mord"&&/[a-zA-Z0-9]/.test(f.value)&&(n=E({},n),f.style.variant&&(n.variant=f.style.variant),f.style.variantStyle&&(n.variantStyle=f.style.variantStyle))}jr.insert(o,t,{style:n}),e.snapshot(`insert-${o.at(o.position).type}`)}function rg(e){e.selectionIsCollapsed||(e.deleteAtoms(ko(e.selection)),e.mathfield.snapshot("delete"))}function Nf(e,t,n){if(!t||e.mode!=="math")return!1;const i=e.at(e.position),{parent:o}=i,c={"(":"(",")":")","{":"\\lbrace","}":"\\rbrace","[":"\\lbrack","]":"\\rbrack","|":"|"}[t];if(!c)return!1;const f=s[c],b=l[c];if(!e.selectionIsCollapsed){e.mathfield.snapshot();const[C,k]=ko(e.selection),$=e.extractAtoms([C,k]),ne=o.addChildrenAfter([new Oi("left...right",$,{leftDelim:c,rightDelim:b})],e.at(C));return e.setSelection(e.offsetOf(ne.firstChild),e.offsetOf(ne.lastChild)),e.mathfield.snapshot("insert-fence"),e.contentDidChange({data:c,inputType:"insertText"}),!0}if(c==="|"){const C=o instanceof Oi?o.leftDelim+o.rightDelim:"";if(C==="\\lbrace\\rbrace"||C==="\\{\\}"||C==="\\lbrace?")return e.mathfield.snapshot(),jr.insert(e,"\\,\\middle\\vert\\,",{format:"latex",style:n}),e.mathfield.snapshot("insert-fence"),e.contentDidChange({data:c,inputType:"insertText"}),!0}if(b){if(o instanceof Oi&&o.firstChild===i&&(o.leftDelim==="?"||o.leftDelim==="."))return o.leftDelim=c,o.isDirty=!0,e.mathfield.snapshot(),e.contentDidChange({data:c,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;if(!(o instanceof Oi)){let ne=i;for(;ne&&!(ne.type==="mclose"&&ne.value===b);)ne=ne.rightSibling;if(ne){e.mathfield.snapshot();const Me=e.extractAtoms([e.offsetOf(i),e.offsetOf(ne)]);return Me.pop(),o.addChildrenAfter([new Oi("left...right",Me,{leftDelim:c,rightDelim:b})],i),e.position=e.offsetOf(o.firstChild)+1,e.contentDidChange({data:c,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}}const C=e.offsetOf(i.lastSibling);let k;for(k=e.position;k<=C;k++){const ne=e.at(k);if(ne instanceof Oi&&(ne.leftDelim==="?"||ne.leftDelim===".")&&Gh(c,ne.rightDelim))break}const $=e.at(k);if(k<=C&&$ instanceof Oi){$.leftDelim=c,e.mathfield.snapshot();let ne=e.extractAtoms([e.position,k-1]);return ne=ne.filter(Me=>Me.type!=="first"),$.addChildren(ne,$.parentBranch),e.position+=1,e.contentDidChange({data:c,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}if(o instanceof Oi&&(o.leftDelim==="?"||o.leftDelim===".")&&Gh(c,o.rightDelim)){o.isDirty=!0,o.leftDelim=c,e.mathfield.snapshot();const ne=e.extractAtoms([e.offsetOf(i.firstSibling),e.position]);for(const Me of ne)o.parent.addChildBefore(Me,o);return e.contentDidChange({data:c,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}if(!(o instanceof Oi&&o.leftDelim==="|")){if(e.mathfield.snapshot(),jr.insert(e,`\\left${c}\\right?`,{format:"latex",style:n}),i.lastSibling.type!=="first"){const ne=e.offsetOf(i.lastSibling),Me=e.extractAtoms([e.position,ne]);e.at(e.position).body=Me,e.position-=1}return e.mathfield.snapshot("insert-fence"),!0}}if(f){let C=i;for(;C;){if(C.type==="mopen"&&C.value===f){e.mathfield.snapshot();const We=C.leftSibling,Je=e.extractAtoms([e.offsetOf(C.leftSibling),e.offsetOf(i)]);Je.shift();const Ot=new Oi("left...right",Je,{leftDelim:f,rightDelim:c});return o.addChildrenAfter([Ot],We),e.position=e.offsetOf(Ot),e.contentDidChange({data:c,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0}C=C.leftSibling}if(o instanceof Oi&&i.isLastSibling&&Rf(o.leftDelim,c))return e.mathfield.snapshot(),o.isDirty=!0,o.rightDelim=c,e.position+=1,e.contentDidChange({data:c,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;const k=e.offsetOf(i.firstSibling);let $;for($=e.position;$>=k;$--){const We=e.at($);if(We instanceof Oi&&(We.rightDelim==="?"||We.rightDelim===".")&&Rf(We.leftDelim,c))break}const ne=e.at($);if($>=k&&ne instanceof Oi)return e.mathfield.snapshot(),ne.rightDelim=c,ne.addChildren(e.extractAtoms([$,e.position]),ne.parentBranch),e.contentDidChange({data:c,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;if(o instanceof Oi&&(o.rightDelim==="?"||o.rightDelim===".")&&Rf(o.leftDelim,c))return e.mathfield.snapshot(),o.isDirty=!0,o.rightDelim=c,o.parent.addChildren(e.extractAtoms([e.position,e.offsetOf(i.lastSibling)]),o.parentBranch),e.position=e.offsetOf(o),e.contentDidChange({data:c,inputType:"insertText"}),e.mathfield.snapshot("insert-fence"),!0;const Me=o.parent;return Me instanceof Oi&&(Me.rightDelim==="?"||Me.rightDelim===".")&&e.at(e.position).isLastSibling?(e.position=e.offsetOf(Me),Nf(e,c,n)):!1}return!1}function Rf(e,t){return e?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(e)?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(t):l[e]===t:!0}function Gh(e,t){return t?[")","\\rparen","}","\\}","\\rbrace","]","\\rbrack"].includes(t)?["(","\\lparen","{","\\{","\\lbrace","[","\\lbrack"].includes(e):s[t]===e:!0}$s({undo:e=>(e.undo(),!0),redo:e=>(e.redo(),!0),scrollIntoView:e=>(e.scrollIntoView(),!0),scrollToStart:e=>(e.field.scroll(0,0),!0),scrollToEnd:e=>{const t=e.field.getBoundingClientRect();return e.field.scroll(t.left-window.scrollX,0),!0},toggleKeystrokeCaption:qm,toggleContextMenu:e=>{const t=e.toggleContextMenu();return t||e.model.announce("plonk"),t},plonk:e=>(e.model.announce("plonk"),!0),switchMode:(e,t,n,i)=>(e.switchMode(t,n,i),!0),insert:(e,t,n)=>e.insert(t,n),typedText:(e,t,n)=>(Bf(e,t,n),!0),insertDecimalSeparator:e=>{const t=e.model;return t.mode==="math"&&window.MathfieldElement.decimalSeparator===","&&t.at(Math.max(t.position,t.anchor)).isDigit()?(e.insert("{,}",{format:"latex"}),e.snapshot("insert-mord"),!0):(e.insert("."),!0)},commit:e=>{var t;return e.model.contentWillChange({inputType:"insertLineBreak"})&&((t=e.host)==null||t.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),e.model.contentDidChange({inputType:"insertLineBreak"})),!0},insertPrompt:(e,t,n)=>{const i=e.getPrompts();let o="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),c=0;for(;i.includes(o)&&c<100;){if(c===99)return console.error("could not find a unique ID after 100 tries"),!1;o="prompt-"+Date.now().toString(36).slice(-2)+Math.floor(Math.random()*1e5).toString(36),c++}return e.insert(`\\placeholder[${t!=null?t:o}]{}`,n),!0}}),$s({copyToClipboard:e=>(e.focus(),e.model.selectionIsCollapsed&&e.select(),"queryCommandSupported"in document&&document.queryCommandSupported("copy")?document.execCommand("copy"):e.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("copy",{bubbles:!0,composed:!0})),!1)},{target:"mathfield"}),$s({cutToClipboard:e=>(e.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("cut")?document.execCommand("cut"):e.element.querySelector(".ML__keyboard-sink").dispatchEvent(new ClipboardEvent("cut",{bubbles:!0,composed:!0})),!0),pasteFromClipboard:e=>(e.focus(),"queryCommandSupported"in document&&document.queryCommandSupported("paste")?(document.execCommand("paste"),!0):(navigator.clipboard.readText().then(t=>{t&&e.model.contentWillChange({inputType:"insertFromPaste",data:t})?(e.stopCoalescingUndo(),e.stopRecording(),e.insert(t,{mode:e.model.mode})&&(nd(e),e.startRecording(),e.snapshot("paste"),e.model.contentDidChange({inputType:"insertFromPaste"}),za(e))):e.model.announce("plonk"),e.startRecording()}),!0))},{target:"mathfield",canUndo:!0,changeContent:!0,changeSelection:!0});function ig(e,t){e.flushInlineShortcutBuffer(),e.stopCoalescingUndo();const n=zf(e,t),{model:i}=e;return i.selectionIsCollapsed?(e.defaultStyle.fontSeries&&n.fontSeries===e.defaultStyle.fontSeries&&(n.fontSeries="auto"),n.fontShape&&n.fontShape===e.defaultStyle.fontShape&&(n.fontShape="auto"),n.color&&n.color===e.defaultStyle.color&&(n.color="none"),n.backgroundColor&&n.backgroundColor===e.defaultStyle.backgroundColor&&(n.backgroundColor="none"),n.fontSize&&n.fontSize===e.defaultStyle.fontSize&&(n.fontSize="auto"),e.defaultStyle=E(E({},e.defaultStyle),n)):e.model.deferNotifications({content:!0,type:"insertText"},()=>{i.selection.ranges.forEach(o=>Df(i,o,n,{operation:"toggle"})),e.snapshot("style-change")}),!0}$s({applyStyle:ig},{target:"mathfield",canUndo:!0,changeContent:!0});function zf(e,t){var n,i,o,c,f,b,C,k,$,ne;const Me={};if(typeof t.color=="string"){const Je=(i=e.colorMap((n=t.color)!=null?n:t.verbatimColor))!=null?i:"none";Je!==t.color&&(Me.verbatimColor=(o=t.verbatimColor)!=null?o:t.color),Me.color=Je}if(typeof t.backgroundColor=="string"){const Je=(f=e.backgroundColorMap((c=t.backgroundColor)!=null?c:t.verbatimBackgroundColor))!=null?f:"none";Je!==t.backgroundColor&&(Me.verbatimBackgroundColor=(b=t.verbatimBackgroundColor)!=null?b:t.backgroundColor),Me.backgroundColor=Je}typeof t.fontFamily=="string"&&(Me.fontFamily=t.fontFamily),typeof t.series=="string"&&(Me.fontSeries=t.series),typeof t.fontSeries=="string"&&(Me.fontSeries=t.fontSeries.toLowerCase()),Me.fontSeries&&(Me.fontSeries=(C={bold:"b",medium:"m",normal:"m"}[Me.fontSeries])!=null?C:Me.fontSeries),typeof t.shape=="string"&&(Me.fontShape=t.shape),typeof t.fontShape=="string"&&(Me.fontShape=t.fontShape.toLowerCase()),Me.fontShape&&(Me.fontShape=(k={italic:"it",up:"n",upright:"n",normal:"n"}[Me.fontShape])!=null?k:Me.fontShape),t.variant&&(Me.variant=t.variant.toLowerCase()),t.variantStyle&&(Me.variantStyle=t.variantStyle.toLowerCase());const We=($=t.size)!=null?$:t.fontSize;return typeof We=="number"?Me.fontSize=Math.max(1,Math.min(10,We)):typeof We=="string"&&(Me.fontSize=(ne={size1:1,size2:2,size3:3,size4:4,size5:5,size6:6,size7:7,size8:8,size9:9,size10:10}[We.toLowerCase()])!=null?ne:{tiny:1,scriptsize:2,footnotesize:3,small:4,normal:5,normalsize:5,large:6,Large:7,LARGE:8,huge:9,Huge:10}[We]),Me}function Ff(e){let[t,n]=ko(e.selection);if(t=Xh(e,t,"backward"),n=Xh(e,n,"forward"),t===n){const i=e.at(t);if(i.type==="leftright")return e.setSelection(e.offsetOf(i.firstChild)-1,n);if(i.type==="first"&&(i.parent.type==="leftright"||i.parent.type==="surd"))return e.setSelection(t-1,e.offsetOf(i.parent.lastChild)+1);e.setSelection(t-1,n)}else e.setSelection(t,n);return!0}function Xh(e,t,n){var i,o,c;let f=e.at(t);if(!f)return t;const b=n==="forward"?1:-1;if(f.mode==="text"){for(;f&&!(f.mode!=="text"||!y.test(f.value));)t+=b,f=e.at(t);return n==="backward"?t-1:t}if(f.mode==="latex"){if(/[a-zA-Z\*]/.test(f.value))if(n==="backward")for(;f&&f.mode==="latex"&&f.value!=="\\"&&/[a-zA-Z]/.test(f.value);)t+=b,f=e.at(t);else for(;f&&f.mode==="latex"&&/[a-zA-Z\*]/.test(f.value);)t+=b,f=e.at(t);else if(f.value==="{"){if(n==="forward"){for(;f&&f.mode==="latex"&&f.value!=="}";)t+=b,f=e.at(t);return t}return t-1}else if(f.value==="}"){if(n==="backward"){for(;f&&f.mode==="latex"&&f.value!=="{";)t+=b,f=e.at(t);return t-1}return t}return t-1}if(f.mode==="math"){if(f.isDigit()){for(;(i=e.at(t+b))!=null&&i.isDigit();)t+=b;return n==="backward"?t-1:t}if(f.style.variant||f.style.variantStyle){let C=(o=e.at(t))==null?void 0:o.style;for(;C&&C.variant===f.style.variant&&C.variantStyle===f.style.variantStyle;)C=(c=e.at(t+b))==null?void 0:c.style,t+=b;return n==="backward"?t-1:t}return t}return t}$s({selectGroup:e=>{const t=Ff(e);return t||e.announce("plonk"),t},selectAll:e=>e.setSelection(0,e.lastOffset),extendSelectionForward:e=>Al(e,"forward",{extend:!0}),extendSelectionBackward:e=>Al(e,"backward",{extend:!0}),extendToNextWord:e=>wu(e,"forward",{extend:!0}),extendToPreviousWord:e=>wu(e,"backward",{extend:!0}),extendSelectionUpward:e=>Al(e,"upward",{extend:!0}),extendSelectionDownward:e=>Al(e,"downward",{extend:!0}),extendToNextBoundary:e=>wu(e,"forward",{extend:!0}),extendToPreviousBoundary:e=>wu(e,"backward",{extend:!0}),extendToGroupStart:e=>{const t=e.setSelection(e.anchor,e.offsetOf(e.at(e.position).firstSibling));return t||e.announce("plonk"),t},extendToGroupEnd:e=>{const t=e.setSelection(e.anchor,e.offsetOf(e.at(e.position).lastSibling));return t||e.announce("plonk"),t},extendToMathFieldStart:e=>{const t=e.setSelection(e.anchor,0);return t||e.announce("plonk"),t},extendToMathFieldEnd:e=>{const t=e.setSelection(e.anchor,e.lastOffset);return t||e.announce("plonk"),t}},{target:"model",changeSelection:!0});var Xc=null,ld=0,Qd=class sl{static start(t,n,i,o){var c;sl.element=t,(c=sl.controller)==null||c.abort(),sl.controller=new AbortController;const f={signal:sl.controller.signal};"PointerEvent"in window?(t.addEventListener("pointermove",i,f),t.addEventListener("pointerup",o,f),t.addEventListener("pointercancel",o,f),Kf(n)&&(sl.pointerId=n.pointerId,t.setPointerCapture(n.pointerId))):(window.addEventListener("mousemove",i,f),window.addEventListener("blur",o,f),window.addEventListener("mouseup",o,f))}static stop(){var t;(t=sl.controller)==null||t.abort(),sl.controller=void 0,typeof sl.pointerId=="number"&&(sl.element.releasePointerCapture(sl.pointerId),sl.pointerId=void 0)}};function Kf(e){return e!==null&&globalThis.PointerEvent!==void 0&&e instanceof PointerEvent}function Yh(e,t){var n;if(t.buttons>1)return;e.atomBoundsCache=new Map;const i=e;let o,c=!1,f=!1,b="none",C=!1,k=!1;const $=t.clientX,ne=t.clientY,Me=Date.now(),We=i.field,Je=setInterval(()=>{C?We.scroll({top:0,left:We.scrollLeft-16}):k&&We.scroll({top:0,left:We.scrollLeft+16})},32);function Ot(){Qd.stop(),c=!1,clearInterval(Je),e.element.classList.remove("tracking"),t&&t.preventDefault()}function bn(en){if(!i.hasFocus()){Ot();return}const Ln=en.clientX,sn=en.clientY,hr=Kf(en)&&en.pointerType==="touch"?20:5;if(Date.now()<Me+500&&Math.abs($-Ln)<hr&&Math.abs(ne-sn)<hr){en.preventDefault(),en.stopPropagation();return}const Lr=We.getBoundingClientRect();k=Ln>Lr.right,C=Ln<Lr.left;let Mr=o;Kf(en)&&(en.isPrimary||(Mr=cd(i,en.clientX,en.clientY,{bias:0})));const Ci=cd(i,Ln,sn,{bias:Ln<=$?Ln===$?0:-1:1});Mr>=0&&Ci>=0&&(i.model.extendSelectionTo(Mr,Ci),za(e)),f&&Ff(i.model)}Xc&&Math.abs(Xc.x-$)<5&&Math.abs(Xc.y-ne)<5&&Date.now()<Xc.time+500?(ld+=1,Xc.time=Me):(Xc={x:$,y:ne,time:Me},ld=1);const Dt=We.getBoundingClientRect();if($>=Dt.left&&$<=Dt.right&&ne>=Dt.top&&ne<=Dt.bottom){if(e.flushInlineShortcutBuffer(),e.adoptStyle="left",o=cd(e,$,ne,{bias:0}),o>=0){if(e.element.classList.add("tracking"),t.shiftKey){const en=e.model.selectionIsCollapsed;e.model.extendSelectionTo(e.model.anchor,o),wh(e.model)||en?b="all":b="selection"}else e.model.at(o).type==="placeholder"?(e.model.setSelection(o-1,o),b="selection"):((n=e.model.at(o).rightSibling)==null?void 0:n.type)==="placeholder"?(e.model.setSelection(o,o+1),b="selection"):(e.model.position=o,wh(e.model)?b="all":b="selection");e.defaultStyle={},t.detail===3||ld>2?(Ot(),(t.detail===3||ld===3)&&(e.model.selection={ranges:[[0,e.model.lastOffset]]},b="all")):c||(c=!0,Qd.start(We,t,bn,Ot),(t.detail===2||ld===2)&&(f=!0,Ff(e.model),b="all"))}e.hasFocus()||(b="none",e.focus({preventScroll:!0}))}else Xc=null;e.stopCoalescingUndo(),b!=="none"&&(e.model.selectionIsCollapsed&&(b="all"),za(e)),t.preventDefault()}function ag(e,t,n){if(e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom)return 0;const i=e-(n.left+n.right)/2,o=t-(n.top+n.bottom)/2;return i*i+o*o}function Jh(e,t,n,i,o){if(!n.id)return[1/0,null];if(t.has(n.id))return t.get(n.id);const c=gc(e,n);if(!c)return[1/0,null];let f=[1/0,null];if(n.hasChildren&&!n.captureSelection&&i>=c.left&&i<=c.right)for(const b of n.children){const C=Jh(e,t,b,i,o);C[0]<=f[0]&&(f=C)}return f[1]||(f=[ag(i,o,c),n]),t.set(n.id,f),f}function og(e,t,n){const[,i]=Jh(e,new Map,e.model.root,t,n);return i}function cd(e,t,n,i){var o;const c=e.field.querySelector(".ML__latex").getBoundingClientRect();if(!c)return 0;if(t>c.right||n>c.bottom+8)return e.model.lastOffset;if(t<c.left||n<c.top-8)return 0;i=i!=null?i:{},i.bias=(o=i.bias)!=null?o:0;let f=og(e,t,n);const b=[];let C=f;for(;C;)b.unshift(C),C=C.parent;for(const $ of b)if($.captureSelection){f=$;break}let k=e.model.offsetOf(f);if(k<0)return-1;if(f.leftSibling)if(i.bias===0&&f.type!=="placeholder"){const $=gc(e,f);$&&t<($.left+$.right)/2&&(k=e.model.offsetOf(f.leftSibling))}else i.bias<0&&(k=e.model.offsetOf(f.leftSibling));return k}var sg=class extends jr{constructor(){super("math")}onPaste(e,t){if(!t||!e.model.contentWillChange({data:typeof t=="string"?t:null,dataTransfer:typeof t=="string"?null:t,inputType:"insertFromPaste"}))return!1;let n="",i="auto",o=typeof t!="string"?t.getData("application/json+mathlive"):"";if(o)try{const c=JSON.parse(o);if(c&&Array.isArray(c)){e.snapshot();const f=bc(c),{model:b}=e;b.selectionIsCollapsed||b.deleteAtoms(ko(b.selection));const C=b.at(b.position);if(C.parent instanceof Ur){console.assert(C.parentBranch!==void 0);const k=[];let $=[];f[0].type==="first"&&f.shift(),f[f.length-1].type==="first"&&f.pop();for(const Je of f)Je.type==="first"&&$.length>0?(k.push($),$=[Je]):$.push(Je);$.length>0&&k.push($);let ne=Number(C.parentBranch[0]),Me=Number(C.parentBranch[1]);const We=C.parent.maxColumns;for(;C.parent.colCount-Me<k.length&&C.parent.colCount<We;)C.parent.addColumn();C.parent.addChildrenAfter(k[0],C);for(let Je=1;Je<k.length;Je++)Me++,Me>=We&&(Me=0,C.parent.addRowAfter(ne),ne++),C.parent.setCell(ne,Me,k[Je])}else C.parent.addChildrenAfter(f.filter(k=>k.type!=="first"),C);return b.position=b.offsetOf(f[f.length-1]),b.contentDidChange({inputType:"insertFromPaste"}),za(e),!0}}catch(c){}if(o=typeof t!="string"?t.getData("application/json"):"",o&&window.MathfieldElement.computeEngine)try{const c=JSON.parse(o);if(typeof c=="object"&&"latex"in c&&c.latex&&(n=c.latex),!n){const f=window.MathfieldElement.computeEngine.box(c);f&&!f.has("Error")&&(n=f.latex)}n||(i="latex")}catch(c){}if(!n&&typeof t!="string"&&(n=t.getData("application/x-latex"),n&&(i="latex")),n||(n=typeof t=="string"?t:t.getData("text/plain")),n){let c;return[c,n]=Tl(n),i==="auto"&&c&&(i="latex"),e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,n,{format:i})&&(e.startRecording(),e.snapshot("paste"),za(e)),e.startRecording(),!0}return!1}insert(e,t,n){var i,o;const c=typeof t=="string"?t:(o=(i=window.MathfieldElement.computeEngine)==null?void 0:i.box(t).latex)!=null?o:"";if(!n.silenceNotifications&&!e.contentWillChange({data:c,inputType:"insertText"}))return!1;n.insertionMode||(n.insertionMode="replaceSelection"),n.selectionMode||(n.selectionMode="placeholder"),n.format||(n.format="auto");const{silenceNotifications:f}=e;n.silenceNotifications&&(e.silenceNotifications=!0);const b=e.silenceNotifications;e.silenceNotifications=!0;const C={"?":"\\placeholder{}","@":"\\placeholder{}"};C[0]=n.insertionMode==="replaceAll"?"":e.getValue(e.selection,"latex-unstyled"),n.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(ko(e.selection)):n.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):n.insertionMode==="insertBefore"?e.collapseSelection("backward"):n.insertionMode==="insertAfter"&&e.collapseSelection("forward"),!e.at(e.position).isLastSibling&&e.at(e.position+1).type==="placeholder"?e.deleteAtoms([e.position,e.position+1]):e.at(e.position).type==="placeholder"&&e.deleteAtoms([e.position-1,e.position]);let k=-1;C[0]?C["@"]=C[0]:typeof t=="string"&&/(^|[^\\])#@/.test(t)&&(k=cg(e),k>=0&&(C["@"]=e.getValue(k,e.position,"latex"))),C[0]||(C[0]=C["?"]);let $=!1;const ne=Ln=>($=!0,C[Ln]);let[Me,We]=Qh(e,t,ne,n);if(!We)return!1;const Je=We.length===1&&We[0].type==="genfrac";Je&&k>=0&&typeof e.mathfield.options.isImplicitFunction=="function"&&e.mathfield.options.isImplicitFunction(e.at(e.position).command)?(C["@"]=C["?"],$=!1,[Me,We]=Qh(e,t,ne,n)):k>=0&&e.deleteAtoms([k,e.position]);const{parent:Ot}=e.at(e.position),bn=Ot.hasEmptyBranch("body");if(Je&&Me!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&Ot instanceof Oi&&Ot.leftDelim==="("&&bn){const Ln=Ot.parent,sn=Ot.parentBranch;Ln.removeChild(Ot),Ln.setChildren(We,sn)}const Dt=e.at(e.position);Dt.parent.addChildrenAfter(We,Dt),Me==="latex"&&typeof t=="string"&&(Ot==null?void 0:Ot.type)==="root"&&bn&&!$&&(Ot.verbatimLatex=t),e.silenceNotifications=b;const en=We[We.length-1];if(n.selectionMode==="placeholder"){const Ln=We.flatMap(sn=>[sn,...sn.children]).find(sn=>sn.type==="placeholder");if(Ln){const sn=e.offsetOf(Ln);e.setSelection(sn-1,sn),e.announce("move")}else en&&(e.position=e.offsetOf(en))}else n.selectionMode==="before"||(n.selectionMode==="after"?en&&(e.position=e.offsetOf(en)):n.selectionMode==="item"&&e.setSelection(e.anchor,e.offsetOf(en)));return e.contentDidChange({data:c,inputType:"insertText"}),e.silenceNotifications=f,!0}};function Qh(e,t,n,i){var o;let c,f=[];if(typeof t!="string"||i.format==="math-json"){const b=window.MathfieldElement.computeEngine;if(!b)return["math-json",[]];[c,t]=["latex",b.box(t).latex],f=_o(t,{context:e.mathfield.context})}else typeof t=="string"&&i.format==="ascii-math"?([c,t]=Rc(t,{format:"ascii-math",inlineShortcuts:e.mathfield.options.inlineShortcuts}),f=_o(t,{context:e.mathfield.context}),c!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&qd(f)):(i.format==="auto"||(o=i.format)!=null&&o.startsWith("latex"))&&(i.format==="auto"&&([c,t]=Rc(t,{format:"auto",inlineShortcuts:e.mathfield.options.inlineShortcuts})),i.format==="latex"&&([,t]=Tl(t)),f=_o(t,{context:e.mathfield.context,args:n}),i.format!=="latex"&&e.mathfield.options.removeExtraneousParentheses&&qd(f));return Sc(f,i.style),[c!=null?c:"latex",f]}function lg(e){if(!e||(console.assert(e[0].type==="first"),e.length>1))return null;const t=e[0];return t instanceof Oi&&t.leftDelim==="("&&t.rightDelim===")"?t.removeBranch("body"):null}function qd(e){if(e){for(let t=0;e[t];t++){const n=e[t];if(n instanceof Oi&&n.leftDelim==="("){let i=0,o=0,c=0;for(let f=0;n.body[f];f++)n.body[f].type==="genfrac"&&(i++,o=f),c++;c===0&&i===1&&(e[t]=n.body[o])}}for(const t of e){for(const n of t.branches)if(!t.hasEmptyBranch(n)){qd(t.branch(n));const i=lg(t.branch(n));i&&t.setChildren(i,n)}if(t instanceof Ur)for(const n of t.cells)qd(n)}}}function cg(e){let t=e.at(e.position);if(t.mode==="text"){for(;!t.isFirstSibling&&t.mode==="text";)t=t.leftSibling;return e.offsetOf(t)}const n=t;let i=!1;if(t.type==="mclose"){const o=s[t.value];for(;!t.isFirstSibling&&!(t.type==="mopen"&&t.value===o);)t=t.leftSibling;t.isFirstSibling||(t=t.leftSibling),i=!0}else t.type==="leftright"&&(t=t.leftSibling,i=!0);if(i)for(;!t.isFirstSibling&&(t.isFunction||qh(t));)t=t.leftSibling;else{const o=[];for(;!t.isFirstSibling&&(qh(t)||o.length>0);)t.type==="mclose"&&o.unshift(t.value),t.type==="mopen"&&o.length>0&&t.value===s[o[0]]&&o.shift(),t=t.leftSibling}return n===t?-1:e.offsetOf(t)}function qh(e){return e.isDigit()?!0:e.type&&/^(mord|surd|subsup|leftright|mop|mclose)$/.test(e.type)?!e.isExtensibleSymbol:!1}new sg;var ug=class extends jr{constructor(){super("text")}onPaste(e,t){if(!t)return!1;const n=typeof t=="string"?t:t.getData("text/plain");return n&&e.model.contentWillChange({inputType:"insertFromPaste",data:n})?(e.stopCoalescingUndo(),e.stopRecording(),this.insert(e.model,n)&&(e.model.contentDidChange({inputType:"insertFromPaste"}),e.startRecording(),e.snapshot("paste"),za(e)),e.startRecording(),!0):!1}insert(e,t,n={}){if(!e.contentWillChange({data:t,inputType:"insertText"}))return!1;n.insertionMode||(n.insertionMode="replaceSelection"),n.selectionMode||(n.selectionMode="placeholder"),n.format||(n.format="auto");const{silenceNotifications:i}=e;n.silenceNotifications&&(e.silenceNotifications=!0);const o=e.silenceNotifications;e.silenceNotifications=!0,n.insertionMode==="replaceSelection"&&!e.selectionIsCollapsed?e.deleteAtoms(ko(e.selection)):n.insertionMode==="replaceAll"?(e.root.setChildren([],"body"),e.position=0):n.insertionMode==="insertBefore"?e.collapseSelection("backward"):n.insertionMode==="insertAfter"&&e.collapseSelection("forward");const c=dg(t,e.mathfield.context);if(Sc(c,n.style),!c)return!1;const f=e.at(e.position),b=f.parent.addChildrenAfter(c,f);return e.silenceNotifications=o,n.selectionMode==="before"||(n.selectionMode==="item"?e.setSelection(e.anchor,e.offsetOf(b)):b&&(e.position=e.offsetOf(b))),e.contentDidChange({data:t,inputType:"insertText"}),e.silenceNotifications=i,!0}};function dg(e,t){return e=e.replace(/\\/g,"\\textbackslash "),e=e.replace(/#/g,"\\#"),e=e.replace(/\$/g,"\\$"),e=e.replace(/%/g,"\\%"),e=e.replace(/&/g,"\\&"),e=e.replace(/_/g,"\\_"),e=e.replace(/{/g,"\\textbraceleft "),e=e.replace(/}/g,"\\textbraceright "),e=e.replace(/lbrace/g,"\\textbraceleft "),e=e.replace(/rbrace/g,"\\textbraceright "),e=e.replace(/\^/g,"\\textasciicircum "),e=e.replace(/~/g,"\\textasciitilde "),e=e.replace(/£/g,"\\textsterling "),_o(e,{context:t,parseMode:"text"})}new ug;function Bl(e){return{value:e.model.getValue(),selectionIsCollapsed:e.model.selectionIsCollapsed,canUndo:e.canUndo(),canRedo:e.canRedo(),style:e.selectionStyle,mode:e.model.mode}}var pa=4,vs=20,po=2*(vs+pa),ef=(e,t)=>`
|
|
|
<line x1="${e+vs}" y1="${t+vs}"
|
|
|
x2="${e>t?e+vs:7*vs+10*pa}"
|
|
|
y2="${e<t?t+vs:7*vs+10*pa}"/>
|
|
|
<svg id="plus" viewBox="0 0 40 40" x="${e}" y="${t}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<path class="font" d="m33.33,20c0,1.84-1.49,3.34-3.33,3.34h-6.67v6.66c0,1.84-1.49,3.34-3.33,3.34s-3.34-1.5-3.34-3.34v-6.66h-6.66c-1.84,0-3.34-1.5-3.34-3.34s1.5-3.33,3.34-3.33h6.66v-6.67c0-1.84,1.5-3.33,3.34-3.33s3.33,1.49,3.33,3.33v6.67h6.67c1.84,0,3.33,1.49,3.33,3.33Z"/>
|
|
|
</svg>`,e0=(e,t)=>`
|
|
|
<line x1="${e+vs}" y1="${t+vs}"
|
|
|
x2="${e>t?e+vs:7*vs+10*pa}"
|
|
|
y2="${e<t?t+vs:7*vs+10*pa}"/>
|
|
|
<svg id="minus" viewBox="0 0 40 40" x="${e}" y="${t}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<path class="font" d="m33.33,20c0,1.84-1.49,3.33-3.33,3.33H10c-1.84,0-3.34-1.49-3.34-3.33s1.5-3.34,3.34-3.34h20c1.84,0,3.33,1.5,3.33,3.34Z"/>
|
|
|
</svg>`,tf=(e,t,n)=>`
|
|
|
<svg id="arrow" viewBox="0 0 40 40" x="${e}" y="${t}" width="40" height="40">
|
|
|
<circle class="cls-2" cx="20" cy="20" r="20"/>
|
|
|
<g transform="rotate(${n})" transform-origin="20 20">
|
|
|
<path class="font" d="m17.7,7.23h4.6c.52,0,.94.42.94.94v13.82c0,.52.42.94.94.94h3.39c.83,0,1.25,1.01.66,1.6l-7.56,7.56c-.37.37-.96.37-1.32,0l-7.56-7.56c-.59-.59-.17-1.6.66-1.6h3.39c.52,0,.94-.42.94-.94v-13.82c0-.52.42-.94.94-.94Z"/>
|
|
|
</g>
|
|
|
</svg>`,fg=`
|
|
|
<svg class="MLEP__array-buttons" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
viewBox=
|
|
|
"-2 -2 ${8*vs+10*pa+5} ${8*vs+10*pa+5}">
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background rows"
|
|
|
x="0"
|
|
|
y="${po+pa}"
|
|
|
height="${3*po}"
|
|
|
width="${po}"
|
|
|
rx="${po/2}"/>
|
|
|
<rect
|
|
|
class="MLEP__array-insert-background columns"
|
|
|
x="${po+pa}"
|
|
|
y="0"
|
|
|
height="${po}"
|
|
|
width="${3*po}"
|
|
|
rx="${po/2}"/>
|
|
|
<g data-command='"moveDown"'>
|
|
|
${tf(2*(pa+po),2*pa+3*po,0)}
|
|
|
</g>
|
|
|
<g data-command='"moveUp"'>
|
|
|
${tf(2*(pa+po),2*pa+po,180)}
|
|
|
</g>
|
|
|
<g data-command='"moveToNextWord"'>
|
|
|
${tf(2*pa+3*po,2*(pa+po),-90)}
|
|
|
</g>
|
|
|
<g data-command='"moveToPreviousWord"'>
|
|
|
${tf(2*pa+po,2*(pa+po),90)}
|
|
|
</g>
|
|
|
<g>
|
|
|
|
|
|
<g data-command='"addColumnBefore"'>
|
|
|
${ef(2*pa+po,pa)}
|
|
|
</g>
|
|
|
<g data-command='"removeColumn"'>
|
|
|
${e0(2*pa+2*po,pa)}
|
|
|
</g>
|
|
|
<g data-command='"addColumnAfter"'>
|
|
|
${ef(2*pa+3*po,pa)}
|
|
|
</g>
|
|
|
<g data-command='"addRowBefore"'>
|
|
|
${ef(pa,2*pa+po)}
|
|
|
</g>
|
|
|
<g data-command='"removeRow"'>
|
|
|
${e0(pa,2*pa+2*po)}
|
|
|
</g>
|
|
|
<g data-command='"addRowAfter"'>
|
|
|
${ef(pa,2*pa+3*po)}
|
|
|
</g>
|
|
|
</svg>`,hg=e=>`
|
|
|
<svg id="matrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","matrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/></svg>`,pg=e=>`
|
|
|
<svg id="pmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","pmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m6,4c-3.96,4.6-3.96,11.4,0,16"/>
|
|
|
<path class="cls-2" d="m22,4c3.96,4.6,3.96,11.4,0,16"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/></svg>`,t0=e=>`
|
|
|
<svg id="Bmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","Bmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m6,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
|
|
|
<path class="cls-2" d="m22,4c1.1,0,2,.9,2,2v3c0,1.66.9,3,2,3-1.1,0-2,1.34-2,3v3c0,1.1-.9,2-2,2"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
</svg>`,mg=e=>`
|
|
|
<svg id="bmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","bmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m6,4h-3v16h3"/>
|
|
|
<path class="cls-2" d="m22,4h3v16h-3"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
</svg>`,gg=e=>`
|
|
|
<svg id="vmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","vmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
<line class="cls-2" x1="4" y1="4" x2="4" y2="20"/>
|
|
|
<line class="cls-2" x1="24" y1="4" x2="24" y2="20"/>
|
|
|
</svg>`,vg=e=>`
|
|
|
<svg id="Vmatrix" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="-3.5 -3 35 30"
|
|
|
data-command='["setEnvironment","Vmatrix"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<circle cx="10" cy="8" r="1"/>
|
|
|
<circle cx="14" cy="12" r="1"/>
|
|
|
<circle cx="18" cy="16" r="1"/>
|
|
|
<line class="cls-2" x1="6" y1="4" x2="6" y2="20"/>
|
|
|
<line class="cls-2" x1="22" y1="4" x2="22" y2="20"/>
|
|
|
<line class="cls-2" x1="2" y1="4" x2="2" y2="20"/>
|
|
|
<line class="cls-2" x1="26" y1="4" x2="26" y2="20"/>
|
|
|
</svg>`,yg=e=>`
|
|
|
<svg id="cases" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","cases"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m10,4c-1.1,0-2,.9-2,2v3c0,1.66-.9,3-2,3,1.1,0,2,1.34,2,3v3c0,1.1.9,2,2,2"/>
|
|
|
<circle cx="13" cy="8" r="1"/>
|
|
|
<circle cx="13" cy="16" r="1"/>
|
|
|
<circle cx="21" cy="8" r="1"/>
|
|
|
<circle cx="21" cy="16" r="1"/>
|
|
|
</svg>`,bg=e=>`
|
|
|
<svg id="rcases" class="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 24"
|
|
|
data-command='["setEnvironment","rcases"]'>
|
|
|
<rect class="cls-1" width="28" height="24"/>
|
|
|
<path class="cls-2" d="m18,20c1.1,0,2-.9,2-2v-3c0-1.66.9-3,2-3-1.1,0-2-1.34-2-3v-3c0-1.1-.9-2-2-2"/>
|
|
|
<circle cx="15" cy="8" r="1"/>
|
|
|
<circle cx="15" cy="16" r="1"/>
|
|
|
<circle cx="7" cy="8" r="1"/>
|
|
|
<circle cx="7" cy="16" r="1"/>
|
|
|
</svg>`,Hf={matrix:hg,pmatrix:pg,bmatrix:mg,Bmatrix:t0,vmatrix:gg,Vmatrix:vg},Zf={cases:yg,rcases:bg,Bmatrix:t0};function xg(e){var t,n;const i=(t=e.model.parentEnvironment)==null?void 0:t.array;if(!i)return;let o=0;i.forEach(Je=>{(!o||Je.length>o)&&(o=Je.length)});let c=document.getElementById("mathlive-environment-popover");c||(c=Od("mathlive-environment-popover"),Ds("environment-popover"),Ds("core"),c.setAttribute("aria-hidden","true"));let f;const b=c.querySelector(".MLEP__environment-controls");b?f=b:(f=document.createElement("div"),c.innerHTML="",c.appendChild(f)),f.className="MLEP__environment-controls",f.style.display="flex",f.style.width="100%",f.style.height="100%",f.style.boxSizing="border-box",f.innerHTML=fg;let C=[],k="";const $=e.model.parentEnvironment.environmentName;if(Jo($)){const Je=Cg($);k=Hf[Je]("active");const Ot=Hf,{[Je]:bn}=Ot,Dt=Ie(Ot,[V(Je)]);C=Object.values(Dt).map(en=>en("inactive"))}else if(Qo($)){const Je=wg($);k=Zf[Je]("active");const Ot=Zf,{[Je]:bn}=Ot,Dt=Ie(Ot,[V(Je)]);C=Object.values(Dt).map(en=>en("inactive"))}else ro($)&&(k=Hf.matrix("active"),C=Object.values(Zf).map(Je=>Je("inactive")));const ne=document.createElement("div");ne.className="MLEP__environment-delimiter-controls",ne.style.display="flex",ne.style.flexDirection="column",ne.innerHTML=`
|
|
|
<div class='MLEP__array-delimiter-options'>
|
|
|
${k}
|
|
|
${C.join("")}
|
|
|
</div>`,k&&f.appendChild(ne),f.querySelectorAll("[data-command]").forEach(Je=>{const Ot=Je.dataset.command;let bn=Ot;try{bn=JSON.parse(Ot)}catch(Dt){}Je.addEventListener("mousedown",Dt=>Dt.preventDefault()),bn&&Je.addEventListener("click",()=>e.executeCommand(bn))});const We=(n=e.field)==null?void 0:n.getBoundingClientRect();We&&(c.style.top=`${window.scrollY+(We.top-c.clientHeight-15)}px`,c.style.left=`${We.left+20}px`,c.classList.add("is-visible"))}function Wf(){const e=document.getElementById("mathlive-environment-popover");e==null||e.classList.remove("is-visible")}function Sg(){document.getElementById("mathlive-environment-popover")&&(kf("mathlive-environment-popover"),r("environment-popover"),r("core"))}function nf(e){if(!e.hasFocus())return;let t=!1;if(e.model.mode==="math"){const n=e.model.parentEnvironment;if(n!=null&&n.array&&Ia(n.environmentName)){const i=e.options.environmentPopoverPolicy;t=i==="auto"||i==="on"}}t?xg(e):Wf()}function Cg(e){return e.replace("*","")}function wg(e){return e==="dcases"?"cases":e}function n0(e){const t=getComputedStyle(e).direction;return t==="ltr"||t==="rtl"?t:"ltr"}function r0(e,t,n){return t==="left"||t==="leading"&&n==="ltr"||t==="trailing"&&n==="rtl"?e.left:e.right}function jf(e,t,n,i){return n==="middle"?e-t/2:n==="start"&&i==="rtl"||n==="end"&&i==="ltr"||n==="top"||n==="right"?Math.max(0,e-t):e}function Mg(e,t,n,i){return n==="middle"?e-t/2:n==="start"&&i==="ltr"||n==="end"&&i==="rtl"||n==="top"||n==="right"?e:e-t}function kg(e,t){var n,i,o;const c=(n=n0(e))!=null?n:"ltr";e.style.position="fixed",e.style.left="",e.style.top="",e.style.right="",e.style.bottom="",e.style.height="",e.style.width="";const f=e.getBoundingClientRect(),b=Number.isFinite(t.maxHeight)?Math.min(t.maxHeight,window.innerHeight):window.innerHeight;let C=Math.min(b,(i=t.height)!=null?i:f.height),k=jf(t.location.y,C,t.verticalPos,c);k+C>window.innerHeight-8&&(t.alternateLocation?(k=jf(t.alternateLocation.y,C,t.verticalPos,c),k+C>window.innerHeight-8&&(k=void 0)):k=void 0),Number.isFinite(k)||(k=Math.max(8,window.innerHeight-8-C),8+C>window.innerHeight-8&&(e.style.bottom="8px")),C=Math.min(k+C,window.innerHeight-8)-k;const $=Number.isFinite(t.maxWidth)?Math.min(t.maxWidth,window.innerWidth):window.innerWidth;let ne=Math.min($,(o=t.width)!=null?o:f.width),Me=jf(t.location.x,ne,t.horizontalPos,c);Me+ne>window.innerWidth-8&&(t.alternateLocation?(Me=Mg(t.alternateLocation.x,ne,t.verticalPos,c),Me+ne>window.innerWidth-8&&(Me=void 0)):Me=void 0),Number.isFinite(Me)||(Me=Math.max(8,window.innerWidth-8-ne),8+ne>window.innerWidth-8&&(e.style.right="8px")),ne=Math.min(Me+ne,window.innerWidth-8)-Me,c==="rtl"?e.style.right=`${Math.ceil(window.innerWidth-Me-ne).toString()}px`:e.style.left=`${Math.ceil(Me).toString()}px`,e.style.top=`${Math.ceil(k).toString()}px`,C!==f.height&&(e.style.height=`${Math.ceil(C).toString()}px`),ne!==f.width&&(e.style.width=`${Math.ceil(ne).toString()}px`)}function Eg(e,t){return Math.hypot(t.x-e.x,t.y-e.y)}function Mu(e){return"submenu"in e}function Nl(e){return"type"in e&&e.type==="command"||"onMenuSelect"in e||"id"in e}function Vf(e){return"type"in e&&e.type==="divider"}function Uf(e){return"type"in e&&e.type==="heading"}var i0={};function Gf(e){let t=i0[e];if(!t){let n;switch(e){case"checkmark":n=`<span aria-hidden="true" class="ui-checkmark"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z"></path></svg>
|
|
|
</span>`;break;case"trailing-chevron":n='<span aria-hidden="true" class="ui-trailing-chevron"><svg focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path></svg></span>';break;case"mixedmark":n='<span aria-hidden="true" class="ui-mixedmark"><svg xmlns="http://www.w3.org/2000/svg" width="16" viewBox="0 0 512 512"><path fill="currentColor" d="M0 256c0-13.3 10.7-24 24-24H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H24c-13.3 0-24-10.7-24-24z"/></svg></span>'}if(n){const i=document.createElement("template");i.innerHTML=n,i0[e]=i,t=i}}if(t){if("content"in t)return t.content.cloneNode(!0);const n=document.createElement("svg");return n.innerHTML=t.innerHTML,n}}var a0=80,o0=class{constructor(e,t){this._element=null;var n;this.parentMenu=t,this._declaration=e,Mu(e)?(this.type="submenu",this.submenu=new s0(e.submenu,{parentMenu:t,submenuClass:e.submenuClass,columnCount:e.columnCount})):this.type=(n=e.type)!=null?n:"command",this.hasCheck=Nl(e)&&e.checked!==void 0}get rootMenu(){return this.parentMenu.rootMenu}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}dispose(){var e,t;(e=this._abortController)==null||e.abort(),this._abortController=void 0,(t=this._element)==null||t.remove(),this._element=null,this.submenu&&this.submenu.dispose(),this.submenu=void 0}get menuItem(){return this._declaration}get label(){var e;return(e=this._label)!=null?e:""}set label(e){e===void 0&&(e=""),e!==this._label&&(this._label=e,this.dirty=!0)}get visible(){return this._visible}set visible(e){e!==this._visible&&(this._visible=e,this.dirty=!0)}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.element&&(e?this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled","true")),this.dirty=!0}get checked(){return this._checked}set checked(e){this._checked=e,this.dirty=!0}get tooltip(){return this._tooltip}set tooltip(e){e!==this._tooltip&&(this._tooltip=e,this.dirty=!0)}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){e!==this._ariaLabel&&(this._ariaLabel=e,this.dirty=!0)}get active(){var e,t;return(t=(e=this.element)==null?void 0:e.classList.contains("active"))!=null?t:!1}set active(e){this.element&&this.element.classList.toggle("active",e)}updateState(e){var t,n,i;const o=this._declaration;if(Vf(o)){this.enabled=!1,this.checked=!1;return}Uf(o)&&(this.enabled=!1,this.checked=!1,this.visible=!0),Nl(o)&&(this.checked=Nl(o)&&((t=ku(o.checked,e))!=null?t:!1)),(Nl(o)||Mu(o))&&(this.enabled=(n=ku(o.enabled,e))!=null?n:!0,this.visible=(i=ku(o.visible,e))!=null?i:!0,this.visible&&this.enabled&&this.submenu&&(this.submenu.updateState(e),this.submenu.visible||(this.visible=!1))),(Nl(o)||Uf(o)||Mu(o))&&(this.label=ku(o.label,e),this.tooltip=ku(o.tooltip,e),this.ariaLabel=ku(o.ariaLabel,e)),this._element&&this.updateElement()}set dirty(e){console.assert(e===!0),e&&this.parentMenu&&(this.parentMenu.dirty=!0)}updateElement(){if(!this.visible||!this.element)return;const e=this.element;e.textContent="",this.enabled?e.removeAttribute("aria-disabled"):e.setAttribute("aria-disabled","true"),this.checked===!0?(e.setAttribute("aria-checked","true"),e.append(Gf("checkmark"))):this.checked==="mixed"?(e.setAttribute("aria-checked","mixed"),e.append(Gf("mixedmark"))):e.removeAttribute("aria-checked"),this.ariaLabel&&e.setAttribute("aria-label",this.ariaLabel);const t=document.createElement("span");if(t.className=this.parentMenu.hasCheck?"label indent":"label",this.type==="heading"&&t.classList.add("heading"),t.innerHTML=this.label,e.append(t),this._tooltip&&e.setAttribute("data-tooltip",this._tooltip),Nl(this._declaration)&&this._declaration.keyboardShortcut){const n=document.createElement("kbd");n.innerHTML=wf(this._declaration.keyboardShortcut),e.append(n)}this.type==="submenu"&&e.append(Gf("trailing-chevron"))}get element(){if(this._element)return this._element;if(Vf(this._declaration)){const n=document.createElement("li");return n.setAttribute("part","menu-divider"),n.setAttribute("role","divider"),this._element=n,n}const e=document.createElement("li");this._element=e,(Nl(this._declaration)||Uf(this._declaration)||Mu(this._declaration))&&this._declaration.class&&(e.className=this._declaration.class),e.setAttribute("part","menu-item"),e.setAttribute("tabindex","-1"),this.hasCheck?e.setAttribute("role","menuitemcheckbox"):e.setAttribute("role","menuitem"),this.type==="submenu"&&(e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"));const t=this.abortController.signal;return e.addEventListener("pointerenter",this,{signal:t}),e.addEventListener("pointerleave",this,{signal:t}),e.addEventListener("pointerup",this,{signal:t}),e.addEventListener("click",this,{signal:t}),this._element}dispatchSelect(){if(!Nl(this._declaration))return;const e=new CustomEvent("menu-select",{cancelable:!0,bubbles:!0,detail:{modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data}});this.parentMenu.dispatchEvent(e)&&typeof this._declaration.onMenuSelect=="function"&&this._declaration.onMenuSelect({modifiers:this.rootMenu.modifiers,id:this._declaration.id,data:this._declaration.data})}handleEvent(e){var t;if(!(!this.visible||!this.enabled)){if(e.type==="click"){this.rootMenu.state==="modal"&&this.select(),e.stopPropagation(),e.preventDefault();return}if(e.type==="pointerenter"){const n=e;this.rootMenu.cancelDelayedOperation(),this.parentMenu.isSubmenuOpen&&((t=this.parentMenu.activeMenuItem)!=null&&t.movingTowardSubmenu(n))?this.rootMenu.scheduleOperation(()=>{this.parentMenu.activeMenuItem=this,this.openSubmenu()}):(this.parentMenu.activeMenuItem=this,this.openSubmenu({withDelay:!0}));return}if(e.type==="pointerleave"){this.rootMenu.activeSubmenu===this.parentMenu&&(this.parentMenu.activeMenuItem=null);return}if(e.type==="pointerup"){this.rootMenu.state!=="modal"&&this.select(),e.stopPropagation(),e.preventDefault();return}}}select(){if(this.rootMenu.cancelDelayedOperation(),this.type==="submenu"){this.openSubmenu();return}this.active=!1,setTimeout(()=>{this.active=!0,setTimeout(()=>{this.rootMenu.hide(),this.dispatchSelect()},a0)},a0)}openSubmenu(e){var t;if(this.type!=="submenu"||!this.element)return;if((t=e==null?void 0:e.withDelay)!=null&&t){this.rootMenu.scheduleOperation(()=>this.openSubmenu());return}const n=this.element.getBoundingClientRect(),i=n0(this.element);this.submenu.show({container:this.rootMenu.element.parentNode,location:{x:r0(n,"trailing",i),y:n.top-4},alternateLocation:{x:r0(n,"leading",i),y:n.top-4}})}movingTowardSubmenu(e){if(!this.element||this.type!=="submenu")return!1;const t=this.rootMenu.lastMoveEvent;if(!t)return!1;const n=e.timeStamp-t.timeStamp;if(n>500)return!1;const i=e.clientX-t.clientX;if(_g(i,t.clientY-e.clientY,n)<=.2)return!1;let c="right";if(this.submenu.element){const f=this.submenu.element.getBoundingClientRect(),b=this.element.getBoundingClientRect();f.left<b.left+b.width/2&&(c="left")}return c==="right"?i>0:i<0}};function _g(e,t,n){return Math.hypot(e,t)/n}function ku(e,t){return e===void 0||typeof e!="function"?e:(t!=null||(t={alt:!1,control:!1,shift:!1,meta:!1}),e(t))}var s0=class Pu{constructor(t,n){this._element=null,this._activeMenuItem=null,this._dirty=!0;var i,o;this.parentMenu=(i=n==null?void 0:n.parentMenu)!=null?i:null,this._submenuClass=n==null?void 0:n.submenuClass,this.columnCount=(o=n==null?void 0:n.columnCount)!=null?o:1,this.isSubmenuOpen=!1,this.menuItems=t}get children(){return this._menuItems}set menuItems(t){const n=this.parentMenu;this.dispose(),this.parentMenu=n,t=[...t],this._menuItems=t.map(i=>i.onCreate?i.onCreate(i,this):new o0(i,this)),this.hasCheck=void 0,this.dirty=!0}dispose(){var t;this.hide(),this._element&&this._element.remove(),this._abortController&&this._abortController.abort(),(t=this._menuItems)==null||t.forEach(n=>n.dispose()),this._menuItems=[],this._activeMenuItem=null,this.parentMenu=null}handleEvent(t){if(t.type==="wheel"&&this._element){const n=t;this._element.scrollBy(0,n.deltaY),t.stopPropagation()}}dispatchEvent(t){return this.rootMenu.dispatchEvent(t)}get rootMenu(){return this.parentMenu.rootMenu}updateState(t){var n,i,o;this._menuItems.forEach(k=>k.updateState(t));const c=this.hasCheck;this.hasCheck=this._menuItems.some(k=>k.visible&&k.hasCheck),this.hasCheck!==c&&this._menuItems.forEach(k=>k.updateState(t));let f,b=0;for(const k of this._menuItems)k.type==="heading"?(f&&b===0&&(f.visible=!1),f=k,b=0):k.type==="divider"&&f?(f.visible=b>0,f=void 0,b=0):f&&k.visible&&(b+=1);f&&(f.visible=b>0);let C=!0;for(const k of this._menuItems)k.type==="divider"?(k.visible=!C,C=!0):k.visible&&(C=!1);(n=this.activeMenuItem)!=null&&n.visible||(this.activeMenuItem=null),!((i=this.activeMenuItem)!=null&&i.enabled)&&((o=this.activeMenuItem)==null?void 0:o.type)==="submenu"&&this._activeMenuItem.submenu.hide(),this._dirty=!1}get enabled(){return this.updateIfDirty(),this._menuItems.some(t=>t.type!=="divider"&&t.visible&&t.enabled)}get visible(){return this.updateIfDirty(),this._menuItems.some(t=>t.type!=="divider"&&t.visible)}set dirty(t){console.assert(t===!0),this._dirty!==t&&t&&this.parentMenu&&(this._dirty=!0,this.parentMenu.dirty=!0)}updateIfDirty(){this._dirty&&this.updateState(this.rootMenu.modifiers)}updateElement(){var t;if(this._element){this._element.textContent="";for(const{element:n,visible:i}of this._menuItems)n&&i&&this._element.append(n);(t=this._element.querySelector("li:first-of-type"))==null||t.setAttribute("tabindex","0")}}get element(){if(this._element)return this._element;const t=document.createElement("menu");t.setAttribute("role","menu"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-orientation","vertical"),t.setAttribute("part","ui-menu-container"),this._submenuClass&&t.classList.add(this._submenuClass),t.classList.add("ui-menu-container"),this._abortController||(this._abortController=new AbortController);const n=this._abortController.signal;return t.addEventListener("focus",this,{signal:n}),t.addEventListener("wheel",this,{passive:!0,signal:n}),this._element=t,this.updateElement(),t}get activeMenuItem(){return this._activeMenuItem}set activeMenuItem(t){var n,i,o,c;if(this.rootMenu.cancelDelayedOperation(),t!==this._activeMenuItem){if(this.activeMenuItem){const f=this.activeMenuItem;f.active=!1,(n=f.submenu)==null||n.hide()}if(!((i=t==null?void 0:t.visible)==null||i)){this._activeMenuItem=null;return}this._activeMenuItem=t,t&&(t.active=!0)}t?(o=t.element)==null||o.focus({preventScroll:!0}):(c=this._element)==null||c.focus({preventScroll:!0})}get firstMenuItem(){this.updateIfDirty();let t=0,n=!1;const i=this._menuItems;for(;!n&&t<=i.length-1;){const o=i[t];n=o.type!=="divider"&&o.visible&&o.enabled,t+=1}return n?i[t-1]:null}get lastMenuItem(){this.updateIfDirty();const t=this._menuItems;let n=t.length-1,i=!1;for(;!i&&n>=0;){const o=t[n];i=o.type!=="divider"&&o.visible&&o.enabled,n-=1}return i?t[n+1]:null}nextMenuItem(t){if(t===0)return this._activeMenuItem;if(!this._activeMenuItem)return t>0?this.firstMenuItem:this.lastMenuItem;if(!this.firstMenuItem||!this.lastMenuItem||!this._activeMenuItem)return null;this.updateIfDirty();const n=this._menuItems.indexOf(this.firstMenuItem),i=this._menuItems.indexOf(this.lastMenuItem);let o=this._menuItems.indexOf(this._activeMenuItem),c=1;for(;o>=n&&o<=i;){o+=t>0?1:-1;const f=this._menuItems[o];if(!f)break;if(f.visible&&f.enabled){if(c===Math.abs(t))return this._menuItems[o];c+=1}}return t>0?this.lastMenuItem:this.firstMenuItem}getMenuItemColumn(t){this.updateIfDirty();const i=this._menuItems.filter(o=>o.visible&&o.enabled).indexOf(t);return i<0?-1:i%this.columnCount}static get collator(){return Pu._collator||(Pu._collator=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"})),Pu._collator}findMenuItem(t){var n;this.updateIfDirty();const i=this._menuItems.filter(b=>b.type!=="divider"&&b.visible&&b.enabled);if(i.length===0)return null;const o=Math.max(...i.map(b=>b.label.length))-t.length;if(o<0)return null;let c=null,f=0;for(;f<o&&!c;)c=(n=i.find(b=>Pu.collator.compare(t,b.label.substring(f,t.length))===0))!=null?n:null,f++;return c}show(t){return!this.visible||!t.container?!1:(this.updateElement(),t.container.appendChild(this.element),Ue()&&(this.element.popover="manual",this.element.showPopover()),t.location&&kg(this.element,{location:t.location,alternateLocation:t.alternateLocation,verticalPos:"bottom",horizontalPos:"start"}),this.element.focus({preventScroll:!0}),this.parentMenu&&(this.parentMenu.openSubmenu=this),!0)}hide(){var t,n,i,o,c;this.openSubmenu=null,this.activeMenuItem=null,this.parentMenu&&(this.parentMenu.openSubmenu=null),Ue()&&((t=this._element)!=null&&t.popover)&&this.element.hidePopover(),(i=(n=this.parentMenu)==null?void 0:n.element)==null||i.focus(),(c=(o=this._element)==null?void 0:o.parentNode)==null||c.removeChild(this._element)}set openSubmenu(t){var n,i,o,c;const f=t!==null;((n=this.activeMenuItem)==null?void 0:n.type)==="submenu"&&((i=this.activeMenuItem.element)==null||i.setAttribute("aria-expanded",f.toString())),(c=(o=this.activeMenuItem)==null?void 0:o.element)==null||c.classList.toggle("is-submenu-open",f),this.isSubmenuOpen=f}},l0=class cp extends s0{constructor(t,n){var i;super(t),this.state="closed",this.typingBufferResetTimer=0,this.hysteresisTimer=0,this._updating=!1,this._host=(i=n==null?void 0:n.host)!=null?i:null,this.isDynamic=t.some(c0),this._modifiers={shift:!1,control:!1,alt:!1,meta:!1},this.typingBuffer="",this.state="closed"}get modifiers(){return this._modifiers}set modifiers(t){Vp(this._modifiers,t)||(this._modifiers=t,this.dirty=!0)}get activeSubmenu(){let t=this;for(;t.isSubmenuOpen;)t=t.activeMenuItem.submenu;return t}set dirty(t){this._updating||(console.assert(t===!0),this._dirty!==t&&(this._dirty=!0,t&&setTimeout(()=>{this.updateState(this.modifiers),this.updateElement()})))}updateState(t){this._updating=!0,this.modifiers=t!=null?t:this.modifiers,super.updateState(this.modifiers),this._updating=!1}handleKeyupEvent(t){this.isDynamic&&(this.modifiers=Kc(t)),t.stopImmediatePropagation()}handleKeydownEvent(t){var n,i,o;if(t.key==="Tab"||t.key==="Escape"){this.hide();return}this.isDynamic&&(this.modifiers=Kc(t));let c=!0;const f=this.activeSubmenu,b=f.activeMenuItem;switch(t.key){case" ":case"Space":case"Return":case"Enter":b==null||b.select(Kc(t));break;case"ArrowRight":if((b==null?void 0:b.type)==="submenu")b.select(Kc(t)),this.activeSubmenu.activeMenuItem=this.activeSubmenu.firstMenuItem;else if(!b)f.activeMenuItem=f.firstMenuItem;else{const C=(n=f.getMenuItemColumn(b))!=null?n:-1;if(C>=0&&C<((i=f.columnCount)!=null?i:1)-1){const k=f.nextMenuItem(1);k&&(f.activeMenuItem=k)}}break;case"ArrowLeft":if(f===this.rootMenu)b||(f.activeMenuItem=f.firstMenuItem);else if((b&&(o=f.getMenuItemColumn(b))!=null?o:-1)<=0||!b){f.hide();const k=f.parentMenu.activeMenuItem;if(k){const{element:$}=k;$==null||$.focus(),$==null||$.classList.remove("is-submenu-open")}}else{const k=f.nextMenuItem(-1);k&&(f.activeMenuItem=k)}break;case"ArrowDown":f.activeMenuItem=f.nextMenuItem(f.columnCount);break;case"ArrowUp":f.activeMenuItem=f.nextMenuItem(-f.columnCount);break;case"Home":case"PageUp":f.activeMenuItem=f.firstMenuItem;break;case"End":case"PageDown":f.activeMenuItem=f.lastMenuItem;break;case"Backspace":if(this.typingBuffer&&(this.typingBuffer=this.typingBuffer.slice(0,-1),this.typingBuffer)){clearTimeout(this.typingBufferResetTimer);const C=f.findMenuItem(this.typingBuffer);C&&(f.activeMenuItem=C),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}break;default:if(Dd(t)){isFinite(this.typingBufferResetTimer)&&clearTimeout(this.typingBufferResetTimer),this.typingBuffer+=t.key;const C=f.findMenuItem(this.typingBuffer);C&&(f.activeMenuItem=C),this.typingBufferResetTimer=setTimeout(()=>{this.typingBuffer=""},500)}else c=!1}c&&(t.preventDefault(),t.stopPropagation())}handleEvent(t){if(t.type==="keydown")this.handleKeydownEvent(t);else if(t.type==="keyup")this.handleKeyupEvent(t);else if(t.type==="pointermove")this.lastMoveEvent=t;else if(t.type==="pointerup"&&t.target===this.scrim)Number.isFinite(this.rootMenu._openTimestamp)&&Date.now()-this.rootMenu._openTimestamp<120?this.state="modal":this.state==="modal"&&this.hide();else if(t.type==="contextmenu"){t.preventDefault(),t.stopPropagation();return}super.handleEvent(t)}dispatchEvent(t){return this._host?this._host.dispatchEvent(t):!0}get scrim(){return Pl.element}connectScrim(t){const n=this.scrim;n.addEventListener("pointerup",this),n.addEventListener("contextmenu",this),n.addEventListener("keydown",this),n.addEventListener("keyup",this),n.addEventListener("pointermove",this),Pl.open({root:t,onDismiss:()=>this.hide()})}disconnectScrim(){const t=this.scrim;t.removeEventListener("pointerup",this),t.removeEventListener("contextmenu",this),t.removeEventListener("keydown",this),t.removeEventListener("keyup",this),t.removeEventListener("pointermove",this),Pl.state==="open"&&Pl.scrim.close()}get rootMenu(){return this}show(t){return this._onDismiss=t==null?void 0:t.onDismiss,t!=null&&t.modifiers&&(this.modifiers=t.modifiers),this.updateState(),this.connectScrim(t==null?void 0:t.target),super.show(F(E({},t),{container:this.scrim}))?(this._openTimestamp=Date.now(),this.state="open",!0):(this.disconnectScrim(),!1)}hide(){this.cancelDelayedOperation(),this.state!==void 0&&(this.state!=="closed"&&(this.activeMenuItem=null,Pl.element.parentElement.focus(),super.hide(),this.state="closed",this.disconnectScrim()),this._onDismiss&&(this._onDismiss(),this._onDismiss=void 0))}scheduleOperation(t){this.cancelDelayedOperation();const n=cp.SUBMENU_DELAY;if(n<=0){t();return}this.hysteresisTimer=setTimeout(()=>{this.hysteresisTimer=0,t()},n)}cancelDelayedOperation(){this.hysteresisTimer&&(clearTimeout(this.hysteresisTimer),this.hysteresisTimer=0)}};l0.SUBMENU_DELAY=120;var Lg=l0;function c0(e){return Vf(e)?!1:typeof e.label=="function"||typeof e.ariaLabel=="function"||typeof e.tooltip=="function"||(Nl(e)||Mu(e))&&(typeof e.enabled=="function"||typeof e.visible=="function")||Nl(e)&&typeof e.checked=="function"?!0:Mu(e)?e.submenu.some(c0):!1}var rf=class{};rf.DELAY=300,rf.MAX_DISTANCE=10;function Ig(e){return new Promise((t,n)=>{const i=Td(e);i||t(!1);let o=i;const c=setTimeout(()=>{f.abort(),t(Eg(o,i)<rf.MAX_DISTANCE)},rf.DELAY),f=new AbortController,b=f.signal;for(const C of["pointermove","pointerup","pointercancel"])window.addEventListener(C,k=>{if(k.type==="pointerup"||k.type==="pointercancel")clearTimeout(c),f.abort(),t(!1);else if(k.type==="pointermove"){const $=Td(k);$&&(o=$)}},{passive:!0,signal:b})})}function u0(e,t,n){return Mc(this,null,function*(){if(e.type==="contextmenu"){const i=e;if(n.show({target:t,location:Td(i),modifiers:Kc(i)}))return e.preventDefault(),e.stopPropagation(),!0}if(e.type==="keydown"){const i=e;if(i.code==="ContextMenu"||i.code==="F10"&&i.shiftKey){const o=t==null?void 0:t.getBoundingClientRect();if(o&&n.show({target:t,location:{x:Math.ceil(o.left+o.width/2),y:Math.ceil(o.top+o.height/2)},modifiers:Kc(i)}))return e.preventDefault(),e.stopPropagation(),!0}}if(e.type==="pointerdown"&&e.pointerType!=="mouse"&&e.button===0){let i=e.target;for(;i&&t!==i;)i=i.parentNode;if(!i||!n.visible)return!1;const o=Td(e);if(yield Ig(e))return n.state!=="closed"?!1:(n.show({target:t,location:o}),!0)}return!1})}var d0={acute:714,grave:715,dot:729,ddot:168,mathring:730,tilde:126,bar:713,breve:728,check:711,hat:94,vec:8407};ce(Object.keys(d0),"{body:auto}",{createAtom:e=>new a(F(E({},e),{body:Oe(e.args[0]),accentChar:d0[e.command.slice(1)]}))}),ce(["widehat","widecheck","widetilde"],"{body:auto}",{createAtom:e=>{const t=U(Oe(e.args[0]));return new a(F(E({},e),{body:Oe(e.args[0]),svgAccent:e.command.slice(1)+(t.length>5?"4":["1","1","2","2","3","3"][t.length])}))}}),ce(["overarc","overparen","wideparen"],"{body:auto}",{createAtom:e=>new a(F(E({},e),{body:Oe(e.args[0]),svgAccent:"overarc"}))}),ce(["underarc","underparen"],"{body:auto}",{createAtom:e=>new il(F(E({},e),{body:Oe(e.args[0]),svgBelow:"underarc"}))}),ce("utilde","{body:auto}",{createAtom:e=>{const t=Oe(e.args[0]),n=U(t),i="widetilde"+(n.length>5?"4":["1","1","2","2","3","3"][n.length]);return new il(F(E({},e),{body:t,svgBelow:i,boxType:El(t)}))}}),ce("^","{:string}",{createAtom:e=>{var t;return new Zt(F(E({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE2",e:"\xEA",i:"\xEE",o:"\xF4",u:"\xFB",A:"\xC2",E:"\xCA",I:"\xCE",O:"\xD4",U:"\xDB"}[e.args[0]])!=null?t:"^"}))}}),ce("`","{:string}",{createAtom:e=>{var t;return new Zt(F(E({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE0",e:"\xE8",i:"\xEC",o:"\xF2",u:"\xF9",A:"\xC0",E:"\xC8",I:"\xCC",O:"\xD2",U:"\xD9"}[e.args[0]])!=null?t:"`"}))}}),ce("'","{:string}",{createAtom:e=>{var t;return new Zt(F(E({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={a:"\xE1",e:"\xE9",i:"\xED",o:"\xF3",u:"\xFA",A:"\xC1",E:"\xC9",I:"\xCD",O:"\xD3",U:"\xDA"}[e.args[0]])!=null?t:"'"}))}}),ce('"',"{:string}",{createAtom:e=>{var t,n;return new Zt(F(E({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(n={a:"\xE4",e:"\xEB",i:"\xEF",o:"\xF6",u:"\xFC",A:"\xC4",E:"\xCB",I:"\xCB",O:"\xD6",U:"\xDC"}[e.args[0]])!=null?n:'"'+e.args[0]:'"'}))}}),ce(".","{:string}",{createAtom:e=>{var t,n;return new Zt(F(E({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(n={a:"\u0227",e:"\u0117",i:"\u0307i",o:"\u022F",u:"\u0307u",A:"\u0226",E:"\u0116",I:"\u0130",O:"\u022E",U:"\u0307U"}[e.args[0]])!=null?n:"."+e.args[0]:"."}))}}),ce("=","{:string}",{createAtom:e=>{var t,n;return new Zt(F(E({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:(t=e.args)!=null&&t[0]?(n={a:"\u0101",e:"\u0113",i:"\u012B",o:"\u014D",u:"\u016B",A:"\u0100",E:"\u0112",I:"\u012A",O:"\u014C",U:"\u016A"}[e.args[0]])!=null?n:"="+e.args[0]:"="}))}}),ce("~","{:string}",{createAtom:e=>{var t;return new Zt(F(E({type:"mord"},e),{isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={n:"\xF1",N:"\xD1",a:"\xE3",o:"\xF5",A:"\xC3",O:"\xD5"}[e.args[0]])!=null?t:"\xB4"}))}}),ce("c","{:string}",{createAtom:e=>{var t;return new Zt(F(E({},e),{type:"mord",isFunction:!1,limits:"adjacent",value:e.args[0]&&(t={c:"\xE7",C:"\xC7"}[e.args[0]])!=null?t:""}))}}),ce("enclose","{notation:string}[style:string]{body:auto}",{createAtom:e=>{var t,n;const i=e.args,o={strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"none",svgStrokeStyle:void 0,borderStyle:void 0,style:(t=e.style)!=null?t:{}};if(i[1]){const f=i[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const b of f){const C=b.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(C)o.strokeWidth=C[1],o.strokeStyle=C[2],o.strokeColor=C[3];else{const k=b.match(/\s*([a-z]*)\s*=\s*"(.*)"/);k&&(k[1]==="mathbackground"?o.backgroundcolor=k[2]:k[1]==="mathcolor"?o.strokeColor=k[2]:k[1]==="padding"?o.padding=k[2]:k[1]==="shadow"&&(o.shadow=k[2]))}}o.strokeStyle==="dashed"?o.svgStrokeStyle="5,5":o.strokeStyle==="dotted"&&(o.svgStrokeStyle="1,5")}o.borderStyle=`${o.strokeWidth} ${o.strokeStyle} ${o.strokeColor}`;const c={};return((n=i[0])!=null?n:"").split(/[, ]/).filter(f=>f.length>0).forEach(f=>{c[f.toLowerCase()]=!0}),new Vu(e.command,Oe(i[2]),c,o)}}),ce("cancel","{body:auto}",{createAtom:e=>{var t;return new Vu(e.command,Oe(e.args[0]),{updiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(t=e.style)!=null?t:{}})}}),ce("bcancel","{body:auto}",{createAtom:e=>{var t;return new Vu(e.command,Oe(e.args[0]),{downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(t=e.style)!=null?t:{}})}}),ce("xcancel","{body:auto}",{createAtom:e=>{var t;return new Vu(e.command,Oe(e.args[0]),{updiagonalstrike:!0,downdiagonalstrike:!0},{strokeColor:"currentColor",strokeWidth:"",strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"none",style:(t=e.style)!=null?t:{}})}}),ce(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overlinesegment","overgroup"],"{:auto}",{createAtom:e=>{var t;return new il(F(E({},e),{body:Oe((t=e.args)==null?void 0:t[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgAbove:e.command.slice(1)}))}}),ce("overbrace","{:auto}",{createAtom:e=>new il(F(E({},e),{body:Oe(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgAbove:e.command.slice(1)}))}),ce(["underrightarrow","underleftarrow","underleftrightarrow","underlinesegment","undergroup"],"{:auto}",{createAtom:e=>new il(F(E({},e),{body:Oe(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"rel",svgBelow:e.command.slice(1)}))}),ce(["underbrace"],"{:auto}",{createAtom:e=>new il(F(E({},e),{body:Oe(e.args[0]),skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,boxType:"ord",svgBelow:e.command.slice(1)}))}),ce(["xrightarrow","longrightarrow","xleftarrow","longleftarrow","xRightarrow","xLeftarrow","xleftharpoonup","xleftharpoondown","xrightharpoonup","xrightharpoondown","xlongequal","xtwoheadleftarrow","xtwoheadrightarrow","xleftrightarrow","longleftrightarrow","xLeftrightarrow","xrightleftharpoons","longrightleftharpoons","xleftrightharpoons","xhookleftarrow","xhookrightarrow","xmapsto","xtofrom","xleftrightarrows","longleftrightarrows","xRightleftharpoons","longRightleftharpoons","xLeftrightharpoons","longLeftrightharpoons"],"[:auto]{:auto}",{createAtom:e=>{var t,n,i,o,c;return new il(F(E({},e),{svgBody:e.command.slice(1),above:((n=Oe((t=e.args)==null?void 0:t[1]))==null?void 0:n.length)===0?void 0:Oe((i=e.args)==null?void 0:i[1]),below:(c=Oe((o=e.args)==null?void 0:o[0]))!=null?c:null,skipBoundary:!1,supsubPlacement:"over-under",paddedBody:!0,paddedLabels:!0,boxType:"rel"}))},serialize:(e,t)=>e.command+(e.hasEmptyBranch("below")?"":`[${e.belowToLatex(t)}]`)+`{${e.aboveToLatex(t)}}${e.supsubToLatex(t)}`}),ce(["arccos","arcsin","arctan","arctg","arcctg","arg","ch","cos","cosh","cot","cotg","coth","ctg","cth","csc","cosec","deg","dim","exp","gcd","hom","inf","ker","lb","lg","ln","log","Pr","sec","sh","sin","sinh","sup","tan","tanh","tg","th","arcsec","arccsc","arsinh","arcosh","artanh","arcsech","arccsch"],"",{isFunction:!0,ifMode:"math",createAtom:e=>new Fc(e.command.slice(1),F(E({},e),{limits:"adjacent",isFunction:!0,variant:"main",variantStyle:"up"}))}),ce(["liminf","limsup"],"",{ifMode:"math",createAtom:e=>new Fc({"\\liminf":"lim inf","\\limsup":"lim sup"}[e.command],F(E({},e),{limits:"over-under",variant:"main"}))}),ce(["lim","mod"],"",{ifMode:"math",createAtom:e=>new Fc(e.command.slice(1),F(E({},e),{limits:"over-under",variant:"main"}))}),ce(["det","max","min"],"",{ifMode:"math",isFunction:!0,createAtom:e=>new Fc(e.command.slice(1),F(E({},e),{limits:"over-under",isFunction:!0,variant:"main"}))}),ce(["ang"],"{:math}",{ifMode:"math",createAtom:e=>new Zt(F(E({},e),{body:Oe(e.args[0])})),serialize:(e,t)=>`\\ang{${e.bodyToLatex(t)}}`,render:(e,t)=>{const n=e.createBox(t),i=n.caret;n.caret=void 0;const o=new vn("\xB0",{style:F(E({},e.style),{variant:"normal",variantStyle:"up"})});return new vn([n,o],{type:"inner",isSelected:e.isSelected,caret:i})}}),ce("sqrt","[index:auto]{radicand:expression}",{ifMode:"math",createAtom:e=>new fh(F(E({},e),{body:Oe(e.args[1]),index:e.args[0]?Oe(e.args[0]):void 0}))}),ce(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{:expression}{:expression}",{ifMode:"math",createAtom:e=>{const t=E({},e),n=e.command,i=e.args;switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":t.hasBarLine=!0;break;case"\\atopfrac":t.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":t.hasBarLine=!1,t.leftDelim="(",t.rightDelim=")";break;case"\\cfrac":t.hasBarLine=!0,t.continuousFraction=!0;break;default:}switch(n){case"\\dfrac":case"\\dbinom":t.mathstyleName="displaystyle";break;case"\\tfrac":case"\\tbinom":t.mathstyleName="textstyle";break;default:}return new mu(i[0]?Oe(i[0]):[new Dr],i[1]?Oe(i[1]):[new Dr],t)},serialize:(e,t)=>{const n=e.aboveToLatex(t),i=e.belowToLatex(t);return/^[0-9]$/.test(n)&&/^[0-9]$/.test(i)?`${e.command}${n}${i}`:Ji(e.command,n,i)}}),ce(["brace","brack"],"",{infix:!0,createAtom:e=>new mu(Oe(e.args[0]),Oe(e.args[1]),F(E({},e),{hasBarLine:!1,leftDelim:e.command==="\\brace"?"\\lbrace":"\\lbrack",rightDelim:e.command==="\\brace"?"\\rbrace":"\\rbrack"})),serialize:(e,t)=>ri([e.aboveToLatex(t),e.command,e.belowToLatex(t)])}),ce(["over","atop","choose"],"",{infix:!0,createAtom:e=>{let t,n;const i=e.args;return e.command==="\\choose"&&(t="(",n=")"),new mu(Oe(i[0]),Oe(i[1]),F(E({},e),{hasBarLine:e.command==="\\over",leftDelim:t,rightDelim:n}))},serialize:(e,t)=>ri([e.aboveToLatex(t),e.command,e.belowToLatex(t)])}),ce(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0,createAtom:e=>{var t,n;const i=e.args;return new mu(Oe(i[0]),Oe(i[1]),F(E({},e),{leftDelim:(t=i[2])!=null?t:".",rightDelim:(n=i[3])!=null?n:".",hasBarLine:!1}))},serialize:(e,t)=>`${e.aboveToLatex(t)} ${e.command}${e.leftDelim}${e.rightDelim}${e.belowToLatex(t)}`}),ce("pdiff","{numerator}{denominator}",{ifMode:"math",createAtom:e=>new mu(Oe(e.args[0]),Oe(e.args[1]),F(E({},e),{hasBarLine:!0,numerPrefix:"\u2202",denomPrefix:"\u2202"}))}),ce(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","intop"],"",{ifMode:"math",createAtom:e=>new yf({coprod:"\u2210",bigvee:"\u22C1",bigwedge:"\u22C0",biguplus:"\u2A04",bigcap:"\u22C2",bigcup:"\u22C3",intop:"\u222B",prod:"\u220F",sum:"\u2211",bigotimes:"\u2A02",bigoplus:"\u2A01",bigodot:"\u2A00",bigsqcup:"\u2A06",smallint:"\u222B"}[e.command.slice(1)],F(E({},e),{limits:"auto",variant:"main"}))}),ce("smallint","",{ifMode:"math",createAtom:e=>new Fc("\u222B",F(E({},e),{limits:"adjacent",variant:"main"}))});var f0={int:"\u222B",iint:"\u222C",iiint:"\u222D",oint:"\u222E",oiint:"\u222F",oiiint:"\u2230",intclockwise:"\u2231",varointclockwise:"\u2232",ointctrclockwise:"\u2233",intctrclockwise:"\u2A11",sqcup:"\u2294",sqcap:"\u2293",uplus:"\u228E",wr:"\u2240",amalg:"\u2A3F",Cap:"\u22D2",Cup:"\u22D3",doublecap:"\u22D2",doublecup:"\u22D3"};ce(Object.keys(f0),"",{ifMode:"math",createAtom:e=>{const t=e.command,n=f0[t.slice(1)];return new yf(n,F(E({},e),{limits:"adjacent",variant:{"\u22D2":"ams","\u22D3":"ams"}[n]}))}}),ce(["Re","Im"],"",{ifMode:"math",createAtom:e=>new Fc({"\\Re":"\u211C","\\Im":"\u2111"}[e.command],F(E({},e),{limits:"adjacent",isFunction:!0,variant:"fraktur"}))}),ce("middle","{:delim}",{ifMode:"math",createAtom:e=>{var t;return new ch(F(E({},e),{delim:(t=e.args[0])!=null?t:"|",size:1}))}}),ce("the","{:value}",{createAtom:e=>new Zt(F(E({},e),{captureSelection:!0,verbatimLatex:null})),render:(e,t)=>{var n;const i=new xi({parent:t},e.style);let o="";e.isSelected&&(o+=" ML__selected");const c=i.evaluate(e.args[0]);return new vn(((n=ka(c))!=null?n:"").split("").map(f=>new vn(f,{type:"ord",classes:o,mode:e.mode,isSelected:e.isSelected,style:E({variant:"main"},e.style)})),{type:"lift",style:e.style,caret:e.caret,isSelected:e.isSelected,classes:o}).wrap(i)},serialize:e=>{var t;return`\\the${(t=ka(e.args[0]))!=null?t:"\\relax"}`}}),ce("mathtip","{:auto}{:math}",{createAtom:e=>new bf(F(E({},e),{body:Oe(e.args[0]),tooltip:Oe(e.args[1]),content:"math"})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\texttip{${e.bodyToLatex(t)}}{${Zt.serialize([e.tooltip],F(E({},t),{defaultMode:"math"}))}}`}),ce("texttip","{:auto}{:text}",{createAtom:e=>new bf(F(E({},e),{body:Oe(e.args[0]),tooltip:Oe(e.args[1]),content:"text"})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\texttip{${e.bodyToLatex(t)}}{${Zt.serialize([e.tooltip],F(E({},t),{defaultMode:"text"}))}}`}),ce("error","{:math}",{createAtom:e=>new Zt(F(E({},e),{body:Oe(e.args[0])})),serialize:(e,t)=>`\\error{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__error"})}),ce("ensuremath","{:math}",{createAtom:e=>new Zt(F(E({},e),{body:Oe(e.args[0])})),serialize:(e,t)=>`${e.command}{${e.bodyToLatex(F(E({},t),{defaultMode:"math"}))}}`}),ce("color","{:value}",{applyStyle:(e,t,n)=>{var i,o;return{verbatimColor:(i=ka(t[0]))!=null?i:void 0,color:n.toColor((o=t[0])!=null?o:{string:"red"})}}}),ce("textcolor","{:value}{content:auto*}",{applyStyle:(e,t,n)=>{var i,o;return{verbatimColor:(i=ka(t[0]))!=null?i:void 0,color:n.toColor((o=t[0])!=null?o:{string:"red"})}}}),ce("boxed","{content:math}",{createAtom:e=>new Ya(F(E({},e),{body:Oe(e.args[0]),framecolor:{string:"black"}}))}),ce("colorbox","{:value}{:text*}",{applyStyle:(e,t,n)=>{var i,o;return{verbatimBackgroundColor:(i=ka(t[0]))!=null?i:void 0,backgroundColor:n.toBackgroundColor((o=t[0])!=null?o:{string:"yellow"})}}}),ce("fcolorbox","{frame-color:value}{background-color:value}{content:text}",{applyMode:"text",createAtom:e=>{var t,n;return new Ya(F(E({},e),{body:Oe(e.args[2]),framecolor:(t=e.args[0])!=null?t:{string:"blue"},backgroundcolor:(n=e.args[1])!=null?n:{string:"yellow"}}))},serialize:(e,t)=>{var n,i;return t.skipStyles?e.bodyToLatex(F(E({},t),{defaultMode:"text"})):Ji(e.command,(n=ka(e.framecolor))!=null?n:"",(i=ka(e.backgroundcolor))!=null?i:"",e.bodyToLatex(F(E({},t),{defaultMode:"text"})))}}),ce("bbox","[:bbox]{body:auto}",{createAtom:e=>{var t;const n=e.args[0],i=Oe(e.args[1]);return n?new Ya(F(E({},e),{body:i,padding:n.padding,border:n.border,backgroundcolor:(t=n.backgroundcolor)!=null?t:void 0})):new Ya(F(E({},e),{body:i}))},serialize:(e,t)=>{var n,i;if(t.skipStyles)return e.bodyToLatex(t);let o=e.command;if(Number.isFinite(e.padding)||e.border!==void 0||e.backgroundcolor!==void 0){const c=[];e.padding&&c.push((n=ka(e.padding))!=null?n:""),e.border&&c.push(`border: ${e.border}`),e.backgroundcolor&&c.push((i=ka(e.backgroundcolor))!=null?i:""),o+=`[${c.join(",")}]`}return Ji(o,e.bodyToLatex(t))}}),ce(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"{:rest}",{createAtom:e=>new Zt(F(E({},e),{body:Oe(e.args[0])})),render:(e,t)=>{const n=new xi({parent:t,mathstyle:e.command.slice(1)},e.style),i=Zt.createBox(n,e.body,{type:"lift"});return e.caret&&(i.caret=e.caret),e.bind(t,i)},serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`{${ri([e.command,e.bodyToLatex(t)])}}`}),ce(["tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"],"",{applyStyle:e=>({fontSize:{"\\tiny":1,"\\scriptsize":2,"\\footnotesize":3,"\\small":4,"\\normalsize":5,"\\large":6,"\\Large":7,"\\LARGE":8,"\\huge":9,"\\Huge":10}[e]})}),ce("fontseries","{:string}",{ifMode:"text",applyStyle:(e,t)=>{var n;return{fontSeries:(n=t[0])!=null?n:"auto"}}}),ce("fontshape","{:string}",{ifMode:"text",applyStyle:(e,t)=>{var n;return{fontShape:(n=t[0])!=null?n:"auto"}}}),ce("fontfamily","{:string}",{ifMode:"text",applyStyle:(e,t)=>{var n;return{fontFamily:(n=t[0])!=null?n:"roman"}}}),ce("selectfont","",{ifMode:"text",applyStyle:()=>({})}),ce("bf","{:rest}",{applyStyle:()=>({fontSeries:"b",fontShape:"n",fontFamily:"roman"})}),ce(["boldsymbol","bm"],"{:math}",{applyMode:"math",createAtom:e=>new Zt(F(E({},e),{body:Oe(e.args[0])})),serialize:(e,t)=>`${e.command}{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__boldsymbol"})}),ce("bold","{:math*}",{applyMode:"math",applyStyle:()=>({variantStyle:"bold"})}),ce("bfseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),ce("mdseries","{:rest}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),ce("upshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),ce("slshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),ce("scshape","{:rest}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),ce("textbf","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"b"})}),ce("textmd","{:text*}",{applyMode:"text",applyStyle:()=>({fontSeries:"m"})}),ce("textup","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n"})}),ce("textnormal","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"n",fontSeries:"m"})}),ce("textsl","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sl"})}),ce("textit","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"it"})}),ce("textsc","{:text*}",{applyMode:"text",applyStyle:()=>({fontShape:"sc"})}),ce("textrm","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"roman"})}),ce("textsf","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"sans-serif"})}),ce("texttt","{:text*}",{applyMode:"text",applyStyle:()=>({fontFamily:"monospace"})}),ce("mathbf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"bold"})}),ce("mathit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"italic"})}),ce("mathnormal","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"italic"})}),ce("mathbfit","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"main",variantStyle:"bolditalic"})}),ce("mathrm","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"normal",variantStyle:"up"})}),ce("mathsf","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"sans-serif",variantStyle:"up"})}),ce("mathtt","{:math*}",{applyMode:"math",applyStyle:()=>({variant:"monospace",variantStyle:"up"})}),ce("it","{:rest}",{applyStyle:()=>({fontSeries:"m",fontShape:"it",fontFamily:"roman",variantStyle:"italic"})}),ce("rmfamily","",{applyStyle:()=>({fontFamily:"roman"})}),ce("sffamily","",{applyStyle:()=>({fontFamily:"sans-serif"})}),ce("ttfamily","",{applyStyle:()=>({fontFamily:"monospace"})}),ce(["Bbb","mathbb"],"{:math*}",{applyStyle:()=>({variant:"double-struck",variantStyle:"up"})}),ce(["frak","mathfrak"],"{:math*}",{applyStyle:()=>({variant:"fraktur",variantStyle:"up"})}),ce("mathcal","{:math*}",{applyStyle:()=>({variant:"calligraphic",variantStyle:"up"})}),ce("mathscr","{:math*}",{applyStyle:()=>({variant:"script",variantStyle:"up"})}),ce("mbox","{:text}",{ifMode:"math",createAtom:e=>new Zt(F(E({},e),{type:"mord",body:Oe(e.args[0]),mode:"math"})),serialize:(e,t)=>Ji("\\mbox",e.bodyToLatex(F(E({},t),{defaultMode:"text"})))}),ce("text","{:text}",{ifMode:"math",applyMode:"text"}),ce(["class","htmlClass"],"{name:string}{content:auto}",{createAtom:e=>new Zt(F(E({},e),{body:Oe(e.args[1])})),serialize:(e,t)=>!e.args[0]||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`,render:(e,t)=>{var n;return e.createBox(t,{classes:(n=e.args[0])!=null?n:""})}}),ce(["cssId","htmlId"],"{id:string}{content:auto}",{createAtom:e=>new Zt(F(E({},e),{body:Oe(e.args[1])})),serialize:(e,t)=>{var n;return!((n=e.args)!=null&&n[0])||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var n;const i=e.createBox(t);return i.cssId=(n=e.args[0])!=null?n:"",i}}),ce("htmlData","{data:string}{content:auto}",{createAtom:e=>new Zt(F(E({},e),{body:Oe(e.args[1])})),serialize:(e,t)=>{var n;return!((n=e.args)!=null&&n[0])||t.skipStyles?e.bodyToLatex(t):`\\htmlData{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var n;const i=e.createBox(t);return i.htmlData=(n=e.args[0])!=null?n:"",i}}),ce(["style","htmlStyle"],"{data:string}{content:auto}",{createAtom:e=>new Zt(F(E({},e),{body:Oe(e.args[1])})),serialize:(e,t)=>{var n;return!((n=e.args)!=null&&n[0])||t.skipStyles?e.bodyToLatex(t):`${e.command}{${e.args[0]}}{${e.bodyToLatex(t)}}`},render:(e,t)=>{var n;const i=e.createBox(t);return i.htmlStyle=(n=e.args[0])!=null?n:"",i}}),ce("em","{:rest}",{createAtom:e=>new Zt(F(E({},e),{body:Oe(e.args[0])})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`{\\em ${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__emph",boxType:"lift"})}),ce("emph","{:auto}",{createAtom:e=>new Zt(F(E({},e),{body:Oe(e.args[1])})),serialize:(e,t)=>t.skipStyles?e.bodyToLatex(t):`\\emph{${e.bodyToLatex(t)}}`,render:(e,t)=>e.createBox(t,{classes:"ML__emph",boxType:"lift"})});var h0={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}};ce(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",{createAtom:e=>{var t;return new uh(F(E({},e),{delim:(t=e.args[0])!=null?t:".",size:h0[e.command].size,delimType:h0[e.command].mclass}))}}),ce(["hspace","hspace*"],"{width:value}",{createAtom:e=>{var t;return new Xu(F(E({},e),{width:(t=e.args[0])!=null?t:{dimension:0}}))}}),ce(["mkern","kern","mskip","hskip","mspace"],"{width:value}",{createAtom:e=>{var t;return new Xu(F(E({},e),{width:(t=e.args[0])!=null?t:{dimension:0}}))}}),ce("mathchoice","{:math}{:math}{:math}{:math}",{createAtom:e=>new Zt(e),render:(e,t)=>{let n=0;const i=t.mathstyle.id;(i===Gl||i===Zs)&&(n=1),(i===Ws||i===bo)&&(n=2),(i===Vo||i===no)&&(n=3);const o=Oe(e.args[n]);return Zt.createBox(t,o)},serialize:(e,t)=>`\\mathchoice{${Zt.serialize(e.args[0],t)}}{${Zt.serialize(e.args[1],t)}}{${Zt.serialize(e.args[2],t)}}{${Zt.serialize(e.args[3],t)}}`}),ce("mathop","{:auto}",{createAtom:e=>new Zt(F(E({},e),{type:"mop",body:Oe(e.args[0]),limits:"over-under",isFunction:!0,captureSelection:!0})),render:(e,t)=>{var n;let i=Zt.createBox(t,e.body);if(e.superscript||e.subscript){const o=(n=e.subsupPlacement)!=null?n:"auto";i=o==="over-under"||o==="auto"&&t.isDisplayStyle?e.attachLimits(t,{base:i}):e.attachSupsub(t,{base:i})}return new vn(e.bind(t,i),{type:"op",isSelected:e.isSelected,classes:"op-group"})},serialize:(e,t)=>{const n=[Ji(e.command,e.bodyToLatex(t))];return e.explicitSubsupPlacement&&(e.subsupPlacement==="over-under"&&n.push("\\limits"),e.subsupPlacement==="adjacent"&&n.push("\\nolimits"),e.subsupPlacement==="auto"&&n.push("\\displaylimits")),n.push(e.supsubToLatex(t)),ri(n)}}),ce(["mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",{createAtom:e=>new Zt(F(E({},e),{type:{"\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[e.command],body:Oe(e.args[0])}))}),ce(["operatorname","operatorname*"],"{operator:math}",{createAtom:e=>{const t=Oe(e.args[0]).map(n=>{var i;return n.type!=="first"&&(n.type="mord",n.value=(i={"\u2217":"*","\u2212":"-"}[n.value])!=null?i:n.value,n.isFunction=!1,!n.style.variant&&!n.style.variantStyle&&(n.style.variant="main",n.style.variantStyle="up")),n});return new Zt(F(E({},e),{type:"mop",body:t,isFunction:!0,limits:e.command==="\\operatorname"?"adjacent":"over-under"}))},render:(e,t)=>{var n;let i=Zt.createBox(t,e.body);if(e.superscript||e.subscript){const o=(n=e.subsupPlacement)!=null?n:"auto";i=o==="over-under"||o==="auto"&&t.isDisplayStyle?e.attachLimits(t,{base:i}):e.attachSupsub(t,{base:i})}return e.caret&&(i.caret=e.caret),new vn(e.bind(t,i),{type:"op",isSelected:e.isSelected,classes:"op-group"})},serialize:(e,t)=>{const n=[Ji(e.command,e.bodyToLatex(t))];return e.explicitSubsupPlacement&&(e.subsupPlacement==="over-under"&&n.push("\\limits"),e.subsupPlacement==="adjacent"&&n.push("\\nolimits"),e.subsupPlacement==="auto"&&n.push("\\displaylimits")),n.push(e.supsubToLatex(t)),ri(n)}}),ce(["char","unicode"],"{charcode:value}",{createAtom:e=>new Zt(F(E({},e),{type:e.mode==="text"?"text":"mord"})),serialize:e=>{var t;return`${e.command}${ka((t=e.args[0])!=null?t:{number:10067,base:"hexadecimal"})}`},render:(e,t)=>{let n=t.evaluate(e.args[0]);return(!n||!("number"in n))&&(n={number:10067,base:"hexadecimal"}),e.value=String.fromCodePoint(n.number),e.createBox(t)}}),ce("rule","[raise:value]{width:value}{thickness:value}",{createAtom:e=>new Zt(e),render:(e,t)=>{var n,i,o;const c=new xi({parent:t,mathstyle:"textstyle"},e.style),f=c.toEm((n=e.args[0])!=null?n:{dimension:0}),b=c.toEm((i=e.args[1])!=null?i:{dimension:10}),C=c.toEm((o=e.args[2])!=null?o:{dimension:10}),k=new vn(null,{classes:"rule",type:"ord"});return k.width=b,k.height=C+f,k.depth=-f,k.setStyle("border-right-width",b,"em"),k.setStyle("border-top-width",C,"em"),k.setStyle("border-color",e.style.color),k.setStyle("vertical-align",f,"em"),e.isSelected&&k.setStyle("opacity","50%"),e.bind(c,k),e.caret&&(k.caret=e.caret),k.wrap(t)},serialize:e=>`\\rule${e.args[0]?`[${ka(e.args[0])}]`:""}{${ka(e.args[1])}}{${ka(e.args[2])}}`}),ce(["overline","underline"],"{:auto}",{createAtom:e=>new Zt(F(E({},e),{body:Oe(e.args[0])})),render:(e,t)=>{const n=e.command.substring(1),i=new xi({parent:t,mathstyle:"cramp"},e.style),o=Zt.createBox(i,e.body);if(!o)return null;const c=i.metrics.defaultRuleThickness/i.scalingFactor,f=new vn(null,{classes:n+"-line"});f.height=c,f.maxFontSize=c*1.125*i.scalingFactor;let b;return n==="overline"?b=new zi({shift:0,children:[{box:o},3*c,{box:f},c]}):b=new zi({top:o.height,children:[c,{box:f},3*c,{box:o}]}),e.caret&&(b.caret=e.caret),new vn(b,{classes:n,type:"ignore"})}}),ce("overset","{:auto}{base:auto}",{createAtom:e=>{const t=Oe(e.args[1]);return new il(F(E({},e),{above:Oe(e.args[0]),body:t,skipBoundary:!1,boxType:El(t)}))},serialize:(e,t)=>Ji(e.command,e.aboveToLatex(t),e.bodyToLatex(t))}),ce("underset","{:auto}{base:auto}",{createAtom:e=>{const t=Oe(e.args[1]);return new il(F(E({},e),{below:Oe(e.args[0]),body:t,skipBoundary:!1,boxType:El(t)}))},serialize:(e,t)=>Ji(e.command,e.belowToLatex(t),e.bodyToLatex(t))}),ce("overunderset","{above:auto}{below:auto}{base:auto}",{createAtom:e=>{const t=Oe(e.args[2]);return new il(F(E({},e),{above:Oe(e.args[0]),below:Oe(e.args[1]),body:t,skipBoundary:!1,boxType:El(t)}))},serialize:(e,t)=>Ji(e.command,e.belowToLatex(t),e.bodyToLatex(t))}),ce(["stackrel","stackbin"],"[below:auto]{above:auto}{base:auto}",{createAtom:e=>new il(F(E({},e),{body:Oe(e.args[2]),above:Oe(e.args[1]),below:Oe(e.args[0]),skipBoundary:!1,boxType:e.command==="\\stackrel"?"rel":"bin"})),serialize:(e,t)=>Ji(e.command,e.aboveToLatex(t),e.bodyToLatex(t))}),ce("smash","[:string]{:auto}",{createAtom:e=>{var t,n,i,o;return new Gu(F(E({},e),{body:Oe(e.args[1]),smashHeight:(n=(t=e.args[0])==null?void 0:t.includes("t"))!=null?n:!0,smashDepth:(o=(i=e.args[0])==null?void 0:i.includes("b"))!=null?o:!0}))}}),ce(["vphantom"],"{:auto}",{createAtom:e=>new Gu(F(E({},e),{body:Oe(e.args[0]),isInvisible:!0,smashWidth:!0}))}),ce(["hphantom"],"{:auto}",{createAtom:e=>new Gu(F(E({},e),{body:Oe(e.args[0]),isInvisible:!0,smashHeight:!0,smashDepth:!0}))}),ce(["phantom"],"{:auto}",{createAtom:e=>new Gu(F(E({},e),{body:Oe(e.args[0]),isInvisible:!0}))}),ce("not","{:math}",{createAtom:e=>{const t=Oe(e.args[0]);return t.length===0?new Zt(F(E({},e),{type:"mrel",value:"\uE020"})):new Zt(F(E({},e),{body:[new zc(F(E({},e),{body:"\uE020",align:"right"})),...t],captureSelection:!0}))},serialize:(e,t)=>{const n=e.args[0],i=n&&typeof n=="object"&&"group"in n;return e.value!=="\uE020"?i?`\\not{${Zt.serialize(n.group,t)}}`:`\\not${Zt.serialize(n,t)}`:i?"\\not{}":"\\not"},render:(e,t)=>{if(e.value)return e.createBox(t);const i=e.args[0]&&typeof e.args[0]=="object"&&"group"in e.args[0]?"ord":El(Oe(e.args[0])),o=Zt.createBox(t,e.body,{type:i});return e.caret&&(o.caret=e.caret),e.bind(t,o)}}),ce(["ne","neq"],"",{createAtom:e=>new Zt(F(E({},e),{type:"mrel",body:[new zc(F(E({},e),{body:"\uE020",align:"right",boxType:"rel"})),new Zt(F(E({},e),{value:"="}))],captureSelection:!0})),serialize:e=>e.command}),ce("rlap","{:auto}",{createAtom:e=>new zc(F(E({},e),{body:Oe(e.args[0]),align:"right"}))}),ce("llap","{:auto}",{createAtom:e=>new zc(F(E({},e),{body:Oe(e.args[0]),align:"left"}))}),ce("mathrlap","{:math}",{createAtom:e=>new zc(F(E({},e),{body:Oe(e.args[0]),align:"left"}))}),ce("mathllap","{:math}",{createAtom:e=>new zc(F(E({},e),{body:Oe(e.args[0]),align:"left"}))}),ce("raisebox","{:value}{:text}",{createAtom:e=>{var t;return new Ya(F(E({},e),{body:Oe(e.args[1]),padding:{dimension:0},offset:(t=e.args[0])!=null?t:{dimension:0}}))},serialize:(e,t)=>{var n;return Ji("\\raisebox",(n=ka(e.offset))!=null?n:"0pt",e.bodyToLatex(t))}}),ce("raise","{:value}{:auto}",{createAtom:e=>{var t;return new Ya(F(E({},e),{body:Oe(e.args[1]),padding:{dimension:0},offset:(t=e.args[0])!=null?t:{dimension:0}}))},serialize:(e,t)=>{var n;return Ji("\\raise",(n=ka(e.offset))!=null?n:"0pt",e.bodyToLatex(t))}}),ce("lower","{:value}{:auto}",{createAtom:e=>{var t;return new Ya(F(E({},e),{body:Oe(e.args[1]),padding:{dimension:0},offset:(t=ls(e.args[0],-1))!=null?t:{dimension:0}}))},serialize:(e,t)=>{var n,i;return Ji("\\lower",(i=ka(ls((n=e.offset)!=null?n:{dimension:0},-1)))!=null?i:"0pt",e.bodyToLatex(t))}}),L("0123456789/@.?!"),fe(65,90),fe(97,122),L([["\\forall",8704],["\\exists",8707],["\\nexists",8708,"mord","ams"],["\\mid",8739,"mrel"],["\\top",8868],["\\bot",8869]]),L([["\\#",35],["\\&",38],["\\parallelogram",9649],["\\spadesuit",9824],["\\heartsuit",9825],["\\diamondsuit",9826],["\\clubsuit",9827],["\\flat",9837],["\\natural",9838],["\\sharp",9839]]),L([["\\backslash",92],["\\nabla",8711],["\\partial",8706],["\\ell",8467],["\\hbar",8463],["\\Q",81,"mord","double-struck"],["\\C",67,"mord","double-struck"],["\\P",80,"mord","double-struck"],["\\pounds",163],["\\euro",8364]]),L([["\\rightarrow",8594],["\\to",8594],["\\leftarrow",8592],["\\gets",8592],["\\Rightarrow",8658],["\\Leftarrow",8656],["\\longrightarrow",10230],["\\longleftarrow",10229],["\\Longrightarrow",10233],["\\implies",10233],["\\Longleftarrow",10232],["\\impliedby",10232],["\\longleftrightarrow",10231],["\\biconditional",10231],["\\Longleftrightarrow",10234],["\\mapsto",8614],["\\longmapsto",10236],["\\uparrow",8593],["\\downarrow",8595],["\\Uparrow",8657],["\\Downarrow",8659],["\\updownarrow",8597],["\\Updownarrow",8661],["\\hookrightarrow",8618],["\\hookleftarrow",8617],["\\rightharpoonup",8640],["\\leftharpoonup",8636],["\\rightharpoondown",8641],["\\leftharpoondown",8637],["\\searrow",8600],["\\nearrow",8599],["\\swarrow",8601],["\\nwarrow",8598],["\\originalof",8886],["\\laplace",8886],["\\imageof",8887],["\\Laplace",8887]],"mrel"),L([["\\mapsfrom",8612,"mrel"],["\\Mapsfrom",10502,"mrel"],["\\MapsTo",10503,"mrel"],["\\Yup",8516,"mord"],["\\lightning",8623,"mrel"],["\\leftarrowtriangle",8701,"mrel"],["\\rightarrowtriangle",8702,"mrel"],["\\leftrightarrowtriangle",8703,"mrel"],["\\boxdot",8865,"mbin"],["\\bigtriangleup",9651,"mbin"],["\\bigtriangledown",9661,"mbin"],["\\boxbar",9707,"mbin"],["\\Lbag",10181,"mopen"],["\\Rbag",10182,"mclose"],["\\llbracket",10214,"mopen"],["\\rrbracket",10215,"mclose"],["\\longmapsfrom",10235,"mrel"],["\\Longmapsfrom",10237,"mrel"],["\\Longmapsto",10238,"mrel"],["\\boxslash",10692,"mbin"],["\\boxbslash",10693,"mbin"],["\\boxast",10694,"mbin"],["\\boxcircle",10695,"mbin"],["\\boxbox",10696,"mbin"],["\\fatsemi",10783,"mop"],["\\leftslice",10918,"mrel"],["\\rightslice",10919,"mrel"],["\\interleave",10996,"mbin"],["\\biginterleave",11004,"mop"],["\\sslash",11005,"mbin"],["\\talloblong",11006,"mbin"]]),L([["\\lbrace",123,"mopen"],["\\rbrace",125,"mclose"],["\\lparen",40,"mopen"],["\\rparen",41,"mclose"],["\\langle",10216,"mopen"],["\\rangle",10217,"mclose"],["\\lfloor",8970,"mopen"],["\\rfloor",8971,"mclose"],["\\lceil",8968,"mopen"],["\\rceil",8969,"mclose"],["\\vert",8739],["\\lvert",8739,"mopen"],["\\rvert",8739,"mclose"],["\\|",8741],["\\Vert",8741],["\\mVert",8741],["\\lVert",8741,"mopen"],["\\rVert",8741,"mclose"],["\\lbrack",91,"mopen"],["\\rbrack",93,"mclose"],["\\{",123,"mopen"],["\\}",125,"mclose"],["(",40,"mopen"],[")",41,"mclose"],["[",91,"mopen"],["]",93,"mclose"],["\\ulcorner",9484,"mopen","ams"],["\\urcorner",9488,"mclose","ams"],["\\llcorner",9492,"mopen","ams"],["\\lrcorner",9496,"mclose","ams"],["\\lgroup",10222,"mopen"],["\\rgroup",10223,"mclose"],["\\lmoustache",9136,"mopen"],["\\rmoustache",9137,"mclose"]]),L([["\\dashrightarrow",8674],["\\dashleftarrow",8672],["\\Rrightarrow",8667],["\\Lleftarrow",8666],["\\leftrightarrows",8646],["\\rightleftarrows",8644],["\\curvearrowright",8631],["\\curvearrowleft",8630],["\\rightrightarrows",8649],["\\leftleftarrows",8647],["\\upuparrows",8648],["\\downdownarrows",8650],["\\vartriangle",9651],["\\triangleq",8796],["\\vartriangleleft",8882],["\\trianglelefteq",8884],["\\ntriangleleft",8938],["\\ntrianglelefteq",8940],["\\vartriangleright",8883],["\\trianglerighteq",8885],["\\ntriangleright",8939],["\\ntrianglerighteq",8941],["\\blacktriangleleft",9664],["\\blacktriangleright",9654],["\\leftarrowtail",8610],["\\rightarrowtail",8611],["\\looparrowright",8620],["\\looparrowleft",8619],["\\twoheadleftarrow",8606],["\\twoheadrightarrow",8608],["\\twoheadrightarrowtail",10518],["\\rightleftharpoons",8652],["\\leftrightharpoons",8651],["\\Rsh",8625],["\\Lsh",8624],["\\circlearrowright",8635],["\\circlearrowleft",8634],["\\restriction",8638],["\\upharpoonright",8638],["\\upharpoonleft",8639],["\\downharpoonright",8642],["\\downharpoonleft",8643],["\\rightsquigarrow",8669],["\\leadsto",8669],["\\leftrightsquigarrow",8621],["\\multimap",8888],["\\nleftarrow",8602],["\\nrightarrow",8603],["\\nRightarrow",8655],["\\nLeftarrow",8653],["\\nleftrightarrow",8622],["\\nLeftrightarrow",8654],["\\nvrightarrow",8696],["\\nvtwoheadrightarrow",10496],["\\nvrightarrowtail",10516],["\\nvtwoheadrightarrowtail",10519],["\\shortparallel",8741],["\\nless",8814],["\\nleqslant",57360],["\\lneq",10887],["\\lneqq",8808],["\\nleqq",57361],["\\lvertneqq",57356],["\\lnsim",8934],["\\lnapprox",10889],["\\nprec",8832],["\\npreceq",8928],["\\precnsim",8936],["\\precnapprox",10937],["\\nsim",8769],["\\nshortmid",57350],["\\nmid",8740],["\\nvdash",8876],["\\nvDash",8877],["\\ngtr",8815],["\\ngeqslant",57359],["\\ngeqq",57358],["\\gneq",10888],["\\gneqq",8809],["\\gvertneqq",57357],["\\gnsim",8935],["\\gnapprox",10890],["\\nsucc",8833],["\\nsucceq",8929],["\\succnsim",8937],["\\succnapprox",10938],["\\ncong",8774],["\\nshortparallel",57351],["\\nparallel",8742],["\\nVDash",8879],["\\nsupseteqq",57368],["\\supsetneq",8843],["\\varsupsetneq",57371],["\\supsetneqq",10956],["\\varsupsetneqq",57369],["\\nVdash",8878],["\\precneqq",10933],["\\succneqq",10934],["\\nsubseteqq",57366],["\\leqslant",10877],["\\geqslant",10878],["\\gtrsim",8819],["\\approxeq",8778],["\\thickapprox",8776],["\\lessapprox",10885],["\\gtrapprox",10886],["\\precapprox",10935],["\\succapprox",10936],["\\thicksim",8764],["\\succsim",8831],["\\precsim",8830],["\\backsim",8765],["\\eqsim",8770],["\\backsimeq",8909],["\\lesssim",8818],["\\nleq",8816],["\\ngeq",8817],["\\smallsmile",8995],["\\smallfrown",8994],["\\leqq",8806],["\\eqslantless",10901],["\\lll",8920],["\\lessgtr",8822],["\\lesseqgtr",8922],["\\lesseqqgtr",10891],["\\risingdotseq",8787],["\\fallingdotseq",8786],["\\subseteqq",10949],["\\Subset",8912],["\\sqsubset",8847],["\\preccurlyeq",8828],["\\curlyeqprec",8926],["\\vDash",8872],["\\Vvdash",8874],["\\bumpeq",8783],["\\Bumpeq",8782],["\\geqq",8807],["\\eqslantgtr",10902],["\\ggg",8921],["\\gtrless",8823],["\\gtreqless",8923],["\\gtreqqless",10892],["\\supseteqq",10950],["\\Supset",8913],["\\sqsupset",8848],["\\succcurlyeq",8829],["\\curlyeqsucc",8927],["\\Vdash",8873],["\\shortmid",8739],["\\between",8812],["\\pitchfork",8916],["\\varpropto",8733],["\\backepsilon",8717],["\\llless",8920],["\\gggtr",8921],["\\doteqdot",8785],["\\Doteq",8785],["\\eqcirc",8790],["\\circeq",8791],["\\therefore",8756],["\\because",8757]],"mrel","ams"),L([["+",43],["-",8722],["\u2212",8722],["\\pm",177],["\\mp",8723],["*",8727],["\\times",215],["\\div",247],["\\divides",8739],["\\cdot",8901],["\\cap",8745],["\\cup",8746],["\\setminus",8726],["\\land",8743],["\\wedge",8743],["\\lor",8744],["\\vee",8744],["\\circ",8728],["\\bigcirc",9711],["\\bullet",8729],["\\oplus",8853],["\\ominus",8854],["\\otimes",8855],["\\odot",8857],["\\oslash",8856],["\\bigtriangleup",9651],["\\bigtriangledown",9661],["\\triangleleft",9667],["\\triangleright",9657],["\\And",38],["\\dagger",8224],["\\dag",8224],["\\ddag",8225],["\\ddagger",8225],["\\ast",8727],["\\star",8902],["\\bigstar",9733],["\\diamond",8900]],"mbin"),L([["\\lhd",8882],["\\rhd",8883],["\\lessdot",8918],["\\gtrdot",8919],["\\ltimes",8905],["\\rtimes",8906],["\\leftthreetimes",8907],["\\rightthreetimes",8908],["\\intercal",8890],["\\dotplus",8724],["\\doublebarwedge",10846],["\\divideontimes",8903],["\\centerdot",8901],["\\smallsetminus",8726],["\\barwedge",8892],["\\veebar",8891],["\\nor",8891],["\\curlywedge",8911],["\\curlyvee",8910],["\\boxminus",8863],["\\boxplus",8862],["\\boxtimes",8864],["\\boxdot",8865],["\\circleddash",8861],["\\circledast",8859],["\\circledcirc",8858],["\\unlhd",8884],["\\unrhd",8885]],"mbin","ams"),L([["\\surd",8730],["\\infty",8734],["\\prime",8242],["\\doubleprime",8243],["\\angle",8736],["`",8216],["\\$",36],["\\%",37],["\\_",95],["\\alpha",945],["\\beta",946],["\\gamma",947],["\\delta",948],["\\epsilon",1013],["\\varepsilon",949],["\\zeta",950],["\\eta",951],["\\theta",952],["\\vartheta",977],["\\iota",953],["\\kappa",954],["\\varkappa",1008,"mord","ams"],["\\lambda",955],["\\mu",956],["\\nu",957],["\\xi",958],["\\omicron",111],["\\pi",960],["\\varpi",982],["\\rho",961],["\\varrho",1009],["\\sigma",963],["\\varsigma",962],["\\tau",964],["\\phi",981],["\\varphi",966],["\\upsilon",965],["\\chi",967],["\\psi",968],["\\omega",969],["\\Gamma",915],["\\Delta",916],["\\Theta",920],["\\Lambda",923],["\\Xi",926],["\\Pi",928],["\\Sigma",931],["\\Upsilon",933],["\\Phi",934],["\\Psi",936],["\\Omega",937],["\\digamma",989,"mord","ams"],["\\emptyset",8709]]),L([["=",61],["<",60],["\\lt",60],[">",62],["\\gt",62],["\\le",8804],["\\leq",8804],["\\ge",8805],["\\geq",8805],["\\ll",8810],["\\gg",8811],["\\coloneq",8788],["\\coloneqq",8788],["\\colonequals",8788],["\\measeq",8797],["\\eqdef",8798],["\\questeq",8799],[":",58],["\\cong",8773],["\\equiv",8801],["\\prec",8826],["\\preceq",10927],["\\succ",8827],["\\succeq",10928],["\\perp",8869],["\\propto",8733],["\\Colon",8759],["\\smile",8995],["\\frown",8994],["\\sim",8764],["\\doteq",8784],["\\bowtie",8904],["\\Join",8904],["\\asymp",8781],["\\sqsubseteq",8849],["\\sqsupseteq",8850],["\\approx",8776],["\\~",126],["\\leftrightarrow",8596],["\\Leftrightarrow",8660],["\\models",8872],["\\vdash",8866],["\\dashv",8867],["\\roundimplies",10608],["\\in",8712],["\\notin",8713],["\\ni",8715],["\\owns",8715],["\\subset",8834],["\\supset",8835],["\\subseteq",8838],["\\supseteq",8839],["\\differencedelta",8710],["\\mvert",8739],["\\parallel",8741],["\\simeq",8771]],"mrel"),L([["\\lnot",172],["\\neg",172],["\\triangle",9651],["\\subsetneq",8842],["\\varsubsetneq",57370],["\\subsetneqq",10955],["\\varsubsetneqq",57367],["\\nsubset",8836],["\\nsupset",8837],["\\nsubseteq",8840],["\\nsupseteq",8841]],"mrel","ams"),L([["\\wp",8472],["\\aleph",8501]]),L([["\\blacktriangle",9650],["\\hslash",8463],["\\Finv",8498],["\\Game",8513],["\\eth",240],["\\mho",8487],["\\Bbbk",107],["\\yen",165],["\\square",9633],["\\Box",9633],["\\blacksquare",9632],["\\circledS",9416],["\\circledR",174],["\\triangledown",9661],["\\blacktriangledown",9660],["\\checkmark",10003],["\\diagup",9585],["\\measuredangle",8737],["\\sphericalangle",8738],["\\backprime",8245],["\\backdoubleprime",8246],["\\Diamond",9674],["\\lozenge",9674],["\\blacklozenge",10731],["\\varnothing",8709],["\\complement",8705],["\\maltese",10016],["\\beth",8502],["\\daleth",8504],["\\gimel",8503]],"mord","ams"),L([["\\ ",160],["~",160]],"space"),ce(["!",",",":",";",">","enskip","enspace","quad","qquad"],"",{createAtom:e=>new Xu(e)}),ce("space","",{createAtom:e=>new Xu(e)}),L([["\\colon",58],["\\cdotp",8901],["\\vdots",8942,"mord"],["\\ldotp",46],[",",44],[";",59]],"mpunct"),L([["\\cdots",8943],["\\ddots",8945],["\\ldots",8230],["\\mathellipsis",8230]],"minner"),L([["\\/",47],["|",8739,"mord"],["\\imath",305],["\\jmath",567],["\\degree",176],["'",8242],['"',8221]]);var p0="<mo>⁡</mo>",af="<mo>⁢</mo>";function of(e){return e.replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function aa(e,t){return!e||!t.generateID?"":` extid="${e}"`}function Tg(e,t,n){var i,o,c,f,b,C,k,$,ne,Me,We;let Je=!1;t=t!=null?t:e.atoms.length;let Ot="",bn="",Dt=e.atoms[e.index];const en=(o=(i=Dt.style)==null?void 0:i.variant)!=null?o:"",Ln=(f=(c=Dt.style)==null?void 0:c.variantStyle)!=null?f:"";let sn="";if(en||Ln){const Lr=Qe(Dt.value,(b=Dt.style)==null?void 0:b.variant,(C=Dt.style)==null?void 0:C.variantStyle);if(Lr!==Dt.value)return e.index+=1,Ot=`<mi${aa(Dt.id,n)}>${Lr}</mi>`,Ql(Ot,e,n)||(e.mathML+=Ot,e.lastType="mi"),!0;sn=(k={upnormal:"normal",boldnormal:"bold",italicmain:"italic",bolditalicmain:"bold-italic","updouble-struck":"double-struck","double-struck":"double-struck",boldfraktur:"bold-fraktur",calligraphic:"script",upcalligraphic:"script",script:"script",boldscript:"bold-script",boldcalligraphic:"bold-script",fraktur:"fraktur","upsans-serif":"sans-serif","boldsans-serif":"bold-sans-serif","italicsans-serif":"sans-serif-italic","bolditalicsans-serif":"sans-serif-bold-italic",monospace:"monospace"}[Ln+en])!=null?k:"",sn=` mathvariant="${sn}"`}const hr={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"\u210F","\\cdotp":"\u22C5","\\ldots":"\u2026","\\cdots":"\u22EF","\\ddots":"\u22F1","\\vdots":"\u22EE","\\ldotp":"."};if(Dt.command==="!")return e.index+=1,Ot="<mo>!</mo>",Ql(Ot,e,n)||(e.mathML+=Ot,e.lastType="mo"),!0;if(hr[Dt.command]){e.index+=1;let Lr=`<mi${aa(Dt.id,n)}${sn}>${hr[Dt.command]}</mi>`;return(e.lastType==="mi"||e.lastType==="mn"||e.lastType==="mtext"||e.lastType==="fence")&&(Lr=af+Lr),Ql(Lr,e,n)||(e.mathML+=Lr,e.lastType="mi"),!0}if(Dt.command==="\\operatorname")bn=Eu(Dt.body),e.index+=1;else if(en||Ln)for(;e.index<t&&(Dt.type==="mord"||Dt.type==="macro")&&!Dt.isDigit()&&en===((ne=($=Dt.style)==null?void 0:$.variant)!=null?ne:"")&&Ln===((We=(Me=Dt.style)==null?void 0:Me.variantStyle)!=null?We:"");)bn+=Eu([Dt]),e.index+=1,Dt=e.atoms[e.index];else(Dt.type==="mord"||Dt.type==="macro")&&!Dt.isDigit()&&(bn+=Eu([Dt]),e.index+=1);if(bn.length>0){Je=!0,Ot=`<mi${sn}>${bn}</mi>`;const Lr=e.lastType;Ot.endsWith(">f</mi>")||Ot.endsWith(">g</mi>")?(Ot+=p0,e.lastType="applyfunction"):e.lastType=/^<mo>(.*)<\/mo>$/.test(Ot)?"mo":"mi",Ql(Ot,e,n)||((Lr==="mi"||Lr==="mn"||Lr==="mtext"||Lr==="fence")&&(Ot=af+Ot),e.mathML+=Ot)}return Je}function Dg(e){return e.index<e.atoms.length&&e.atoms[e.index].superscript&&e.atoms[e.index].type==="subsup"}function $g(e){let t=-1,n=e.index,i=!1,o=!1;for(;n<e.atoms.length&&!i&&!o;){const c=e.atoms[n];i=!c.isDigit(),o=!i&&c.superscript!==void 0,n++}return o&&(t=n-1),t}function Ql(e,t,n){var i;let o=t.atoms[t.index-1];if(!o)return!1;if(!o.superscript&&!o.subscript)if(((i=t.atoms[t.index])==null?void 0:i.type)==="subsup")o=t.atoms[t.index],t.index+=1;else return!1;const c=t.lastType;t.lastType="";const f=Ai(o.superscript,n);t.lastType="";const b=Ai(o.subscript,n);if(t.lastType=c,!f&&!b)return!1;let C="";return f&&b?C=`<msubsup>${e}${b}${f}</msubsup>`:f?C=`<msup>${e}${f}</msup>`:b&&(C=`<msub>${e}${b}</msub>`),t.mathML+=C,t.lastType="",!0}function Pg(e,t,n){t=t!=null?t:e.atoms.length;const i=e.index;let o="";for(;e.index<t&&e.atoms[e.index].mode==="text";)o+=e.atoms[e.index].value?e.atoms[e.index].value:" ",e.index+=1;return o.length>0?(e.mathML+=`<mtext ${aa(e.atoms[i].id,n)}>${o}</mtext>`,e.lastType="mtext",!0):!1}function Og(e,t,n){t=t!=null?t:e.atoms.length;const i=e.index;let o="",c=$g(e);for(c>=0&&c<t&&(t=c);e.index<t&&e.atoms[e.index].isDigit();)o+=e.atoms[e.index].asDigit(),e.index+=1;return o.length<=0?!1:(o="<mn"+aa(e.atoms[i].id,n)+">"+o+"</mn>",c<0&&Dg(e)&&(c=e.index,e.index+=1),Ql(o,e,n)||(e.mathML+=o,e.lastType="mn"),!0)}function Ag(e,t,n){let i=!1;t=t!=null?t:e.atoms.length;let o="",c="";if(e.index<t&&e.atoms[e.index].type==="mopen"){let f=!1,b=0;const C=e.index;let k=-1,$=C+1;for(;$<t&&!f;)e.atoms[$].type==="mopen"?b+=1:e.atoms[$].type==="mclose"&&(b-=1),b===-1&&(f=!0,k=$),$+=1;f&&(o="<mrow>",o+=Yc(e.atoms[C],n),o+=Ai(e.atoms,n,C+1,k),o+=Yc(e.atoms[k],n),o+="</mrow>",e.index=k+1,(e.lastType==="mi"||e.lastType==="mn"||e.lastType==="mfrac"||e.lastType==="fence")&&(e.mathML+=af),Ql(o,e,n)&&(i=!0,e.lastType="",o=""),c="fence")}return o.length>0&&(i=!0,e.mathML+=o,e.lastType=c),i}function Bg(e,t,n){let i=!1;t=t!=null?t:e.atoms.length;let o="",c="";const f=e.atoms[e.index];if(!f)return!1;const b={"\\ne":"≠","\\neq":"&neq;","\\pm":"±","\\times":"×","\\colon":":","\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lbrack":"[","\\rbrack":"]","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"};if(b[f.command]){e.index+=1;const C=`<mo${aa(f.id,n)}>${b[f.command]}</mo>`;return Ql(C,e,n)||(e.mathML+=C,e.lastType="mo"),!0}if(e.index<t&&(f.type==="mbin"||f.type==="mrel"))o+=Xf(e.atoms[e.index],n),e.index+=1,c="mo";else if(e.index<t&&(f.type==="mop"||f.type==="operator"||f.type==="extensible-symbol")){if(f.subsupPlacement==="over-under"&&(f.superscript||f.subscript)){const C=Yc(f,n);return f.superscript&&f.subscript?(o+="<munderover>"+C,o+=Ai(f.subscript,n),o+=Ai(f.superscript,n),o+="</munderover>"):f.superscript?(o+="<mover>"+C,o+=Ai(f.superscript,n),o+="</mover>"):f.subscript&&(o+="<munder>"+C,o+=Ai(f.subscript,n),o+="</munder>"),e.mathML+=o,e.lastType="mo",e.index+=1,!0}{const C=e.atoms[e.index],k=C.value==="\\operatorname",$=k?'<mi class="MathML-Unit"'+aa(C.id,n)+">"+Eu(C.value)+"</mi>":Yc(C,n);o+=$,!k&&!/^<mo>(.*)<\/mo>$/.test($)?(o+=p0,c="applyfunction"):c=k?"mi":"mo"}(e.lastType==="mi"||e.lastType==="mn")&&!/^<mo>(.*)<\/mo>$/.test(o)&&(o=af+o),e.index+=1}return o.length>0&&(i=!0,Ql(o,e,n)||(e.mathML+=o,e.lastType=c)),i}function Ai(e,t,n,i){t!=null||(t={});const o={atoms:[],index:n!=null?n:0,mathML:"",lastType:""};if(typeof e=="number"||typeof e=="boolean")o.mathML=e.toString();else if(typeof e=="string")o.mathML=e;else if(e instanceof Zt)o.mathML=Xf(e,t);else if(Array.isArray(e)){o.atoms=e;let c=0;for(i=i||(e?e.length:0);o.index<i;)if(Pg(o,i,t)||Og(o,i,t)||Tg(o,i,t)||Bg(o,i,t)||Ag(o,i,t))c+=1;else if(o.index<i){let f=Xf(o.atoms[o.index],t);o.lastType==="mn"&&f.length>0&&o.atoms[o.index].type==="genfrac"&&(f="<mo>⁤</mo>"+f),o.atoms[o.index].type==="genfrac"?o.lastType="mfrac":o.lastType="",o.index+=1,Ql(f,o,t)?c+=1:f.length>0&&(o.mathML+=f,c+=1)}c>1&&(o.mathML="<mrow>"+o.mathML+"</mrow>")}return o.mathML}function Yc(e,t){let n="";const i=Eu(e.value);return i&&(n="<mo"+aa(e.id,t)+">"+i+"</mo>"),n}function Eu(e){if(!e)return"";if(typeof e=="string")return of(e);if(!Array.isArray(e)&&typeof e.body=="string")return of(e.body);let t="";for(const n of e)typeof n.value=="string"&&(t+=n.value);return of(t)}function Xf(e,t){var n,i,o,c,f,b,C,k,$,ne,Me,We,Je,Ot,bn,Dt,en,Ln,sn,hr,Lr,Mr;if(e.mode==="text")return`<mi${aa(e.id,t)}>${e.value}</mi>`;const Ci={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",longleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",longrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",longrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xleftrightarrows:"\u21C4",xRightleftharpoons:"\u21CC",longRightleftharpoons:"\u21CC",xLeftrightharpoons:"\u21CB",longLeftrightharpoons:"\u21CB"},qi={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\>":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let Bn="",Xs="",zl,ol,Io,Ys,ys,oa;const{command:Qa}=e;if(e.command==="\\error")return`<merror${aa(e.id,t)}>${Ai(e.body,t)}</merror>`;const To={"\\vert":"|","\\Vert":"\u2225","\\mid":"\u2223","\\lbrack":"[","\\rbrack":"]","\\{":"{","\\}":"}","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"\u27E8","\\rangle":"\u27E9","\\lfloor":"\u230A","\\rfloor":"\u230B","\\lceil":"\u2308","\\rceil":"\u2309"},Fl={"\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};switch(e.type){case"first":break;case"group":case"root":Bn=Ai(e.body,t);break;case"array":if((e.leftDelim&&e.leftDelim!=="."||e.rightDelim&&e.rightDelim!==".")&&(Bn+="<mrow>",e.leftDelim&&e.leftDelim!=="."&&(Bn+="<mo>"+(To[e.leftDelim]||e.leftDelim)+"</mo>")),Bn+="<mtable",e.colFormat){for(Bn+=' columnalign="',Io=0;Io<e.colFormat.length;Io++)e.colFormat[Io].align&&(Bn+={l:"left",c:"center",r:"right"}[e.colFormat[Io].align]+" ");Bn+='"'}for(Bn+=">",ol=0;ol<e.array.length;ol++){for(Bn+="<mtr>",zl=0;zl<e.array[ol].length;zl++)Bn+="<mtd>"+Ai(e.array[ol][zl],t)+"</mtd>";Bn+="</mtr>"}Bn+="</mtable>",(e.leftDelim&&e.leftDelim!=="."||e.rightDelim&&e.rightDelim!==".")&&(e.rightDelim&&e.rightDelim!=="."&&(Bn+="<mo>"+(To[e.leftDelim]||e.rightDelim)+"</mo>"),Bn+="</mrow>");break;case"genfrac":(e.leftDelim||e.rightDelim)&&(Bn+="<mrow>"),e.leftDelim&&e.leftDelim!=="."&&(Bn+="<mo"+aa(e.id,t)+">"+(To[e.leftDelim]||e.leftDelim)+"</mo>"),e.hasBarLine?(Bn+="<mfrac>",Bn+=Ai(e.above,t)||"<mi> </mi>",Bn+=Ai(e.below,t)||"<mi> </mi>",Bn+="</mfrac>"):(Bn+="<mtable"+aa(e.id,t)+">",Bn+="<mtr>"+Ai(e.above,t)+"</mtr>",Bn+="<mtr>"+Ai(e.below,t)+"</mtr>",Bn+="</mtable>"),e.rightDelim&&e.rightDelim!=="."&&(Bn+="<mo"+aa(e.id,t)+">"+(To[e.rightDelim]||e.rightDelim)+"</mo>"),(e.leftDelim||e.rightDelim)&&(Bn+="</mrow>");break;case"surd":e.hasEmptyBranch("above")?(Bn+="<msqrt"+aa(e.id,t)+">",Bn+=Ai(e.body,t),Bn+="</msqrt>"):(Bn+="<mroot"+aa(e.id,t)+">",Bn+=Ai(e.body,t),Bn+=Ai(e.above,t),Bn+="</mroot>");break;case"leftright":const Kl=e,Hl=Kl.leftDelim;Bn="<mrow>",Hl&&Hl!=="."&&(Bn+=`<mo${aa(e.id,t)}>${(n=To[Hl])!=null?n:Hl}</mo>`),e.body&&(Bn+=Ai(e.body,t));const Zl=Kl.matchingRightDelim();Zl&&Zl!=="."&&(Bn+=`<mo${aa(e.id,t)}>${(i=To[Zl])!=null?i:Zl}</mo>`),Bn+="</mrow>";break;case"sizeddelim":case"delim":Bn+=`<mo${aa(e.id,t)}>${To[e.value]||e.value}</mo>`;break;case"accent":Bn+='<mover accent="true"'+aa(e.id,t)+">",Bn+=Ai(e.body,t),Bn+="<mo>"+(Fl[Qa]||e.accent)+"</mo>",Bn+="</mover>";break;case"line":case"overlap":break;case"overunder":ys=e.above,Ys=e.below,(e.svgAbove||ys)&&(e.svgBelow||Ys)?oa=e.body:ys&&ys.length>0?(oa=e.body,(c=(o=e.body)==null?void 0:o[0])!=null&&c.below?(Ys=e.body[0].below,oa=e.body[0].body):((b=(f=e.body)==null?void 0:f[0])==null?void 0:b.type)==="first"&&((k=(C=e.body)==null?void 0:C[1])!=null&&k.below)&&(Ys=e.body[1].below,oa=e.body[1].body)):Ys&&Ys.length>0&&(oa=e.body,(ne=($=e.body)==null?void 0:$[0])!=null&&ne.above?(ys=e.body[0].above,oa=e.body[0].body):((We=(Me=e.body)==null?void 0:Me[0])==null?void 0:We.type)==="first"&&((Ot=(Je=e.body)==null?void 0:Je[1])!=null&&Ot.above)&&(ys=e.body[1].overscript,oa=e.body[1].body)),(e.svgAbove||ys)&&(e.svgBelow||Ys)?(Bn+=`<munderover ${aa(e.id,t)}>`,Bn+=(bn=Ci[e.svgBody])!=null?bn:Ai(oa,t),Bn+=(Dt=Ci[e.svgBelow])!=null?Dt:Ai(Ys,t),Bn+=(en=Ci[e.svgAbove])!=null?en:Ai(ys,t),Bn+="</munderover>"):e.svgAbove||ys?(Bn+=`<mover ${aa(e.id,t)}>`+((Ln=Ci[e.svgBody])!=null?Ln:Ai(oa,t)),Bn+=(sn=Ci[e.svgAbove])!=null?sn:Ai(ys,t),Bn+="</mover>"):(e.svgBelow||Ys)&&(Bn+=`<munder ${aa(e.id,t)}>`+((hr=Ci[e.svgBody])!=null?hr:Ai(oa,t)),Bn+=(Lr=Ci[e.svgBelow])!=null?Lr:Ai(Ys,t),Bn+="</munder>");break;case"placeholder":Bn+="?";break;case"mord":{Bn=typeof e.value=="string"?e.value:Qa,Qa==="\\char"?Bn="&#x"+("000000"+e.args[0].number.toString(16)).slice(-4)+";":Bn.length>0&&Bn.startsWith("\\")&&(typeof e.value=="string"&&e.value.charCodeAt(0)>255?Bn="&#x"+("000000"+e.value.charCodeAt(0).toString(16)).slice(-4)+";":typeof e.value=="string"?Bn=e.value.charAt(0):(console.error("Did not expect this"),Bn=""));const Sl=/\d/.test(Bn)?"mn":"mi";Bn=`<${Sl}${aa(e.id,t)}>${of(Bn)}</${Sl}>`;break}case"mbin":case"mrel":case"minner":Bn=Yc(e,t);break;case"mpunct":Bn='<mo separator="true"'+aa(e.id,t)+">"+Qa+"</mo>";break;case"mop":case"operator":case"extensible-symbol":e.body!=="\u200B"&&(Bn="<mo"+aa(e.id,t)+">",Bn+=Qa==="\\operatorname"?e.body:Qa||e.body,Bn+="</mo>");break;case"box":Bn='<menclose notation="box"',e.backgroundcolor&&(Bn+=' mathbackground="'+e.backgroundcolor+'"'),Bn+=aa(e.id,t)+">"+Ai(e.body,t)+"</menclose>";break;case"spacing":Bn+='<mspace width="'+((Mr=qi[Qa])!=null?Mr:0)+'em"/>';break;case"enclose":Bn='<menclose notation="';for(const Sl in e.notation)Object.prototype.hasOwnProperty.call(e.notation,Sl)&&e.notation[Sl]&&(Bn+=Xs+Sl,Xs=" ");Bn+=aa(e.id,t)+'">'+Ai(e.body,t)+"</menclose>";break;case"prompt":Bn='<menclose notation="roundexbox""">'+Ai(e.body,t)+"</menclose>";break;case"space":Bn+=" ";break;case"subsup":break;case"phantom":break;case"composition":break;case"rule":break;case"chem":break;case"mopen":Bn+=Yc(e,t);break;case"mclose":Bn+=Yc(e,t);break;case"macro":{const Sl=e.command+Eu(e.macroArgs);Sl&&(Bn+=`<mo ${aa(e.id,t)}>${Sl}</mo>`)}break;case"latexgroup":Bn+=Ai(e.body,t);break;case"latex":Bn+="<mtext"+aa(e.id,t)+">"+e.value+"</mtext>";break;case"tooltip":Bn+=Ai(e.body,t);break;case"text":Bn+=`<mtext ${aa(e.id,t)}x>${e.value}</mtext>`;break;default:if(e.command==="\\displaystyle")return`<mrow ${aa(e.id,t)} displaystyle="true">${Ai(e.body,t)}</mrow>`;if(e.command==="\\textstyle")return`<mrow ${aa(e.id,t)} displaystyle="false">${Ai(e.body,t)}</mrow>`;console.info("Unexpected element in conversion to MathML:",e)}return Bn}var _u={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"imaginary eye ","\\imaginaryJ":"imaginary jay ","\\sum":"Summation ","\\prod":"Product ","+":"plus ","-":"minus ",";":'<break time="150ms"/> semi-colon <break time="150ms"/>',",":'<break time="150ms"/> comma <break time="150ms"/>',"|":'<break time="150ms"/>Vertical bar<break time="150ms"/>',"(":'<break time="150ms"/>Open paren. <break time="150ms"/>',")":'<break time="150ms"/> Close paren. <break time="150ms"/>',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\pm":"plus or minus","\\mp":"minus or plus","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","\\ne":"is not equal to ","\\neq":"is not equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","\u200B":"","\u2212":"minus ",":":'<break time="150ms"/> such that <break time="200ms"/> ',"\\colon":'<break time="150ms"/> such that <break time="200ms"/> ',"\\hbar":"etch bar ","\\iff":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\Longleftrightarrow":'<break time="200ms"/>if, and only if, <break time="200ms"/>',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set <break time="150ms"/><say-as interpret-as="character">n</say-as>',"\\C":'the set <break time="150ms"/><say-as interpret-as="character">c</say-as>',"\\Z":'the set <break time="150ms"/><say-as interpret-as="character">z</say-as>',"\\Q":'the set <break time="150ms"/><say-as interpret-as="character">q</say-as>',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdot":"times ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lparen":'<break time="150ms"/>open paren<break time="150ms"/>',"\\rparen":'<break time="150ms"/>close paren<break time="150ms"/>',"\\lbrace":'<break time="150ms"/>open brace<break time="150ms"/>',"\\{":'<break time="150ms"/>open brace<break time="150ms"/>',"\\rbrace":'<break time="150ms"/>close brace<break time="150ms"/>',"\\}":'<break time="150ms"/>close brace<break time="150ms"/>',"\\langle":'<break time="150ms"/>left angle bracket<break time="150ms"/>',"\\rangle":'<break time="150ms"/>right angle bracket<break time="150ms"/>',"\\lfloor":'<break time="150ms"/>open floor<break time="150ms"/>',"\\rfloor":'<break time="150ms"/>close floor<break time="150ms"/>',"\\lceil":'<break time="150ms"/>open ceiling<break time="150ms"/>',"\\rceil":'<break time="150ms"/>close ceiling<break time="150ms"/>',"\\vert":'<break time="150ms"/>vertical bar<break time="150ms"/>',"\\mvert":'<break time="150ms"/>divides<break time="150ms"/>',"\\lvert":'<break time="150ms"/>left vertical bar<break time="150ms"/>',"\\rvert":'<break time="150ms"/>right vertical bar<break time="150ms"/>',"\\lbrack":'<break time="150ms"/> open square bracket <break time="150ms"/>',"\\rbrack":'<break time="150ms"/> close square bracket <break time="150ms"/>',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"},Yf={array:"array",matrix:"matrix",pmatrix:"parenthesis matrix",bmatrix:"square brackets matrix",Bmatrix:"braces matrix",vmatrix:"bars matrix",Vmatrix:"double bars matrix","matrix*":"matrix",smallmatrix:"small matrix"};function Ng(e){let t="";return e.startsWith("\\")&&(t=" "+e.replace("\\","")+" "),t}function ud(e){let t=0;if(G(e))for(const n of e)n.type!=="first"&&(t+=1);return t===1}function Rg(e){if(G(e)){for(const t of e)if(t.type!=="first"&&t.id)return t.id.toString()}return""}function m0(e){let t="";if(G(e))for(const n of e)n.type!=="first"&&typeof n.value=="string"&&(t+=n.value);return t}function zg(e){return e?e.map(t=>t.value).join(""):""}function vi(e,t){var n,i,o,c,f;function b($){return window.MathfieldElement.textToSpeechMarkup?/[a-z]/.test($)?` <say-as interpret-as="character">${$}</say-as>`:/[A-Z]/.test($)?`capital <say-as interpret-as="character">${$.toLowerCase()}</say-as>`:$:/[a-z]/.test($)?" '"+$.toUpperCase()+"'":/[A-Z]/.test($)?" 'capital "+$.toUpperCase()+"'":$}function C($){return"<emphasis>"+$+"</emphasis>"}if(!t)return"";let k="";if(G(t)){let $=!1,ne=!1;for(let Me=0;Me<t.length;Me++)t[Me].type!=="first"&&(t[Me].mode!=="text"&&(ne=!1),Me<t.length-2&&t[Me].type==="mopen"&&t[Me+2].type==="mclose"&&t[Me+1].type==="mord"?(k+=" of ",k+=C(vi(e,t[Me+1])),Me+=2):t[Me].mode==="text"?ne?k+=(n=t[Me].value)!=null?n:" ":(ne=!0,k+=vi("text",t[Me])):t[Me].isDigit()?$?k+=t[Me].asDigit():($=!0,k+=vi(e,t[Me])):($=!1,k+=vi(e,t[Me])))}else if(t.mode==="text")t.id&&e==="math"&&(k+='<mark name="'+t.id.toString()+'"/>'),k+=t.value;else{t.id&&e==="math"&&(k+='<mark name="'+t.id.toString()+'"/>');let $="",ne="",Me="",We=!1;const{command:Je}=t;switch(Je){case"\\vec":return"vector "+vi(e,t.body);case"\\acute":return vi(e,t.body)+" acute";case"\\grave":return vi(e,t.body)+" grave";case"\\dot":return"dot over"+vi(e,t.body);case"\\ddot":return"double dot over"+vi(e,t.body);case"\\mathring":return"ring over"+vi(e,t.body);case"\\tilde":case"\\widetilde":return"tilde over"+vi(e,t.body);case"\\bar":return vi(e,t.body)+" bar";case"\\breve":return vi(e,t.body)+" breve";case"\\check":case"\\widecheck":return"check over "+vi(e,t.body);case"\\hat":case"\\widehat":return"hat over"+vi(e,t.body);case"\\overarc":case"\\overparen":case"\\wideparen":return"arc over "+vi(e,t.body);case"\\underarc":case"\\underparen":return"arc under "+vi(e,t.body)}switch(t.type){case"prompt":const Ot=t.body.length>1?'start input . <break time="500ms"/> '+vi(e,t.body)+'. <break time="500ms"/> end input':"blank";k+=' <break time="300ms"/> '+Ot+'. <break time="700ms"/>'+((i=t.correctness)!=null?i:"")+' . <break time="700ms"/> ';break;case"array":const bn=t.array,Dt=t.environmentName;if(Object.keys(Yf).includes(Dt)){k+=` begin ${Yf[Dt]} `;for(let sn=0;sn<bn.length;sn++){sn>0&&(k+=","),k+=` row ${sn+1} `;for(let hr=0;hr<bn[sn].length;hr++)hr>0&&(k+=","),k+=` column ${hr+1}: `,k+=vi("math",bn[sn][hr])}k+=` end ${Yf[Dt]} `}break;case"group":Je==="\\ne"?k+=" not equal ":(Je==="\\not"&&(k+=" not "),k+=vi("math",t.body));break;case"root":k+=vi("math",t.body);break;case"genfrac":if($=vi("math",t.above),ne=vi("math",t.below),ud(t.above)&&ud(t.below)){const hr={"1/2":" half ","1/3":" one third ","2/3":" two third","1/4":" one quarter ","3/4":" three quarter ","1/5":" one fifth ","2/5":" two fifths ","3/5":" three fifths ","4/5":" four fifths ","1/6":" one sixth ","5/6":" five sixths ","1/8":" one eight ","3/8":" three eights ","5/8":" five eights ","7/8":" seven eights ","1/9":" one ninth ","2/9":" two ninths ","4/9":" four ninths ","5/9":" five ninths ","7/9":" seven ninths ","8/9":" eight ninths "}[m0(t.above)+"/"+m0(t.below)];hr?k=hr:k+=$+" over "+ne}else k+=' the fraction <break time="150ms"/>'+$+' over <break time="150ms"/>'+ne+'.<break time="150ms"/> End fraction.<break time="150ms"/>';break;case"surd":if(Me=vi("math",t.body),t.hasEmptyBranch("above"))k+=ud(t.body)?" the square root of "+Me+" , ":' the square root of <break time="200ms"/>'+Me+'. <break time="200ms"/> End square root';else{let sn=vi("math",t.above);sn=sn.trim();const hr=sn.replace(/<mark([^/]*)\/>/g,"");hr==="3"?k+=' the cube root of <break time="200ms"/>'+Me+'. <break time="200ms"/> End cube root':hr==="n"?k+=' the nth root of <break time="200ms"/>'+Me+'. <break time="200ms"/> End root':k+=' the root with index: <break time="200ms"/>'+sn+', of <break time="200ms"/>'+Me+'. <break time="200ms"/> End root'}break;case"leftright":{const sn=t;k+=(o=sn.leftDelim?_u[sn.leftDelim]:void 0)!=null?o:sn.leftDelim,k+=vi("math",t.body),k+=(c=sn.rightDelim?_u[sn.rightDelim]:void 0)!=null?c:sn.rightDelim}break;case"rule":break;case"overunder":break;case"overlap":break;case"macro":const en=Je.replace(/^\\/g,""),Ln=qe()[en];Ln&&(Ln!=null&&Ln.expand?k+=vi("math",t.body):k+=`${en} `);break;case"placeholder":k+="placeholder ";break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":{if(Je==="\\mathbin"||Je==="\\mathrel"||Je==="\\mathopen"||Je==="\\mathclose"||Je==="\\mathpunct"||Je==="\\mathord"||Je==="\\mathinner"){k=vi(e,t.body);break}let sn=t.isDigit()?t.asDigit():t.value,hr=t.command;if((t.type==="delim"||t.type==="sizeddelim")&&(hr=t.value,sn=hr),e==="text")k+=sn;else{if(t.type==="mbin"&&(k+='<break time="150ms"/>'),sn){const Lr=_u[sn]||(hr?_u[hr.trim()]:"");if(Lr)k+=" "+Lr;else{const Mr=hr?Ng(hr.trim()):"";k+=Mr||b(sn)}}else k+=vi("math",t.body);t.type==="mbin"&&(k+='<break time="150ms"/>')}break}case"mop":case"operator":case"extensible-symbol":if(t.value!=="\u200B"){const sn=t.command;if(sn==="\\sum")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let hr=vi("math",t.superscript);hr=hr.trim();let Lr=vi("math",t.subscript);Lr=Lr.trim(),k+=' the summation from <break time="200ms"/>'+Lr+'<break time="200ms"/> to <break time="200ms"/>'+hr+'<break time="200ms"/> of <break time="150ms"/>',We=!0}else if(t.hasEmptyBranch("subscript"))k+=" the summation of";else{let hr=vi("math",t.subscript);hr=hr.trim(),k+=' the summation from <break time="200ms"/>'+hr+'<break time="200ms"/> of <break time="150ms"/>',We=!0}else if(sn==="\\prod")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let hr=vi("math",t.superscript);hr=hr.trim();let Lr=vi("math",t.subscript);Lr=Lr.trim(),k+=' the product from <break time="200ms"/>'+Lr+'<break time="200ms"/> to <break time="200ms"/>'+hr+'<break time="200ms"/> of <break time="150ms"/>',We=!0}else if(t.hasEmptyBranch("subscript"))k+=" the product of ";else{let hr=vi("math",t.subscript);hr=hr.trim(),k+=' the product from <break time="200ms"/>'+hr+'<break time="200ms"/> of <break time="150ms"/>',We=!0}else if(sn==="\\int")if(!t.hasEmptyBranch("superscript")&&!t.hasEmptyBranch("subscript")){let hr=vi("math",t.superscript);hr=hr.trim();let Lr=vi("math",t.subscript);Lr=Lr.trim(),k+=' the integral from <break time="200ms"/>'+C(Lr)+'<break time="200ms"/> to <break time="200ms"/>'+C(hr)+' <break time="200ms"/> of ',We=!0}else k+=' the integral of <break time="200ms"/> ';else if(typeof t.value=="string"){const hr=(f=_u[t.value])!=null?f:t.command?_u[t.command]:void 0;k+=hr||" "+t.value}else t.command&&(t.command==="\\mathop"?k+=vi("math",t.body):t.command==="\\operatorname"?k+=zg(t.body):k+=t.command.startsWith("\\")?" "+t.command.slice(1):" "+t.command)}break;case"enclose":Me=vi("math",t.body),k+=" crossed out "+Me+". End crossed out.";break;case"space":case"spacing":break}if(!We&&!t.hasEmptyBranch("superscript")){let Ot=vi(e,t.superscript);Ot=Ot.trim();const bn=Ot.replace(/<[^>]*>/g,"");if(ud(t.superscript)){if(e==="math"){const Dt=Rg(t.superscript);Dt&&(k+='<mark name="'+Dt+'"/>')}bn==="\u2032"?k+=" prime ":bn==="2"?k+=" squared ":bn==="3"?k+=" cubed ":Number.isNaN(Number.parseInt(bn))?k+=" to the "+Ot+"; ":k+=' to the <say-as interpret-as="ordinal">'+bn+"</say-as> power; "}else Number.isNaN(Number.parseInt(bn))?k+=" raised to the "+Ot+"; ":k+=' raised to the <say-as interpret-as="ordinal">'+bn+"</say-as> power; "}if(!We&&!t.hasEmptyBranch("subscript")){let Ot=vi("math",t.subscript);Ot=Ot.trim(),k+=ud(t.subscript)?" sub "+Ot:" subscript "+Ot+". End subscript. "}}return k}function Lu(e){var t,n;if(window.MathfieldElement.textToSpeechRules==="sre"&&("sre"in window||"SRE"in window)){const o=Ai(e);if(o){window.MathfieldElement.textToSpeechMarkup&&(window.MathfieldElement.textToSpeechRulesOptions=(t=window.MathfieldElement.textToSpeechRulesOptions)!=null?t:{},window.MathfieldElement.textToSpeechRulesOptions=F(E({},window.MathfieldElement.textToSpeechRulesOptions),{markup:window.MathfieldElement.textToSpeechMarkup}),window.MathfieldElement.textToSpeechRulesOptions.markup==="ssml"&&(window.MathfieldElement.textToSpeechRulesOptions=F(E({},window.MathfieldElement.textToSpeechRulesOptions),{markup:"ssml_step"})),window.MathfieldElement.textToSpeechRulesOptions=F(E({},window.MathfieldElement.textToSpeechRulesOptions),{rate:window.MathfieldElement.speechEngineRate}));const c=(n=window.SRE)!=null?n:window.sre.System.getInstance();window.MathfieldElement.textToSpeechRulesOptions&&c.setupEngine(window.MathfieldElement.textToSpeechRulesOptions);let f="";try{f=c.toSpeech(o)}catch(b){console.error("MathLive 0.98.5: `SRE.toSpeech()` runtime error",b)}return f}return""}let i=vi("math",e);if(window.MathfieldElement.textToSpeechMarkup==="ssml"){let o="";window.MathfieldElement.speechEngineRate&&(o='<prosody rate="'+window.MathfieldElement.speechEngineRate+'">'),i='<?xml version="1.0"?><speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"><amazon:auto-breaths>'+o+"<p><s>"+i+"</s></p>"+(o?"</prosody>":"")+"</amazon:auto-breaths></speak>"}else window.MathfieldElement.textToSpeechMarkup==="mac"&&_e()==="macos"?i=i.replace(/<mark([^/]*)\/>/g,"").replace(/<emphasis>/g,"[[emph+]]").replace(/<\/emphasis>/g,"").replace(/<break time="(\d*)ms"\/>/g,"[[slc $1]]").replace(/<say-as[^>]*>/g,"").replace(/<\/say-as>/g,""):i=i.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return i}var dd={"\\ne":"\u2260","\\neq":"\u2260","\u2212":"-","-":"-","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\delta":"delta","\\epsilon":"epsilon","\\varepsilon":"varepsilon","\\zeta":"zeta","\\eta":"eta","\\theta":"theta","\\vartheta":"vartheta","\\iota":"iota","\\kappa":"kappa","\\lambda":"lambda","\\mu":"mu","\\nu":"nu","\\xi":"xi","\\pi":"pi","\\rho":"rho","\\sigma":"sigma","\\tau":"tau","\\upsilon":"upsilon","\\phi":"phi","\\varphi":"varphi","\\chi":"chi","\\psi":"psi","\\omega":"omega","\\Gamma":"Gamma","\\Delta":"Delta","\\Theta":"Theta","\\Lambda":"Lambda","\\Xi":"Xi","\\Pi":"Pi","\\Sigma":"Sigma","\\Phi":"Phi","\\Psi":"Psi","\\Omega":"Omega","\\exponentialE":"e","\\imaginaryI":"i","\\imaginaryJ":"j","\\!":" ","\\,":" ","\\:":" ","\\>":" ","\\;":" ","\\enskip":" ","\\enspace":" ","\\qquad":" ","\\quad":" ","\\infty":"oo"},fd={"\\pm":"+-","\\colon":":","\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrack":"[","\\rbrack":"]","\\lbrace":"{","\\rbrace":"}","\\lparen":"(","\\rparen":")","\\langle":"(:","\\rangle":":)","\\sum":" sum ","\\prod":" prod ","\\bigcap":" nnn ","\\bigcup":" uuu ","\\int":" int ","\\oint":" oint ","\\ge":">=","\\le":"<=","\\ne":"!=","\\neq":"!=","\\lt":"<","\\gt":">","\\gets":"<-","\\to":"->","\\land":" and ","\\lor":" or ","\\lnot":" not ","\\forall":" AA ","\\exists":" EE ","\\in":" in ","\\notin":" !in ","\\mapsto":"|->","\\implies":"=>","\\iff":"<=>","\\cdot":"*","\\ast":"**","\\star":"***","\\times":"xx","\\div":"-:","\\ltimes":"|><","\\rtimes":"><|","\\bowtie":"|><|","\\circ":"@"};function Fg(e){let t="";for(const n of e){const i=t[t.length-1];i!==void 0&&/\d/.test(i)&&/^\d/.test(n)&&(t+=" "),t+=n}return t}function Ja(e){var t,n,i,o,c,f,b,C,k,$,ne,Me,We;if(!e)return"";if(G(e)){if(e.length===0)return"";if(e[0].mode==="latex")return e.map(Ja).join("");if(e[0].mode==="text"){let Ln=0,sn="";for(;((t=e[Ln])==null?void 0:t.mode)==="text";)sn+=e[Ln].body?Ja(e[Ln].body):e[Ln].value,Ln++;return`"${sn}" ${Ja(e.slice(Ln))}`}let Dt=0;const en=[];for(;e[Dt]&&e[Dt].mode==="math";){let Ln="";for(;e[Dt]&&e[Dt].type==="mord"&&/\d/.test(e[Dt].value);)Ln+=e[Dt++].value;Ln?en.push(Ln):en.push(Ja(e[Dt++]))}return en.push(Ja(e.slice(Dt))),Fg(en)}if(e.mode==="text")return`"${e.value}"`;let Je="";const{command:Ot}=e;let bn;if(Ot==="\\placeholder")return`(${Ja(e.body)})`;switch(e.type){case"accent":const Dt={"\\vec":"vec","\\dot":"dot","\\ddot":"ddot","\\bar":"bar","\\hat":"hat","\\acute":"acute;","\\grave":"grave","\\tilde":"tilde","\\breve":"breave","\\check":"check"}[Ot];Je=`${Dt!=null?Dt:""} ${Ja(e.body)} `;break;case"first":return"";case"latexgroup":return e.body.map(Mr=>Mr.value).join("");case"group":case"root":Je=(n=dd[Ot])!=null?n:Ja(e.body);break;case"genfrac":{const Mr=e;(Mr.leftDelim||Mr.rightDelim)&&(Je=Mr.leftDelim==="."||!Mr.leftDelim?"{:":Mr.leftDelim),Mr.hasBarLine?(Je+="(",Je+=Ja(Mr.above),Je+=")/(",Je+=Ja(Mr.below),Je+=")"):(Je+="("+Ja(Mr.above)+"),",Je+="("+Ja(Mr.below)+")"),(Mr.leftDelim||Mr.rightDelim)&&(Je+=Mr.rightDelim==="."||!Mr.rightDelim?"{:":Mr.rightDelim)}break;case"surd":Je+=e.hasEmptyBranch("above")?"sqrt("+Ja(e.body)+")":"root("+Ja(e.above)+")("+Ja(e.body)+")";break;case"latex":Je=e.value;break;case"leftright":{const Mr=e,Ci=Mr.leftDelim;Je+=Ci==="."||!Ci?"{:":Ci,Je+=Ja(Mr.body);const qi=Mr.matchingRightDelim();Je+=qi==="."||!qi?":}":qi}break;case"sizeddelim":case"delim":Je=e.value;break;case"overlap":break;case"overunder":break;case"mord":Je=(o=(i=dd[Ot])!=null?i:Ot)!=null?o:typeof e.value=="string"?e.value:"",Je.startsWith("\\")&&(Je+=" "),bn=Ot?Ot.match(/{?\\char"([\dabcdefABCDEF]+)}?/):null,bn?Je=String.fromCodePoint(Number.parseInt("0x"+bn[1])):Je.length>0&&Je.startsWith("\\")&&(Je=typeof e.value=="string"?e.value.charAt(0):e.command),Je=Kg(Je,e.style);break;case"mbin":case"mrel":case"minner":Je=(f=(c=dd[Ot])!=null?c:fd[Ot])!=null?f:e.value;break;case"mopen":case"mclose":Je=e.value;break;case"mpunct":Je=(b=fd[Ot])!=null?b:Ot;break;case"mop":case"operator":case"extensible-symbol":e.value!=="\u200B"&&(fd[Ot]?Je=fd[Ot]:Je=Ot==="\\operatorname"?Ja(e.body):(C=e.value)!=null?C:Ot,Je+=" ");break;case"array":const en=e.array,Ln=e.environmentName,sn=(k={bmatrix:["[","]"],"bmatrix*":["[","]"]}[Ln])!=null?k:["(",")"],hr=[];for(const Mr of en){const Ci=[];for(const qi of Mr)Ci.push(sn[0]+Ja(qi)+sn[1]);hr.push(Ci.join(","))}const Lr=($={bmatrix:["[","]"],"bmatrix*":["[","]"],cases:["{",":}"]}[Ln])!=null?$:["(",")"];Je=Lr[0]+hr.join(",")+Lr[1];break;case"box":break;case"spacing":Je=(ne=dd[Ot])!=null?ne:" ";break;case"enclose":Je="("+Ja(e.body)+")";break;case"space":Je=" ";break;case"subsup":Je="";break;case"macro":Je=(We=(Me=dd[Ot])!=null?Me:fd[Ot])!=null?We:Ja(e.body);break}if(!e.hasEmptyBranch("subscript")){Je+="_";const Dt=Ja(e.subscript);Je+=Dt.length!==1?`(${Dt})`:Dt}if(!e.hasEmptyBranch("superscript")){Je+="^";const Dt=Ja(e.superscript);Je+=Dt.length!==1?`(${Dt})`:Dt}return Je}function Kg(e,t){if(!t)return e;let n=e;return t.variant==="double-struck"&&(n=`bbb "${n}"`),t.variant==="script"&&(n=`cc "${n}"`),t.variant==="fraktur"&&(n=`fr "${n}"`),t.variant==="sans-serif"&&(n=`sf "${n}"`),t.variant==="monospace"&&(n=`tt "${n}"`),t.variantStyle==="bold"&&(n=`bb "${n}"`),t.color?`color({${t.color}})(${n})`:n}function Lo(e,t){var n,i;t!=null||(t={}),t.mathstyle=(n=t.mathstyle)!=null?n:"displaystyle";const o=new xi({from:F(E({},lu()),{renderPlaceholder:()=>new vn(160,{maxFontSize:1}),letterShapeStyle:(i=t==null?void 0:t.letterShapeStyle)!=null?i:"tex"}),mathstyle:t.mathstyle}),f=new Zt({mode:"math",type:"root",body:_o(e,{context:o,parseMode:"math",mathstyle:t.mathstyle})}).render(o);return f?(fc(Yu(f,o)),hc(f,{classes:"ML__latex"}).toMarkup()):""}function Pv(e){return sh(e,{context:lu()})}function Hg(e,t={}){return Ai(_o(e,{parseMode:"math",args:()=>"",mathstyle:"displaystyle"}),t)}function Zg(e){const t=_o(e,{parseMode:"math",mathstyle:"displaystyle"});return Lu(t)}var sf;function Wg(e){var t,n;if(!sf){const i=(t=globalThis[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:t.ComputeEngine;i?sf=new i:console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
|
|
|
|
|
|
Load the library, for example with:
|
|
|
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`)}return(n=sf==null?void 0:sf.box(e).latex)!=null?n:""}function Ov(e,t="math"){return Ja(new Zt({type:"root",body:_o(e,{parseMode:t})}))}function Av(e){return Rc(e,{format:"ascii-math"})[1]}function Jf(e){if(typeof e=="string"){const t=jg(e);if(!t)throw new Error(`Invalid color: ${e}`);return t}return"C"in e?Ug(e):"a"in e?g0(e):e}function Iu(e){return e<0?0:e>255?255:Math.round(e)}function jg(e){if(!e||e[0]!=="#")return;e=e.slice(1);let t;return e.length<=4?(t={r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16)},e.length===4&&(t.a=parseInt(e[3]+e[3],16)/255)):(t={r:parseInt(e[0]+e[1],16),g:parseInt(e[2]+e[3],16),b:parseInt(e[4]+e[5],16)},e.length===8&&(t.a=parseInt(e[6]+e[7],16)/255)),t&&typeof t.a=="undefined"&&(t.a=1),t}function Qf(e){const[t,n,i]=[e.L,e.C,e.H],o=i*Math.PI/180,c={L:t,a:n*Math.cos(o),b:n*Math.sin(o)};return e.alpha!==void 0&&(c.alpha=e.alpha),c}function Vg(e){const[t,n,i]=[e.L,e.a,e.b],o=Math.sqrt(n*n+i*i),f=Math.atan2(i,n)*180/Math.PI,b={L:t,C:o,H:f};return e.alpha!==void 0&&(b.alpha=e.alpha),b}function qf(e){const[t,n,i]=[e.L,e.a,e.b],o=Math.pow(.9999999984505198*t+.39633779217376786*n+.2158037580607588*i,3),c=Math.pow(1.00000000888176*t-.10556134232365635*n-.0638541747717059*i,3),f=Math.pow(t*1.000000054672411-.0894841820949657*n-1.2914855378640917*i,3),b=4.076741661347994*o-3.307711590408193*c+.230969928729428*f,C=-1.2684380040921763*o+2.6097574006633715*c-.3413193963102197*f,k=-.004196086541837188*o-.7034186144594493*c+1.7076147009309444*f,$=ne=>{const Me=Math.abs(ne);return Me<=.0031308?ne*12.92:(Math.sign(ne)||1)*(1.055*Math.pow(Me,1/2.4)-.055)};return[$(b),$(C),$(k)]}function eh(e){const[t,n,i]=e;return t>=0&&t<=1&&n>=0&&n<=1&&i>=0&&i<=1}function th(e,t){let[n,i,o]=e;return n=Iu(n*255),i=Iu(i*255),o=Iu(o*255),t!==void 0?{r:n,g:i,b:o,alpha:t}:{r:n,g:i,b:o}}function g0(e){let[t,n,i]=qf(e);if(eh([t,n,i]))return th([t,n,i],e.alpha);const o=Vg(e);if(o.C=0,[t,n,i]=qf(Qf(o)),!eh([t,n,i]))return th([t,n,i],e.alpha);let c=0,f=e.L,b=(c+f)/2;o.C=b;const C=.36/Math.pow(2,12);for(;f-c>C;)b=(c+f)/2,o.C=b,[t,n,i]=qf(Qf(o)),eh([t,n,i])?c=b:f=b;return th([t,n,i],e.alpha)}function Ug(e){return g0(Qf(e))}function v0(e,t){const n=Jf(e),i=Jf(t),o=.56,c=.57,f=.62,b=.65,C=.022,k=1.414,$=.1,ne=5e-4,Me=1.14,We=.027,Je=1.14,Ot=.027;function bn(Mr){return Mr>=C?Mr:Mr+Wl(C-Mr,k)}function Dt(Mr){return(Mr<0?-1:1)*Math.pow(Math.abs(Mr),2.4)}const en=bn(Dt(i.r/255)*.2126729+Dt(i.g/255)*.7151522+Dt(i.b/255)*.072175),Ln=bn(Dt(n.r/255)*.2126729+Dt(n.g/255)*.7151522+Dt(n.b/255)*.072175);let sn,hr,Lr;return Math.abs(Ln-en)<ne?hr=0:Ln>en?(sn=Wl(Ln,o)-Wl(en,c),hr=sn*Me):(sn=Wl(Ln,b)-Wl(en,f),hr=sn*Je),Math.abs(hr)<$?Lr=0:hr>0?Lr=hr-Ot:Lr=hr+We,Lr*100}function y0(e,t,n){n!=null||(n="#fff"),t!=null||(t="#000");const i=v0(e,n),o=v0(e,t);return Math.abs(i)>Math.abs(o)?n:t}function Gg(e){const t=Jf(e);let n=((1<<24)+(Iu(t.r)<<16)+(Iu(t.g)<<8)+Iu(t.b)).toString(16).slice(1);return t.alpha!==void 0&&t.alpha<1&&(n+=("00"+Math.round(t.alpha*255).toString(16)).slice(-2)),n[0]===n[1]&&n[2]===n[3]&&n[4]===n[5]&&n[6]===n[7]&&(n=n[0]+n[2]+n[4]+(t.alpha!==void 0&&t.alpha<1?n[6]:"")),"#"+n}function ya(e){const t=b0(e);let n="";for(const i of t){if(typeof i.value!="string")return"";n+=i.value}return n}function b0(e){const n=e.model.selection.ranges;return n.length!==1?[]:e.model.getAtoms(n[0])}function Xg(e,t){const n=b0(e);if(n.length!==1)return!1;const i=xf[t];return i?!!i.test(n[0].value):!1}function Yg(e,t){return ya(e).length>0}function Jg(e){return[nh(e,"double-struck","mathbb","tooltip.blackboard"),nh(e,"fraktur","mathfrak","tooltip.fraktur"),nh(e,"calligraphic","mathcal","tooltip.caligraphic"),rh(e,"up","mathrm","tooltip.roman-upright"),rh(e,"bold","mathbf","tooltip.bold"),rh(e,"italic","mathit","tooltip.italic")]}function Qg(e){return[{label:()=>Lo(`\\vec{${ya(e)}}`),visible:()=>ya(e).length===1,onMenuSelect:()=>e.insert("\\vec{#@}",{selectionMode:"item"})},{label:()=>Lo(`\\overrightarrow{${ya(e)}}`),visible:()=>ya(e).length>0,onMenuSelect:()=>e.insert("\\overrightarrow{#@}",{selectionMode:"item"})},{label:()=>Lo(`\\overleftarrow{${ya(e)}}`),visible:()=>ya(e).length>0,onMenuSelect:()=>e.insert("\\overleftarrow{#@}",{selectionMode:"item"})},{label:()=>Lo(`\\dot{${ya(e)}}`),visible:()=>ya(e).length===1,onMenuSelect:()=>e.insert("\\dot{#@}",{selectionMode:"item"})},{label:()=>Lo(`\\ddot{${ya(e)}}`),visible:()=>ya(e).length===1,onMenuSelect:()=>e.insert("\\ddot{#@}",{selectionMode:"item"})},{label:()=>Lo(`\\bar{${ya(e)}}`),visible:()=>ya(e).length===1,onMenuSelect:()=>e.insert("\\bar{#@}",{selectionMode:"item"})},{label:()=>Lo(`\\overline{${ya(e)}}`),visible:()=>ya(e).length>0,onMenuSelect:()=>e.insert("\\overline{#@}",{selectionMode:"item"})},{label:()=>Lo(`\\overgroup{${ya(e)}}`),visible:()=>ya(e).length>0,onMenuSelect:()=>e.insert("\\overgroup{#@}",{selectionMode:"item"})},{label:()=>Lo(`\\overbrace{${ya(e)}}`),visible:()=>ya(e).length>0,onMenuSelect:()=>e.insert("\\overbrace{#@}",{selectionMode:"item"})},{label:()=>Lo(`\\underline{${ya(e)}}`),visible:()=>ya(e).length>0,onMenuSelect:()=>e.insert("\\underline{#@}",{selectionMode:"item"})},{label:()=>Lo(`\\undergroup{${ya(e)}}`),visible:()=>ya(e).length>0,onMenuSelect:()=>e.insert("\\undergroup{#@}",{selectionMode:"item"})},{label:()=>Lo(`\\underbrace{${ya(e)}}`),visible:()=>ya(e).length>0,onMenuSelect:()=>e.insert("\\underbrace{#@}",{selectionMode:"item"})}]}function qg(e){return[{label:()=>Lo(`\\boxed{${e.getValue(e.model.selection)}}}`),onMenuSelect:()=>e.insert("\\boxed{#@}",{selectionMode:"item"})},{label:()=>Lo(`\\bbox[5px, border: 2px solid red]{${e.getValue(e.model.selection)}}`),onMenuSelect:()=>e.insert("\\bbox[5px, border: 2px solid red]{#@}",{selectionMode:"item"})},{label:()=>Lo(`\\bbox[5px, border: 2px dashed black]{${e.getValue(e.model.selection)}}`),onMenuSelect:()=>e.insert("\\bbox[5px, border: 2px dashed black]{#@}",{selectionMode:"item"})}]}function ev(e){const t=[];for(const n of Object.keys(ie))t.push({class:(Gg(y0(ie[n]))==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${ie[n]} "></span>`,ariaLabel:()=>{var i;return(i=pe(n))!=null?i:n},checked:()=>{var i;return{some:"mixed",all:!0}[(i=e.queryStyle({backgroundColor:n}))!=null?i:!1]},onMenuSelect:()=>{e.applyStyle({backgroundColor:n},{operation:"toggle"}),e.adoptStyle="none"}});return t}function tv(e){const t=[];for(const n of Object.keys(ae))t.push({class:(y0(ae[n])==="#000"?"dark-contrast":"light-contrast")+" menu-swatch",label:`<span style="background:${ae[n]} "></span>`,ariaLabel:()=>{var i;return(i=pe(n))!=null?i:n},checked:()=>{var i;return{some:"mixed",all:!0}[(i=e.queryStyle({color:n}))!=null?i:!1]},onMenuSelect:()=>{e.applyStyle({color:n},{operation:"toggle"}),e.adoptStyle="none"}});return t}var nv=class extends o0{constructor(e,t,n,i){super(e,t),this.row=n,this.col=i}set active(e){const t=this.parentMenu.children;if(e)for(const n of t)n.element.classList.toggle("active",n.row<=this.row&&n.col<=this.col);else for(const n of t)n.element.classList.remove("active")}};function rv(e){const t=[];for(let n=1;n<=5;n++)for(let i=1;i<=5;i++)t.push({onCreate:(o,c)=>new nv(o,c,n,i),label:"\u2610",tooltip:()=>pe("tooltip.row-by-col",n,i),data:{row:n,col:i},onMenuSelect:()=>{e.insert(`\\begin{pmatrix}${Array(n).fill(Array(i).fill("#?").join(" & ")).join("\\\\")}\\end{pmatrix}`,{selectionMode:"item"})}});return t}function iv(e){return[{label:()=>pe("menu.array.add row above"),id:"add-row-above",onMenuSelect:()=>e.executeCommand("addRowBefore"),visible:()=>Jc(e)},{label:()=>pe("menu.array.add row below"),id:"add-row-below",onMenuSelect:()=>e.executeCommand("addRowAfter"),visible:()=>Jc(e)},{label:()=>pe("menu.array.add column before"),id:"add-column-before",onMenuSelect:()=>e.executeCommand("addColumnBefore"),visible:()=>Jc(e),enabled:()=>{const t=e.model.parentEnvironment;if(!t)return!1;const[n,i]=ov(e);return n<t.maxColumns}},{label:()=>pe("menu.array.add column after"),id:"add-column-after",onMenuSelect:()=>e.executeCommand("addColumnAfter"),visible:()=>Jc(e)},{type:"divider"},{label:()=>pe("menu.array.delete row"),id:"delete-row",onMenuSelect:()=>e.executeCommand("removeRow"),visible:()=>Jc(e)},{label:()=>pe("menu.array.delete column"),id:"delete-column",onMenuSelect:()=>e.executeCommand("removeColumn"),visible:()=>Jc(e)},{type:"divider"},{label:()=>pe("menu.borders"),visible:()=>(av(e)||Jc(e))&&e.isSelectionEditable,submenu:[{label:" \u22F1 ",id:"environment-no-border",onMenuSelect:()=>hd(e,"matrix")},{label:"(\u22F1)",id:"environment-parentheses",onMenuSelect:()=>hd(e,"pmatrix")},{label:"[\u22F1]",id:"environment-brackets",onMenuSelect:()=>hd(e,"bmatrix")},{label:"|\u22F1|",id:"environment-bar",onMenuSelect:()=>hd(e,"vmatrix")},{label:"{\u22F1}",id:"environment-braces",onMenuSelect:()=>hd(e,"Bmatrix")}],submenuClass:"border-submenu"},{type:"divider"},{label:()=>pe("menu.insert matrix"),id:"insert-matrix",visible:()=>e.isSelectionEditable,submenu:rv(e),submenuClass:"insert-matrix-submenu",columnCount:5},{label:()=>pe("menu.mode"),id:"mode",visible:()=>e.isSelectionEditable&&e.model.selectionIsCollapsed,submenu:[{label:()=>pe("menu.mode-math"),id:"mode-math",onMenuSelect:()=>{yu(e,"accept-all"),e.executeCommand(["switchMode","math"])},checked:()=>e.model.mode==="math"},{label:()=>pe("menu.mode-text"),id:"mode-text",onMenuSelect:()=>{yu(e,"accept-all"),e.executeCommand(["switchMode","text"])},checked:()=>e.model.mode==="text"},{label:()=>pe("menu.mode-latex"),id:"mode-latex",onMenuSelect:()=>e.executeCommand(["switchMode","latex"]),checked:()=>e.model.mode==="latex"}]},{type:"divider"},{label:()=>pe("menu.font-style"),id:"variant",visible:()=>e.isSelectionEditable,submenu:Jg(e),submenuClass:"variant-submenu"},{label:()=>pe("menu.color"),id:"color",visible:()=>e.isSelectionEditable,submenu:tv(e),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>pe("menu.background-color"),id:"background-color",visible:()=>e.isSelectionEditable,submenu:ev(e),columnCount:4,submenuClass:"swatches-submenu"},{label:()=>pe("menu.accent"),id:"accent",visible:()=>e.isSelectionEditable,submenu:Qg(e),submenuClass:"variant-submenu"},{label:()=>pe("menu.decoration"),id:"decoration",visible:()=>e.isSelectionEditable&&ya(e).length>0,submenu:qg(e),submenuClass:"variant-submenu"},{type:"divider"},{label:()=>pe("menu.evaluate"),id:"ce-evaluate",visible:()=>e.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{const t=sv(e);if(!t){e.model.announce("plonk");return}e.model.selectionIsCollapsed?(e.model.position=e.model.lastOffset,e.insert(`=${t}`,{insertionMode:"insertAfter",selectionMode:"item"})):e.insert(t,{insertionMode:"replaceSelection",selectionMode:"item"})}},{label:()=>pe("menu.simplify"),id:"ce-simplify",visible:()=>e.isSelectionEditable&&window.MathfieldElement.computeEngine!==null,onMenuSelect:()=>{var t,n;if(e.model.selectionIsCollapsed){const i=(t=e.expression)==null?void 0:t.simplify();if(e.model.position=e.model.lastOffset,!i){e.model.announce("plonk");return}e.insert(`=${i.latex}`,{insertionMode:"insertAfter",selectionMode:"item"})}else{const i=(n=window.MathfieldElement.computeEngine)==null?void 0:n.parse(e.getValue(e.model.selection)).simplify();if(!i){e.model.announce("plonk");return}e.insert(i.latex,{insertionMode:"replaceSelection",selectionMode:"item"})}}},{label:()=>{var t;if(window.MathfieldElement.computeEngine===null)return"";const n=(t=e.expression)==null?void 0:t.unknowns[0];return n?pe("menu.solve-for",Lo(n)):pe("menu.solve")},id:"ce-solve",visible:()=>{var t;return e.isSelectionEditable&&window.MathfieldElement.computeEngine!==null&&((t=e.expression)==null?void 0:t.unknowns.length)===1&&e.expression.unknowns[0]!=="Nothing"},onMenuSelect:()=>{var t;const n=e.expression,i=n==null?void 0:n.unknowns[0],o=(t=n.solve(i))==null?void 0:t.map(c=>{var f;return(f=c.simplify().latex)!=null?f:""});if(!o){e.model.announce("plonk");return}e.insert(`${i}=${o.length===1?o[0]:"\\left\\lbrace"+(o==null?void 0:o.join(", "))+"\\right\\rbrace"}`,{insertionMode:"replaceAll",selectionMode:"item"})}},{type:"divider"},{label:()=>pe("menu.cut"),onMenuSelect:()=>e.executeCommand("cutToClipboard"),visible:()=>!e.options.readOnly&&e.isSelectionEditable,keyboardShortcut:"meta+X"},{label:()=>pe("menu.copy"),id:"copy",submenu:[{label:()=>pe("menu.copy-as-latex"),id:"copy-latex",onMenuSelect:()=>jr.copyToClipboard(e,"latex"),keyboardShortcut:"meta+C"},{label:()=>pe("menu.copy-as-ascii-math"),id:"copy-ascii-math",onMenuSelect:()=>jr.copyToClipboard(e,"ascii-math")},{label:()=>pe("menu.copy-as-mathml"),id:"copy-math-ml",onMenuSelect:()=>jr.copyToClipboard(e,"math-ml")}]},{label:()=>pe("menu.paste"),id:"paste",onMenuSelect:()=>e.executeCommand("pasteFromClipboard"),visible:()=>e.hasEditableContent,keyboardShortcut:"meta+V"},{label:()=>pe("menu.select-all"),id:"select-all",keyboardShortcut:"meta+A",onMenuSelect:()=>e.executeCommand("selectAll")}]}function Jc(e){var t;return!!((t=e.model.parentEnvironment)!=null&&t.array)}function av(e){return e.model.at(e.model.position).type==="array"}function ov(e){var t;const n=(t=e.model.parentEnvironment)==null?void 0:t.array;return n?[n.length,n.reduce((i,o)=>Math.max(i,o.length),0)]:[0,0]}function hd(e,t){Pd(e),e.flushInlineShortcutBuffer(),Rh(e.model,t),za(e)}function sv(e){var t,n;let i;if(e.model.selectionIsCollapsed?i=(t=window.MathfieldElement.computeEngine)==null?void 0:t.parse(e.getValue(),{canonical:!1}):i=(n=window.MathfieldElement.computeEngine)==null?void 0:n.parse(e.getValue(e.model.selection),{canonical:!1}),!i)return"";let o=i.evaluate();return o.isSame(i)&&(o=i.N()),o.latex}function nh(e,t,n,i){return{label:()=>Lo(`\\${n}{${ya(e)}}`),tooltip:()=>{var o;return(o=pe(i))!=null?o:i},visible:()=>Xg(e,t),checked:()=>{var o;return{some:"mixed",all:!0}[(o=e.queryStyle({variant:t}))!=null?o:!1]},onMenuSelect:()=>{e.applyStyle({variant:t},{operation:"toggle"}),e.adoptStyle="none"}}}function rh(e,t,n,i){return{label:()=>Lo(`\\${n}{${ya(e)}}`),tooltip:()=>{var o;return(o=pe(i))!=null?o:i},visible:()=>Yg(e,t),checked:()=>{var o;return{some:"mixed",all:!0}[(o=e.queryStyle({variantStyle:t}))!=null?o:!1]},onMenuSelect:()=>{e.applyStyle({variantStyle:t},{operation:"toggle"}),e.adoptStyle="none"}}}function Tu(e,t){return e+Lu(t)}$s({speak:(e,t,n)=>lv(e,t,n)},{target:"mathfield"});function lv(e,t,n){var i,o;n=n!=null?n:{withHighlighting:!1};const{model:c}=e;function f($){let ne=null;switch($){case"all":ne=c.root;break;case"selection":ne=c.getAtoms(c.selection);break;case"left":{ne=c.getAtoms(c.offsetOf(c.at(c.position).leftSibling),c.position);break}case"right":{ne=c.getAtoms(c.position,c.offsetOf(c.at(c.position).rightSibling));break}case"group":ne=c.getAtoms(c.getSiblingsRange(c.position));break;case"parent":{const{parent:Me}=c.at(c.position);Me!=null&&Me.parent?ne=Me:ne=c.root;break}default:ne=c.root}return ne}function b($){let ne="";switch($){case"all":console.log("Internal failure: speak all failed");break;case"selection":ne="no selection";break;case"left":ne="at start";break;case"right":ne="at end";break;case"group":console.log("Internal failure: speak group failed");break;case"parent":ne="no parent";break;default:console.log('unknown speak_ param value: "'+$+'"');break}return ne}const C=f(t);if(C===null)return(o=(i=window.MathfieldElement).speakHook)==null||o.call(i,b(t)),!1;(n.withHighlighting||window.MathfieldElement.speechEngine==="amazon")&&(window.MathfieldElement.textToSpeechMarkup=window.sre&&window.MathfieldElement.textToSpeechRules==="sre"?"ssml_step":"ssml");const k=Lu(C);return ke()&&n.withHighlighting?(wc().readAloudMathfield=e,Hc(e,{forHighlighting:!0}),window.MathfieldElement.readAloudHook&&window.MathfieldElement.readAloudHook(e.field,k)):window.MathfieldElement.speakHook&&window.MathfieldElement.speakHook(k),!1}function cv(e){var t,n;if(!ke()){console.log("Speak:",e);return}if(!window.MathfieldElement.speechEngine||window.MathfieldElement.speechEngine==="local"){const i=new SpeechSynthesisUtterance(e);window.speechSynthesis.speak(i)}else if(window.MathfieldElement.speechEngine==="amazon")if(!("AWS"in window))console.error("MathLive 0.98.5: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");else{const i=new window.AWS.Polly({apiVersion:"2016-06-10"}),o={OutputFormat:"mp3",VoiceId:(t=window.MathfieldElement.speechEngineVoice)!=null?t:"Joanna",Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes((n=window.MathfieldElement.speechEngineVoice)!=null?n:"Joanna")?"neural":"standard",Text:e,TextType:"ssml"};i.synthesizeSpeech(o,(c,f)=>{if(c)console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${c}`);else if(f!=null&&f.AudioStream){const b=new Uint8Array(f.AudioStream),C=new Blob([b.buffer],{type:"audio/mpeg"}),k=URL.createObjectURL(C);new Audio(k).play().catch(ne=>console.log(ne))}else console.log("polly.synthesizeSpeech():",f)})}else window.MathfieldElement.speechEngine==="google"&&console.error("MathLive 0.98.5: The Google speech engine is not supported yet. Please come again.")}function x0(e){var t;let n;if(e.parent.type==="prompt")e.parentBranch==="body"&&(n="prompt");else if(e.parentBranch==="body")n=e.type&&(t={enclose:"cross out",leftright:"delimiter",surd:"square root",root:"math field",mop:"operator",first:"first"}[e.type])!=null?t:"parent";else if(e.parent.type==="genfrac"){if(e.parentBranch==="above")return"numerator";if(e.parentBranch==="below")return"denominator"}else e.parent.type==="surd"?e.parentBranch==="above"&&(n="index"):e.parentBranch==="superscript"?n="superscript":e.parentBranch==="subscript"&&(n="subscript");return n||console.log("unknown relationship"),n!=null?n:"parent"}function uv(e,t,n,i){let o="";if(t==="plonk")window.MathfieldElement.playSound("plonk"),e.flushInlineShortcutBuffer();else if(t==="delete")o=Tu("deleted: ",i);else if(t==="focus"||t.includes("move"))o=dv(e.model,n)+(e.model.selectionIsCollapsed?"":"selected: ")+fv(e.model);else if(t==="replacement")o=Tu("",e.model.at(e.model.position));else if(t==="line"){const c=Tu("",e.model.root);e.keyboardDelegate.setAriaLabel(c)}else o=i?Tu(t+" ",i):t;if(o){const c=e.ariaLiveText.textContent.includes("\xA0")?" \u202F ":" \xA0 ";e.ariaLiveText.textContent=o+c}}function dv(e,t){if(Number.isNaN(t))return"";const n=e.at(t);if(!n||n.treeDepth<=e.at(e.position).treeDepth)return"";let i="",o=n.parent;const c=e.at(e.position).parent;for(;o!==e.root&&o!==c;)i+=`out of ${x0(o)};`,o=o.parent;return i}function fv(e){if(!e.selectionIsCollapsed)return Tu("",e.getAtoms(e.selection));let t="";const n=e.at(e.position),i=x0(n);return n.isFirstSibling&&(t=(i?"start of "+i:"unknown")+": "),n.isLastSibling?n.isFirstSibling||(t+=i?"end of "+i:"unknown"):t+=Tu("",n),t}var hv=class{constructor(e,t,n){this.mathfield=e,this.mode=t,this.silenceNotifications=!1,this._selection={ranges:[[0,0]],direction:"none"},this._anchor=0,this._position=0,this.root=n}dispose(){this.mathfield=void 0}getState(){const e={ranges:[...this._selection.ranges]};return this.selection.direction&&this.selection.direction!=="none"&&(e.direction=this.selection.direction),{content:this.root.toJson(),selection:e,mode:this.mode}}setState(e,t){var n;const i=this.silenceNotifications;this.silenceNotifications=(n=t==null?void 0:t.silenceNotifications)!=null?n:!0;let o={};if((t==null?void 0:t.type)==="undo"&&(o={inputType:"historyUndo"}),(t==null?void 0:t.type)==="redo"&&(o={inputType:"historyRedo"}),this.contentWillChange(o)){const c=this.silenceNotifications;this.silenceNotifications=!0,this.mode=e.mode,this.root=bc(e.content),this.selection=e.selection,this.silenceNotifications=c,this.contentDidChange(o)}this.silenceNotifications=i}get atoms(){return this.root.children}get selection(){return this._selection}set selection(e){this.setSelection(e)}setSelection(e,t){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{var n,i,o;const c=this.normalizeSelection(e,t);if(c===void 0)throw new TypeError("Invalid selection");if(c.ranges.length===1&&c.ranges[0][0]===c.ranges[0][1]){const $=c.ranges[0][0];if(!this.mathfield.dirty&&!((n=this.at($))!=null&&n.parentPrompt)&&this.mathfield.hasEditablePrompts){if((i=this.at($-1))!=null&&i.parentPrompt){this._anchor=this.normalizeOffset($-1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}if((o=this.at($+1))!=null&&o.parentPrompt){this._anchor=this.normalizeOffset($+1),this._position=this._anchor,this._selection=this.normalizeSelection(this._anchor);return}this._anchor=0,this._position=0,this._selection={ranges:[[0,0]]};return}this._anchor=$,this._position=$,this._selection=c;return}const f=ko(c);c.direction==="backward"?[this._position,this._anchor]=f:[this._anchor,this._position]=f;const b=this.at(f[0]+1),C=this.at(f[1]),k=Zt.commonAncestor(b,C);(k==null?void 0:k.type)==="array"&&b.parent===k&&C.parent===k?this._selection={ranges:[f],direction:c.direction}:this._selection={ranges:[f],direction:c.direction},console.assert(this._position>=0&&this._position<=this.lastOffset)})}setPositionHandlingPlaceholder(e){var t;const n=this.at(e);(n==null?void 0:n.type)==="placeholder"?this.setSelection(e-1,e):((t=n==null?void 0:n.rightSibling)==null?void 0:t.type)==="placeholder"?this.setSelection(e,e+1):this.position=e,n instanceof Ro&&n.isSuggestion&&(n.isSuggestion=!1),this.mathfield.stopCoalescingUndo()}get position(){return this._position}set position(e){this.setSelection(e,e)}get anchor(){return this._anchor}get selectionIsCollapsed(){return this._anchor===this._position}get selectionIsPlaceholder(){return Math.abs(this._anchor-this._position)===1?this.at(Math.max(this._anchor,this._position)).type==="placeholder":!1}collapseSelection(e="forward"){return this._anchor===this._position?!1:(e==="backward"?this.position=Math.min(this._anchor,this._position):this.position=Math.max(this._anchor,this._position),!0)}get lastOffset(){return this.atoms.length-1}at(e){return this.atoms[e]}offsetOf(e){return this.atoms.indexOf(e)}getSiblingsRange(e){const t=this.at(e),{parent:n}=t;if(!n)return[0,this.lastOffset];const i=t.parent.branch(t.parentBranch);return[this.offsetOf(i[0]),this.offsetOf(i[i.length-1])]}getBranchRange(e,t){const n=this.at(e).branch(t);return[this.offsetOf(n[0]),this.offsetOf(n[n.length-1])]}getAtoms(e,t,n){let i=n!=null?n:{};if(uu(e)){if(i=t!=null?t:{},e.ranges.length>1)return e.ranges.reduce((k,$)=>[...k,...this.getAtoms($,i)],[]);e=e.ranges[0]}let o,c;if(Ll(e)){if(o=e,!Ll(t))return[];c=t}else[o,c]=e,i=t!=null?t:{};if(!Number.isFinite(o))return[];i.includeChildren===void 0&&(i.includeChildren=!1),o<0&&(o=this.lastOffset-o+1),c<0&&(c=this.lastOffset-c+1);const f=Math.min(o,c)+1,b=Math.max(o,c);if(!i.includeChildren&&f===1&&b===this.lastOffset)return[this.root];let C=[];for(let k=f;k<=b;k++){const $=this.atoms[k];S0(this,$,f,b)&&C.push($)}return i.includeChildren||(C=C.filter(k=>{let $=!1,{parent:ne}=k;for(;ne&&!$;)$=S0(this,ne,f,b),ne=ne.parent;return!$})),C}getAllAtoms(e=0){const t=[],n=this.lastOffset;for(let i=e;i<=n;i++)t.push(this.atoms[i]);for(let i=0;i<e;i++)t.push(this.atoms[i]);return t}findAtom(e,t=0,n="forward"){let i;const o=this.lastOffset;if(n==="forward"){for(let c=t;c<=o;c++)if(i=this.atoms[c],e(i))return i;for(let c=0;c<t;c++)if(i=this.atoms[c],e(i))return i;return}for(let c=t;c>=0;c--)if(i=this.atoms[c],e(i))return i;for(let c=o;c>t;c--)if(i=this.atoms[c],e(i))return i}extractAtoms(e){let t=this.getAtoms(e);if(t.length===1&&!t[0].parent)if(t[0].type==="root")t=[...t[0].body],t.shift();else return t=this.root.cells.flat(),this.root=new Zt({type:"root",body:[]}),t;for(const n of t)n.parent.removeChild(n);return t}deleteAtoms(e){this.extractAtoms(e),this.position=e[0]}atomToString(e,t){const n=t!=null?t:"latex";if(n.startsWith("latex"))return Zt.serialize([e],{expandMacro:n==="latex-expanded",skipStyles:n==="latex-unstyled",skipPlaceholders:n==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode});if(n==="math-ml")return Ai(e);if(n==="spoken")return Lu(e);if(n==="spoken-text"){const i=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="";const o=Lu(e);return window.MathfieldElement.textToSpeechMarkup=i,o}if(n==="spoken-ssml"||n==="spoken-ssml-with-highlighting"){const i=window.MathfieldElement.textToSpeechMarkup;window.MathfieldElement.textToSpeechMarkup="ssml";const o=Lu(e);return window.MathfieldElement.textToSpeechMarkup=i,o}return n==="ascii-math"?Ja(e):(console.error(`MathLive 0.98.5: Unexpected format "${n}`),"")}getValue(e,t,n){if(e===void 0)return this.atomToString(this.root,"latex");if(typeof e=="string"&&e!=="math-json")return this.atomToString(this.root,e);let i,o;if(Ll(e)&&Ll(t)?(i=[this.normalizeRange([e,t])],o=n):cu(e)?(i=[this.normalizeRange(e)],o=t):uu(e)?(i=e.ranges,o=t):(i=[this.normalizeRange([0,-1])],o=e),o!=null||(o="latex"),o==="math-json"){if(!window.MathfieldElement.computeEngine)return window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`The CortexJS Compute Engine library is not available.
|
|
|
Load the library, for example with:
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`),'["Error", "compute-engine-not-available"]';const c=this.getValue({ranges:i},"latex-unstyled");try{const f=window.MathfieldElement.computeEngine.parse(c);return JSON.stringify(f.json)}catch(f){return JSON.stringify(["Error",`'${f.toString()}'`])}}if(o.startsWith("latex")){const c={expandMacro:o==="latex-expanded",skipStyles:o==="latex-unstyled",skipPlaceholders:o==="latex-without-placeholders",defaultMode:this.mathfield.options.defaultMode};return ri(i.map(f=>Zt.serialize(this.getAtoms(f),c)))}return i.map(c=>this.getAtoms(c).map(f=>this.atomToString(f,o)).join("")).join("")}extendSelectionTo(e,t){return!this.mathfield.contentEditable&&this.mathfield.userSelect==="none"?!1:this.deferNotifications({selection:!0},()=>{const n=this.normalizeRange([e,t]);let[i,o]=n,{parent:c}=this.at(o);if(c&&(c.type==="genfrac"||c.type==="subsup"))for(;c!==this.root&&ih(this,c,[i,o]);)o=this.offsetOf(c),c=c.parent;for(c=this.at(i).parent;c!==this.root&&ih(this,c,[i,o]);)i=this.offsetOf(c.leftSibling),c=c.parent;if(c=this.at(o).parent,(c==null?void 0:c.type)==="genfrac")for(;c!==this.root&&ih(this,c,[i,o]);)o=this.offsetOf(c),console.assert(o>=0),c=c.parent;this._position=this.normalizeOffset(t),this._selection={ranges:[[i,o]],direction:"none"}})}announce(e,t,n=[]){var i,o;((o=(i=this.mathfield.host)==null?void 0:i.dispatchEvent(new CustomEvent("announce",{detail:{command:e,previousPosition:t,atoms:n},cancelable:!0,bubbles:!0,composed:!0})))!=null?o:!0)&&uv(this.mathfield,e,t,n)}deferNotifications(e,t){const n=this._selection,i=this._anchor,o=this._position,c=this.silenceNotifications;this.silenceNotifications=!0;const f=this.root.changeCounter;t();const b=this.root.changeCounter!==f,C=i!==this._anchor||o!==this._position||Nc(this._selection,n)==="different";return this.silenceNotifications=c,e.content&&b&&this.contentDidChange({inputType:e.type}),e.selection&&C&&this.selectionDidChange(),b||C}normalizeOffset(e){return e>0?e=Math.min(e,this.lastOffset):e<0&&(e=this.lastOffset+e+1),e}normalizeRange(e){let[t,n]=e;return t=this.normalizeOffset(t),n=this.normalizeOffset(n),t<n?[t,n]:[n,t]}normalizeSelection(e,t){var n;let i;if(Ll(e)){const o=this.normalizeOffset(e);if(Ll(t)){const c=this.normalizeOffset(t);i=o<=c?{ranges:[[o,c]],direction:"none"}:{ranges:[[c,o]],direction:"backward"}}else i={ranges:[[o,o]],direction:"none"}}else if(cu(e)){const o=this.normalizeOffset(e[0]),c=this.normalizeOffset(e[1]);i=o<=c?{ranges:[[o,c]],direction:"none"}:{ranges:[[c,o]],direction:"backward"}}else uu(e)&&(i={ranges:e.ranges.map(o=>this.normalizeRange(o)),direction:(n=e.direction)!=null?n:"none"});return console.assert(i!==void 0),i}get parentEnvironment(){let e=this.at(this.position).parent;if(e){for(;e.parent&&e.type!=="array";)e=e.parent;if(e.type==="array")return e}}get cell(){var e;let t=this.at(this.position);if(t){for(;t&&((e=t.parent)==null?void 0:e.type)!=="array";)t=t.parent;if(!(!(t!=null&&t.parent)||t.parent.type!=="array"))return t.parentBranch}}contentWillChange(e={}){if(this.silenceNotifications||!this.mathfield)return!0;const t=this.silenceNotifications;this.silenceNotifications=!0;const n=this.mathfield.onContentWillChange(e);return this.silenceNotifications=t,n}contentDidChange(e){var t;if(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Bl(this.mathfield)),this.silenceNotifications||!this.mathfield.host||!this.mathfield)return;const n=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.host.dispatchEvent(new InputEvent("input",F(E({},e),{data:e.data?e.data:(t=e.inputType)!=null?t:"",bubbles:!0,composed:!0}))),this.silenceNotifications=n}selectionDidChange(){if(!this.mathfield||(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Bl(this.mathfield)),this.silenceNotifications))return;const e=this.silenceNotifications;this.silenceNotifications=!0,this.mathfield.onSelectionDidChange(),this.silenceNotifications=e}};function S0(e,t,n,i){const o=e.offsetOf(t);if(o<n||o>i)return!1;if(!t.hasChildren)return!0;const c=e.offsetOf(t.firstChild);if(c>=n&&c<=i){const f=e.offsetOf(t.lastChild);if(f>=n&&f<=i)return!0}return!1}function ih(e,t,n){if(!(t!=null&&t.hasChildren))return!1;const[i,o]=n,c=e.offsetOf(t.firstChild),f=e.offsetOf(t.lastChild);return c>=i&&c<=o&&f>=c&&f<=o}function pd(e,t,n,i){var o,c,f,b,C,k;const $=n.parent;if($&&n instanceof Oi){const ne=!i&&t==="forward"||i==="body"&&t==="backward";let Me=ne?e.offsetOf(n.firstChild):e.offsetOf(n.lastChild);return ne?n.rightDelim!=="?"&&n.rightDelim!=="."?(n.leftDelim=".",n.isDirty=!0):($.addChildrenAfter(n.removeBranch("body"),n),$.removeChild(n),Me--):n.leftDelim!=="?"&&n.leftDelim!=="."?(n.rightDelim=".",n.isDirty=!0):($.addChildrenAfter(n.removeBranch("body"),n),$.removeChild(n),Me--),e.position=Me,!0}if($&&n.type==="surd"){if(t==="forward"&&!i||t==="backward"&&i==="body"){const ne=n.leftSibling;n.hasChildren&&$.addChildrenAfter(n.removeBranch("body"),n),$.removeChild(n),e.position=e.offsetOf(ne)}else t==="forward"&&i==="body"?e.position=e.offsetOf(n):!i&&t==="backward"?n.hasChildren?e.position=e.offsetOf(n.lastChild):(e.position=Math.max(0,e.offsetOf(n)-1),$.removeChild(n)):i==="above"&&(n.hasEmptyBranch("above")&&n.removeBranch("above"),t==="backward"?e.position=e.offsetOf(n.leftSibling):e.position=e.offsetOf(n.body[0]));return!0}if($&&(n.type==="box"||n.type==="enclose")){const ne=i&&t==="backward"||!i&&t==="forward"?n.leftSibling:n.lastChild;return $.addChildrenAfter(n.removeBranch("body"),n),$.removeChild(n),e.position=e.offsetOf(ne),!0}if(n.type==="genfrac"||n.type==="overunder"){if(!i)return n.type==="overunder"&&n.hasEmptyBranch("body")||n.type==="genfrac"&&n.hasEmptyBranch("below")&&n.hasEmptyBranch("above")?!1:(e.position=e.offsetOf(t==="forward"?n.firstChild:n.lastChild),!0);const ne=md.fractionNavigationOrder==="numerator-denominator"?"above":"below",Me=ne==="above"?"below":"above";if($&&(t==="forward"&&i===ne||t==="backward"&&i===Me)){const We=n.removeBranch(ne),Je=n.removeBranch(Me);return $.addChildrenAfter([...We,...Je],n),$.removeChild(n),e.position=e.offsetOf(We.length>0?We[We.length-1]:Je[0]),!0}return t==="backward"?e.position=e.offsetOf(n.leftSibling):e.position=e.offsetOf(n),!0}if(n.isExtensibleSymbol||n.type==="subsup"){if(!i&&t==="forward")return!1;if(!i){if(n.subscript||n.superscript){const ne=t==="forward"?(f=(o=n.superscript)==null?void 0:o[0])!=null?f:(c=n.subscript)==null?void 0:c[0]:(k=(b=n.subscript)==null?void 0:b[0].lastSibling)!=null?k:(C=n.superscript)==null?void 0:C[0].lastSibling;return ne&&(e.position=e.offsetOf(ne)),!0}return!1}if(!n.hasChildren&&n.type==="subsup"){const ne=t==="forward"?e.offsetOf(n):Math.max(0,e.offsetOf(n)-1);return n.parent.removeChild(n),e.position=ne,!0}if(i==="superscript")if(t==="backward"){const ne=e.offsetOf(n.firstChild)-1;console.assert(ne>=0),e.position=ne}else n.subscript?e.position=e.offsetOf(n.subscript[0]):e.position=e.offsetOf(n);else i==="subscript"&&(t==="backward"&&n.superscript?e.position=e.offsetOf(n.superscript[0].lastSibling):t==="backward"?e.position=e.offsetOf(n.firstChild)-1:e.position=e.offsetOf(n));if(i&&n.hasEmptyBranch(i)&&(n.removeBranch(i),n.type==="subsup"&&!n.subscript&&!n.superscript)){const ne=t==="forward"?e.offsetOf(n):Math.max(0,e.offsetOf(n)-1);n.parent.removeChild(n),e.position=ne}return!0}if(($==null?void 0:$.type)==="genfrac"&&!i&&n.type!=="first"){let ne=e.offsetOf(n.leftSibling);return $.removeChild(n),$.hasEmptyBranch("above")&&$.hasEmptyBranch("below")?(ne=e.offsetOf($.leftSibling),$.parent.removeChild($),e.announce("delete",void 0,[$]),e.position=ne,!0):(e.announce("delete",void 0,[n]),e.position=ne,!0)}if(t==="backward"&&(($==null?void 0:$.command)==="\\ln"||($==null?void 0:$.command)==="\\log")&&n.parentBranch!=="body"){const ne=e.offsetOf($.leftSibling);return $.parent.removeChild($),e.announce("delete",void 0,[$]),e.position=ne,!0}return!1}function pv(e){return!e.mathfield.isSelectionEditable||!e.contentWillChange({inputType:"deleteContentBackward"})?!1:e.selectionIsCollapsed?e.deferNotifications({content:!0,selection:!0,type:"deleteContentBackward"},()=>{let t=e.at(e.position);if(!(t&&pd(e,"backward",t))){if(t!=null&&t.isFirstSibling){if(pd(e,"backward",t.parent,t.parentBranch))return;t=null}if(!t){e.announce("plonk");return}e.position=e.offsetOf(t.leftSibling),t.parent.removeChild(t),e.announce("delete",void 0,[t])}}):Rl(e,ko(e.selection),"deleteContentBackward")}function mv(e){return!e.mathfield.isSelectionEditable||!e.contentWillChange({inputType:"deleteContentForward"})?!1:e.selectionIsCollapsed?e.deferNotifications({content:!0,selection:!0,type:"deleteContentForward"},()=>{var t,n;let i=e.at(e.position).rightSibling;if(i&&pd(e,"forward",i))return;if(i){if(e.at(e.position).isLastSibling&&pd(e,"forward",i.parent,i.parentBranch))return}else{if(i=e.at(e.position),i.isLastSibling&&pd(e,"forward",i.parent,i.parentBranch))return;i=void 0}if(e.position===e.lastOffset||!i){e.announce("plonk");return}i.parent.removeChild(i);let o=(t=e.at(e.position))==null?void 0:t.rightSibling;for(;(o==null?void 0:o.type)==="subsup";)o.parent.removeChild(o),o=(n=e.at(e.position))==null?void 0:n.rightSibling;e.announce("delete",void 0,[i])}):Rl(e,ko(e.selection),"deleteContentForward")}function Rl(e,t,n){const i=e.getAtoms(t);if(i.length>0&&i[0].parent){let o=i[0].parent.firstChild;o.type==="first"&&(o=o.rightSibling);const c=i[i.length-1].parent.lastChild;let f=i[0];f.type==="first"&&(f=f.rightSibling);const b=i[i.length-1];if(f===o&&b===c){const C=i[0].parent;C.parent&&C.type!=="prompt"&&(t=[e.offsetOf(C.leftSibling),e.offsetOf(C)])}if(i.length===1&&i[0].type==="placeholder"&&i[0].parent.type==="genfrac"){const C=i[0].parent,k=i[0].parentBranch==="below"?"above":"below",$=e.offsetOf(C.leftSibling);return e.deferNotifications({content:!0,selection:!0,type:n},()=>{var ne,Me;const We=C.removeBranch(k);if(We.length===1&&We[0].type==="placeholder")(Me=C.parent)==null||Me.removeChild(C),e.position=Math.max(0,$);else{const Je=C.parent.addChildrenAfter(We,C);(ne=C.parent)==null||ne.removeChild(C),e.position=e.offsetOf(Je)}})}}return e.deferNotifications({content:!0,selection:!0,type:n},()=>e.deleteAtoms(t))}$s({deleteAll:e=>e.contentWillChange({inputType:"deleteContent"})&&Rl(e,[0,-1],"deleteContent"),deleteForward:e=>mv(e),deleteBackward:e=>pv(e),deleteNextWord:e=>e.contentWillChange({inputType:"deleteWordForward"})&&Rl(e,[e.anchor,Pf(e,e.position,"forward")],"deleteWordForward"),deletePreviousWord:e=>e.contentWillChange({inputType:"deleteWordBackward"})&&Rl(e,[e.anchor,Pf(e,e.position,"backward")],"deleteWordBackward"),deleteToGroupStart:e=>e.contentWillChange({inputType:"deleteSoftLineBackward"})&&Rl(e,[e.anchor,e.offsetOf(e.at(e.position).firstSibling)],"deleteSoftLineBackward"),deleteToGroupEnd:e=>e.contentWillChange({inputType:"deleteSoftLineForward"})&&Rl(e,[e.anchor,e.offsetOf(e.at(e.position).lastSibling)],"deleteSoftLineForward"),deleteToMathFieldStart:e=>e.contentWillChange({inputType:"deleteHardLineBackward"})&&Rl(e,[e.anchor,0],"deleteHardLineBackward"),deleteToMathFieldEnd:e=>e.contentWillChange({inputType:"deleteHardLineForward"})&&Rl(e,[e.anchor,-1],"deleteHardLineForward")},{target:"model",audioFeedback:"delete",canUndo:!0,changeContent:!0,changeSelection:!0});var gv=`<svg xmlns="http://www.w3.org/2000/svg" style="width: 21px;" viewBox="0 0 576 512" role="img" aria-label="${pe("tooltip.toggle virtual keyboard")}"><path d="M528 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm16 336c0 8.823-7.177 16-16 16H48c-8.823 0-16-7.177-16-16V112c0-8.823 7.177-16 16-16h480c8.823 0 16 7.177 16 16v288zM168 268v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-336 80v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm384 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zM120 188v-24c0-6.627-5.373-12-12-12H84c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm96 0v-24c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h24c6.627 0 12-5.373 12-12zm-96 152v-8c0-6.627-5.373-12-12-12H180c-6.627 0-12 5.373-12 12v8c0 6.627 5.373 12 12 12h216c6.627 0 12-5.373 12-12z"/></svg>`,vv=`<svg xmlns="http://www.w3.org/2000/svg" style="height: 18px;" viewBox="0 0 448 512" role="img" aria-label="${pe("tooltip.menu")}"><path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"/></svg>`,yv=class{constructor(e,t){this.focusBlurInProgress=!1;var n,i,o;this.options=E(F(E({},Wd()),{macros:qe(),registers:nl()}),Zd(t)),this.eventController=new AbortController;const c=this.eventController.signal;t.eventSink&&(this.host=t.eventSink),this.element=e,e.mathfield=this,this.blurred=!0,this.keystrokeCaptionVisible=!1,this.suggestionIndex=0,this.inlineShortcutBuffer=[],this.inlineShortcutBufferFlushTimer=0,this.defaultStyle={},this.adoptStyle="left",this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline"),this.dirty=!1;let f=(i=(n=t.value)!=null?n:this.element.textContent)!=null?i:"";f=f.trim();const b=Ah(this.options),C=new Zt({type:"root",mode:b,body:_o(f,{context:this.context})});this.model=new hv(this,b,C),this.undoManager=new Zm(this.model);const k=[];if(k.push("<span contenteditable=true aria-multiline=false part=keyboard-sink class=ML__keyboard-sink autocapitalize=off autocomplete=off autocorrect=off spellcheck=false inputmode=none tabindex=0></span>"),k.push('<span part=container class=ML__container aria-hidden=true style="visibility:hidden">'),k.push("<span part=content class=ML__content>"),k.push(_h(this)),k.push("</span>"),window.mathVirtualKeyboard&&(k.push(`<div part=virtual-keyboard-toggle class=ML__virtual-keyboard-toggle role=button ${this.hasEditableContent?"":'style="display:none;"'} data-l10n-tooltip="tooltip.toggle virtual keyboard">`),k.push(gv),k.push("</div>")),k.push('<div part=menu-toggle class=ML__menu-toggle role=button data-l10n-tooltip="tooltip.menu">'),k.push(vv),k.push("</div>"),k.push("</span>"),k.push("<span class=ML__sr-only>"),k.push("<span role=status aria-live=assertive aria-atomic=true></span>"),k.push("</span>"),this.element.innerHTML=window.MathfieldElement.createHTML(k.join("")),!this.element.children){console.error("%cMathLive 0.98.5: Something went wrong and the mathfield could not be created.%c\nIf you are using Vue, this may be because you are using the runtime-only build of Vue. Make sure to include `runtimeCompiler: true` in your Vue configuration. There may a warning from Vue in the log above.","color:red;font-family:system-ui;font-size:1.2rem;font-weight:bold","color:inherit;font-family:system-ui;font-size:inherit;font-weight:inherit");return}this._l10Subscription=Ce.subscribe(()=>Ce.update(this.element)),Ce.update(this.element),this.field=this.element.querySelector("[part=content]"),this.field.addEventListener("click",ne=>ne.stopImmediatePropagation(),{capture:!1,signal:c}),this.field.addEventListener("wheel",this,{passive:!1,signal:c}),"PointerEvent"in window?this.field.addEventListener("pointerdown",this,{signal:c}):this.field.addEventListener("mousedown",this,{signal:c}),(o=this.element.querySelector("[part=virtual-keyboard-toggle]"))==null||o.addEventListener("click",()=>{window.mathVirtualKeyboard.visible?window.mathVirtualKeyboard.hide():(window.mathVirtualKeyboard.show({animate:!0}),window.mathVirtualKeyboard.update(Bl(this)))},{signal:c}),this._menu=new Lg(iv(this),{host:this.host}),this.field.addEventListener("contextmenu",this,{signal:c});const $=this.element.querySelector("[part=menu-toggle]");$==null||$.addEventListener("pointerdown",ne=>{if(ne.currentTarget!==$||this._menu.state!=="closed")return;this.element.classList.add("tracking");const Me=$.getBoundingClientRect();this._menu.modifiers=Kc(ne),this._menu.show({target:$,location:{x:Me.left,y:Me.bottom},onDismiss:()=>this.element.classList.remove("tracking")}),ne.preventDefault(),ne.stopPropagation()},{signal:c}),(this.model.atoms.length<=1||this.disabled||this.readOnly&&!this.hasEditableContent||this.userSelect==="none")&&($.style.display="none"),this.ariaLiveText=this.element.querySelector("[role=status]"),this.keyboardDelegate=Gp(this.element.querySelector(".ML__keyboard-sink"),this.element,this),window.addEventListener("resize",this,{signal:c}),document.addEventListener("scroll",this,{signal:c}),this.resizeObserver=new ResizeObserver(()=>za(this)),this.resizeObserver.observe(this.field),window.mathVirtualKeyboard.addEventListener("virtual-keyboard-toggle",this,{signal:c}),qu&&!Ce.locale.startsWith(qu.locale)&&Wp(Ce.locale),Gs!=="ready"&&document.fonts.ready.then(()=>Rd(this)),e.querySelector("[part=container]").style.removeProperty("visibility"),this.undoManager.startRecording(),this.undoManager.snapshot("set-value")}get defaultStyle(){return this._defaultStyle}set defaultStyle(e){this._defaultStyle=e}get effectiveStyle(){if(this.adoptStyle==="none")return this.defaultStyle;const e=this.model.at(this.model.position),t=this.adoptStyle==="right"?e.rightSibling:e;if(!t)return this.defaultStyle;if(t.type==="group"){const n=t.branch("body");return!n||n.length<2?{}:this.adoptStyle==="right"?n[1].computedStyle:n[n.length-1].computedStyle}return t.computedStyle}connectToVirtualKeyboard(){this.connectedToVirtualKeyboard||(this.connectedToVirtualKeyboard=!0,window.addEventListener("message",this,{signal:this.eventController.signal}),window.mathVirtualKeyboard.connect(),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Bl(this)),nf(this))}disconnectFromVirtualKeyboard(){this.connectedToVirtualKeyboard&&(window.removeEventListener("message",this),window.mathVirtualKeyboard.disconnect(),this.connectedToVirtualKeyboard=!1,Wf())}showMenu(e){var t,n;const i=(n=(t=e==null?void 0:e.location)!=null?t:Dl(this.field))!=null?n:void 0,o=e==null?void 0:e.modifiers,c=this.element.querySelector("[part=container]");return this._menu.show({target:c,location:i,modifiers:o})}get colorMap(){return e=>{var t,n,i;return(i=(n=(t=this.options).colorMap)==null?void 0:n.call(t,e))!=null?i:be(e)}}get backgroundColorMap(){return e=>{var t,n,i,o,c,f;return(f=(c=(n=(t=this.options).backgroundColorMap)==null?void 0:n.call(t,e))!=null?c:(o=(i=this.options).colorMap)==null?void 0:o.call(i,e))!=null?f:D(e)}}get smartFence(){var e;return(e=this.options.smartFence)!=null?e:!1}get readOnly(){var e;return(e=this.options.readOnly)!=null?e:!1}get disabled(){var e,t;return(t=(e=this.host)==null?void 0:e.disabled)!=null?t:!1}get contentEditable(){return this.host?this.host.getAttribute("contenteditable")!=="false":!1}get userSelect(){if(!this.host)return"";const e=getComputedStyle(this.host);return e.getPropertyValue("user-select")||e.getPropertyValue("-webkit-user-select")}get hasEditableContent(){return this.disabled||!this.contentEditable?!1:!this.readOnly||this.hasEditablePrompts}get hasEditablePrompts(){return this.readOnly&&!this.disabled&&this.contentEditable&&this.model.findAtom(e=>e.type==="prompt"&&!e.locked)!==void 0}get isSelectionEditable(){if(this.disabled||!this.contentEditable)return!1;if(!this.readOnly)return!0;const e=this.model.at(this.model.anchor),t=this.model.at(this.model.position),n=Zt.commonAncestor(e,t);return!!((n==null?void 0:n.type)==="prompt"||n!=null&&n.parentPrompt)}get letterShapeStyle(){var e;return(e=this.options.letterShapeStyle)!=null?e:"tex"}get minFontScale(){return this.options.minFontScale}get selectionStyle(){if(this.model.selectionIsCollapsed)return this.effectiveStyle;const e=this.model.getAtoms(this.model.selection);if(e.length===0)return{};const t=E({},e[0].style);for(const n of e)for(const[i,o]of Object.entries(n.style))t[i]!==o&&delete t[i];return t}queryStyle(e){const t=zf(this,e);"verbatimColor"in t&&delete t.verbatimColor,"verbatimBackgroundColor"in t&&delete t.verbatimBackgroundColor;const n=Object.keys(t).length;if(n===0)return"all";if(n>1){for(const C of Object.keys(t)){const k=this.queryStyle({[C]:t[C]});if(k==="none")return"none";if(k==="some")return"some"}return"all"}const i=Object.keys(t)[0],o=t[i];if(this.model.selectionIsCollapsed)return this.effectiveStyle[i]===o?"all":"none";const c=this.model.getAtoms(this.model.selection,{includeChildren:!0});let f=c.length;if(f===0)return"none";let b=0;for(const C of c){if(C.type==="first"){f-=1;continue}C.style[i]===o&&(b+=1)}return b===0?"none":b===f?"all":"some"}get keybindings(){var e,t;if(this._keybindings)return this._keybindings;const[n,i]=qp(this.options.keybindings,(e=ed())!=null?e:jp());return((t=ed())==null?void 0:t.score)>0&&(this._keybindings=n,i.length>0&&console.error("MathLive 0.98.5: Invalid keybindings for current keyboard layout",i)),n}get menu(){return this._menu}setOptions(e){var t;this.options=E(E({},this.options),Zd(e)),this._keybindings=void 0,this.options.defaultMode==="inline-math"?this.element.classList.add("ML__is-inline"):this.element.classList.remove("ML__is-inline");let n=this.options.defaultMode;n==="inline-math"&&(n="math"),((t=this.model.root.firstChild)==null?void 0:t.mode)!==n&&(this.model.root.firstChild.mode=n),this.options.readOnly&&this.hasFocus()&&window.mathVirtualKeyboard.visible&&this.executeCommand("hideVirtualKeyboard");const i=Zt.serialize([this.model.root],{expandMacro:!1,defaultMode:this.options.defaultMode});("macros"in e||this.model.getValue()!==i)&&jr.insert(this.model,i,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",silenceNotifications:!0,mode:"math"}),("value"in e||"macros"in e||"registers"in e||"colorMap"in e||"backgroundColorMap"in e||"letterShapeStyle"in e||"minFontScale"in e||"readOnly"in e||"placeholderSymbol"in e)&&za(this)}getOptions(e){return Wc(this.options,e)}getOption(e){return Wc(this.options,e)}handleEvent(e){return Mc(this,null,function*(){var t;if(js(this)){if(If(e)){if(!ju(e.origin,(t=this.options.originValidator)!=null?t:"none"))throw new DOMException(`Message from unknown origin (${e.origin}) cannot be handled`,"SecurityError");const{action:n}=e.data;if(n==="execute-command"){const i=e.data.command;if(xu(i)==="virtual-keyboard")return;this.executeCommand(i)}else n==="update-state"||(n==="focus"?this.focus({preventScroll:!0}):n==="blur"&&this.blur());return}switch(e.type){case"focus":this.onFocus();break;case"blur":this.onBlur();break;case"mousedown":this.userSelect!=="none"&&Yh(this,e);break;case"pointerdown":this.userSelect!=="none"&&(Yh(this,e),e.shiftKey===!1&&(yield u0(e,this.element.querySelector("[part=container]"),this._menu))&&Qd.stop());break;case"contextmenu":this.userSelect!=="none"&&e.shiftKey===!1&&(yield u0(e,this.element.querySelector("[part=container]"),this._menu))&&Qd.stop();break;case"virtual-keyboard-toggle":this.hasFocus()&&nf(this);break;case"resize":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>js(this)&&this.onGeometryChange());break;case"scroll":this.geometryChangeTimer&&cancelAnimationFrame(this.geometryChangeTimer),this.geometryChangeTimer=requestAnimationFrame(()=>js(this)&&this.onGeometryChange());break;case"wheel":this.onWheel(e);break;default:console.warn("Unexpected event type",e.type)}}})}dispose(){if(!js(this))return;Ce.unsubscribe(this._l10Subscription),this.keyboardDelegate.dispose(),this.keyboardDelegate=void 0,this.eventController.abort(),this.eventController=void 0,this.resizeObserver.disconnect(),window.mathVirtualKeyboard.removeEventListener("virtual-keyboard-toggle",this),this.disconnectFromVirtualKeyboard(),this.model.dispose();const e=this.element;delete e.mathfield,this.element=void 0,this.host=void 0,this.field=void 0,this.ariaLiveText=void 0,eg(),am(),Sg()}flushInlineShortcutBuffer(e){if(e!=null||(e={defer:!1}),!e.defer){this.inlineShortcutBuffer=[],clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=0;return}this.options.inlineShortcutTimeout>0&&(clearTimeout(this.inlineShortcutBufferFlushTimer),this.inlineShortcutBufferFlushTimer=setTimeout(()=>this.flushInlineShortcutBuffer(),this.options.inlineShortcutTimeout))}executeCommand(e){return xu(e)==="virtual-keyboard"?(this.focus({preventScroll:!0}),window.mathVirtualKeyboard.executeCommand(e),requestAnimationFrame(()=>window.mathVirtualKeyboard.update(Bl(this))),!1):fm(this,e)}get errors(){return sh(this.model.getValue(),{context:this.context})}getValue(e,t,n){return this.model.getValue(e,t,n)}setValue(e,t){var n;t=t!=null?t:{mode:"math"},t.insertionMode===void 0&&(t.insertionMode="replaceAll"),(t.format===void 0||t.format==="auto")&&(t.format="latex"),(t.mode===void 0||t.mode==="auto")&&(t.mode=(n=df(this.model,this.model.position))!=null?n:"math");const i=this.undoManager.canUndo();jr.insert(this.model,e,t)&&(za(this),i||this.undoManager.reset(),this.undoManager.snapshot("set-value"))}get expression(){const e=window.MathfieldElement.computeEngine;return e?e.box(e.parse(this.model.getValue("latex-unstyled"))):(console.error("MathLive 0.98.5: no compute engine available. Make sure the Compute Engine library is loaded."),null)}scrollIntoView(){var e;if(!this.element)return;if(this.host){if(this.options.onScrollIntoView)this.options.onScrollIntoView(this);else if(this.host.scrollIntoView({block:"nearest",inline:"nearest"}),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.container===window.document.body){const i=window.mathVirtualKeyboard.boundingRect,o=this.host.getBoundingClientRect();o.bottom>i.top&&((e=window.document.scrollingElement)==null||e.scrollBy(0,o.bottom-i.top+8))}}this.dirty&&Hc(this,{interactive:!0});const t=this.field.getBoundingClientRect();let n=null;if(this.model.selectionIsCollapsed)n=Dl(this.field);else{const i=Wu(this);if(i.length>0){let o=-1/0,c=-1/0;for(const f of i)f.right>o&&(o=f.right),f.top<c&&(c=f.top);n={x:o+t.left-this.field.scrollLeft,y:c+t.top-this.field.scrollTop,height:0}}}if(this.host&&n){const i=this.host.getBoundingClientRect(),o=n.y;let c=this.host.scrollTop;o<i.top?c=o-i.top+this.host.scrollTop:o>i.bottom&&(c=o-i.bottom+this.host.scrollTop+n.height),this.host.scroll({top:c,left:0})}if(n){const i=n.x-window.scrollX;let o=this.field.scrollLeft;i<t.left?o=i-t.left+this.field.scrollLeft-20:i>t.right&&(o=i-t.right+this.field.scrollLeft+20),this.field.scroll({top:this.field.scrollTop,left:o})}}insert(e,t){return typeof e!="string"||e.length===0&&((t==null?void 0:t.insertionMode)==="insertBefore"||(t==null?void 0:t.insertionMode)==="insertAfter")||e.length===0&&this.model.selectionIsCollapsed?!1:(this.flushInlineShortcutBuffer(),t=t!=null?t:{mode:"math"},t.focus&&this.focus(),t.feedback&&(window.MathfieldElement.keypressVibration&&de()&&navigator.vibrate(Lh),window.MathfieldElement.playSound("keypress")),e==="\\\\"?Bh(this.model):e==="&"?Nh(this.model):this.model.selectionIsCollapsed?jr.insert(this.model,e,E({style:this.model.at(this.model.position).computedStyle},t)):jr.insert(this.model,e,t),this.snapshot(`insert-${this.model.at(this.model.position).type}`),za(this),t.scrollIntoView&&this.scrollIntoView(),!0)}switchMode(e,t="",n=""){var i;if(this.model.mode===e||!this.hasEditableContent||!this.contentEditable||this.disabled)return;const o=this.model.mode;if(this.model.mode=e,!((i=this.host)!=null&&i.dispatchEvent(new Event("mode-change",{bubbles:!0,composed:!0,cancelable:!0})))){this.model.mode=o;return}const c=this.model.mode,{model:f}=this;f.deferNotifications({content:!!n||!!t,selection:!0,type:"insertText"},()=>{let b=!1;if(this.flushInlineShortcutBuffer(),this.stopCoalescingUndo(),t&&e!=="latex"){const C=_o(t,{context:this.context,parseMode:e});f.collapseSelection("forward");const k=f.at(f.position);f.position=f.offsetOf(k.parent.addChildrenAfter(C,k)),b=!0}if(this.model.mode=e,e==="latex"){let C=f.selectionIsCollapsed;yu(this,"accept");let k,$=f.at(f.position);if(C)k="\\";else{const Me=ko(f.selection);k=this.model.getValue(Me,"latex");const We=this.model.extractAtoms(Me);We.length===1&&We[0].type==="placeholder"&&(k=t,C=!0),$=f.at(Me[0])}const ne=new Uu(k);$.parent.addChildAfter(ne,$),C?f.position=f.offsetOf(ne.lastChild):f.setSelection(f.offsetOf(ne.firstChild),f.offsetOf(ne.lastChild))}else td(f).forEach(C=>{C.isError=!1});if(n){const C=_o(n,{context:this.context,parseMode:c});f.collapseSelection("forward");const k=f.at(f.position);f.position=f.offsetOf(k.parent.addChildrenAfter(C,k)),b=!0}return za(this),this.undoManager.snapshot(e==="latex"?"insert-latex":"insert"),b}),this.model.mode=e,window.mathVirtualKeyboard.update(Bl(this))}hasFocus(){return!this.blurred}focus(e){var t;this.hasFocus()||(this.keyboardDelegate.focus(),this.connectToVirtualKeyboard(),this.onFocus(),this.model.announce("line")),(t=e==null?void 0:e.preventScroll)!=null&&t||this.scrollIntoView()}blur(){this.disconnectFromVirtualKeyboard(),this.hasFocus()&&this.keyboardDelegate.blur()}select(){this.model.selection={ranges:[[0,this.model.lastOffset]]},this.focus()}applyStyle(e,t={}){var n,i;const o={operation:"set",silenceNotifications:!1};cu(t)?o.range=t:(t.operation==="toggle"&&(o.operation="toggle"),o.range=t.range,o.silenceNotifications=(n=t.silenceNotifications)!=null?n:!1);const c=zf(this,e),f=(i=o.operation)!=null?i:"set";if(o.range===void 0&&this.model.selectionIsCollapsed){if(f==="set"){this.defaultStyle=E(E({},this.defaultStyle),c);return}const b=E({},this.defaultStyle);for(const C of Object.keys(c))b[C]===c[C]?(C==="color"&&delete b.verbatimColor,C==="backgroundColor"&&delete b.verbatimBackgroundColor,delete b[C]):b[C]=c[C];this.defaultStyle=b;return}this.model.deferNotifications({content:!o.silenceNotifications,type:"insertText"},()=>{if(o.range===void 0)for(const b of this.model.selection.ranges)Df(this.model,b,c,{operation:f});else Df(this.model,o.range,c,{operation:f})}),za(this)}toggleContextMenu(){var e;return this._menu.visible?this._menu.state==="open"?(this._menu.hide(),!0):(this._menu.show({target:this.element.querySelector("[part=container]"),location:(e=this.getCaretPoint())!=null?e:void 0,onDismiss:()=>{var t;return(t=this.element)==null?void 0:t.focus()}}),!0):!1}getCaretPoint(){const e=Dl(this.field);return e?{x:e.x,y:e.y}:null}setCaretPoint(e,t){const n=cd(this,e,t,{bias:0});if(n<0)return!1;const i=this.model.position;return this.model.position=n,this.model.announce("move",i),za(this),!0}getPrompt(e){const t=this.model.findAtom(n=>n.type==="prompt"&&n.placeholderId===e);return console.assert(t!==void 0,"MathLive 0.98.5: no prompts with matching ID found"),t}getPromptValue(e,t){const n=this.getPrompt(e);if(!n)return"";const i=this.model.offsetOf(n.firstChild),o=this.model.offsetOf(n.lastChild);return this.model.getValue(i,o,t)}getPrompts(e){return this.model.getAllAtoms().filter(t=>t.type!=="prompt"?!1:e?!(e.id&&t.placeholderId!==e.id||e.locked&&t.locked!==e.locked||e.correctness==="undefined"&&t.correctness||e.correctness&&t.correctness!==e.correctness):!0).map(t=>t.placeholderId)}setPromptValue(e,t,n){if(t!==void 0){const i=this.getPrompt(e);if(!i){console.error(`MathLive 0.98.5: unknown prompt ${e}`);return}const o=this.model.getBranchRange(this.model.offsetOf(i),"body");this.model.setSelection(o),this.insert(t,F(E({},n),{insertionMode:"replaceSelection"}))}n!=null&&n.silenceNotifications&&(this.valueOnFocus=this.getValue()),za(this)}setPromptState(e,t,n){const i=this.getPrompt(e);if(!i){console.error(`MathLive 0.98.5: unknown prompt ${e}`);return}t==="undefined"?i.correctness=void 0:typeof t=="string"&&(i.correctness=t),typeof n=="boolean"&&(i.locked=n,i.captureSelection=n),za(this)}getPromptState(e){const t=this.getPrompt(e);return t?[t.correctness,t.locked]:(console.error(`MathLive 0.98.5: unknown prompt ${e}`),[void 0,!0])}getPromptRange(e){const t=this.getPrompt(e);return t?this.model.getBranchRange(this.model.offsetOf(t),"body"):(console.error(`MathLive 0.98.5: unknown prompt ${e}`),[0,0])}canUndo(){return this.undoManager.canUndo()}canRedo(){return this.undoManager.canRedo()}popUndoStack(){this.undoManager.pop()}snapshot(e){var t;this.undoManager.snapshot(e)&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Bl(this)),(t=this.host)==null||t.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"snapshot"}})))}stopCoalescingUndo(){this.undoManager.stopCoalescing(this.model.selection)}stopRecording(){this.undoManager.stopRecording()}startRecording(){this.undoManager.startRecording()}undo(){var e;this.undoManager.undo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Bl(this)),(e=this.host)==null||e.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}redo(){var e;this.undoManager.redo()&&(window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Bl(this)),(e=this.host)==null||e.dispatchEvent(new CustomEvent("undo-state-change",{bubbles:!0,composed:!0,detail:{type:"undo"}})))}resetUndo(){var e;(e=this.undoManager)==null||e.reset()}onSelectionDidChange(){var e,t;const n=this.model;this.keyboardDelegate.setValue(n.getValue(this.model.selection,"latex-expanded"));{const i=n.at(n.position),o=(e=i.mode)!=null?e:Ah(this.options);this.model.mode!==o&&(this.model.mode==="latex"?(yu(this,"accept",{mode:o}),n.position=n.offsetOf(i)):this.switchMode(o))}(t=this.host)==null||t.dispatchEvent(new Event("selection-change",{bubbles:!0,composed:!0})),window.mathVirtualKeyboard.visible&&window.mathVirtualKeyboard.update(Bl(this)),nf(this)}onContentWillChange(e){var t,n,i;return(i=(n=this.host)==null?void 0:n.dispatchEvent(new InputEvent("beforeinput",F(E({},e),{data:e.data?e.data:(t=e.inputType)!=null?t:"",cancelable:!0,bubbles:!0,composed:!0}))))!=null?i:!0}onFocus(){this.focusBlurInProgress||!this.blurred||(this.focusBlurInProgress=!0,this.blurred=!1,this.keyboardDelegate.focus(),this.stopCoalescingUndo(),Hc(this,{interactive:!0}),this.valueOnFocus=this.model.getValue(),this.hasEditablePrompts&&!this.model.at(this.model.anchor).parentPrompt&&this.executeCommand("moveToNextPlaceholder"),this.focusBlurInProgress=!1)}onBlur(){var e,t,n;if(this.focusBlurInProgress||this.blurred)return;this.focusBlurInProgress=!0,this.stopCoalescingUndo(),this.blurred=!0,this.ariaLiveText.textContent="",bu(this),this.model.getValue()!==this.valueOnFocus&&((e=this.host)==null||e.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))),this.disconnectFromVirtualKeyboard(),(t=this.host)==null||t.dispatchEvent(new Event("blur",{bubbles:!1,composed:!0})),(n=this.host)==null||n.dispatchEvent(new UIEvent("focusout",{bubbles:!0,composed:!0})),za(this),this.focusBlurInProgress=!1,Wf();const i=new AbortController,o=i.signal;document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&document.addEventListener("visibilitychange",()=>{js(this)&&document.visibilityState==="visible"&&this.focus({preventScroll:!0})},{once:!0,signal:o})},{once:!0,signal:o}),setTimeout(()=>i.abort(),100)}onInput(e){Bf(this,e)}onKeystroke(e){return Uh(this,e)}onCompositionStart(e){this.model.deleteAtoms(ko(this.model.selection));const t=Dl(this.field);t&&requestAnimationFrame(()=>{Hc(this),this.keyboardDelegate.moveTo(t.x,t.y-t.height)})}onCompositionUpdate(e){Om(this.model,e),za(this)}onCompositionEnd(e){Am(this.model),Bf(this,e,{simulateKeystroke:!0})}onCut(e){if(!this.isSelectionEditable){this.model.announce("plonk");return}this.model.contentWillChange({inputType:"deleteByCut"})&&(this.stopCoalescingUndo(),jr.onCopy(this,e),Rl(this.model,ko(this.model.selection),"deleteByCut"),this.snapshot("cut"),za(this))}onCopy(e){jr.onCopy(this,e)}onPaste(e){let t=this.isSelectionEditable;return t&&(t=jr.onPaste(this.model.at(this.model.position).mode,this,e.clipboardData)),t||this.model.announce("plonk"),e.preventDefault(),e.stopPropagation(),t}onGeometryChange(){this._menu.hide(),Ad(this),nf(this)}onWheel(e){const t=5*e.deltaX;if(!Number.isFinite(t)||t===0)return;const n=this.field;t<0&&n.scrollLeft===0||t>0&&n.offsetWidth+n.scrollLeft>=n.scrollWidth||(n.scrollBy({top:0,left:t}),e.preventDefault(),e.stopPropagation())}getHTMLElement(e){let t=e;for(;!t.id&&t.hasChildren;)t=e.children[0];return this.field.querySelector(`[data-atom-id="${t.id}"]`)}get context(){var e,t;return{registers:(e=this.options.registers)!=null?e:{},smartFence:this.smartFence,letterShapeStyle:this.letterShapeStyle,minFontScale:this.minFontScale,placeholderSymbol:(t=this.options.placeholderSymbol)!=null?t:"\u25A2",colorMap:n=>this.colorMap(n),backgroundColorMap:n=>this.backgroundColorMap(n),getMacro:n=>$e(n,this.options.macros),atomIdsSettings:{seed:"random",groupNumbers:!1}}}};function C0(e){if(e&&(e.classList.remove("ML__highlight"),e.children))for(const t of e.children)C0(t)}function ah(e,t){var n;e&&(!t||((n=e.dataset)==null?void 0:n.atomId)===t?(e.classList.add("ML__highlight"),e.children&&e.children.length>0&&[...e.children].forEach(i=>{i instanceof HTMLElement&&ah(i)})):(e.classList.remove("ML__highlight"),e.children&&e.children.length>0&&[...e.children].forEach(i=>{i instanceof HTMLElement&&ah(i,t)})))}function bv(e,t){var n;if(!ke())return;if(window.MathfieldElement.speechEngine!=="amazon"){console.error("MathLive 0.98.5: Use Amazon TTS Engine for synchronized highlighting"),typeof window.MathfieldElement.speakHook=="function"&&window.MathfieldElement.speakHook(t);return}if(!window.AWS){console.error("MathLive 0.98.5: AWS SDK not loaded. See https://www.npmjs.com/package/aws-sdk");return}const i=new window.AWS.Polly({apiVersion:"2016-06-10"}),o={OutputFormat:"json",VoiceId:(n=window.MathfieldElement.speechEngineVoice)!=null?n:"Joanna",Engine:"standard",Text:t,TextType:"ssml",SpeechMarkTypes:["ssml"]};wc().readAloudElement=e,i.synthesizeSpeech(o,(c,f)=>{if(c){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech()\` error: ${c}`);return}if(!(f!=null&&f.AudioStream)){console.log("polly.synthesizeSpeech():",f);return}const b=new TextDecoder("utf-8").decode(new Uint8Array(f.AudioStream));wc().readAloudMarks=b.split(`
|
|
|
`).map(C=>C?JSON.parse(C):{}),wc().readAloudTokens=[];for(const C of wc().readAloudMarks)C.value&&wc().readAloudTokens.push(C.value);wc().readAloudCurrentMark="",o.OutputFormat="mp3",o.SpeechMarkTypes=[],i.synthesizeSpeech(o,(C,k)=>{if(C){console.trace(`MathLive 0.98.5: \`polly.synthesizeSpeech("${t}") error:${C}`);return}if(!(k!=null&&k.AudioStream))return;const $=new Uint8Array(k.AudioStream),ne=new Blob([$.buffer],{type:"audio/mpeg"}),Me=URL.createObjectURL(ne),We=wc();We.readAloudAudio?We.readAloudAudio.pause():(We.readAloudAudio=new Audio,We.readAloudAudio.addEventListener("ended",()=>{const Je=We.readAloudMathfield;We.readAloudStatus="ended",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),Je?(Hc(Je),We.readAloudElement=null,We.readAloudMathfield=null,We.readAloudTokens=[],We.readAloudMarks=[],We.readAloudCurrentMark=""):C0(We.readAloudElement)}),We.readAloudAudio.addEventListener("timeupdate",()=>{let Je="";const Ot=We.readAloudAudio.currentTime*1e3+100;for(const bn of We.readAloudMarks)bn.time<Ot&&(Je=bn.value);We.readAloudCurrentMark!==Je&&(We.readAloudCurrentToken=Je,Je&&Je===We.readAloudFinalToken?We.readAloudAudio.pause():(We.readAloudCurrentMark=Je,ah(We.readAloudElement,We.readAloudCurrentMark)))})),We.readAloudAudio.src=Me,We.readAloudStatus="playing",document.body.dispatchEvent(new Event("read-aloud-status-change",{bubbles:!0,composed:!0})),We.readAloudAudio.play()})})}ke()||console.error('MathLive 0.98.5: this version of the MathLive library is for use in the browser. A subset of the API is available on the server side in the "mathlive-ssr" library. If using server side rendering (with React for example) you may want to do a dynamic import of the MathLive library inside a `useEffect()` call.');var Li=new WeakMap,xv=.5,Cc={letterShapeStyle:"mf.letterShapeStyle = ...",horizontalSpacingScale:'Removed. Use `"thinmuskip"`, `"medmuskip"`, and `"thickmuskip"` registers ',macros:"mf.macros = ...",registers:"mf.registers = ...",backgroundColorMap:"mf.backgroundColorMap = ...",colorMap:"mf.colorMap = ...",enablePopover:"mf.popoverPolicy = ...",mathModeSpace:"mf.mathModeSpace = ...",placeholderSymbol:"mf.placeholderSymbol = ...",readOnly:"mf.readOnly = ...",removeExtraneousParentheses:"mf.removeExtraneousParentheses = ...",scriptDepth:"mf.scriptDepth = ...",smartFence:"mf.smartFence = ...",smartMode:"mf.smartMode = ...",smartSuperscript:"mf.smartSuperscript = ...",inlineShortcutTimeout:"mf.inlineShortcutTimeout = ...",inlineShortcuts:"mf.inlineShortcuts = ...",keybindings:"mf.keybindings = ...",virtualKeyboardMode:"mf.mathVirtualKeyboardPolicy = ...",customVirtualKeyboardLayers:"mathVirtualKeyboard.layers = ...",customVirtualKeyboards:"mathVirtualKeyboard.layouts = ...",keypressSound:"mathVirtualKeyboard.keypressSound = ...",keypressVibration:"mathVirtualKeyboard.keypressVibration = ...",plonkSound:"mathVirtualKeyboard.plonkSound = ...",virtualKeyboardContainer:"mathVirtualKeyboard.container = ...",virtualKeyboardLayout:"mathVirtualKeyboard.alphabeticLayout = ...",virtualKeyboardTheme:"No longer supported",virtualKeyboardToggleGlyph:"No longer supported",virtualKeyboardToolbar:"mathVirtualKeyboard.editToolbar = ...",virtualKeyboards:"Use `mathVirtualKeyboard.layouts`",speechEngine:"`MathfieldElement.speechEngine`",speechEngineRate:"`MathfieldElement.speechEngineRate`",speechEngineVoice:"`MathfieldElement.speechEngineVoice`",textToSpeechMarkup:"`MathfieldElement.textToSpeechMarkup`",textToSpeechRules:"`MathfieldElement.textToSpeechRules`",textToSpeechRulesOptions:"`MathfieldElement.textToSpeechRulesOptions`",readAloudHook:"`MathfieldElement.readAloudHook`",speakHook:"`MathfieldElement.speakHook`",computeEngine:"`MathfieldElement.computeEngine`",fontsDirectory:"`MathfieldElement.fontsDirectory`",soundsDirectory:"`MathfieldElement.soundsDirectory`",createHTML:"`MathfieldElement.createHTML`",onExport:"`MathfieldElement.onExport`",onInlineShortcut:"`MathfieldElement.onInlineShortcut`",onScrollIntoView:"`MathfieldElement.onScrollIntoView`",locale:"MathfieldElement.locale = ...",strings:"MathfieldElement.strings = ...",decimalSeparator:"MathfieldElement.decimalSeparator = ...",fractionNavigationOrder:"MathfieldElement.fractionNavigationOrder = ..."},zo=class Qc extends HTMLElement{static get formAssociated(){return Du()}static get optionsAttributes(){return{"default-mode":"string","letter-shape-style":"string","min-font-scale":"number","popover-policy":"string","math-mode-space":"string","read-only":"boolean","remove-extraneous-parentheses":"on/off","smart-fence":"on/off","smart-mode":"on/off","smart-superscript":"on/off","inline-shortcut-timeout":"string","script-depth":"string",placeholder:"string","virtual-keyboard-target-origin":"string","math-virtual-keyboard-policy":"string"}}static get observedAttributes(){return[...Object.keys(this.optionsAttributes),"contenteditable","disabled","readonly","read-only"]}static get fontsDirectory(){return this._fontsDirectory}static set fontsDirectory(t){t!==this._fontsDirectory&&(this._fontsDirectory=t,lm())}get fontsDirectory(){throw new Error("Use MathfieldElement.fontsDirectory instead")}set fontsDirectory(t){throw new Error("Use MathfieldElement.fontsDirectory instead")}static get soundsDirectory(){return this._soundsDirectory}static set soundsDirectory(t){this._soundsDirectory=t,this.audioBuffers={}}get soundsDirectory(){throw new Error("Use MathfieldElement.soundsDirectory instead")}set soundsDirectory(t){throw new Error("Use MathfieldElement.soundsDirectory instead")}static get keypressSound(){return this._keypressSound}static set keypressSound(t){var n,i,o;this.audioBuffers={},t===null?this._keypressSound={spacebar:null,return:null,delete:null,default:null}:typeof t=="string"?this._keypressSound={spacebar:t,return:t,delete:t,default:t}:typeof t=="object"&&"default"in t&&(this._keypressSound={spacebar:(n=t.spacebar)!=null?n:t.default,return:(i=t.return)!=null?i:t.default,delete:(o=t.delete)!=null?o:t.default,default:t.default})}static get plonkSound(){return this._plonkSound}static set plonkSound(t){this.audioBuffers={},this._plonkSound=t}static get audioContext(){return this._audioContext||(this._audioContext=new AudioContext),this._audioContext}static get speechEngine(){return this._speechEngine}static set speechEngine(t){this._speechEngine=t}static get speechEngineRate(){return this._speechEngineRate}static set speechEngineRate(t){this._speechEngineRate=t}static get speechEngineVoice(){return this._speechEngineVoice}static set speechEngineVoice(t){this._speechEngineVoice=t}static get textToSpeechMarkup(){return this._textToSpeechMarkup}static set textToSpeechMarkup(t){this._textToSpeechMarkup=t}static get textToSpeechRules(){return this._textToSpeechRules}static set textToSpeechRules(t){this._textToSpeechRules=t}static get textToSpeechRulesOptions(){return this._textToSpeechRulesOptions}static set textToSpeechRulesOptions(t){this._textToSpeechRulesOptions=t}static get locale(){return Ce.locale}static set locale(t){t==="auto"&&(t=navigator.language.slice(0,5)),Ce.locale=t}get locale(){throw new Error("Use MathfieldElement.locale instead")}set locale(t){throw new Error("Use MathfieldElement.locale instead")}static get strings(){return Ce.strings}static set strings(t){Ce.merge(t)}get strings(){throw new Error("Use MathfieldElement.strings instead")}set strings(t){throw new Error("Use MathfieldElement.strings instead")}static get decimalSeparator(){return this._decimalSeparator}static set decimalSeparator(t){this._decimalSeparator=t,this._computeEngine&&(this._computeEngine.latexOptions.decimalMarker=this.decimalSeparator===","?"{,}":".")}get decimalSeparator(){throw new Error("Use MathfieldElement.decimalSeparator instead")}set decimalSeparator(t){throw new Error("Use MathfieldElement.decimalSeparator instead")}static get computeEngine(){var t,n;if(this._computeEngine===void 0){const i=(t=window[Symbol.for("io.cortexjs.compute-engine")])==null?void 0:t.ComputeEngine;if(!i)return null;this._computeEngine=new i,this._computeEngine&&this.decimalSeparator===","&&(this._computeEngine.latexOptions.decimalMarker="{,}")}return(n=this._computeEngine)!=null?n:null}static set computeEngine(t){this._computeEngine=t}get computeEngine(){throw new Error("Use MathfieldElement.computeEngine instead")}set computeEngine(t){throw new Error("Use MathfieldElement.computeEngine instead")}static get isFunction(){return typeof this._isFunction!="function"?()=>!1:this._isFunction}static set isFunction(t){this._isFunction=t}static loadSound(t){return Mc(this,null,function*(){delete this.audioBuffers[t];let n="";switch(t){case"keypress":n=this._keypressSound.default;break;case"return":n=this._keypressSound.return;break;case"spacebar":n=this._keypressSound.spacebar;break;case"delete":n=this._keypressSound.delete;break;case"plonk":n=this.plonkSound;break}if(typeof n!="string")return;n=n.trim();const i=this.soundsDirectory;if(!(i==null||i==="null"||n==="none"||n==="null"))try{const c=yield(yield fetch(yield Eh(`${i}/${n}`))).arrayBuffer(),f=yield this.audioContext.decodeAudioData(c);this.audioBuffers[t]=f}catch(o){}})}static playSound(t){return Mc(this,null,function*(){if((this.audioContext.state==="suspended"||this.audioContext.state==="interrupted")&&(yield this.audioContext.resume()),this.audioBuffers[t]||(yield this.loadSound(t)),!this.audioBuffers[t])return;const n=this.audioContext.createBufferSource();n.buffer=this.audioBuffers[t];const i=this.audioContext.createGain();i.gain.value=xv,n.connect(i).connect(this.audioContext.destination),n.start()})}constructor(t){if(super(),t){const n=[];for(const i of Object.keys(t))if(Cc[i])if(Cc[i].startsWith("mf."))if(Cc[i].startsWith(`mf.${i}`))n.push(`Option \`${i}\` cannot be used as a constructor option. Use ${Cc[i]}`);else{const o=Cc[i].match(/([a-zA-Z]+) =/);n.push(`Option \`${i}\` has been renamed \`${o[1]}\``)}else n.push(`Option \`${i}\` cannot be used as a constructor option. Use ${Cc[i]}`);if(n.length>0){console.group("%cMathLive 0.98.5: %cInvalid Options","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn("Some of the options passed to `new MathfieldElement(...)` are invalid. \n See https://cortexjs.io/mathlive/changelog/ for details.");for(const i of n)console.warn(i);console.groupEnd()}}if(Du()&&(this._internals=this.attachInternals(),this._internals.role="math",this._internals.ariaLabel="math input field",this._internals.ariaMultiLine="false"),this.attachShadow({mode:"open",delegatesFocus:!0}),this.shadowRoot&&"adoptedStyleSheets"in this.shadowRoot){this.shadowRoot.adoptedStyleSheets=[yc("core"),yc("mathfield"),yc("mathfield-element"),yc("ui"),yc("menu")],this.shadowRoot.appendChild(document.createElement("span"));const n=document.createElement("slot");n.style.display="none",this.shadowRoot.appendChild(n)}else this.shadowRoot.innerHTML="<style>"+Xl("core")+Xl("mathfield")+Xl("mathfield-element")+Xl("ui")+Xl("menu")+'</style><span></span><slot style="display:none"></slot>';t&&this._setOptions(t),this.shadowRoot.addEventListener("slotchange",()=>{var n;const i=this.shadowRoot.querySelector("slot:not([name])");this.value=(n=i==null?void 0:i.assignedNodes().map(o=>o.nodeType===3?o.textContent:"").join("").trim())!=null?n:""})}showMenu(t){var n,i;return(i=(n=this._mathfield)==null?void 0:n.showMenu(t))!=null?i:!1}get mathVirtualKeyboard(){throw new Error("The `mathVirtualKeyboard` property is not available on the MathfieldElement. Use `window.mathVirtualKeyboard` instead.")}onPointerDown(){window.addEventListener("pointerup",t=>{var n;t.target===this&&!((n=this._mathfield)!=null&&n.disabled)&&this.dispatchEvent(new MouseEvent("click",{altKey:t.altKey,button:t.button,buttons:t.buttons,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey,metaKey:t.metaKey,movementX:t.movementX,movementY:t.movementY,relatedTarget:t.relatedTarget,screenX:t.screenX,screenY:t.screenY,shiftKey:t.shiftKey}))},{once:!0})}getPromptValue(t,n){var i,o;return(o=(i=this._mathfield)==null?void 0:i.getPromptValue(t,n))!=null?o:""}setPromptValue(t,n,i){var o;(o=this._mathfield)==null||o.setPromptValue(t,n,i)}getPromptRange(t){var n,i;return(i=(n=this._mathfield)==null?void 0:n.getPromptRange(t))!=null?i:null}getPrompts(t){var n,i;return(i=(n=this._mathfield)==null?void 0:n.getPrompts(t))!=null?i:[]}get form(){var t;return(t=this._internals)==null?void 0:t.form}get name(){var t;return(t=this.getAttribute("name"))!=null?t:""}get type(){return this.localName}get mode(){var t,n;return(n=(t=this._mathfield)==null?void 0:t.model.mode)!=null?n:this.defaultMode==="text"?"text":"math"}set mode(t){var n;(n=this._mathfield)==null||n.switchMode(t)}get expression(){if(this._mathfield)return window[Symbol.for("io.cortexjs.compute-engine")]?this._mathfield.expression:(console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
|
|
|
|
|
|
Load the library, for example with:
|
|
|
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`),null)}set expression(t){var n,i;if(!this._mathfield)return;const o=(i=(n=Qc.computeEngine)==null?void 0:n.box(t).latex)!=null?i:null;o!==null&&this._mathfield.setValue(o),window[Symbol.for("io.cortexjs.compute-engine")]||console.error(`MathLive 0.98.5: The CortexJS Compute Engine library is not available.
|
|
|
|
|
|
Load the library, for example with:
|
|
|
|
|
|
import "https://unpkg.com/@cortex-js/compute-engine?module"`)}get errors(){var t,n;return(n=(t=this._mathfield)==null?void 0:t.errors)!=null?n:[]}_getOptions(t){return this._mathfield?Wc(this._mathfield.options,t):Li.has(this)?E({},Wc(E(E({},Wd()),Zd(Li.get(this).options)),t)):null}getOptions(t){return console.warn("%cMathLive 0.98.5: %cDeprecated Usage%c\n `mf.getOptions()` is deprecated. Read the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._mathfield?Wc(this._mathfield.options,t):Li.has(this)?Wc(E(E({},Wd()),Zd(Li.get(this).options)),t):null}reflectAttributes(){const t=Wd(),n=this._getOptions();Object.keys(Qc.optionsAttributes).forEach(i=>{const o=ql(i);Qc.optionsAttributes[i]==="on/off"?t[o]!==n[o]?this.setAttribute(i,n[o]?"on":"off"):this.removeAttribute(i):t[o]!==n[o]&&(Qc.optionsAttributes[i]==="boolean"?n[o]?this.setAttribute(i,""):this.removeAttribute(i):(typeof n[o]=="string"||typeof n[o]=="number")&&this.setAttribute(i,n[o].toString()))})}getOption(t){return console.warn("%cMathLive 0.98.5: %cDeprecated Usage%c\n `mf.getOption()` is deprecated. Read the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem","color: inherit, font-size: 1rem"),this._getOptions([t])[t]}_getOption(t){return this._getOptions([t])[t]}_setOptions(t){if(this._mathfield)this._mathfield.setOptions(t);else if(Li.has(this)){const n=E(E({},Li.get(this).options),t);Li.set(this,F(E({},Li.get(this)),{selection:{ranges:n.readOnly?[[0,0]]:[[0,-1]]},options:n}))}else Li.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:t,menuItems:void 0});this.reflectAttributes()}setOptions(t){console.group("%cMathLive 0.98.5: %cDeprecated Usage","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),console.warn(" `mf.setOptions()` is deprecated. Set the property directly on the mathfield instead.\n See https://cortexjs.io/mathlive/changelog/ for details.");for(const n of Object.keys(t))Cc[n]&&console.warn(`\`mf.setOptions({${n}:...})\` -> ${Cc[n]}`);console.groupEnd(),this._setOptions(t)}executeCommand(t){var n,i;return(i=(n=this._mathfield)==null?void 0:n.executeCommand(t))!=null?i:!1}getValue(t,n,i){var o,c;if(this._mathfield)return this._mathfield.model.getValue(t,n,i);if(Li.has(this)){let f,b,C;if(uu(t)?([f,b]=t.ranges[0],C=n):cu(t)?([f,b]=t,C=n):Ll(t)&&Ll(n)?(f=t,b=n,C=i):(f=0,b=-1,C=t),(C===void 0||C==="latex")&&f===0&&b===-1)return(c=(o=Li.get(this).value)!=null?o:this.textContent)!=null?c:""}return""}setValue(t,n){if(this._mathfield&&t!==void 0){n!=null||(n={silenceNotifications:!0,mode:"math"}),this._mathfield.setValue(t,n);return}if(Li.has(this)){const o=Li.get(this).options;Li.set(this,{value:t,selection:{ranges:[[-1,-1]],direction:"forward"},options:o,menuItems:void 0});return}const i=gd(this);Li.set(this,{value:t,selection:{ranges:[[-1,-1]],direction:"forward"},options:i,menuItems:void 0})}hasFocus(){var t,n;return(n=(t=this._mathfield)==null?void 0:t.hasFocus())!=null?n:!1}focus(){var t;(t=this._mathfield)==null||t.focus()}blur(){var t;(t=this._mathfield)==null||t.blur()}select(){var t;(t=this._mathfield)==null||t.select()}insert(t,n){var i,o;return(o=(i=this._mathfield)==null?void 0:i.insert(t,n))!=null?o:!1}applyStyle(t,n){var i;return(i=this._mathfield)==null?void 0:i.applyStyle(t,n)}queryStyle(t){var n,i;return(i=(n=this._mathfield)==null?void 0:n.queryStyle(t))!=null?i:"none"}get caretPoint(){var t,n;return(n=(t=this._mathfield)==null?void 0:t.getCaretPoint())!=null?n:null}set caretPoint(t){var n;t&&((n=this._mathfield)==null||n.setCaretPoint(t.x,t.y))}setCaretPoint(t,n){var i,o;return(o=(i=this._mathfield)==null?void 0:i.setCaretPoint(t,n))!=null?o:!1}offsetFromPoint(t,n,i){return this._mathfield?cd(this._mathfield,t,n,i):-1}hitboxFromOffset(t){if(!this._mathfield)return null;const n=this._mathfield.model.at(t);if(!n)return null;const i=gc(this._mathfield,n);return i?new DOMRect(i.left,i.top,i.right-i.left,i.bottom-i.top):null}resetUndo(){var t;(t=this._mathfield)==null||t.resetUndo()}canUndo(){return this._mathfield?this._mathfield.canUndo():!1}canRedo(){return this._mathfield?this._mathfield.canRedo():!1}handleEvent(t){var n,i,o,c;Pl.state==="closed"&&((i=(n=this._mathfield)==null?void 0:n.menu)==null?void 0:i.state)==="closed"&&(t.type==="pointerdown"&&this.onPointerDown(),t.type==="focus"&&((o=this._mathfield)==null||o.focus()),t.type==="blur"&&((c=this._mathfield)==null||c.blur()))}connectedCallback(){var t,n,i,o;const c=window.getComputedStyle(this),f=this.shadowRoot,b=c.userSelect!=="none";if(b)f.host.addEventListener("pointerdown",this,!0);else{const $=f.querySelector("span");$.style.pointerEvents="none"}f.host.addEventListener("focus",this,!0),f.host.addEventListener("blur",this,!0),Du()||(this.hasAttribute("role")||this.setAttribute("role","math"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","math input field"),this.setAttribute("aria-multiline","false")),b&&!this.hasAttribute("contenteditable")&&this.setAttribute("contenteditable","true"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0");const C=f.querySelector("slot:not([name])");if(C)try{this._style=C.assignedElements().filter($=>$.tagName.toLowerCase()==="style").map($=>$.textContent).join("")}catch($){console.error($)}if(this._style){const $=document.createElement("style");$.textContent=this._style,f.appendChild($)}let k="";if(this.hasAttribute("value")?k=this.getAttribute("value"):k=(t=C==null?void 0:C.assignedNodes().map($=>$.nodeType===3?$.textContent:"").join("").trim())!=null?t:"",this._mathfield=new yv(f.querySelector(":host > span"),F(E({},(i=(n=Li.get(this))==null?void 0:n.options)!=null?i:gd(this)),{eventSink:this,value:k})),!Li.has(this)){this.upgradeProperty("disabled"),this.upgradeProperty("readonly");for(const $ of Object.keys(Qc.optionsAttributes))this.upgradeProperty(ql($))}if(!((o=this._mathfield)!=null&&o.model)){this._mathfield=null;return}if(Li.has(this)){const $=this._mathfield,ne=Li.get(this),Me=ne.menuItems;$.model.deferNotifications({content:!1,selection:!1},()=>{const We=ne.value;We!==void 0&&$.setValue(We),$.model.selection=ne.selection,Li.delete(this)}),Me&&(this.menuItems=Me)}window.queueMicrotask(()=>{this.isConnected&&this.dispatchEvent(new Event("mount",{cancelable:!1,bubbles:!0,composed:!0}))}),Nd()}disconnectedCallback(){var t,n;if(this.shadowRoot.host.removeEventListener("pointerdown",this,!0),!this._mathfield)return;window.queueMicrotask(()=>this.dispatchEvent(new Event("unmount",{cancelable:!1,bubbles:!0,composed:!0})));const i=Wc(this._mathfield.options,Object.keys(Qc.optionsAttributes).map(o=>ql(o)));Li.set(this,{value:this._mathfield.getValue(),selection:this._mathfield.model.selection,menuItems:(n=(t=this._mathfield.menu)==null?void 0:t.menuItems)!=null?n:void 0,options:i}),this._mathfield.dispose(),this._mathfield=null}upgradeProperty(t){if(this.hasOwnProperty(t)){const n=this[t];delete this[t],(t==="readonly"||t==="read-only")&&(t="readOnly"),this[t]=n}}attributeChangedCallback(t,n,i){if(n===i)return;const o=i!==null;switch(t){case"contenteditable":za(this._mathfield);break;case"disabled":this.disabled=o;break;case"read-only":case"readonly":this.readOnly=o;break;default:}}get readonly(){return this.hasAttribute("readonly")||this.hasAttribute("read-only")}set readonly(t){const n=!!t;n?(this.setAttribute("readonly",""),Du()?this._internals.ariaReadOnly="true":this.setAttribute("aria-readonly","true"),this.setAttribute("aria-readonly","true")):(Du()?this._internals.ariaReadOnly="false":this.removeAttribute("aria-readonly"),this.removeAttribute("readonly"),this.removeAttribute("read-only")),this._setOptions({readOnly:n})}get disabled(){return this.hasAttribute("disabled")}set disabled(t){var n;const i=!!t;i?this.setAttribute("disabled",""):this.removeAttribute("disabled"),Du()?this._internals.ariaDisabled=i?"true":"false":this.setAttribute("aria-disabled",i?"true":"false"),i&&((n=this._mathfield)!=null&&n.hasFocus)&&window.mathVirtualKeyboard.visible&&this._mathfield.executeCommand("hideVirtualKeyboard")}get value(){return this.getValue()}set value(t){this.setValue(t)}get defaultMode(){return this._getOption("defaultMode")}set defaultMode(t){this._setOptions({defaultMode:t})}get macros(){return this._getOption("macros")}set macros(t){this._setOptions({macros:t})}get registers(){const t=this;return new Proxy({},{get:(n,i)=>{if(typeof i=="string")return t._getOption("registers")[i]},set(n,i,o){return typeof i!="string"?!1:(t._setOptions({registers:F(E({},t._getOption("registers")),{[i]:o})}),!0)}})}set registers(t){this._setOptions({registers:t})}get colorMap(){return this._getOption("colorMap")}set colorMap(t){this._setOptions({colorMap:t})}get backgroundColorMap(){return this._getOption("backgroundColorMap")}set backgroundColorMap(t){this._setOptions({backgroundColorMap:t})}get letterShapeStyle(){return this._getOption("letterShapeStyle")}set letterShapeStyle(t){this._setOptions({letterShapeStyle:t})}get minFontScale(){return this._getOption("minFontScale")}set minFontScale(t){this._setOptions({minFontScale:t})}get smartMode(){return this._getOption("smartMode")}set smartMode(t){this._setOptions({smartMode:t})}get smartFence(){return this._getOption("smartFence")}set smartFence(t){this._setOptions({smartFence:t})}get smartSuperscript(){return this._getOption("smartSuperscript")}set smartSuperscript(t){this._setOptions({smartSuperscript:t})}get scriptDepth(){return this._getOption("scriptDepth")}set scriptDepth(t){this._setOptions({scriptDepth:t})}get removeExtraneousParentheses(){return this._getOption("removeExtraneousParentheses")}set removeExtraneousParentheses(t){this._setOptions({removeExtraneousParentheses:t})}get mathModeSpace(){return this._getOption("mathModeSpace")}set mathModeSpace(t){this._setOptions({mathModeSpace:t})}get placeholderSymbol(){return this._getOption("placeholderSymbol")}set placeholderSymbol(t){this._setOptions({placeholderSymbol:t})}get popoverPolicy(){return this._getOption("popoverPolicy")}set popoverPolicy(t){this._setOptions({popoverPolicy:t})}get environmentPopoverPolicy(){return this._getOption("environmentPopoverPolicy")}set environmentPopoverPolicy(t){this._setOptions({environmentPopoverPolicy:t})}get menuItems(){var t,n,i;return this._mathfield?(t=this._mathfield.menu._menuItems.map(o=>o.menuItem))!=null?t:[]:(i=(n=Li.get(this))==null?void 0:n.menuItems)!=null?i:[]}set menuItems(t){var n;if(this._mathfield){const i=(n=this._mathfield.element)==null?void 0:n.querySelector("[part=menu-toggle]");i&&(i.style.display=t.length===0?"none":""),this._mathfield.menu.menuItems=t}Li.has(this)?Li.set(this,F(E({},Li.get(this)),{menuItems:t})):Li.set(this,{value:void 0,selection:{ranges:[[0,0]]},options:gd(this),menuItems:t})}get mathVirtualKeyboardPolicy(){return this._getOption("mathVirtualKeyboardPolicy")}set mathVirtualKeyboardPolicy(t){this._setOptions({mathVirtualKeyboardPolicy:t})}get inlineShortcuts(){return this._getOption("inlineShortcuts")}set inlineShortcuts(t){this._setOptions({inlineShortcuts:t})}get inlineShortcutTimeout(){return this._getOption("inlineShortcutTimeout")}set inlineShortcutTimeout(t){this._setOptions({inlineShortcutTimeout:t})}get keybindings(){return this._getOption("keybindings")}set keybindings(t){this._setOptions({keybindings:t})}get onInlineShortcut(){return this._getOption("onInlineShortcut")}set onInlineShortcut(t){this._setOptions({onInlineShortcut:t})}get onScrollIntoView(){return this._getOption("onScrollIntoView")}set onScrollIntoView(t){this._setOptions({onScrollIntoView:t})}get onExport(){return this._getOption("onExport")}set onExport(t){this._setOptions({onExport:t})}get readOnly(){return this._getOption("readOnly")}set readOnly(t){this._setOptions({readOnly:t})}get isSelectionEditable(){var t,n;return(n=(t=this._mathfield)==null?void 0:t.isSelectionEditable)!=null?n:!1}setPromptState(t,n,i){var o;(o=this._mathfield)==null||o.setPromptState(t,n,i)}getPromptState(t){var n,i;return(i=(n=this._mathfield)==null?void 0:n.getPromptState(t))!=null?i:[void 0,!0]}get virtualKeyboardTargetOrigin(){return this._getOption("virtualKeyboardTargetOrigin")}set virtualKeyboardTargetOrigin(t){this._setOptions({virtualKeyboardTargetOrigin:t})}get selection(){return this._mathfield?this._mathfield.model.selection:Li.has(this)?Li.get(this).selection:{ranges:[[0,0]],direction:"forward"}}set selection(t){if(typeof t=="number"&&(t={ranges:[[t,t]]}),this._mathfield){this._mathfield.model.selection=t,za(this._mathfield);return}if(Li.has(this)){Li.set(this,F(E({},Li.get(this)),{selection:t}));return}Li.set(this,{value:void 0,selection:t,options:gd(this),menuItems:void 0})}get selectionIsCollapsed(){const t=this.selection;return t.ranges.length===1&&t.ranges[0][0]===t.ranges[0][1]}get position(){return this._mathfield?this._mathfield.model.position:Li.has(this)?Li.get(this).selection.ranges[0][0]:0}set position(t){if(this._mathfield&&(this._mathfield.model.position=t,za(this._mathfield)),Li.has(this)){Li.set(this,F(E({},Li.get(this)),{selection:{ranges:[[t,t]]}}));return}Li.set(this,{value:void 0,selection:{ranges:[[t,t]]},options:gd(this),menuItems:void 0})}getOffsetDepth(t){var n,i;return this._mathfield?((i=(n=this._mathfield.model.at(t))==null?void 0:n.treeDepth)!=null?i:2)-2:0}get lastOffset(){var t,n;return(n=(t=this._mathfield)==null?void 0:t.model.lastOffset)!=null?n:-1}};zo.version="0.98.5",zo._fontsDirectory="./fonts",zo._soundsDirectory="./sounds",zo.keypressVibration=!0,zo._keypressSound={spacebar:"keypress-spacebar.wav",return:"keypress-return.wav",delete:"keypress-delete.wav",default:"keypress-standard.wav"},zo._plonkSound="plonk.wav",zo.audioBuffers={},zo.createHTML=e=>e,zo._speechEngineRate="100%",zo._speechEngineVoice="Joanna",zo._textToSpeechMarkup="",zo._textToSpeechRules="mathlive",zo._textToSpeechRulesOptions={},zo.speakHook=cv,zo.readAloudHook=bv,zo._decimalSeparator=".",zo.fractionNavigationOrder="numerator-denominator",zo._isFunction=e=>{var t,n;const i=window.MathfieldElement.computeEngine;return(n=(t=i==null?void 0:i.parse(e).domain)==null?void 0:t.isFunction)!=null?n:!1};var md=zo;function ql(e){return e.replace(/[^a-zA-Z\d]+(.)/g,(t,n)=>n.toUpperCase())}function gd(e){const t={readOnly:!1},n=md.optionsAttributes;return Object.keys(n).forEach(i=>{if(e.hasAttribute(i)){const o=e.getAttribute(i);i==="placeholder"?t.contentPlaceholder=o!=null?o:"":n[i]==="boolean"?t[ql(i)]=!0:n[i]==="on/off"?o==="on"?t[ql(i)]=!0:o==="off"?t[ql(i)]=!1:t[ql(i)]=void 0:n[i]==="number"?t[ql(i)]=Number.parseFloat(o!=null?o:"0"):t[ql(i)]=o}}),t}function Du(){return!(!("ElementInternals"in window)||!HTMLElement.prototype.attachInternals||!("role"in window.ElementInternals.prototype))}var w0=md,M0,k0,E0,_0;if(ke()&&!((M0=window.customElements)!=null&&M0.get("math-field"))){(E0=window[k0=Symbol.for("io.cortexjs.mathlive")])!=null||(window[k0]={});const e=window[Symbol.for("io.cortexjs.mathlive")];e.version="0.98.5",window.MathfieldElement=md,(_0=window.customElements)==null||_0.define("math-field",md)}function Sv(e,t,n){let i=n,o=0;const c=e.length;for(;i<t.length;){const f=t[i];if(o<=0&&t.slice(i,i+c)===e)return i;f==="\\"?i++:f==="{"?o++:f==="}"&&o--,i++}return-1}function lf(e,t,n,i,o="latex"){const c=[];for(const f of e)if(f.type==="text"){const b=f.data;let C=!0,k=0,$;$=b.indexOf(t),$!==-1&&(k=$,k>0&&c.push({type:"text",data:b.slice(0,k)}),C=!1);let ne=!1;for(;!ne;){if(C){if($=b.indexOf(t,k),$===-1){ne=!0;break}k!==$&&c.push({type:"text",data:b.slice(k,$)}),k=$}else{if($=Sv(n,b,k+t.length),$===-1){ne=!0;break}let Me=b.slice(k+t.length,$);o==="ascii-math"&&([,Me]=Rc(Me,{format:"ascii-math"})),c.push({type:"math",data:Me,rawData:b.slice(k,$+n.length),mathstyle:i}),k=$+n.length}C=!C}k<b.length&&c.push({type:"text",data:b.slice(k)})}else c.push(f);return c}function L0(e,t,n){let i=[{type:"text",data:e}];return t!=null&&t.inline&&t.inline.forEach(([o,c])=>{i=lf(i,o,c,"textstyle")}),t!=null&&t.display&&t.display.forEach(([o,c])=>{i=lf(i,o,c,"displaystyle")}),n!=null&&n.inline&&n.inline.forEach(([o,c])=>{i=lf(i,o,c,"textstyle","ascii-math")}),n!=null&&n.display&&n.display.forEach(([o,c])=>{i=lf(i,o,c,"displaystyle","ascii-math")}),i}function Cv(e,t){const n=document.createElement("span");n.setAttribute("translate","no");try{const i="<math xmlns='http://www.w3.org/1998/Math/MathML'>"+t.renderToMathML(e)+"</math>";n.innerHTML=window.MathfieldElement.createHTML(i)}catch(i){console.error(`MathLive 0.98.5: Could not convert "${e}"' to MathML with ${i}`),n.textContent=e}return n.className="ML__sr-only",n}function wv(e,t,n,i){try{const o=t.renderToMarkup(e,{mathstyle:n,format:"html"}),c=document.createElement("span");return c.dataset.latex=e,c.style.display=n==="displaystyle"?"flex":"inline-flex",c.setAttribute("aria-hidden","true"),c.setAttribute("translate","no"),c.innerHTML=window.MathfieldElement.createHTML(o),c}catch(o){if(console.error("Could not parse'"+e+"' with ",o),i)return document.createTextNode(e)}return null}function $u(e,t,n,i){var o;const c=wv(e,n,t||"textstyle",i),f=(o=n.renderAccessibleContent)!=null?o:"";if(c&&/\b(mathml|speakable-text)\b/i.test(f)){const b=document.createElement("span");if(/\bmathml\b/i.test(f)&&n.renderToMathML&&b.append(Cv(e,n)),/\bspeakable-text\b/i.test(f)&&n.renderToSpeakableText){const C=document.createElement("span");C.setAttribute("translate","no");const k=n.renderToSpeakableText(e);C.innerHTML=window.MathfieldElement.createHTML(k),C.className="ML__sr-only",b.append(C)}return b.append(c),b}return c}function Mv(e,t){var n,i,o;let c=null;if((n=t.TeX)!=null&&n.processEnvironments&&/^\s*\\begin/.test(e)){c=document.createDocumentFragment();const f=$u(e,"",t,!0);f&&c.appendChild(f)}else{if(!e.trim())return null;const f=L0(e,(i=t.TeX)==null?void 0:i.delimiters,(o=t.asciiMath)==null?void 0:o.delimiters);if(f.length===1&&f[0].type==="text")return null;c=document.createDocumentFragment();for(const b of f)if(b.type==="text")c.appendChild(document.createTextNode(b.data));else{const C=$u(b.data,b.mathstyle==="textstyle"?"textstyle":"displaystyle",t,!0);C&&c.appendChild(C)}}return c}function I0(e,t){var n,i,o,c,f,b,C,k,$,ne,Me,We,Je,Ot,bn,Dt;if(e.childNodes.length===1&&e.childNodes[0].nodeType===3){const en=(n=e.childNodes[0].textContent)!=null?n:"";if((i=t.TeX)!=null&&i.processEnvironments&&/^\s*\\begin/.test(en)){e.textContent="";const sn=$u(en,"",t,!0);sn&&e.append(sn);return}const Ln=L0(en,(o=t.TeX)==null?void 0:o.delimiters,(c=t.asciiMath)==null?void 0:c.delimiters);if(Ln.length===1&&Ln[0].type==="math"){e.textContent="";const sn=$u(Ln[0].data,Ln[0].mathstyle==="textstyle"?"textstyle":"displaystyle",t,!0);sn&&e.append(sn);return}if(Ln.length===1&&Ln[0].type==="text")return}for(let en=e.childNodes.length-1;en>=0;en--){const Ln=e.childNodes[en];if(Ln.nodeType===3){const sn=Mv((f=Ln.textContent)!=null?f:"",t);sn&&(en+=sn.childNodes.length-1,Ln.replaceWith(sn))}else if(Ln.nodeType===1){const sn=Ln,hr=Ln.nodeName.toLowerCase();if(hr==="script"){const Lr=Ln;let Mr;if((b=t.processScriptTypePattern)!=null&&b.test(Lr.type))Mr=(C=Lr.textContent)!=null?C:"";else if((k=t.processMathJSONScriptTypePattern)!=null&&k.test(Lr.type))try{Mr=(ne=t.serializeToLatex)==null?void 0:ne.call(t,JSON.parse(($=Lr.textContent)!=null?$:""))}catch(Ci){console.error(Ci)}if(Mr){let Ci="textstyle";for(const Bn of Lr.type.split(";")){const[Xs,zl]=Bn.toLowerCase().split("=");Xs.trim()==="mode"&&(Ci=zl.trim()==="display"?"displaystyle":"textstyle")}const qi=$u(Mr,Ci,t,!0);qi&&Lr.parentNode.replaceChild(qi,Lr)}}else if(((We=(Me=t.processClassPattern)==null?void 0:Me.test(sn.className))!=null?We:!1)||!((Ot=(Je=t.skipTags)==null?void 0:Je.includes(hr))!=null&&Ot||(Dt=(bn=t.ignoreClassPattern)==null?void 0:bn.test(sn.className))!=null&&Dt))if(e.childNodes.length===1&&e.childNodes[0].nodeType===3){const Mr=e.textContent;e.textContent="";const Ci=$u(Mr!=null?Mr:"","displaystyle",t,!0);Ci&&e.append(Ci)}else I0(sn,t)}}}var kv={skipTags:["math-field","noscript","style","textarea","pre","code","annotation","annotation-xml"],processScriptType:"math/tex",processMathJSONScriptType:"math/json",ignoreClass:"tex2jax_ignore",processClass:"tex2jax_process",renderAccessibleContent:"mathml",asciiMath:{delimiters:{inline:[["`","`"]]}},TeX:{processEnvironments:!0,delimiters:{inline:[["\\(","\\)"]],display:[["$$","$$"],["\\[","\\]"]]}}};function Ev(e,t){var n,i,o,c;try{const f=E(E({},kv),t);f.ignoreClassPattern=new RegExp((n=f.ignoreClass)!=null?n:""),f.processClassPattern=new RegExp((i=f.processClass)!=null?i:""),f.processScriptTypePattern=new RegExp((o=f.processScriptType)!=null?o:""),f.processMathJSONScriptTypePattern=new RegExp((c=f.processMathJSONScriptType)!=null?c:""),Nd(),Ds("core"),I0(e,f)}catch(f){f instanceof Error?console.error("renderMathInElement(): "+f.message):console.error("renderMathInElement(): Could not render math for element",e)}}function _v(e,t){const n=xc.singleton;return n?(n.show(),id(),n.currentLayer=t,n.render(),n.focus(),!0):!1}function Lv(){const e=window.mathVirtualKeyboard;return e.visible?e.hide({animate:!0}):e.show({animate:!0}),!1}$s({switchKeyboardLayer:_v,toggleVirtualKeyboard:Lv,hideVirtualKeyboard:()=>(window.mathVirtualKeyboard.hide({animate:!0}),!1),showVirtualKeyboard:()=>(window.mathVirtualKeyboard.show({animate:!0}),!1)},{target:"virtual-keyboard"});function wc(){var e,t;return(t=globalThis[e=Symbol.for("io.cortexjs.mathlive")])!=null||(globalThis[e]={}),globalThis[Symbol.for("io.cortexjs.mathlive")]}function Bv(){return console.warn("%cMathLive 0.98.5: %cmakeSharedVirtualKeyboard() is deprecated. \n Use `window.mathVirtualKeyboard` to access the virtual keyboard instance.\n See https://cortexjs.io/mathlive/changelog/ for details.","color:#12b; font-size: 1.1rem","color:#db1111; font-size: 1.1rem"),window.mathVirtualKeyboard}function Nv(e){Tv(document.body,e)}function Iv(e){if(typeof e=="string"){const t=document.getElementById(e);if(t===null)throw new Error(`The element with ID "${e}" could not be found.`);return t}return typeof e=="string"?null:e}function Tv(e,t){var n,i,o,c;const f=Iv(e);if(!f)return;const b=t!=null?t:{};(n=b.renderToMarkup)!=null||(b.renderToMarkup=Lo),(i=b.renderToMathML)!=null||(b.renderToMathML=Hg),(o=b.renderToSpeakableText)!=null||(b.renderToSpeakableText=Zg),(c=b.serializeToLatex)!=null||(b.serializeToLatex=Wg),Ev(f,b)}var Rv={mathlive:"0.98.5"}},16722:function(yn,dt,m){"use strict";m.d(dt,{Z:function(){return E}});const K=F=>typeof F=="object"&&F!=null&&F.nodeType===1,j=(F,V)=>(!V||F!=="hidden")&&F!=="visible"&&F!=="clip",A=(F,V)=>{if(F.clientHeight<F.scrollHeight||F.clientWidth<F.scrollWidth){const Ie=getComputedStyle(F,null);return j(Ie.overflowY,V)||j(Ie.overflowX,V)||(G=>{const le=(ke=>{if(!ke.ownerDocument||!ke.ownerDocument.defaultView)return null;try{return ke.ownerDocument.defaultView.frameElement}catch(ue){return null}})(G);return!!le&&(le.clientHeight<G.scrollHeight||le.clientWidth<G.scrollWidth)})(F)}return!1},xe=(F,V,Ie,G,le,ke,ue,de)=>ke<F&&ue>V||ke>F&&ue<V?0:ke<=F&&de<=Ie||ue>=V&&de>=Ie?ke-F-G:ue>V&&de<Ie||ke<F&&de>Ie?ue-V+le:0,R=F=>{const V=F.parentElement;return V==null?F.getRootNode().host||null:V},N=(F,V)=>{var Ie,G,le,ke;if(typeof document=="undefined")return[];const{scrollMode:ue,block:de,inline:_e,boundary:Pe,skipOverflowHiddenElements:Ue}=V,Ce=typeof Pe=="function"?Pe:je=>je!==Pe;if(!K(F))throw new TypeError("Invalid target");const pe=document.scrollingElement||document.documentElement,q=[];let _=F;for(;K(_)&&Ce(_);){if(_=R(_),_===pe){q.push(_);break}_!=null&&_===document.body&&A(_)&&!A(document.documentElement)||_!=null&&A(_,Ue)&&q.push(_)}const ie=(G=(Ie=window.visualViewport)==null?void 0:Ie.width)!=null?G:innerWidth,ae=(ke=(le=window.visualViewport)==null?void 0:le.height)!=null?ke:innerHeight,{scrollX:Se,scrollY:se}=window,{height:be,width:D,top:Le,right:z,bottom:we,left:ge}=F.getBoundingClientRect(),{top:Te,right:Fe,bottom:Re,left:X}=(je=>{const Be=window.getComputedStyle(je);return{top:parseFloat(Be.scrollMarginTop)||0,right:parseFloat(Be.scrollMarginRight)||0,bottom:parseFloat(Be.scrollMarginBottom)||0,left:parseFloat(Be.scrollMarginLeft)||0}})(F);let w=de==="start"||de==="nearest"?Le-Te:de==="end"?we+Re:Le+be/2-Te+Re,ve=_e==="center"?ge+D/2-X+Fe:_e==="end"?z+Fe:ge-X;const Qe=[];for(let je=0;je<q.length;je++){const Be=q[je],{height:Oe,width:lt,top:$t,right:vt,bottom:Tt,left:wt}=Be.getBoundingClientRect();if(ue==="if-needed"&&Le>=0&&ge>=0&&we<=ae&&z<=ie&&(Be===pe&&!A(Be)||Le>=$t&&we<=Tt&&ge>=wt&&z<=vt))return Qe;const pt=getComputedStyle(Be),at=parseInt(pt.borderLeftWidth,10),S=parseInt(pt.borderTopWidth,10),p=parseInt(pt.borderRightWidth,10),h=parseInt(pt.borderBottomWidth,10);let g=0,y=0;const d="offsetWidth"in Be?Be.offsetWidth-Be.clientWidth-at-p:0,L="offsetHeight"in Be?Be.offsetHeight-Be.clientHeight-S-h:0,fe="offsetWidth"in Be?Be.offsetWidth===0?0:lt/Be.offsetWidth:0,O="offsetHeight"in Be?Be.offsetHeight===0?0:Oe/Be.offsetHeight:0;if(pe===Be)g=de==="start"?w:de==="end"?w-ae:de==="nearest"?xe(se,se+ae,ae,S,h,se+w,se+w+be,be):w-ae/2,y=_e==="start"?ve:_e==="center"?ve-ie/2:_e==="end"?ve-ie:xe(Se,Se+ie,ie,at,p,Se+ve,Se+ve+D,D),g=Math.max(0,g+se),y=Math.max(0,y+Se);else{g=de==="start"?w-$t-S:de==="end"?w-Tt+h+L:de==="nearest"?xe($t,Tt,Oe,S,h+L,w,w+be,be):w-($t+Oe/2)+L/2,y=_e==="start"?ve-wt-at:_e==="center"?ve-(wt+lt/2)+d/2:_e==="end"?ve-vt+p+d:xe(wt,vt,lt,at,p+d,ve,ve+D,D);const{scrollLeft:I,scrollTop:he}=Be;g=O===0?0:Math.max(0,Math.min(he+g/O,Be.scrollHeight-Oe/O+L)),y=fe===0?0:Math.max(0,Math.min(I+y/fe,Be.scrollWidth-lt/fe+d)),w+=he-g,ve+=I-y}Qe.push({el:Be,top:g,left:y})}return Qe},x=F=>F===!1?{block:"end",inline:"nearest"}:(V=>V===Object(V)&&Object.keys(V).length!==0)(F)?F:{block:"start",inline:"nearest"};function E(F,V){if(!F.isConnected||!(le=>{let ke=le;for(;ke&&ke.parentNode;){if(ke.parentNode===document)return!0;ke=ke.parentNode instanceof ShadowRoot?ke.parentNode.host:ke.parentNode}return!1})(F))return;const Ie=(le=>{const ke=window.getComputedStyle(le);return{top:parseFloat(ke.scrollMarginTop)||0,right:parseFloat(ke.scrollMarginRight)||0,bottom:parseFloat(ke.scrollMarginBottom)||0,left:parseFloat(ke.scrollMarginLeft)||0}})(F);if((le=>typeof le=="object"&&typeof le.behavior=="function")(V))return V.behavior(N(F,V));const G=typeof V=="boolean"||V==null?void 0:V.behavior;for(const{el:le,top:ke,left:ue}of N(F,x(V))){const de=ke-Ie.top+Ie.bottom,_e=ue-Ie.left+Ie.right;le.scroll({top:de,left:_e,behavior:G})}}}}]);
|
|
|
}()); |