You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Shixuns__Detail__Reposit...

90 lines
352 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(self.webpackChunk=self.webpackChunk||[]).push([[5230],{40001:function(rn,De,f){"use strict";f.d(De,{Z:function(){return ye}});var T=f(54476),w=f(59301),x={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"},W=x,v=f(7657),A=function(y,Re){return w.createElement(v.Z,(0,T.Z)({},y,{ref:Re,icon:W}))},N=w.forwardRef(A),ye=N},84105:function(rn,De,f){"use strict";f.d(De,{Z:function(){return ye}});var T=f(54476),w=f(59301),x={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"},W=x,v=f(7657),A=function(y,Re){return w.createElement(v.Z,(0,T.Z)({},y,{ref:Re,icon:W}))},N=w.forwardRef(A),ye=N},73331:function(rn,De,f){"use strict";f.d(De,{Z:function(){return ye}});var T=f(54476),w=f(59301),x={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"},W=x,v=f(7657),A=function(y,Re){return w.createElement(v.Z,(0,T.Z)({},y,{ref:Re,icon:W}))},N=w.forwardRef(A),ye=N},15277:function(rn,De,f){"use strict";f.d(De,{Z:function(){return ye}});var T=f(54476),w=f(59301),x={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"},W=x,v=f(7657),A=function(y,Re){return w.createElement(v.Z,(0,T.Z)({},y,{ref:Re,icon:W}))},N=w.forwardRef(A),ye=N},61485:function(rn,De,f){"use strict";f.d(De,{Z:function(){return ye}});var T=f(54476),w=f(59301),x={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"},W=x,v=f(7657),A=function(y,Re){return w.createElement(v.Z,(0,T.Z)({},y,{ref:Re,icon:W}))},N=w.forwardRef(A),ye=N},47472:function(rn,De,f){"use strict";f.d(De,{Z:function(){return ye}});var T=f(54476),w=f(59301),x={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"},W=x,v=f(7657),A=function(y,Re){return w.createElement(v.Z,(0,T.Z)({},y,{ref:Re,icon:W}))},N=w.forwardRef(A),ye=N},6303:function(){"use strict"},87671:function(){"use strict"},13248:function(rn,De,f){"use strict";f.d(De,{t:function(){return H}});var T=f(59301),w=f(3113),x={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},W=f(92310),v=f.n(W),A=Object.defineProperty,N=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,y=(me,Te,q)=>Te in me?A(me,Te,{enumerable:!0,configurable:!0,writable:!0,value:q}):me[Te]=q,Re=(me,Te)=>{for(var q in Te||(Te={}))ye.call(Te,q)&&y(me,q,Te[q]);if(N)for(var q of N(Te))oe.call(Te,q)&&y(me,q,Te[q]);return me};const H=({cancelText:me="\u53D6\u6D88",okText:Te="\u786E\u5B9A",loading:q=!1,hasOkBtn:Je=!0,hasCancelBtn:ot=!0,okButtonProps:Ct={},onCancel:Ft=()=>{},onOk:re=()=>{},className:Q=""})=>T.createElement("div",{className:v()(x.buttonFixed,Q)},T.createElement("div",{className:x.buttonWrap},ot&&T.createElement(w.ZP,{size:"middle",className:`${x.button} mr20`,onClick:Ft},me),Je&&T.createElement(w.ZP,Re({size:"middle",type:"primary",className:`${x.button} mr20`,loading:q,onClick:re},Ct),Te)))},45923:function(rn,De,f){"use strict";f.d(De,{h:function(){return Q}});var T=f(59301),w=f(57809),x=f(78241),W=f(3113),v=f(89780),A=f.n(v),N=f(6303),ye=f(87671),oe=Object.defineProperty,y=Object.defineProperties,Re=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,me=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,q=(S,c,b)=>c in S?oe(S,c,{enumerable:!0,configurable:!0,writable:!0,value:b}):S[c]=b,Je=(S,c)=>{for(var b in c||(c={}))me.call(c,b)&&q(S,b,c[b]);if(H)for(var b of H(c))Te.call(c,b)&&q(S,b,c[b]);return S},ot=(S,c)=>y(S,Re(c));const Ct=w.default.Option,Ft={labelCol:{span:4},wrapperCol:{span:20}},re={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};De.Z=({callback:S,onCancel:c})=>{const[b,F]=(0,T.useState)("python");function X(Oe){F(re[Oe][1])}function P(Oe){S(Oe)}return T.createElement(x.default,ot(Je({},Ft),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:P,style:{width:500}}),T.createElement(x.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},T.createElement(w.default,{getPopupContainer:Oe=>Oe.parentNode,onChange:X},Object.keys(re).map(Oe=>T.createElement(Ct,{key:Oe,value:Oe},re[Oe][0])))),T.createElement(x.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},T.createElement(Q,{mode:b})),T.createElement("div",{className:"flex-container flex-end"},T.createElement(W.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),T.createElement(W.ZP,{type:"ghost",onClick:c},"\u53D6\u6D88")))};function Q({value:S,onChange:c,mode:b,options:F={}}){const X=(0,T.useRef)(),[P,Oe]=(0,T.useState)();return(0,T.useEffect)(()=>{if(P){let je=function(ze){const Ie=ze.getValue();c&&c(Ie)};return P.on("change",je),()=>{P.off("change",je)}}},[P,c]),(0,T.useEffect)(()=>{P&&P.setOption("mode",b)},[P,b]),(0,T.useEffect)(()=>{P&&(S!==P.getValue()||S==="")&&setTimeout(()=>{P.setValue(S||"")},300)},[P,S]),(0,T.useEffect)(()=>{if(X.current&&!P){const je=A().fromTextArea(X.current,Je({mode:b,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},F));Oe(je)}},[X.current,P]),T.createElement("div",{className:"my-codemirror-container"},T.createElement("textarea",{ref:X}))}},40568:function(rn,De,f){"use strict";f.r(De),f.d(De,{default:function(){return se}});var T=f(81081),w=f(59301),x=f(75790),W=f(78241),v=f(92832),A=f(45923),N=f(13248),ye={bg:"bg___RM4en",wrap:"wrap___ne3nd",title:"title___Nr8TZ",path:"path___mVozd",colorBlue:"colorBlue___jBwMu",width240:"width240___XDhtB"},oe=Object.defineProperty,y=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,me=(E,I,M)=>I in E?oe(E,I,{enumerable:!0,configurable:!0,writable:!0,value:M}):E[I]=M,Te=(E,I)=>{for(var M in I||(I={}))Re.call(I,M)&&me(E,M,I[M]);if(y)for(var M of y(I))H.call(I,M)&&me(E,M,I[M]);return E},q=(E,I)=>{var M={};for(var $ in E)Re.call(E,$)&&I.indexOf($)<0&&(M[$]=E[$]);if(E!=null&&y)for(var $ of y(E))I.indexOf($)<0&&H.call(E,$)&&(M[$]=E[$]);return M},Je=(E,I,M)=>new Promise(($,J)=>{var Me=z=>{try{xe(M.next(z))}catch(ue){J(ue)}},k=z=>{try{xe(M.throw(z))}catch(ue){J(ue)}},xe=z=>z.done?$(z.value):Promise.resolve(z.value).then(Me,k);xe((M=M.apply(E,I)).next())});const ot=E=>{var I=E,{shixunsDetail:M,globalSetting:$,loading:J,user:Me,dispatch:k}=I,xe=q(I,["shixunsDetail","globalSetting","loading","user","dispatch"]);const z=(0,x.useLocation)(),[ue,Ce]=(0,w.useState)({}),be=(0,w.useRef)(),pe=(0,w.useRef)(),[G]=W.default.useForm(),[ge,Pe]=(0,w.useState)("");(0,w.useEffect)(()=>(k({type:"globalSetting/footerToggle",payload:!1}),()=>{k({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,w.useEffect)(()=>{const _e=sessionStorage.getItem("pathArray");if(_e){const Ee=_e.split(",").join("/"),it=Ee.indexOf("/")===0?Ee.substr(1):Ee;Pe(it)}},[]),(0,w.useEffect)(()=>{var _e,Ee,it,st;pe.current=(Ee=(_e=z.pathname)==null?void 0:_e.split("/"))==null?void 0:Ee[2],be.current=((st=(it=z.pathname)==null?void 0:it.split("/"))==null?void 0:st[3])==="repository"},[]);const tt=(..._e)=>Je(void 0,[..._e],function*(Ee={}){if(yield k({type:"shixunsDetail/addRepositoryFile",payload:{id:pe.current,message:Ee.commitMessage,content:Ee.codeMirror,path:`${ge?`${ge}/`:""}${Ee.path||""}`,secret_repository:be.current?void 0:!0}})){const st=be.current?`/shixuns/${pe.current}/repository${ge?`/master/shixun_show/${ge}`:""}`:`/shixuns/${pe.current}/secret_repository`;x.history.replace(st)}}),at=()=>{var _e,Ee;x.history.push(`/shixuns/${pe.current}/${(Ee=(_e=z.pathname)==null?void 0:_e.split("/"))==null?void 0:Ee[3]}${ge?`/master/shixun_show/${ge}`:""}`)};return w.createElement("section",{className:ye.bg},w.createElement("div",{className:ye.wrap},w.createElement("div",{className:ye.title},"\u65B0\u5EFA\u6587\u4EF6"),w.createElement(W.default,{className:"mt10",form:G,scrollToFirstError:!0,layout:"vertical",onFinish:tt,onValuesChange:()=>Ce(Te({},G.getFieldsValue()))},w.createElement(W.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},w.createElement(W.default.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}],noStyle:!0},w.createElement("span",null,w.createElement("span",{className:"mr5"},ge?`${ge}/`:""),w.createElement(v.default,{className:ye.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),w.createElement("span",{className:"ml5"},"\u63D0\u793A\uFF1A1.\u8F93\u5165\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u4E00\u4E2A\u65B0\u6587\u4EF6\uFF1B2.\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u65B0\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u65B0\u6587\u4EF6\u5939\u548C\u65B0\u6587\u4EF6\u3002\uFF08\u5982\uFF1Astep1/HelloWorld.java\uFF09")),w.createElement(W.default.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},w.createElement(v.default,{placeholder:"\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406"})),w.createElement("div",{className:"mt10 mb20"},w.createElement(W.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},w.createElement(A.h,{options:{modal:"javascript",lineNumbers:!0,theme:"railscasts",indentUnit:4,matchBrackets:!0,autoRefresh:!0,smartIndent:!0,extraKeys:{"Alt-/":"autocomplete"},autofocus:!0,styleActiveLine:!0,lint:!0,linkurl:"",gutters:["CodeMirror-linenumbers","breakpoints","CodeMirror-lint-markers"]}}))),w.createElement(W.default.Item,{noStyle:!0},w.createElement(N.t,{okButtonProps:{htmlType:"submit"},onCancel:at})))))};var Ct=(0,x.connect)(({shixunsDetail:E,loading:I,globalSetting:M,user:$})=>({shixunsDetail:E,globalSetting:M,user:$,loading:I.models.index}))(ot),Ft={bg:"bg___hW0a5",wrap:"wrap___qsjmY",title:"title___TYQ3w",path:"path___J3ICf",colorBlue:"colorBlue___r1F5X",width240:"width240___Vbbdg"},re=Object.defineProperty,Q=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,b=(E,I,M)=>I in E?re(E,I,{enumerable:!0,configurable:!0,writable:!0,value:M}):E[I]=M,F=(E,I)=>{for(var M in I||(I={}))S.call(I,M)&&b(E,M,I[M]);if(Q)for(var M of Q(I))c.call(I,M)&&b(E,M,I[M]);return E},X=(E,I)=>{var M={};for(var $ in E)S.call(E,$)&&I.indexOf($)<0&&(M[$]=E[$]);if(E!=null&&Q)for(var $ of Q(E))I.indexOf($)<0&&c.call(E,$)&&(M[$]=E[$]);return M},P=(E,I,M)=>new Promise(($,J)=>{var Me=z=>{try{xe(M.next(z))}catch(ue){J(ue)}},k=z=>{try{xe(M.throw(z))}catch(ue){J(ue)}},xe=z=>z.done?$(z.value):Promise.resolve(z.value).then(Me,k);xe((M=M.apply(E,I)).next())});const Oe=E=>{var I=E,{shixunsDetail:M,globalSetting:$,loading:J,user:Me,dispatch:k}=I,xe=X(I,["shixunsDetail","globalSetting","loading","user","dispatch"]);const z=(0,x.useLocation)(),[ue,Ce]=(0,w.useState)({}),be=(0,w.useRef)(),pe=(0,w.useRef)(),[G]=W.default.useForm(),[ge,Pe]=(0,w.useState)("");(0,w.useEffect)(()=>(k({type:"globalSetting/footerToggle",payload:!1}),()=>{k({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,w.useEffect)(()=>{const _e=sessionStorage.getItem("pathArray");if(_e){const Ee=_e.split(",").join("/"),it=Ee.indexOf("/")===0?Ee.substr(1):Ee;Pe(it)}},[]),(0,w.useEffect)(()=>{var _e,Ee,it,st;pe.current=(Ee=(_e=z.pathname)==null?void 0:_e.split("/"))==null?void 0:Ee[2],be.current=((st=(it=z.pathname)==null?void 0:it.split("/"))==null?void 0:st[3])==="repository"},[]);const tt=(..._e)=>P(void 0,[..._e],function*(Ee={}){if(yield k({type:"shixunsDetail/addRepositoryFile",payload:{id:pe.current,message:Ee.commitMessage,content:Ee.codeMirror,path:`${ge?`${ge}/`:""}${Ee.path||""}`,secret_repository:be.current?void 0:!0}})){const st=be.current?`/shixuns/${pe.current}/repository${ge?`/master/shixun_show/${ge}`:""}`:`/shixuns/${pe.current}/secret_repository`;x.history.replace(st)}}),at=()=>{var _e,Ee;x.history.push(`/shixuns/${pe.current}/${(Ee=(_e=z.pathname)==null?void 0:_e.split("/"))==null?void 0:Ee[3]}${ge?`/master/shixun_show/${ge}`:""}`)};return w.createElement("section",{className:Ft.bg},w.createElement("div",{className:Ft.wrap},w.createElement("div",{className:Ft.title},"\u65B0\u5EFA\u6587\u4EF6"),w.createElement(W.default,{className:"mt10",form:G,scrollToFirstError:!0,layout:"vertical",onFinish:tt,onValuesChange:()=>Ce(F({},G.getFieldsValue()))},w.createElement(W.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},w.createElement(W.default.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}],noStyle:!0},w.createElement("span",null,w.createElement("span",{className:"mr5"},ge?`${ge}/`:""),w.createElement(v.default,{className:Ft.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),w.createElement("span",{className:"ml5"},"\u63D0\u793A\uFF1A1.\u8F93\u5165\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u4E00\u4E2A\u65B0\u6587\u4EF6\uFF1B2.\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u65B0\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u65B0\u6587\u4EF6\u5939\u548C\u65B0\u6587\u4EF6\u3002\uFF08\u5982\uFF1Astep1/HelloWorld.java\uFF09")),w.createElement(W.default.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},w.createElement(v.default,{placeholder:"\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406"})),w.createElement("div",{className:"mt10 mb20"},w.createElement(W.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},w.createElement(A.h,{options:{modal:"javascript",lineNumbers:!0,theme:"railscasts",indentUnit:4,matchBrackets:!0,autoRefresh:!0,smartIndent:!0,extraKeys:{"Alt-/":"autocomplete"},autofocus:!0,styleActiveLine:!0,lint:!0,linkurl:"",gutters:["CodeMirror-linenumbers","breakpoints","CodeMirror-lint-markers"]}}))),w.createElement(W.default.Item,{noStyle:!0},w.createElement(N.t,{okButtonProps:{htmlType:"submit"},onCancel:at})))))};var je=(0,x.connect)(({shixunsDetail:E,loading:I,globalSetting:M,user:$})=>({shixunsDetail:E,globalSetting:M,user:$,loading:I.models.index}))(Oe),ze={bg:"bg___mZRyL",wrap:"wrap___PZp9Q",title:"title___k98J0",path:"path___rTXhN",colorBlue:"colorBlue___Jn7qR",width240:"width240___RvfYr"},Ie=Object.defineProperty,bt=Object.getOwnPropertySymbols,Xe=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,fe=(E,I,M)=>I in E?Ie(E,I,{enumerable:!0,configurable:!0,writable:!0,value:M}):E[I]=M,Y=(E,I)=>{for(var M in I||(I={}))Xe.call(I,M)&&fe(E,M,I[M]);if(bt)for(var M of bt(I))Ye.call(I,M)&&fe(E,M,I[M]);return E},de=(E,I)=>{var M={};for(var $ in E)Xe.call(E,$)&&I.indexOf($)<0&&(M[$]=E[$]);if(E!=null&&bt)for(var $ of bt(E))I.indexOf($)<0&&Ye.call(E,$)&&(M[$]=E[$]);return M},ae=(E,I,M)=>new Promise(($,J)=>{var Me=z=>{try{xe(M.next(z))}catch(ue){J(ue)}},k=z=>{try{xe(M.throw(z))}catch(ue){J(ue)}},xe=z=>z.done?$(z.value):Promise.resolve(z.value).then(Me,k);xe((M=M.apply(E,I)).next())});const ie=E=>{var I=E,{shixunsDetail:M,globalSetting:$,loading:J,user:Me,dispatch:k}=I,xe=de(I,["shixunsDetail","globalSetting","loading","user","dispatch"]);const z=(0,x.useLocation)(),[ue,Ce]=(0,w.useState)({}),be=(0,w.useRef)(),pe=(0,w.useRef)(),[G]=W.default.useForm(),[ge,Pe]=(0,w.useState)("");(0,w.useEffect)(()=>(k({type:"globalSetting/footerToggle",payload:!1}),()=>{k({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,w.useEffect)(()=>{const _e=sessionStorage.getItem("pathArray");if(_e){const Ee=_e.split(",").join("/"),it=Ee.indexOf("/")===0?Ee.substr(1):Ee;Pe(it)}},[]),(0,w.useEffect)(()=>{var _e,Ee,it,st;pe.current=(Ee=(_e=z.pathname)==null?void 0:_e.split("/"))==null?void 0:Ee[2],be.current=((st=(it=z.pathname)==null?void 0:it.split("/"))==null?void 0:st[3])==="repository"},[]);const tt=(..._e)=>ae(void 0,[..._e],function*(Ee={}){if(yield k({type:"shixunsDetail/addRepositoryFile",payload:{id:pe.current,message:Ee.commitMessage,content:Ee.codeMirror,path:`${ge?`${ge}/`:""}${Ee.path||""}`,secret_repository:be.current?void 0:!0}})){const st=be.current?`/shixuns/${pe.current}/repository${ge?`/master/shixun_show/${ge}`:""}`:`/shixuns/${pe.current}/secret_repository`;x.history.replace(st)}}),at=()=>{var _e,Ee;x.history.push(`/shixuns/${pe.current}/${(Ee=(_e=z.pathname)==null?void 0:_e.split("/"))==null?void 0:Ee[3]}${ge?`/master/shixun_show/${ge}`:""}`)};return w.createElement("section",{className:ze.bg},w.createElement("div",{className:ze.wrap},w.createElement("div",{className:ze.title},"\u65B0\u5EFA\u6587\u4EF6"),w.createElement(W.default,{className:"mt10",form:G,scrollToFirstError:!0,layout:"vertical",onFinish:tt,onValuesChange:()=>Ce(Y({},G.getFieldsValue()))},w.createElement(W.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},w.createElement(W.default.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}],noStyle:!0},w.createElement("span",null,w.createElement("span",{className:"mr5"},ge?`${ge}/`:""),w.createElement(v.default,{className:ze.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),w.createElement("span",{className:"ml5"},"\u63D0\u793A\uFF1A1.\u8F93\u5165\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u4E00\u4E2A\u65B0\u6587\u4EF6\uFF1B2.\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u65B0\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u65B0\u6587\u4EF6\u5939\u548C\u65B0\u6587\u4EF6\u3002\uFF08\u5982\uFF1Astep1/HelloWorld.java\uFF09")),w.createElement(W.default.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},w.createElement(v.default,{placeholder:"\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406"})),w.createElement("div",{className:"mt10 mb20"},w.createElement(W.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},w.createElement(A.h,{options:{modal:"javascript",lineNumbers:!0,theme:"railscasts",indentUnit:4,matchBrackets:!0,autoRefresh:!0,smartIndent:!0,extraKeys:{"Alt-/":"autocomplete"},autofocus:!0,styleActiveLine:!0,lint:!0,linkurl:"",gutters:["CodeMirror-linenumbers","breakpoints","CodeMirror-lint-markers"]}}))),w.createElement(W.default.Item,{noStyle:!0},w.createElement(N.t,{okButtonProps:{htmlType:"submit"},onCancel:at})))))};var Ue=(0,x.connect)(({shixunsDetail:E,loading:I,globalSetting:M,user:$})=>({shixunsDetail:E,globalSetting:M,user:$,loading:I.models.index}))(ie),We={bg:"bg___YV4bB",wrap:"wrap___kzW1f",title:"title___qum64",path:"path___G15kO",colorBlue:"colorBlue___LDjoN",width240:"width240___QOLSj"},he=Object.defineProperty,Le=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,Tt=(E,I,M)=>I in E?he(E,I,{enumerable:!0,configurable:!0,writable:!0,value:M}):E[I]=M,wt=(E,I)=>{for(var M in I||(I={}))ve.call(I,M)&&Tt(E,M,I[M]);if(Le)for(var M of Le(I))Et.call(I,M)&&Tt(E,M,I[M]);return E},qe=(E,I)=>{var M={};for(var $ in E)ve.call(E,$)&&I.indexOf($)<0&&(M[$]=E[$]);if(E!=null&&Le)for(var $ of Le(E))I.indexOf($)<0&&Et.call(E,$)&&(M[$]=E[$]);return M},Lt=(E,I,M)=>new Promise(($,J)=>{var Me=z=>{try{xe(M.next(z))}catch(ue){J(ue)}},k=z=>{try{xe(M.throw(z))}catch(ue){J(ue)}},xe=z=>z.done?$(z.value):Promise.resolve(z.value).then(Me,k);xe((M=M.apply(E,I)).next())});const lt=E=>{var I=E,{shixunsDetail:M,globalSetting:$,loading:J,user:Me,dispatch:k}=I,xe=qe(I,["shixunsDetail","globalSetting","loading","user","dispatch"]);const z=(0,x.useLocation)(),[ue,Ce]=(0,w.useState)({}),be=(0,w.useRef)(),pe=(0,w.useRef)(),[G]=W.default.useForm(),[ge,Pe]=(0,w.useState)("");(0,w.useEffect)(()=>(k({type:"globalSetting/footerToggle",payload:!1}),()=>{k({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,w.useEffect)(()=>{const _e=sessionStorage.getItem("pathArray");if(_e){const Ee=_e.split(",").join("/"),it=Ee.indexOf("/")===0?Ee.substr(1):Ee;Pe(it)}},[]),(0,w.useEffect)(()=>{var _e,Ee,it,st;pe.current=(Ee=(_e=z.pathname)==null?void 0:_e.split("/"))==null?void 0:Ee[2],be.current=((st=(it=z.pathname)==null?void 0:it.split("/"))==null?void 0:st[3])==="repository"},[]);const tt=(..._e)=>Lt(void 0,[..._e],function*(Ee={}){if(yield k({type:"shixunsDetail/addRepositoryFile",payload:{id:pe.current,message:Ee.commitMessage,content:Ee.codeMirror,path:`${ge?`${ge}/`:""}${Ee.path||""}`,secret_repository:be.current?void 0:!0}})){const st=be.current?`/shixuns/${pe.current}/repository${ge?`/master/shixun_show/${ge}`:""}`:`/shixuns/${pe.current}/secret_repository`;x.history.replace(st)}}),at=()=>{var _e,Ee;x.history.push(`/shixuns/${pe.current}/${(Ee=(_e=z.pathname)==null?void 0:_e.split("/"))==null?void 0:Ee[3]}${ge?`/master/shixun_show/${ge}`:""}`)};return w.createElement("section",{className:We.bg},w.createElement("div",{className:We.wrap},w.createElement("div",{className:We.title},"\u65B0\u5EFA\u6587\u4EF6"),w.createElement(W.default,{className:"mt10",form:G,scrollToFirstError:!0,layout:"vertical",onFinish:tt,onValuesChange:()=>Ce(wt({},G.getFieldsValue()))},w.createElement(W.default.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A"},w.createElement(W.default.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}],noStyle:!0},w.createElement("span",null,w.createElement("span",{className:"mr5"},ge?`${ge}/`:""),w.createElement(v.default,{className:We.width240,placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84"}))),w.createElement("span",{className:"ml5"},"\u63D0\u793A\uFF1A1.\u8F93\u5165\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u4E00\u4E2A\u65B0\u6587\u4EF6\uFF1B2.\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u65B0\u6587\u4EF6\u540D\u53EF\u4EE5\u521B\u5EFA\u65B0\u6587\u4EF6\u5939\u548C\u65B0\u6587\u4EF6\u3002\uFF08\u5982\uFF1Astep1/HelloWorld.java\uFF09")),w.createElement(W.default.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},w.createElement(v.default,{placeholder:"\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406"})),w.createElement("div",{className:"mt10 mb20"},w.createElement(W.default.Item,{name:"codeMirror",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},w.createElement(A.h,{options:{modal:"javascript",lineNumbers:!0,theme:"railscasts",indentUnit:4,matchBrackets:!0,autoRefresh:!0,smartIndent:!0,extraKeys:{"Alt-/":"autocomplete"},autofocus:!0,styleActiveLine:!0,lint:!0,linkurl:"",gutters:["CodeMirror-linenumbers","breakpoints","CodeMirror-lint-markers"]}}))),w.createElement(W.default.Item,{noStyle:!0},w.createElement(N.t,{okButtonProps:{htmlType:"submit"},onCancel:at})))))};var Z=(0,x.connect)(({shixunsDetail:E,loading:I,globalSetting:M,user:$})=>({shixunsDetail:E,globalSetting:M,user:$,loading:I.models.index}))(lt);const Fe=({globalSetting:E})=>{var I;switch(Number((I=E==null?void 0:E.setting)==null?void 0:I.theme)){case T.Fy.THEMEONE:return w.createElement(Ct,null);case T.Fy.THEMETWO:return w.createElement(je,null);case T.Fy.THEMETHREE:return w.createElement(Ue,null);case T.Fy.DEFAULT:default:return w.createElement(Z,null)}};var se=(0,x.connect)(({globalSetting:E})=>({globalSetting:E}))(Fe)},19080:function(rn,De,f){"use strict";f.d(De,{F:function(){return v},Z:function(){return W}});var T=f(92310),w=f.n(T);const x=null;function W(A,N,ye){return w()({[`${A}-status-success`]:N==="success",[`${A}-status-warning`]:N==="warning",[`${A}-status-error`]:N==="error",[`${A}-status-validating`]:N==="validating",[`${A}-has-feedback`]:ye})}const v=(A,N)=>N||A},93891:function(rn,De,f){"use strict";var T=f(59301),w=f(36355),x=f(64165);const W=v=>{const{componentName:A}=v,{getPrefixCls:N}=(0,T.useContext)(w.E_),ye=N("empty");switch(A){case"Table":case"List":return T.createElement(x.Z,{image:x.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return T.createElement(x.Z,{image:x.Z.PRESENTED_IMAGE_SIMPLE,className:`${ye}-small`});default:return T.createElement(x.Z,null)}};De.Z=W},64165:function(rn,De,f){"use strict";f.d(De,{Z:function(){return re}});var T=f(92310),w=f.n(T),x=f(59301),W=f(36355),v=f(9763),A=f(64993),N=f(88088),oe=()=>{const[,Q]=(0,N.Z)(),c=new A.C(Q.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return x.createElement("svg",{style:c,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},x.createElement("g",{fill:"none",fillRule:"evenodd"},x.createElement("g",{transform:"translate(24 31.67)"},x.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),x.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"}),x.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)"}),x.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"}),x.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"})),x.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"}),x.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},x.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),x.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},Re=()=>{const[,Q]=(0,N.Z)(),{colorFill:S,colorFillTertiary:c,colorFillQuaternary:b,colorBgContainer:F}=Q,{borderColor:X,shadowColor:P,contentColor:Oe}=(0,x.useMemo)(()=>({borderColor:new A.C(S).onBackground(F).toHexShortString(),shadowColor:new A.C(c).onBackground(F).toHexShortString(),contentColor:new A.C(b).onBackground(F).toHexShortString()}),[S,c,b,F]);return x.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},x.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},x.createElement("ellipse",{fill:P,cx:"32",cy:"33",rx:"32",ry:"7"}),x.createElement("g",{fillRule:"nonzero",stroke:X},x.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"}),x.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:Oe}))))},H=f(83116),me=f(37613);const Te=Q=>{const{componentCls:S,margin:c,marginXS:b,marginXL:F,fontSize:X,lineHeight:P}=Q;return{[S]:{marginInline:b,fontSize:X,lineHeight:P,textAlign:"center",[`${S}-image`]:{height:Q.emptyImgHeight,marginBottom:b,opacity:Q.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${S}-description`]:{color:Q.colorText},[`${S}-footer`]:{marginTop:c},"&-normal":{marginBlock:F,color:Q.colorTextDisabled,[`${S}-description`]:{color:Q.colorTextDisabled},[`${S}-image`]:{height:Q.emptyImgHeightMD}},"&-small":{marginBlock:b,color:Q.colorTextDisabled,[`${S}-image`]:{height:Q.emptyImgHeightSM}}}}};var q=(0,H.Z)("Empty",Q=>{const{componentCls:S,controlHeightLG:c}=Q,b=(0,me.TS)(Q,{emptyImgCls:`${S}-img`,emptyImgHeight:c*2.5,emptyImgHeightMD:c,emptyImgHeightSM:c*.875});return[Te(b)]}),Je=function(Q,S){var c={};for(var b in Q)Object.prototype.hasOwnProperty.call(Q,b)&&S.indexOf(b)<0&&(c[b]=Q[b]);if(Q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var F=0,b=Object.getOwnPropertySymbols(Q);F<b.length;F++)S.indexOf(b[F])<0&&Object.prototype.propertyIsEnumerable.call(Q,b[F])&&(c[b[F]]=Q[b[F]]);return c};const ot=x.createElement(oe,null),Ct=x.createElement(Re,null),Ft=Q=>{var{className:S,rootClassName:c,prefixCls:b,image:F=ot,description:X,children:P,imageStyle:Oe,style:je}=Q,ze=Je(Q,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:Ie,direction:bt,empty:Xe}=x.useContext(W.E_),Ye=Ie("empty",b),[fe,Y]=q(Ye),[de]=(0,v.Z)("Empty"),ae=typeof X!="undefined"?X:de==null?void 0:de.description,ie=typeof ae=="string"?ae:"empty";let Ue=null;return typeof F=="string"?Ue=x.createElement("img",{alt:ie,src:F}):Ue=F,fe(x.createElement("div",Object.assign({className:w()(Y,Ye,Xe==null?void 0:Xe.className,{[`${Ye}-normal`]:F===Ct,[`${Ye}-rtl`]:bt==="rtl"},S,c),style:Object.assign(Object.assign({},Xe==null?void 0:Xe.style),je)},ze),x.createElement("div",{className:`${Ye}-image`,style:Oe},Ue),ae&&x.createElement("div",{className:`${Ye}-description`},ae),P&&x.createElement("div",{className:`${Ye}-footer`},P)))};Ft.PRESENTED_IMAGE_DEFAULT=ot,Ft.PRESENTED_IMAGE_SIMPLE=Ct;var re=Ft},78241:function(rn,De,f){"use strict";f.d(De,{default:function(){return jt}});var T=f(94480),w=f(92310),x=f.n(w),W=f(77900),v=f(59301),A=f(62892),N=f(32441);function ye(m){const[B,K]=v.useState(m);return v.useEffect(()=>{const h=setTimeout(()=>{K(m)},m.length?0:10);return()=>{clearTimeout(h)}},[m]),B}var oe=f(17313),y=f(29878),Re=f(8378),H=f(37613),me=f(83116),q=m=>{const{componentCls:B}=m,K=`${B}-show-help`,h=`${B}-show-help-item`;return{[K]:{transition:`opacity ${m.motionDurationSlow} ${m.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[h]:{overflow:"hidden",transition:`height ${m.motionDurationSlow} ${m.motionEaseInOut},
opacity ${m.motionDurationSlow} ${m.motionEaseInOut},
transform ${m.motionDurationSlow} ${m.motionEaseInOut} !important`,[`&${h}-appear, &${h}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${h}-leave-active`]:{transform:"translateY(-5px)"}}}}};const Je=m=>({legend:{display:"block",width:"100%",marginBottom:m.marginLG,padding:0,color:m.colorTextDescription,fontSize:m.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${m.lineWidth}px ${m.lineType} ${m.colorBorder}`},label:{fontSize:m.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 ${m.controlOutlineWidth}px ${m.controlOutline}`},output:{display:"block",paddingTop:15,color:m.colorText,fontSize:m.fontSize,lineHeight:m.lineHeight}}),ot=(m,B)=>{const{formItemCls:K}=m;return{[K]:{[`${K}-label > label`]:{height:B},[`${K}-control-input`]:{minHeight:B}}}},Ct=m=>{const{componentCls:B}=m;return{[m.componentCls]:Object.assign(Object.assign(Object.assign({},(0,oe.Wf)(m)),Je(m)),{[`${B}-text`]:{display:"inline-block",paddingInlineEnd:m.paddingSM},"&-small":Object.assign({},ot(m,m.controlHeightSM)),"&-large":Object.assign({},ot(m,m.controlHeightLG))})}},Ft=m=>{const{formItemCls:B,iconCls:K,componentCls:h,rootPrefixCls:d,labelRequiredMarkColor:C,labelColor:D,labelFontSize:ne,labelHeight:_,labelColonMarginInlineStart:j,labelColonMarginInlineEnd:le,itemMarginBottom:ce}=m;return{[B]:Object.assign(Object.assign({},(0,oe.Wf)(m)),{marginBottom:ce,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${d}-row`]:{display:"none"},"&-has-warning":{[`${B}-split`]:{color:m.colorError}},"&-has-error":{[`${B}-split`]:{color:m.colorWarning}},[`${B}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${m.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:_,color:D,fontSize:ne,[`> ${K}`]:{fontSize:m.fontSize,verticalAlign:"top"},[`&${B}-required:not(${B}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:m.marginXXS,color:C,fontSize:m.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${h}-hide-required-mark &`]:{display:"none"}},[`${B}-optional`]:{display:"inline-block",marginInlineStart:m.marginXXS,color:m.colorTextDescription,[`${h}-hide-required-mark &`]:{display:"none"}},[`${B}-tooltip`]:{color:m.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:m.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:j,marginInlineEnd:le},[`&${B}-no-colon::after`]:{content:'"\\a0"'}}},[`${B}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${d}-col-'"]):not([class*="' ${d}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:m.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[B]:{"&-explain, &-extra":{clear:"both",color:m.colorTextDescription,fontSize:m.fontSize,lineHeight:m.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:m.controlHeightSM,transition:`color ${m.motionDurationMid} ${m.motionEaseOut}`},"&-explain":{"&-error":{color:m.colorError},"&-warning":{color:m.colorWarning}}},[`&-with-help ${B}-explain`]:{height:"auto",opacity:1},[`${B}-feedback-icon`]:{fontSize:m.fontSize,textAlign:"center",visibility:"visible",animationName:y.kr,animationDuration:m.motionDurationMid,animationTimingFunction:m.motionEaseOutBack,pointerEvents:"none","&-success":{color:m.colorSuccess},"&-error":{color:m.colorError},"&-warning":{color:m.colorWarning},"&-validating":{color:m.colorPrimary}}})}},re=m=>{const{componentCls:B,formItemCls:K}=m;return{[`${B}-horizontal`]:{[`${K}-label`]:{flexGrow:0},[`${K}-control`]:{flex:"1 1 0",minWidth:0},[`${K}-label[class$='-24'], ${K}-label[class*='-24 ']`]:{[`& + ${K}-control`]:{minWidth:"unset"}}}}},Q=m=>{const{componentCls:B,formItemCls:K}=m;return{[`${B}-inline`]:{display:"flex",flexWrap:"wrap",[K]:{flex:"none",marginInlineEnd:m.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${K}-label,
> ${K}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${K}-label`]:{flex:"none"},[`${B}-text`]:{display:"inline-block"},[`${K}-has-feedback`]:{display:"inline-block"}}}}},S=m=>({padding:m.verticalLabelPadding,margin:m.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),c=m=>{const{componentCls:B,formItemCls:K,rootPrefixCls:h}=m;return{[`${K} ${K}-label`]:S(m),[B]:{[K]:{flexWrap:"wrap",[`${K}-label, ${K}-control`]:{[`&:not([class*=" ${h}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},b=m=>{const{componentCls:B,formItemCls:K,rootPrefixCls:h}=m;return{[`${B}-vertical`]:{[K]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${B}-item-control`]:{width:"100%"}}},[`${B}-vertical ${K}-label,
.${h}-col-24${K}-label,
.${h}-col-xl-24${K}-label`]:S(m),[`@media (max-width: ${m.screenXSMax}px)`]:[c(m),{[B]:{[`.${h}-col-xs-24${K}-label`]:S(m)}}],[`@media (max-width: ${m.screenSMMax}px)`]:{[B]:{[`.${h}-col-sm-24${K}-label`]:S(m)}},[`@media (max-width: ${m.screenMDMax}px)`]:{[B]:{[`.${h}-col-md-24${K}-label`]:S(m)}},[`@media (max-width: ${m.screenLGMax}px)`]:{[B]:{[`.${h}-col-lg-24${K}-label`]:S(m)}}}},F=(m,B)=>(0,H.TS)(m,{formItemCls:`${m.componentCls}-item`,rootPrefixCls:B});var X=(0,me.Z)("Form",(m,B)=>{let{rootPrefixCls:K}=B;const h=F(m,K);return[Ct(h),Ft(h),q(h),re(h),Q(h),b(h),(0,Re.Z)(h),y.kr]},m=>({labelRequiredMarkColor:m.colorError,labelColor:m.colorTextHeading,labelFontSize:m.fontSize,labelHeight:m.controlHeight,labelColonMarginInlineStart:m.marginXXS/2,labelColonMarginInlineEnd:m.marginXS,itemMarginBottom:m.marginLG,verticalLabelPadding:`0 0 ${m.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const P=[];function Oe(m,B,K){let h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof m=="string"?m:`${B}-${h}`,error:m,errorStatus:K}}var ze=m=>{let{help:B,helpStatus:K,errors:h=P,warnings:d=P,className:C,fieldId:D,onVisibleChanged:ne}=m;const{prefixCls:_}=v.useContext(N.Rk),j=`${_}-item-explain`,[,le]=X(_),ce=(0,v.useMemo)(()=>(0,A.Z)(_),[_]),He=ye(h),L=ye(d),V=v.useMemo(()=>B!=null?[Oe(B,"help",K)]:[].concat((0,T.Z)(He.map((Se,Ke)=>Oe(Se,"error","error",Ke))),(0,T.Z)(L.map((Se,Ke)=>Oe(Se,"warning","warning",Ke)))),[B,K,He,L]),Qe={};return D&&(Qe.id=`${D}_help`),v.createElement(W.default,{motionDeadline:ce.motionDeadline,motionName:`${_}-show-help`,visible:!!V.length,onVisibleChanged:ne},Se=>{const{className:Ke,style:Ne}=Se;return v.createElement("div",Object.assign({},Qe,{className:x()(j,Ke,C,le),style:Ne,role:"alert"}),v.createElement(W.CSSMotionList,Object.assign({keys:V},(0,A.Z)(_),{motionName:`${_}-show-help-item`,component:!1}),ft=>{const{key:te,error:et,errorStatus:St,className:Pt,style:rt}=ft;return v.createElement("div",{key:te,className:x()(Pt,{[`${j}-${St}`]:St}),style:rt},et)}))})},Ie=f(95013),bt=f(36355),Xe=f(1684),Ye=f(52946),fe=f(19716),Y=f(16722);const de=["parentNode"],ae="form_item";function ie(m){return m===void 0||m===!1?[]:Array.isArray(m)?m:[m]}function Ue(m,B){if(!m.length)return;const K=m.join("_");return B?`${B}_${K}`:de.includes(K)?`${ae}_${K}`:K}function We(m,B,K,h,d,C){let D=h;return C!==void 0?D=C:K.validating?D="validating":m.length?D="error":B.length?D="warning":(K.touched||d&&K.validated)&&(D="success"),D}function he(m){return ie(m).join("_")}function Le(m){const[B]=(0,Ie.useForm)(),K=v.useRef({}),h=v.useMemo(()=>m!=null?m:Object.assign(Object.assign({},B),{__INTERNAL__:{itemRef:d=>C=>{const D=he(d);C?K.current[D]=C:delete K.current[D]}},scrollToField:function(d){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const D=ie(d),ne=Ue(D,h.__INTERNAL__.name),_=ne?document.getElementById(ne):null;_&&(0,Y.Z)(_,Object.assign({scrollMode:"if-needed",block:"nearest"},C))},getFieldInstance:d=>{const C=he(d);return K.current[C]}}),[m,B]);return[h]}var ve=f(28726),Et=function(m,B){var K={};for(var h in m)Object.prototype.hasOwnProperty.call(m,h)&&B.indexOf(h)<0&&(K[h]=m[h]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,h=Object.getOwnPropertySymbols(m);d<h.length;d++)B.indexOf(h[d])<0&&Object.prototype.propertyIsEnumerable.call(m,h[d])&&(K[h[d]]=m[h[d]]);return K};const Tt=(m,B)=>{const K=v.useContext(Xe.Z),{getPrefixCls:h,direction:d,form:C}=v.useContext(bt.E_),{prefixCls:D,className:ne,rootClassName:_,size:j,disabled:le=K,form:ce,colon:He,labelAlign:L,labelWrap:V,labelCol:Qe,wrapperCol:Se,hideRequiredMark:Ke,layout:Ne="horizontal",scrollToFirstError:ft,requiredMark:te,onFinishFailed:et,name:St,style:Pt,feedbackIcons:rt}=m,mt=Et(m,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),zt=(0,fe.Z)(j),Ae=v.useContext(ve.Z),ke=(0,v.useMemo)(()=>te!==void 0?te:C&&C.requiredMark!==void 0?C.requiredMark:!Ke,[Ke,te,C]),dt=He!=null?He:C==null?void 0:C.colon,gt=h("form",D),[Zt,Gt]=X(gt),Vt=x()(gt,`${gt}-${Ne}`,{[`${gt}-hide-required-mark`]:ke===!1,[`${gt}-rtl`]:d==="rtl",[`${gt}-${zt}`]:zt},Gt,C==null?void 0:C.className,ne,_),[Xt]=Le(ce),{__INTERNAL__:Nt}=Xt;Nt.name=St;const Rt=(0,v.useMemo)(()=>({name:St,labelAlign:L,labelCol:Qe,labelWrap:V,wrapperCol:Se,vertical:Ne==="vertical",colon:dt,requiredMark:ke,itemRef:Nt.itemRef,form:Xt,feedbackIcons:rt}),[St,L,Qe,Se,Ne,dt,ke,Xt,rt]);v.useImperativeHandle(B,()=>Xt);const Ht=(cn,$t)=>{if(cn){let _t={block:"nearest"};typeof cn=="object"&&(_t=cn),Xt.scrollToField($t,_t)}},Dt=cn=>{if(et==null||et(cn),cn.errorFields.length){const $t=cn.errorFields[0].name;if(ft!==void 0){Ht(ft,$t);return}C&&C.scrollToFirstError!==void 0&&Ht(C.scrollToFirstError,$t)}};return Zt(v.createElement(Xe.n,{disabled:le},v.createElement(Ye.q,{size:zt},v.createElement(N.RV,Object.assign({},{validateMessages:Ae}),v.createElement(N.q3.Provider,{value:Rt},v.createElement(Ie.default,Object.assign({id:St},mt,{name:St,onFinishFailed:Dt,form:Xt,style:Object.assign(Object.assign({},C==null?void 0:C.style),Pt),className:Vt})))))))};var qe=v.forwardRef(Tt),Lt=f(41799),lt=f(8654),Z=f(92343),Fe=f(11592);function se(m){if(typeof m=="function")return m;const B=(0,Fe.Z)(m);return B.length<=1?B[0]:B}const E=()=>{const{status:m,errors:B=[],warnings:K=[]}=(0,v.useContext)(N.aM);return{status:m,errors:B,warnings:K}};E.Context=N.aM;var I=E,M=f(16089);function $(m){const[B,K]=v.useState(m),h=(0,v.useRef)(null),d=(0,v.useRef)([]),C=(0,v.useRef)(!1);v.useEffect(()=>(C.current=!1,()=>{C.current=!0,M.Z.cancel(h.current),h.current=null}),[]);function D(ne){C.current||(h.current===null&&(d.current=[],h.current=(0,M.Z)(()=>{h.current=null,K(_=>{let j=_;return d.current.forEach(le=>{j=le(j)}),j})})),d.current.push(ne))}return[B,D]}function J(){const{itemRef:m}=v.useContext(N.q3),B=v.useRef({});function K(h,d){const C=d&&typeof d=="object"&&d.ref,D=h.join("_");return(B.current.name!==D||B.current.originRef!==C)&&(B.current.name=D,B.current.originRef=C,B.current.ref=(0,lt.sQ)(m(h),C)),B.current.ref}return K}var Me=f(29194),k=f(34280),xe=f(2738),z=f(27382),ue=f(37028);const Ce=m=>{const{formItemCls:B}=m;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${B}-control`]:{display:"flex"}}}};var be=(0,me.b)(["Form","item-item"],(m,B)=>{let{rootPrefixCls:K}=B;const h=F(m,K);return[Ce(h)]}),G=m=>{const{prefixCls:B,status:K,wrapperCol:h,children:d,errors:C,warnings:D,_internalItemRender:ne,extra:_,help:j,fieldId:le,marginBottom:ce,onErrorVisibleChanged:He}=m,L=`${B}-item`,V=v.useContext(N.q3),Qe=h||V.wrapperCol||{},Se=x()(`${L}-control`,Qe.className),Ke=v.useMemo(()=>Object.assign({},V),[V]);delete Ke.labelCol,delete Ke.wrapperCol;const Ne=v.createElement("div",{className:`${L}-control-input`},v.createElement("div",{className:`${L}-control-input-content`},d)),ft=v.useMemo(()=>({prefixCls:B,status:K}),[B,K]),te=ce!==null||C.length||D.length?v.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},v.createElement(N.Rk.Provider,{value:ft},v.createElement(ze,{fieldId:le,errors:C,warnings:D,help:j,helpStatus:K,className:`${L}-explain-connected`,onVisibleChanged:He})),!!ce&&v.createElement("div",{style:{width:0,height:ce}})):null,et={};le&&(et.id=`${le}_extra`);const St=_?v.createElement("div",Object.assign({},et,{className:`${L}-extra`}),_):null,Pt=ne&&ne.mark==="pro_table_render"&&ne.render?ne.render(m,{input:Ne,errorList:te,extra:St}):v.createElement(v.Fragment,null,Ne,te,St);return v.createElement(N.q3.Provider,{value:Ke},v.createElement(ue.Z,Object.assign({},Qe,{className:Se}),Pt),v.createElement(be,{prefixCls:B}))},ge=f(61485),Pe=f(31724),tt=f(9763),at=f(6848),_e=function(m,B){var K={};for(var h in m)Object.prototype.hasOwnProperty.call(m,h)&&B.indexOf(h)<0&&(K[h]=m[h]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,h=Object.getOwnPropertySymbols(m);d<h.length;d++)B.indexOf(h[d])<0&&Object.prototype.propertyIsEnumerable.call(m,h[d])&&(K[h[d]]=m[h[d]]);return K};function Ee(m){return m?typeof m=="object"&&!v.isValidElement(m)?m:{title:m}:null}var st=m=>{let{prefixCls:B,label:K,htmlFor:h,labelCol:d,labelAlign:C,colon:D,required:ne,requiredMark:_,tooltip:j}=m;var le;const[ce]=(0,tt.Z)("Form"),{vertical:He,labelAlign:L,labelCol:V,labelWrap:Qe,colon:Se}=v.useContext(N.q3);if(!K)return null;const Ke=d||V||{},Ne=C||L,ft=`${B}-item-label`,te=x()(ft,Ne==="left"&&`${ft}-left`,Ke.className,{[`${ft}-wrap`]:!!Qe});let et=K;const St=D===!0||Se!==!1&&D!==!1;St&&!He&&typeof K=="string"&&K.trim()!==""&&(et=K.replace(/[:|]\s*$/,""));const rt=Ee(j);if(rt){const{icon:ke=v.createElement(ge.Z,null)}=rt,dt=_e(rt,["icon"]),gt=v.createElement(at.Z,Object.assign({},dt),v.cloneElement(ke,{className:`${B}-item-tooltip`,title:""}));et=v.createElement(v.Fragment,null,et,gt)}const mt=_==="optional",zt=typeof _=="function";zt?et=_(et,{required:!!ne}):mt&&!ne&&(et=v.createElement(v.Fragment,null,et,v.createElement("span",{className:`${B}-item-optional`,title:""},(ce==null?void 0:ce.optional)||((le=Pe.Z.Form)===null||le===void 0?void 0:le.optional))));const Ae=x()({[`${B}-item-required`]:ne,[`${B}-item-required-mark-optional`]:mt||zt,[`${B}-item-no-colon`]:!St});return v.createElement(ue.Z,Object.assign({},Ke,{className:te}),v.createElement("label",{htmlFor:h,className:Ae,title:typeof K=="string"?K:""},et))},tn=f(29679),kt=f(19248),sn=f(96512),Cn=f(58617);const fn={success:tn.Z,warning:sn.Z,error:kt.Z,validating:Cn.Z};function An(m){let{children:B,errors:K,warnings:h,hasFeedback:d,validateStatus:C,prefixCls:D,meta:ne,noStyle:_}=m;const j=`${D}-item`,{feedbackIcons:le}=v.useContext(N.q3),ce=We(K,h,ne,null,!!d,C),{isFormItemInput:He,status:L}=v.useContext(N.aM),V=v.useMemo(()=>{var Qe;let Se;if(d){const ft=d!==!0&&d.icons||le,te=ce&&((Qe=ft==null?void 0:ft({status:ce,errors:K,warnings:h}))===null||Qe===void 0?void 0:Qe[ce]),et=ce&&fn[ce];Se=te!==!1&&et?v.createElement("span",{className:x()(`${j}-feedback-icon`,`${j}-feedback-icon-${ce}`)},te||v.createElement(et,null)):null}let Ke=!0,Ne=ce||"";return _&&(Ke=He,Ne=(ce!=null?ce:L)||""),{status:Ne,errors:K,warnings:h,hasFeedback:!!d,feedbackIcon:Se,isFormItemInput:Ke}},[ce,d,_,He,L]);return v.createElement(N.aM.Provider,{value:V},B)}var Wn=function(m,B){var K={};for(var h in m)Object.prototype.hasOwnProperty.call(m,h)&&B.indexOf(h)<0&&(K[h]=m[h]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,h=Object.getOwnPropertySymbols(m);d<h.length;d++)B.indexOf(h[d])<0&&Object.prototype.propertyIsEnumerable.call(m,h[d])&&(K[h[d]]=m[h[d]]);return K};function xn(m){const{prefixCls:B,className:K,rootClassName:h,style:d,help:C,errors:D,warnings:ne,validateStatus:_,meta:j,hasFeedback:le,hidden:ce,children:He,fieldId:L,required:V,isRequired:Qe,onSubItemMetaChange:Se}=m,Ke=Wn(m,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Ne=`${B}-item`,{requiredMark:ft}=v.useContext(N.q3),te=v.useRef(null),et=ye(D),St=ye(ne),Pt=C!=null,rt=!!(Pt||D.length||ne.length),mt=!!te.current&&(0,Me.Z)(te.current),[zt,Ae]=v.useState(null);(0,k.Z)(()=>{if(rt&&te.current){const Gt=getComputedStyle(te.current);Ae(parseInt(Gt.marginBottom,10))}},[rt,mt]);const ke=Gt=>{Gt||Ae(null)},gt=function(){let Gt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Vt=Gt?et:j.errors,Xt=Gt?St:j.warnings;return We(Vt,Xt,j,"",!!le,_)}(),Zt=x()(Ne,K,h,{[`${Ne}-with-help`]:Pt||et.length||St.length,[`${Ne}-has-feedback`]:gt&&le,[`${Ne}-has-success`]:gt==="success",[`${Ne}-has-warning`]:gt==="warning",[`${Ne}-has-error`]:gt==="error",[`${Ne}-is-validating`]:gt==="validating",[`${Ne}-hidden`]:ce});return v.createElement("div",{className:Zt,style:d,ref:te},v.createElement(z.Z,Object.assign({className:`${Ne}-row`},(0,xe.Z)(Ke,["_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"])),v.createElement(st,Object.assign({htmlFor:L},m,{requiredMark:ft,required:V!=null?V:Qe,prefixCls:B})),v.createElement(G,Object.assign({},m,j,{errors:et,warnings:St,prefixCls:B,status:gt,help:C,marginBottom:zt,onErrorVisibleChanged:ke}),v.createElement(N.qI.Provider,{value:Se},v.createElement(An,{prefixCls:B,meta:j,errors:j.errors,warnings:j.warnings,hasFeedback:le,validateStatus:gt},He)))),!!zt&&v.createElement("div",{className:`${Ne}-margin-offset`,style:{marginBottom:-zt}}))}const Dn="__SPLIT__",vn=null,In=v.memo(m=>{let{children:B}=m;return B},(m,B)=>m.value===B.value&&m.update===B.update&&m.childProps.length===B.childProps.length&&m.childProps.every((K,h)=>K===B.childProps[h]));function En(m){return m!=null}function pn(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Tn(m){const{name:B,noStyle:K,className:h,dependencies:d,prefixCls:C,shouldUpdate:D,rules:ne,children:_,required:j,label:le,messageVariables:ce,trigger:He="onChange",validateTrigger:L,hidden:V,help:Qe}=m,{getPrefixCls:Se}=v.useContext(bt.E_),{name:Ke}=v.useContext(N.q3),Ne=se(_),ft=typeof Ne=="function",te=v.useContext(N.qI),{validateTrigger:et}=v.useContext(Ie.FieldContext),St=L!==void 0?L:et,Pt=En(B),rt=Se("form",C),[mt,zt]=X(rt),Ae=v.useContext(Ie.ListContext),ke=v.useRef(),[dt,gt]=$({}),[Zt,Gt]=(0,Lt.Z)(()=>pn()),Vt=$t=>{const _t=Ae==null?void 0:Ae.getKey($t.name);if(Gt($t.destroy?pn():$t,!0),K&&Qe!==!1&&te){let an=$t.name;if($t.destroy)an=ke.current||an;else if(_t!==void 0){const[Yt,wn]=_t;an=[Yt].concat((0,T.Z)(wn)),ke.current=an}te($t,an)}},Xt=($t,_t)=>{gt(an=>{const Yt=Object.assign({},an),Un=[].concat((0,T.Z)($t.name.slice(0,-1)),(0,T.Z)(_t)).join(Dn);return $t.destroy?delete Yt[Un]:Yt[Un]=$t,Yt})},[Nt,Rt]=v.useMemo(()=>{const $t=(0,T.Z)(Zt.errors),_t=(0,T.Z)(Zt.warnings);return Object.values(dt).forEach(an=>{$t.push.apply($t,(0,T.Z)(an.errors||[])),_t.push.apply(_t,(0,T.Z)(an.warnings||[]))}),[$t,_t]},[dt,Zt.errors,Zt.warnings]),Ht=J();function Dt($t,_t,an){return K&&!V?v.createElement(An,{prefixCls:rt,hasFeedback:m.hasFeedback,validateStatus:m.validateStatus,meta:Zt,errors:Nt,warnings:Rt,noStyle:!0},$t):v.createElement(xn,Object.assign({key:"row"},m,{className:x()(h,zt),prefixCls:rt,fieldId:_t,isRequired:an,errors:Nt,warnings:Rt,meta:Zt,onSubItemMetaChange:Xt}),$t)}if(!Pt&&!ft&&!d)return mt(Dt(Ne));let cn={};return typeof le=="string"?cn.label=le:B&&(cn.label=String(B)),ce&&(cn=Object.assign(Object.assign({},cn),ce)),mt(v.createElement(Ie.Field,Object.assign({},m,{messageVariables:cn,trigger:He,validateTrigger:St,onMetaChange:Vt}),($t,_t,an)=>{const Yt=ie(B).length&&_t?_t.name:[],wn=Ue(Yt,Ke),Un=j!==void 0?j:!!(ne&&ne.some(vt=>{if(vt&&typeof vt=="object"&&vt.required&&!vt.warningOnly)return!0;if(typeof vt=="function"){const en=vt(an);return en&&en.required&&!en.warningOnly}return!1})),At=Object.assign({},$t);let ht=null;if(Array.isArray(Ne)&&Pt)ht=Ne;else if(!(ft&&(!(D||d)||Pt))){if(!(d&&!ft&&!Pt))if((0,Z.l$)(Ne)){const vt=Object.assign(Object.assign({},Ne.props),At);if(vt.id||(vt.id=wn),Qe||Nt.length>0||Rt.length>0||m.extra){const Qt=[];(Qe||Nt.length>0)&&Qt.push(`${wn}_help`),m.extra&&Qt.push(`${wn}_extra`),vt["aria-describedby"]=Qt.join(" ")}Nt.length>0&&(vt["aria-invalid"]="true"),Un&&(vt["aria-required"]="true"),(0,lt.Yr)(Ne)&&(vt.ref=Ht(Yt,Ne)),new Set([].concat((0,T.Z)(ie(He)),(0,T.Z)(ie(St)))).forEach(Qt=>{vt[Qt]=function(){for(var Wt,ln,gn,mn,Fn,Ge=arguments.length,Ze=new Array(Ge),xt=0;xt<Ge;xt++)Ze[xt]=arguments[xt];(gn=At[Qt])===null||gn===void 0||(Wt=gn).call.apply(Wt,[At].concat(Ze)),(Fn=(mn=Ne.props)[Qt])===null||Fn===void 0||(ln=Fn).call.apply(ln,[mn].concat(Ze))}});const nn=[vt["aria-required"],vt["aria-invalid"],vt["aria-describedby"]];ht=v.createElement(In,{value:At[m.valuePropName||"value"],update:Ne,childProps:nn},(0,Z.Tm)(Ne,vt))}else ft&&(D||d)&&!Pt?ht=Ne(an):ht=Ne}return Dt(ht,wn,Un)}))}const on=Tn;on.useStatus=I;var Nn=on,zn=function(m,B){var K={};for(var h in m)Object.prototype.hasOwnProperty.call(m,h)&&B.indexOf(h)<0&&(K[h]=m[h]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,h=Object.getOwnPropertySymbols(m);d<h.length;d++)B.indexOf(h[d])<0&&Object.prototype.propertyIsEnumerable.call(m,h[d])&&(K[h[d]]=m[h[d]]);return K},gr=m=>{var{prefixCls:B,children:K}=m,h=zn(m,["prefixCls","children"]);const{getPrefixCls:d}=v.useContext(bt.E_),C=d("form",B),D=v.useMemo(()=>({prefixCls:C,status:"error"}),[C]);return v.createElement(Ie.List,Object.assign({},h),(ne,_,j)=>v.createElement(N.Rk.Provider,{value:D},K(ne.map(le=>Object.assign(Object.assign({},le),{fieldKey:le.key})),_,{errors:j.errors,warnings:j.warnings})))};function qt(){const{form:m}=(0,v.useContext)(N.q3);return m}const ut=qe;ut.Item=Nn,ut.List=gr,ut.ErrorList=ze,ut.useForm=Le,ut.useFormInstance=qt,ut.useWatch=Ie.useWatch,ut.Provider=N.RV,ut.create=()=>{};var jt=ut},9432:function(rn,De,f){"use strict";f.d(De,{Z:function(){return Ft},n:function(){return ot}});var T=f(19248),w=f(92310),x=f.n(w),W=f(93681),v=f(8654),A=f(59301),N=f(19080),ye=f(36355),oe=f(1684),y=f(19716),Re=f(32441),H=f(33234),me=f(59412),Te=f(9937);function q(re){return!!(re.prefix||re.suffix||re.allowClear)}var Je=function(re,Q){var S={};for(var c in re)Object.prototype.hasOwnProperty.call(re,c)&&Q.indexOf(c)<0&&(S[c]=re[c]);if(re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var b=0,c=Object.getOwnPropertySymbols(re);b<c.length;b++)Q.indexOf(c[b])<0&&Object.prototype.propertyIsEnumerable.call(re,c[b])&&(S[c[b]]=re[c[b]]);return S};function ot(re,Q){if(!re)return;re.focus(Q);const{cursor:S}=Q||{};if(S){const c=re.value.length;switch(S){case"start":re.setSelectionRange(0,0);break;case"end":re.setSelectionRange(c,c);break;default:re.setSelectionRange(0,c);break}}}var Ft=(0,A.forwardRef)((re,Q)=>{var S;const{prefixCls:c,bordered:b=!0,status:F,size:X,disabled:P,onBlur:Oe,onFocus:je,suffix:ze,allowClear:Ie,addonAfter:bt,addonBefore:Xe,className:Ye,style:fe,styles:Y,rootClassName:de,onChange:ae,classNames:ie}=re,Ue=Je(re,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:We,direction:he,input:Le}=A.useContext(ye.E_),ve=We("input",c),Et=(0,A.useRef)(null),[Tt,wt]=(0,Te.ZP)(ve),{compactSize:qe,compactItemClassnames:Lt}=(0,H.ri)(ve,he),lt=(0,y.Z)(be=>{var pe;return(pe=X!=null?X:qe)!==null&&pe!==void 0?pe:be}),Z=A.useContext(oe.Z),Fe=P!=null?P:Z,{status:se,hasFeedback:E,feedbackIcon:I}=(0,A.useContext)(Re.aM),M=(0,N.F)(se,F),$=q(re)||!!E,J=(0,A.useRef)($);(0,A.useEffect)(()=>{var be;$&&J.current,J.current=$},[$]);const Me=(0,me.Z)(Et,!0),k=be=>{Me(),Oe==null||Oe(be)},xe=be=>{Me(),je==null||je(be)},z=be=>{Me(),ae==null||ae(be)},ue=(E||ze)&&A.createElement(A.Fragment,null,ze,E&&I);let Ce;return typeof Ie=="object"&&(Ie!=null&&Ie.clearIcon)?Ce=Ie:Ie&&(Ce={clearIcon:A.createElement(T.Z,null)}),Tt(A.createElement(W.default,Object.assign({ref:(0,v.sQ)(Q,Et),prefixCls:ve,autoComplete:Le==null?void 0:Le.autoComplete},Ue,{disabled:Fe,onBlur:k,onFocus:xe,style:Object.assign(Object.assign({},Le==null?void 0:Le.style),fe),styles:Object.assign(Object.assign({},Le==null?void 0:Le.styles),Y),suffix:ue,allowClear:Ce,className:x()(Ye,de,Lt,Le==null?void 0:Le.className),onChange:z,addonAfter:bt&&A.createElement(H.BR,null,A.createElement(Re.Ux,{override:!0,status:!0},bt)),addonBefore:Xe&&A.createElement(H.BR,null,A.createElement(Re.Ux,{override:!0,status:!0},Xe)),classNames:Object.assign(Object.assign(Object.assign({},ie),Le==null?void 0:Le.classNames),{input:x()({[`${ve}-sm`]:lt==="small",[`${ve}-lg`]:lt==="large",[`${ve}-rtl`]:he==="rtl",[`${ve}-borderless`]:!b},!$&&(0,N.Z)(ve,M),ie==null?void 0:ie.input,(S=Le==null?void 0:Le.classNames)===null||S===void 0?void 0:S.input,wt)}),classes:{affixWrapper:x()({[`${ve}-affix-wrapper-sm`]:lt==="small",[`${ve}-affix-wrapper-lg`]:lt==="large",[`${ve}-affix-wrapper-rtl`]:he==="rtl",[`${ve}-affix-wrapper-borderless`]:!b},(0,N.Z)(`${ve}-affix-wrapper`,M,E),wt),wrapper:x()({[`${ve}-group-rtl`]:he==="rtl"},wt),group:x()({[`${ve}-group-wrapper-sm`]:lt==="small",[`${ve}-group-wrapper-lg`]:lt==="large",[`${ve}-group-wrapper-rtl`]:he==="rtl",[`${ve}-group-wrapper-disabled`]:Fe},(0,N.Z)(`${ve}-group-wrapper`,M,E),wt)}})))})},1643:function(rn,De,f){"use strict";var T=f(19248),w=f(92310),x=f.n(w),W=f(9296),v=f(59301),A=f(19080),N=f(36355),ye=f(1684),oe=f(19716),y=f(32441),Re=f(9432),H=f(9937),me=function(q,Je){var ot={};for(var Ct in q)Object.prototype.hasOwnProperty.call(q,Ct)&&Je.indexOf(Ct)<0&&(ot[Ct]=q[Ct]);if(q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ft=0,Ct=Object.getOwnPropertySymbols(q);Ft<Ct.length;Ft++)Je.indexOf(Ct[Ft])<0&&Object.prototype.propertyIsEnumerable.call(q,Ct[Ft])&&(ot[Ct[Ft]]=q[Ct[Ft]]);return ot};const Te=(0,v.forwardRef)((q,Je)=>{const{prefixCls:ot,bordered:Ct=!0,size:Ft,disabled:re,status:Q,allowClear:S,showCount:c,classNames:b,rootClassName:F,className:X}=q,P=me(q,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:Oe,direction:je}=v.useContext(N.E_),ze=(0,oe.Z)(Ft),Ie=v.useContext(ye.Z),bt=re!=null?re:Ie,{status:Xe,hasFeedback:Ye,feedbackIcon:fe}=v.useContext(y.aM),Y=(0,A.F)(Xe,Q),de=v.useRef(null);v.useImperativeHandle(Je,()=>{var he;return{resizableTextArea:(he=de.current)===null||he===void 0?void 0:he.resizableTextArea,focus:Le=>{var ve,Et;(0,Re.n)((Et=(ve=de.current)===null||ve===void 0?void 0:ve.resizableTextArea)===null||Et===void 0?void 0:Et.textArea,Le)},blur:()=>{var Le;return(Le=de.current)===null||Le===void 0?void 0:Le.blur()}}});const ae=Oe("input",ot);let ie;typeof S=="object"&&(S!=null&&S.clearIcon)?ie=S:S&&(ie={clearIcon:v.createElement(T.Z,null)});const[Ue,We]=(0,H.ZP)(ae);return Ue(v.createElement(W.default,Object.assign({},P,{disabled:bt,allowClear:ie,className:x()(X,F),classes:{affixWrapper:x()(`${ae}-textarea-affix-wrapper`,{[`${ae}-affix-wrapper-rtl`]:je==="rtl",[`${ae}-affix-wrapper-borderless`]:!Ct,[`${ae}-affix-wrapper-sm`]:ze==="small",[`${ae}-affix-wrapper-lg`]:ze==="large",[`${ae}-textarea-show-count`]:c},(0,A.Z)(`${ae}-affix-wrapper`,Y),We)},classNames:Object.assign(Object.assign({},b),{textarea:x()({[`${ae}-borderless`]:!Ct,[`${ae}-sm`]:ze==="small",[`${ae}-lg`]:ze==="large"},(0,A.Z)(ae,Y),We,b==null?void 0:b.textarea)}),prefixCls:ae,suffix:Ye&&v.createElement("span",{className:`${ae}-textarea-suffix`},fe),showCount:c,ref:de})))});De.Z=Te},59412:function(rn,De,f){"use strict";f.d(De,{Z:function(){return w}});var T=f(59301);function w(x,W){const v=(0,T.useRef)([]),A=()=>{v.current.push(setTimeout(()=>{var N,ye,oe,y;!((N=x.current)===null||N===void 0)&&N.input&&((ye=x.current)===null||ye===void 0?void 0:ye.input.getAttribute("type"))==="password"&&(!((oe=x.current)===null||oe===void 0)&&oe.input.hasAttribute("value"))&&((y=x.current)===null||y===void 0||y.input.removeAttribute("value"))}))};return(0,T.useEffect)(()=>(W&&A(),()=>v.current.forEach(N=>{N&&clearTimeout(N)})),[]),A}},92832:function(rn,De,f){"use strict";f.d(De,{default:function(){return ze}});var T=f(92310),w=f.n(T),x=f(59301),W=f(36355),v=f(32441),A=f(9937),ye=Ie=>{const{getPrefixCls:bt,direction:Xe}=(0,x.useContext)(W.E_),{prefixCls:Ye,className:fe}=Ie,Y=bt("input-group",Ye),de=bt("input"),[ae,ie]=(0,A.ZP)(de),Ue=w()(Y,{[`${Y}-lg`]:Ie.size==="large",[`${Y}-sm`]:Ie.size==="small",[`${Y}-compact`]:Ie.compact,[`${Y}-rtl`]:Xe==="rtl"},ie,fe),We=(0,x.useContext)(v.aM),he=(0,x.useMemo)(()=>Object.assign(Object.assign({},We),{isFormItemInput:!1}),[We]);return ae(x.createElement("span",{className:Ue,style:Ie.style,onMouseEnter:Ie.onMouseEnter,onMouseLeave:Ie.onMouseLeave,onFocus:Ie.onFocus,onBlur:Ie.onBlur},x.createElement(v.aM.Provider,{value:he},Ie.children)))},oe=f(9432),y=f(73331),Re=f(15277),H=f(2738),me=f(8654),Te=f(59412),q=function(Ie,bt){var Xe={};for(var Ye in Ie)Object.prototype.hasOwnProperty.call(Ie,Ye)&&bt.indexOf(Ye)<0&&(Xe[Ye]=Ie[Ye]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var fe=0,Ye=Object.getOwnPropertySymbols(Ie);fe<Ye.length;fe++)bt.indexOf(Ye[fe])<0&&Object.prototype.propertyIsEnumerable.call(Ie,Ye[fe])&&(Xe[Ye[fe]]=Ie[Ye[fe]]);return Xe};const Je=Ie=>Ie?x.createElement(Re.Z,null):x.createElement(y.Z,null),ot={click:"onClick",hover:"onMouseOver"};var Ft=x.forwardRef((Ie,bt)=>{const{visibilityToggle:Xe=!0}=Ie,Ye=typeof Xe=="object"&&Xe.visible!==void 0,[fe,Y]=(0,x.useState)(()=>Ye?Xe.visible:!1),de=(0,x.useRef)(null);x.useEffect(()=>{Ye&&Y(Xe.visible)},[Ye,Xe]);const ae=(0,Te.Z)(de),ie=()=>{const{disabled:Fe}=Ie;Fe||(fe&&ae(),Y(se=>{var E;const I=!se;return typeof Xe=="object"&&((E=Xe.onVisibleChange)===null||E===void 0||E.call(Xe,I)),I}))},Ue=Fe=>{const{action:se="click",iconRender:E=Je}=Ie,I=ot[se]||"",M=E(fe),$={[I]:ie,className:`${Fe}-icon`,key:"passwordIcon",onMouseDown:J=>{J.preventDefault()},onMouseUp:J=>{J.preventDefault()}};return x.cloneElement(x.isValidElement(M)?M:x.createElement("span",null,M),$)},{className:We,prefixCls:he,inputPrefixCls:Le,size:ve}=Ie,Et=q(Ie,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Tt}=x.useContext(W.E_),wt=Tt("input",Le),qe=Tt("input-password",he),Lt=Xe&&Ue(qe),lt=w()(qe,We,{[`${qe}-${ve}`]:!!ve}),Z=Object.assign(Object.assign({},(0,H.Z)(Et,["suffix","iconRender","visibilityToggle"])),{type:fe?"text":"password",className:lt,prefixCls:wt,suffix:Lt});return ve&&(Z.size=ve),x.createElement(oe.Z,Object.assign({ref:(0,me.sQ)(bt,de)},Z))}),re=f(47472),Q=f(92343),S=f(3113),c=f(19716),b=f(33234),F=function(Ie,bt){var Xe={};for(var Ye in Ie)Object.prototype.hasOwnProperty.call(Ie,Ye)&&bt.indexOf(Ye)<0&&(Xe[Ye]=Ie[Ye]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var fe=0,Ye=Object.getOwnPropertySymbols(Ie);fe<Ye.length;fe++)bt.indexOf(Ye[fe])<0&&Object.prototype.propertyIsEnumerable.call(Ie,Ye[fe])&&(Xe[Ye[fe]]=Ie[Ye[fe]]);return Xe},P=x.forwardRef((Ie,bt)=>{const{prefixCls:Xe,inputPrefixCls:Ye,className:fe,size:Y,suffix:de,enterButton:ae=!1,addonAfter:ie,loading:Ue,disabled:We,onSearch:he,onChange:Le,onCompositionStart:ve,onCompositionEnd:Et}=Ie,Tt=F(Ie,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:wt,direction:qe}=x.useContext(W.E_),Lt=x.useRef(!1),lt=wt("input-search",Xe),Z=wt("input",Ye),{compactSize:Fe}=(0,b.ri)(lt,qe),se=(0,c.Z)(G=>{var ge;return(ge=Y!=null?Y:Fe)!==null&&ge!==void 0?ge:G}),E=x.useRef(null),I=G=>{G&&G.target&&G.type==="click"&&he&&he(G.target.value,G,{source:"clear"}),Le&&Le(G)},M=G=>{var ge;document.activeElement===((ge=E.current)===null||ge===void 0?void 0:ge.input)&&G.preventDefault()},$=G=>{var ge,Pe;he&&he((Pe=(ge=E.current)===null||ge===void 0?void 0:ge.input)===null||Pe===void 0?void 0:Pe.value,G,{source:"input"})},J=G=>{Lt.current||Ue||$(G)},Me=typeof ae=="boolean"?x.createElement(re.Z,null):null,k=`${lt}-button`;let xe;const z=ae||{},ue=z.type&&z.type.__ANT_BUTTON===!0;ue||z.type==="button"?xe=(0,Q.Tm)(z,Object.assign({onMouseDown:M,onClick:G=>{var ge,Pe;(Pe=(ge=z==null?void 0:z.props)===null||ge===void 0?void 0:ge.onClick)===null||Pe===void 0||Pe.call(ge,G),$(G)},key:"enterButton"},ue?{className:k,size:se}:{})):xe=x.createElement(S.ZP,{className:k,type:ae?"primary":void 0,size:se,disabled:We,key:"enterButton",onMouseDown:M,onClick:$,loading:Ue,icon:Me},ae),ie&&(xe=[xe,(0,Q.Tm)(ie,{key:"addonAfter"})]);const Ce=w()(lt,{[`${lt}-rtl`]:qe==="rtl",[`${lt}-${se}`]:!!se,[`${lt}-with-button`]:!!ae},fe),be=G=>{Lt.current=!0,ve==null||ve(G)},pe=G=>{Lt.current=!1,Et==null||Et(G)};return x.createElement(oe.Z,Object.assign({ref:(0,me.sQ)(E,bt),onPressEnter:J},Tt,{size:se,onCompositionStart:be,onCompositionEnd:pe,prefixCls:Z,addonAfter:xe,suffix:de,onChange:I,className:Ce,disabled:We}))}),Oe=f(1643);const je=oe.Z;je.Group=ye,je.Search=P,je.TextArea=Oe.Z,je.Password=Ft;var ze=je},9937:function(rn,De,f){"use strict";f.d(De,{M1:function(){return N},TM:function(){return Q},Xy:function(){return ye},bi:function(){return Re},e5:function(){return re},ik:function(){return H},nz:function(){return v},pU:function(){return A},s7:function(){return me},x0:function(){return y}});var T=f(17313),w=f(74207),x=f(37613),W=f(83116);const v=S=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:S,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),A=S=>({borderColor:S.hoverBorderColor}),N=S=>({borderColor:S.activeBorderColor,boxShadow:S.activeShadow,outline:0}),ye=S=>({color:S.colorTextDisabled,backgroundColor:S.colorBgContainerDisabled,borderColor:S.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},A((0,x.TS)(S,{hoverBorderColor:S.colorBorder})))}),oe=S=>{const{paddingBlockLG:c,fontSizeLG:b,lineHeightLG:F,borderRadiusLG:X,paddingInlineLG:P}=S;return{padding:`${c}px ${P}px`,fontSize:b,lineHeight:F,borderRadius:X}},y=S=>({padding:`${S.paddingBlockSM}px ${S.paddingInlineSM}px`,borderRadius:S.borderRadiusSM}),Re=(S,c)=>{const{componentCls:b,colorError:F,colorWarning:X,errorActiveShadow:P,warningActiveShadow:Oe,colorErrorBorderHover:je,colorWarningBorderHover:ze}=S;return{[`&-status-error:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:F,"&:hover":{borderColor:je},"&:focus, &-focused":Object.assign({},N((0,x.TS)(S,{activeBorderColor:F,activeShadow:P}))),[`${b}-prefix, ${b}-suffix`]:{color:F}},[`&-status-warning:not(${c}-disabled):not(${c}-borderless)${c}`]:{borderColor:X,"&:hover":{borderColor:ze},"&:focus, &-focused":Object.assign({},N((0,x.TS)(S,{activeBorderColor:X,activeShadow:Oe}))),[`${b}-prefix, ${b}-suffix`]:{color:X}}}},H=S=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${S.paddingBlock}px ${S.paddingInline}px`,color:S.colorText,fontSize:S.fontSize,lineHeight:S.lineHeight,backgroundColor:S.colorBgContainer,backgroundImage:"none",borderWidth:S.lineWidth,borderStyle:S.lineType,borderColor:S.colorBorder,borderRadius:S.borderRadius,transition:`all ${S.motionDurationMid}`},v(S.colorTextPlaceholder)),{"&:hover":Object.assign({},A(S)),"&:focus, &-focused":Object.assign({},N(S)),"&-disabled, &[disabled]":Object.assign({},ye(S)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:S.controlHeight,lineHeight:S.lineHeight,verticalAlign:"bottom",transition:`all ${S.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},oe(S)),"&-sm":Object.assign({},y(S)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),me=S=>{const{componentCls:c,antCls:b}=S;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:S.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${c}, &-lg > ${c}-group-addon`]:Object.assign({},oe(S)),[`&-sm ${c}, &-sm > ${c}-group-addon`]:Object.assign({},y(S)),[`&-lg ${b}-select-single ${b}-select-selector`]:{height:S.controlHeightLG},[`&-sm ${b}-select-single ${b}-select-selector`]:{height:S.controlHeightSM},[`> ${c}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${c}-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 ${S.paddingInline}px`,color:S.colorText,fontWeight:"normal",fontSize:S.fontSize,textAlign:"center",backgroundColor:S.colorFillAlter,border:`${S.lineWidth}px ${S.lineType} ${S.colorBorder}`,borderRadius:S.borderRadius,transition:`all ${S.motionDurationSlow}`,lineHeight:1,[`${b}-select`]:{margin:`-${S.paddingBlock+1}px -${S.paddingInline}px`,[`&${b}-select-single:not(${b}-select-customize-input)`]:{[`${b}-select-selector`]:{backgroundColor:"inherit",border:`${S.lineWidth}px ${S.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${b}-select-selector`]:{color:S.colorPrimary}}},[`${b}-cascader-picker`]:{margin:`-9px -${S.paddingInline}px`,backgroundColor:"transparent",[`${b}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${c}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${c}-search-with-button &`]:{zIndex:0}}},[`> ${c}:first-child, ${c}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${b}-select ${b}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${c}-affix-wrapper`]:{[`&:not(:first-child) ${c}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${c}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${c}:last-child, ${c}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${b}-select ${b}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${c}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${c}-search &`]:{borderStartStartRadius:S.borderRadius,borderEndStartRadius:S.borderRadius}},[`&:not(:first-child), ${c}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${c}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,T.dF)()),{[`${c}-group-addon, ${c}-group-wrap, > ${c}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:S.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${c}-affix-wrapper,
& > ${c}-number-affix-wrapper,
& > ${b}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-S.lineWidth,borderInlineEndWidth:S.lineWidth},[`${c}`]:{float:"none"},[`& > ${b}-select > ${b}-select-selector,
& > ${b}-select-auto-complete ${c},
& > ${b}-cascader-picker ${c},
& > ${c}-group-wrapper ${c}`]:{borderInlineEndWidth:S.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${b}-select-focused`]:{zIndex:1},[`& > ${b}-select > ${b}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${b}-select:first-child > ${b}-select-selector,
& > ${b}-select-auto-complete:first-child ${c},
& > ${b}-cascader-picker:first-child ${c}`]:{borderStartStartRadius:S.borderRadius,borderEndStartRadius:S.borderRadius},[`& > *:last-child,
& > ${b}-select:last-child > ${b}-select-selector,
& > ${b}-cascader-picker:last-child ${c},
& > ${b}-cascader-picker-focused:last-child ${c}`]:{borderInlineEndWidth:S.lineWidth,borderStartEndRadius:S.borderRadius,borderEndEndRadius:S.borderRadius},[`& > ${b}-select-auto-complete ${c}`]:{verticalAlign:"top"},[`${c}-group-wrapper + ${c}-group-wrapper`]:{marginInlineStart:-S.lineWidth,[`${c}-affix-wrapper`]:{borderRadius:0}},[`${c}-group-wrapper:not(:last-child)`]:{[`&${c}-search > ${c}-group`]:{[`& > ${c}-group-addon > ${c}-search-button`]:{borderRadius:0},[`& > ${c}`]:{borderStartStartRadius:S.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:S.borderRadius}}}})}},Te=S=>{const{componentCls:c,controlHeightSM:b,lineWidth:F}=S,P=(b-F*2-16)/2;return{[c]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,T.Wf)(S)),H(S)),Re(S,c)),{'&[type="color"]':{height:S.controlHeight,[`&${c}-lg`]:{height:S.controlHeightLG},[`&${c}-sm`]:{height:b,paddingTop:P,paddingBottom:P}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},q=S=>{const{componentCls:c}=S;return{[`${c}-clear-icon`]:{margin:0,color:S.colorTextQuaternary,fontSize:S.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${S.motionDurationSlow}`,"&:hover":{color:S.colorTextTertiary},"&:active":{color:S.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${S.inputAffixPadding}px`}}}},Je=S=>{const{componentCls:c,inputAffixPadding:b,colorTextDescription:F,motionDurationSlow:X,colorIcon:P,colorIconHover:Oe,iconCls:je}=S;return{[`${c}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},H(S)),{display:"inline-flex",[`&:not(${c}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},A(S)),{zIndex:1,[`${c}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${c}[disabled]`]:{background:"transparent"}},[`> input${c}`]:{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"'},[`${c}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:S.paddingXS}},"&-show-count-suffix":{color:F},"&-show-count-has-suffix":{marginInlineEnd:S.paddingXXS},"&-prefix":{marginInlineEnd:b},"&-suffix":{marginInlineStart:b}}}),q(S)),{[`${je}${c}-password-icon`]:{color:P,cursor:"pointer",transition:`all ${X}`,"&:hover":{color:Oe}}}),Re(S,`${c}-affix-wrapper`))}},ot=S=>{const{componentCls:c,colorError:b,colorWarning:F,borderRadiusLG:X,borderRadiusSM:P}=S;return{[`${c}-group`]:Object.assign(Object.assign(Object.assign({},(0,T.Wf)(S)),me(S)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${c}-group-addon`]:{borderRadius:X,fontSize:S.fontSizeLG}},"&-sm":{[`${c}-group-addon`]:{borderRadius:P}},"&-status-error":{[`${c}-group-addon`]:{color:b,borderColor:b}},"&-status-warning":{[`${c}-group-addon`]:{color:F,borderColor:F}},"&-disabled":{[`${c}-group-addon`]:Object.assign({},ye(S))},[`&:not(${c}-compact-first-item):not(${c}-compact-last-item)${c}-compact-item`]:{[`${c}, ${c}-group-addon`]:{borderRadius:0}},[`&:not(${c}-compact-last-item)${c}-compact-first-item`]:{[`${c}, ${c}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${c}-compact-first-item)${c}-compact-last-item`]:{[`${c}, ${c}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},Ct=S=>{const{componentCls:c,antCls:b}=S,F=`${c}-search`;return{[F]:{[`${c}`]:{"&:hover, &:focus":{borderColor:S.colorPrimaryHover,[`+ ${c}-group-addon ${F}-button:not(${b}-btn-primary)`]:{borderInlineStartColor:S.colorPrimaryHover}}},[`${c}-affix-wrapper`]:{borderRadius:0},[`${c}-lg`]:{lineHeight:S.lineHeightLG-2e-4},[`> ${c}-group`]:{[`> ${c}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${F}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:S.borderRadius,borderEndEndRadius:S.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${F}-button:not(${b}-btn-primary)`]:{color:S.colorTextDescription,"&:hover":{color:S.colorPrimaryHover},"&:active":{color:S.colorPrimaryActive},[`&${b}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${F}-button`]:{height:S.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${F}-button`]:{height:S.controlHeightLG},[`&-small ${F}-button`]:{height:S.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${c}-compact-item`]:{[`&:not(${c}-compact-last-item)`]:{[`${c}-group-addon`]:{[`${c}-search-button`]:{marginInlineEnd:-S.lineWidth,borderRadius:0}}},[`&:not(${c}-compact-first-item)`]:{[`${c},${c}-affix-wrapper`]:{borderRadius:0}},[`> ${c}-group-addon ${c}-search-button,
> ${c},
${c}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${c}-affix-wrapper-focused`]:{zIndex:2}}}}},Ft=S=>{const{componentCls:c,paddingLG:b}=S,F=`${c}-textarea`;return{[F]:{position:"relative","&-show-count":{[`> ${c}`]:{height:"100%"},[`${c}-data-count`]:{position:"absolute",bottom:-S.fontSize*S.lineHeight,insetInlineEnd:0,color:S.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${c}`]:{paddingInlineEnd:b}},[`&-affix-wrapper${F}-has-feedback`]:{[`${c}`]:{paddingInlineEnd:b}},[`&-affix-wrapper${c}-affix-wrapper`]:{padding:0,[`> textarea${c}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${c}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${c}-clear-icon`]:{position:"absolute",insetInlineEnd:S.paddingXS,insetBlockStart:S.paddingXS},[`${F}-suffix`]:{position:"absolute",top:0,insetInlineEnd:S.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function re(S){return(0,x.TS)(S,{inputAffixPadding:S.paddingXXS})}const Q=S=>{const{controlHeight:c,fontSize:b,lineHeight:F,lineWidth:X,controlHeightSM:P,controlHeightLG:Oe,fontSizeLG:je,lineHeightLG:ze,paddingSM:Ie,controlPaddingHorizontalSM:bt,controlPaddingHorizontal:Xe,colorFillAlter:Ye,colorPrimaryHover:fe,controlOutlineWidth:Y,controlOutline:de,colorErrorOutline:ae,colorWarningOutline:ie}=S;return{paddingBlock:Math.max(Math.round((c-b*F)/2*10)/10-X,3),paddingBlockSM:Math.max(Math.round((P-b*F)/2*10)/10-X,0),paddingBlockLG:Math.ceil((Oe-je*ze)/2*10)/10-X,paddingInline:Ie-X,paddingInlineSM:bt-X,paddingInlineLG:Xe-X,addonBg:Ye,activeBorderColor:fe,hoverBorderColor:fe,activeShadow:`0 0 0 ${Y}px ${de}`,errorActiveShadow:`0 0 0 ${Y}px ${ae}`,warningActiveShadow:`0 0 0 ${Y}px ${ie}`}};De.ZP=(0,W.Z)("Input",S=>{const c=(0,x.TS)(S,re(S));return[Te(c),Ft(c),Je(c),ot(c),Ct(c),(0,w.c)(c)]},Q)},57809:function(rn,De,f){"use strict";var T=f(92310),w=f.n(T),x=f(77861),W=f(2738),v=f(59301),A=f(53487),N=f(62892),ye=f(19080),oe=f(36355),y=f(1684),Re=f(93891),H=f(19716),me=f(32441),Te=f(33234),q=f(14154),Je=f(58582),ot=f(84443),Ct=f(66339),Ft=function(b,F){var X={};for(var P in b)Object.prototype.hasOwnProperty.call(b,P)&&F.indexOf(P)<0&&(X[P]=b[P]);if(b!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Oe=0,P=Object.getOwnPropertySymbols(b);Oe<P.length;Oe++)F.indexOf(P[Oe])<0&&Object.prototype.propertyIsEnumerable.call(b,P[Oe])&&(X[P[Oe]]=b[P[Oe]]);return X};const re="SECRET_COMBOBOX_MODE_DO_NOT_USE",Q=(b,F)=>{var X,{prefixCls:P,bordered:Oe=!0,className:je,rootClassName:ze,getPopupContainer:Ie,popupClassName:bt,dropdownClassName:Xe,listHeight:Ye=256,placement:fe,listItemHeight:Y=24,size:de,disabled:ae,notFoundContent:ie,status:Ue,builtinPlacements:We,dropdownMatchSelectWidth:he,popupMatchSelectWidth:Le,direction:ve,style:Et,allowClear:Tt}=b,wt=Ft(b,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:qe,getPrefixCls:Lt,renderEmpty:lt,direction:Z,virtual:Fe,popupMatchSelectWidth:se,popupOverflow:E,select:I}=v.useContext(oe.E_),M=Lt("select",P),$=Lt(),J=ve!=null?ve:Z,{compactSize:Me,compactItemClassnames:k}=(0,Te.ri)(M,J),[xe,z]=(0,q.Z)(M),ue=v.useMemo(()=>{const{mode:In}=wt;if(In!=="combobox")return In===re?"combobox":In},[wt.mode]),Ce=ue==="multiple"||ue==="tags",be=(0,ot.Z)(wt.suffixIcon,wt.showArrow),pe=(X=Le!=null?Le:he)!==null&&X!==void 0?X:se,{status:G,hasFeedback:ge,isFormItemInput:Pe,feedbackIcon:tt}=v.useContext(me.aM),at=(0,ye.F)(G,Ue);let _e;ie!==void 0?_e=ie:ue==="combobox"?_e=null:_e=(lt==null?void 0:lt("Select"))||v.createElement(Re.Z,{componentName:"Select"});const{suffixIcon:Ee,itemIcon:it,removeIcon:st,clearIcon:tn}=(0,Ct.Z)(Object.assign(Object.assign({},wt),{multiple:Ce,hasFeedback:ge,feedbackIcon:tt,showSuffixIcon:be,prefixCls:M,showArrow:wt.showArrow,componentName:"Select"})),kt=Tt===!0?{clearIcon:tn}:Tt,sn=(0,W.Z)(wt,["suffixIcon","itemIcon"]),Cn=w()(bt||Xe,{[`${M}-dropdown-${J}`]:J==="rtl"},ze,z),fn=(0,H.Z)(In=>{var En;return(En=de!=null?de:Me)!==null&&En!==void 0?En:In}),An=v.useContext(y.Z),Wn=ae!=null?ae:An,xn=w()({[`${M}-lg`]:fn==="large",[`${M}-sm`]:fn==="small",[`${M}-rtl`]:J==="rtl",[`${M}-borderless`]:!Oe,[`${M}-in-form-item`]:Pe},(0,ye.Z)(M,at,ge),k,I==null?void 0:I.className,je,ze,z),Dn=v.useMemo(()=>fe!==void 0?fe:J==="rtl"?"bottomRight":"bottomLeft",[fe,J]),vn=(0,Je.Z)(We,E);return xe(v.createElement(x.ZP,Object.assign({ref:F,virtual:Fe,showSearch:I==null?void 0:I.showSearch},sn,{style:Object.assign(Object.assign({},I==null?void 0:I.style),Et),dropdownMatchSelectWidth:pe,builtinPlacements:vn,transitionName:(0,N.m)($,"slide-up",wt.transitionName),listHeight:Ye,listItemHeight:Y,mode:ue,prefixCls:M,placement:Dn,direction:J,suffixIcon:Ee,menuItemSelectedIcon:it,removeIcon:st,allowClear:kt,notFoundContent:_e,className:xn,getPopupContainer:Ie||qe,dropdownClassName:Cn,disabled:Wn})))},S=v.forwardRef(Q),c=(0,A.Z)(S);S.SECRET_COMBOBOX_MODE_DO_NOT_USE=re,S.Option=x.Wx,S.OptGroup=x.Xo,S._InternalPanelDoNotUseOrYouWillBeFired=c,De.default=S},14154:function(rn,De,f){"use strict";f.d(De,{Z:function(){return S}});var T=f(17313),w=f(74207),x=f(37613),W=f(83116),v=f(13826),A=f(92899);const N=c=>{const{optionHeight:b,optionFontSize:F,optionLineHeight:X,optionPadding:P}=c;return{position:"relative",display:"block",minHeight:b,padding:P,color:c.colorText,fontWeight:"normal",fontSize:F,lineHeight:X,boxSizing:"border-box"}};var oe=c=>{const{antCls:b,componentCls:F}=c,X=`${F}-item`,P=`&${b}-slide-up-enter${b}-slide-up-enter-active`,Oe=`&${b}-slide-up-appear${b}-slide-up-appear-active`,je=`&${b}-slide-up-leave${b}-slide-up-leave-active`,ze=`${F}-dropdown-placement-`;return[{[`${F}-dropdown`]:Object.assign(Object.assign({},(0,T.Wf)(c)),{position:"absolute",top:-9999,zIndex:c.zIndexPopup,boxSizing:"border-box",padding:c.paddingXXS,overflow:"hidden",fontSize:c.fontSize,fontVariant:"initial",backgroundColor:c.colorBgElevated,borderRadius:c.borderRadiusLG,outline:"none",boxShadow:c.boxShadowSecondary,[`
${P}${ze}bottomLeft,
${Oe}${ze}bottomLeft
`]:{animationName:v.fJ},[`
${P}${ze}topLeft,
${Oe}${ze}topLeft,
${P}${ze}topRight,
${Oe}${ze}topRight
`]:{animationName:v.Qt},[`${je}${ze}bottomLeft`]:{animationName:v.Uw},[`
${je}${ze}topLeft,
${je}${ze}topRight
`]:{animationName:v.ly},"&-hidden":{display:"none"},[`${X}`]:Object.assign(Object.assign({},N(c)),{cursor:"pointer",transition:`background ${c.motionDurationSlow} ease`,borderRadius:c.borderRadiusSM,"&-group":{color:c.colorTextDescription,fontSize:c.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},T.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${X}-option-disabled)`]:{backgroundColor:c.optionActiveBg},[`&-selected:not(${X}-option-disabled)`]:{color:c.optionSelectedColor,fontWeight:c.optionSelectedFontWeight,backgroundColor:c.optionSelectedBg,[`${X}-option-state`]:{color:c.colorPrimary}},"&-disabled":{[`&${X}-option-selected`]:{backgroundColor:c.colorBgContainerDisabled},color:c.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:c.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,v.oN)(c,"slide-up"),(0,v.oN)(c,"slide-down"),(0,A.Fm)(c,"move-up"),(0,A.Fm)(c,"move-down")]};const y=2,Re=c=>{let{controlHeightSM:b,controlHeight:F,lineWidth:X}=c;const P=(F-b)/2-X,Oe=Math.ceil(P/2);return[P,Oe]};function H(c,b){const{componentCls:F,iconCls:X}=c,P=`${F}-selection-overflow`,Oe=c.multipleSelectItemHeight,[je]=Re(c),ze=b?`${F}-${b}`:"";return{[`${F}-multiple${ze}`]:{fontSize:c.fontSize,[P]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${F}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${je-y}px ${y*2}px`,borderRadius:c.borderRadius,[`${F}-show-search&`]:{cursor:"text"},[`${F}-disabled&`]:{background:c.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${y}px 0`,lineHeight:`${Oe}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${F}-show-arrow ${F}-selector,
&${F}-allow-clear ${F}-selector
`]:{paddingInlineEnd:c.fontSizeIcon+c.controlPaddingHorizontal},[`${F}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:Oe,marginTop:y,marginBottom:y,lineHeight:`${Oe-c.lineWidth*2}px`,background:c.multipleItemBg,border:`${c.lineWidth}px ${c.lineType} ${c.multipleItemBorderColor}`,borderRadius:c.borderRadiusSM,cursor:"default",transition:`font-size ${c.motionDurationSlow}, line-height ${c.motionDurationSlow}, height ${c.motionDurationSlow}`,userSelect:"none",marginInlineEnd:y*2,paddingInlineStart:c.paddingXS,paddingInlineEnd:c.paddingXS/2,[`${F}-disabled&`]:{color:c.multipleItemColorDisabled,borderColor:c.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:c.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,T.Ro)()),{display:"inline-flex",alignItems:"center",color:c.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${X}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c.colorIconHover}})},[`${P}-item + ${P}-item`]:{[`${F}-selection-search`]:{marginInlineStart:0}},[`${F}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:c.inputPaddingHorizontalBase-je,"\n &-input,\n &-mirror\n ":{height:Oe,fontFamily:c.fontFamily,lineHeight:`${Oe}px`,transition:`all ${c.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${F}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:c.inputPaddingHorizontalBase,insetInlineEnd:c.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${c.motionDurationSlow}`}}}}var Te=c=>{const{componentCls:b}=c,F=(0,x.TS)(c,{controlHeight:c.controlHeightSM,multipleSelectItemHeight:c.controlHeightXS,borderRadius:c.borderRadiusSM,borderRadiusSM:c.borderRadiusXS}),X=(0,x.TS)(c,{fontSize:c.fontSizeLG,controlHeight:c.controlHeightLG,multipleSelectItemHeight:c.multipleItemHeightLG,borderRadius:c.borderRadiusLG,borderRadiusSM:c.borderRadius}),[,P]=Re(c);return[H(c),H(F,"sm"),{[`${b}-multiple${b}-sm`]:{[`${b}-selection-placeholder`]:{insetInline:c.controlPaddingHorizontalSM-c.lineWidth},[`${b}-selection-search`]:{marginInlineStart:P}}},H(X,"lg")]};function q(c,b){const{componentCls:F,inputPaddingHorizontalBase:X,borderRadius:P}=c,Oe=c.controlHeight-c.lineWidth*2,je=Math.ceil(c.fontSize*1.25),ze=b?`${F}-${b}`:"";return{[`${F}-single${ze}`]:{fontSize:c.fontSize,[`${F}-selector`]:Object.assign(Object.assign({},(0,T.Wf)(c)),{display:"flex",borderRadius:P,[`${F}-selection-search`]:{position:"absolute",top:0,insetInlineStart:X,insetInlineEnd:X,bottom:0,"&-input":{width:"100%"}},[`
${F}-selection-item,
${F}-selection-placeholder
`]:{padding:0,lineHeight:`${Oe}px`,transition:`all ${c.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${Oe}px`}},[`${F}-selection-item`]:{position:"relative",userSelect:"none"},[`${F}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${F}-selection-item:after`,`${F}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${F}-show-arrow ${F}-selection-item,
&${F}-show-arrow ${F}-selection-placeholder
`]:{paddingInlineEnd:je},[`&${F}-open ${F}-selection-item`]:{color:c.colorTextPlaceholder},[`&:not(${F}-customize-input)`]:{[`${F}-selector`]:{width:"100%",height:c.controlHeight,padding:`0 ${X}px`,[`${F}-selection-search-input`]:{height:Oe},"&:after":{lineHeight:`${Oe}px`}}},[`&${F}-customize-input`]:{[`${F}-selector`]:{"&:after":{display:"none"},[`${F}-selection-search`]:{position:"static",width:"100%"},[`${F}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${X}px`,"&:after":{display:"none"}}}}}}}function Je(c){const{componentCls:b}=c,F=c.controlPaddingHorizontalSM-c.lineWidth;return[q(c),q((0,x.TS)(c,{controlHeight:c.controlHeightSM,borderRadius:c.borderRadiusSM}),"sm"),{[`${b}-single${b}-sm`]:{[`&:not(${b}-customize-input)`]:{[`${b}-selection-search`]:{insetInlineStart:F,insetInlineEnd:F},[`${b}-selector`]:{padding:`0 ${F}px`},[`&${b}-show-arrow ${b}-selection-search`]:{insetInlineEnd:F+c.fontSize*1.5},[`
&${b}-show-arrow ${b}-selection-item,
&${b}-show-arrow ${b}-selection-placeholder
`]:{paddingInlineEnd:c.fontSize*1.5}}}},q((0,x.TS)(c,{controlHeight:c.singleItemHeightLG,fontSize:c.fontSizeLG,borderRadius:c.borderRadiusLG}),"lg")]}const ot=c=>{const{componentCls:b,selectorBg:F}=c;return{position:"relative",backgroundColor:F,border:`${c.lineWidth}px ${c.lineType} ${c.colorBorder}`,transition:`all ${c.motionDurationMid} ${c.motionEaseInOut}`,input:{cursor:"pointer"},[`${b}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${b}-disabled&`]:{color:c.colorTextDisabled,background:c.colorBgContainerDisabled,cursor:"not-allowed",[`${b}-multiple&`]:{background:c.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},Ct=function(c,b){let F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:X,borderHoverColor:P,outlineColor:Oe,antCls:je}=b,ze=F?{[`${X}-selector`]:{borderColor:P}}:{};return{[c]:{[`&:not(${X}-disabled):not(${X}-customize-input):not(${je}-pagination-size-changer)`]:Object.assign(Object.assign({},ze),{[`${X}-focused& ${X}-selector`]:{borderColor:P,boxShadow:`0 0 0 ${b.controlOutlineWidth}px ${Oe}`,outline:0},[`&:hover ${X}-selector`]:{borderColor:P}})}}},Ft=c=>{const{componentCls:b}=c;return{[`${b}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},re=c=>{const{componentCls:b,inputPaddingHorizontalBase:F,iconCls:X}=c;return{[b]:Object.assign(Object.assign({},(0,T.Wf)(c)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${b}-customize-input) ${b}-selector`]:Object.assign(Object.assign({},ot(c)),Ft(c)),[`${b}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},T.vS),[`${b}-selection-placeholder`]:Object.assign(Object.assign({},T.vS),{flex:1,color:c.colorTextPlaceholder,pointerEvents:"none"}),[`${b}-arrow`]:Object.assign(Object.assign({},(0,T.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:F,height:c.fontSizeIcon,marginTop:-c.fontSizeIcon/2,color:c.colorTextQuaternary,fontSize:c.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[X]:{verticalAlign:"top",transition:`transform ${c.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${b}-suffix)`]:{pointerEvents:"auto"}},[`${b}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${b}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:F,zIndex:1,display:"inline-block",width:c.fontSizeIcon,height:c.fontSizeIcon,marginTop:-c.fontSizeIcon/2,color:c.colorTextQuaternary,fontSize:c.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:c.clearBg,cursor:"pointer",opacity:0,transition:`color ${c.motionDurationMid} ease, opacity ${c.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:c.colorTextTertiary}},"&:hover":{[`${b}-clear`]:{opacity:1}}}),[`${b}-has-feedback`]:{[`${b}-clear`]:{insetInlineEnd:F+c.fontSize+c.paddingXS}}}},Q=c=>{const{componentCls:b}=c;return[{[b]:{[`&-borderless ${b}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${b}-in-form-item`]:{width:"100%"}}},re(c),Je(c),Te(c),oe(c),{[`${b}-rtl`]:{direction:"rtl"}},Ct(b,(0,x.TS)(c,{borderHoverColor:c.colorPrimaryHover,outlineColor:c.controlOutline})),Ct(`${b}-status-error`,(0,x.TS)(c,{borderHoverColor:c.colorErrorHover,outlineColor:c.colorErrorOutline}),!0),Ct(`${b}-status-warning`,(0,x.TS)(c,{borderHoverColor:c.colorWarningHover,outlineColor:c.colorWarningOutline}),!0),(0,w.c)(c,{borderElCls:`${b}-selector`,focusElCls:`${b}-focused`})]};var S=(0,W.Z)("Select",(c,b)=>{let{rootPrefixCls:F}=b;const X=(0,x.TS)(c,{rootPrefixCls:F,inputPaddingHorizontalBase:c.paddingSM-1,multipleSelectItemHeight:c.multipleItemHeight});return[Q(X)]},c=>{const{fontSize:b,lineHeight:F,controlHeight:X,controlPaddingHorizontal:P,zIndexPopupBase:Oe,colorText:je,fontWeightStrong:ze,controlItemBgActive:Ie,controlItemBgHover:bt,colorBgContainer:Xe,colorFillSecondary:Ye,controlHeightLG:fe,controlHeightSM:Y,colorBgContainerDisabled:de,colorTextDisabled:ae}=c;return{zIndexPopup:Oe+50,optionSelectedColor:je,optionSelectedFontWeight:ze,optionSelectedBg:Ie,optionActiveBg:bt,optionPadding:`${(X-b*F)/2}px ${P}px`,optionFontSize:b,optionLineHeight:F,optionHeight:X,selectorBg:Xe,clearBg:Xe,singleItemHeightLG:fe,multipleItemBg:Ye,multipleItemBorderColor:"transparent",multipleItemHeight:Y,multipleItemHeightLG:X,multipleSelectorBgDisabled:de,multipleItemColorDisabled:ae,multipleItemBorderColorDisabled:"transparent"}})},58582:function(rn,De,f){"use strict";f.d(De,{Z:function(){return w}});const T=x=>{const v={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:x==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},v),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},v),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},v),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},v),{points:["br","tr"],offset:[0,-4]})}};function w(x,W){return x||T(W)}},84443:function(rn,De,f){"use strict";f.d(De,{Z:function(){return T}});function T(w,x){return x!==void 0?x:w!==null}},66339:function(rn,De,f){"use strict";f.d(De,{Z:function(){return ye}});var T=f(40001),w=f(19248),x=f(99267),W=f(84105),v=f(58617),A=f(47472),N=f(59301);function ye(oe){let{suffixIcon:y,clearIcon:Re,menuItemSelectedIcon:H,removeIcon:me,loading:Te,multiple:q,hasFeedback:Je,prefixCls:ot,showSuffixIcon:Ct,feedbackIcon:Ft,showArrow:re,componentName:Q}=oe;const S=Re!=null?Re:N.createElement(w.Z,null),c=P=>y===null&&!Je&&!re?null:N.createElement(N.Fragment,null,Ct!==!1&&P,Je&&Ft);let b=null;if(y!==void 0)b=c(y);else if(Te)b=c(N.createElement(v.Z,{spin:!0}));else{const P=`${ot}-suffix`;b=Oe=>{let{open:je,showSearch:ze}=Oe;return c(je&&ze?N.createElement(A.Z,{className:P}):N.createElement(W.Z,{className:P}))}}let F=null;H!==void 0?F=H:q?F=N.createElement(T.Z,null):F=null;let X=null;return me!==void 0?X=me:X=N.createElement(x.Z,null),{clearIcon:S,suffixIcon:b,itemIcon:F,removeIcon:X}}},8378:function(rn,De){"use strict";const f=T=>({[T.componentCls]:{[`${T.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${T.motionDurationMid} ${T.motionEaseInOut},
opacity ${T.motionDurationMid} ${T.motionEaseInOut} !important`}},[`${T.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${T.motionDurationMid} ${T.motionEaseInOut},
opacity ${T.motionDurationMid} ${T.motionEaseInOut} !important`}}});De.Z=f},92899:function(rn,De,f){"use strict";f.d(De,{Fm:function(){return H}});var T=f(36237),w=f(95406);const x=new T.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),W=new T.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),v=new T.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),A=new T.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),N=new T.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ye=new T.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),oe=new T.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),y=new T.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Re={"move-up":{inKeyframes:oe,outKeyframes:y},"move-down":{inKeyframes:x,outKeyframes:W},"move-left":{inKeyframes:v,outKeyframes:A},"move-right":{inKeyframes:N,outKeyframes:ye}},H=(me,Te)=>{const{antCls:q}=me,Je=`${q}-${Te}`,{inKeyframes:ot,outKeyframes:Ct}=Re[Te];return[(0,w.R)(Je,ot,Ct,me.motionDurationMid),{[`
${Je}-enter,
${Je}-appear
`]:{opacity:0,animationTimingFunction:me.motionEaseOutCirc},[`${Je}-leave`]:{animationTimingFunction:me.motionEaseInOutCirc}}]}},13826:function(rn,De,f){"use strict";f.d(De,{Qt:function(){return v},Uw:function(){return W},fJ:function(){return x},ly:function(){return A},oN:function(){return H}});var T=f(36237),w=f(95406);const x=new T.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),W=new T.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),v=new T.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),A=new T.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),N=new T.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),ye=new T.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),oe=new T.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),y=new T.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Re={"slide-up":{inKeyframes:x,outKeyframes:W},"slide-down":{inKeyframes:v,outKeyframes:A},"slide-left":{inKeyframes:N,outKeyframes:ye},"slide-right":{inKeyframes:oe,outKeyframes:y}},H=(me,Te)=>{const{antCls:q}=me,Je=`${q}-${Te}`,{inKeyframes:ot,outKeyframes:Ct}=Re[Te];return[(0,w.R)(Je,ot,Ct,me.motionDurationMid),{[`
${Je}-enter,
${Je}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:me.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${Je}-leave`]:{animationTimingFunction:me.motionEaseInQuint}}]}},89780:function(rn){(function(De,f){rn.exports=f()})(this,function(){"use strict";var De=navigator.userAgent,f=navigator.platform,T=/gecko\/\d/i.test(De),w=/MSIE \d/.test(De),x=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(De),W=/Edge\/(\d+)/.exec(De),v=w||x||W,A=v&&(w?document.documentMode||6:+(W||x)[1]),N=!W&&/WebKit\//.test(De),ye=N&&/Qt\/\d+\.\d+/.test(De),oe=!W&&/Chrome\//.test(De),y=/Opera\//.test(De),Re=/Apple Computer/.test(navigator.vendor),H=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(De),me=/PhantomJS/.test(De),Te=!W&&/AppleWebKit/.test(De)&&/Mobile\/\w+/.test(De),q=/Android/.test(De),Je=Te||q||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(De),ot=Te||/Mac/.test(f),Ct=/\bCrOS\b/.test(De),Ft=/win/i.test(f),re=y&&De.match(/Version\/(\d*\.\d*)/);re&&(re=Number(re[1])),re&&re>=15&&(y=!1,N=!0);var Q=ot&&(ye||y&&(re==null||re<12.11)),S=T||v&&A>=9;function c(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var b=function(e,t){var r=e.className,n=c(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function F(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function X(e,t){return F(e).appendChild(t)}function P(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function Oe(e,t,r,n){var i=P(e,t,r,n);return i.setAttribute("role","presentation"),i}var je;document.createRange?je=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:je=function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(i){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};function ze(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function Ie(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function bt(e,t){var r=e.className;c(t).test(r)||(e.className+=(r?" ":"")+t)}function Xe(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!c(r[n]).test(t)&&(t+=" "+r[n]);return t}var Ye=function(e){e.select()};Te?Ye=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:v&&(Ye=function(e){try{e.select()}catch(t){}});function fe(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Y(e,t,r){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(r!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function de(e,t,r,n,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=n||0,a=i||0;;){var l=e.indexOf(" ",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=r-a%r,o=l+1}}var ae=function(){this.id=null,this.f=null,this.time=0,this.handler=fe(this.onTimeout,this)};ae.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ae.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};function ie(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var Ue=50,We={toString:function(){return"CodeMirror.Pass"}},he={scroll:!1},Le={origin:"*mouse"},ve={origin:"+move"};function Et(e,t,r){for(var n=0,i=0;;){var o=e.indexOf(" ",n);o==-1&&(o=e.length);var a=o-n;if(o==e.length||i+a>=t)return n+Math.min(a,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}var Tt=[""];function wt(e){for(;Tt.length<=e;)Tt.push(qe(Tt)+" ");return Tt[e]}function qe(e){return e[e.length-1]}function Lt(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function lt(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function Z(){}function Fe(e,t){var r;return Object.create?r=Object.create(e):(Z.prototype=e,r=new Z),t&&Y(t,r),r}var se=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function E(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||se.test(e))}function I(e,t){return t?t.source.indexOf("\\w")>-1&&E(e)?!0:t.test(e):E(e)}function M(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var $=/[\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 J(e){return e.charCodeAt(0)>=768&&$.test(e)}function Me(e,t,r){for(;(r<0?t>0:t<e.length)&&J(e.charAt(t));)t+=r;return t}function k(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function xe(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),a.level==1?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}var z=null;function ue(e,t,r){var n;z=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&r=="before"?n=i:z=i),o.from==t&&(o.from!=o.to&&r!="before"?n=i:z=i)}return n!=null?n:z}var Ce=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;function s(u,p,g){this.level=u,this.from=p,this.to=g}return function(u,p){var g=p=="ltr"?"L":"R";if(u.length==0||p=="ltr"&&!n.test(u))return!1;for(var R=u.length,O=[],U=0;U<R;++U)O.push(r(u.charCodeAt(U)));for(var ee=0,we=g;ee<R;++ee){var Be=O[ee];Be=="m"?O[ee]=we:we=Be}for(var Ve=0,$e=g;Ve<R;++Ve){var nt=O[Ve];nt=="1"&&$e=="r"?O[Ve]="n":o.test(nt)&&($e=nt,nt=="r"&&(O[Ve]="R"))}for(var Mt=1,yt=O[0];Mt<R-1;++Mt){var Ut=O[Mt];Ut=="+"&&yt=="1"&&O[Mt+1]=="1"?O[Mt]="1":Ut==","&&yt==O[Mt+1]&&(yt=="1"||yt=="n")&&(O[Mt]=yt),yt=Ut}for(var Sn=0;Sn<R;++Sn){var Qn=O[Sn];if(Qn==",")O[Sn]="N";else if(Qn=="%"){var Ln=void 0;for(Ln=Sn+1;Ln<R&&O[Ln]=="%";++Ln);for(var Sr=Sn&&O[Sn-1]=="!"||Ln<R&&O[Ln]=="1"?"1":"N",hr=Sn;hr<Ln;++hr)O[hr]=Sr;Sn=Ln-1}}for(var Hn=0,vr=g;Hn<R;++Hn){var er=O[Hn];vr=="L"&&er=="1"?O[Hn]="L":o.test(er)&&(vr=er)}for(var jn=0;jn<R;++jn)if(i.test(O[jn])){var Zn=void 0;for(Zn=jn+1;Zn<R&&i.test(O[Zn]);++Zn);for(var Pn=(jn?O[jn-1]:g)=="L",pr=(Zn<R?O[Zn]:g)=="L",Wi=Pn==pr?Pn?"L":"R":g,ai=jn;ai<Zn;++ai)O[ai]=Wi;jn=Zn-1}for(var ir=[],Zr,Jn=0;Jn<R;)if(a.test(O[Jn])){var ba=Jn;for(++Jn;Jn<R&&a.test(O[Jn]);++Jn);ir.push(new s(0,ba,Jn))}else{var Vr=Jn,yi=ir.length,bi=p=="rtl"?1:0;for(++Jn;Jn<R&&O[Jn]!="L";++Jn);for(var sr=Vr;sr<Jn;)if(l.test(O[sr])){Vr<sr&&(ir.splice(yi,0,new s(1,Vr,sr)),yi+=bi);var zi=sr;for(++sr;sr<Jn&&l.test(O[sr]);++sr);ir.splice(yi,0,new s(2,zi,sr)),yi+=bi,Vr=sr}else++sr;Vr<Jn&&ir.splice(yi,0,new s(1,Vr,Jn))}return p=="ltr"&&(ir[0].level==1&&(Zr=u.match(/^\s+/))&&(ir[0].from=Zr[0].length,ir.unshift(new s(0,0,Zr[0].length))),qe(ir).level==1&&(Zr=u.match(/\s+$/))&&(qe(ir).to-=Zr[0].length,ir.push(new s(0,R-Zr[0].length,R)))),p=="rtl"?ir.reverse():ir}}();function be(e,t){var r=e.order;return r==null&&(r=e.order=Ce(e.text,t)),r}var pe=[],G=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||pe).concat(r)}};function ge(e,t){return e._handlers&&e._handlers[t]||pe}function Pe(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=ie(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function tt(e,t){var r=ge(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function at(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),tt(e,r||t.type,e,t),kt(t)||t.codemirrorIgnore}function _e(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)ie(r,t[n])==-1&&r.push(t[n])}function Ee(e,t){return ge(e,t).length>0}function it(e){e.prototype.on=function(t,r){G(this,t,r)},e.prototype.off=function(t,r){Pe(this,t,r)}}function st(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function tn(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function kt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function sn(e){st(e),tn(e)}function Cn(e){return e.target||e.srcElement}function fn(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),ot&&e.ctrlKey&&t==1&&(t=3),t}var An=function(){if(v&&A<9)return!1;var e=P("div");return"draggable"in e||"dragDrop"in e}(),Wn;function xn(e){if(Wn==null){var t=P("span","\u200B");X(e,P("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Wn=t.offsetWidth<=1&&t.offsetHeight>2&&!(v&&A<8))}var r=Wn?P("span","\u200B"):P("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var Dn;function vn(e){if(Dn!=null)return Dn;var t=X(e,document.createTextNode("A\u062EA")),r=je(t,0,1).getBoundingClientRect(),n=je(t,1,2).getBoundingClientRect();return F(e),!r||r.left==r.right?!1:Dn=n.right-r.right<3}var In=`
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf(`
`,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),a=o.indexOf("\r");a!=-1?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},En=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(r){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},pn=function(){var e=P("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Tn=null;function on(e){if(Tn!=null)return Tn;var t=X(e,P("span","x")),r=t.getBoundingClientRect(),n=je(t,0,1).getBoundingClientRect();return Tn=Math.abs(r.left-n.left)>1}var Nn={},zn={};function or(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Nn[e]=t}function gr(e,t){zn[e]=t}function qt(e){if(typeof e=="string"&&zn.hasOwnProperty(e))e=zn[e];else if(e&&typeof e.name=="string"&&zn.hasOwnProperty(e.name)){var t=zn[e.name];typeof t=="string"&&(t={name:t}),e=Fe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return qt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return qt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function ut(e,t){t=qt(t);var r=Nn[t.name];if(!r)return ut(e,"text/plain");var n=r(e,t);if(jt.hasOwnProperty(t.name)){var i=jt[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}var jt={};function m(e,t){var r=jt.hasOwnProperty(e)?jt[e]:jt[e]={};Y(t,r)}function B(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function K(e,t){for(var r;e.innerMode&&(r=e.innerMode(t),!(!r||r.mode==e));)t=r.state,e=r.mode;return r||{mode:e,state:t}}function h(e,t,r){return e.startState?e.startState(t,r):!0}var d=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};d.prototype.eol=function(){return this.pos>=this.string.length},d.prototype.sol=function(){return this.pos==this.lineStart},d.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},d.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},d.prototype.eat=function(e){var t=this.string.charAt(this.pos),r;if(typeof e=="string"?r=t==e:r=t&&(e.test?e.test(t):e(t)),r)return++this.pos,t},d.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},d.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},d.prototype.skipToEnd=function(){this.pos=this.string.length},d.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},d.prototype.backUp=function(e){this.pos-=e},d.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=de(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?de(this.string,this.lineStart,this.tabSize):0)},d.prototype.indentation=function(){return de(this.string,null,this.tabSize)-(this.lineStart?de(this.string,this.lineStart,this.tabSize):0)},d.prototype.match=function(e,t,r){if(typeof e=="string"){var n=function(a){return r?a.toLowerCase():a},i=this.string.substr(this.pos,e.length);if(n(i)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var o=this.string.slice(this.pos).match(e);return o&&o.index>0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},d.prototype.current=function(){return this.string.slice(this.start,this.pos)},d.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},d.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},d.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function C(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function D(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(o){var a=o.text;i==r.line&&(a=a.slice(0,r.ch)),i==t.line&&(a=a.slice(t.ch)),n.push(a),++i}),n}function ne(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function _(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function j(e){if(e.parent==null)return null;for(var t=e.parent,r=ie(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function le(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a],s=l.height;if(t<s)break;t-=s}return r+a}function ce(e,t){return t>=e.first&&t<e.first+e.size}function He(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function L(e,t,r){if(r===void 0&&(r=null),!(this instanceof L))return new L(e,t,r);this.line=e,this.ch=t,this.sticky=r}function V(e,t){return e.line-t.line||e.ch-t.ch}function Qe(e,t){return e.sticky==t.sticky&&V(e,t)==0}function Se(e){return L(e.line,e.ch)}function Ke(e,t){return V(e,t)<0?t:e}function Ne(e,t){return V(e,t)<0?e:t}function ft(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function te(e,t){if(t.line<e.first)return L(e.first,0);var r=e.first+e.size-1;return t.line>r?L(r,C(e,r).text.length):et(t,C(e,t.line).text.length)}function et(e,t){var r=e.ch;return r==null||r>t?L(e.line,t):r<0?L(e.line,0):e}function St(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=te(e,t[n]);return r}var Pt=function(e,t){this.state=e,this.lookAhead=t},rt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};rt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},rt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},rt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},rt.fromSaved=function(e,t,r){return t instanceof Pt?new rt(e,B(e.mode,t.state),r,t.lookAhead):new rt(e,B(e.mode,t),r)},rt.prototype.save=function(e){var t=e!==!1?B(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Pt(t,this.maxLookAhead):t};function mt(e,t,r,n){var i=[e.state.modeGen],o={};Xt(e,t.text,e.doc.mode,r,function(u,p){return i.push(u,p)},o,n);for(var a=r.state,l=function(u){r.baseTokens=i;var p=e.state.overlays[u],g=1,R=0;r.state=!0,Xt(e,t.text,p.mode,r,function(O,U){for(var ee=g;R<O;){var we=i[g];we>O&&i.splice(g,1,O,i[g+1],we),g+=2,R=Math.min(O,we)}if(U)if(p.opaque)i.splice(ee,g-ee,O,"overlay "+U),g=ee+2;else for(;ee<g;ee+=2){var Be=i[ee+1];i[ee+1]=(Be?Be+" ":"")+"overlay "+U}},o),r.state=a,r.baseTokens=null,r.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function zt(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Ae(e,j(t)),i=t.text.length>e.options.maxHighlightLength&&B(e.doc.mode,n.state),o=mt(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ae(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new rt(n,!0,t);var o=Nt(e,t,r),a=o>n.first&&C(n,o-1).stateAfter,l=a?rt.fromSaved(n,a,o):new rt(n,h(n.mode),o);return n.iter(o,t,function(s){ke(e,s.text,l);var u=l.line;s.stateAfter=u==t-1||u%5==0||u>=i.viewFrom&&u<i.viewTo?l.save():null,l.nextLine()}),r&&(n.modeFrontier=l.line),l}function ke(e,t,r,n){var i=e.doc.mode,o=new d(t,e.options.tabSize,r);for(o.start=o.pos=n||0,t==""&&dt(i,r.state);!o.eol();)gt(i,o,r.state),o.start=o.pos}function dt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=K(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}}function gt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=K(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var Zt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Gt(e,t,r,n){var i=e.doc,o=i.mode,a;t=te(i,t);var l=C(i,t.line),s=Ae(e,t.line,r),u=new d(l.text,e.options.tabSize,s),p;for(n&&(p=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,a=gt(o,u,s.state),n&&p.push(new Zt(u,a,B(i.mode,s.state)));return n?p:new Zt(u,a,s.state)}function Vt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";t[n]==null?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function Xt(e,t,r,n,i,o,a){var l=r.flattenSpans;l==null&&(l=e.options.flattenSpans);var s=0,u=null,p=new d(t,e.options.tabSize,n),g,R=e.options.addModeClass&&[null];for(t==""&&Vt(dt(r,n.state),o);!p.eol();){if(p.pos>e.options.maxHighlightLength?(l=!1,a&&ke(e,t,n,p.pos),p.pos=t.length,g=null):g=Vt(gt(r,p,n.state,R),o),R){var O=R[0].name;O&&(g="m-"+(g?O+" "+g:O))}if(!l||u!=g){for(;s<p.start;)s=Math.min(p.start,s+5e3),i(s,u);u=g}p.start=p.pos}for(;s<p.pos;){var U=Math.min(p.pos,s+5e3);i(U,u),s=U}}function Nt(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=C(o,l-1),u=s.stateAfter;if(u&&(!r||l+(u instanceof Pt?u.lookAhead:0)<=o.modeFrontier))return l;var p=de(s.text,null,e.options.tabSize);(i==null||n>p)&&(i=l-1,n=p)}return i}function Rt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=C(e,n).stateAfter;if(i&&(!(i instanceof Pt)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var Ht=!1,Dt=!1;function cn(){Ht=!0}function $t(){Dt=!0}function _t(e,t,r){this.marker=e,this.from=t,this.to=r}function an(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Yt(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function wn(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Un(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=o.from==null||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&a.type=="bookmark"&&(!r||!o.marker.insertLeft)){var s=o.to==null||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new _t(a,o.from,s?null:o.to))}}return n}function At(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=o.to==null||(a.inclusiveRight?o.to>=t:o.to>t);if(l||o.from==t&&a.type=="bookmark"&&(!r||o.marker.insertLeft)){var s=o.from==null||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new _t(a,s?null:o.from-t,o.to==null?null:o.to-t))}}return n}function ht(e,t){if(t.full)return null;var r=ce(e,t.from.line)&&C(e,t.from.line).markedSpans,n=ce(e,t.to.line)&&C(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=V(t.from,t.to)==0,l=Un(r,i,a),s=At(n,o,a),u=t.text.length==1,p=qe(t.text).length+(u?i:0);if(l)for(var g=0;g<l.length;++g){var R=l[g];if(R.to==null){var O=an(s,R.marker);O?u&&(R.to=O.to==null?null:O.to+p):R.to=i}}if(s)for(var U=0;U<s.length;++U){var ee=s[U];if(ee.to!=null&&(ee.to+=p),ee.from==null){var we=an(l,ee.marker);we||(ee.from=p,u&&(l||(l=[])).push(ee))}else ee.from+=p,u&&(l||(l=[])).push(ee)}l&&(l=vt(l)),s&&s!=l&&(s=vt(s));var Be=[l];if(!u){var Ve=t.text.length-2,$e;if(Ve>0&&l)for(var nt=0;nt<l.length;++nt)l[nt].to==null&&($e||($e=[])).push(new _t(l[nt].marker,null,null));for(var Mt=0;Mt<Ve;++Mt)Be.push($e);Be.push(s)}return Be}function vt(e){for(var t=0;t<e.length;++t){var r=e[t];r.from!=null&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function en(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(O){if(O.markedSpans)for(var U=0;U<O.markedSpans.length;++U){var ee=O.markedSpans[U].marker;ee.readOnly&&(!n||ie(n,ee)==-1)&&(n||(n=[])).push(ee)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],l=a.find(0),s=0;s<i.length;++s){var u=i[s];if(!(V(u.to,l.from)<0||V(u.from,l.to)>0)){var p=[s,1],g=V(u.from,l.from),R=V(u.to,l.to);(g<0||!a.inclusiveLeft&&!g)&&p.push({from:u.from,to:l.from}),(R>0||!a.inclusiveRight&&!R)&&p.push({from:l.to,to:u.to}),i.splice.apply(i,p),s+=p.length-3}}return i}function nn(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Qt(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Wt(e){return e.inclusiveLeft?-1:0}function ln(e){return e.inclusiveRight?1:0}function gn(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),o=V(n.from,i.from)||Wt(e)-Wt(t);if(o)return-o;var a=V(n.to,i.to)||ln(e)-ln(t);return a||t.id-e.id}function mn(e,t){var r=Dt&&e.markedSpans,n;if(r)for(var i=void 0,o=0;o<r.length;++o)i=r[o],i.marker.collapsed&&(t?i.from:i.to)==null&&(!n||gn(n,i.marker)<0)&&(n=i.marker);return n}function Fn(e){return mn(e,!0)}function Ge(e){return mn(e,!1)}function Ze(e,t){var r=Dt&&e.markedSpans,n;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(o.from==null||o.from<t)&&(o.to==null||o.to>t)&&(!n||gn(n,o.marker)<0)&&(n=o.marker)}return n}function xt(e,t,r,n,i){var o=C(e,t),a=Dt&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var u=s.marker.find(0),p=V(u.from,r)||Wt(s.marker)-Wt(i),g=V(u.to,n)||ln(s.marker)-ln(i);if(!(p>=0&&g<=0||p<=0&&g>=0)&&(p<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?V(u.to,r)>=0:V(u.to,r)>0)||p>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?V(u.from,n)<=0:V(u.from,n)<0)))return!0}}}function Ot(e){for(var t;t=Fn(e);)e=t.find(-1,!0).line;return e}function hn(e){for(var t;t=Ge(e);)e=t.find(1,!0).line;return e}function xr(e){for(var t,r;t=Ge(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function _n(e,t){var r=C(e,t),n=Ot(r);return r==n?t:j(n)}function Kn(e,t){if(t>e.lastLine())return t;var r=C(e,t),n;if(!Bn(e,r))return t;for(;n=Ge(r);)r=n.find(1,!0).line;return j(r)+1}function Bn(e,t){var r=Dt&&t.markedSpans;if(r){for(var n=void 0,i=0;i<r.length;++i)if(n=r[i],!!n.marker.collapsed){if(n.from==null)return!0;if(!n.marker.widgetNode&&n.from==0&&n.marker.inclusiveLeft&&kn(e,t,n))return!0}}}function kn(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return kn(e,n.line,an(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(i.to==null||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&kn(e,t,i))return!0}function Mn(e){e=Ot(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==r)break;t+=l.height}return t}function ur(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=Fn(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Ge(n);){var o=r.find(0,!0);t-=n.text.length-o.from.ch,n=o.to.line,t+=n.text.length-o.to.ch}return t}function qn(e){var t=e.display,r=e.doc;t.maxLine=C(r,r.first),t.maxLineLength=ur(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=ur(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var tr=function(e,t,r){this.text=e,Qt(this,t),this.height=r?r(this):1};tr.prototype.lineNo=function(){return j(this)},it(tr);function _r(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),nn(e),Qt(e,r);var i=n?n(e):1;i!=e.height&&_(e,i)}function Xr(e){e.parent=null,nn(e)}var li={},Yr={};function Cr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Yr:li;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Qr(e,t){var r=Oe("span",null,null,N?"padding-right: .1px":null),n={pre:Oe("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;n.pos=0,n.addToken=Hi,vn(e.display.measure)&&(a=be(o,e.doc.direction))&&(n.addToken=si(n.addToken,a)),n.map=[];var l=t!=e.display.externalMeasured&&j(o);xi(o,n,zt(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=Xe(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=Xe(o.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(xn(e.display.measure))),i==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(N){var s=n.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return tt(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=Xe(n.pre.className,n.textClass||"")),n}function Ir(e){var t=P("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Hi(e,t,r,n,i,o,a){if(t){var l=e.splitSpaces?Si(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,p;if(!s.test(t))e.col+=t.length,p=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,p),v&&A<9&&(u=!0),e.pos+=t.length;else{p=document.createDocumentFragment();for(var g=0;;){s.lastIndex=g;var R=s.exec(t),O=R?R.index-g:t.length-g;if(O){var U=document.createTextNode(l.slice(g,g+O));v&&A<9?p.appendChild(P("span",[U])):p.appendChild(U),e.map.push(e.pos,e.pos+O,U),e.col+=O,e.pos+=O}if(!R)break;g+=O+1;var ee=void 0;if(R[0]==" "){var we=e.cm.options.tabSize,Be=we-e.col%we;ee=p.appendChild(P("span",wt(Be),"cm-tab")),ee.setAttribute("role","presentation"),ee.setAttribute("cm-text"," "),e.col+=Be}else R[0]=="\r"||R[0]==`
`?(ee=p.appendChild(P("span",R[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ee.setAttribute("cm-text",R[0]),e.col+=1):(ee=e.cm.options.specialCharPlaceholder(R[0]),ee.setAttribute("cm-text",R[0]),v&&A<9?p.appendChild(P("span",[ee])):p.appendChild(ee),e.col+=1);e.map.push(e.pos,e.pos+1,ee),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,r||n||i||u||o||a){var Ve=r||"";n&&(Ve+=n),i&&(Ve+=i);var $e=P("span",[p],Ve,o);if(a)for(var nt in a)a.hasOwnProperty(nt)&&nt!="style"&&nt!="class"&&$e.setAttribute(nt,a[nt]);return e.content.appendChild($e)}e.content.appendChild(p)}}function Si(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);o==" "&&r&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(o="\xA0"),n+=o,r=o==" "}return n}function si(e,t){return function(r,n,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var u=r.pos,p=u+n.length;;){for(var g=void 0,R=0;R<t.length&&(g=t[R],!(g.to>u&&g.from<=u));R++);if(g.to>=p)return e(r,n,i,o,a,l,s);e(r,n.slice(0,g.to-u),i,o,null,l,s),o=null,n=n.slice(g.to-u),u=g.to}}}function Kr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function xi(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(!n){for(var a=1;a<r.length;a+=2)t.addToken(t,i.slice(o,o=r[a]),Cr(r[a+1],t.cm.options));return}for(var l=i.length,s=0,u=1,p="",g,R,O=0,U,ee,we,Be,Ve;;){if(O==s){U=ee=we=R="",Ve=null,Be=null,O=1/0;for(var $e=[],nt=void 0,Mt=0;Mt<n.length;++Mt){var yt=n[Mt],Ut=yt.marker;if(Ut.type=="bookmark"&&yt.from==s&&Ut.widgetNode)$e.push(Ut);else if(yt.from<=s&&(yt.to==null||yt.to>s||Ut.collapsed&&yt.to==s&&yt.from==s)){if(yt.to!=null&&yt.to!=s&&O>yt.to&&(O=yt.to,ee=""),Ut.className&&(U+=" "+Ut.className),Ut.css&&(R=(R?R+";":"")+Ut.css),Ut.startStyle&&yt.from==s&&(we+=" "+Ut.startStyle),Ut.endStyle&&yt.to==O&&(nt||(nt=[])).push(Ut.endStyle,yt.to),Ut.title&&((Ve||(Ve={})).title=Ut.title),Ut.attributes)for(var Sn in Ut.attributes)(Ve||(Ve={}))[Sn]=Ut.attributes[Sn];Ut.collapsed&&(!Be||gn(Be.marker,Ut)<0)&&(Be=yt)}else yt.from>s&&O>yt.from&&(O=yt.from)}if(nt)for(var Qn=0;Qn<nt.length;Qn+=2)nt[Qn+1]==O&&(ee+=" "+nt[Qn]);if(!Be||Be.from==s)for(var Ln=0;Ln<$e.length;++Ln)Kr(t,0,$e[Ln]);if(Be&&(Be.from||0)==s){if(Kr(t,(Be.to==null?l+1:Be.to)-s,Be.marker,Be.from==null),Be.to==null)return;Be.to==s&&(Be=!1)}}if(s>=l)break;for(var Sr=Math.min(l,O);;){if(p){var hr=s+p.length;if(!Be){var Hn=hr>Sr?p.slice(0,Sr-s):p;t.addToken(t,Hn,g?g+U:U,we,s+Hn.length==O?ee:"",R,Ve)}if(hr>=Sr){p=p.slice(Sr-s),s=Sr;break}s=hr,we=""}p=i.slice(o,o=r[u++]),g=Cr(r[u++],t.cm.options)}}}function Ci(e,t,r){this.line=t,this.rest=xr(t),this.size=this.rest?j(qe(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Bn(e,t)}function jr(e,t,r){for(var n=[],i,o=t;o<r;o=i){var a=new Ci(e.doc,C(e.doc,o),o);i=o+a.size,n.push(a)}return n}var Ar=null;function ui(e){Ar?Ar.ops.push(e):e.ownsGroup=Ar={ops:[e],delayedCallbacks:[]}}function pt(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function Bt(e,t){var r=e.ownsGroup;if(r)try{pt(r)}finally{Ar=null,t(r)}}var It=null;function ct(e,t){var r=ge(e,t);if(r.length){var n=Array.prototype.slice.call(arguments,2),i;Ar?i=Ar.delayedCallbacks:It?i=It:(i=It=[],setTimeout(yn,0));for(var o=function(l){i.push(function(){return r[l].apply(null,n)})},a=0;a<r.length;++a)o(a)}}function yn(){var e=It;It=null;for(var t=0;t<e.length;++t)e[t]()}function bn(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?Gn(e,t):o=="gutter"?ci(e,t,r,n):o=="class"?Rr(e,t):o=="widget"&&Zi(e,t,n)}t.changes=null}function cr(e){return e.node==e.text&&(e.node=P("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),v&&A<8&&(e.node.style.zIndex=2)),e.node}function Mr(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=cr(t);t.background=n.insertBefore(P("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Nr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Qr(e,t)}function Gn(e,t){var r=t.text.className,n=Nr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,Rr(e,t)):r&&(t.text.className=r)}function Rr(e,t){Mr(e,t),t.line.wrapClass?cr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function ci(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=cr(t);t.gutterBackground=P("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=cr(t),l=t.gutter=P("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!o||!o["CodeMirror-linenumbers"])&&(t.lineNumber=l.appendChild(P("div",He(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var u=e.display.gutterSpecs[s].className,p=o.hasOwnProperty(u)&&o[u];p&&l.appendChild(P("div",[p],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function Zi(e,t,r){t.alignable&&(t.alignable=null);for(var n=c("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);zr(e,t,r)}function mo(e,t,r,n){var i=Nr(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Rr(e,t),ci(e,t,r,n),zr(e,t,n),t.node}function zr(e,t,r){if(Fr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Fr(e,t.rest[n],t,r,!1)}function Fr(e,t,r,n,i){if(t.widgets)for(var o=cr(r),a=0,l=t.widgets;a<l.length;++a){var s=l[a],u=P("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Zo(s,u,r,n),e.display.input.setUneditable(u),i&&s.above?o.insertBefore(u,r.gutter||r.text):o.appendChild(u),ct(s,"redraw")}}function Zo(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Lr(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!ze(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),X(t.display.measure,P("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Br(e,t){for(var r=Cn(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function Ei(e){return e.lineSpace.offsetTop}function _i(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function yo(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=X(e.measure,P("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function Dr(e){return Ue-e.display.nativeBarWidth}function Hr(e){return e.display.scroller.clientWidth-Dr(e)-e.display.barWidth}function Ki(e){return e.display.scroller.clientHeight-Dr(e)-e.display.barHeight}function bo(e,t,r){var n=e.options.lineWrapping,i=n&&Hr(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],u=a[l+1];Math.abs(s.bottom-u.bottom)>2&&o.push((s.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function ji(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(j(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function _o(e,t){t=Ot(t);var r=j(t),n=e.display.externalMeasured=new Ci(e.doc,t,r);n.lineN=r;var i=n.built=Qr(e,n);return n.text=i.pre,X(e.display.lineMeasure,i.pre),n}function Ui(e,t,r,n){return Tr(e,Jr(e,t),r,n)}function ki(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[hi(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function Jr(e,t){var r=j(t),n=ki(e,r);n&&!n.text?n=null:n&&n.changes&&(bn(e,n,r,ko(e)),e.curOp.forceUpdate=!0),n||(n=_o(e,t));var i=ji(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Tr(e,t,r,n,i){t.before&&(r=-1);var o=r+(n||""),a;return t.cache.hasOwnProperty(o)?a=t.cache[o]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(bo(e,t.view,t.rect),t.hasHeights=!0),a=Jt(e,t,r,n),a.bogus||(t.cache[o]=a)),{left:a.left,right:a.right,top:i?a.rtop:a.top,bottom:i?a.rbottom:a.bottom}}var So={left:0,right:0,top:0,bottom:0};function Gi(e,t,r){for(var n,i,o,a,l,s,u=0;u<e.length;u+=3)if(l=e[u],s=e[u+1],t<l?(i=0,o=1,a="left"):t<s?(i=t-l,o=i+1):(u==e.length-3||t==s&&e[u+3]>t)&&(o=s-l,i=o-1,t>=s&&(a="right")),i!=null){if(n=e[u+2],l==s&&r==(n.insertLeft?"left":"right")&&(a=r),r=="left"&&i==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[(u-=3)+2],a="left";if(r=="right"&&i==s-l)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function Vi(e,t){var r=So;if(t=="left")for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function Jt(e,t,r,n){var i=Gi(t.map,r,n),o=i.node,a=i.start,l=i.end,s=i.collapse,u;if(o.nodeType==3){for(var p=0;p<4;p++){for(;a&&J(t.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l<i.coverEnd&&J(t.line.text.charAt(i.coverStart+l));)++l;if(v&&A<9&&a==0&&l==i.coverEnd-i.coverStart?u=o.parentNode.getBoundingClientRect():u=Vi(je(o,a,l).getClientRects(),n),u.left||u.right||a==0)break;l=a,a=a-1,s="right"}v&&A<11&&(u=Kt(e.display.measure,u))}else{a>0&&(s=n="right");var g;e.options.lineWrapping&&(g=o.getClientRects()).length>1?u=g[n=="right"?g.length-1:0]:u=o.getBoundingClientRect()}if(v&&A<9&&!a&&(!u||!u.left&&!u.right)){var R=o.parentNode.getClientRects()[0];R?u={left:R.left,right:R.left+Oi(e.display),top:R.top,bottom:R.bottom}:u=So}for(var O=u.top-t.rect.top,U=u.bottom-t.rect.top,ee=(O+U)/2,we=t.view.measure.heights,Be=0;Be<we.length-1&&!(ee<we[Be]);Be++);var Ve=Be?we[Be-1]:0,$e=we[Be],nt={left:(s=="right"?u.right:u.left)-t.rect.left,right:(s=="left"?u.left:u.right)-t.rect.left,top:Ve,bottom:$e};return!u.left&&!u.right&&(nt.bogus=!0),e.options.singleCursorHeightPerLine||(nt.rtop=O,nt.rbottom=U),nt}function Kt(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!on(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function Vn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function nr(e){e.display.externalMeasure=null,F(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Vn(e.display.view[t])}function On(e){nr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ar(){return oe&&q?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function mr(){return oe&&q?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ur(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=Lr(e.widgets[r]));return t}function Er(e,t,r,n,i){if(!i){var o=Ur(t);r.top+=o,r.bottom+=o}if(n=="line")return r;n||(n="local");var a=Mn(t);if(n=="local"?a+=Ei(e.display):a-=e.display.viewOffset,n=="page"||n=="window"){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+(n=="window"?0:mr());var s=l.left+(n=="window"?0:ar());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function kr(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=ar(),i-=mr();else if(r=="local"||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function Pr(e,t,r,n,i){return n||(n=C(e.doc,t.line)),Er(e,n,Ui(e,n,t.ch,i),r)}function yr(e,t,r,n,i,o){n=n||C(e.doc,t.line),i||(i=Jr(e,n));function a(U,ee){var we=Tr(e,i,U,ee?"right":"left",o);return ee?we.left=we.right:we.right=we.left,Er(e,n,we,r)}var l=be(n,e.doc.direction),s=t.ch,u=t.sticky;if(s>=n.text.length?(s=n.text.length,u="before"):s<=0&&(s=0,u="after"),!l)return a(u=="before"?s-1:s,u=="before");function p(U,ee,we){var Be=l[ee],Ve=Be.level==1;return a(we?U-1:U,Ve!=we)}var g=ue(l,s,u),R=z,O=p(s,g,u=="before");return R!=null&&(O.other=p(s,R,u!="before")),O}function xa(e,t){var r=0;t=te(e.doc,t),e.options.lineWrapping||(r=Oi(e.display)*t.ch);var n=C(e.doc,t.line),i=Mn(n)+Ei(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Ko(e,t,r,n,i){var o=L(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function jo(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return Ko(n.first,0,null,-1,-1);var i=le(n,r),o=n.first+n.size-1;if(i>o)return Ko(n.first+n.size-1,C(n,o).text.length,null,1,1);t<0&&(t=0);for(var a=C(n,i);;){var l=Zl(e,a,i,t,r),s=Ze(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var u=s.find(1);if(u.line==i)return u;a=C(n,i=u.line)}}function Ca(e,t,r,n){n-=Ur(t);var i=t.text.length,o=k(function(a){return Tr(e,r,a-1).bottom<=n},i,0);return i=k(function(a){return Tr(e,r,a).top>n},o,i),{begin:o,end:i}}function Ea(e,t,r,n){r||(r=Jr(e,t));var i=Er(e,t,Tr(e,r,n),"line").top;return Ca(e,t,r,i)}function Uo(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Zl(e,t,r,n,i){i-=Mn(t);var o=Jr(e,t),a=Ur(t),l=0,s=t.text.length,u=!0,p=be(t,e.doc.direction);if(p){var g=(e.options.lineWrapping?Kl:_l)(e,t,r,o,p,n,i);u=g.level!=1,l=u?g.from:g.to-1,s=u?g.to:g.from-1}var R=null,O=null,U=k(function(Mt){var yt=Tr(e,o,Mt);return yt.top+=a,yt.bottom+=a,Uo(yt,n,i,!1)?(yt.top<=i&&yt.left<=n&&(R=Mt,O=yt),!0):!1},l,s),ee,we,Be=!1;if(O){var Ve=n-O.left<O.right-n,$e=Ve==u;U=R+($e?0:1),we=$e?"after":"before",ee=Ve?O.left:O.right}else{!u&&(U==s||U==l)&&U++,we=U==0?"after":U==t.text.length?"before":Tr(e,o,U-(u?1:0)).bottom+a<=i==u?"after":"before";var nt=yr(e,L(r,U,we),"line",t,o);ee=nt.left,Be=i<nt.top?-1:i>=nt.bottom?1:0}return U=Me(t.text,U,1),Ko(r,U,we,Be,n-ee)}function _l(e,t,r,n,i,o,a){var l=k(function(g){var R=i[g],O=R.level!=1;return Uo(yr(e,L(r,O?R.to:R.from,O?"before":"after"),"line",t,n),o,a,!0)},0,i.length-1),s=i[l];if(l>0){var u=s.level!=1,p=yr(e,L(r,u?s.from:s.to,u?"after":"before"),"line",t,n);Uo(p,o,a,!0)&&p.top>a&&(s=i[l-1])}return s}function Kl(e,t,r,n,i,o,a){var l=Ca(e,t,n,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var p=null,g=null,R=0;R<i.length;R++){var O=i[R];if(!(O.from>=u||O.to<=s)){var U=O.level!=1,ee=Tr(e,n,U?Math.min(u,O.to)-1:Math.max(s,O.from)).right,we=ee<o?o-ee+1e9:ee-o;(!p||g>we)&&(p=O,g=we)}}return p||(p=i[i.length-1]),p.from<s&&(p={from:s,to:p.to,level:p.level}),p.to>u&&(p={from:p.from,to:u,level:p.level}),p}var fi;function wi(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(fi==null){fi=P("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)fi.appendChild(document.createTextNode("x")),fi.appendChild(P("br"));fi.appendChild(document.createTextNode("x"))}X(e.measure,fi);var r=fi.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),F(e.measure),r||1}function Oi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=P("span","xxxxxxxxxx"),r=P("pre",[t],"CodeMirror-line-like");X(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ko(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;r[l]=o.offsetLeft+o.clientLeft+i,n[l]=o.clientWidth}return{fixedPos:Go(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Go(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function wa(e){var t=wi(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Oi(e.display)-3);return function(i){if(Bn(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function Vo(e){var t=e.doc,r=wa(e);t.iter(function(n){var i=r(n);i!=n.height&&_(n,i)})}function di(e,t,r,n){var i=e.display;if(!r&&Cn(t).getAttribute("cm-not-content")=="true")return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(g){return null}var s=jo(e,o,a),u;if(n&&s.xRel>0&&(u=C(e.doc,s.line).text).length==s.ch){var p=de(u,u.length,e.options.tabSize)-u.length;s=L(s.line,Math.max(0,Math.round((o-yo(e.display).left)/Oi(e.display))-p))}return s}function hi(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function fr(e,t,r,n){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Dt&&_n(e.doc,t)<i.viewTo&&ei(e);else if(r<=i.viewFrom)Dt&&Kn(e.doc,r+n)>i.viewFrom?ei(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)ei(e);else if(t<=i.viewFrom){var o=xo(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):ei(e)}else if(r>=i.viewTo){var a=xo(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):ei(e)}else{var l=xo(e,t,t,-1),s=xo(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(jr(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):ei(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function qr(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[hi(e,t)];if(o.node!=null){var a=o.changes||(o.changes=[]);ie(a,r)==-1&&a.push(r)}}}function ei(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function xo(e,t,r,n){var i=hi(e,t),o,a=e.display.view;if(!Dt||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var l=e.display.viewFrom,s=0;s<i;s++)l+=a[s].size;if(l!=t){if(n>0){if(i==a.length-1)return null;o=l+a[i].size-t,i++}else o=l-t;t+=o,r+=o}for(;_n(e.doc,r)!=r;){if(i==(n<0?0:a.length-1))return null;r+=n*a[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function jl(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=jr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=jr(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(hi(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(jr(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,hi(e,r)))),n.viewTo=r}function Oa(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];!i.hidden&&(!i.node||i.changes)&&++r}return r}function Xi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ia(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(!(!t&&a==r.sel.primIndex)){var l=r.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&Ma(e,l.head,i),s||Ul(e,l,o)}}return n}function Ma(e,t,r){var n=yr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(P("div","\xA0","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var o=r.appendChild(P("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Co(e,t){return e.top-t.top||e.left-t.left}function Ul(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),a=yo(e.display),l=a.left,s=Math.max(n.sizerWidth,Hr(e)-n.sizer.offsetLeft)-a.right,u=i.direction=="ltr";function p($e,nt,Mt,yt){nt<0&&(nt=0),nt=Math.round(nt),yt=Math.round(yt),o.appendChild(P("div",null,"CodeMirror-selected","position: absolute; left: "+$e+`px;
top: `+nt+"px; width: "+(Mt==null?s-$e:Mt)+`px;
height: `+(yt-nt)+"px"))}function g($e,nt,Mt){var yt=C(i,$e),Ut=yt.text.length,Sn,Qn;function Ln(Hn,vr){return Pr(e,L($e,Hn),"div",yt,vr)}function Sr(Hn,vr,er){var jn=Ea(e,yt,null,Hn),Zn=vr=="ltr"==(er=="after")?"left":"right",Pn=er=="after"?jn.begin:jn.end-(/\s/.test(yt.text.charAt(jn.end-1))?2:1);return Ln(Pn,Zn)[Zn]}var hr=be(yt,i.direction);return xe(hr,nt||0,Mt==null?Ut:Mt,function(Hn,vr,er,jn){var Zn=er=="ltr",Pn=Ln(Hn,Zn?"left":"right"),pr=Ln(vr-1,Zn?"right":"left"),Wi=nt==null&&Hn==0,ai=Mt==null&&vr==Ut,ir=jn==0,Zr=!hr||jn==hr.length-1;if(pr.top-Pn.top<=3){var Jn=(u?Wi:ai)&&ir,ba=(u?ai:Wi)&&Zr,Vr=Jn?l:(Zn?Pn:pr).left,yi=ba?s:(Zn?pr:Pn).right;p(Vr,Pn.top,yi-Vr,Pn.bottom)}else{var bi,sr,zi,Sa;Zn?(bi=u&&Wi&&ir?l:Pn.left,sr=u?s:Sr(Hn,er,"before"),zi=u?l:Sr(vr,er,"after"),Sa=u&&ai&&Zr?s:pr.right):(bi=u?Sr(Hn,er,"before"):l,sr=!u&&Wi&&ir?s:Pn.right,zi=!u&&ai&&Zr?l:pr.left,Sa=u?Sr(vr,er,"after"):s),p(bi,Pn.top,sr-bi,Pn.bottom),Pn.bottom<pr.top&&p(l,Pn.bottom,null,pr.top),p(zi,pr.top,Sa-zi,pr.bottom)}(!Sn||Co(Pn,Sn)<0)&&(Sn=Pn),Co(pr,Sn)<0&&(Sn=pr),(!Qn||Co(Pn,Qn)<0)&&(Qn=Pn),Co(pr,Qn)<0&&(Qn=pr)}),{start:Sn,end:Qn}}var R=t.from(),O=t.to();if(R.line==O.line)g(R.line,R.ch,O.ch);else{var U=C(i,R.line),ee=C(i,O.line),we=Ot(U)==Ot(ee),Be=g(R.line,R.ch,we?U.text.length+1:null).end,Ve=g(O.line,we?0:null,O.ch).start;we&&(Be.top<Ve.top-2?(p(Be.right,Be.top,null,Be.bottom),p(l,Ve.top,Ve.left,Ve.bottom)):p(Be.right,Be.top,Ve.left-Be.right,Be.bottom)),Be.bottom<Ve.top&&p(l,Be.bottom,null,Ve.top)}r.appendChild(o)}function Xo(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Ii(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Ra(e){e.state.focused||(e.display.input.focus(),Yo(e))}function Fa(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ii(e))},100)}function Yo(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(tt(e,"focus",e,t),e.state.focused=!0,bt(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),N&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Xo(e))}function Ii(e,t){e.state.delayingBlurEvent||(e.state.focused&&(tt(e,"blur",e,t),e.state.focused=!1,b(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Eo(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=e.options.lineWrapping,a=void 0,l=0;if(!i.hidden){if(v&&A<8){var s=i.node.offsetTop+i.node.offsetHeight;a=s-r,r=s}else{var u=i.node.getBoundingClientRect();a=u.bottom-u.top,!o&&i.text.firstChild&&(l=i.text.firstChild.getBoundingClientRect().right-u.left-1)}var p=i.line.height-a;if((p>.005||p<-.005)&&(_(i.line,a),La(i.line),i.rest))for(var g=0;g<i.rest.length;g++)La(i.rest[g]);if(l>e.display.sizerWidth){var R=Math.ceil(l/Oi(e.display));R>e.display.maxLineLength&&(e.display.maxLineLength=R,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function La(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function wo(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Ei(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,o=le(t,n),a=le(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=le(t,Mn(C(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=le(t,Mn(C(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function kl(e,t){if(!at(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),i!=null&&!me){var o=P("div","\u200B",null,`position: absolute;
top: `+(t.top-r.viewOffset-Ei(e.display))+`px;
height: `+(t.bottom-t.top+Dr(e)+r.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function Gl(e,t,r,n){n==null&&(n=0);var i;!e.options.lineWrapping&&t==r&&(t=t.ch?L(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?L(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=yr(e,t),s=!r||r==t?l:yr(e,r);i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-n,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+n};var u=Qo(e,i),p=e.doc.scrollTop,g=e.doc.scrollLeft;if(u.scrollTop!=null&&(Qi(e,u.scrollTop),Math.abs(e.doc.scrollTop-p)>1&&(a=!0)),u.scrollLeft!=null&&(vi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-g)>1&&(a=!0)),!a)break}return i}function Vl(e,t){var r=Qo(e,t);r.scrollTop!=null&&Qi(e,r.scrollTop),r.scrollLeft!=null&&vi(e,r.scrollLeft)}function Qo(e,t){var r=e.display,n=wi(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,o=Ki(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+_i(r),s=t.top<n,u=t.bottom>l-n;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var p=Math.min(t.top,(u?l:t.bottom)-o);p!=i&&(a.scrollTop=p)}var g=e.options.fixedGutter?0:r.gutters.offsetWidth,R=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-g,O=Hr(e)-r.gutters.offsetWidth,U=t.right-t.left>O;return U&&(t.right=t.left+O),t.left<10?a.scrollLeft=0:t.left<R?a.scrollLeft=Math.max(0,t.left+g-(U?0:10)):t.right>O+R-3&&(a.scrollLeft=t.right+(U?0:10)-O),a}function Jo(e,t){t!=null&&(Oo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Mi(e){Oo(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Yi(e,t,r){(t!=null||r!=null)&&Oo(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Xl(e,t){Oo(e),e.curOp.scrollToPos=t}function Oo(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=xa(e,t.from),n=xa(e,t.to);Da(e,r,n,t.margin)}}function Da(e,t,r,n){var i=Qo(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Yi(e,i.scrollLeft,i.scrollTop)}function Qi(e,t){Math.abs(e.doc.scrollTop-t)<2||(T||ea(e,{top:t}),Ta(e,t,!0),T&&ea(e),eo(e,100))}function Ta(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function vi(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)&&(e.doc.scrollLeft=t,$a(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Ji(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+_i(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Dr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var pi=function(e,t,r){this.cm=r;var n=this.vert=P("div",[P("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=P("div",[P("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),G(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),G(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,v&&A<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},pi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pi.prototype.zeroWidthHack=function(){var e=ot&&!H?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ae,this.disableVert=new ae},pi.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function n(){var i=e.getBoundingClientRect(),o=r=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},pi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var qi=function(){};qi.prototype.update=function(){return{bottom:0,right:0}},qi.prototype.setScrollLeft=function(){},qi.prototype.setScrollTop=function(){},qi.prototype.clear=function(){};function Ri(e,t){t||(t=Ji(e));var r=e.display.barWidth,n=e.display.barHeight;Pa(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Eo(e),Pa(e,Ji(e)),r=e.display.barWidth,n=e.display.barHeight}function Pa(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var Aa={native:pi,null:qi};function Na(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&b(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Aa[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),G(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){r=="horizontal"?vi(e,t):Qi(e,t)},e),e.display.scrollbars.addClass&&bt(e.display.wrapper,e.display.scrollbars.addClass)}var Yl=0;function gi(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.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:++Yl},ui(e.curOp)}function mi(e){var t=e.curOp;t&&Bt(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;Ql(r)})}function Ql(e){for(var t=e.ops,r=0;r<t.length;r++)Jl(t[r]);for(var n=0;n<t.length;n++)ql(t[n]);for(var i=0;i<t.length;i++)es(t[i]);for(var o=0;o<t.length;o++)ts(t[o]);for(var a=0;a<t.length;a++)ns(t[a])}function Jl(e){var t=e.cm,r=t.display;is(t),e.updateMaxLine&&qn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Io(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ql(e){e.updatedDisplay=e.mustUpdate&&qo(e.cm,e.update)}function es(e){var t=e.cm,r=t.display;e.updatedDisplay&&Eo(t),e.barMeasure=Ji(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ui(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Dr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Hr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function ts(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&vi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==Ie();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ri(t,e.barMeasure),e.updatedDisplay&&na(t,e.barMeasure),e.selectionChanged&&Xo(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&Ra(e.cm)}function ns(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&Ba(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&Ta(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&vi(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Gl(t,te(n,e.scrollToPos.from),te(n,e.scrollToPos.to),e.scrollToPos.margin);kl(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||tt(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&tt(a[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&tt(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function br(e,t){if(e.curOp)return t();gi(e);try{return t()}finally{mi(e)}}function Xn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);gi(e);try{return t.apply(e,arguments)}finally{mi(e)}}}function lr(e){return function(){if(this.curOp)return e.apply(this,arguments);gi(this);try{return e.apply(this,arguments)}finally{mi(this)}}}function Yn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);gi(t);try{return e.apply(this,arguments)}finally{mi(t)}}}function eo(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,fe(rs,e))}function rs(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=Ae(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?B(t.mode,n.state):null,s=mt(e,o,n,!0);l&&(n.state=l),o.styles=s.styles;var u=o.styleClasses,p=s.classes;p?o.styleClasses=p:u&&(o.styleClasses=null);for(var g=!a||a.length!=o.styles.length||u!=p&&(!u||!p||u.bgClass!=p.bgClass||u.textClass!=p.textClass),R=0;!g&&R<a.length;++R)g=a[R]!=o.styles[R];g&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&ke(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return eo(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&br(e,function(){for(var o=0;o<i.length;o++)qr(e,i[o],"text")})}}var Io=function(e,t,r){var n=e.display;this.viewport=t,this.visible=wo(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Hr(e),this.force=r,this.dims=ko(e),this.events=[]};Io.prototype.signal=function(e,t){Ee(e,t)&&this.events.push(arguments)},Io.prototype.finish=function(){for(var e=0;e<this.events.length;e++)tt.apply(null,this.events[e])};function is(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Dr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Dr(e)+"px",t.scrollbarsClipped=!0)}function os(e){if(e.hasFocus())return null;var t=Ie();if(!t||!ze(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&ze(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function as(e){if(!(!e||!e.activeElt||e.activeElt==Ie())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&ze(document.body,e.anchorNode)&&ze(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function qo(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return ei(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&Oa(e)==0)return!1;Wa(e)&&(ei(e),t.dims=ko(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>a&&r.viewTo-a<20&&(a=Math.min(i,r.viewTo)),Dt&&(o=_n(e.doc,o),a=Kn(e.doc,a));var l=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;jl(e,o,a),r.viewOffset=Mn(C(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var s=Oa(e);if(!l&&s==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var u=os(e);return s>4&&(r.lineDiv.style.display="none"),ls(e,r.updateLineNumbers,t.dims),s>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,as(u),F(r.cursorDiv),F(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,eo(e,400)),r.updateLineNumbers=null,!0}function Ba(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Hr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+_i(e.display)-Ki(e),r.top)}),t.visible=wo(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=wo(e.display,e.doc,r));if(!qo(e,t))break;Eo(e);var i=Ji(e);Xi(e),Ri(e,i),na(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ea(e,t){var r=new Io(e,t);if(qo(e,r)){Eo(e),Ba(e,r);var n=Ji(e);Xi(e),Ri(e,n),na(e,n),r.finish()}}function ls(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,a=o.firstChild;function l(U){var ee=U.nextSibling;return N&&ot&&e.display.currentWheelTarget==U?U.style.display="none":U.parentNode.removeChild(U),ee}for(var s=n.view,u=n.viewFrom,p=0;p<s.length;p++){var g=s[p];if(!g.hidden)if(!g.node||g.node.parentNode!=o){var R=mo(e,g,u,r);o.insertBefore(R,a)}else{for(;a!=g.node;)a=l(a);var O=i&&t!=null&&t<=u&&g.lineNumber;g.changes&&(ie(g.changes,"gutter")>-1&&(O=!1),bn(e,g,u,r)),O&&(F(g.lineNumber),g.lineNumber.appendChild(document.createTextNode(He(e.options,u)))),a=g.node.nextSibling}u+=g.size}for(;a;)a=l(a)}function ta(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function na(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Dr(e)+"px"}function $a(e){var t=e.display,r=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var n=Go(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=o),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var l=r[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Wa(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=He(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(P("div",[P("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-a)+1,n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",ta(e.display),!0}return!1}function ra(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var o=e[i],a=null;if(typeof o!="string"&&(a=o.style,o=o.className),o=="CodeMirror-linenumbers")if(t)n=!0;else continue;r.push({className:o,style:a})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function za(e){var t=e.gutters,r=e.gutterSpecs;F(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],o=i.className,a=i.style,l=t.appendChild(P("div",null,"CodeMirror-gutter "+o));a&&(l.style.cssText=a),o=="CodeMirror-linenumbers"&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",ta(e)}function to(e){za(e.display),fr(e),$a(e)}function ss(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=P("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=P("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=Oe("div",null,"CodeMirror-code"),i.selectionDiv=P("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=P("div",null,"CodeMirror-cursors"),i.measure=P("div",null,"CodeMirror-measure"),i.lineMeasure=P("div",null,"CodeMirror-measure"),i.lineSpace=Oe("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=Oe("div",[i.lineSpace],"CodeMirror-lines");i.mover=P("div",[o],null,"position: relative"),i.sizer=P("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=P("div",null,null,"position: absolute; height: "+Ue+"px; width: 1px;"),i.gutters=P("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=P("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=P("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),v&&A<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!N&&!(T&&Je)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=ra(n.gutters,n.lineNumbers),za(i),r.init(i)}var Mo=0,wr=null;v?wr=-.53:T?wr=15:oe?wr=-.7:Re&&(wr=-1/3);function Ha(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function us(e){var t=Ha(e);return t.x*=wr,t.y*=wr,t}function Za(e,t){var r=Ha(t),n=r.x,i=r.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(n&&l||i&&s){if(i&&ot&&N){e:for(var u=t.target,p=o.view;u!=a;u=u.parentNode)for(var g=0;g<p.length;g++)if(p[g].node==u){e.display.currentWheelTarget=u;break e}}if(n&&!T&&!y&&wr!=null){i&&s&&Qi(e,Math.max(0,a.scrollTop+i*wr)),vi(e,Math.max(0,a.scrollLeft+n*wr)),(!i||i&&s)&&st(t),o.wheelStartX=null;return}if(i&&wr!=null){var R=i*wr,O=e.doc.scrollTop,U=O+o.wrapper.clientHeight;R<0?O=Math.max(0,O+R-50):U=Math.min(e.doc.height,U+R+50),ea(e,{top:O,bottom:U})}Mo<20&&(o.wheelStartX==null?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(o.wheelStartX!=null){var ee=a.scrollLeft-o.wheelStartX,we=a.scrollTop-o.wheelStartY,Be=we&&o.wheelDY&&we/o.wheelDY||ee&&o.wheelDX&&ee/o.wheelDX;o.wheelStartX=o.wheelStartY=null,Be&&(wr=(wr*Mo+Be)/(Mo+1),++Mo)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}var Or=function(e,t){this.ranges=e,this.primIndex=t};Or.prototype.primary=function(){return this.ranges[this.primIndex]},Or.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!Qe(r.anchor,n.anchor)||!Qe(r.head,n.head))return!1}return!0},Or.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new un(Se(this.ranges[t].anchor),Se(this.ranges[t].head));return new Or(e,this.primIndex)},Or.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Or.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(V(t,n.from())>=0&&V(e,n.to())<=0)return r}return-1};var un=function(e,t){this.anchor=e,this.head=t};un.prototype.from=function(){return Ne(this.anchor,this.head)},un.prototype.to=function(){return Ke(this.anchor,this.head)},un.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function $r(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(R,O){return V(R.from(),O.from())}),r=ie(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=V(l.to(),a.from());if(n&&!a.empty()?s>0:s>=0){var u=Ne(l.from(),a.from()),p=Ke(l.to(),a.to()),g=l.empty()?a.from()==a.head:l.from()==l.head;o<=r&&--r,t.splice(--o,2,new un(g?p:u,g?u:p))}}return new Or(t,r)}function ti(e,t){return new Or([new un(e,t||e)],0)}function ni(e){return e.text?L(e.from.line+e.text.length-1,qe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function _a(e,t){if(V(e,t.from)<0)return e;if(V(e,t.to)<=0)return ni(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=ni(t).ch-t.to.ch),L(r,n)}function ia(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new un(_a(i.anchor,t),_a(i.head,t)))}return $r(e.cm,r,e.sel.primIndex)}function Ka(e,t,r){return e.line==t.line?L(r.line,e.ch-t.ch+r.ch):L(r.line+(e.line-t.line),e.ch)}function cs(e,t,r){for(var n=[],i=L(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Ka(l.from,i,o),u=Ka(ni(l),i,o);if(i=l.to,o=u,r=="around"){var p=e.sel.ranges[a],g=V(p.head,p.anchor)<0;n[a]=new un(g?u:s,g?s:u)}else n[a]=new un(s,s)}return new Or(n,e.sel.primIndex)}function oa(e){e.doc.mode=ut(e.options,e.doc.modeOption),no(e)}function no(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,eo(e,100),e.state.modeGen++,e.curOp&&fr(e)}function ja(e,t){return t.from.ch==0&&t.to.ch==0&&qe(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function aa(e,t,r,n){function i(Ve){return r?r[Ve]:null}function o(Ve,$e,nt){_r(Ve,$e,nt,n),ct(Ve,"change",Ve,t)}function a(Ve,$e){for(var nt=[],Mt=Ve;Mt<$e;++Mt)nt.push(new tr(u[Mt],i(Mt),n));return nt}var l=t.from,s=t.to,u=t.text,p=C(e,l.line),g=C(e,s.line),R=qe(u),O=i(u.length-1),U=s.line-l.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(ja(e,t)){var ee=a(0,u.length-1);o(g,g.text,O),U&&e.remove(l.line,U),ee.length&&e.insert(l.line,ee)}else if(p==g)if(u.length==1)o(p,p.text.slice(0,l.ch)+R+p.text.slice(s.ch),O);else{var we=a(1,u.length-1);we.push(new tr(R+p.text.slice(s.ch),O,n)),o(p,p.text.slice(0,l.ch)+u[0],i(0)),e.insert(l.line+1,we)}else if(u.length==1)o(p,p.text.slice(0,l.ch)+u[0]+g.text.slice(s.ch),i(0)),e.remove(l.line+1,U);else{o(p,p.text.slice(0,l.ch)+u[0],i(0)),o(g,R+g.text.slice(s.ch),O);var Be=a(1,u.length-1);U>1&&e.remove(l.line+1,U-1),e.insert(l.line+1,Be)}ct(e,"change",e,t)}function ri(e,t,r){function n(i,o,a){if(i.linked)for(var l=0;l<i.linked.length;++l){var s=i.linked[l];if(s.doc!=o){var u=a&&s.sharedHist;r&&!u||(t(s.doc,u),n(s.doc,i,u))}}}n(e,null,!0)}function Ua(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Vo(e),oa(e),ka(e),e.options.lineWrapping||qn(e),e.options.mode=t.modeOption,fr(e)}function ka(e){(e.doc.direction=="rtl"?bt:b)(e.display.lineDiv,"CodeMirror-rtl")}function fs(e){br(e,function(){ka(e),fr(e)})}function Ro(e){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=e||1}function la(e,t){var r={from:Se(t.from),to:ni(t),text:D(e,t.from,t.to)};return Xa(e,r,t.from.line,t.to.line+1),ri(e,function(n){return Xa(n,r,t.from.line,t.to.line+1)},!0),r}function Ga(e){for(;e.length;){var t=qe(e);if(t.ranges)e.pop();else break}}function ds(e,t){if(t)return Ga(e.done),qe(e.done);if(e.done.length&&!qe(e.done).ranges)return qe(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),qe(e.done)}function Va(e,t,r,n){var i=e.history;i.undone.length=0;var o=+new Date,a,l;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>o-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(a=ds(i,i.lastOp==n)))l=qe(a.changes),V(t.from,t.to)==0&&V(t.from,l.to)==0?l.to=ni(t):a.changes.push(la(e,t));else{var s=qe(i.done);for((!s||!s.ranges)&&Fo(e.sel,i.done),a={changes:[la(e,t)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=o,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||tt(e,"historyAdded")}function hs(e,t,r,n){var i=t.charAt(0);return i=="*"||i=="+"&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vs(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||hs(e,o,qe(i.done),t))?i.done[i.done.length-1]=t:Fo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&Ga(i.undone)}function Fo(e,t){var r=qe(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Xa(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(a){a.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=a.markedSpans),++o})}function ps(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function gs(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(ps(r[i]));return n}function Ya(e,t){var r=gs(e,t),n=ht(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],u=0;u<o.length;++u)if(o[u].marker==s.marker)continue e;o.push(s)}else a&&(r[i]=a)}return r}function Fi(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges){n.push(r?Or.prototype.deepCopy.call(o):o);continue}var a=o.changes,l=[];n.push({changes:l});for(var s=0;s<a.length;++s){var u=a[s],p=void 0;if(l.push({from:u.from,to:u.to,text:u.text}),t)for(var g in u)(p=g.match(/^spans_(\d+)$/))&&ie(t,Number(p[1]))>-1&&(qe(l)[g]=u[g],delete u[g])}}return n}function sa(e,t,r,n){if(n){var i=e.anchor;if(r){var o=V(t,i)<0;o!=V(r,i)<0?(i=t,t=r):o!=V(t,r)<0&&(t=r)}return new un(i,t)}else return new un(r||t,t)}function Lo(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),rr(e,new Or([sa(e.sel.primary(),t,r,i)],0),n)}function Qa(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=sa(e.sel.ranges[o],t[o],null,i);var a=$r(e.cm,n,e.sel.primIndex);rr(e,a,r)}function ua(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,rr(e,$r(e.cm,i,e.sel.primIndex),n)}function Ja(e,t,r,n){rr(e,ti(t,r),n)}function ms(e,t,r){var n={ranges:t.ranges,update:function(i){this.ranges=[];for(var o=0;o<i.length;o++)this.ranges[o]=new un(te(e,i[o].anchor),te(e,i[o].head))},origin:r&&r.origin};return tt(e,"beforeSelectionChange",e,n),e.cm&&tt(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?$r(e.cm,n.ranges,n.ranges.length-1):t}function qa(e,t,r){var n=e.history.done,i=qe(n);i&&i.ranges?(n[n.length-1]=t,Do(e,t,r)):rr(e,t,r)}function rr(e,t,r){Do(e,t,r),vs(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Do(e,t,r){(Ee(e,"beforeSelectionChange")||e.cm&&Ee(e.cm,"beforeSelectionChange"))&&(t=ms(e,t,r));var n=r&&r.bias||(V(t.primary().head,e.sel.primary().head)<0?-1:1);el(e,nl(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Mi(e.cm)}function el(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,_e(e.cm)),ct(e,"cursorActivity",e))}function tl(e){el(e,nl(e,e.sel,null,!1))}function nl(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=To(e,a.anchor,l&&l.anchor,r,n),u=To(e,a.head,l&&l.head,r,n);(i||s!=a.anchor||u!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new un(s,u))}return i?$r(e.cm,i,t.primIndex):t}function Li(e,t,r,n,i){var o=C(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker,u="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,p="selectRight"in s?!s.selectRight:s.inclusiveRight;if((l.from==null||(u?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(p?l.to>=t.ch:l.to>t.ch))){if(i&&(tt(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--a;continue}else break;if(!s.atomic)continue;if(r){var g=s.find(n<0?1:-1),R=void 0;if((n<0?p:u)&&(g=rl(e,g,-n,g&&g.line==t.line?o:null)),g&&g.line==t.line&&(R=V(g,r))&&(n<0?R<0:R>0))return Li(e,g,t,n,i)}var O=s.find(n<0?-1:1);return(n<0?u:p)&&(O=rl(e,O,n,O.line==t.line?o:null)),O?Li(e,O,t,n,i):null}}return t}function To(e,t,r,n,i){var o=n||1,a=Li(e,t,r,o,i)||!i&&Li(e,t,r,o,!0)||Li(e,t,r,-o,i)||!i&&Li(e,t,r,-o,!0);return a||(e.cantEdit=!0,L(e.first,0))}function rl(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?te(e,L(t.line-1)):null:r>0&&t.ch==(n||C(e,t.line)).text.length?t.line<e.first+e.size-1?L(t.line+1,0):null:new L(t.line,t.ch+r)}function il(e){e.setSelection(L(e.firstLine(),0),L(e.lastLine()),he)}function ol(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(i,o,a,l){i&&(n.from=te(e,i)),o&&(n.to=te(e,o)),a&&(n.text=a),l!==void 0&&(n.origin=l)}),tt(e,"beforeChange",e,n),e.cm&&tt(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Di(e,t,r){if(e.cm){if(!e.cm.curOp)return Xn(e.cm,Di)(e,t,r);if(e.cm.state.suppressEdits)return}if(!((Ee(e,"beforeChange")||e.cm&&Ee(e.cm,"beforeChange"))&&(t=ol(e,t,!0),!t))){var n=Ht&&!r&&en(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)al(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else al(e,t)}}function al(e,t){if(!(t.text.length==1&&t.text[0]==""&&V(t.from,t.to)==0)){var r=ia(e,t);Va(e,t,r,e.cm?e.cm.curOp.id:NaN),ro(e,t,r,ht(e,t));var n=[];ri(e,function(i,o){!o&&ie(n,i.history)==-1&&(cl(i.history,t),n.push(i.history)),ro(i,t,null,ht(i,t))})}}function Po(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!(n&&!r)){for(var i=e.history,o,a=e.sel,l=t=="undo"?i.done:i.undone,s=t=="undo"?i.undone:i.done,u=0;u<l.length&&(o=l[u],!(r?o.ranges&&!o.equals(e.sel):!o.ranges));u++);if(u!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(o=l.pop(),o.ranges){if(Fo(o,s),r&&!o.equals(e.sel)){rr(e,o,{clearRedo:!1});return}a=o}else if(n){l.push(o);return}else break;var p=[];Fo(a,s),s.push({changes:p,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var g=Ee(e,"beforeChange")||e.cm&&Ee(e.cm,"beforeChange"),R=function(ee){var we=o.changes[ee];if(we.origin=t,g&&!ol(e,we,!1))return l.length=0,{};p.push(la(e,we));var Be=ee?ia(e,we):qe(l);ro(e,we,Be,Ya(e,we)),!ee&&e.cm&&e.cm.scrollIntoView({from:we.from,to:ni(we)});var Ve=[];ri(e,function($e,nt){!nt&&ie(Ve,$e.history)==-1&&(cl($e.history,we),Ve.push($e.history)),ro($e,we,null,Ya($e,we))})},O=o.changes.length-1;O>=0;--O){var U=R(O);if(U)return U.v}}}}function ll(e,t){if(t!=0&&(e.first+=t,e.sel=new Or(Lt(e.sel.ranges,function(i){return new un(L(i.anchor.line+t,i.anchor.ch),L(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){fr(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)qr(e.cm,n,"gutter")}}function ro(e,t,r,n){if(e.cm&&!e.cm.curOp)return Xn(e.cm,ro)(e,t,r,n);if(t.to.line<e.first){ll(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);ll(e,i),t={from:L(e.first,0),to:L(t.to.line+i,t.to.ch),text:[qe(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:L(o,C(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=D(e,t.from,t.to),r||(r=ia(e,t)),e.cm?ys(e.cm,t,n):aa(e,t,n),Do(e,r,he),e.cantEdit&&To(e,L(e.firstLine(),0))&&(e.cantEdit=!1)}}function ys(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=j(Ot(C(n,o.line))),n.iter(s,a.line+1,function(O){if(O==i.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&_e(e),aa(n,t,r,wa(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(O){var U=ur(O);U>i.maxLineLength&&(i.maxLine=O,i.maxLineLength=U,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),Rt(n,o.line),eo(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?fr(e):o.line==a.line&&t.text.length==1&&!ja(e.doc,t)?qr(e,o.line,"text"):fr(e,o.line,a.line+1,u);var p=Ee(e,"changes"),g=Ee(e,"change");if(g||p){var R={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};g&&ct(e,"change",e,R),p&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(R)}e.display.selForContextMenu=null}function Ti(e,t,r,n,i){var o;n||(n=r),V(n,r)<0&&(o=[n,r],r=o[0],n=o[1]),typeof t=="string"&&(t=e.splitLines(t)),Di(e,{from:r,to:n,text:t,origin:i})}function sl(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function ul(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)sl(o.ranges[l].anchor,t,r,n),sl(o.ranges[l].head,t,r,n);continue}for(var s=0;s<o.changes.length;++s){var u=o.changes[s];if(r<u.from.line)u.from=L(u.from.line+n,u.from.ch),u.to=L(u.to.line+n,u.to.ch);else if(t<=u.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}function cl(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;ul(e.done,r,n,i),ul(e.undone,r,n,i)}function io(e,t,r,n){var i=t,o=t;return typeof t=="number"?o=C(e,ft(e,t)):i=j(t),i==null?null:(n(o,i)&&e.cm&&qr(e.cm,i,r),o)}function oo(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}oo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,Xr(i),ct(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}};function ao(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}ao.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),(t-=o)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof oo))){var l=[];this.collapse(l),this.children=[new oo(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new oo(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++n,0,s),s.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new ao(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=ie(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new ao(e.children);n.parent=e,e.children=[n,r],e=n}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,r))return!0;if((t-=a)==0)break;e=0}else e-=o}}};var lo=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};lo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=j(r);if(!(n==null||!t)){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=Lr(this);_(r,Math.max(0,r.height-o)),e&&(br(e,function(){fl(e,r,-o),qr(e,n,"widget")}),ct(e,"lineWidgetCleared",e,this,n))}},lo.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Lr(this)-t;i&&(Bn(this.doc,n)||_(n,n.height+i),r&&br(r,function(){r.curOp.forceUpdate=!0,fl(r,n,i),ct(r,"lineWidgetChanged",r,e,j(n))}))},it(lo);function fl(e,t,r){Mn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Jo(e,r)}function bs(e,t,r,n){var i=new lo(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),io(e,t,"widget",function(a){var l=a.widgets||(a.widgets=[]);if(i.insertAt==null?l.push(i):l.splice(Math.min(l.length-1,Math.max(0,i.insertAt)),0,i),i.line=a,o&&!Bn(e,a)){var s=Mn(a)<e.scrollTop;_(a,a.height+Lr(i)),s&&Jo(o,i.height),o.curOp.forceUpdate=!0}return!0}),o&&ct(o,"lineWidgetAdded",o,i,typeof t=="number"?t:j(t)),i}var dl=0,ii=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++dl};ii.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&gi(e),Ee(this,"clear")){var r=this.find();r&&ct(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=an(a.markedSpans,this);e&&!this.collapsed?qr(e,j(a),"text"):e&&(l.to!=null&&(i=j(a)),l.from!=null&&(n=j(a))),a.markedSpans=Yt(a.markedSpans,l),l.from==null&&this.collapsed&&!Bn(this.doc,a)&&e&&_(a,wi(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=Ot(this.lines[s]),p=ur(u);p>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=p,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&fr(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&tl(e.doc)),e&&ct(e,"markerCleared",e,this,n,i),t&&mi(e),this.parent&&this.parent.clear()}},ii.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var o=this.lines[i],a=an(o.markedSpans,this);if(a.from!=null&&(r=L(t?o:j(o),a.from),e==-1))return r;if(a.to!=null&&(n=L(t?o:j(o),a.to),e==1))return n}return r&&{from:r,to:n}},ii.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;!t||!n||br(n,function(){var i=t.line,o=j(t.line),a=ki(n,o);if(a&&(Vn(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Bn(r.doc,i)&&r.height!=null){var l=r.height;r.height=null;var s=Lr(r)-l;s&&_(i,i.height+s)}ct(n,"markerChanged",n,e)})},ii.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||ie(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ii.prototype.detachLine=function(e){if(this.lines.splice(ie(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},it(ii);function Pi(e,t,r,n,i){if(n&&n.shared)return Ss(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Xn(e.cm,Pi)(e,t,r,n,i);var o=new ii(e,i),a=V(t,r);if(n&&Y(n,o,!1),a>0||a==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Oe("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(xt(e,t.line,t,r,o)||t.line!=r.line&&xt(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");$t()}o.addToHistory&&Va(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l=t.line,s=e.cm,u;if(e.iter(l,r.line+1,function(g){s&&o.collapsed&&!s.options.lineWrapping&&Ot(g)==s.display.maxLine&&(u=!0),o.collapsed&&l!=t.line&&_(g,0),wn(g,new _t(o,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),o.collapsed&&e.iter(t.line,r.line+1,function(g){Bn(e,g)&&_(g,0)}),o.clearOnEnter&&G(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(cn(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++dl,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)fr(s,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var p=t.line;p<=r.line;p++)qr(s,p,"text");o.atomic&&tl(s.doc),ct(s,"markerAdded",s,o)}return o}var so=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};so.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ct(this,"clear")}},so.prototype.find=function(e,t){return this.primary.find(e,t)},it(so);function Ss(e,t,r,n,i){n=Y(n),n.shared=!1;var o=[Pi(e,t,r,n,i)],a=o[0],l=n.widgetNode;return ri(e,function(s){l&&(n.widgetNode=l.cloneNode(!0)),o.push(Pi(s,te(s,t),te(s,r),n,i));for(var u=0;u<s.linked.length;++u)if(s.linked[u].isParent)return;a=qe(o)}),new so(o,a)}function hl(e){return e.findMarks(L(e.first,0),e.clipPos(L(e.lastLine())),function(t){return t.parent})}function xs(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(V(o,a)){var l=Pi(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function Cs(e){for(var t=function(n){var i=e[n],o=[i.primary.doc];ri(i.primary.doc,function(s){return o.push(s)});for(var a=0;a<i.markers.length;a++){var l=i.markers[a];ie(o,l.doc)==-1&&(l.parent=null,i.markers.splice(a--,1))}},r=0;r<e.length;r++)t(r)}var Es=0,dr=function(e,t,r,n,i){if(!(this instanceof dr))return new dr(e,t,r,n,i);r==null&&(r=0),ao.call(this,[new oo([new tr("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=L(r,0);this.sel=ti(o),this.history=new Ro(null),this.id=++Es,this.modeOption=t,this.lineSep=n,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),aa(this,{from:o,to:o,text:e}),rr(this,ti(o),he)};dr.prototype=Fe(ao.prototype,{constructor:dr,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=ne(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Yn(function(e){var t=L(this.first,0),r=this.first+this.size-1;Di(this,{from:t,to:L(r,C(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Yi(this.cm,0,0),rr(this,ti(t),he)}),replaceRange:function(e,t,r,n){t=te(this,t),r=r?te(this,r):t,Ti(this,e,t,r,n)},getRange:function(e,t,r){var n=D(this,te(this,e),te(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(ce(this,e))return C(this,e)},getLineNumber:function(e){return j(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=C(this,e)),Ot(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return te(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return e==null||e=="head"?r=t.head:e=="anchor"?r=t.anchor:e=="end"||e=="to"||e===!1?r=t.to():r=t.from(),r},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Yn(function(e,t,r){Ja(this,te(this,typeof e=="number"?L(e,t||0):e),null,r)}),setSelection:Yn(function(e,t,r){Ja(this,te(this,e),te(this,t||e),r)}),extendSelection:Yn(function(e,t,r){Lo(this,te(this,e),t&&te(this,t),r)}),extendSelections:Yn(function(e,t){Qa(this,St(this,e),t)}),extendSelectionsBy:Yn(function(e,t){var r=Lt(this.sel.ranges,e);Qa(this,St(this,r),t)}),setSelections:Yn(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new un(te(this,e[i].anchor),te(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),rr(this,$r(this.cm,n,t),r)}}),addSelection:Yn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new un(te(this,e),te(this,t||e))),rr(this,$r(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,n=0;n<t.length;n++){var i=D(this,t[n].from(),t[n].to());r=r?r.concat(i):i}return e===!1?r:r.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=D(this,r[n].from(),r[n].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Yn(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];n[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:r}}for(var l=t&&t!="end"&&cs(this,n,t),s=n.length-1;s>=0;s--)Di(this,n[s]);l?qa(this,l):this.cm&&Mi(this.cm)}),undo:Yn(function(){Po(this,"undo")}),redo:Yn(function(){Po(this,"redo")}),undoSelection:Yn(function(){Po(this,"undo",!0)}),redoSelection:Yn(function(){Po(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Ro(this.history.maxGeneration),ri(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Fi(this.history.done),undone:Fi(this.history.undone)}},setHistory:function(e){var t=this.history=new Ro(this.history.maxGeneration);t.done=Fi(e.done.slice(0),null,!0),t.undone=Fi(e.undone.slice(0),null,!0)},setGutterMarker:Yn(function(e,t,r){return io(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&M(i)&&(n.gutterMarkers=null),!0})}),clearGutter:Yn(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&io(t,r,"gutter",function(){return r.gutterMarkers[e]=null,M(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!ce(this,e)||(t=e,e=C(this,e),!e))return null}else if(t=j(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Yn(function(e,t,r){return io(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[i])n[i]=r;else{if(c(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:Yn(function(e,t,r){return io(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",o=n[i];if(o)if(r==null)n[i]=null;else{var a=o.match(c(r));if(!a)return!1;var l=a.index+a[0].length;n[i]=o.slice(0,a.index)+(!a.index||l==o.length?"":" ")+o.slice(l)||null}else return!1;return!0})}),addLineWidget:Yn(function(e,t,r){return bs(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Pi(this,te(this,e),te(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=te(this,e),Pi(this,e,e,r,"bookmark")},findMarksAt:function(e){e=te(this,e);var t=[],r=C(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=te(this,e),t=te(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];!(s.to!=null&&i==e.line&&e.ch>=s.to||s.from==null&&i!=e.line||s.from!=null&&i==t.line&&s.from>=t.ch)&&(!r||r(s.marker))&&n.push(s.marker.parent||s.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)r[n].from!=null&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r}),te(this,L(r,t))},indexFromPos:function(e){e=te(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+r}),t},copy:function(e){var t=new dr(ne(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var n=new dr(ne(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],xs(n,hl(this)),n},unlinkDoc:function(e){if(e instanceof Rn&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Cs(hl(this));break}}if(e.history==this.history){var n=[e.id];ri(e,function(i){return n.push(i.id)},!0),e.history=new Ro(null),e.history.done=Fi(this.history.done,n),e.history.undone=Fi(this.history.undone,n)}},iterLinkedDocs:function(e){ri(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):In(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Yn(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&fs(this.cm))})}),dr.prototype.eachLine=dr.prototype.iter;var vl=0;function ws(e){var t=this;if(pl(t),!(at(t,e)||Br(t.display,e))){st(e),v&&(vl=+new Date);var r=di(t,e,!0),n=e.dataTransfer.files;if(!(!r||t.isReadOnly()))if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,l=function(){++a==i&&Xn(t,function(){r=te(t.doc,r);var O={from:r,to:r,text:t.doc.splitLines(o.filter(function(U){return U!=null}).join(t.doc.lineSeparator())),origin:"paste"};Di(t.doc,O),qa(t.doc,ti(te(t.doc,r),te(t.doc,ni(O))))})()},s=function(O,U){if(t.options.allowDropFileTypes&&ie(t.options.allowDropFileTypes,O.type)==-1){l();return}var ee=new FileReader;ee.onerror=function(){return l()},ee.onload=function(){var we=ee.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(we)){l();return}o[U]=we,l()},ee.readAsText(O)},u=0;u<n.length;u++)s(n[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var p=e.dataTransfer.getData("Text");if(p){var g;if(t.state.draggingText&&!t.state.draggingText.copy&&(g=t.listSelections()),Do(t.doc,ti(r,r)),g)for(var R=0;R<g.length;++R)Ti(t.doc,"",g[R].anchor,g[R].head,"drag");t.replaceSelection(p,"around","paste"),t.display.input.focus()}}catch(O){}}}}function Os(e,t){if(v&&(!e.state.draggingText||+new Date-vl<100)){sn(t);return}if(!(at(e,t)||Br(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!Re)){var r=P("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",y&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),y&&r.parentNode.removeChild(r)}}function Is(e,t){var r=di(e,t);if(r){var n=document.createDocumentFragment();Ma(e,r,n),e.display.dragCursor||(e.display.dragCursor=P("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),X(e.display.dragCursor,n)}}function pl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function gl(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation(function(){for(var o=0;o<r.length;o++)e(r[o])})}}var ml=!1;function Ms(){ml||(Rs(),ml=!0)}function Rs(){var e;G(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,gl(Fs)},100))}),G(window,"blur",function(){return gl(Ii)})}function Fs(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var oi={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"},uo=0;uo<10;uo++)oi[uo+48]=oi[uo+96]=String(uo);for(var Ao=65;Ao<=90;Ao++)oi[Ao]=String.fromCharCode(Ao);for(var co=1;co<=12;co++)oi[co+111]=oi[co+63235]="F"+co;var Gr={};Gr.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"},Gr.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"},Gr.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"},Gr.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"]},Gr.default=ot?Gr.macDefault:Gr.pcDefault;function Ls(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,o,a=0;a<t.length-1;a++){var l=t[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Ds(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(n=="..."){delete e[r];continue}for(var i=Lt(r.split(" "),Ls),o=0;o<i.length;o++){var a=void 0,l=void 0;o==i.length-1?(l=i.join(" "),a=n):(l=i.slice(0,o+1).join(" "),a="...");var s=t[l];if(!s)t[l]=a;else if(s!=a)throw new Error("Inconsistent bindings for "+l)}delete e[r]}for(var u in t)e[u]=t[u];return e}function Ai(e,t,r,n){t=No(t);var i=t.call?t.call(e,n):t[e];if(i===!1)return"nothing";if(i==="...")return"multi";if(i!=null&&r(i))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ai(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Ai(e,t.fallthrough[o],r,n);if(a)return a}}}function yl(e){var t=typeof e=="string"?e:oi[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function bl(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(Q?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(Q?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function Sl(e,t){if(y&&e.keyCode==34&&e.char)return!1;var r=oi[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),bl(r,e,t))}function No(e){return typeof e=="string"?Gr[e]:e}function Ni(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&V(o.from,qe(n).to)<=0;){var a=n.pop();if(V(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}br(e,function(){for(var l=n.length-1;l>=0;l--)Ti(e.doc,"",n[l].from,n[l].to,"+delete");Mi(e)})}function ca(e,t,r){var n=Me(e.text,t+r,r);return n<0||n>e.text.length?null:n}function fa(e,t,r){var n=ca(e,t.ch,r);return n==null?null:new L(t.line,n,r<0?"after":"before")}function da(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=be(r,t.doc.direction);if(o){var a=i<0?qe(o):o[0],l=i<0==(a.level==1),s=l?"after":"before",u;if(a.level>0||t.doc.direction=="rtl"){var p=Jr(t,r);u=i<0?r.text.length-1:0;var g=Tr(t,p,u).top;u=k(function(R){return Tr(t,p,R).top==g},i<0==(a.level==1)?a.from:a.to-1,u),s=="before"&&(u=ca(r,u,1))}else u=i<0?a.to:a.from;return new L(n,u,s)}}return new L(n,i<0?r.text.length:0,i<0?"before":"after")}function Ts(e,t,r,n){var i=be(t,e.doc.direction);if(!i)return fa(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=ue(i,r.ch,r.sticky),a=i[o];if(e.doc.direction=="ltr"&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return fa(t,r,n);var l=function(Be,Ve){return ca(t,Be instanceof L?Be.ch:Be,Ve)},s,u=function(Be){return e.options.lineWrapping?(s=s||Jr(e,t),Ea(e,t,s,Be)):{begin:0,end:t.text.length}},p=u(r.sticky=="before"?l(r,-1):r.ch);if(e.doc.direction=="rtl"||a.level==1){var g=a.level==1==n<0,R=l(r,g?1:-1);if(R!=null&&(g?R<=a.to&&R<=p.end:R>=a.from&&R>=p.begin)){var O=g?"before":"after";return new L(r.line,R,O)}}var U=function(Be,Ve,$e){for(var nt=function(Sn,Qn){return Qn?new L(r.line,l(Sn,1),"before"):new L(r.line,Sn,"after")};Be>=0&&Be<i.length;Be+=Ve){var Mt=i[Be],yt=Ve>0==(Mt.level!=1),Ut=yt?$e.begin:l($e.end,-1);if(Mt.from<=Ut&&Ut<Mt.to||(Ut=yt?Mt.from:l(Mt.to,-1),$e.begin<=Ut&&Ut<$e.end))return nt(Ut,yt)}},ee=U(o+n,n,p);if(ee)return ee;var we=n>0?p.end:l(p.begin,-1);return we!=null&&!(n>0&&we==t.text.length)&&(ee=U(n>0?0:i.length-1,n,u(we)),ee)?ee:null}var fo={selectAll:il,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),he)},killLine:function(e){return Ni(e,function(t){if(t.empty()){var r=C(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:L(t.head.line+1,0)}:{from:t.head,to:L(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Ni(e,function(t){return{from:L(t.from().line,0),to:te(e.doc,L(t.to().line+1,0))}})},delLineLeft:function(e){return Ni(e,function(t){return{from:L(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Ni(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return Ni(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(L(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(L(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return xl(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Cl(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Ps(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},ve)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},ve)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?Cl(e,t.head):n},ve)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=de(e.getLine(o.line),o.ch,n);t.push(wt(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return br(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=C(e.doc,i.line).text;if(o){if(i.ch==o.length&&(i=new L(i.line,i.ch-1)),i.ch>0)i=new L(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),L(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=C(e.doc,i.line-1).text;a&&(i=new L(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),L(i.line-1,a.length-1),i,"+transpose"))}}r.push(new un(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return br(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Mi(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function xl(e,t){var r=C(e.doc,t),n=Ot(r);return n!=r&&(t=j(n)),da(!0,e,n,t,1)}function Ps(e,t){var r=C(e.doc,t),n=hn(r);return n!=r&&(t=j(n)),da(!0,e,r,t,-1)}function Cl(e,t){var r=xl(e,t.line),n=C(e.doc,r.line),i=be(n,e.doc.direction);if(!i||i[0].level==0){var o=Math.max(r.ch,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return L(r.line,a?0:o,r.sticky)}return r}function Bo(e,t,r){if(typeof t=="string"&&(t=fo[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=We}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function As(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Ai(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Ai(t,e.options.extraKeys,r,e)||Ai(t,e.options.keyMap,r,e)}var Ns=new ae;function ho(e,t,r,n){var i=e.state.keySeq;if(i){if(yl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ns.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),El(e,i+" "+t,r,n))return!0}return El(e,t,r,n)}function El(e,t,r,n){var i=As(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&ct(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(st(r),Xo(e)),!!i}function wl(e,t){var r=Sl(t,!0);return r?t.shiftKey&&!e.state.keySeq?ho(e,"Shift-"+r,t,function(n){return Bo(e,n,!0)})||ho(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Bo(e,n)}):ho(e,r,t,function(n){return Bo(e,n)}):!1}function Bs(e,t,r){return ho(e,"'"+r+"'",t,function(n){return Bo(e,n,!0)})}var ha=null;function Ol(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=Ie(),!at(t,e))){v&&A<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=wl(t,e);y&&(ha=n?r:null,!n&&r==88&&!pn&&(ot?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),T&&!ot&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&$s(t)}}function $s(e){var t=e.display.lineDiv;bt(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(b(t,"CodeMirror-crosshair"),Pe(document,"keyup",r),Pe(document,"mouseover",r))}G(document,"keyup",r),G(document,"mouseover",r)}function Il(e){e.keyCode==16&&(this.doc.sel.shift=!1),at(this,e)}function Ml(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Br(t.display,e)||at(t,e)||e.ctrlKey&&!e.altKey||ot&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(y&&r==ha){ha=null,st(e);return}if(!(y&&(!e.which||e.which<10)&&wl(t,e))){var i=String.fromCharCode(n==null?r:n);i!="\b"&&(Bs(t,e,i)||t.display.input.onKeyPress(e))}}}var Ws=400,va=function(e,t,r){this.time=e,this.pos=t,this.button=r};va.prototype.compare=function(e,t,r){return this.time+Ws>e&&V(t,this.pos)==0&&r==this.button};var vo,po;function zs(e,t){var r=+new Date;return po&&po.compare(r,e,t)?(vo=po=null,"triple"):vo&&vo.compare(r,e,t)?(po=new va(r,e,t),vo=null,"double"):(vo=new va(r,e,t),po=null,"single")}function Rl(e){var t=this,r=t.display;if(!(at(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,Br(r,e)){N||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(!pa(t,e)){var n=di(t,e),i=fn(e),o=n?zs(n,i):"single";window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(n&&Hs(t,i,n,o,e))&&(i==1?n?_s(t,n,o,e):Cn(e)==r.scroller&&st(e):i==2?(n&&Lo(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(S?t.display.input.onContextMenu(e):Fa(t)))}}}function Hs(e,t,r,n,i){var o="Click";return n=="double"?o="Double"+o:n=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,ho(e,bl(o,i),i,function(a){if(typeof a=="string"&&(a=fo[a]),!a)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=a(e,r)!=We}finally{e.state.suppressEdits=!1}return l})}function Zs(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var o=Ct?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),i.addNew==null&&(i.addNew=ot?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(ot?r.altKey:r.ctrlKey)),i}function _s(e,t,r,n){v?setTimeout(fe(Ra,e),0):e.curOp.focus=Ie();var i=Zs(e,r,n),o=e.doc.sel,a;e.options.dragDrop&&An&&!e.isReadOnly()&&r=="single"&&(a=o.contains(t))>-1&&(V((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(V(a.to(),t)>0||t.xRel<0)?Ks(e,n,t,i):js(e,n,t,i)}function Ks(e,t,r,n){var i=e.display,o=!1,a=Xn(e,function(u){N&&(i.scroller.draggable=!1),e.state.draggingText=!1,Pe(i.wrapper.ownerDocument,"mouseup",a),Pe(i.wrapper.ownerDocument,"mousemove",l),Pe(i.scroller,"dragstart",s),Pe(i.scroller,"drop",a),o||(st(u),n.addNew||Lo(e.doc,r,null,null,n.extend),N&&!Re||v&&A==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),l=function(u){o=o||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},s=function(){return o=!0};N&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),G(i.wrapper.ownerDocument,"mouseup",a),G(i.wrapper.ownerDocument,"mousemove",l),G(i.scroller,"dragstart",s),G(i.scroller,"drop",a),Fa(e),setTimeout(function(){return i.input.focus()},20)}function Fl(e,t,r){if(r=="char")return new un(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new un(L(t.line,0),te(e.doc,L(t.line+1,0)));var n=r(e,t);return new un(n.from,n.to)}function js(e,t,r,n){var i=e.display,o=e.doc;st(t);var a,l,s=o.sel,u=s.ranges;if(n.addNew&&!n.extend?(l=o.sel.contains(r),l>-1?a=u[l]:a=new un(r,r)):(a=o.sel.primary(),l=o.sel.primIndex),n.unit=="rectangle")n.addNew||(a=new un(r,r)),r=di(e,t,!0,!0),l=-1;else{var p=Fl(e,r,n.unit);n.extend?a=sa(a,p.anchor,p.head,n.extend):a=p}n.addNew?l==-1?(l=u.length,rr(o,$r(e,u.concat([a]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&n.unit=="char"&&!n.extend?(rr(o,$r(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):ua(o,l,a,Le):(l=0,rr(o,new Or([a],0),Le),s=o.sel);var g=r;function R($e){if(V(g,$e)!=0)if(g=$e,n.unit=="rectangle"){for(var nt=[],Mt=e.options.tabSize,yt=de(C(o,r.line).text,r.ch,Mt),Ut=de(C(o,$e.line).text,$e.ch,Mt),Sn=Math.min(yt,Ut),Qn=Math.max(yt,Ut),Ln=Math.min(r.line,$e.line),Sr=Math.min(e.lastLine(),Math.max(r.line,$e.line));Ln<=Sr;Ln++){var hr=C(o,Ln).text,Hn=Et(hr,Sn,Mt);Sn==Qn?nt.push(new un(L(Ln,Hn),L(Ln,Hn))):hr.length>Hn&&nt.push(new un(L(Ln,Hn),L(Ln,Et(hr,Qn,Mt))))}nt.length||nt.push(new un(r,r)),rr(o,$r(e,s.ranges.slice(0,l).concat(nt),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView($e)}else{var vr=a,er=Fl(e,$e,n.unit),jn=vr.anchor,Zn;V(er.anchor,jn)>0?(Zn=er.head,jn=Ne(vr.from(),er.anchor)):(Zn=er.anchor,jn=Ke(vr.to(),er.head));var Pn=s.ranges.slice(0);Pn[l]=Us(e,new un(te(o,jn),Zn)),rr(o,$r(e,Pn,l),Le)}}var O=i.wrapper.getBoundingClientRect(),U=0;function ee($e){var nt=++U,Mt=di(e,$e,!0,n.unit=="rectangle");if(Mt)if(V(Mt,g)!=0){e.curOp.focus=Ie(),R(Mt);var yt=wo(i,o);(Mt.line>=yt.to||Mt.line<yt.from)&&setTimeout(Xn(e,function(){U==nt&&ee($e)}),150)}else{var Ut=$e.clientY<O.top?-20:$e.clientY>O.bottom?20:0;Ut&&setTimeout(Xn(e,function(){U==nt&&(i.scroller.scrollTop+=Ut,ee($e))}),50)}}function we($e){e.state.selectingText=!1,U=1/0,$e&&(st($e),i.input.focus()),Pe(i.wrapper.ownerDocument,"mousemove",Be),Pe(i.wrapper.ownerDocument,"mouseup",Ve),o.history.lastSelOrigin=null}var Be=Xn(e,function($e){$e.buttons===0||!fn($e)?we($e):ee($e)}),Ve=Xn(e,we);e.state.selectingText=Ve,G(i.wrapper.ownerDocument,"mousemove",Be),G(i.wrapper.ownerDocument,"mouseup",Ve)}function Us(e,t){var r=t.anchor,n=t.head,i=C(e.doc,r.line);if(V(r,n)==0&&r.sticky==n.sticky)return t;var o=be(i);if(!o)return t;var a=ue(o,r.ch,r.sticky),l=o[a];if(l.from!=r.ch&&l.to!=r.ch)return t;var s=a+(l.from==r.ch==(l.level!=1)?0:1);if(s==0||s==o.length)return t;var u;if(n.line!=r.line)u=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var p=ue(o,n.ch,n.sticky),g=p-a||(n.ch-r.ch)*(l.level==1?-1:1);p==s-1||p==s?u=g<0:u=g>0}var R=o[s+(u?-1:0)],O=u==(R.level==1),U=O?R.from:R.to,ee=O?"after":"before";return r.ch==U&&r.sticky==ee?t:new un(new L(r.line,U,ee),n)}function Ll(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(R){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&st(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Ee(e,r))return kt(t);o-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var u=a.gutters.childNodes[s];if(u&&u.getBoundingClientRect().right>=i){var p=le(e.doc,o),g=e.display.gutterSpecs[s];return tt(e,r,e,p,g.className,t),kt(t)}}}function pa(e,t){return Ll(e,t,"gutterClick",!0)}function Dl(e,t){Br(e.display,t)||ks(e,t)||at(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function ks(e,t){return Ee(e,"gutterContextMenu")?Ll(e,t,"gutterContextMenu",!1):!1}function Tl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),On(e)}var Bi={toString:function(){return"CodeMirror.Init"}},Pl={},$o={};function Gs(e){var t=e.optionHandlers;function r(n,i,o,a){e.defaults[n]=i,o&&(t[n]=a?function(l,s,u){u!=Bi&&o(l,s,u)}:o)}e.defineOption=r,e.Init=Bi,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,oa(n)},!0),r("indentUnit",2,oa,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){no(n),On(n),fr(n)},!0),r("lineSeparator",null,function(n,i){if(n.doc.lineSep=i,!!i){var o=[],a=n.doc.first;n.doc.iter(function(s){for(var u=0;;){var p=s.text.indexOf(i,u);if(p==-1)break;u=p+i.length,o.push(L(a,p))}a++});for(var l=o.length-1;l>=0;l--)Ti(n.doc,i,o[l],L(o[l].line,o[l].ch+i.length))}}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,i,o){n.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),o!=Bi&&n.refresh()}),r("specialCharPlaceholder",Ir,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",Je?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(n,i){return n.getInputField().spellcheck=i},!0),r("autocorrect",!1,function(n,i){return n.getInputField().autocorrect=i},!0),r("autocapitalize",!1,function(n,i){return n.getInputField().autocapitalize=i},!0),r("rtlMoveVisually",!Ft),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){Tl(n),to(n)},!0),r("keyMap","default",function(n,i,o){var a=No(i),l=o!=Bi&&No(o);l&&l.detach&&l.detach(n,a),a.attach&&a.attach(n,l||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Xs,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=ra(i,n.options.lineNumbers),to(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?Go(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return Ri(n)},!0),r("scrollbarStyle","native",function(n){Na(n),Ri(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,i){n.display.gutterSpecs=ra(n.options.gutters,i),to(n)},!0),r("firstLineNumber",1,to,!0),r("lineNumberFormatter",function(n){return n},to,!0),r("showCursorWhenSelecting",!1,Xi,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(Ii(n),n.display.input.blur()),n.display.input.readOnlyChanged(i)}),r("screenReaderLabel",null,function(n,i){i=i===""?null:i,n.display.input.screenReaderLabelChanged(i)}),r("disableInput",!1,function(n,i){i||n.display.input.reset()},!0),r("dragDrop",!0,Vs),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Xi,!0),r("singleCursorHeightPerLine",!0,Xi,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,no,!0),r("addModeClass",!1,no,!0),r("pollInterval",100),r("undoDepth",200,function(n,i){return n.doc.history.undoDepth=i}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,no,!0),r("moveInputWithCursor",!0,function(n,i){i||n.display.input.resetPosition()}),r("tabindex",null,function(n,i){return n.display.input.getField().tabIndex=i||""}),r("autofocus",null),r("direction","ltr",function(n,i){return n.doc.setDirection(i)},!0),r("phrases",null)}function Vs(e,t,r){var n=r&&r!=Bi;if(!t!=!n){var i=e.display.dragFunctions,o=t?G:Pe;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Xs(e){e.options.lineWrapping?(bt(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(b(e.display.wrapper,"CodeMirror-wrap"),qn(e)),Vo(e),fr(e),On(e),setTimeout(function(){return Ri(e)},100)}function Rn(e,t){var r=this;if(!(this instanceof Rn))return new Rn(e,t);this.options=t=t?Y(t):{},Y(Pl,t,!1);var n=t.value;typeof n=="string"?n=new dr(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Rn.inputStyles[t.inputStyle](this),o=this.display=new ss(e,n,i,t);o.wrapper.CodeMirror=this,Tl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Na(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 ae,keySeq:null,specialChars:null},t.autofocus&&!Je&&o.input.focus(),v&&A<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Ys(this),Ms(),gi(this),this.curOp.forceUpdate=!0,Ua(this,n),t.autofocus&&!Je||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&Yo(r)},20):Ii(this);for(var a in $o)$o.hasOwnProperty(a)&&$o[a](this,t[a],Bi);Wa(this),t.finishInit&&t.finishInit(this);for(var l=0;l<ga.length;++l)ga[l](this);mi(this),N&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"&&(o.lineDiv.style.textRendering="auto")}Rn.defaults=Pl,Rn.optionHandlers=$o;function Ys(e){var t=e.display;G(t.scroller,"mousedown",Xn(e,Rl)),v&&A<11?G(t.scroller,"dblclick",Xn(e,function(s){if(!at(e,s)){var u=di(e,s);if(!(!u||pa(e,s)||Br(e.display,s))){st(s);var p=e.findWordAt(u);Lo(e.doc,p.anchor,p.head)}}})):G(t.scroller,"dblclick",function(s){return at(e,s)||st(s)}),G(t.scroller,"contextmenu",function(s){return Dl(e,s)}),G(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||Dl(e,s)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function o(s){if(s.touches.length!=1)return!1;var u=s.touches[0];return u.radiusX<=1&&u.radiusY<=1}function a(s,u){if(u.left==null)return!0;var p=u.left-s.left,g=u.top-s.top;return p*p+g*g>20*20}G(t.scroller,"touchstart",function(s){if(!at(e,s)&&!o(s)&&!pa(e,s)){t.input.ensurePolled(),clearTimeout(r);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-n.end<=300?n:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),G(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),G(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!Br(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var p=e.coordsChar(t.activeTouch,"page"),g;!u.prev||a(u,u.prev)?g=new un(p,p):!u.prev.prev||a(u,u.prev.prev)?g=e.findWordAt(p):g=new un(L(p.line,0),te(e.doc,L(p.line+1,0))),e.setSelection(g.anchor,g.head),e.focus(),st(s)}i()}),G(t.scroller,"touchcancel",i),G(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Qi(e,t.scroller.scrollTop),vi(e,t.scroller.scrollLeft,!0),tt(e,"scroll",e))}),G(t.scroller,"mousewheel",function(s){return Za(e,s)}),G(t.scroller,"DOMMouseScroll",function(s){return Za(e,s)}),G(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){at(e,s)||sn(s)},over:function(s){at(e,s)||(Is(e,s),sn(s))},start:function(s){return Os(e,s)},drop:Xn(e,ws),leave:function(s){at(e,s)||pl(e)}};var l=t.input.getField();G(l,"keyup",function(s){return Il.call(e,s)}),G(l,"keydown",Xn(e,Ol)),G(l,"keypress",Xn(e,Ml)),G(l,"focus",function(s){return Yo(e,s)}),G(l,"blur",function(s){return Ii(e,s)})}var ga=[];Rn.defineInitHook=function(e){return ga.push(e)};function go(e,t,r,n){var i=e.doc,o;r==null&&(r="add"),r=="smart"&&(i.mode.indent?o=Ae(e,t).state:r="prev");var a=e.options.tabSize,l=C(i,t),s=de(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u=l.text.match(/^\s*/)[0],p;if(!n&&!/\S/.test(l.text))p=0,r="not";else if(r=="smart"&&(p=i.mode.indent(o,l.text.slice(u.length),l.text),p==We||p>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?p=de(C(i,t-1).text,null,a):p=0:r=="add"?p=s+e.options.indentUnit:r=="subtract"?p=s-e.options.indentUnit:typeof r=="number"&&(p=s+r),p=Math.max(0,p);var g="",R=0;if(e.options.indentWithTabs)for(var O=Math.floor(p/a);O;--O)R+=a,g+=" ";if(R<p&&(g+=wt(p-R)),g!=u)return Ti(i,g,L(t,0),L(t,u.length),"+input"),l.stateAfter=null,!0;for(var U=0;U<i.sel.ranges.length;U++){var ee=i.sel.ranges[U];if(ee.head.line==t&&ee.head.ch<u.length){var we=L(t,u.length);ua(i,U,new un(we,we));break}}}var Wr=null;function Wo(e){Wr=e}function ma(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=+new Date-200,l=i=="paste"||e.state.pasteIncoming>a,s=In(t),u=null;if(l&&n.ranges.length>1)if(Wr&&Wr.text.join(`
`)==t){if(n.ranges.length%Wr.text.length==0){u=[];for(var p=0;p<Wr.text.length;p++)u.push(o.splitLines(Wr.text[p]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=Lt(s,function(Be){return[Be]}));for(var g=e.curOp.updateInput,R=n.ranges.length-1;R>=0;R--){var O=n.ranges[R],U=O.from(),ee=O.to();O.empty()&&(r&&r>0?U=L(U.line,U.ch-r):e.state.overwrite&&!l?ee=L(ee.line,Math.min(C(o,ee.line).text.length,ee.ch+qe(s).length)):l&&Wr&&Wr.lineWise&&Wr.text.join(`
`)==s.join(`
`)&&(U=ee=L(U.line,0)));var we={from:U,to:ee,text:u?u[R%u.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Di(e.doc,we),ct(e,"inputRead",e,we)}t&&!l&&Nl(e,t),Mi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=g),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Al(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&br(t,function(){return ma(t,r,0,null,"paste")}),!0}function Nl(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=go(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(C(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=go(e,i.head.line,"smart"));a&&ct(e,"electricInput",e,i.head.line)}}}function Bl(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:L(i,0),head:L(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function $l(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Wl(){var e=P("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=P("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return N?e.style.width="1000px":e.setAttribute("wrap","off"),Te&&(e.style.border="1px solid black"),$l(e),t}function Qs(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,i){var o=this.options,a=o[n];o[n]==i&&n!="mode"||(o[n]=i,t.hasOwnProperty(n)&&Xn(this,t[n])(this,i,a),tt(this,"optionChange",this,n))},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,i){this.state.keyMaps[i?"push":"unshift"](No(n))},removeKeyMap:function(n){for(var i=this.state.keyMaps,o=0;o<i.length;++o)if(i[o]==n||i[o].name==n)return i.splice(o,1),!0},addOverlay:lr(function(n,i){var o=n.token?n:e.getMode(this.options,n);if(o.startState)throw new Error("Overlays may not be stateful.");lt(this.state.overlays,{mode:o,modeSpec:n,opaque:i&&i.opaque,priority:i&&i.priority||0},function(a){return a.priority}),this.state.modeGen++,fr(this)}),removeOverlay:lr(function(n){for(var i=this.state.overlays,o=0;o<i.length;++o){var a=i[o].modeSpec;if(a==n||typeof n=="string"&&a.name==n){i.splice(o,1),this.state.modeGen++,fr(this);return}}}),indentLine:lr(function(n,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),ce(this.doc,n)&&go(this,n,i,o)}),indentSelection:lr(function(n){for(var i=this.doc.sel.ranges,o=-1,a=0;a<i.length;a++){var l=i[a];if(l.empty())l.head.line>o&&(go(this,l.head.line,n,!0),o=l.head.line,a==this.doc.sel.primIndex&&Mi(this));else{var s=l.from(),u=l.to(),p=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var g=p;g<o;++g)go(this,g,n);var R=this.doc.sel.ranges;s.ch==0&&i.length==R.length&&R[a].from().ch>0&&ua(this.doc,a,new un(s,R[a].to()),he)}}}),getTokenAt:function(n,i){return Gt(this,n,i)},getLineTokens:function(n,i){return Gt(this,L(n),i,!0)},getTokenTypeAt:function(n){n=te(this.doc,n);var i=zt(this,C(this.doc,n.line)),o=0,a=(i.length-1)/2,l=n.ch,s;if(l==0)s=i[2];else for(;;){var u=o+a>>1;if((u?i[u*2-1]:0)>=l)a=u;else if(i[u*2+1]<l)o=u+1;else{s=i[u*2+2];break}}var p=s?s.indexOf("overlay "):-1;return p<0?s:p==0?null:s.slice(0,p-1)},getModeAt:function(n){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(n).state).mode:i},getHelper:function(n,i){return this.getHelpers(n,i)[0]},getHelpers:function(n,i){var o=[];if(!r.hasOwnProperty(i))return o;var a=r[i],l=this.getModeAt(n);if(typeof l[i]=="string")a[l[i]]&&o.push(a[l[i]]);else if(l[i])for(var s=0;s<l[i].length;s++){var u=a[l[i][s]];u&&o.push(u)}else l.helperType&&a[l.helperType]?o.push(a[l.helperType]):a[l.name]&&o.push(a[l.name]);for(var p=0;p<a._global.length;p++){var g=a._global[p];g.pred(l,this)&&ie(o,g.val)==-1&&o.push(g.val)}return o},getStateAfter:function(n,i){var o=this.doc;return n=ft(o,n==null?o.first+o.size-1:n),Ae(this,n+1,i).state},cursorCoords:function(n,i){var o,a=this.doc.sel.primary();return n==null?o=a.head:typeof n=="object"?o=te(this.doc,n):o=n?a.from():a.to(),yr(this,o,i||"page")},charCoords:function(n,i){return Pr(this,te(this.doc,n),i||"page")},coordsChar:function(n,i){return n=kr(this,n,i||"page"),jo(this,n.left,n.top)},lineAtHeight:function(n,i){return n=kr(this,{top:n,left:0},i||"page").top,le(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,i,o){var a=!1,l;if(typeof n=="number"){var s=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>s&&(n=s,a=!0),l=C(this.doc,n)}else l=n;return Er(this,l,{top:0,left:0},i||"page",o||a).top+(a?this.doc.height-Mn(l):0)},defaultTextHeight:function(){return wi(this.display)},defaultCharWidth:function(){return Oi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,o,a,l){var s=this.display;n=yr(this,te(this.doc,n));var u=n.bottom,p=n.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),s.sizer.appendChild(i),a=="over")u=n.top;else if(a=="above"||a=="near"){var g=Math.max(s.wrapper.clientHeight,this.doc.height),R=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(a=="above"||n.bottom+i.offsetHeight>g)&&n.top>i.offsetHeight?u=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=g&&(u=n.bottom),p+i.offsetWidth>R&&(p=R-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",l=="right"?(p=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?p=0:l=="middle"&&(p=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=p+"px"),o&&Vl(this,{left:p,top:u,right:p+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:lr(Ol),triggerOnKeyPress:lr(Ml),triggerOnKeyUp:Il,triggerOnMouseDown:lr(Rl),execCommand:function(n){if(fo.hasOwnProperty(n))return fo[n].call(null,this)},triggerElectric:lr(function(n){Nl(this,n)}),findPosH:function(n,i,o,a){var l=1;i<0&&(l=-1,i=-i);for(var s=te(this.doc,n),u=0;u<i&&(s=ya(this.doc,s,l,o,a),!s.hitSide);++u);return s},moveH:lr(function(n,i){var o=this;this.extendSelectionsBy(function(a){return o.display.shift||o.doc.extend||a.empty()?ya(o.doc,a.head,n,i,o.options.rtlMoveVisually):n<0?a.from():a.to()},ve)}),deleteH:lr(function(n,i){var o=this.doc.sel,a=this.doc;o.somethingSelected()?a.replaceSelection("",null,"+delete"):Ni(this,function(l){var s=ya(a,l.head,n,i,!1);return n<0?{from:s,to:l.head}:{from:l.head,to:s}})}),findPosV:function(n,i,o,a){var l=1,s=a;i<0&&(l=-1,i=-i);for(var u=te(this.doc,n),p=0;p<i;++p){var g=yr(this,u,"div");if(s==null?s=g.left:g.left=s,u=zl(this,g,l,o),u.hitSide)break}return u},moveV:lr(function(n,i){var o=this,a=this.doc,l=[],s=!this.display.shift&&!a.extend&&a.sel.somethingSelected();if(a.extendSelectionsBy(function(p){if(s)return n<0?p.from():p.to();var g=yr(o,p.head,"div");p.goalColumn!=null&&(g.left=p.goalColumn),l.push(g.left);var R=zl(o,g,n,i);return i=="page"&&p==a.sel.primary()&&Jo(o,Pr(o,R,"div").top-g.top),R},ve),l.length)for(var u=0;u<a.sel.ranges.length;u++)a.sel.ranges[u].goalColumn=l[u]}),findWordAt:function(n){var i=this.doc,o=C(i,n.line).text,a=n.ch,l=n.ch;if(o){var s=this.getHelper(n,"wordChars");(n.sticky=="before"||l==o.length)&&a?--a:++l;for(var u=o.charAt(a),p=I(u,s)?function(g){return I(g,s)}:/\s/.test(u)?function(g){return/\s/.test(g)}:function(g){return!/\s/.test(g)&&!I(g)};a>0&&p(o.charAt(a-1));)--a;for(;l<o.length&&p(o.charAt(l));)++l}return new un(L(n.line,a),L(n.line,l))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?bt(this.display.cursorDiv,"CodeMirror-overwrite"):b(this.display.cursorDiv,"CodeMirror-overwrite"),tt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ie()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:lr(function(n,i){Yi(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Dr(this)-this.display.barHeight,width:n.scrollWidth-Dr(this)-this.display.barWidth,clientHeight:Ki(this),clientWidth:Hr(this)}},scrollIntoView:lr(function(n,i){n==null?(n={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof n=="number"?n={from:L(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=i||0,n.from.line!=null?Xl(this,n):Da(this,n.from,n.to,n.margin)}),setSize:lr(function(n,i){var o=this,a=function(s){return typeof s=="number"||/^\d+$/.test(String(s))?s+"px":s};n!=null&&(this.display.wrapper.style.width=a(n)),i!=null&&(this.display.wrapper.style.height=a(i)),this.options.lineWrapping&&nr(this);var l=this.display.viewFrom;this.doc.iter(l,this.display.viewTo,function(s){if(s.widgets){for(var u=0;u<s.widgets.length;u++)if(s.widgets[u].noHScroll){qr(o,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,tt(this,"refresh",this)}),operation:function(n){return br(this,n)},startOperation:function(){return gi(this)},endOperation:function(){return mi(this)},refresh:lr(function(){var n=this.display.cachedTextHeight;fr(this),this.curOp.forceUpdate=!0,On(this),Yi(this,this.doc.scrollLeft,this.doc.scrollTop),ta(this.display),(n==null||Math.abs(n-wi(this.display))>.5||this.options.lineWrapping)&&Vo(this),tt(this,"refresh",this)}),swapDoc:lr(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),Ua(this,n),On(this),this.display.input.reset(),Yi(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,ct(this,"swapDoc",this,i),i}),phrase:function(n){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,n)?i[n]:n},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}},it(e),e.registerHelper=function(n,i,o){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][i]=o},e.registerGlobalHelper=function(n,i,o,a){e.registerHelper(n,i,a),r[n]._global.push({pred:o,val:a})}}function ya(e,t,r,n,i){var o=t,a=r,l=C(e,t.line),s=i&&e.direction=="rtl"?-r:r;function u(){var Ve=t.line+s;return Ve<e.first||Ve>=e.first+e.size?!1:(t=new L(Ve,t.ch,t.sticky),l=C(e,Ve))}function p(Ve){var $e;if(n=="codepoint"){var nt=l.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(nt)?$e=null:$e=new L(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(nt>=55296&&nt<56320?2:1))),-r)}else i?$e=Ts(e.cm,l,t,r):$e=fa(l,t,r);if($e==null)if(!Ve&&u())t=da(i,e.cm,l,t.line,s);else return!1;else t=$e;return!0}if(n=="char"||n=="codepoint")p();else if(n=="column")p(!0);else if(n=="word"||n=="group")for(var g=null,R=n=="group",O=e.cm&&e.cm.getHelper(t,"wordChars"),U=!0;!(r<0&&!p(!U));U=!1){var ee=l.text.charAt(t.ch)||`
`,we=I(ee,O)?"w":R&&ee==`
`?"n":!R||/\s/.test(ee)?null:"p";if(R&&!U&&!we&&(we="s"),g&&g!=we){r<0&&(r=1,p(),t.sticky="after");break}if(we&&(g=we),r>0&&!p(!U))break}var Be=To(e,t,o,a,!0);return Qe(o,Be)&&(Be.hitSide=!0),Be}function zl(e,t,r,n){var i=e.doc,o=t.left,a;if(n=="page"){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(l-.5*wi(e.display),3);a=(r>0?t.bottom:t.top)+r*s}else n=="line"&&(a=r>0?t.bottom+3:t.top-3);for(var u;u=jo(e,o,a),!!u.outside;){if(r<0?a<=0:a>=i.height){u.hitSide=!0;break}a+=r*5}return u}var dn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ae,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};dn.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;$l(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function o(l){for(var s=l.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}G(i,"paste",function(l){!o(l)||at(n,l)||Al(l,n)||A<=11&&setTimeout(Xn(n,function(){return t.updateFromDOM()}),20)}),G(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),G(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),G(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),G(i,"touchstart",function(){return r.forceCompositionEnd()}),G(i,"input",function(){t.composing||t.readFromDOMSoon()});function a(l){if(!(!o(l)||at(n,l))){if(n.somethingSelected())Wo({lineWise:!1,text:n.getSelections()}),l.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var s=Bl(n);Wo({lineWise:!0,text:s.text}),l.type=="cut"&&n.operation(function(){n.setSelections(s.ranges,0,he),n.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var u=Wr.text.join(`
`);if(l.clipboardData.setData("Text",u),l.clipboardData.getData("Text")==u){l.preventDefault();return}}var p=Wl(),g=p.firstChild;n.display.lineSpace.insertBefore(p,n.display.lineSpace.firstChild),g.value=Wr.text.join(`
`);var R=document.activeElement;Ye(g),setTimeout(function(){n.display.lineSpace.removeChild(p),R.focus(),R==i&&r.showPrimarySelection()},50)}}G(i,"copy",a),G(i,"cut",a)},dn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},dn.prototype.prepareSelection=function(){var e=Ia(this.cm,!1);return e.focus=document.activeElement==this.div,e},dn.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},dn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},dn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var o=zo(t,e.anchorNode,e.anchorOffset),a=zo(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&a&&!a.bad&&V(Ne(o,a),n)==0&&V(Ke(o,a),i)==0)){var l=t.display.view,s=n.line>=t.display.viewFrom&&Hl(t,n)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Hl(t,i);if(!u){var p=l[l.length-1].measure,g=p.maps?p.maps[p.maps.length-1]:p.map;u={node:g[g.length-1],offset:g[g.length-2]-g[g.length-3]}}if(!s||!u){e.removeAllRanges();return}var R=e.rangeCount&&e.getRangeAt(0),O;try{O=je(s.node,s.offset,u.offset,u.node)}catch(U){}O&&(!T&&t.state.focused?(e.collapse(s.node,s.offset),O.collapsed||(e.removeAllRanges(),e.addRange(O))):(e.removeAllRanges(),e.addRange(O)),R&&e.anchorNode==null?e.addRange(R):T&&this.startGracePeriod()),this.rememberSelection()}},dn.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},dn.prototype.showMultipleSelections=function(e){X(this.cm.display.cursorDiv,e.cursors),X(this.cm.display.selectionDiv,e.selection)},dn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},dn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return ze(this.div,t)},dn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},dn.prototype.blur=function(){this.div.blur()},dn.prototype.getField=function(){return this.div},dn.prototype.supportsTouch=function(){return!0},dn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():br(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},dn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},dn.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(q&&oe&&this.cm.display.gutterSpecs.length&&Js(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var r=zo(t,e.anchorNode,e.anchorOffset),n=zo(t,e.focusNode,e.focusOffset);r&&n&&br(t,function(){rr(t.doc,ti(r,n),he),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},dn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(n.ch==0&&n.line>e.firstLine()&&(n=L(n.line-1,C(e.doc,n.line-1).length)),i.ch==C(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=L(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;n.line==t.viewFrom||(o=hi(e,n.line))==0?(a=j(t.view[0].line),l=t.view[0].node):(a=j(t.view[o].line),l=t.view[o-1].node.nextSibling);var s=hi(e,i.line),u,p;if(s==t.view.length-1?(u=t.viewTo-1,p=t.lineDiv.lastChild):(u=j(t.view[s+1].line)-1,p=t.view[s+1].node.previousSibling),!l)return!1;for(var g=e.doc.splitLines(qs(e,l,p,a,u)),R=D(e.doc,L(a,0),L(u,C(e.doc,u).text.length));g.length>1&&R.length>1;)if(qe(g)==qe(R))g.pop(),R.pop(),u--;else if(g[0]==R[0])g.shift(),R.shift(),a++;else break;for(var O=0,U=0,ee=g[0],we=R[0],Be=Math.min(ee.length,we.length);O<Be&&ee.charCodeAt(O)==we.charCodeAt(O);)++O;for(var Ve=qe(g),$e=qe(R),nt=Math.min(Ve.length-(g.length==1?O:0),$e.length-(R.length==1?O:0));U<nt&&Ve.charCodeAt(Ve.length-U-1)==$e.charCodeAt($e.length-U-1);)++U;if(g.length==1&&R.length==1&&a==n.line)for(;O&&O>n.ch&&Ve.charCodeAt(Ve.length-U-1)==$e.charCodeAt($e.length-U-1);)O--,U++;g[g.length-1]=Ve.slice(0,Ve.length-U).replace(/^\u200b+/,""),g[0]=g[0].slice(O).replace(/\u200b+$/,"");var Mt=L(a,O),yt=L(u,R.length?qe(R).length-U:0);if(g.length>1||g[0]||V(Mt,yt))return Ti(e.doc,g,Mt,yt,"+input"),!0},dn.prototype.ensurePolled=function(){this.forceCompositionEnd()},dn.prototype.reset=function(){this.forceCompositionEnd()},dn.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},dn.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},dn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&br(this.cm,function(){return fr(e.cm)})},dn.prototype.setUneditable=function(e){e.contentEditable="false"},dn.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Xn(this.cm,ma)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},dn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},dn.prototype.onContextMenu=function(){},dn.prototype.resetPosition=function(){},dn.prototype.needsContentAttribute=!0;function Hl(e,t){var r=ki(e,t.line);if(!r||r.hidden)return null;var n=C(e.doc,t.line),i=ji(r,n,t.line),o=be(n,e.doc.direction),a="left";if(o){var l=ue(o,t.ch);a=l%2?"right":"left"}var s=Gi(i.map,t.ch,a);return s.offset=s.collapse=="right"?s.end:s.start,s}function Js(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function $i(e,t){return t&&(e.bad=!0),e}function qs(e,t,r,n,i){var o="",a=!1,l=e.doc.lineSeparator(),s=!1;function u(O){return function(U){return U.id==O}}function p(){a&&(o+=l,s&&(o+=l),a=s=!1)}function g(O){O&&(p(),o+=O)}function R(O){if(O.nodeType==1){var U=O.getAttribute("cm-text");if(U){g(U);return}var ee=O.getAttribute("cm-marker"),we;if(ee){var Be=e.findMarks(L(n,0),L(i+1,0),u(+ee));Be.length&&(we=Be[0].find(0))&&g(D(e.doc,we.from,we.to).join(l));return}if(O.getAttribute("contenteditable")=="false")return;var Ve=/^(pre|div|p|li|table|br)$/i.test(O.nodeName);if(!/^br$/i.test(O.nodeName)&&O.textContent.length==0)return;Ve&&p();for(var $e=0;$e<O.childNodes.length;$e++)R(O.childNodes[$e]);/^(pre|p)$/i.test(O.nodeName)&&(s=!0),Ve&&(a=!0)}else O.nodeType==3&&g(O.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;R(t),t!=r;)t=t.nextSibling,s=!1;return o}function zo(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return $i(e.clipPos(L(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return eu(o,t,r)}}function eu(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!ze(n,t))return $i(L(j(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?qe(e.rest):e.line;return $i(L(j(o),o.text.length),i)}var a=t.nodeType==3?t:null,l=t;for(!a&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(a=t.firstChild,r&&(r=a.nodeValue.length));l.parentNode!=n;)l=l.parentNode;var s=e.measure,u=s.maps;function p(we,Be,Ve){for(var $e=-1;$e<(u?u.length:0);$e++)for(var nt=$e<0?s.map:u[$e],Mt=0;Mt<nt.length;Mt+=3){var yt=nt[Mt+2];if(yt==we||yt==Be){var Ut=j($e<0?e.line:e.rest[$e]),Sn=nt[Mt]+Ve;return(Ve<0||yt!=we)&&(Sn=nt[Mt+(Ve?1:0)]),L(Ut,Sn)}}}var g=p(a,l,r);if(g)return $i(g,i);for(var R=l.nextSibling,O=a?a.nodeValue.length-r:0;R;R=R.nextSibling){if(g=p(R,R.firstChild,0),g)return $i(L(g.line,g.ch-O),i);O+=R.textContent.length}for(var U=l.previousSibling,ee=r;U;U=U.previousSibling){if(g=p(U,U.firstChild,-1),g)return $i(L(g.line,g.ch+ee),i);ee+=U.textContent.length}}var $n=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ae,this.hasSelection=!1,this.composing=null};$n.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),Te&&(i.style.width="0px"),G(i,"input",function(){v&&A>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),G(i,"paste",function(a){at(n,a)||Al(a,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())});function o(a){if(!at(n,a)){if(n.somethingSelected())Wo({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var l=Bl(n);Wo({lineWise:!0,text:l.text}),a.type=="cut"?n.setSelections(l.ranges,null,he):(r.prevInput="",i.value=l.text.join(`
`),Ye(i))}else return;a.type=="cut"&&(n.state.cutIncoming=+new Date)}}G(i,"cut",o),G(i,"copy",o),G(e.scroller,"paste",function(a){if(!(Br(e,a)||at(n,a))){if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var l=new Event("paste");l.clipboardData=a.clipboardData,i.dispatchEvent(l)}}),G(e.lineSpace,"selectstart",function(a){Br(e,a)||st(a)}),G(i,"compositionstart",function(){var a=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:a,range:n.markText(a,n.getCursor("to"),{className:"CodeMirror-composing"})}}),G(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},$n.prototype.createField=function(e){this.wrapper=Wl(),this.textarea=this.wrapper.firstChild},$n.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$n.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Ia(e);if(e.options.moveInputWithCursor){var i=yr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},$n.prototype.showSelection=function(e){var t=this.cm,r=t.display;X(r.cursorDiv,e.cursors),X(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$n.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing)){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&Ye(this.textarea),v&&A>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",v&&A>=9&&(this.hasSelection=null))}},$n.prototype.getField=function(){return this.textarea},$n.prototype.supportsTouch=function(){return!1},$n.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Je||Ie()!=this.textarea))try{this.textarea.focus()}catch(e){}},$n.prototype.blur=function(){this.textarea.blur()},$n.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$n.prototype.receivedFocus=function(){this.slowPoll()},$n.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},$n.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function r(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,r)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,r)},$n.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||En(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(v&&A>=9&&this.hasSelection===i||ot&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!n&&(n="\u200B"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(n.length,i.length);a<l&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return br(t,function(){ma(t,i.slice(a),n.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
`)>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},$n.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$n.prototype.onKeyPress=function(){v&&A>=9&&(this.hasSelection=null),this.fastPoll()},$n.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=di(r,e),a=n.scroller.scrollTop;if(!o||y)return;var l=r.options.resetSelectionOnContextMenu;l&&r.doc.sel.contains(o)==-1&&Xn(r,rr)(r.doc,ti(o),he);var s=i.style.cssText,u=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+`px;
z-index: 1000; background: `+(v?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var g;N&&(g=window.scrollY),n.input.focus(),N&&window.scrollTo(null,g),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=O,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function R(){if(i.selectionStart!=null){var ee=r.somethingSelected(),we="\u200B"+(ee?i.value:"");i.value="\u21DA",i.value=we,t.prevInput=ee?"":"\u200B",i.selectionStart=1,i.selectionEnd=we.length,n.selForContextMenu=r.doc.sel}}function O(){if(t.contextMenuPending==O&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,v&&A<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=a),i.selectionStart!=null)){(!v||v&&A<9)&&R();var ee=0,we=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Xn(r,il)(r):ee++<10?n.detectingSelectAll=setTimeout(we,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(we,200)}}if(v&&A>=9&&R(),S){sn(e);var U=function(){Pe(window,"mouseup",U),setTimeout(O,20)};G(window,"mouseup",U)}else setTimeout(O,50)},$n.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},$n.prototype.setUneditable=function(){},$n.prototype.needsContentAttribute=!1;function tu(e,t){if(t=t?Y(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var r=Ie();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(G(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=a}}catch(s){}}t.finishInit=function(s){s.save=n,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,n(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(Pe(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=Rn(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return l}function nu(e){e.off=Pe,e.on=G,e.wheelEventPixels=us,e.Doc=dr,e.splitLines=In,e.countColumn=de,e.findColumn=Et,e.isWordChar=E,e.Pass=We,e.signal=tt,e.Line=tr,e.changeEnd=ni,e.scrollbarModel=Aa,e.Pos=L,e.cmpPos=V,e.modes=Nn,e.mimeModes=zn,e.resolveMode=qt,e.getMode=ut,e.modeExtensions=jt,e.extendMode=m,e.copyState=B,e.startState=h,e.innerMode=K,e.commands=fo,e.keyMap=Gr,e.keyName=Sl,e.isModifierKey=yl,e.lookupKey=Ai,e.normalizeKeyMap=Ds,e.StringStream=d,e.SharedTextMarker=so,e.TextMarker=ii,e.LineWidget=lo,e.e_preventDefault=st,e.e_stopPropagation=tn,e.e_stop=sn,e.addClass=bt,e.contains=ze,e.rmClass=b,e.keyNames=oi}Gs(Rn),Qs(Rn);var ru="iter insert remove copy getEditor constructor".split(" ");for(var Ho in dr.prototype)dr.prototype.hasOwnProperty(Ho)&&ie(ru,Ho)<0&&(Rn.prototype[Ho]=function(e){return function(){return e.apply(this.doc,arguments)}}(dr.prototype[Ho]));return it(dr),Rn.inputStyles={textarea:$n,contenteditable:dn},Rn.defineMode=function(e){!Rn.defaults.mode&&e!="null"&&(Rn.defaults.mode=e),or.apply(this,arguments)},Rn.defineMIME=gr,Rn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Rn.defineMIME("text/plain","null"),Rn.defineExtension=function(e,t){Rn.prototype[e]=t},Rn.defineDocExtension=function(e,t){dr.prototype[e]=t},Rn.fromTextArea=tu,nu(Rn),Rn.version="5.58.2",Rn})},93681:function(rn,De,f){"use strict";f.r(De),f.d(De,{BaseInput:function(){return y},default:function(){return Ft}});var T=f(54476),w=f(33885),x=f(20068),W=f(76190),v=f(92310),A=f.n(v),N=f(59301),ye=f(5643),oe=function(Q){var S,c,b=Q.inputElement,F=Q.prefixCls,X=Q.prefix,P=Q.suffix,Oe=Q.addonBefore,je=Q.addonAfter,ze=Q.className,Ie=Q.style,bt=Q.disabled,Xe=Q.readOnly,Ye=Q.focused,fe=Q.triggerFocus,Y=Q.allowClear,de=Q.value,ae=Q.handleReset,ie=Q.hidden,Ue=Q.classes,We=Q.classNames,he=Q.dataAttrs,Le=Q.styles,ve=Q.components,Et=(ve==null?void 0:ve.affixWrapper)||"span",Tt=(ve==null?void 0:ve.groupWrapper)||"span",wt=(ve==null?void 0:ve.wrapper)||"span",qe=(ve==null?void 0:ve.groupAddon)||"span",Lt=(0,N.useRef)(null),lt=function(z){var ue;(ue=Lt.current)!==null&&ue!==void 0&&ue.contains(z.target)&&(fe==null||fe())},Z=function(){var z;if(!Y)return null;var ue=!bt&&!Xe&&de,Ce="".concat(F,"-clear-icon"),be=(0,W.Z)(Y)==="object"&&Y!==null&&Y!==void 0&&Y.clearIcon?Y.clearIcon:"\u2716";return N.createElement("span",{onClick:ae,onMouseDown:function(G){return G.preventDefault()},className:A()(Ce,(z={},(0,x.Z)(z,"".concat(Ce,"-hidden"),!ue),(0,x.Z)(z,"".concat(Ce,"-has-suffix"),!!P),z)),role:"button",tabIndex:-1},be)},Fe=(0,N.cloneElement)(b,{value:de,hidden:ie,className:A()((S=b.props)===null||S===void 0?void 0:S.className,!(0,ye.X3)(Q)&&!(0,ye.He)(Q)&&ze)||null,style:(0,w.Z)((0,w.Z)({},(c=b.props)===null||c===void 0?void 0:c.style),!(0,ye.X3)(Q)&&!(0,ye.He)(Q)?Ie:{})});if((0,ye.X3)(Q)){var se,E="".concat(F,"-affix-wrapper"),I=A()(E,(se={},(0,x.Z)(se,"".concat(E,"-disabled"),bt),(0,x.Z)(se,"".concat(E,"-focused"),Ye),(0,x.Z)(se,"".concat(E,"-readonly"),Xe),(0,x.Z)(se,"".concat(E,"-input-with-clear-btn"),P&&Y&&de),se),!(0,ye.He)(Q)&&ze,Ue==null?void 0:Ue.affixWrapper,We==null?void 0:We.affixWrapper),M=(P||Y)&&N.createElement("span",{className:A()("".concat(F,"-suffix"),We==null?void 0:We.suffix),style:Le==null?void 0:Le.suffix},Z(),P);Fe=N.createElement(Et,(0,T.Z)({className:I,style:(0,w.Z)((0,w.Z)({},(0,ye.He)(Q)?void 0:Ie),Le==null?void 0:Le.affixWrapper),hidden:!(0,ye.He)(Q)&&ie,onClick:lt},he==null?void 0:he.affixWrapper,{ref:Lt}),X&&N.createElement("span",{className:A()("".concat(F,"-prefix"),We==null?void 0:We.prefix),style:Le==null?void 0:Le.prefix},X),(0,N.cloneElement)(b,{value:de,hidden:null}),M)}if((0,ye.He)(Q)){var $="".concat(F,"-group"),J="".concat($,"-addon"),Me=A()("".concat(F,"-wrapper"),$,Ue==null?void 0:Ue.wrapper),k=A()("".concat(F,"-group-wrapper"),ze,Ue==null?void 0:Ue.group);return N.createElement(Tt,{className:k,style:Ie,hidden:ie},N.createElement(wt,{className:Me},Oe&&N.createElement(qe,{className:J},Oe),(0,N.cloneElement)(Fe,{hidden:null}),je&&N.createElement(qe,{className:J},je)))}return Fe},y=oe,Re=f(94480),H=f(42978),me=f(75931),Te=f(18929),q=f(2738),Je=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],ot=(0,N.forwardRef)(function(re,Q){var S=re.autoComplete,c=re.onChange,b=re.onFocus,F=re.onBlur,X=re.onPressEnter,P=re.onKeyDown,Oe=re.prefixCls,je=Oe===void 0?"rc-input":Oe,ze=re.disabled,Ie=re.htmlSize,bt=re.className,Xe=re.maxLength,Ye=re.suffix,fe=re.showCount,Y=re.type,de=Y===void 0?"text":Y,ae=re.classes,ie=re.classNames,Ue=re.styles,We=(0,me.Z)(re,Je),he=(0,Te.Z)(re.defaultValue,{value:re.value}),Le=(0,H.Z)(he,2),ve=Le[0],Et=Le[1],Tt=(0,N.useState)(!1),wt=(0,H.Z)(Tt,2),qe=wt[0],Lt=wt[1],lt=(0,N.useRef)(null),Z=function(k){lt.current&&(0,ye.nH)(lt.current,k)};(0,N.useImperativeHandle)(Q,function(){return{focus:Z,blur:function(){var k;(k=lt.current)===null||k===void 0||k.blur()},setSelectionRange:function(k,xe,z){var ue;(ue=lt.current)===null||ue===void 0||ue.setSelectionRange(k,xe,z)},select:function(){var k;(k=lt.current)===null||k===void 0||k.select()},input:lt.current}}),(0,N.useEffect)(function(){Lt(function(Me){return Me&&ze?!1:Me})},[ze]);var Fe=function(k){re.value===void 0&&Et(k.target.value),lt.current&&(0,ye.rJ)(lt.current,k,c)},se=function(k){X&&k.key==="Enter"&&X(k),P==null||P(k)},E=function(k){Lt(!0),b==null||b(k)},I=function(k){Lt(!1),F==null||F(k)},M=function(k){Et(""),Z(),lt.current&&(0,ye.rJ)(lt.current,k,c)},$=function(){var k=(0,q.Z)(re,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return N.createElement("input",(0,T.Z)({autoComplete:S},k,{onChange:Fe,onFocus:E,onBlur:I,onKeyDown:se,className:A()(je,(0,x.Z)({},"".concat(je,"-disabled"),ze),ie==null?void 0:ie.input),style:Ue==null?void 0:Ue.input,ref:lt,size:Ie,type:de}))},J=function(){var k=Number(Xe)>0;if(Ye||fe){var xe=(0,ye.D7)(ve),z=(0,Re.Z)(xe).length,ue=(0,W.Z)(fe)==="object"?fe.formatter({value:xe,count:z,maxLength:Xe}):"".concat(z).concat(k?" / ".concat(Xe):"");return N.createElement(N.Fragment,null,!!fe&&N.createElement("span",{className:A()("".concat(je,"-show-count-suffix"),(0,x.Z)({},"".concat(je,"-show-count-has-suffix"),!!Ye),ie==null?void 0:ie.count),style:(0,w.Z)({},Ue==null?void 0:Ue.count)},ue),Ye)}return null};return N.createElement(y,(0,T.Z)({},We,{prefixCls:je,className:bt,inputElement:$(),handleReset:M,value:(0,ye.D7)(ve),focused:qe,triggerFocus:Z,suffix:J(),disabled:ze,classes:ae,classNames:ie,styles:Ue}))}),Ct=ot,Ft=Ct},5643:function(rn,De,f){"use strict";f.d(De,{D7:function(){return v},He:function(){return T},X3:function(){return w},nH:function(){return W},rJ:function(){return x}});function T(A){return!!(A.addonBefore||A.addonAfter)}function w(A){return!!(A.prefix||A.suffix||A.allowClear)}function x(A,N,ye,oe){if(ye){var y=N;if(N.type==="click"){var Re=A.cloneNode(!0);y=Object.create(N,{target:{value:Re},currentTarget:{value:Re}}),Re.value="",ye(y);return}if(oe!==void 0){y=Object.create(N,{target:{value:A},currentTarget:{value:A}}),A.value=oe,ye(y);return}ye(y)}}function W(A,N){if(A){A.focus(N);var ye=N||{},oe=ye.cursor;if(oe){var y=A.value.length;switch(oe){case"start":A.setSelectionRange(0,0);break;case"end":A.setSelectionRange(y,y);break;default:A.setSelectionRange(0,y)}}}}function v(A){return typeof A=="undefined"||A===null?"":String(A)}},83836:function(rn,De,f){"use strict";f.d(De,{Z:function(){return fe}});var T=f(54476),w=f(33885),x=f(42978),W=f(75931),v=f(59301),A=f(92310),N=f.n(A),ye=f(29301),oe=f(34280),y=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Re=void 0;function H(Y,de){var ae=Y.prefixCls,ie=Y.invalidate,Ue=Y.item,We=Y.renderItem,he=Y.responsive,Le=Y.responsiveDisabled,ve=Y.registerSize,Et=Y.itemKey,Tt=Y.className,wt=Y.style,qe=Y.children,Lt=Y.display,lt=Y.order,Z=Y.component,Fe=Z===void 0?"div":Z,se=(0,W.Z)(Y,y),E=he&&!Lt;function I(k){ve(Et,k)}v.useEffect(function(){return function(){I(null)}},[]);var M=We&&Ue!==Re?We(Ue,{index:lt}):qe,$;ie||($={opacity:E?0:1,height:E?0:Re,overflowY:E?"hidden":Re,order:he?lt:Re,pointerEvents:E?"none":Re,position:E?"absolute":Re});var J={};E&&(J["aria-hidden"]=!0);var Me=v.createElement(Fe,(0,T.Z)({className:N()(!ie&&ae,Tt),style:(0,w.Z)((0,w.Z)({},$),wt)},J,se,{ref:de}),M);return he&&(Me=v.createElement(ye.Z,{onResize:function(xe){var z=xe.offsetWidth;I(z)},disabled:Le},Me)),Me}var me=v.forwardRef(H);me.displayName="Item";var Te=me,q=f(6089),Je=f(4676),ot=f(16089);function Ct(Y){if(typeof MessageChannel=="undefined")(0,ot.Z)(Y);else{var de=new MessageChannel;de.port1.onmessage=function(){return Y()},de.port2.postMessage(void 0)}}function Ft(){var Y=v.useRef(null),de=function(ie){Y.current||(Y.current=[],Ct(function(){(0,Je.unstable_batchedUpdates)(function(){Y.current.forEach(function(Ue){Ue()}),Y.current=null})})),Y.current.push(ie)};return de}function re(Y,de){var ae=v.useState(de),ie=(0,x.Z)(ae,2),Ue=ie[0],We=ie[1],he=(0,q.Z)(function(Le){Y(function(){We(Le)})});return[Ue,he]}var Q=v.createContext(null),S=["component"],c=["className"],b=["className"],F=function(de,ae){var ie=v.useContext(Q);if(!ie){var Ue=de.component,We=Ue===void 0?"div":Ue,he=(0,W.Z)(de,S);return v.createElement(We,(0,T.Z)({},he,{ref:ae}))}var Le=ie.className,ve=(0,W.Z)(ie,c),Et=de.className,Tt=(0,W.Z)(de,b);return v.createElement(Q.Provider,{value:null},v.createElement(Te,(0,T.Z)({ref:ae,className:N()(Le,Et)},ve,Tt)))},X=v.forwardRef(F);X.displayName="RawItem";var P=X,Oe=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],je="responsive",ze="invalidate";function Ie(Y){return"+ ".concat(Y.length," ...")}function bt(Y,de){var ae=Y.prefixCls,ie=ae===void 0?"rc-overflow":ae,Ue=Y.data,We=Ue===void 0?[]:Ue,he=Y.renderItem,Le=Y.renderRawItem,ve=Y.itemKey,Et=Y.itemWidth,Tt=Et===void 0?10:Et,wt=Y.ssr,qe=Y.style,Lt=Y.className,lt=Y.maxCount,Z=Y.renderRest,Fe=Y.renderRawRest,se=Y.prefix,E=Y.suffix,I=Y.component,M=I===void 0?"div":I,$=Y.itemComponent,J=Y.onVisibleChange,Me=(0,W.Z)(Y,Oe),k=wt==="full",xe=Ft(),z=re(xe,null),ue=(0,x.Z)(z,2),Ce=ue[0],be=ue[1],pe=Ce||0,G=re(xe,new Map),ge=(0,x.Z)(G,2),Pe=ge[0],tt=ge[1],at=re(xe,0),_e=(0,x.Z)(at,2),Ee=_e[0],it=_e[1],st=re(xe,0),tn=(0,x.Z)(st,2),kt=tn[0],sn=tn[1],Cn=re(xe,0),fn=(0,x.Z)(Cn,2),An=fn[0],Wn=fn[1],xn=re(xe,0),Dn=(0,x.Z)(xn,2),vn=Dn[0],In=Dn[1],En=(0,v.useState)(null),pn=(0,x.Z)(En,2),Tn=pn[0],on=pn[1],Nn=(0,v.useState)(null),zn=(0,x.Z)(Nn,2),or=zn[0],gr=zn[1],qt=v.useMemo(function(){return or===null&&k?Number.MAX_SAFE_INTEGER:or||0},[or,Ce]),ut=(0,v.useState)(!1),jt=(0,x.Z)(ut,2),m=jt[0],B=jt[1],K="".concat(ie,"-item"),h=Math.max(Ee,kt),d=lt===je,C=We.length&&d,D=lt===ze,ne=C||typeof lt=="number"&&We.length>lt,_=(0,v.useMemo)(function(){var Ae=We;return C?Ce===null&&k?Ae=We:Ae=We.slice(0,Math.min(We.length,pe/Tt)):typeof lt=="number"&&(Ae=We.slice(0,lt)),Ae},[We,Tt,Ce,lt,C]),j=(0,v.useMemo)(function(){return C?We.slice(qt+1):We.slice(_.length)},[We,_,C,qt]),le=(0,v.useCallback)(function(Ae,ke){var dt;return typeof ve=="function"?ve(Ae):(dt=ve&&(Ae==null?void 0:Ae[ve]))!==null&&dt!==void 0?dt:ke},[ve]),ce=(0,v.useCallback)(he||function(Ae){return Ae},[he]);function He(Ae,ke,dt){or===Ae&&(ke===void 0||ke===Tn)||(gr(Ae),dt||(B(Ae<We.length-1),J==null||J(Ae)),ke!==void 0&&on(ke))}function L(Ae,ke){be(ke.clientWidth)}function V(Ae,ke){tt(function(dt){var gt=new Map(dt);return ke===null?gt.delete(Ae):gt.set(Ae,ke),gt})}function Qe(Ae,ke){sn(ke),it(kt)}function Se(Ae,ke){Wn(ke)}function Ke(Ae,ke){In(ke)}function Ne(Ae){return Pe.get(le(_[Ae],Ae))}(0,oe.Z)(function(){if(pe&&typeof h=="number"&&_){var Ae=An+vn,ke=_.length,dt=ke-1;if(!ke){He(0,null);return}for(var gt=0;gt<ke;gt+=1){var Zt=Ne(gt);if(k&&(Zt=Zt||0),Zt===void 0){He(gt-1,void 0,!0);break}if(Ae+=Zt,dt===0&&Ae<=pe||gt===dt-1&&Ae+Ne(dt)<=pe){He(dt,null);break}else if(Ae+h>pe){He(gt-1,Ae-Zt-vn+kt);break}}E&&Ne(0)+vn>pe&&on(null)}},[pe,Pe,kt,An,vn,le,_]);var ft=m&&!!j.length,te={};Tn!==null&&C&&(te={position:"absolute",left:Tn,top:0});var et={prefixCls:K,responsive:C,component:$,invalidate:D},St=Le?function(Ae,ke){var dt=le(Ae,ke);return v.createElement(Q.Provider,{key:dt,value:(0,w.Z)((0,w.Z)({},et),{},{order:ke,item:Ae,itemKey:dt,registerSize:V,display:ke<=qt})},Le(Ae,ke))}:function(Ae,ke){var dt=le(Ae,ke);return v.createElement(Te,(0,T.Z)({},et,{order:ke,key:dt,item:Ae,renderItem:ce,itemKey:dt,registerSize:V,display:ke<=qt}))},Pt={order:ft?qt:Number.MAX_SAFE_INTEGER,className:"".concat(K,"-rest"),registerSize:Qe,display:ft},rt=Z||Ie,mt=Fe?v.createElement(Q.Provider,{value:(0,w.Z)((0,w.Z)({},et),Pt)},Fe(j)):v.createElement(Te,(0,T.Z)({},et,Pt),typeof rt=="function"?rt(j):rt),zt=v.createElement(M,(0,T.Z)({className:N()(!D&&ie,Lt),style:qe,ref:de},Me),se&&v.createElement(Te,(0,T.Z)({},et,{responsive:d,responsiveDisabled:!C,order:-1,className:"".concat(K,"-prefix"),registerSize:Se,display:!0}),se),_.map(St),ne?mt:null,E&&v.createElement(Te,(0,T.Z)({},et,{responsive:d,responsiveDisabled:!C,order:qt,className:"".concat(K,"-suffix"),registerSize:Ke,display:!0,style:te}),E));return d?v.createElement(ye.Z,{onResize:L,disabled:!C},zt):zt}var Xe=v.forwardRef(bt);Xe.displayName="Overflow",Xe.Item=P,Xe.RESPONSIVE=je,Xe.INVALIDATE=ze;var Ye=Xe,fe=Ye},17115:function(rn,De,f){"use strict";f.d(De,{ZP:function(){return N}});var T=f(42978),w=f(59301),x=f(47273),W=0,v=(0,x.Z)();function A(){var ye;return v?(ye=W,W+=1):ye="TEST_OR_SSR",ye}function N(ye){var oe=w.useState(),y=(0,T.Z)(oe,2),Re=y[0],H=y[1];return w.useEffect(function(){H("rc_select_".concat(A()))},[]),ye||Re}},77861:function(rn,De,f){"use strict";f.d(De,{Ac:function(){return Ce},Xo:function(){return kt},Wx:function(){return Cn},ZP:function(){return K},lk:function(){return Q}});var T=f(54476),w=f(94480),x=f(20068),W=f(33885),v=f(42978),A=f(75931),N=f(76190),ye=f(18929),oe=f(48736),y=f(59301),Re=f(92310),H=f.n(Re),me=f(34280),Te=f(49658),q=f(10228),Je=f(8654),ot=function(d){var C=d.className,D=d.customizeIcon,ne=d.customizeIconProps,_=d.onMouseDown,j=d.onClick,le=d.children,ce;return typeof D=="function"?ce=D(ne):ce=D,y.createElement("span",{className:C,onMouseDown:function(L){L.preventDefault(),_&&_(L)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:j,"aria-hidden":!0},ce!==void 0?ce:y.createElement("span",{className:H()(C.split(/\s+/).map(function(He){return"".concat(He,"-icon")}))},le))},Ct=ot;function Ft(h,d,C,D,ne){var _=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,j=arguments.length>6?arguments[6]:void 0,le=arguments.length>7?arguments[7]:void 0,ce=y.useMemo(function(){if((0,N.Z)(D)==="object")return D.clearIcon;if(ne)return ne},[D,ne]),He=y.useMemo(function(){return!!(!_&&D&&(C.length||j)&&!(le==="combobox"&&j===""))},[D,_,C.length,j,le]);return{allowClear:He,clearIcon:y.createElement(Ct,{className:"".concat(h,"-clear"),onMouseDown:d,customizeIcon:ce},"\xD7")}}var re=y.createContext(null);function Q(){return y.useContext(re)}function S(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,d=y.useState(!1),C=(0,v.Z)(d,2),D=C[0],ne=C[1],_=y.useRef(null),j=function(){window.clearTimeout(_.current)};y.useEffect(function(){return j},[]);var le=function(He,L){j(),_.current=window.setTimeout(function(){ne(He),L&&L()},h)};return[D,le,j]}function c(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,d=y.useRef(null),C=y.useRef(null);y.useEffect(function(){return function(){window.clearTimeout(C.current)}},[]);function D(ne){(ne||d.current===null)&&(d.current=ne),window.clearTimeout(C.current),C.current=window.setTimeout(function(){d.current=null},h)}return[function(){return d.current},D]}function b(h,d,C,D){var ne=y.useRef(null);ne.current={open:d,triggerOpen:C,customizedTrigger:D},y.useEffect(function(){function _(j){var le;if(!((le=ne.current)!==null&&le!==void 0&&le.customizedTrigger)){var ce=j.target;ce.shadowRoot&&j.composed&&(ce=j.composedPath()[0]||ce),ne.current.open&&h().filter(function(He){return He}).every(function(He){return!He.contains(ce)&&He!==ce})&&ne.current.triggerOpen(!1)}}return window.addEventListener("mousedown",_),function(){return window.removeEventListener("mousedown",_)}},[])}var F=f(26112),X=f(83836),P=function(d,C){var D,ne,_=d.prefixCls,j=d.id,le=d.inputElement,ce=d.disabled,He=d.tabIndex,L=d.autoFocus,V=d.autoComplete,Qe=d.editable,Se=d.activeDescendantId,Ke=d.value,Ne=d.maxLength,ft=d.onKeyDown,te=d.onMouseDown,et=d.onChange,St=d.onPaste,Pt=d.onCompositionStart,rt=d.onCompositionEnd,mt=d.open,zt=d.attrs,Ae=le||y.createElement("input",null),ke=Ae,dt=ke.ref,gt=ke.props,Zt=gt.onKeyDown,Gt=gt.onChange,Vt=gt.onMouseDown,Xt=gt.onCompositionStart,Nt=gt.onCompositionEnd,Rt=gt.style;return(0,oe.Kp)(!("maxLength"in Ae.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Ae=y.cloneElement(Ae,(0,W.Z)((0,W.Z)((0,W.Z)({type:"search"},gt),{},{id:j,ref:(0,Je.sQ)(C,dt),disabled:ce,tabIndex:He,autoComplete:V||"off",autoFocus:L,className:H()("".concat(_,"-selection-search-input"),(D=Ae)===null||D===void 0||(ne=D.props)===null||ne===void 0?void 0:ne.className),role:"combobox","aria-label":"Search","aria-expanded":mt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(j,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(j,"_list"),"aria-activedescendant":mt?Se:void 0},zt),{},{value:Qe?Ke:"",maxLength:Ne,readOnly:!Qe,unselectable:Qe?null:"on",style:(0,W.Z)((0,W.Z)({},Rt),{},{opacity:Qe?null:0}),onKeyDown:function(Dt){ft(Dt),Zt&&Zt(Dt)},onMouseDown:function(Dt){te(Dt),Vt&&Vt(Dt)},onChange:function(Dt){et(Dt),Gt&&Gt(Dt)},onCompositionStart:function(Dt){Pt(Dt),Xt&&Xt(Dt)},onCompositionEnd:function(Dt){rt(Dt),Nt&&Nt(Dt)},onPaste:St})),Ae},Oe=y.forwardRef(P);Oe.displayName="Input";var je=Oe;function ze(h){return Array.isArray(h)?h:h!==void 0?[h]:[]}var Ie=typeof window!="undefined"&&window.document&&window.document.documentElement,bt=Ie;function Xe(h){return h!=null}function Ye(h){return!h&&h!==0}function fe(h){return["string","number"].includes((0,N.Z)(h))}function Y(h){var d=void 0;return h&&(fe(h.title)?d=h.title.toString():fe(h.label)&&(d=h.label.toString())),d}function de(h,d){bt?y.useLayoutEffect(h,d):y.useEffect(h,d)}function ae(h){var d;return(d=h.key)!==null&&d!==void 0?d:h.value}var ie=function(d){d.preventDefault(),d.stopPropagation()},Ue=function(d){var C=d.id,D=d.prefixCls,ne=d.values,_=d.open,j=d.searchValue,le=d.autoClearSearchValue,ce=d.inputRef,He=d.placeholder,L=d.disabled,V=d.mode,Qe=d.showSearch,Se=d.autoFocus,Ke=d.autoComplete,Ne=d.activeDescendantId,ft=d.tabIndex,te=d.removeIcon,et=d.maxTagCount,St=d.maxTagTextLength,Pt=d.maxTagPlaceholder,rt=Pt===void 0?function(Wt){return"+ ".concat(Wt.length," ...")}:Pt,mt=d.tagRender,zt=d.onToggleOpen,Ae=d.onRemove,ke=d.onInputChange,dt=d.onInputPaste,gt=d.onInputKeyDown,Zt=d.onInputMouseDown,Gt=d.onInputCompositionStart,Vt=d.onInputCompositionEnd,Xt=y.useRef(null),Nt=(0,y.useState)(0),Rt=(0,v.Z)(Nt,2),Ht=Rt[0],Dt=Rt[1],cn=(0,y.useState)(!1),$t=(0,v.Z)(cn,2),_t=$t[0],an=$t[1],Yt="".concat(D,"-selection"),wn=_||V==="multiple"&&le===!1||V==="tags"?j:"",Un=V==="tags"||V==="multiple"&&le===!1||Qe&&(_||_t);de(function(){Dt(Xt.current.scrollWidth)},[wn]);function At(Wt,ln,gn,mn,Fn){return y.createElement("span",{className:H()("".concat(Yt,"-item"),(0,x.Z)({},"".concat(Yt,"-item-disabled"),gn)),title:Y(Wt)},y.createElement("span",{className:"".concat(Yt,"-item-content")},ln),mn&&y.createElement(Ct,{className:"".concat(Yt,"-item-remove"),onMouseDown:ie,onClick:Fn,customizeIcon:te},"\xD7"))}function ht(Wt,ln,gn,mn,Fn){var Ge=function(xt){ie(xt),zt(!_)};return y.createElement("span",{onMouseDown:Ge},mt({label:ln,value:Wt,disabled:gn,closable:mn,onClose:Fn}))}function vt(Wt){var ln=Wt.disabled,gn=Wt.label,mn=Wt.value,Fn=!L&&!ln,Ge=gn;if(typeof St=="number"&&(typeof gn=="string"||typeof gn=="number")){var Ze=String(Ge);Ze.length>St&&(Ge="".concat(Ze.slice(0,St),"..."))}var xt=function(hn){hn&&hn.stopPropagation(),Ae(Wt)};return typeof mt=="function"?ht(mn,Ge,ln,Fn,xt):At(Wt,Ge,ln,Fn,xt)}function en(Wt){var ln=typeof rt=="function"?rt(Wt):rt;return At({title:ln},ln,!1)}var nn=y.createElement("div",{className:"".concat(Yt,"-search"),style:{width:Ht},onFocus:function(){an(!0)},onBlur:function(){an(!1)}},y.createElement(je,{ref:ce,open:_,prefixCls:D,id:C,inputElement:null,disabled:L,autoFocus:Se,autoComplete:Ke,editable:Un,activeDescendantId:Ne,value:wn,onKeyDown:gt,onMouseDown:Zt,onChange:ke,onPaste:dt,onCompositionStart:Gt,onCompositionEnd:Vt,tabIndex:ft,attrs:(0,F.Z)(d,!0)}),y.createElement("span",{ref:Xt,className:"".concat(Yt,"-search-mirror"),"aria-hidden":!0},wn,"\xA0")),Qt=y.createElement(X.Z,{prefixCls:"".concat(Yt,"-overflow"),data:ne,renderItem:vt,renderRest:en,suffix:nn,itemKey:ae,maxCount:et});return y.createElement(y.Fragment,null,Qt,!ne.length&&!wn&&y.createElement("span",{className:"".concat(Yt,"-placeholder")},He))},We=Ue,he=function(d){var C=d.inputElement,D=d.prefixCls,ne=d.id,_=d.inputRef,j=d.disabled,le=d.autoFocus,ce=d.autoComplete,He=d.activeDescendantId,L=d.mode,V=d.open,Qe=d.values,Se=d.placeholder,Ke=d.tabIndex,Ne=d.showSearch,ft=d.searchValue,te=d.activeValue,et=d.maxLength,St=d.onInputKeyDown,Pt=d.onInputMouseDown,rt=d.onInputChange,mt=d.onInputPaste,zt=d.onInputCompositionStart,Ae=d.onInputCompositionEnd,ke=d.title,dt=y.useState(!1),gt=(0,v.Z)(dt,2),Zt=gt[0],Gt=gt[1],Vt=L==="combobox",Xt=Vt||Ne,Nt=Qe[0],Rt=ft||"";Vt&&te&&!Zt&&(Rt=te),y.useEffect(function(){Vt&&Gt(!1)},[Vt,te]);var Ht=L!=="combobox"&&!V&&!Ne?!1:!!Rt,Dt=ke===void 0?Y(Nt):ke,cn=function(){if(Nt)return null;var _t=Ht?{visibility:"hidden"}:void 0;return y.createElement("span",{className:"".concat(D,"-selection-placeholder"),style:_t},Se)};return y.createElement(y.Fragment,null,y.createElement("span",{className:"".concat(D,"-selection-search")},y.createElement(je,{ref:_,prefixCls:D,id:ne,open:V,inputElement:C,disabled:j,autoFocus:le,autoComplete:ce,editable:Xt,activeDescendantId:He,value:Rt,onKeyDown:St,onMouseDown:Pt,onChange:function(_t){Gt(!0),rt(_t)},onPaste:mt,onCompositionStart:zt,onCompositionEnd:Ae,tabIndex:Ke,attrs:(0,F.Z)(d,!0),maxLength:Vt?et:void 0})),!Vt&&Nt?y.createElement("span",{className:"".concat(D,"-selection-item"),title:Dt,style:Ht?{visibility:"hidden"}:void 0},Nt.label):null,cn())},Le=he;function ve(h){return![q.Z.ESC,q.Z.SHIFT,q.Z.BACKSPACE,q.Z.TAB,q.Z.WIN_KEY,q.Z.ALT,q.Z.META,q.Z.WIN_KEY_RIGHT,q.Z.CTRL,q.Z.SEMICOLON,q.Z.EQUALS,q.Z.CAPS_LOCK,q.Z.CONTEXT_MENU,q.Z.F1,q.Z.F2,q.Z.F3,q.Z.F4,q.Z.F5,q.Z.F6,q.Z.F7,q.Z.F8,q.Z.F9,q.Z.F10,q.Z.F11,q.Z.F12].includes(h)}var Et=function(d,C){var D=(0,y.useRef)(null),ne=(0,y.useRef)(!1),_=d.prefixCls,j=d.open,le=d.mode,ce=d.showSearch,He=d.tokenWithEnter,L=d.autoClearSearchValue,V=d.onSearch,Qe=d.onSearchSubmit,Se=d.onToggleOpen,Ke=d.onInputKeyDown,Ne=d.domRef;y.useImperativeHandle(C,function(){return{focus:function(){D.current.focus()},blur:function(){D.current.blur()}}});var ft=c(0),te=(0,v.Z)(ft,2),et=te[0],St=te[1],Pt=function(Rt){var Ht=Rt.which;(Ht===q.Z.UP||Ht===q.Z.DOWN)&&Rt.preventDefault(),Ke&&Ke(Rt),Ht===q.Z.ENTER&&le==="tags"&&!ne.current&&!j&&(Qe==null||Qe(Rt.target.value)),ve(Ht)&&Se(!0)},rt=function(){St(!0)},mt=(0,y.useRef)(null),zt=function(Rt){V(Rt,!0,ne.current)!==!1&&Se(!0)},Ae=function(){ne.current=!0},ke=function(Rt){ne.current=!1,le!=="combobox"&&zt(Rt.target.value)},dt=function(Rt){var Ht=Rt.target.value;if(He&&mt.current&&/[\r\n]/.test(mt.current)){var Dt=mt.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Ht=Ht.replace(Dt,mt.current)}mt.current=null,zt(Ht)},gt=function(Rt){var Ht=Rt.clipboardData,Dt=Ht.getData("text");mt.current=Dt},Zt=function(Rt){var Ht=Rt.target;if(Ht!==D.current){var Dt=document.body.style.msTouchAction!==void 0;Dt?setTimeout(function(){D.current.focus()}):D.current.focus()}},Gt=function(Rt){var Ht=et();Rt.target!==D.current&&!Ht&&le!=="combobox"&&Rt.preventDefault(),(le!=="combobox"&&(!ce||!Ht)||!j)&&(j&&L!==!1&&V("",!0,!1),Se())},Vt={inputRef:D,onInputKeyDown:Pt,onInputMouseDown:rt,onInputChange:dt,onInputPaste:gt,onInputCompositionStart:Ae,onInputCompositionEnd:ke},Xt=le==="multiple"||le==="tags"?y.createElement(We,(0,T.Z)({},d,Vt)):y.createElement(Le,(0,T.Z)({},d,Vt));return y.createElement("div",{ref:Ne,className:"".concat(_,"-selector"),onClick:Zt,onMouseDown:Gt},Xt)},Tt=y.forwardRef(Et);Tt.displayName="Selector";var wt=Tt,qe=f(35593),Lt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],lt=function(d){var C=d===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:C,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:C,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:C,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:C,adjustY:1},htmlRegion:"scroll"}}},Z=function(d,C){var D=d.prefixCls,ne=d.disabled,_=d.visible,j=d.children,le=d.popupElement,ce=d.animation,He=d.transitionName,L=d.dropdownStyle,V=d.dropdownClassName,Qe=d.direction,Se=Qe===void 0?"ltr":Qe,Ke=d.placement,Ne=d.builtinPlacements,ft=d.dropdownMatchSelectWidth,te=d.dropdownRender,et=d.dropdownAlign,St=d.getPopupContainer,Pt=d.empty,rt=d.getTriggerDOMNode,mt=d.onPopupVisibleChange,zt=d.onPopupMouseEnter,Ae=(0,A.Z)(d,Lt),ke="".concat(D,"-dropdown"),dt=le;te&&(dt=te(le));var gt=y.useMemo(function(){return Ne||lt(ft)},[Ne,ft]),Zt=ce?"".concat(ke,"-").concat(ce):He,Gt=typeof ft=="number",Vt=y.useMemo(function(){return Gt?null:ft===!1?"minWidth":"width"},[ft,Gt]),Xt=L;Gt&&(Xt=(0,W.Z)((0,W.Z)({},Xt),{},{width:ft}));var Nt=y.useRef(null);return y.useImperativeHandle(C,function(){return{getPopupElement:function(){return Nt.current}}}),y.createElement(qe.Z,(0,T.Z)({},Ae,{showAction:mt?["click"]:[],hideAction:mt?["click"]:[],popupPlacement:Ke||(Se==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:gt,prefixCls:ke,popupTransitionName:Zt,popup:y.createElement("div",{ref:Nt,onMouseEnter:zt},dt),stretch:Vt,popupAlign:et,popupVisible:_,getPopupContainer:St,popupClassName:H()(V,(0,x.Z)({},"".concat(ke,"-empty"),Pt)),popupStyle:Xt,getTriggerDOMNode:rt,onPopupVisibleChange:mt}),j)},Fe=y.forwardRef(Z);Fe.displayName="SelectTrigger";var se=Fe,E=f(66712);function I(h,d){var C=h.key,D;return"value"in h&&(D=h.value),C!=null?C:D!==void 0?D:"rc-index-key-".concat(d)}function M(h,d){var C=h||{},D=C.label,ne=C.value,_=C.options,j=C.groupLabel,le=D||(d?"children":"label");return{label:le,value:ne||"value",options:_||"options",groupLabel:j||le}}function $(h){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=d.fieldNames,D=d.childrenAsData,ne=[],_=M(C,!1),j=_.label,le=_.value,ce=_.options,He=_.groupLabel;function L(V,Qe){V.forEach(function(Se){if(Qe||!(ce in Se)){var Ke=Se[le];ne.push({key:I(Se,ne.length),groupOption:Qe,data:Se,label:Se[j],value:Ke})}else{var Ne=Se[He];Ne===void 0&&D&&(Ne=Se.label),ne.push({key:I(Se,ne.length),group:!0,data:Se,label:Ne}),L(Se[ce],!0)}})}return L(h,!1),ne}function J(h){var d=(0,W.Z)({},h);return"props"in d||Object.defineProperty(d,"props",{get:function(){return(0,oe.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),d}}),d}function Me(h,d){if(!d||!d.length)return null;var C=!1;function D(_,j){var le=(0,E.Z)(j),ce=le[0],He=le.slice(1);if(!ce)return[_];var L=_.split(ce);return C=C||L.length>1,L.reduce(function(V,Qe){return[].concat((0,w.Z)(V),(0,w.Z)(D(Qe,He)))},[]).filter(function(V){return V})}var ne=D(h,d);return C?ne:null}var k=["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"],xe=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function z(h){return h==="tags"||h==="multiple"}var ue=y.forwardRef(function(h,d){var C,D,ne=h.id,_=h.prefixCls,j=h.className,le=h.showSearch,ce=h.tagRender,He=h.direction,L=h.omitDomProps,V=h.displayValues,Qe=h.onDisplayValuesChange,Se=h.emptyOptions,Ke=h.notFoundContent,Ne=Ke===void 0?"Not Found":Ke,ft=h.onClear,te=h.mode,et=h.disabled,St=h.loading,Pt=h.getInputElement,rt=h.getRawInputElement,mt=h.open,zt=h.defaultOpen,Ae=h.onDropdownVisibleChange,ke=h.activeValue,dt=h.onActiveValueChange,gt=h.activeDescendantId,Zt=h.searchValue,Gt=h.autoClearSearchValue,Vt=h.onSearch,Xt=h.onSearchSplit,Nt=h.tokenSeparators,Rt=h.allowClear,Ht=h.suffixIcon,Dt=h.clearIcon,cn=h.OptionList,$t=h.animation,_t=h.transitionName,an=h.dropdownStyle,Yt=h.dropdownClassName,wn=h.dropdownMatchSelectWidth,Un=h.dropdownRender,At=h.dropdownAlign,ht=h.placement,vt=h.builtinPlacements,en=h.getPopupContainer,nn=h.showAction,Qt=nn===void 0?[]:nn,Wt=h.onFocus,ln=h.onBlur,gn=h.onKeyUp,mn=h.onKeyDown,Fn=h.onMouseDown,Ge=(0,A.Z)(h,k),Ze=z(te),xt=(le!==void 0?le:Ze)||te==="combobox",Ot=(0,W.Z)({},Ge);xe.forEach(function(Jt){delete Ot[Jt]}),L==null||L.forEach(function(Jt){delete Ot[Jt]});var hn=y.useState(!1),xr=(0,v.Z)(hn,2),_n=xr[0],Kn=xr[1];y.useEffect(function(){Kn((0,Te.Z)())},[]);var Bn=y.useRef(null),kn=y.useRef(null),Mn=y.useRef(null),ur=y.useRef(null),qn=y.useRef(null),tr=S(),_r=(0,v.Z)(tr,3),Xr=_r[0],li=_r[1],Yr=_r[2];y.useImperativeHandle(d,function(){var Jt,Kt;return{focus:(Jt=ur.current)===null||Jt===void 0?void 0:Jt.focus,blur:(Kt=ur.current)===null||Kt===void 0?void 0:Kt.blur,scrollTo:function(nr){var On;return(On=qn.current)===null||On===void 0?void 0:On.scrollTo(nr)}}});var Cr=y.useMemo(function(){var Jt;if(te!=="combobox")return Zt;var Kt=(Jt=V[0])===null||Jt===void 0?void 0:Jt.value;return typeof Kt=="string"||typeof Kt=="number"?String(Kt):""},[Zt,te,V]),Qr=te==="combobox"&&typeof Pt=="function"&&Pt()||null,Ir=typeof rt=="function"&&rt(),Hi=(0,Je.x1)(kn,Ir==null||(C=Ir.props)===null||C===void 0?void 0:C.ref),Si=y.useState(!1),si=(0,v.Z)(Si,2),Kr=si[0],xi=si[1];(0,me.Z)(function(){xi(!0)},[]);var Ci=(0,ye.Z)(!1,{defaultValue:zt,value:mt}),jr=(0,v.Z)(Ci,2),Ar=jr[0],ui=jr[1],pt=Kr?Ar:!1,Bt=!Ne&&Se;(et||Bt&&pt&&te==="combobox")&&(pt=!1);var It=Bt?!1:pt,ct=y.useCallback(function(Jt){var Kt=Jt!==void 0?Jt:!pt;et||(ui(Kt),pt!==Kt&&(Ae==null||Ae(Kt)))},[et,pt,ui,Ae]),yn=y.useMemo(function(){return(Nt||[]).some(function(Jt){return[`
`,`\r
`].includes(Jt)})},[Nt]),bn=function(Kt,Vn,nr){var On=!0,ar=Kt;dt==null||dt(null);var mr=nr?null:Me(Kt,Nt);return te!=="combobox"&&mr&&(ar="",Xt==null||Xt(mr),ct(!1),On=!1),Vt&&Cr!==ar&&Vt(ar,{source:Vn?"typing":"effect"}),On},cr=function(Kt){!Kt||!Kt.trim()||Vt(Kt,{source:"submit"})};y.useEffect(function(){!pt&&!Ze&&te!=="combobox"&&bn("",!1,!1)},[pt]),y.useEffect(function(){Ar&&et&&ui(!1),et&&li(!1)},[et]);var Mr=c(),Nr=(0,v.Z)(Mr,2),Gn=Nr[0],Rr=Nr[1],ci=function(Kt){var Vn=Gn(),nr=Kt.which;if(nr===q.Z.ENTER&&(te!=="combobox"&&Kt.preventDefault(),pt||ct(!0)),Rr(!!Cr),nr===q.Z.BACKSPACE&&!Vn&&Ze&&!Cr&&V.length){for(var On=(0,w.Z)(V),ar=null,mr=On.length-1;mr>=0;mr-=1){var Ur=On[mr];if(!Ur.disabled){On.splice(mr,1),ar=Ur;break}}ar&&Qe(On,{type:"remove",values:[ar]})}for(var Er=arguments.length,kr=new Array(Er>1?Er-1:0),Pr=1;Pr<Er;Pr++)kr[Pr-1]=arguments[Pr];if(pt&&qn.current){var yr;(yr=qn.current).onKeyDown.apply(yr,[Kt].concat(kr))}mn==null||mn.apply(void 0,[Kt].concat(kr))},Zi=function(Kt){for(var Vn=arguments.length,nr=new Array(Vn>1?Vn-1:0),On=1;On<Vn;On++)nr[On-1]=arguments[On];if(pt&&qn.current){var ar;(ar=qn.current).onKeyUp.apply(ar,[Kt].concat(nr))}gn==null||gn.apply(void 0,[Kt].concat(nr))},mo=function(Kt){var Vn=V.filter(function(nr){return nr!==Kt});Qe(Vn,{type:"remove",values:[Kt]})},zr=y.useRef(!1),Fr=function(){li(!0),et||(Wt&&!zr.current&&Wt.apply(void 0,arguments),Qt.includes("focus")&&ct(!0)),zr.current=!0},Zo=function(){li(!1,function(){zr.current=!1,ct(!1)}),!et&&(Cr&&(te==="tags"?Vt(Cr,{source:"submit"}):te==="multiple"&&Vt("",{source:"blur"})),ln&&ln.apply(void 0,arguments))},Lr=[];y.useEffect(function(){return function(){Lr.forEach(function(Jt){return clearTimeout(Jt)}),Lr.splice(0,Lr.length)}},[]);var Br=function(Kt){var Vn,nr=Kt.target,On=(Vn=Mn.current)===null||Vn===void 0?void 0:Vn.getPopupElement();if(On&&On.contains(nr)){var ar=setTimeout(function(){var kr=Lr.indexOf(ar);if(kr!==-1&&Lr.splice(kr,1),Yr(),!_n&&!On.contains(document.activeElement)){var Pr;(Pr=ur.current)===null||Pr===void 0||Pr.focus()}});Lr.push(ar)}for(var mr=arguments.length,Ur=new Array(mr>1?mr-1:0),Er=1;Er<mr;Er++)Ur[Er-1]=arguments[Er];Fn==null||Fn.apply(void 0,[Kt].concat(Ur))},Ei=y.useState({}),_i=(0,v.Z)(Ei,2),yo=_i[1];function Dr(){yo({})}var Hr;Ir&&(Hr=function(Kt){ct(Kt)}),b(function(){var Jt;return[Bn.current,(Jt=Mn.current)===null||Jt===void 0?void 0:Jt.getPopupElement()]},It,ct,!!Ir);var Ki=y.useMemo(function(){return(0,W.Z)((0,W.Z)({},h),{},{notFoundContent:Ne,open:pt,triggerOpen:It,id:ne,showSearch:xt,multiple:Ze,toggleOpen:ct})},[h,Ne,It,pt,ne,xt,Ze,ct]),bo=!!Ht||St,ji;bo&&(ji=y.createElement(Ct,{className:H()("".concat(_,"-arrow"),(0,x.Z)({},"".concat(_,"-arrow-loading"),St)),customizeIcon:Ht,customizeIconProps:{loading:St,searchValue:Cr,open:pt,focused:Xr,showSearch:xt}}));var _o=function(){var Kt;ft==null||ft(),(Kt=ur.current)===null||Kt===void 0||Kt.focus(),Qe([],{type:"clear",values:V}),bn("",!1,!1)},Ui=Ft(_,_o,V,Rt,Dt,et,Cr,te),ki=Ui.allowClear,Jr=Ui.clearIcon,Tr=y.createElement(cn,{ref:qn}),So=H()(_,j,(D={},(0,x.Z)(D,"".concat(_,"-focused"),Xr),(0,x.Z)(D,"".concat(_,"-multiple"),Ze),(0,x.Z)(D,"".concat(_,"-single"),!Ze),(0,x.Z)(D,"".concat(_,"-allow-clear"),Rt),(0,x.Z)(D,"".concat(_,"-show-arrow"),bo),(0,x.Z)(D,"".concat(_,"-disabled"),et),(0,x.Z)(D,"".concat(_,"-loading"),St),(0,x.Z)(D,"".concat(_,"-open"),pt),(0,x.Z)(D,"".concat(_,"-customize-input"),Qr),(0,x.Z)(D,"".concat(_,"-show-search"),xt),D)),Gi=y.createElement(se,{ref:Mn,disabled:et,prefixCls:_,visible:It,popupElement:Tr,animation:$t,transitionName:_t,dropdownStyle:an,dropdownClassName:Yt,direction:He,dropdownMatchSelectWidth:wn,dropdownRender:Un,dropdownAlign:At,placement:ht,builtinPlacements:vt,getPopupContainer:en,empty:Se,getTriggerDOMNode:function(){return kn.current},onPopupVisibleChange:Hr,onPopupMouseEnter:Dr},Ir?y.cloneElement(Ir,{ref:Hi}):y.createElement(wt,(0,T.Z)({},h,{domRef:kn,prefixCls:_,inputElement:Qr,ref:ur,id:ne,showSearch:xt,autoClearSearchValue:Gt,mode:te,activeDescendantId:gt,tagRender:ce,values:V,open:pt,onToggleOpen:ct,activeValue:ke,searchValue:Cr,onSearch:bn,onSearchSubmit:cr,onRemove:mo,tokenWithEnter:yn}))),Vi;return Ir?Vi=Gi:Vi=y.createElement("div",(0,T.Z)({className:So},Ot,{ref:Bn,onMouseDown:Br,onKeyDown:ci,onKeyUp:Zi,onFocus:Fr,onBlur:Zo}),Xr&&!pt&&y.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(V.map(function(Jt){var Kt=Jt.label,Vn=Jt.value;return["number","string"].includes((0,N.Z)(Kt))?Kt:Vn}).join(", "))),Gi,ji,ki&&Jr),y.createElement(re.Provider,{value:Ki},Vi)}),Ce=ue,be=function(h,d){var C=y.useRef({values:new Map,options:new Map}),D=y.useMemo(function(){var _=C.current,j=_.values,le=_.options,ce=h.map(function(V){if(V.label===void 0){var Qe;return(0,W.Z)((0,W.Z)({},V),{},{label:(Qe=j.get(V.value))===null||Qe===void 0?void 0:Qe.label})}return V}),He=new Map,L=new Map;return ce.forEach(function(V){He.set(V.value,V),L.set(V.value,d.get(V.value)||le.get(V.value))}),C.current.values=He,C.current.options=L,ce},[h,d]),ne=y.useCallback(function(_){return d.get(_)||C.current.options.get(_)},[d]);return[D,ne]};function pe(h,d){return ze(h).join("").toUpperCase().includes(d)}var G=function(h,d,C,D,ne){return y.useMemo(function(){if(!C||D===!1)return h;var _=d.options,j=d.label,le=d.value,ce=[],He=typeof D=="function",L=C.toUpperCase(),V=He?D:function(Se,Ke){return ne?pe(Ke[ne],L):Ke[_]?pe(Ke[j!=="children"?j:"label"],L):pe(Ke[le],L)},Qe=He?function(Se){return J(Se)}:function(Se){return Se};return h.forEach(function(Se){if(Se[_]){var Ke=V(C,Qe(Se));if(Ke)ce.push(Se);else{var Ne=Se[_].filter(function(ft){return V(C,Qe(ft))});Ne.length&&ce.push((0,W.Z)((0,W.Z)({},Se),{},(0,x.Z)({},_,Ne)))}return}V(C,Qe(Se))&&ce.push(Se)}),ce},[h,D,ne,C,d])},ge=f(17115),Pe=f(11592),tt=["children","value"],at=["children"];function _e(h){var d=h,C=d.key,D=d.props,ne=D.children,_=D.value,j=(0,A.Z)(D,tt);return(0,W.Z)({key:C,value:_!==void 0?_:C,children:ne},j)}function Ee(h){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Pe.Z)(h).map(function(C,D){if(!y.isValidElement(C)||!C.type)return null;var ne=C,_=ne.type.isSelectOptGroup,j=ne.key,le=ne.props,ce=le.children,He=(0,A.Z)(le,at);return d||!_?_e(C):(0,W.Z)((0,W.Z)({key:"__RC_SELECT_GRP__".concat(j===null?D:j,"__"),label:j},He),{},{options:Ee(ce)})}).filter(function(C){return C})}function it(h,d,C,D,ne){return y.useMemo(function(){var _=h,j=!h;j&&(_=Ee(d));var le=new Map,ce=new Map,He=function(Qe,Se,Ke){Ke&&typeof Ke=="string"&&Qe.set(Se[Ke],Se)};function L(V){for(var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Se=0;Se<V.length;Se+=1){var Ke=V[Se];!Ke[C.options]||Qe?(le.set(Ke[C.value],Ke),He(ce,Ke,C.label),He(ce,Ke,D),He(ce,Ke,ne)):L(Ke[C.options],!0)}}return L(_),{options:_,valueOptions:le,labelOptions:ce}},[h,d,C,D,ne])}function st(h){var d=y.useRef();d.current=h;var C=y.useCallback(function(){return d.current.apply(d,arguments)},[]);return C}var tn=function(){return null};tn.isSelectOptGroup=!0;var kt=tn,sn=function(){return null};sn.isSelectOption=!0;var Cn=sn,fn=f(80547),An=f(2738),Wn=f(48911),xn=y.createContext(null),Dn=xn;function vn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var In=["disabled","title","children","style","className"];function En(h){return typeof h=="string"||typeof h=="number"}var pn=function(d,C){var D=Q(),ne=D.prefixCls,_=D.id,j=D.open,le=D.multiple,ce=D.mode,He=D.searchValue,L=D.toggleOpen,V=D.notFoundContent,Qe=D.onPopupScroll,Se=y.useContext(Dn),Ke=Se.flattenOptions,Ne=Se.onActiveValue,ft=Se.defaultActiveFirstOption,te=Se.onSelect,et=Se.menuItemSelectedIcon,St=Se.rawValues,Pt=Se.fieldNames,rt=Se.virtual,mt=Se.direction,zt=Se.listHeight,Ae=Se.listItemHeight,ke="".concat(ne,"-item"),dt=(0,fn.Z)(function(){return Ke},[j,Ke],function(At,ht){return ht[0]&&At[1]!==ht[1]}),gt=y.useRef(null),Zt=function(ht){ht.preventDefault()},Gt=function(ht){gt.current&&gt.current.scrollTo(typeof ht=="number"?{index:ht}:ht)},Vt=function(ht){for(var vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,en=dt.length,nn=0;nn<en;nn+=1){var Qt=(ht+nn*vt+en)%en,Wt=dt[Qt],ln=Wt.group,gn=Wt.data;if(!ln&&!gn.disabled)return Qt}return-1},Xt=y.useState(function(){return Vt(0)}),Nt=(0,v.Z)(Xt,2),Rt=Nt[0],Ht=Nt[1],Dt=function(ht){var vt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Ht(ht);var en={source:vt?"keyboard":"mouse"},nn=dt[ht];if(!nn){Ne(null,-1,en);return}Ne(nn.value,ht,en)};(0,y.useEffect)(function(){Dt(ft!==!1?Vt(0):-1)},[dt.length,He]);var cn=y.useCallback(function(At){return St.has(At)&&ce!=="combobox"},[ce,(0,w.Z)(St).toString(),St.size]);(0,y.useEffect)(function(){var At=setTimeout(function(){if(!le&&j&&St.size===1){var vt=Array.from(St)[0],en=dt.findIndex(function(nn){var Qt=nn.data;return Qt.value===vt});en!==-1&&(Dt(en),Gt(en))}});if(j){var ht;(ht=gt.current)===null||ht===void 0||ht.scrollTo(void 0)}return function(){return clearTimeout(At)}},[j,He,Ke.length]);var $t=function(ht){ht!==void 0&&te(ht,{selected:!St.has(ht)}),le||L(!1)};if(y.useImperativeHandle(C,function(){return{onKeyDown:function(ht){var vt=ht.which,en=ht.ctrlKey;switch(vt){case q.Z.N:case q.Z.P:case q.Z.UP:case q.Z.DOWN:{var nn=0;if(vt===q.Z.UP?nn=-1:vt===q.Z.DOWN?nn=1:vn()&&en&&(vt===q.Z.N?nn=1:vt===q.Z.P&&(nn=-1)),nn!==0){var Qt=Vt(Rt+nn,nn);Gt(Qt),Dt(Qt,!0)}break}case q.Z.ENTER:{var Wt=dt[Rt];Wt&&!Wt.data.disabled?$t(Wt.value):$t(void 0),j&&ht.preventDefault();break}case q.Z.ESC:L(!1),j&&ht.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ht){Gt(ht)}}}),dt.length===0)return y.createElement("div",{role:"listbox",id:"".concat(_,"_list"),className:"".concat(ke,"-empty"),onMouseDown:Zt},V);var _t=Object.keys(Pt).map(function(At){return Pt[At]}),an=function(ht){return ht.label};function Yt(At,ht){var vt=At.group;return{role:vt?"presentation":"option",id:"".concat(_,"_list_").concat(ht)}}var wn=function(ht){var vt=dt[ht];if(!vt)return null;var en=vt.data||{},nn=en.value,Qt=vt.group,Wt=(0,F.Z)(en,!0),ln=an(vt);return vt?y.createElement("div",(0,T.Z)({"aria-label":typeof ln=="string"&&!Qt?ln:null},Wt,{key:ht},Yt(vt,ht),{"aria-selected":cn(nn)}),nn):null},Un={role:"listbox",id:"".concat(_,"_list")};return y.createElement(y.Fragment,null,rt&&y.createElement("div",(0,T.Z)({},Un,{style:{height:0,width:0,overflow:"hidden"}}),wn(Rt-1),wn(Rt),wn(Rt+1)),y.createElement(Wn.Z,{itemKey:"key",ref:gt,data:dt,height:zt,itemHeight:Ae,fullHeight:!1,onMouseDown:Zt,onScroll:Qe,virtual:rt,direction:mt,innerProps:rt?null:Un},function(At,ht){var vt,en=At.group,nn=At.groupOption,Qt=At.data,Wt=At.label,ln=At.value,gn=Qt.key;if(en){var mn,Fn=(mn=Qt.title)!==null&&mn!==void 0?mn:En(Wt)?Wt.toString():void 0;return y.createElement("div",{className:H()(ke,"".concat(ke,"-group")),title:Fn},Wt!==void 0?Wt:gn)}var Ge=Qt.disabled,Ze=Qt.title,xt=Qt.children,Ot=Qt.style,hn=Qt.className,xr=(0,A.Z)(Qt,In),_n=(0,An.Z)(xr,_t),Kn=cn(ln),Bn="".concat(ke,"-option"),kn=H()(ke,Bn,hn,(vt={},(0,x.Z)(vt,"".concat(Bn,"-grouped"),nn),(0,x.Z)(vt,"".concat(Bn,"-active"),Rt===ht&&!Ge),(0,x.Z)(vt,"".concat(Bn,"-disabled"),Ge),(0,x.Z)(vt,"".concat(Bn,"-selected"),Kn),vt)),Mn=an(At),ur=!et||typeof et=="function"||Kn,qn=typeof Mn=="number"?Mn:Mn||ln,tr=En(qn)?qn.toString():void 0;return Ze!==void 0&&(tr=Ze),y.createElement("div",(0,T.Z)({},(0,F.Z)(_n),rt?{}:Yt(At,ht),{"aria-selected":Kn,className:kn,title:tr,onMouseMove:function(){Rt===ht||Ge||Dt(ht)},onClick:function(){Ge||$t(ln)},style:Ot}),y.createElement("div",{className:"".concat(Bn,"-content")},qn),y.isValidElement(et)||Kn,ur&&y.createElement(Ct,{className:"".concat(ke,"-option-state"),customizeIcon:et,customizeIconProps:{isSelected:Kn}},Kn?"\u2713":null))}))},Tn=y.forwardRef(pn);Tn.displayName="OptionList";var on=Tn;function Nn(h){var d=h.mode,C=h.options,D=h.children,ne=h.backfill,_=h.allowClear,j=h.placeholder,le=h.getInputElement,ce=h.showSearch,He=h.onSearch,L=h.defaultOpen,V=h.autoFocus,Qe=h.labelInValue,Se=h.value,Ke=h.inputValue,Ne=h.optionLabelProp,ft=isMultiple(d),te=ce!==void 0?ce:ft||d==="combobox",et=C||convertChildrenToData(D);if(warning(d!=="tags"||et.every(function(mt){return!mt.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),d==="tags"||d==="combobox"){var St=et.some(function(mt){return mt.options?mt.options.some(function(zt){return typeof("value"in zt?zt.value:zt.key)=="number"}):typeof("value"in mt?mt.value:mt.key)=="number"});warning(!St,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(d!=="combobox"||!Ne,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(d==="combobox"||!ne,"`backfill` only works with `combobox` mode."),warning(d==="combobox"||!le,"`getInputElement` only work with `combobox` mode."),noteOnce(d!=="combobox"||!le||!_||!j,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),He&&!te&&d!=="combobox"&&d!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!L||V,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Se!=null){var Pt=toArray(Se);warning(!Qe||Pt.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(!ft||Array.isArray(Se),"`value` should be array when `mode` is `multiple` or `tags`")}if(D){var rt=null;toNodeArray(D).some(function(mt){if(!React.isValidElement(mt)||!mt.type)return!1;var zt=mt,Ae=zt.type;if(Ae.isSelectOption)return!1;if(Ae.isSelectOptGroup){var ke=toNodeArray(mt.props.children).every(function(dt){return!React.isValidElement(dt)||!mt.type||dt.type.isSelectOption?!0:(rt=dt.type,!1)});return!ke}return rt=Ae,!0}),rt&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(rt.displayName||rt.name||rt,"`.")),warning(Ke===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function zn(h,d){if(h){var C=function D(ne){for(var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,j=0;j<ne.length;j++){var le=ne[j];if(le[d==null?void 0:d.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!_&&Array.isArray(le[d==null?void 0:d.options])&&D(le[d==null?void 0:d.options],!0))break}};C(h)}}var or=null,gr=["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"],qt=["inputValue"];function ut(h){return!h||(0,N.Z)(h)!=="object"}var jt=y.forwardRef(function(h,d){var C=h.id,D=h.mode,ne=h.prefixCls,_=ne===void 0?"rc-select":ne,j=h.backfill,le=h.fieldNames,ce=h.inputValue,He=h.searchValue,L=h.onSearch,V=h.autoClearSearchValue,Qe=V===void 0?!0:V,Se=h.onSelect,Ke=h.onDeselect,Ne=h.dropdownMatchSelectWidth,ft=Ne===void 0?!0:Ne,te=h.filterOption,et=h.filterSort,St=h.optionFilterProp,Pt=h.optionLabelProp,rt=h.options,mt=h.children,zt=h.defaultActiveFirstOption,Ae=h.menuItemSelectedIcon,ke=h.virtual,dt=h.direction,gt=h.listHeight,Zt=gt===void 0?200:gt,Gt=h.listItemHeight,Vt=Gt===void 0?20:Gt,Xt=h.value,Nt=h.defaultValue,Rt=h.labelInValue,Ht=h.onChange,Dt=(0,A.Z)(h,gr),cn=(0,ge.ZP)(C),$t=z(D),_t=!!(!rt&&mt),an=y.useMemo(function(){return te===void 0&&D==="combobox"?!1:te},[te,D]),Yt=y.useMemo(function(){return M(le,_t)},[JSON.stringify(le),_t]),wn=(0,ye.Z)("",{value:He!==void 0?He:ce,postState:function(Bt){return Bt||""}}),Un=(0,v.Z)(wn,2),At=Un[0],ht=Un[1],vt=it(rt,mt,Yt,St,Pt),en=vt.valueOptions,nn=vt.labelOptions,Qt=vt.options,Wt=y.useCallback(function(pt){var Bt=ze(pt);return Bt.map(function(It){var ct,yn,bn,cr,Mr;if(ut(It))ct=It;else{var Nr;bn=It.key,yn=It.label,ct=(Nr=It.value)!==null&&Nr!==void 0?Nr:bn}var Gn=en.get(ct);if(Gn){var Rr;if(yn===void 0&&(yn=Gn==null?void 0:Gn[Pt||Yt.label]),bn===void 0&&(bn=(Rr=Gn==null?void 0:Gn.key)!==null&&Rr!==void 0?Rr:ct),cr=Gn==null?void 0:Gn.disabled,Mr=Gn==null?void 0:Gn.title,0)var ci}return{label:yn,value:ct,key:bn,disabled:cr,title:Mr}})},[Yt,Pt,en]),ln=(0,ye.Z)(Nt,{value:Xt}),gn=(0,v.Z)(ln,2),mn=gn[0],Fn=gn[1],Ge=y.useMemo(function(){var pt,Bt=Wt(mn);return D==="combobox"&&Ye((pt=Bt[0])===null||pt===void 0?void 0:pt.value)?[]:Bt},[mn,Wt,D]),Ze=be(Ge,en),xt=(0,v.Z)(Ze,2),Ot=xt[0],hn=xt[1],xr=y.useMemo(function(){if(!D&&Ot.length===1){var pt=Ot[0];if(pt.value===null&&(pt.label===null||pt.label===void 0))return[]}return Ot.map(function(Bt){var It;return(0,W.Z)((0,W.Z)({},Bt),{},{label:(It=Bt.label)!==null&&It!==void 0?It:Bt.value})})},[D,Ot]),_n=y.useMemo(function(){return new Set(Ot.map(function(pt){return pt.value}))},[Ot]);y.useEffect(function(){if(D==="combobox"){var pt,Bt=(pt=Ot[0])===null||pt===void 0?void 0:pt.value;ht(Xe(Bt)?String(Bt):"")}},[Ot]);var Kn=st(function(pt,Bt){var It,ct=Bt!=null?Bt:pt;return It={},(0,x.Z)(It,Yt.value,pt),(0,x.Z)(It,Yt.label,ct),It}),Bn=y.useMemo(function(){if(D!=="tags")return Qt;var pt=(0,w.Z)(Qt),Bt=function(ct){return en.has(ct)};return(0,w.Z)(Ot).sort(function(It,ct){return It.value<ct.value?-1:1}).forEach(function(It){var ct=It.value;Bt(ct)||pt.push(Kn(ct,It.label))}),pt},[Kn,Qt,en,Ot,D]),kn=G(Bn,Yt,At,an,St),Mn=y.useMemo(function(){return D!=="tags"||!At||kn.some(function(pt){return pt[St||"value"]===At})||kn.some(function(pt){return pt[Yt.value]===At})?kn:[Kn(At)].concat((0,w.Z)(kn))},[Kn,St,D,kn,At,Yt]),ur=y.useMemo(function(){return et?(0,w.Z)(Mn).sort(function(pt,Bt){return et(pt,Bt)}):Mn},[Mn,et]),qn=y.useMemo(function(){return $(ur,{fieldNames:Yt,childrenAsData:_t})},[ur,Yt,_t]),tr=function(Bt){var It=Wt(Bt);if(Fn(It),Ht&&(It.length!==Ot.length||It.some(function(bn,cr){var Mr;return((Mr=Ot[cr])===null||Mr===void 0?void 0:Mr.value)!==(bn==null?void 0:bn.value)}))){var ct=Rt?It:It.map(function(bn){return bn.value}),yn=It.map(function(bn){return J(hn(bn.value))});Ht($t?ct:ct[0],$t?yn:yn[0])}},_r=y.useState(null),Xr=(0,v.Z)(_r,2),li=Xr[0],Yr=Xr[1],Cr=y.useState(0),Qr=(0,v.Z)(Cr,2),Ir=Qr[0],Hi=Qr[1],Si=zt!==void 0?zt:D!=="combobox",si=y.useCallback(function(pt,Bt){var It=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ct=It.source,yn=ct===void 0?"keyboard":ct;Hi(Bt),j&&D==="combobox"&&pt!==null&&yn==="keyboard"&&Yr(String(pt))},[j,D]),Kr=function(Bt,It,ct){var yn=function(){var zr,Fr=hn(Bt);return[Rt?{label:Fr==null?void 0:Fr[Yt.label],value:Bt,key:(zr=Fr==null?void 0:Fr.key)!==null&&zr!==void 0?zr:Bt}:Bt,J(Fr)]};if(It&&Se){var bn=yn(),cr=(0,v.Z)(bn,2),Mr=cr[0],Nr=cr[1];Se(Mr,Nr)}else if(!It&&Ke&&ct!=="clear"){var Gn=yn(),Rr=(0,v.Z)(Gn,2),ci=Rr[0],Zi=Rr[1];Ke(ci,Zi)}},xi=st(function(pt,Bt){var It,ct=$t?Bt.selected:!0;ct?It=$t?[].concat((0,w.Z)(Ot),[pt]):[pt]:It=Ot.filter(function(yn){return yn.value!==pt}),tr(It),Kr(pt,ct),D==="combobox"?Yr(""):(!z||Qe)&&(ht(""),Yr(""))}),Ci=function(Bt,It){tr(Bt);var ct=It.type,yn=It.values;(ct==="remove"||ct==="clear")&&yn.forEach(function(bn){Kr(bn.value,!1,ct)})},jr=function(Bt,It){if(ht(Bt),Yr(null),It.source==="submit"){var ct=(Bt||"").trim();if(ct){var yn=Array.from(new Set([].concat((0,w.Z)(_n),[ct])));tr(yn),Kr(ct,!0),ht("")}return}It.source!=="blur"&&(D==="combobox"&&tr(Bt),L==null||L(Bt))},Ar=function(Bt){var It=Bt;D!=="tags"&&(It=Bt.map(function(yn){var bn=nn.get(yn);return bn==null?void 0:bn.value}).filter(function(yn){return yn!==void 0}));var ct=Array.from(new Set([].concat((0,w.Z)(_n),(0,w.Z)(It))));tr(ct),ct.forEach(function(yn){Kr(yn,!0)})},ui=y.useMemo(function(){var pt=ke!==!1&&ft!==!1;return(0,W.Z)((0,W.Z)({},vt),{},{flattenOptions:qn,onActiveValue:si,defaultActiveFirstOption:Si,onSelect:xi,menuItemSelectedIcon:Ae,rawValues:_n,fieldNames:Yt,virtual:pt,direction:dt,listHeight:Zt,listItemHeight:Vt,childrenAsData:_t})},[vt,qn,si,Si,xi,Ae,_n,Yt,ke,ft,Zt,Vt,_t]);return y.createElement(Dn.Provider,{value:ui},y.createElement(Ce,(0,T.Z)({},Dt,{id:cn,prefixCls:_,ref:d,omitDomProps:qt,mode:D,displayValues:xr,onDisplayValuesChange:Ci,direction:dt,searchValue:At,onSearch:jr,autoClearSearchValue:Qe,onSearchSplit:Ar,dropdownMatchSelectWidth:ft,OptionList:on,emptyOptions:!qn.length,activeValue:li,activeDescendantId:"".concat(cn,"_list_").concat(Ir)})))}),m=jt;m.Option=Cn,m.OptGroup=kt;var B=m,K=B},9296:function(rn,De,f){"use strict";f.r(De),f.d(De,{ResizableTextArea:function(){return Oe},default:function(){return Ye}});var T=f(54476),w=f(33885),x=f(20068),W=f(76190),v=f(42978),A=f(75931),N=f(94480),ye=f(92310),oe=f.n(ye),y=f(93681),Re=f(5643),H=f(18929),me=f(59301),Te=f(29301),q=f(34280),Je=f(16089),ot=`
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;
`,Ct=["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"],Ft={},re;function Q(fe){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,de=fe.getAttribute("id")||fe.getAttribute("data-reactid")||fe.getAttribute("name");if(Y&&Ft[de])return Ft[de];var ae=window.getComputedStyle(fe),ie=ae.getPropertyValue("box-sizing")||ae.getPropertyValue("-moz-box-sizing")||ae.getPropertyValue("-webkit-box-sizing"),Ue=parseFloat(ae.getPropertyValue("padding-bottom"))+parseFloat(ae.getPropertyValue("padding-top")),We=parseFloat(ae.getPropertyValue("border-bottom-width"))+parseFloat(ae.getPropertyValue("border-top-width")),he=Ct.map(function(ve){return"".concat(ve,":").concat(ae.getPropertyValue(ve))}).join(";"),Le={sizingStyle:he,paddingSize:Ue,borderSize:We,boxSizing:ie};return Y&&de&&(Ft[de]=Le),Le}function S(fe){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ae=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;re||(re=document.createElement("textarea"),re.setAttribute("tab-index","-1"),re.setAttribute("aria-hidden","true"),document.body.appendChild(re)),fe.getAttribute("wrap")?re.setAttribute("wrap",fe.getAttribute("wrap")):re.removeAttribute("wrap");var ie=Q(fe,Y),Ue=ie.paddingSize,We=ie.borderSize,he=ie.boxSizing,Le=ie.sizingStyle;re.setAttribute("style","".concat(Le,";").concat(ot)),re.value=fe.value||fe.placeholder||"";var ve=void 0,Et=void 0,Tt,wt=re.scrollHeight;if(he==="border-box"?wt+=We:he==="content-box"&&(wt-=Ue),de!==null||ae!==null){re.value=" ";var qe=re.scrollHeight-Ue;de!==null&&(ve=qe*de,he==="border-box"&&(ve=ve+Ue+We),wt=Math.max(ve,wt)),ae!==null&&(Et=qe*ae,he==="border-box"&&(Et=Et+Ue+We),Tt=wt>Et?"":"hidden",wt=Math.min(Et,wt))}var Lt={height:wt,overflowY:Tt,resize:"none"};return ve&&(Lt.minHeight=ve),Et&&(Lt.maxHeight=Et),Lt}var c=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],b=0,F=1,X=2,P=me.forwardRef(function(fe,Y){var de=fe,ae=de.prefixCls,ie=de.onPressEnter,Ue=de.defaultValue,We=de.value,he=de.autoSize,Le=de.onResize,ve=de.className,Et=de.style,Tt=de.disabled,wt=de.onChange,qe=de.onInternalAutoSize,Lt=(0,A.Z)(de,c),lt=(0,H.Z)(Ue,{value:We,postState:function(kt){return kt!=null?kt:""}}),Z=(0,v.Z)(lt,2),Fe=Z[0],se=Z[1],E=function(kt){se(kt.target.value),wt==null||wt(kt)},I=me.useRef();me.useImperativeHandle(Y,function(){return{textArea:I.current}});var M=me.useMemo(function(){return he&&(0,W.Z)(he)==="object"?[he.minRows,he.maxRows]:[]},[he]),$=(0,v.Z)(M,2),J=$[0],Me=$[1],k=!!he,xe=function(){try{if(document.activeElement===I.current){var kt=I.current,sn=kt.selectionStart,Cn=kt.selectionEnd,fn=kt.scrollTop;I.current.setSelectionRange(sn,Cn),I.current.scrollTop=fn}}catch(An){}},z=me.useState(X),ue=(0,v.Z)(z,2),Ce=ue[0],be=ue[1],pe=me.useState(),G=(0,v.Z)(pe,2),ge=G[0],Pe=G[1],tt=function(){be(b)};(0,q.Z)(function(){k&&tt()},[We,J,Me,k]),(0,q.Z)(function(){if(Ce===b)be(F);else if(Ce===F){var tn=S(I.current,!1,J,Me);be(X),Pe(tn)}else xe()},[Ce]);var at=me.useRef(),_e=function(){Je.Z.cancel(at.current)},Ee=function(kt){Ce===X&&(Le==null||Le(kt),he&&(_e(),at.current=(0,Je.Z)(function(){tt()})))};me.useEffect(function(){return _e},[]);var it=k?ge:null,st=(0,w.Z)((0,w.Z)({},Et),it);return(Ce===b||Ce===F)&&(st.overflowY="hidden",st.overflowX="hidden"),me.createElement(Te.Z,{onResize:Ee,disabled:!(he||Le)},me.createElement("textarea",(0,T.Z)({},Lt,{ref:I,style:st,className:oe()(ae,ve,(0,x.Z)({},"".concat(ae,"-disabled"),Tt)),disabled:Tt,value:Fe,onChange:E})))}),Oe=P,je=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function ze(fe,Y){return(0,N.Z)(fe||"").slice(0,Y).join("")}function Ie(fe,Y,de,ae){var ie=de;return fe?ie=ze(de,ae):(0,N.Z)(Y||"").length<de.length&&(0,N.Z)(de||"").length>ae&&(ie=Y),ie}var bt=me.forwardRef(function(fe,Y){var de,ae=fe.defaultValue,ie=fe.value,Ue=fe.onFocus,We=fe.onBlur,he=fe.onChange,Le=fe.allowClear,ve=fe.maxLength,Et=fe.onCompositionStart,Tt=fe.onCompositionEnd,wt=fe.suffix,qe=fe.prefixCls,Lt=qe===void 0?"rc-textarea":qe,lt=fe.classes,Z=fe.showCount,Fe=fe.className,se=fe.style,E=fe.disabled,I=fe.hidden,M=fe.classNames,$=fe.styles,J=fe.onResize,Me=(0,A.Z)(fe,je),k=(0,H.Z)(ae,{value:ie,defaultValue:ae}),xe=(0,v.Z)(k,2),z=xe[0],ue=xe[1],Ce=(0,me.useRef)(null),be=me.useState(!1),pe=(0,v.Z)(be,2),G=pe[0],ge=pe[1],Pe=me.useState(!1),tt=(0,v.Z)(Pe,2),at=tt[0],_e=tt[1],Ee=me.useRef(),it=me.useRef(0),st=me.useState(null),tn=(0,v.Z)(st,2),kt=tn[0],sn=tn[1],Cn=function(){var ut;(ut=Ce.current)===null||ut===void 0||ut.textArea.focus()};(0,me.useImperativeHandle)(Y,function(){return{resizableTextArea:Ce.current,focus:Cn,blur:function(){var ut;(ut=Ce.current)===null||ut===void 0||ut.textArea.blur()}}}),(0,me.useEffect)(function(){ge(function(qt){return!E&&qt})},[E]);var fn=Number(ve)>0,An=function(ut){_e(!0),Ee.current=z,it.current=ut.currentTarget.selectionStart,Et==null||Et(ut)},Wn=function(ut){_e(!1);var jt=ut.currentTarget.value;if(fn){var m,B=it.current>=ve+1||it.current===((m=Ee.current)===null||m===void 0?void 0:m.length);jt=Ie(B,Ee.current,jt,ve)}jt!==z&&(ue(jt),(0,Re.rJ)(ut.currentTarget,ut,he,jt)),Tt==null||Tt(ut)},xn=function(ut){var jt=ut.target.value;if(!at&&fn){var m=ut.target.selectionStart>=ve+1||ut.target.selectionStart===jt.length||!ut.target.selectionStart;jt=Ie(m,z,jt,ve)}ue(jt),(0,Re.rJ)(ut.currentTarget,ut,he,jt)},Dn=function(ut){var jt=Me.onPressEnter,m=Me.onKeyDown;ut.key==="Enter"&&jt&&jt(ut),m==null||m(ut)},vn=function(ut){ge(!0),Ue==null||Ue(ut)},In=function(ut){ge(!1),We==null||We(ut)},En=function(ut){var jt;ue(""),Cn(),(0,Re.rJ)((jt=Ce.current)===null||jt===void 0?void 0:jt.textArea,ut,he)},pn=(0,Re.D7)(z);!at&&fn&&ie==null&&(pn=ze(pn,ve));var Tn=wt,on;if(Z){var Nn=(0,N.Z)(pn).length;(0,W.Z)(Z)==="object"?on=Z.formatter({value:pn,count:Nn,maxLength:ve}):on="".concat(Nn).concat(fn?" / ".concat(ve):""),Tn=me.createElement(me.Fragment,null,Tn,me.createElement("span",{className:oe()("".concat(Lt,"-data-count"),M==null?void 0:M.count),style:$==null?void 0:$.count},on))}var zn=function(ut){var jt;J==null||J(ut),(jt=Ce.current)!==null&&jt!==void 0&&jt.textArea.style.height&&sn(!0)},or=!Me.autoSize&&!Z&&!Le,gr=me.createElement(y.BaseInput,{value:pn,allowClear:Le,handleReset:En,suffix:Tn,prefixCls:Lt,classes:{affixWrapper:oe()(lt==null?void 0:lt.affixWrapper,(de={},(0,x.Z)(de,"".concat(Lt,"-show-count"),Z),(0,x.Z)(de,"".concat(Lt,"-textarea-allow-clear"),Le),de))},disabled:E,focused:G,className:Fe,style:(0,w.Z)((0,w.Z)({},se),kt&&!or?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof on=="string"?on:void 0}},hidden:I,inputElement:me.createElement(Oe,(0,T.Z)({},Me,{onKeyDown:Dn,onChange:xn,onFocus:vn,onBlur:In,onCompositionStart:An,onCompositionEnd:Wn,className:M==null?void 0:M.textarea,style:(0,w.Z)((0,w.Z)({},$==null?void 0:$.textarea),{},{resize:se==null?void 0:se.resize}),disabled:E,prefixCls:Lt,onResize:zn,ref:Ce}))});return gr}),Xe=bt,Ye=Xe},48911:function(rn,De,f){"use strict";f.d(De,{Z:function(){return lt}});var T=f(54476),w=f(76190),x=f(33885),W=f(20068),v=f(42978),A=f(75931),N=f(92310),ye=f.n(N),oe=f(29301),y=f(70425),Re=f(34280),H=f(59301),me=f(4676),Te=H.forwardRef(function(Z,Fe){var se=Z.height,E=Z.offsetY,I=Z.offsetX,M=Z.children,$=Z.prefixCls,J=Z.onInnerResize,Me=Z.innerProps,k=Z.rtl,xe=Z.extra,z={},ue={display:"flex",flexDirection:"column"};return E!==void 0&&(z={height:se,position:"relative",overflow:"hidden"},ue=(0,x.Z)((0,x.Z)({},ue),{},(0,W.Z)((0,W.Z)((0,W.Z)((0,W.Z)((0,W.Z)({transform:"translateY(".concat(E,"px)")},k?"marginRight":"marginLeft",-I),"position","absolute"),"left",0),"right",0),"top",0))),H.createElement("div",{style:z},H.createElement(oe.Z,{onResize:function(be){var pe=be.offsetHeight;pe&&J&&J()}},H.createElement("div",(0,T.Z)({style:ue,className:ye()((0,W.Z)({},"".concat($,"-holder-inner"),$)),ref:Fe},Me),M,xe)))});Te.displayName="Filler";var q=Te;function Je(Z){var Fe=Z.children,se=Z.setRef,E=H.useCallback(function(I){se(I)},[]);return H.cloneElement(Fe,{ref:E})}function ot(Z,Fe,se,E,I,M,$,J){var Me=J.getKey;return Z.slice(Fe,se+1).map(function(k,xe){var z=Fe+xe,ue=$(k,z,{style:{width:E},offsetX:I}),Ce=Me(k);return H.createElement(Je,{key:Ce,setRef:function(pe){return M(k,pe)}},ue)})}function Ct(Z,Fe,se,E){var I=se-Z,M=Fe-se,$=Math.min(I,M)*2;if(E<=$){var J=Math.floor(E/2);return E%2?se+J+1:se-J}return I>M?se-(E-M):se+(E-I)}function Ft(Z,Fe,se){var E=Z.length,I=Fe.length,M,$;if(E===0&&I===0)return null;E<I?(M=Z,$=Fe):(M=Fe,$=Z);var J={__EMPTY_ITEM__:!0};function Me(be){return be!==void 0?se(be):J}for(var k=null,xe=Math.abs(E-I)!==1,z=0;z<$.length;z+=1){var ue=Me(M[z]),Ce=Me($[z]);if(ue!==Ce){k=z,xe=xe||ue!==Me($[z+1]);break}}return k===null?null:{index:k,multiple:xe}}function re(Z,Fe,se){var E=H.useState(Z),I=(0,v.Z)(E,2),M=I[0],$=I[1],J=H.useState(null),Me=(0,v.Z)(J,2),k=Me[0],xe=Me[1];return H.useEffect(function(){var z=Ft(M||[],Z||[],Fe);(z==null?void 0:z.index)!==void 0&&(se==null||se(z.index),xe(Z[z.index])),$(Z)},[Z]),[k]}var Q=f(16089),S=(typeof navigator=="undefined"?"undefined":(0,w.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),c=S,b=function(Z,Fe,se,E){var I=(0,H.useRef)(!1),M=(0,H.useRef)(null);function $(){clearTimeout(M.current),I.current=!0,M.current=setTimeout(function(){I.current=!1},50)}var J=(0,H.useRef)({top:Z,bottom:Fe,left:se,right:E});return J.current.top=Z,J.current.bottom=Fe,J.current.left=se,J.current.right=E,function(Me,k){var xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,z=Me?k<0&&J.current.left||k>0&&J.current.right:k<0&&J.current.top||k>0&&J.current.bottom;return xe&&z?(clearTimeout(M.current),I.current=!1):(!z||I.current)&&$(),!I.current&&z}};function F(Z,Fe,se,E,I,M,$){var J=(0,H.useRef)(0),Me=(0,H.useRef)(null),k=(0,H.useRef)(null),xe=(0,H.useRef)(!1),z=b(Fe,se,E,I);function ue(Pe,tt){if(Q.Z.cancel(Me.current),!z(!1,tt)){var at=Pe;if(!at._virtualHandled)at._virtualHandled=!0;else return;J.current+=tt,k.current=tt,c||at.preventDefault(),Me.current=(0,Q.Z)(function(){var _e=xe.current?10:1;$(J.current*_e,!1),J.current=0})}}function Ce(Pe,tt){$(tt,!0),c||Pe.preventDefault()}var be=(0,H.useRef)(null),pe=(0,H.useRef)(null);function G(Pe){if(Z){Q.Z.cancel(pe.current),pe.current=(0,Q.Z)(function(){be.current=null},2);var tt=Pe.deltaX,at=Pe.deltaY,_e=Pe.shiftKey,Ee=tt,it=at;(be.current==="sx"||!be.current&&_e&&at&&!tt)&&(Ee=at,it=0,be.current="sx");var st=Math.abs(Ee),tn=Math.abs(it);be.current===null&&(be.current=M&&st>tn?"x":"y"),be.current==="y"?ue(Pe,it):Ce(Pe,Ee)}}function ge(Pe){Z&&(xe.current=Pe.detail===k.current)}return[G,ge]}function X(Z,Fe,se,E){var I=H.useMemo(function(){return[new Map,[]]},[Z,se.id,E]),M=(0,v.Z)(I,2),$=M[0],J=M[1],Me=function(xe){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xe,ue=$.get(xe),Ce=$.get(z);if(ue===void 0||Ce===void 0)for(var be=Z.length,pe=J.length;pe<be;pe+=1){var G,ge=Z[pe],Pe=Fe(ge);$.set(Pe,pe);var tt=(G=se.get(Pe))!==null&&G!==void 0?G:E;if(J[pe]=(J[pe-1]||0)+tt,Pe===xe&&(ue=pe),Pe===z&&(Ce=pe),ue!==void 0&&Ce!==void 0)break}return{top:J[ue-1]||0,bottom:J[Ce]}};return Me}var P=f(67732),Oe=f(83652),je=function(){function Z(){(0,P.Z)(this,Z),(0,W.Z)(this,"maps",void 0),(0,W.Z)(this,"id",0),(0,W.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Oe.Z)(Z,[{key:"set",value:function(se,E){this.diffRecords.set(se,this.maps[se]),this.maps[se]=E,this.id+=1}},{key:"get",value:function(se){return this.maps[se]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),Z}(),ze=je;function Ie(Z){var Fe=parseFloat(Z);return isNaN(Fe)?0:Fe}function bt(Z,Fe,se){var E=H.useState(0),I=(0,v.Z)(E,2),M=I[0],$=I[1],J=(0,H.useRef)(new Map),Me=(0,H.useRef)(new ze),k=(0,H.useRef)(0);function xe(){k.current+=1}function z(){var Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;xe();var be=function(){var ge=!1;J.current.forEach(function(Pe,tt){if(Pe&&Pe.offsetParent){var at=Pe.offsetHeight,_e=getComputedStyle(Pe),Ee=_e.marginTop,it=_e.marginBottom,st=Ie(Ee),tn=Ie(it),kt=at+st+tn;Me.current.get(tt)!==kt&&(Me.current.set(tt,kt),ge=!0)}}),ge&&$(function(Pe){return Pe+1})};if(Ce)be();else{k.current+=1;var pe=k.current;Promise.resolve().then(function(){pe===k.current&&be()})}}function ue(Ce,be){var pe=Z(Ce),G=J.current.get(pe);be?(J.current.set(pe,be),z()):J.current.delete(pe),!G!=!be&&(be?Fe==null||Fe(Ce):se==null||se(Ce))}return(0,H.useEffect)(function(){return xe},[]),[ue,z,Me.current,M]}var Xe=14/15;function Ye(Z,Fe,se){var E=(0,H.useRef)(!1),I=(0,H.useRef)(0),M=(0,H.useRef)(0),$=(0,H.useRef)(null),J=(0,H.useRef)(null),Me,k=function(Ce){if(E.current){var be=Math.ceil(Ce.touches[0].pageX),pe=Math.ceil(Ce.touches[0].pageY),G=I.current-be,ge=M.current-pe,Pe=Math.abs(G)>Math.abs(ge);Pe?I.current=be:M.current=pe;var tt=se(Pe,Pe?G:ge,!1,Ce);tt&&Ce.preventDefault(),clearInterval(J.current),tt&&(J.current=setInterval(function(){Pe?G*=Xe:ge*=Xe;var at=Math.floor(Pe?G:ge);(!se(Pe,at,!0)||Math.abs(at)<=.1)&&clearInterval(J.current)},16))}},xe=function(){E.current=!1,Me()},z=function(Ce){Me(),Ce.touches.length===1&&!E.current&&(E.current=!0,I.current=Math.ceil(Ce.touches[0].pageX),M.current=Math.ceil(Ce.touches[0].pageY),$.current=Ce.target,$.current.addEventListener("touchmove",k,{passive:!1}),$.current.addEventListener("touchend",xe,{passive:!0}))};Me=function(){$.current&&($.current.removeEventListener("touchmove",k),$.current.removeEventListener("touchend",xe))},(0,Re.Z)(function(){return Z&&Fe.current.addEventListener("touchstart",z,{passive:!0}),function(){var ue;(ue=Fe.current)===null||ue===void 0||ue.removeEventListener("touchstart",z),Me(),clearInterval(J.current)}},[Z])}function fe(Z){return Math.floor(Math.pow(Z,.5))}function Y(Z,Fe){var se="touches"in Z?Z.touches[0]:Z;return se[Fe?"pageX":"pageY"]-window[Fe?"scrollX":"scrollY"]}function de(Z,Fe,se){H.useEffect(function(){var E=Fe.current;if(Z&&E){var I=!1,M,$,J=function(){Q.Z.cancel(M)},Me=function ue(){J(),M=(0,Q.Z)(function(){se($),ue()})},k=function(){I=!1,J()},xe=function(Ce){if(!(Ce.target.draggable||Ce.button!==0)){var be=Ce;be._virtualHandled||(be._virtualHandled=!0,I=!0)}},z=function(Ce){if(I){var be=Y(Ce,!1),pe=E.getBoundingClientRect(),G=pe.top,ge=pe.bottom;if(be<=G){var Pe=G-be;$=-fe(Pe),Me()}else if(be>=ge){var tt=be-ge;$=fe(tt),Me()}else J()}};return E.addEventListener("mousedown",xe),E.ownerDocument.addEventListener("mouseup",k),E.ownerDocument.addEventListener("mousemove",z),E.ownerDocument.addEventListener("dragend",k),function(){E.removeEventListener("mousedown",xe),E.ownerDocument.removeEventListener("mouseup",k),E.ownerDocument.removeEventListener("mousemove",z),E.ownerDocument.removeEventListener("dragend",k),J()}}},[Z])}var ae=10;function ie(Z,Fe,se,E,I,M,$,J){var Me=H.useRef(),k=H.useState(null),xe=(0,v.Z)(k,2),z=xe[0],ue=xe[1];return(0,Re.Z)(function(){if(z&&z.times<ae){if(!Z.current){ue(function(In){return(0,x.Z)({},In)});return}M();var Ce=z.targetAlign,be=z.originAlign,pe=z.index,G=z.offset,ge=Z.current.clientHeight,Pe=!1,tt=Ce,at=null;if(ge){for(var _e=Ce||be,Ee=0,it=0,st=0,tn=Math.min(Fe.length-1,pe),kt=0;kt<=tn;kt+=1){var sn=I(Fe[kt]);it=Ee;var Cn=se.get(sn);st=it+(Cn===void 0?E:Cn),Ee=st}for(var fn=_e==="top"?G:ge-G,An=tn;An>=0;An-=1){var Wn=I(Fe[An]),xn=se.get(Wn);if(xn===void 0){Pe=!0;break}if(fn-=xn,fn<=0)break}switch(_e){case"top":at=it-G;break;case"bottom":at=st-ge+G;break;default:{var Dn=Z.current.scrollTop,vn=Dn+ge;it<Dn?tt="top":st>vn&&(tt="bottom")}}at!==null&&$(at),at!==z.lastTop&&(Pe=!0)}Pe&&ue((0,x.Z)((0,x.Z)({},z),{},{times:z.times+1,targetAlign:tt,lastTop:at}))}},[z,Z.current]),function(Ce){if(Ce==null){J();return}if(Q.Z.cancel(Me.current),typeof Ce=="number")$(Ce);else if(Ce&&(0,w.Z)(Ce)==="object"){var be,pe=Ce.align;"index"in Ce?be=Ce.index:be=Fe.findIndex(function(Pe){return I(Pe)===Ce.key});var G=Ce.offset,ge=G===void 0?0:G;ue({times:0,index:be,offset:ge,originAlign:pe})}}}var Ue=H.forwardRef(function(Z,Fe){var se=Z.prefixCls,E=Z.rtl,I=Z.scrollOffset,M=Z.scrollRange,$=Z.onStartMove,J=Z.onStopMove,Me=Z.onScroll,k=Z.horizontal,xe=Z.spinSize,z=Z.containerSize,ue=Z.style,Ce=Z.thumbStyle,be=Z.showScrollBar,pe=H.useState(!1),G=(0,v.Z)(pe,2),ge=G[0],Pe=G[1],tt=H.useState(null),at=(0,v.Z)(tt,2),_e=at[0],Ee=at[1],it=H.useState(null),st=(0,v.Z)(it,2),tn=st[0],kt=st[1],sn=!E,Cn=H.useRef(),fn=H.useRef(),An=H.useState(be),Wn=(0,v.Z)(An,2),xn=Wn[0],Dn=Wn[1],vn=H.useRef(),In=function(){be===!0||be===!1||(clearTimeout(vn.current),Dn(!0),vn.current=setTimeout(function(){Dn(!1)},3e3))},En=M-z||0,pn=z-xe||0,Tn=H.useMemo(function(){if(I===0||En===0)return 0;var m=I/En;return m*pn},[I,En,pn]),on=function(B){B.stopPropagation(),B.preventDefault()},Nn=H.useRef({top:Tn,dragging:ge,pageY:_e,startTop:tn});Nn.current={top:Tn,dragging:ge,pageY:_e,startTop:tn};var zn=function(B){Pe(!0),Ee(Y(B,k)),kt(Nn.current.top),$(),B.stopPropagation(),B.preventDefault()};H.useEffect(function(){var m=function(d){d.preventDefault()},B=Cn.current,K=fn.current;return B.addEventListener("touchstart",m,{passive:!1}),K.addEventListener("touchstart",zn,{passive:!1}),function(){B.removeEventListener("touchstart",m),K.removeEventListener("touchstart",zn)}},[]);var or=H.useRef();or.current=En;var gr=H.useRef();gr.current=pn,H.useEffect(function(){if(ge){var m,B=function(d){var C=Nn.current,D=C.dragging,ne=C.pageY,_=C.startTop;Q.Z.cancel(m);var j=Cn.current.getBoundingClientRect(),le=z/(k?j.width:j.height);if(D){var ce=(Y(d,k)-ne)*le,He=_;!sn&&k?He-=ce:He+=ce;var L=or.current,V=gr.current,Qe=V?He/V:0,Se=Math.ceil(Qe*L);Se=Math.max(Se,0),Se=Math.min(Se,L),m=(0,Q.Z)(function(){Me(Se,k)})}},K=function(){Pe(!1),J()};return window.addEventListener("mousemove",B,{passive:!0}),window.addEventListener("touchmove",B,{passive:!0}),window.addEventListener("mouseup",K,{passive:!0}),window.addEventListener("touchend",K,{passive:!0}),function(){window.removeEventListener("mousemove",B),window.removeEventListener("touchmove",B),window.removeEventListener("mouseup",K),window.removeEventListener("touchend",K),Q.Z.cancel(m)}}},[ge]),H.useEffect(function(){return In(),function(){clearTimeout(vn.current)}},[I]),H.useImperativeHandle(Fe,function(){return{delayHidden:In}});var qt="".concat(se,"-scrollbar"),ut={position:"absolute",visibility:xn?null:"hidden"},jt={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return k?(Object.assign(ut,{height:8,left:0,right:0,bottom:0}),Object.assign(jt,(0,W.Z)({height:"100%",width:xe},sn?"left":"right",Tn))):(Object.assign(ut,(0,W.Z)({width:8,top:0,bottom:0},sn?"right":"left",0)),Object.assign(jt,{width:"100%",height:xe,top:Tn})),H.createElement("div",{ref:Cn,className:ye()(qt,(0,W.Z)((0,W.Z)((0,W.Z)({},"".concat(qt,"-horizontal"),k),"".concat(qt,"-vertical"),!k),"".concat(qt,"-visible"),xn)),style:(0,x.Z)((0,x.Z)({},ut),ue),onMouseDown:on,onMouseMove:In},H.createElement("div",{ref:fn,className:ye()("".concat(qt,"-thumb"),(0,W.Z)({},"".concat(qt,"-thumb-moving"),ge)),style:(0,x.Z)((0,x.Z)({},jt),Ce),onMouseDown:zn}))}),We=Ue,he=20;function Le(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,se=Z/Fe*Z;return isNaN(se)&&(se=0),se=Math.max(se,he),Math.floor(se)}var ve=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Et=[],Tt={overflowY:"auto",overflowAnchor:"none"};function wt(Z,Fe){var se=Z.prefixCls,E=se===void 0?"rc-virtual-list":se,I=Z.className,M=Z.height,$=Z.itemHeight,J=Z.fullHeight,Me=J===void 0?!0:J,k=Z.style,xe=Z.data,z=Z.children,ue=Z.itemKey,Ce=Z.virtual,be=Z.direction,pe=Z.scrollWidth,G=Z.component,ge=G===void 0?"div":G,Pe=Z.onScroll,tt=Z.onVirtualScroll,at=Z.onVisibleChange,_e=Z.innerProps,Ee=Z.extraRender,it=Z.styles,st=Z.showScrollBar,tn=st===void 0?"optional":st,kt=(0,A.Z)(Z,ve),sn=H.useCallback(function(Ge){return typeof ue=="function"?ue(Ge):Ge==null?void 0:Ge[ue]},[ue]),Cn=bt(sn,null,null),fn=(0,v.Z)(Cn,4),An=fn[0],Wn=fn[1],xn=fn[2],Dn=fn[3],vn=!!(Ce!==!1&&M&&$),In=H.useMemo(function(){return Object.values(xn.maps).reduce(function(Ge,Ze){return Ge+Ze},0)},[xn.id,xn.maps]),En=vn&&xe&&(Math.max($*xe.length,In)>M||!!pe),pn=be==="rtl",Tn=ye()(E,(0,W.Z)({},"".concat(E,"-rtl"),pn),I),on=xe||Et,Nn=(0,H.useRef)(),zn=(0,H.useRef)(),or=(0,H.useRef)(),gr=(0,H.useState)(0),qt=(0,v.Z)(gr,2),ut=qt[0],jt=qt[1],m=(0,H.useState)(0),B=(0,v.Z)(m,2),K=B[0],h=B[1],d=(0,H.useState)(!1),C=(0,v.Z)(d,2),D=C[0],ne=C[1],_=function(){ne(!0)},j=function(){ne(!1)},le={getKey:sn};function ce(Ge){jt(function(Ze){var xt;typeof Ge=="function"?xt=Ge(Ze):xt=Ge;var Ot=Vt(xt);return Nn.current.scrollTop=Ot,Ot})}var He=(0,H.useRef)({start:0,end:on.length}),L=(0,H.useRef)(),V=re(on,sn),Qe=(0,v.Z)(V,1),Se=Qe[0];L.current=Se;var Ke=H.useMemo(function(){if(!vn)return{scrollHeight:void 0,start:0,end:on.length-1,offset:void 0};if(!En){var Ge;return{scrollHeight:((Ge=zn.current)===null||Ge===void 0?void 0:Ge.offsetHeight)||0,start:0,end:on.length-1,offset:void 0}}for(var Ze=0,xt,Ot,hn,xr=on.length,_n=0;_n<xr;_n+=1){var Kn=on[_n],Bn=sn(Kn),kn=xn.get(Bn),Mn=Ze+(kn===void 0?$:kn);Mn>=ut&&xt===void 0&&(xt=_n,Ot=Ze),Mn>ut+M&&hn===void 0&&(hn=_n),Ze=Mn}return xt===void 0&&(xt=0,Ot=0,hn=Math.ceil(M/$)),hn===void 0&&(hn=on.length-1),hn=Math.min(hn+1,on.length-1),{scrollHeight:Ze,start:xt,end:hn,offset:Ot}},[En,vn,ut,on,Dn,M]),Ne=Ke.scrollHeight,ft=Ke.start,te=Ke.end,et=Ke.offset;He.current.start=ft,He.current.end=te,H.useLayoutEffect(function(){var Ge=xn.getRecord();if(Ge.size===1){var Ze=Array.from(Ge.keys())[0],xt=Ge.get(Ze),Ot=on[ft];if(Ot&&xt===void 0){var hn=sn(Ot);if(hn===Ze){var xr=xn.get(Ze),_n=xr-$;ce(function(Kn){return Kn+_n})}}}xn.resetRecord()},[Ne]);var St=H.useState({width:0,height:M}),Pt=(0,v.Z)(St,2),rt=Pt[0],mt=Pt[1],zt=function(Ze){mt({width:Ze.offsetWidth,height:Ze.offsetHeight})},Ae=(0,H.useRef)(),ke=(0,H.useRef)(),dt=H.useMemo(function(){return Le(rt.width,pe)},[rt.width,pe]),gt=H.useMemo(function(){return Le(rt.height,Ne)},[rt.height,Ne]),Zt=Ne-M,Gt=(0,H.useRef)(Zt);Gt.current=Zt;function Vt(Ge){var Ze=Ge;return Number.isNaN(Gt.current)||(Ze=Math.min(Ze,Gt.current)),Ze=Math.max(Ze,0),Ze}var Xt=ut<=0,Nt=ut>=Zt,Rt=K<=0,Ht=K>=pe,Dt=b(Xt,Nt,Rt,Ht),cn=function(){return{x:pn?-K:K,y:ut}},$t=(0,H.useRef)(cn()),_t=(0,y.useEvent)(function(Ge){if(tt){var Ze=(0,x.Z)((0,x.Z)({},cn()),Ge);($t.current.x!==Ze.x||$t.current.y!==Ze.y)&&(tt(Ze),$t.current=Ze)}});function an(Ge,Ze){var xt=Ge;Ze?((0,me.flushSync)(function(){h(xt)}),_t()):ce(xt)}function Yt(Ge){var Ze=Ge.currentTarget.scrollTop;Ze!==ut&&ce(Ze),Pe==null||Pe(Ge),_t()}var wn=function(Ze){var xt=Ze,Ot=pe?pe-rt.width:0;return xt=Math.max(xt,0),xt=Math.min(xt,Ot),xt},Un=(0,y.useEvent)(function(Ge,Ze){Ze?((0,me.flushSync)(function(){h(function(xt){var Ot=xt+(pn?-Ge:Ge);return wn(Ot)})}),_t()):ce(function(xt){var Ot=xt+Ge;return Ot})}),At=F(vn,Xt,Nt,Rt,Ht,!!pe,Un),ht=(0,v.Z)(At,2),vt=ht[0],en=ht[1];Ye(vn,Nn,function(Ge,Ze,xt,Ot){var hn=Ot;return Dt(Ge,Ze,xt)?!1:!hn||!hn._virtualHandled?(hn&&(hn._virtualHandled=!0),vt({preventDefault:function(){},deltaX:Ge?Ze:0,deltaY:Ge?0:Ze}),!0):!1}),de(En,Nn,function(Ge){ce(function(Ze){return Ze+Ge})}),(0,Re.Z)(function(){function Ge(xt){var Ot=Xt&&xt.detail<0,hn=Nt&&xt.detail>0;vn&&!Ot&&!hn&&xt.preventDefault()}var Ze=Nn.current;return Ze.addEventListener("wheel",vt,{passive:!1}),Ze.addEventListener("DOMMouseScroll",en,{passive:!0}),Ze.addEventListener("MozMousePixelScroll",Ge,{passive:!1}),function(){Ze.removeEventListener("wheel",vt),Ze.removeEventListener("DOMMouseScroll",en),Ze.removeEventListener("MozMousePixelScroll",Ge)}},[vn,Xt,Nt]),(0,Re.Z)(function(){if(pe){var Ge=wn(K);h(Ge),_t({x:Ge})}},[rt.width,pe]);var nn=function(){var Ze,xt;(Ze=Ae.current)===null||Ze===void 0||Ze.delayHidden(),(xt=ke.current)===null||xt===void 0||xt.delayHidden()},Qt=ie(Nn,on,xn,$,sn,function(){return Wn(!0)},ce,nn);H.useImperativeHandle(Fe,function(){return{nativeElement:or.current,getScrollInfo:cn,scrollTo:function(Ze){function xt(Ot){return Ot&&(0,w.Z)(Ot)==="object"&&("left"in Ot||"top"in Ot)}xt(Ze)?(Ze.left!==void 0&&h(wn(Ze.left)),Qt(Ze.top)):Qt(Ze)}}}),(0,Re.Z)(function(){if(at){var Ge=on.slice(ft,te+1);at(Ge,on)}},[ft,te,on]);var Wt=X(on,sn,xn,$),ln=Ee==null?void 0:Ee({start:ft,end:te,virtual:En,offsetX:K,offsetY:et,rtl:pn,getSize:Wt}),gn=ot(on,ft,te,pe,K,An,z,le),mn=null;M&&(mn=(0,x.Z)((0,W.Z)({},Me?"height":"maxHeight",M),Tt),vn&&(mn.overflowY="hidden",pe&&(mn.overflowX="hidden"),D&&(mn.pointerEvents="none")));var Fn={};return pn&&(Fn.dir="rtl"),H.createElement("div",(0,T.Z)({ref:or,style:(0,x.Z)((0,x.Z)({},k),{},{position:"relative"}),className:Tn},Fn,kt),H.createElement(oe.Z,{onResize:zt},H.createElement(ge,{className:"".concat(E,"-holder"),style:mn,ref:Nn,onScroll:Yt,onMouseEnter:nn},H.createElement(q,{prefixCls:E,height:Ne,offsetX:K,offsetY:et,scrollWidth:pe,onInnerResize:Wn,ref:zn,innerProps:_e,rtl:pn,extra:ln},gn))),En&&Ne>M&&H.createElement(We,{ref:Ae,prefixCls:E,scrollOffset:ut,scrollRange:Ne,rtl:pn,onScroll:an,onStartMove:_,onStopMove:j,spinSize:gt,containerSize:rt.height,style:it==null?void 0:it.verticalScrollBar,thumbStyle:it==null?void 0:it.verticalScrollBarThumb,showScrollBar:tn}),En&&pe>rt.width&&H.createElement(We,{ref:ke,prefixCls:E,scrollOffset:K,scrollRange:pe,rtl:pn,onScroll:an,onStartMove:_,onStopMove:j,spinSize:dt,containerSize:rt.width,horizontal:!0,style:it==null?void 0:it.horizontalScrollBar,thumbStyle:it==null?void 0:it.horizontalScrollBarThumb,showScrollBar:tn}))}var qe=H.forwardRef(wt);qe.displayName="List";var Lt=qe,lt=Lt},16722:function(rn,De,f){"use strict";f.d(De,{Z:function(){return ye}});const T=oe=>typeof oe=="object"&&oe!=null&&oe.nodeType===1,w=(oe,y)=>(!y||oe!=="hidden")&&oe!=="visible"&&oe!=="clip",x=(oe,y)=>{if(oe.clientHeight<oe.scrollHeight||oe.clientWidth<oe.scrollWidth){const Re=getComputedStyle(oe,null);return w(Re.overflowY,y)||w(Re.overflowX,y)||(H=>{const me=(Te=>{if(!Te.ownerDocument||!Te.ownerDocument.defaultView)return null;try{return Te.ownerDocument.defaultView.frameElement}catch(q){return null}})(H);return!!me&&(me.clientHeight<H.scrollHeight||me.clientWidth<H.scrollWidth)})(oe)}return!1},W=(oe,y,Re,H,me,Te,q,Je)=>Te<oe&&q>y||Te>oe&&q<y?0:Te<=oe&&Je<=Re||q>=y&&Je>=Re?Te-oe-H:q>y&&Je<Re||Te<oe&&Je>Re?q-y+me:0,v=oe=>{const y=oe.parentElement;return y==null?oe.getRootNode().host||null:y},A=(oe,y)=>{var Re,H,me,Te;if(typeof document=="undefined")return[];const{scrollMode:q,block:Je,inline:ot,boundary:Ct,skipOverflowHiddenElements:Ft}=y,re=typeof Ct=="function"?Ct:We=>We!==Ct;if(!T(oe))throw new TypeError("Invalid target");const Q=document.scrollingElement||document.documentElement,S=[];let c=oe;for(;T(c)&&re(c);){if(c=v(c),c===Q){S.push(c);break}c!=null&&c===document.body&&x(c)&&!x(document.documentElement)||c!=null&&x(c,Ft)&&S.push(c)}const b=(H=(Re=window.visualViewport)==null?void 0:Re.width)!=null?H:innerWidth,F=(Te=(me=window.visualViewport)==null?void 0:me.height)!=null?Te:innerHeight,{scrollX:X,scrollY:P}=window,{height:Oe,width:je,top:ze,right:Ie,bottom:bt,left:Xe}=oe.getBoundingClientRect(),{top:Ye,right:fe,bottom:Y,left:de}=(We=>{const he=window.getComputedStyle(We);return{top:parseFloat(he.scrollMarginTop)||0,right:parseFloat(he.scrollMarginRight)||0,bottom:parseFloat(he.scrollMarginBottom)||0,left:parseFloat(he.scrollMarginLeft)||0}})(oe);let ae=Je==="start"||Je==="nearest"?ze-Ye:Je==="end"?bt+Y:ze+Oe/2-Ye+Y,ie=ot==="center"?Xe+je/2-de+fe:ot==="end"?Ie+fe:Xe-de;const Ue=[];for(let We=0;We<S.length;We++){const he=S[We],{height:Le,width:ve,top:Et,right:Tt,bottom:wt,left:qe}=he.getBoundingClientRect();if(q==="if-needed"&&ze>=0&&Xe>=0&&bt<=F&&Ie<=b&&(he===Q&&!x(he)||ze>=Et&&bt<=wt&&Xe>=qe&&Ie<=Tt))return Ue;const Lt=getComputedStyle(he),lt=parseInt(Lt.borderLeftWidth,10),Z=parseInt(Lt.borderTopWidth,10),Fe=parseInt(Lt.borderRightWidth,10),se=parseInt(Lt.borderBottomWidth,10);let E=0,I=0;const M="offsetWidth"in he?he.offsetWidth-he.clientWidth-lt-Fe:0,$="offsetHeight"in he?he.offsetHeight-he.clientHeight-Z-se:0,J="offsetWidth"in he?he.offsetWidth===0?0:ve/he.offsetWidth:0,Me="offsetHeight"in he?he.offsetHeight===0?0:Le/he.offsetHeight:0;if(Q===he)E=Je==="start"?ae:Je==="end"?ae-F:Je==="nearest"?W(P,P+F,F,Z,se,P+ae,P+ae+Oe,Oe):ae-F/2,I=ot==="start"?ie:ot==="center"?ie-b/2:ot==="end"?ie-b:W(X,X+b,b,lt,Fe,X+ie,X+ie+je,je),E=Math.max(0,E+P),I=Math.max(0,I+X);else{E=Je==="start"?ae-Et-Z:Je==="end"?ae-wt+se+$:Je==="nearest"?W(Et,wt,Le,Z,se+$,ae,ae+Oe,Oe):ae-(Et+Le/2)+$/2,I=ot==="start"?ie-qe-lt:ot==="center"?ie-(qe+ve/2)+M/2:ot==="end"?ie-Tt+Fe+M:W(qe,Tt,ve,lt,Fe+M,ie,ie+je,je);const{scrollLeft:k,scrollTop:xe}=he;E=Me===0?0:Math.max(0,Math.min(xe+E/Me,he.scrollHeight-Le/Me+$)),I=J===0?0:Math.max(0,Math.min(k+I/J,he.scrollWidth-ve/J+M)),ae+=xe-E,ie+=k-I}Ue.push({el:he,top:E,left:I})}return Ue},N=oe=>oe===!1?{block:"end",inline:"nearest"}:(y=>y===Object(y)&&Object.keys(y).length!==0)(oe)?oe:{block:"start",inline:"nearest"};function ye(oe,y){if(!oe.isConnected||!(me=>{let Te=me;for(;Te&&Te.parentNode;){if(Te.parentNode===document)return!0;Te=Te.parentNode instanceof ShadowRoot?Te.parentNode.host:Te.parentNode}return!1})(oe))return;const Re=(me=>{const Te=window.getComputedStyle(me);return{top:parseFloat(Te.scrollMarginTop)||0,right:parseFloat(Te.scrollMarginRight)||0,bottom:parseFloat(Te.scrollMarginBottom)||0,left:parseFloat(Te.scrollMarginLeft)||0}})(oe);if((me=>typeof me=="object"&&typeof me.behavior=="function")(y))return y.behavior(A(oe,y));const H=typeof y=="boolean"||y==null?void 0:y.behavior;for(const{el:me,top:Te,left:q}of A(oe,N(y))){const Je=Te-Re.top+Re.bottom,ot=q-Re.left+Re.right;me.scroll({top:Je,left:ot,behavior:H})}}}}]);